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.
1326 lines
1.5 MiB
1326 lines
1.5 MiB
!(function(){var bu=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[5402],{70557:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return J}});var d=_(60499),ge=_(59301),Ee={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"},ye=Ee,W=_(7657),g=function(X,U){return ge.createElement(W.Z,(0,d.Z)({},X,{ref:U,icon:ye}))},ne=ge.forwardRef(g),J=ne},40001:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return J}});var d=_(60499),ge=_(59301),Ee={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"},ye=Ee,W=_(7657),g=function(X,U){return ge.createElement(W.Z,(0,d.Z)({},X,{ref:U,icon:ye}))},ne=ge.forwardRef(g),J=ne},84105:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return J}});var d=_(60499),ge=_(59301),Ee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},ye=Ee,W=_(7657),g=function(X,U){return ge.createElement(W.Z,(0,d.Z)({},X,{ref:U,icon:ye}))},ne=ge.forwardRef(g),J=ne},18785:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return J}});var d=_(60499),ge=_(59301),Ee={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"},ye=Ee,W=_(7657),g=function(X,U){return ge.createElement(W.Z,(0,d.Z)({},X,{ref:U,icon:ye}))},ne=ge.forwardRef(g),J=ne},73331:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return J}});var d=_(60499),ge=_(59301),Ee={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"},ye=Ee,W=_(7657),g=function(X,U){return ge.createElement(W.Z,(0,d.Z)({},X,{ref:U,icon:ye}))},ne=ge.forwardRef(g),J=ne},15277:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return J}});var d=_(60499),ge=_(59301),Ee={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"},ye=Ee,W=_(7657),g=function(X,U){return ge.createElement(W.Z,(0,d.Z)({},X,{ref:U,icon:ye}))},ne=ge.forwardRef(g),J=ne},33853:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return J}});var d=_(60499),ge=_(59301),Ee={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"},ye=Ee,W=_(7657),g=function(X,U){return ge.createElement(W.Z,(0,d.Z)({},X,{ref:U,icon:ye}))},ne=ge.forwardRef(g),J=ne},62772:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return J}});var d=_(60499),ge=_(59301),Ee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},ye=Ee,W=_(7657),g=function(X,U){return ge.createElement(W.Z,(0,d.Z)({},X,{ref:U,icon:ye}))},ne=ge.forwardRef(g),J=ne},47472:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return J}});var d=_(60499),ge=_(59301),Ee={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"},ye=Ee,W=_(7657),g=function(X,U){return ge.createElement(W.Z,(0,d.Z)({},X,{ref:U,icon:ye}))},ne=ge.forwardRef(g),J=ne},68196:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return lt}});var d=_(85899),ge=_(72190),Ee=_(42244),ye=_(43403),W=_(92310),g=_.n(W),ne=_(29301),J=_(76846),o=_(96452),X=_(6089),U=_(80402),S=_(34280),w=_(49658),A=_(59301),I=_(60499),q=_(77900),re=_(8654);function G(Re){var Te=Re.prefixCls,pe=Re.align,We=Re.arrow,De=Re.arrowPos,Se=We||{},k=Se.className,fe=Se.content,ve=De.x,Be=ve===void 0?0:ve,qe=De.y,at=qe===void 0?0:qe,ct=A.useRef();if(!pe||!pe.points)return null;var mt={position:"absolute"};if(pe.autoArrow!==!1){var dt=pe.points[0],gt=pe.points[1],Lt=dt[0],St=dt[1],Ct=gt[0],nt=gt[1];Lt===Ct||!["t","b"].includes(Lt)?mt.top=at:Lt==="t"?mt.top=0:mt.bottom=0,St===nt||!["l","r"].includes(St)?mt.left=Be:St==="l"?mt.left=0:mt.right=0}return A.createElement("div",{ref:ct,className:g()("".concat(Te,"-arrow"),k),style:mt},fe)}function D(Re){var Te=Re.prefixCls,pe=Re.open,We=Re.zIndex,De=Re.mask,Se=Re.motion;return De?A.createElement(q.default,(0,I.Z)({},Se,{motionAppear:!0,visible:pe,removeOnLeave:!0}),function(k){var fe=k.className;return A.createElement("div",{style:{zIndex:We},className:g()("".concat(Te,"-mask"),fe)})}):null}var H=A.memo(function(Re){var Te=Re.children;return Te},function(Re,Te){return Te.cache}),$=H,z=A.forwardRef(function(Re,Te){var pe=Re.popup,We=Re.className,De=Re.prefixCls,Se=Re.style,k=Re.target,fe=Re.onVisibleChanged,ve=Re.open,Be=Re.keepDom,qe=Re.fresh,at=Re.onClick,ct=Re.mask,mt=Re.arrow,dt=Re.arrowPos,gt=Re.align,Lt=Re.motion,St=Re.maskMotion,Ct=Re.forceRender,nt=Re.getPopupContainer,vt=Re.autoDestroy,pt=Re.portal,be=Re.zIndex,Je=Re.onMouseEnter,x=Re.onMouseLeave,T=Re.onPointerEnter,$e=Re.onPointerDownCapture,j=Re.ready,ae=Re.offsetX,xt=Re.offsetY,Ae=Re.offsetR,Me=Re.offsetB,Xe=Re.onAlign,ee=Re.onPrepare,oe=Re.stretch,xe=Re.targetWidth,ze=Re.targetHeight,F=typeof pe=="function"?pe():pe,tt=ve||Be,se=(nt==null?void 0:nt.length)>0,it=A.useState(!nt||!se),Ot=(0,ge.Z)(it,2),Ut=Ot[0],Ht=Ot[1];if((0,S.Z)(function(){!Ut&&se&&k&&Ht(!0)},[Ut,se,k]),!Ut)return null;var Xt="auto",Vt={left:"-1000vw",top:"-1000vh",right:Xt,bottom:Xt};if(j||!ve){var hn,Dn=gt.points,sn=gt.dynamicInset||((hn=gt._experimental)===null||hn===void 0?void 0:hn.dynamicInset),An=sn&&Dn[0][1]==="r",Kt=sn&&Dn[0][0]==="b";An?(Vt.right=Ae,Vt.left=Xt):(Vt.left=ae,Vt.right=Xt),Kt?(Vt.bottom=Me,Vt.top=Xt):(Vt.top=xt,Vt.bottom=Xt)}var kt={};return oe&&(oe.includes("height")&&ze?kt.height=ze:oe.includes("minHeight")&&ze&&(kt.minHeight=ze),oe.includes("width")&&xe?kt.width=xe:oe.includes("minWidth")&&xe&&(kt.minWidth=xe)),ve||(kt.pointerEvents="none"),A.createElement(pt,{open:Ct||tt,getContainer:nt&&function(){return nt(k)},autoDestroy:vt},A.createElement(D,{prefixCls:De,open:ve,zIndex:be,mask:ct,motion:St}),A.createElement(ne.Z,{onResize:Xe,disabled:!ve},function(te){return A.createElement(q.default,(0,I.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Ct,leavedClassName:"".concat(De,"-hidden")},Lt,{onAppearPrepare:ee,onEnterPrepare:ee,visible:ve,onVisibleChanged:function(st){var Rt;Lt==null||(Rt=Lt.onVisibleChanged)===null||Rt===void 0||Rt.call(Lt,st),fe(st)}}),function(he,st){var Rt=he.className,Ft=he.style,Gt=g()(De,Rt,We);return A.createElement("div",{ref:(0,re.sQ)(te,Te,st),className:Gt,style:(0,d.Z)((0,d.Z)((0,d.Z)((0,d.Z)({"--arrow-x":"".concat(dt.x||0,"px"),"--arrow-y":"".concat(dt.y||0,"px")},Vt),kt),Ft),{},{boxSizing:"border-box",zIndex:be},Se),onMouseEnter:Je,onMouseLeave:x,onPointerEnter:T,onClick:at,onPointerDownCapture:$e},mt&&A.createElement(G,{prefixCls:De,arrow:mt,arrowPos:dt,align:gt}),A.createElement($,{cache:!ve&&!qe},F))})}))}),de=z,we=A.forwardRef(function(Re,Te){var pe=Re.children,We=Re.getTriggerDOMNode,De=(0,re.Yr)(pe),Se=A.useCallback(function(fe){(0,re.mH)(Te,We?We(fe):fe)},[We]),k=(0,re.x1)(Se,(0,re.C4)(pe));return De?A.cloneElement(pe,{ref:k}):pe}),ce=we,Oe=A.createContext(null),Fe=Oe;function Ne(Re){return Re?Array.isArray(Re)?Re:[Re]:[]}function Ve(Re,Te,pe,We){return A.useMemo(function(){var De=Ne(pe!=null?pe:Te),Se=Ne(We!=null?We:Te),k=new Set(De),fe=new Set(Se);return Re&&(k.has("hover")&&(k.delete("hover"),k.add("click")),fe.has("hover")&&(fe.delete("hover"),fe.add("click"))),[k,fe]},[Re,Te,pe,We])}var K=_(29194);function B(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],pe=arguments.length>2?arguments[2]:void 0;return pe?Re[0]===Te[0]:Re[0]===Te[0]&&Re[1]===Te[1]}function L(Re,Te,pe,We){for(var De=pe.points,Se=Object.keys(Re),k=0;k<Se.length;k+=1){var fe,ve=Se[k];if(B((fe=Re[ve])===null||fe===void 0?void 0:fe.points,De,We))return"".concat(Te,"-placement-").concat(ve)}return""}function Y(Re,Te,pe,We){return Te||(pe?{motionName:"".concat(Re,"-").concat(pe)}:We?{motionName:We}:null)}function Q(Re){return Re.ownerDocument.defaultView}function P(Re){for(var Te=[],pe=Re==null?void 0:Re.parentElement,We=["hidden","scroll","clip","auto"];pe;){var De=Q(pe).getComputedStyle(pe),Se=De.overflowX,k=De.overflowY,fe=De.overflow;[Se,k,fe].some(function(ve){return We.includes(ve)})&&Te.push(pe),pe=pe.parentElement}return Te}function b(Re){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Re)?Te:Re}function E(Re){return b(parseFloat(Re),0)}function N(Re,Te){var pe=(0,d.Z)({},Re);return(Te||[]).forEach(function(We){if(!(We instanceof HTMLBodyElement||We instanceof HTMLHtmlElement)){var De=Q(We).getComputedStyle(We),Se=De.overflow,k=De.overflowClipMargin,fe=De.borderTopWidth,ve=De.borderBottomWidth,Be=De.borderLeftWidth,qe=De.borderRightWidth,at=We.getBoundingClientRect(),ct=We.offsetHeight,mt=We.clientHeight,dt=We.offsetWidth,gt=We.clientWidth,Lt=E(fe),St=E(ve),Ct=E(Be),nt=E(qe),vt=b(Math.round(at.width/dt*1e3)/1e3),pt=b(Math.round(at.height/ct*1e3)/1e3),be=(dt-gt-Ct-nt)*vt,Je=(ct-mt-Lt-St)*pt,x=Lt*pt,T=St*pt,$e=Ct*vt,j=nt*vt,ae=0,xt=0;if(Se==="clip"){var Ae=E(k);ae=Ae*vt,xt=Ae*pt}var Me=at.x+$e-ae,Xe=at.y+x-xt,ee=Me+at.width+2*ae-$e-j-be,oe=Xe+at.height+2*xt-x-T-Je;pe.left=Math.max(pe.left,Me),pe.top=Math.max(pe.top,Xe),pe.right=Math.min(pe.right,ee),pe.bottom=Math.min(pe.bottom,oe)}}),pe}function ie(Re){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,pe="".concat(Te),We=pe.match(/^(.*)\%$/);return We?Re*(parseFloat(We[1])/100):parseFloat(pe)}function Ie(Re,Te){var pe=Te||[],We=(0,ge.Z)(pe,2),De=We[0],Se=We[1];return[ie(Re.width,De),ie(Re.height,Se)]}function Ze(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Re[0],Re[1]]}function me(Re,Te){var pe=Te[0],We=Te[1],De,Se;return pe==="t"?Se=Re.y:pe==="b"?Se=Re.y+Re.height:Se=Re.y+Re.height/2,We==="l"?De=Re.x:We==="r"?De=Re.x+Re.width:De=Re.x+Re.width/2,{x:De,y:Se}}function Ce(Re,Te){var pe={t:"b",b:"t",l:"r",r:"l"};return Re.map(function(We,De){return De===Te?pe[We]||"c":We}).join("")}function Ke(Re,Te,pe,We,De,Se,k){var fe=A.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:De[We]||{}}),ve=(0,ge.Z)(fe,2),Be=ve[0],qe=ve[1],at=A.useRef(0),ct=A.useMemo(function(){return Te?P(Te):[]},[Te]),mt=A.useRef({}),dt=function(){mt.current={}};Re||dt();var gt=(0,X.Z)(function(){if(Te&&pe&&Re){let Dr=function(Zr,ii){var wi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:un,ui=tt.x+Zr,zi=tt.y+ii,Gi=ui+Kt,Mi=zi+An,_i=Math.max(ui,wi.left),Cn=Math.max(zi,wi.top),Zn=Math.min(Gi,wi.right),br=Math.min(Mi,wi.bottom);return Math.max(0,(Zn-_i)*(br-Cn))},Pr=function(){Er=tt.y+kn,xr=Er+An,Mn=tt.x+on,Ln=Mn+Kt};var Ct,nt,vt,pt,be=Te,Je=be.ownerDocument,x=Q(be),T=x.getComputedStyle(be),$e=T.position,j=be.style.left,ae=be.style.top,xt=be.style.right,Ae=be.style.bottom,Me=be.style.overflow,Xe=(0,d.Z)((0,d.Z)({},De[We]),Se),ee=Je.createElement("div");(Ct=be.parentElement)===null||Ct===void 0||Ct.appendChild(ee),ee.style.left="".concat(be.offsetLeft,"px"),ee.style.top="".concat(be.offsetTop,"px"),ee.style.position=$e,ee.style.height="".concat(be.offsetHeight,"px"),ee.style.width="".concat(be.offsetWidth,"px"),be.style.left="0",be.style.top="0",be.style.right="auto",be.style.bottom="auto",be.style.overflow="hidden";var oe;if(Array.isArray(pe))oe={x:pe[0],y:pe[1],width:0,height:0};else{var xe,ze,F=pe.getBoundingClientRect();F.x=(xe=F.x)!==null&&xe!==void 0?xe:F.left,F.y=(ze=F.y)!==null&&ze!==void 0?ze:F.top,oe={x:F.x,y:F.y,width:F.width,height:F.height}}var tt=be.getBoundingClientRect(),se=x.getComputedStyle(be),it=se.height,Ot=se.width;tt.x=(nt=tt.x)!==null&&nt!==void 0?nt:tt.left,tt.y=(vt=tt.y)!==null&&vt!==void 0?vt:tt.top;var Ut=Je.documentElement,Ht=Ut.clientWidth,Xt=Ut.clientHeight,Vt=Ut.scrollWidth,hn=Ut.scrollHeight,Dn=Ut.scrollTop,sn=Ut.scrollLeft,An=tt.height,Kt=tt.width,kt=oe.height,te=oe.width,he={left:0,top:0,right:Ht,bottom:Xt},st={left:-sn,top:-Dn,right:Vt-sn,bottom:hn-Dn},Rt=Xe.htmlRegion,Ft="visible",Gt="visibleFirst";Rt!=="scroll"&&Rt!==Gt&&(Rt=Ft);var qt=Rt===Gt,Wt=N(st,ct),Qt=N(he,ct),un=Rt===Ft?Qt:Wt,gn=qt?Qt:un;be.style.left="auto",be.style.top="auto",be.style.right="0",be.style.bottom="0";var Fn=be.getBoundingClientRect();be.style.left=j,be.style.top=ae,be.style.right=xt,be.style.bottom=Ae,be.style.overflow=Me,(pt=be.parentElement)===null||pt===void 0||pt.removeChild(ee);var Pn=b(Math.round(Kt/parseFloat(Ot)*1e3)/1e3),bn=b(Math.round(An/parseFloat(it)*1e3)/1e3);if(Pn===0||bn===0||(0,J.Sh)(pe)&&!(0,K.Z)(pe))return;var On=Xe.offset,Sn=Xe.targetOffset,Qn=Ie(tt,On),rt=(0,ge.Z)(Qn,2),ht=rt[0],Nt=rt[1],At=Ie(oe,Sn),Pt=(0,ge.Z)(At,2),$t=Pt[0],Zt=Pt[1];oe.x-=$t,oe.y-=Zt;var tn=Xe.points||[],dn=(0,ge.Z)(tn,2),fn=dn[0],wn=dn[1],cn=Ze(wn),an=Ze(fn),mn=me(oe,cn),Xn=me(tt,an),Jn=(0,d.Z)({},Xe),on=mn.x-Xn.x+ht,kn=mn.y-Xn.y+Nt,rr=Dr(on,kn),Hn=Dr(on,kn,Qt),zn=me(oe,["t","l"]),or=me(tt,["t","l"]),In=me(oe,["b","r"]),Kn=me(tt,["b","r"]),lr=Xe.overflow||{},Tt=lr.adjustX,Tn=lr.adjustY,er=lr.shiftX,mr=lr.shiftY,Cr=function(ii){return typeof ii=="boolean"?ii:ii>=0},Er,xr,Mn,Ln;Pr();var yr=Cr(Tn),cr=an[0]===cn[0];if(yr&&an[0]==="t"&&(xr>gn.bottom||mt.current.bt)){var dr=kn;cr?dr-=An-kt:dr=zn.y-Kn.y-Nt;var xi=Dr(on,dr),ei=Dr(on,dr,Qt);xi>rr||xi===rr&&(!qt||ei>=Hn)?(mt.current.bt=!0,kn=dr,Nt=-Nt,Jn.points=[Ce(an,0),Ce(cn,0)]):mt.current.bt=!1}if(yr&&an[0]==="b"&&(Er<gn.top||mt.current.tb)){var Ar=kn;cr?Ar+=An-kt:Ar=In.y-or.y-Nt;var xn=Dr(on,Ar),fr=Dr(on,Ar,Qt);xn>rr||xn===rr&&(!qt||fr>=Hn)?(mt.current.tb=!0,kn=Ar,Nt=-Nt,Jn.points=[Ce(an,0),Ce(cn,0)]):mt.current.tb=!1}var pr=Cr(Tt),Xr=an[1]===cn[1];if(pr&&an[1]==="l"&&(Ln>gn.right||mt.current.rl)){var ai=on;Xr?ai-=Kt-te:ai=zn.x-Kn.x-ht;var kr=Dr(ai,kn),Ur=Dr(ai,kn,Qt);kr>rr||kr===rr&&(!qt||Ur>=Hn)?(mt.current.rl=!0,on=ai,ht=-ht,Jn.points=[Ce(an,1),Ce(cn,1)]):mt.current.rl=!1}if(pr&&an[1]==="r"&&(Mn<gn.left||mt.current.lr)){var Rr=on;Xr?Rr+=Kt-te:Rr=In.x-or.x-ht;var hr=Dr(Rr,kn),hi=Dr(Rr,kn,Qt);hr>rr||hr===rr&&(!qt||hi>=Hn)?(mt.current.lr=!0,on=Rr,ht=-ht,Jn.points=[Ce(an,1),Ce(cn,1)]):mt.current.lr=!1}Pr();var Gr=er===!0?0:er;typeof Gr=="number"&&(Mn<Qt.left&&(on-=Mn-Qt.left-ht,oe.x+te<Qt.left+Gr&&(on+=oe.x-Qt.left+te-Gr)),Ln>Qt.right&&(on-=Ln-Qt.right-ht,oe.x>Qt.right-Gr&&(on+=oe.x-Qt.right+Gr)));var ri=mr===!0?0:mr;typeof ri=="number"&&(Er<Qt.top&&(kn-=Er-Qt.top-Nt,oe.y+kt<Qt.top+ri&&(kn+=oe.y-Qt.top+kt-ri)),xr>Qt.bottom&&(kn-=xr-Qt.bottom-Nt,oe.y>Qt.bottom-ri&&(kn+=oe.y-Qt.bottom+ri)));var oi=tt.x+on,ti=oi+Kt,nr=tt.y+kn,fi=nr+An,mi=oe.x,vi=mi+te,Wr=oe.y,Vn=Wr+kt,Oi=Math.max(oi,mi),rn=Math.min(ti,vi),Vr=(Oi+rn)/2,Ii=Vr-oi,pi=Math.max(nr,Wr),Br=Math.min(fi,Vn),li=(pi+Br)/2,Gn=li-nr;k==null||k(Te,Jn);var Qr=Fn.right-tt.x-(on+tt.width),gi=Fn.bottom-tt.y-(kn+tt.height);Pn===1&&(on=Math.floor(on),Qr=Math.floor(Qr)),bn===1&&(kn=Math.floor(kn),gi=Math.floor(gi));var ni={ready:!0,offsetX:on/Pn,offsetY:kn/bn,offsetR:Qr/Pn,offsetB:gi/bn,arrowX:Ii/Pn,arrowY:Gn/bn,scaleX:Pn,scaleY:bn,align:Jn};qe(ni)}}),Lt=function(){at.current+=1;var nt=at.current;Promise.resolve().then(function(){at.current===nt&>()})},St=function(){qe(function(nt){return(0,d.Z)((0,d.Z)({},nt),{},{ready:!1})})};return(0,S.Z)(St,[We]),(0,S.Z)(function(){Re||St()},[Re]),[Be.ready,Be.offsetX,Be.offsetY,Be.offsetR,Be.offsetB,Be.arrowX,Be.arrowY,Be.scaleX,Be.scaleY,Be.align,Lt]}var Qe=_(77654);function Ge(Re,Te,pe,We,De){(0,S.Z)(function(){if(Re&&Te&&pe){let at=function(){We(),De()};var Se=Te,k=pe,fe=P(Se),ve=P(k),Be=Q(k),qe=new Set([Be].concat((0,Qe.Z)(fe),(0,Qe.Z)(ve)));return qe.forEach(function(ct){ct.addEventListener("scroll",at,{passive:!0})}),Be.addEventListener("resize",at,{passive:!0}),We(),function(){qe.forEach(function(ct){ct.removeEventListener("scroll",at),Be.removeEventListener("resize",at)})}}},[Re,Te,pe])}var wt=_(48736);function Ue(Re,Te,pe,We,De,Se,k,fe){var ve=A.useRef(Re);ve.current=Re;var Be=A.useRef(!1);A.useEffect(function(){if(Te&&We&&(!De||Se)){var at=function(){Be.current=!1},ct=function(vt){var pt;ve.current&&!k(((pt=vt.composedPath)===null||pt===void 0||(pt=pt.call(vt))===null||pt===void 0?void 0:pt[0])||vt.target)&&!Be.current&&fe(!1)},mt=Q(We);mt.addEventListener("pointerdown",at,!0),mt.addEventListener("mousedown",ct,!0),mt.addEventListener("contextmenu",ct,!0);var dt=(0,o.A)(pe);if(dt&&(dt.addEventListener("mousedown",ct,!0),dt.addEventListener("contextmenu",ct,!0)),0)var gt,Lt,St,Ct;return function(){mt.removeEventListener("pointerdown",at,!0),mt.removeEventListener("mousedown",ct,!0),mt.removeEventListener("contextmenu",ct,!0),dt&&(dt.removeEventListener("mousedown",ct,!0),dt.removeEventListener("contextmenu",ct,!0))}}},[Te,pe,We,De,Se]);function qe(){Be.current=!0}return qe}var bt=["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 Le(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ye.Z,Te=A.forwardRef(function(pe,We){var De=pe.prefixCls,Se=De===void 0?"rc-trigger-popup":De,k=pe.children,fe=pe.action,ve=fe===void 0?"hover":fe,Be=pe.showAction,qe=pe.hideAction,at=pe.popupVisible,ct=pe.defaultPopupVisible,mt=pe.onPopupVisibleChange,dt=pe.afterPopupVisibleChange,gt=pe.mouseEnterDelay,Lt=pe.mouseLeaveDelay,St=Lt===void 0?.1:Lt,Ct=pe.focusDelay,nt=pe.blurDelay,vt=pe.mask,pt=pe.maskClosable,be=pt===void 0?!0:pt,Je=pe.getPopupContainer,x=pe.forceRender,T=pe.autoDestroy,$e=pe.destroyPopupOnHide,j=pe.popup,ae=pe.popupClassName,xt=pe.popupStyle,Ae=pe.popupPlacement,Me=pe.builtinPlacements,Xe=Me===void 0?{}:Me,ee=pe.popupAlign,oe=pe.zIndex,xe=pe.stretch,ze=pe.getPopupClassNameFromAlign,F=pe.fresh,tt=pe.alignPoint,se=pe.onPopupClick,it=pe.onPopupAlign,Ot=pe.arrow,Ut=pe.popupMotion,Ht=pe.maskMotion,Xt=pe.popupTransitionName,Vt=pe.popupAnimation,hn=pe.maskTransitionName,Dn=pe.maskAnimation,sn=pe.className,An=pe.getTriggerDOMNode,Kt=(0,Ee.Z)(pe,bt),kt=T||$e||!1,te=A.useState(!1),he=(0,ge.Z)(te,2),st=he[0],Rt=he[1];(0,S.Z)(function(){Rt((0,w.Z)())},[]);var Ft=A.useRef({}),Gt=A.useContext(Fe),qt=A.useMemo(function(){return{registerSubPopup:function(Zn,br){Ft.current[Zn]=br,Gt==null||Gt.registerSubPopup(Zn,br)}}},[Gt]),Wt=(0,U.Z)(),Qt=A.useState(null),un=(0,ge.Z)(Qt,2),gn=un[0],Fn=un[1],Pn=A.useRef(null),bn=(0,X.Z)(function(Cn){Pn.current=Cn,(0,J.Sh)(Cn)&&gn!==Cn&&Fn(Cn),Gt==null||Gt.registerSubPopup(Wt,Cn)}),On=A.useState(null),Sn=(0,ge.Z)(On,2),Qn=Sn[0],rt=Sn[1],ht=A.useRef(null),Nt=(0,X.Z)(function(Cn){(0,J.Sh)(Cn)&&Qn!==Cn&&(rt(Cn),ht.current=Cn)}),At=A.Children.only(k),Pt=(At==null?void 0:At.props)||{},$t={},Zt=(0,X.Z)(function(Cn){var Zn,br,qn=Qn;return(qn==null?void 0:qn.contains(Cn))||((Zn=(0,o.A)(qn))===null||Zn===void 0?void 0:Zn.host)===Cn||Cn===qn||(gn==null?void 0:gn.contains(Cn))||((br=(0,o.A)(gn))===null||br===void 0?void 0:br.host)===Cn||Cn===gn||Object.values(Ft.current).some(function(sr){return(sr==null?void 0:sr.contains(Cn))||Cn===sr})}),tn=Y(Se,Ut,Vt,Xt),dn=Y(Se,Ht,Dn,hn),fn=A.useState(ct||!1),wn=(0,ge.Z)(fn,2),cn=wn[0],an=wn[1],mn=at!=null?at:cn,Xn=(0,X.Z)(function(Cn){at===void 0&&an(Cn)});(0,S.Z)(function(){an(at||!1)},[at]);var Jn=A.useRef(mn);Jn.current=mn;var on=A.useRef([]);on.current=[];var kn=(0,X.Z)(function(Cn){var Zn;Xn(Cn),((Zn=on.current[on.current.length-1])!==null&&Zn!==void 0?Zn:mn)!==Cn&&(on.current.push(Cn),mt==null||mt(Cn))}),rr=A.useRef(),Hn=function(){clearTimeout(rr.current)},zn=function(Zn){var br=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Hn(),br===0?kn(Zn):rr.current=setTimeout(function(){kn(Zn)},br*1e3)};A.useEffect(function(){return Hn},[]);var or=A.useState(!1),In=(0,ge.Z)(or,2),Kn=In[0],lr=In[1];(0,S.Z)(function(Cn){(!Cn||mn)&&lr(!0)},[mn]);var Tt=A.useState(null),Tn=(0,ge.Z)(Tt,2),er=Tn[0],mr=Tn[1],Cr=A.useState(null),Er=(0,ge.Z)(Cr,2),xr=Er[0],Mn=Er[1],Ln=function(Zn){Mn([Zn.clientX,Zn.clientY])},yr=Ke(mn,gn,tt&&xr!==null?xr:Qn,Ae,Xe,ee,it),cr=(0,ge.Z)(yr,11),dr=cr[0],xi=cr[1],ei=cr[2],Ar=cr[3],xn=cr[4],fr=cr[5],pr=cr[6],Xr=cr[7],ai=cr[8],kr=cr[9],Ur=cr[10],Rr=Ve(st,ve,Be,qe),hr=(0,ge.Z)(Rr,2),hi=hr[0],Gr=hr[1],ri=hi.has("click"),oi=Gr.has("click")||Gr.has("contextMenu"),ti=(0,X.Z)(function(){Kn||Ur()}),nr=function(){Jn.current&&tt&&oi&&zn(!1)};Ge(mn,Qn,gn,ti,nr),(0,S.Z)(function(){ti()},[xr,Ae]),(0,S.Z)(function(){mn&&!(Xe!=null&&Xe[Ae])&&ti()},[JSON.stringify(ee)]);var fi=A.useMemo(function(){var Cn=L(Xe,Se,kr,tt);return g()(Cn,ze==null?void 0:ze(kr))},[kr,ze,Xe,Se,tt]);A.useImperativeHandle(We,function(){return{nativeElement:ht.current,popupElement:Pn.current,forceAlign:ti}});var mi=A.useState(0),vi=(0,ge.Z)(mi,2),Wr=vi[0],Vn=vi[1],Oi=A.useState(0),rn=(0,ge.Z)(Oi,2),Vr=rn[0],Ii=rn[1],pi=function(){if(xe&&Qn){var Zn=Qn.getBoundingClientRect();Vn(Zn.width),Ii(Zn.height)}},Br=function(){pi(),ti()},li=function(Zn){lr(!1),Ur(),dt==null||dt(Zn)},Gn=function(){return new Promise(function(Zn){pi(),mr(function(){return Zn})})};(0,S.Z)(function(){er&&(Ur(),er(),mr(null))},[er]);function Qr(Cn,Zn,br,qn){$t[Cn]=function(sr){var Ei;qn==null||qn(sr),zn(Zn,br);for(var Jr=arguments.length,Ri=new Array(Jr>1?Jr-1:0),gr=1;gr<Jr;gr++)Ri[gr-1]=arguments[gr];(Ei=Pt[Cn])===null||Ei===void 0||Ei.call.apply(Ei,[Pt,sr].concat(Ri))}}(ri||oi)&&($t.onClick=function(Cn){var Zn;Jn.current&&oi?zn(!1):!Jn.current&&ri&&(Ln(Cn),zn(!0));for(var br=arguments.length,qn=new Array(br>1?br-1:0),sr=1;sr<br;sr++)qn[sr-1]=arguments[sr];(Zn=Pt.onClick)===null||Zn===void 0||Zn.call.apply(Zn,[Pt,Cn].concat(qn))});var gi=Ue(mn,oi,Qn,gn,vt,be,Zt,zn),ni=hi.has("hover"),Dr=Gr.has("hover"),Pr,Zr;ni&&(Qr("onMouseEnter",!0,gt,function(Cn){Ln(Cn)}),Qr("onPointerEnter",!0,gt,function(Cn){Ln(Cn)}),Pr=function(Zn){(mn||Kn)&&gn!==null&&gn!==void 0&&gn.contains(Zn.target)&&zn(!0,gt)},tt&&($t.onMouseMove=function(Cn){var Zn;(Zn=Pt.onMouseMove)===null||Zn===void 0||Zn.call(Pt,Cn)})),Dr&&(Qr("onMouseLeave",!1,St),Qr("onPointerLeave",!1,St),Zr=function(){zn(!1,St)}),hi.has("focus")&&Qr("onFocus",!0,Ct),Gr.has("focus")&&Qr("onBlur",!1,nt),hi.has("contextMenu")&&($t.onContextMenu=function(Cn){var Zn;Jn.current&&Gr.has("contextMenu")?zn(!1):(Ln(Cn),zn(!0)),Cn.preventDefault();for(var br=arguments.length,qn=new Array(br>1?br-1:0),sr=1;sr<br;sr++)qn[sr-1]=arguments[sr];(Zn=Pt.onContextMenu)===null||Zn===void 0||Zn.call.apply(Zn,[Pt,Cn].concat(qn))}),sn&&($t.className=g()(Pt.className,sn));var ii=A.useRef(!1);ii.current||(ii.current=x||mn||Kn);var wi=(0,d.Z)((0,d.Z)({},Pt),$t),ui={},zi=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];zi.forEach(function(Cn){Kt[Cn]&&(ui[Cn]=function(){for(var Zn,br=arguments.length,qn=new Array(br),sr=0;sr<br;sr++)qn[sr]=arguments[sr];(Zn=wi[Cn])===null||Zn===void 0||Zn.call.apply(Zn,[wi].concat(qn)),Kt[Cn].apply(Kt,qn)})});var Gi=A.cloneElement(At,(0,d.Z)((0,d.Z)({},wi),ui)),Mi={x:fr,y:pr},_i=Ot?(0,d.Z)({},Ot!==!0?Ot:{}):null;return A.createElement(A.Fragment,null,A.createElement(ne.Z,{disabled:!mn,ref:Nt,onResize:Br},A.createElement(ce,{getTriggerDOMNode:An},Gi)),ii.current&&A.createElement(Fe.Provider,{value:qt},A.createElement(de,{portal:Re,ref:bn,prefixCls:Se,popup:j,className:g()(ae,fi),style:xt,target:Qn,onMouseEnter:Pr,onMouseLeave:Zr,onPointerEnter:Pr,zIndex:oe,open:mn,keepDom:Kn,fresh:F,onClick:se,onPointerDownCapture:gi,mask:vt,motion:tn,maskMotion:dn,onVisibleChanged:li,onPrepare:Gn,forceRender:x,autoDestroy:kt,getPopupContainer:Je,align:kr,arrow:_i,arrowPos:Mi,ready:dr,offsetX:xi,offsetY:ei,offsetR:Ar,offsetB:xn,onAlign:ti,stretch:xe,targetWidth:Wr/Xr,targetHeight:Vr/ai})))});return Te}var lt=Le(ye.Z)},46214:function(){"use strict"},39967:function(Jt,ot){"use strict";ot.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"}},90736:function(Jt,ot,_){"use strict";var d=_(59301),ge=_(4977),Ee=_(7939),ye=Object.defineProperty,W=Object.defineProperties,g=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,X=(A,I,q)=>I in A?ye(A,I,{enumerable:!0,configurable:!0,writable:!0,value:q}):A[I]=q,U=(A,I)=>{for(var q in I||(I={}))J.call(I,q)&&X(A,q,I[q]);if(ne)for(var q of ne(I))o.call(I,q)&&X(A,q,I[q]);return A},S=(A,I)=>W(A,g(I));const w=({img:A,buttonProps:I={},styles:q={},customText:re,ButtonText:G,ButtonClick:D,Buttonclass:H,ButtonTwo:$,imgStyles:z,loading:de=!1,className:we=""})=>d.createElement("section",{className:`tc animated fadeIn ${we}`,style:U({color:"#999",margin:"100px auto",visibility:de?"hidden":"visible"},q)},d.createElement("img",{src:A||ge,style:S(U({},z),{pointerEvents:"none",userSelect:"none"})}),d.createElement("p",{className:"mt20 font14"},re||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),G&&d.createElement(Ee.ZP,U({className:H,onClick:D},I),G),$&&$);ot.Z=w},86974:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return H}});var d=_(59301),ge={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},Ee=_(7939),ye=_(70557),W=_(34728),g=_(25399),ne=_(76406),J=_(84849),o=_(90736),X=_(14185),U=_(52078),S=_(59301),w=Object.defineProperty,A=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,re=($,z,de)=>z in $?w($,z,{enumerable:!0,configurable:!0,writable:!0,value:de}):$[z]=de,G=($,z)=>{for(var de in z||(z={}))I.call(z,de)&&re($,de,z[de]);if(A)for(var de of A(z))q.call(z,de)&&re($,de,z[de]);return $},D=($,z,de)=>new Promise((we,ce)=>{var Oe=Ve=>{try{Ne(de.next(Ve))}catch(K){ce(K)}},Fe=Ve=>{try{Ne(de.throw(Ve))}catch(K){ce(K)}},Ne=Ve=>Ve.done?we(Ve.value):Promise.resolve(Ve.value).then(Oe,Fe);Ne((de=de.apply($,z)).next())}),H=({editOffice:$="view",data:z,issaver:de,onSaver:we,theme:ce,type:Oe,filename:Fe,monacoEditor:Ne,className:Ve,style:K,close:B,onClose:L,hasMask:Y,disabledDownload:Q,onImgDimensions:P,showNodata:b,recordInfo:E})=>{const[N,ie]=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ie,Ze]=(0,d.useState)(""),[me,Ce]=(0,d.useState)(),Ke=window.ENV==="build"?"/react/build":"",Qe=location.host.startsWith("localhost")?X.Z.PROXY_SERVER:X.Z.API_SERVER,wt=10*(1024*1024),Ue=(0,d.useRef)();z!=null&&z.startsWith("/api")&&Oe!=="txt"&&(z=X.Z.API_SERVER+z);const bt=We=>We.substring(We.lastIndexOf("/")+1).split(".").pop();Fe&&Ne&&(Ne.filename=Fe),(0,d.useEffect)(()=>{var We,De;const Se=(De=(We=document.cookie)==null?void 0:We.replace(/\s/g,""))==null?void 0:De.split(";");Se==null||Se.map(k=>{let fe=k.split("=");fe[0]==="_educoder_session"&&Ze(fe[1])})},[]),(0,d.useEffect)(()=>{Oe==="office"&&(z.indexOf("bigfilescdn.")>-1||z.indexOf("bigfiles1")>-1?Ce({url:z,fileType:bt(z),model:z.indexOf("model=edit")?"edit":"view"}):z.indexOf("coze")>-1?Ce({url:z,fileType:"doc",model:"view"}):lt())},[Oe,z]);function Le(We){return D(this,null,function*(){We.data.type==="pdfdata"&&(we(We.data.data),window.removeEventListener("message",Le,!1)),console.log("mess---:",We.data)})}const lt=()=>D(void 0,null,function*(){console.log("data:",z);let We=z;z.startsWith("http")||(We=location.origin+We);let De=new URL(We).pathname.split("/").pop();const Se=yield(0,J.gJ)({attachment_id:De});Se.url=Qe+Se.url,Ce(Se)}),Re=()=>{if(z.startsWith("http")||z.startsWith("blob:")){Te();return}(0,ne.Sv)(Fe||"educoder",z,Fe)},Te=()=>{E&&(0,U.fc)({id:E==null?void 0:E.id,watch_type:1,course_id:E==null?void 0:E.course_id}),(0,ne.Nd)(Fe||"educoder",decodeURIComponent(z))};(0,d.useEffect)(()=>(window.addEventListener("message",pe),()=>{window.removeEventListener("message",pe)}),[]);const pe=We=>{var De;((De=We==null?void 0:We.data)==null?void 0:De.type)==="closePop"&&L()};return S.createElement("div",{style:G({},K||{}),className:`${Y&&ge.bgBlack} ${Oe?ge.wrp:"hide"}`},!!Oe&&B&&S.createElement("div",{id:"closePop",className:ge.close,ref:Ue},!!P&&S.createElement(g.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Ue.current},S.createElement("span",{onClick:()=>{L(),P()}},S.createElement("i",{className:"icon-yulanpizhu"}))),!Q&&window.parent===window&&S.createElement(g.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Ue.current},S.createElement("span",{onClick:Te},S.createElement("i",{className:"icon-quxiaozhiding"}))),de&&S.createElement(g.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Ue.current},S.createElement("span",{className:"",onClick:()=>{const We=document.getElementById("pdfiframe");window.addEventListener("message",Le,!1),setTimeout(()=>{We.contentWindow.postMessage("getData","*")},300)}},S.createElement("i",{className:"icon-baocun"}))),S.createElement(g.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Ue.current},S.createElement("span",{className:"",onClick:()=>{L()}},S.createElement("i",{className:"icon-guanbi1"})))),S.createElement("div",{className:`${ge[Ve]} ${Ve} ${ge.monaco} ${Oe==="txt"?"show":"hide"}`},Oe==="txt"&&S.createElement(S.Fragment,null,S.createElement(W.ZP,G({},Ne)))),Oe==="audio"&&S.createElement("audio",{controls:!0,src:`${(z==null?void 0:z.indexOf("http://"))>-1||(z==null?void 0:z.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${z}`,autoPlay:!0}),Oe==="video"&&S.createElement(S.Fragment,null,(z==null?void 0:z.indexOf("http"))>-1?S.createElement("video",{controls:!0,src:`${z}`,autoPlay:!0}):S.createElement("video",{controls:!0,src:`data:video/mp4;base64,${z}`,autoPlay:!0})),Oe==="office"&&me&&S.createElement("iframe",{src:`${Ke}/office.html?key=${me.key}&url=${btoa(me.url)}&callbackUrl=${Qe+(me.callbackUrl||"")}&fileType=${me.fileType}&title=${me.title||""}&model=${$}&officeServer=${X.Z.ONLYOFFICE}&disabledDownload=${!!Q}`}),Oe==="html"&&S.createElement("iframe",{src:z+"&disposition=inline"}),Oe==="pdf"&&S.createElement("iframe",{id:"pdfiframe",src:`${Ke}/js/pdf/index.html?filename=${Fe||"educoder.pdf"}&url=${encodeURIComponent(z)}&disabledDownload=${!!Q}&model=${$}`}),Oe==="image"&&S.createElement("img",{src:`${(z==null?void 0:z.indexOf("http://"))>-1||(z==null?void 0:z.indexOf("https://"))>-1?"":"data:image/png;base64,"}${z}`}),(Oe==="other"||Oe==="download")&&S.createElement(S.Fragment,null,b?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(Ee.ZP,{icon:S.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Re,disabled:Q},"\u4E0B\u8F7D")}):S.createElement(Ee.ZP,{type:"primary",size:"middle",onClick:Re,disabled:Q},S.createElement(ye.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Oe==="flowChart"&&S.createElement("div",{className:"embed"},S.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${z||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},35883:function(Jt,ot,_){"use strict";_.d(ot,{z:function(){return Ne},Z:function(){return Ve}});var d=_(59301),ge=_(46214),Ee=_(20047),ye=_(64018),W=_(16471),g=_(14185),ne=_(76406),J=_(15342),o=_(44104),X=_(7939),U=_(1012),S=_(86974),w=_(59301),I=({html:K})=>{const B=(0,d.useRef)(null),L=(0,d.useRef)(null),Y=`.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,d.useEffect)(()=>{const Q=B.current.attachShadow({mode:"open"});L.current=document.createElement("div"),L.current.className="markdown-body",L.current.innerHTML=K,Q.appendChild(L.current);const P=document.createElement("style");return P.textContent=Y,Q.appendChild(P),()=>{Q.innerHTML=""}},[]),(0,d.useEffect)(()=>{L.current&&(L.current.innerHTML=K)},[K]),w.createElement("div",{ref:B})};function q(K){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"],L=new RegExp(`\\b(${B.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),Y=/<meta\s+http-equiv\s*=\s*["']?refresh["']?[^>]*>/gi;return K.replace(L,"").replace(Y,"").trim()}var re={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},G=Object.defineProperty,D=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,z=(K,B,L)=>B in K?G(K,B,{enumerable:!0,configurable:!0,writable:!0,value:L}):K[B]=L,de=(K,B)=>{for(var L in B||(B={}))H.call(B,L)&&z(K,L,B[L]);if(D)for(var L of D(B))$.call(B,L)&&z(K,L,B[L]);return K};const we="@\u2581\u2581@",ce="@\u2581@",Oe=/<pre[^>]*>/g;function Fe(K){let B=document.createElement("div");return B.innerHTML=K,B.childNodes.length===0?"":B.childNodes[0].nodeValue}const Ne=(K,B)=>{K=K||"";const L=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Y=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Q=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,P=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return B?K.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(L,(b,E,N,ie,Ie,Ze,me)=>{const Ce=E||ie||Ze,Ke=N||Ie||me||"?";return g.Z.API_SERVER+"/api/attachments/"+Ce+Ke+"&t="+(0,ne.Jn)(Ce,Date.now())+(b.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(K=K.replace(P,(b,E,N,ie,Ie,Ze,me)=>{const Ce=E||ie||Ze,Ke=N||Ie||me||"?";return g.Z.API_SERVER+"/attachments/download/"+Ce+Ke+"&t="+(0,ne.Jn)(Ce,Date.now())+(b.indexOf(")")>-1?")":"&")}).replace(L,(b,E,N,ie,Ie,Ze,me)=>{const Ce=E||ie||Ze,Ke=N||Ie||me||"?";return g.Z.API_SERVER+"/api/attachments/"+Ce+Ke+"&t="+(0,ne.Jn)(Ce,Date.now())+(b.indexOf(")")>-1?")":"&")}).replace(Y,(b,E,N,ie,Ie)=>{const Ze=E||ie,me=N||Ie||"";return'"'+g.Z.API_SERVER+"/api/attachments/"+Ze+me+Ze+me+"&t="+(0,ne.Jn)(Ze,Date.now())}).replace(Q,(b,E,N,ie,Ie)=>{const Ze=E||ie,me=N||Ie||"";return"("+g.Z.API_SERVER+"/files/uploads/"+Ze+me+Ze+me+"&t="+(0,ne.Jn)(Ze,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,`
|
|
`),K)};var Ve=({value:K="",edit:B=!1,className:L,showTextOnly:Y,showLines:Q,style:P={},stylesPrev:b={},highlightKeywords:E,showProgramFill:N,isProgramFill:ie,disabledFill:Ie=!1,programFillValue:Ze,openEditor:me=()=>{},onFillChange:Ce=Ge=>{},onFillBlur:Ke=()=>{},onFillFocus:Qe=()=>{}})=>{let Ge=q(String(K||""));const wt=(0,d.useRef)(),Ue=(0,d.useRef)(),[bt,Le]=(0,d.useState)(""),[lt,Re]=(0,d.useState)("office"),[Te,pe]=(0,d.useState)([]),We=(0,d.useRef)("a"+(0,U.Z)()),De={},Se=nt=>/<style[\s\S]*?>/i.test(nt||""),k=(nt,vt,pt)=>{const be=document.createElement(nt===ce?"input":"textarea");be.style.width="100%",be.style.height=nt===ce?"40px":"151px",be.rows=5,be.spellcheck=!1,be.name="edu-program-fill",be.placeholder="\u8BF7\u8F93\u5165",be.dataset.id=vt;const Je=Object.keys(De).length;return De[Je]=be,`<span class="edu-program-fill-wrap ${nt===ce?"":"show"}" style="width:${nt===ce?"600px":"100%"}" title=${pt||""}><span>${be.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function fe(nt){return nt=nt.replace(/!\[.*?\]\(.*?\)/g,""),nt=nt.replace(/\[.*?\]\(.*?\)/g,""),nt=nt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),nt=nt.replace(/<embed.*?>/g,""),nt=nt.replace(/<img.*?>/g,""),nt=nt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),nt=nt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),nt=nt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),nt=nt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),nt}const ve=nt=>!Y&&Se(Ge)?nt:nt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(vt,pt){let be=pt.replace(/(\n|\r)/g,"").split("}"),Je=[];return be.map(x=>{x!=""&&Je.push(`.${We.current} ${x}`)}),`<style>${Je.join("}")}</style>`}),Be=(0,d.useMemo)(()=>{(0,Ee.Iy)();try{const be=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Je=/\"\/api\/attachments\/|\"\/attachments\/download\//g,x=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,T=/\(\/attachments\/download\//g;Ge=Ge.replace(T,"("+g.Z.API_SERVER+"/attachments/download/").replace(be,"("+g.Z.API_SERVER+"/api/attachments/").replace(Je,'"'+g.Z.API_SERVER+"/api/attachments/").replace(x,'"'+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,`
|
|
`),wt.current.style.display="none"}catch(be){}if(N){let be=-1;return Ge=Ge.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Je,x,T){var $e;return++be,k(Je,be,($e=Ze==null?void 0:Ze[be])==null?void 0:$e.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${ve(Ge||"")}</pre>`}let nt=ve(Ge);nt=(0,Ee.ZP)(nt);const vt=(0,Ee.ez)();Ge.match(/\[TOC\]/)&&(nt=nt.replace("<p>[TOC]</p>",(0,Ee.Qv)()),(0,Ee.Iy)()),nt=nt.replace(/(__special_katext_id_\d+__)/g,(be,Je)=>{const{type:x,expression:T}=vt[Je];return(0,J.renderToString)(Fe(T)||"",{displayMode:x==="block",throwOnError:!1,output:"html"})}),nt=nt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ee.AL)();const pt=document.createElement("div");if(pt.innerHTML=nt,Y)return pt.innerText;if(E){const be=E.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return mt(pt,be),pt.innerHTML}return setTimeout(()=>Lt(),500),pt.innerHTML},[Ge,E]);(0,d.useEffect)(()=>{dt.current&&dt.current.querySelectorAll(["input","textarea"]).forEach(vt=>{vt.oninput=qe,vt.onblur=at,vt.onfocus=ct})},[Te]),(0,d.useEffect)(()=>{var nt,vt,pt,be,Je;if(Ze!=null&&Ze.length)try{const x=dt.current.querySelectorAll(".edu-program-fill-score"),T=dt.current.querySelectorAll('[name="edu-program-fill"]');for(const[$e,j]of T.entries())j.value=((nt=Ze==null?void 0:Ze[$e])==null?void 0:nt.value)||"",((vt=Ze==null?void 0:Ze[$e])==null?void 0:vt.type)==="warning"?j.className="program-fill-warning":((pt=Ze==null?void 0:Ze[$e])==null?void 0:pt.type)==="success"?j.className="program-fill-success":j.className="";for(const[$e,j]of x.entries())j.innerHTML=(be=Ze==null?void 0:Ze[$e])!=null&&be.score?`${(Je=Ze==null?void 0:Ze[$e])==null?void 0:Je.score}\u5206`:"";pe(Ze)}catch(x){console.log(x,"error")}},[Ze]);const qe=nt=>{Te[nt.target.dataset.id]=Te[nt.target.dataset.id]||{},Te[nt.target.dataset.id].value=nt.target.value,pe([...Te]),Ce(Te,nt.target.dataset.id)},at=nt=>{Te[nt.target.dataset.id]=Te[nt.target.dataset.id]||{},Te[nt.target.dataset.id].value=nt.target.value,pe([...Te]),Ke(Te,nt.target.dataset.id)},ct=nt=>{Te[nt.target.dataset.id]=Te[nt.target.dataset.id]||{},Te[nt.target.dataset.id].value=nt.target.value,pe([...Te]),Qe(Te,nt.target.dataset.id)};function mt(nt,vt){return nt.childNodes.forEach(pt=>{var be;if(pt.childNodes.length>0)mt(pt,vt);else if(pt.nodeName!=="IMG")if(pt.innerHTML)pt.innerHTML=(be=pt.innerHTML)==null?void 0:be.replace(new RegExp(vt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Je=document.createElement("span");Je.innerHTML=pt.textContent.replace(new RegExp(vt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),pt.replaceWith(Je)}})}const dt=(0,d.useRef)();Ee.jb.WebkitLineClamp=Q,Q&&(P=de(de({},P),Ee.jb));function gt(nt){let vt=nt.target;if(vt.tagName.toUpperCase()==="A"){let pt=vt.getAttribute("href");if(pt.indexOf("office")>-1)nt.preventDefault(),Le(pt),Re("office");else if(pt.indexOf("application/pdf")>-1)nt.preventDefault(),Le(pt),Re("pdf");else if(pt.indexOf("text/html")>-1)nt.preventDefault(),Le(pt),Re("html");else if(pt.startsWith("#")){nt.preventDefault();let be=document.getElementById(pt.replace("#",""));be&&be.scrollIntoView(!0)}}}const Lt=()=>{var nt;const vt=(nt=dt.current)==null?void 0:nt.querySelectorAll("video");vt==null||vt.forEach(pt=>{if(pt.oncontextmenu=()=>!1,pt.src.indexOf(".m3u8")>-1&&!pt.canPlayType("application/vnd.apple.mpegurl")){if(W.ZP.isSupported()){var be=new W.ZP;be.loadSource(pt.src),be.attachMedia(pt)}}})};(0,d.useEffect)(()=>{if(dt.current&&Be&&Be.match(Oe)&&window.PR.prettyPrint(),dt.current)return dt.current.addEventListener("click",gt),()=>{var nt;(nt=dt.current)==null||nt.removeEventListener("click",gt),(0,Ee.AL)(),(0,Ee.Iy)()}},[Be,dt.current,gt]);const St=nt=>{nt.target.nodeName==="IMG"&&nt.target.className.indexOf("draw-flowchart")>-1?(wt.current.style.zIndex=1,wt.current.style.display="flex",wt.current.style.width=nt.target.clientWidth+"px",wt.current.style.height=nt.target.clientHeight+"px",wt.current.style.top=nt.target.offsetTop+"px",wt.current.style.left=nt.target.offsetLeft+"px",nt.target.id&&(Ue.current=nt.target.id)):wt.current.style.display="none"},Ct=()=>{wt.current.style.display="none"};return(0,d.useEffect)(()=>{var nt;const vt=pt=>{pt.preventDefault(),pt.clipboardData.setData("text",window.getSelection().toString())};return(nt=dt.current)==null||nt.addEventListener("copy",vt),()=>{var pt;(pt=dt.current)==null||pt.removeEventListener("copy",vt)}},[dt.current]),d.createElement("div",{style:{position:"relative"},onMouseLeave:Ct},Y&&d.createElement("div",{ref:dt,className:`${re.mdBody} `},Be),!Y&&!Se(Be)&&d.createElement("div",{ref:dt,style:de({},P),onMouseOver:St,className:`${L||""} ${Ie?"disabled-fill":""} markdown-body ${re.mdBody} ${We.current}`,dangerouslySetInnerHTML:{__html:Be}}),!Y&&Se(Be)&&d.createElement(I,{html:Be}),d.createElement("div",{ref:wt,className:`${re.button} ${B?"":re.previewFlowChart}`},d.createElement(o.Z,null,d.createElement(X.ZP,{onClick:()=>{B?me(Ue.current):(Le(Ue.current),Re("flowChart"))}},B?"\u7F16\u8F91":"\u9884\u89C8"))),d.createElement(S.Z,{close:!0,data:bt,type:bt!=null&&bt.length?lt:"",style:de({},b),onClose:()=>Le("")}))}},34728:function(Jt,ot,_){"use strict";_.d(ot,{SV:function(){return wt},ZP:function(){return Ge}});var d=_(59301),ge=_(76374);const Ee={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"]},ye={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"]},W={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(`
|
|
`)}]},ne={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 J=_(53184),o=_.n(J),X=(Ue,bt,Le)=>new Promise((lt,Re)=>{var Te=De=>{try{We(Le.next(De))}catch(Se){Re(Se)}},pe=De=>{try{We(Le.throw(De))}catch(Se){Re(Se)}},We=De=>De.done?lt(De.value):Promise.resolve(De.value).then(Te,pe);We((Le=Le.apply(Ue,bt)).next())});const U={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=(Ue,bt,Le,lt)=>{const Re=bt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Le.lineNumber,endColumn:Le.column});return Array.from(new Set(Re.match(/\b\w{2,}\b/g)||[])).map(pe=>({label:pe,kind:Ue.languages.CompletionItemKind.Text,insertText:pe,range:lt}))},w=(Ue,bt,Le,lt)=>{Ue.languages.registerCompletionItemProvider(bt,{provideCompletionItems(Re,Te){const pe=Re.getWordUntilPosition(Te),We={startLineNumber:Te.lineNumber,endLineNumber:Te.lineNumber,startColumn:pe.startColumn,endColumn:pe.endColumn},De=Re.getLineContent(Te.lineNumber).substring(pe.startColumn-2,pe.endColumn);return{suggestions:[...S(Ue,Re,Te,We),...Le.map(k=>({label:k,kind:Ue.languages.CompletionItemKind.Keyword,documentation:k,insertText:k,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We})),...lt.map(k=>({label:k.label,kind:Ue.languages.CompletionItemKind.Snippet,documentation:k.content,insertText:De.startsWith("#")?k.content.replace(/#/,""):k.content,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We}))]}}})};var A=Ue=>{U.languages.forEach(bt=>{Ue.languages.registerDocumentFormattingEditProvider(bt,{provideDocumentFormattingEdits(Le){return X(this,null,function*(){const lt=o()(Le.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:Le.getFullModelRange(),text:lt}]})}})}),w(Ue,"java",ye.keywords,ye.quickKey),w(Ue,"cpp",W.keywords,W.quickKey),w(Ue,"c",Ee.keywords,[]),w(Ue,"python",g.keywords,g.quickKey),w(Ue,"scala",ne.keywords,ne.quickKey)};const I="\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,re=(Ue,bt,Le)=>bt in Ue?q(Ue,bt,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ue[bt]=Le,G=(Ue,bt,Le)=>re(Ue,typeof bt!="symbol"?bt+"":bt,Le);const D=class xu{constructor(bt,Le,lt){this.placeholder=bt,this.editor=Le,this.monaco=lt,Le.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)}};G(D,"ID","editor.widget.placeholderHint");var $=D,z=_(96236),de=_(6767),we=_(25399),ce=_(78267),Oe=_(33156),Fe=_(56102),Ne=Object.defineProperty,Ve=Object.defineProperties,K=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,Q=(Ue,bt,Le)=>bt in Ue?Ne(Ue,bt,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ue[bt]=Le,P=(Ue,bt)=>{for(var Le in bt||(bt={}))L.call(bt,Le)&&Q(Ue,Le,bt[Le]);if(B)for(var Le of B(bt))Y.call(bt,Le)&&Q(Ue,Le,bt[Le]);return Ue},b=(Ue,bt)=>Ve(Ue,K(bt)),E=(Ue,bt)=>{var Le={};for(var lt in Ue)L.call(Ue,lt)&&bt.indexOf(lt)<0&&(Le[lt]=Ue[lt]);if(Ue!=null&&B)for(var lt of B(Ue))bt.indexOf(lt)<0&&Y.call(Ue,lt)&&(Le[lt]=Ue[lt]);return Le},N=(Ue,bt,Le)=>new Promise((lt,Re)=>{var Te=De=>{try{We(Le.next(De))}catch(Se){Re(Se)}},pe=De=>{try{We(Le.throw(De))}catch(Se){Re(Se)}},We=De=>De.done?lt(De.value):Promise.resolve(De.value).then(Te,pe);We((Le=Le.apply(Ue,bt)).next())});function ie(Ue){return/^\d+$/.test(Ue)?`${Ue}px`:Ue}function Ie(){}let Ze=!1;const me={"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 Ce(Ue=[]){let bt=Ue;if(Array.isArray(Ue)){for(let Le=0;Le<Ue.length;Le++){let lt=me[Ue[Le]];if(lt)return lt}return bt[0]}return me[bt]||bt}let Ke=null;const Qe=()=>N(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Ue){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Ue)}});var Ge=Ue=>{var bt=Ue,{width:Le="100%",height:lt="100%",value:Re,language:Te="javascript",style:pe={},options:We={},overrideServices:De={},theme:Se="vs-dark",onEditBlur:k,isCopy:fe=!1,onSave:ve,autoHeight:Be=!1,forbidCopy:qe=!1,forbidCopyTips:at,onChange:ct=Ie,editorDidMount:mt=Ie,onFocus:dt=Ie,onBreakPoint:gt=Ie,breakPointValue:Lt=[],filename:St="educoder.txt",errorLine:Ct,errorContent:nt="",highlightLine:vt,openBreakPoint:pt=!1,placeholder:be="",showMiniMap:Je=!0}=bt,x=E(bt,["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 T=(0,d.useRef)(),$e=(0,d.useRef)({}),j=(0,d.useRef)(),ae=(0,d.useRef)(),xt=(0,d.useRef)([]),Ae=(0,d.useRef)(!1),Me=(0,d.useRef)(),Xe=(0,d.useRef)(),ee=(0,d.useRef)(!1),[oe,xe]=(0,d.useState)(!1);function ze(){let kt;return T.current&&(kt=new ge.Z(te=>{for(let he of te)(he.target.offsetHeight>0||he.target.offsetWidth>0)&&$e.current.instance.layout()}),kt.observe(T.current)),kt}function F(){de.ZP.warning({content:decodeURIComponent(at||I),key:"monaco-editor-tip"})}const tt=()=>{let kt=$e.current.instance;if(Re!=null&&kt&&oe){const te=kt.getModel();te&&Re!==te.getValue()&&(Ze=!0,te.setValue(Re),kt.layout(),Ze=!1)}};(0,d.useEffect)(()=>{const kt=Oe.Z.subscribe("formatDocument",te=>{var he;let st=$e.current.instance;(he=st==null?void 0:st.getAction)==null||he.call(st,"editor.action.formatDocument").run()});return window.updateMonacoValue=te=>{ct(te)},kt},[]),(0,d.useEffect)(()=>{var kt;let te=$e.current.instance;ae.current&&clearTimeout(ae.current),ae.current=setTimeout(()=>{tt()},500),Re&&(Re!=null&&Re.length)&&((kt=te==null?void 0:te.updateOptions)==null||kt.call(te,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Re.split(/\r\n|\r|\n/g).length))+3,5)}))},[Re,oe,$e.current]),(0,d.useEffect)(()=>{if(Ct&&$e.current&&$e.current.instance){let te=$e.current.instance;te.changeViewZones(function(he){var st=document.createElement("div");st.style.padding="10px 20px",st.style.width="calc(100% - 20px)",st.className="my-error-line-wrp",st.innerHTML=nt,he.addZone({afterLineNumber:Ct||11,heightInLines:3,domNode:st})});var kt={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}};te.addOverlayWidget(kt),te.revealPositionInCenter({lineNumber:20,column:1})}},[Ct,$e.current,oe]);const se=(kt="",te)=>{if(!kt||kt.trim()==="")return!0;const st=$e.current.instance.getModel().getLineTokens(te);let Rt=!1;for(let Ft=0;Ft<2;Ft++)st.getStandardTokenType(Ft)===1&&(Rt=!0);return Rt};(0,d.useEffect)(()=>{var kt;const te=(kt=$e.current)==null?void 0:kt.instance;if(te&&oe&&qe){const he=te.onDidBlurEditorWidget(()=>{ee.current=!1}),st=te.onDidFocusEditorText(()=>{ee.current=!0});return()=>{he.dispose(),st.dispose()}}},[$e.current,oe,qe]),(0,d.useEffect)(()=>{var kt;if((kt=$e.current)!=null&&kt.instance&&oe&&pt){let te=$e.current.instance,he=te.getModel();if(!he)return;(()=>{var bn;let On=[],Sn=[];const Qn=he.getAllDecorations();for(let ht of Qn)ht.options.className==="highlighted-line"&&(On.push((bn=ht==null?void 0:ht.range)==null?void 0:bn.startLineNumber),Sn.push(ht==null?void 0:ht.id));if(vt===On[0])return;he.deltaDecorations(Sn,[]);const rt=he.getLineCount();vt&&vt<=rt&&(te.deltaDecorations([],[{range:new Ke.Range(vt,1,vt,he.getLineMaxColumn(vt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),te.revealLineInCenter(vt))})();const Rt=(bn=!1)=>{var On;let Sn=[],Qn=[];const rt=he.getAllDecorations();for(let ht of rt)ht.options.linesDecorationsClassName==="breakpoints-select"&&(Sn.push((On=ht==null?void 0:ht.range)==null?void 0:On.startLineNumber),Qn.push(ht==null?void 0:ht.id));if(bn)return{lines:Sn,ids:Qn};gt(Sn)},Ft=bn=>N(void 0,null,function*(){let On={range:new Ke.Range(bn,1,bn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield he.deltaDecorations([],[On]),Rt()}),Gt=bn=>N(void 0,null,function*(){let On=[];const Sn=te.getLineDecorations(bn);for(let Qn of Sn)Qn.options.linesDecorationsClassName==="breakpoints-select"&&On.push(Qn.id);yield he.deltaDecorations(On,[]),Rt()}),qt=bn=>{let On=te.getLineDecorations(bn);for(let Sn of On)if(Sn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,ce.isEqual)(Lt,Rt(!0).lines)){he.deltaDecorations(Rt(!0).ids,[]);const bn=Lt.map(On=>({range:new Ke.Range(On,1,On,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));he.deltaDecorations([],bn)}const Wt=te.onDidChangeModelContent(bn=>{let On=te.getPosition();if(On){let Sn=On.lineNumber;clearTimeout(Xe.current),Xe.current=setTimeout(()=>{se(he.getLineContent(Sn),Sn)?Gt(Sn):qt(Sn)?(Gt(Sn),Ft(Sn)):Rt()},100)}}),Qt=te.onMouseDown(bn=>{var On,Sn,Qn;if(bn.target.detail&&((Qn=(Sn=(On=bn.target)==null?void 0:On.element)==null?void 0:Sn.className)!=null&&Qn.includes("line-numbers"))){let rt=bn.target.position.lineNumber;if(se(he.getLineContent(rt),rt))return;qt(rt)?Gt(rt):Ft(rt)}}),un=bn=>{let On={range:new Ke.Range(bn,1,bn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};xt.current=te.deltaDecorations(xt.current,[On])},gn=()=>{xt.current=te.deltaDecorations(xt.current,[])},Fn=te.onMouseMove(bn=>{var On,Sn,Qn;if(gn(),bn.target.detail&&((Qn=(Sn=(On=bn.target)==null?void 0:On.element)==null?void 0:Sn.className)!=null&&Qn.includes("line-numbers"))){let rt=bn.target.position.lineNumber;if(se(he.getLineContent(rt),rt))return;un(rt)}}),Pn=te.onMouseLeave(()=>{gn()});return()=>{Wt.dispose(),Qt.dispose(),Fn.dispose(),Pn.dispose()}}},[$e.current,oe,Lt,vt,pt,Te]),(0,d.useEffect)(()=>{var kt;(kt=$e.current)!=null&&kt.instance&&pt&&$e.current.instance.setPosition({lineNumber:0,column:0})},[vt]);function it(){let kt=$e.current.instance;if(kt){const te=kt.getSelection(),he=$e.current.pastePos||{},st=new Ke.Range(he.startLineNumber||te.endLineNumber,he.startColumn||te.endColumn,he.endLineNumber||te.endLineNumber,he.endColumn||te.endColumn);setTimeout(()=>{kt.executeEdits("",[{range:st,text:""}])},300)}}function Ot(kt){(window.navigator.platform.match("Mac")?kt.metaKey:kt.ctrlKey)&&kt.keyCode==83&&(kt.preventDefault(),ve())}const Ut=()=>{if(Be&&$e.current.instance){const kt=$e.current.instance.getContentHeight();An(kt<lt?lt:kt)}else An(lt)};function Ht(kt){var te=document.createEvent("MouseEvents");te.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),kt.dispatchEvent(te)}const Xt=kt=>{if(!ee.current)return;const{keyCode:te,ctrlKey:he,metaKey:st,target:Rt,type:Ft}=kt;return(Ft==="paste"||(te===67||te===86)&&(st||he))&&Rt.nodeName==="TEXTAREA"&&(F(),kt.preventDefault()),!1};function Vt(kt,te){var he=window.URL||window.webkitURL||window,st=new Blob([te]),Rt=document.createElementNS("http://www.w3.org/1999/xhtml","a");Rt.href=he.createObjectURL(st),Rt.download=kt,Ht(Rt)}(0,d.useEffect)(()=>{Ut()},[Ut]),(0,d.useEffect)(()=>{T.current&&!oe&&Promise.all([_.e(8909),_.e(5977)]).then(_.bind(_,71448)).then(kt=>{try{Ke=kt,$e.current.instance=Ke.editor.create(T.current,{value:Re,language:Ce(Te),theme:Se,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Je||!1}},De);const te=$e.current.instance;let Rt=[...z.BH._menuItems].find(Wt=>Wt[0]._debugName=="EditorContext")[1],Ft=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Gt=(Wt,Qt)=>{var un,gn;let Fn=Wt._first;do Qt.includes((gn=(un=Fn.element)==null?void 0:un.command)==null?void 0:gn.id)&&Wt._remove(Fn);while(Fn=Fn.next)};if(mt(te,Ke),setTimeout(()=>{Ut(),$e.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Vt(St||"educoder.txt",te.getValue())}})},500),$e.current.subscription=te.onDidChangeModelContent(Wt=>{Ae.current?clearTimeout(Me.current):(Ut(),ct(te.getValue(),Wt)),Me.current=setTimeout(()=>{Ae.current=!1},500)}),window.Monaco||A(Ke,Ce(Te)),qe&&(Gt(Rt,Ft),T.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Xt),window.removeEventListener("paste",Xt),window.addEventListener("keydown",Xt),window.addEventListener("paste",Xt)),window.Monaco=Ke,k&&te.onDidBlurEditorWidget(()=>{k(te.getValue())}),dt&&te.onDidFocusEditorText(()=>{qe&&Qe(),dt(te.getValue())}),qe){Qe();try{te.onDidPaste(Wt=>{const Qt=te.getSelection(),un=$e.current.pastePos||{},gn=new Ke.Range(un.startLineNumber||Qt.endLineNumber,un.startColumn||Qt.endColumn,un.endLineNumber||Qt.endLineNumber,un.endColumn||Qt.endColumn);te.executeEdits("",[{range:Wt.range,text:""}])})}catch(Wt){}}let qt=ze();return be&&typeof be=="string"&&new $(be,te,Ke),xe(!0),()=>{const Wt=$e.current.instance;Wt.dispose();const Qt=Wt.getModel();Qt&&Qt.dispose(),$e.current.subscription&&$e.current.subscription.dispose(),qt.unobserve(T.current)}}catch(te){}})},[]),(0,d.useEffect)(()=>{if($e.current.instance&&oe)return document.addEventListener("keydown",Ot,!1),()=>{document.removeEventListener("keydown",Ot)}},[ve,oe]),(0,d.useEffect)(()=>{let kt=$e.current.instance;if(kt&&oe){let te=Ce(Te);Ke.editor.setModelLanguage(kt.getModel(),te)}},[Te,oe]),(0,d.useEffect)(()=>{$e.current.instance&&oe&&Ke.editor.setTheme(Se)},[Se,oe]),(0,d.useEffect)(()=>{let kt=$e.current.instance;j.current=We,kt&&oe&&(kt.updateOptions(P({},We)),setTimeout(()=>{kt.getModel().updateOptions(P({},We))},200))},[JSON.stringify(We),oe]),(0,d.useEffect)(()=>{let kt=$e.current.instance;kt&&oe&&kt.layout()},[Le,lt,oe]);const[hn,Dn]=(0,d.useState)(ie(Le)),[sn,An]=(0,d.useState)(ie(lt)),Kt=b(P({},pe),{width:hn,height:sn,position:"relative"});return d.createElement("div",{className:"my-monaco-editor",ref:T,style:Kt,onFocus:()=>{qe&&Qe()}},fe&&d.createElement(Fe.CopyToClipboard,{text:Re,onCopy:()=>de.ZP.success("\u590D\u5236\u6210\u529F")},d.createElement(we.Z,{title:"\u590D\u5236\u4EE3\u7801"},d.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},d.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function wt({width:Ue="100%",height:bt="100%",original:Le,modified:lt,language:Re,options:Te={}}){const pe=(0,d.useRef)(),[We,De]=(0,d.useState)(null);function Se(Be){let qe;return pe.current&&(qe=new ge.Z(at=>{for(let ct of at)(ct.target.offsetHeight>0||ct.target.offsetWidth>0)&&Be.layout()}),qe.observe(pe.current)),qe}(0,d.useEffect)(()=>(pe.current&&Promise.all([_.e(8909),_.e(9404)]).then(_.bind(_,2550)).then(Be=>{Ke=Be;const qe=Ke.editor.createDiffEditor(pe.current,b(P({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},Te),{wordWrap:!0}));De(qe);let at=Se(qe);return()=>{qe.dispose();const ct=qe.getModel();ct&&ct.dispose(),at.unobserve(pe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,d.useEffect)(()=>{We&&We.setModel({original:Ke.editor.createModel(Le,Re),modified:Ke.editor.createModel(lt,Re)})},[Le,lt,Re,We]);const k=ie(Ue),fe=ie(bt),ve={width:k,height:fe};return d.createElement("div",{className:"my-diff-editor",ref:pe,style:ve})}},54077:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return U}});var d={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"},ge=_(29787),Ee=_(25399),ye=_(89787),W=_(92310),g=_.n(W),ne=_(76406),J=_(90736),o=_(59301),U=({className:S,dataSource:w=[],col:A=4,right:I,bottom:q=23,precision:re=0,wrapWidth:G=1200,trackEventItems:D,loading:H,onRemove:$=()=>{},isCurrent:z=!0,showProgress:de=!1,showAlias:we=!1,category:ce="notDisplay",hiddenClick:Oe=()=>{}})=>{const Fe=Math.floor((G-(A-1)*I)/A),Ne=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png",ptclass:"sprite-70",swclass:"sprite-68"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png",ptclass:"sprite-60",swclass:"sprite-65"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png",ptclass:"sprite-58",swclass:"sprite-63"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png",ptclass:"sprite-62",swclass:"sprite-67"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png",ptclass:"sprite-61",swclass:"sprite-66"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png",ptclass:"sprite-59",swclass:"sprite-64"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png",ptclass:"sprite-71",swclass:"sprite-69"}];return o.createElement(ge.Z,{spinning:H},o.createElement("div",{className:g()(d.list,S)},!!(w!=null&&w.length)&&(w==null?void 0:w.map((Ve,K)=>{var B,L,Y,Q,P,b,E;const{name:N,id:ie,identifier:Ie,featured:Ze,school_name:me,image_url:Ce,excellent:Ke,is_plan:Qe}=Ve;return o.createElement("div",{key:ie,className:z&&de?d.wrapisCurrent:d.wrap,style:{width:Fe,marginRight:(1+K)%A===0?0:I+re,marginBottom:q}},o.createElement("a",{className:d.li,onClick:Ge=>{Ge.preventDefault(),Ge.stopPropagation(),D&&(0,ne.L9)([D]),(0,ne.xg)(`/paths/${Ie}`)}},o.createElement("div",{className:d.img},o.createElement("img",{className:d.cover,src:`${Ce}`}),(B=Ve==null?void 0:Ve.subject_tags)==null?void 0:B.map((Ge,wt)=>{var Ue,bt;if(wt===0){const lt=(Ue=Ne.find(Re=>Re.name==Ge))==null?void 0:Ue.swclass;return o.createElement("span",{className:`sprite ${lt} ${d.sign}`,style:{left:"-4px"}})}const Le=(bt=Ne.find(lt=>lt.name==Ge))==null?void 0:bt.ptclass;return o.createElement("span",{className:`sprite ${Le} ${d.sign}`,style:{left:`${48+52*(wt-1)+2*wt}px`}})}),o.createElement("div",{className:d.tagsDom},o.createElement("div",{className:"flex flex-wrap item-center",style:{gap:"0 6px"}},(Ve==null?void 0:Ve.excellent)&&o.createElement("div",{className:d.bq},"\u5F00\u653E\u8BFE\u7A0B"),((L=Ve==null?void 0:Ve.custom_tags)==null?void 0:L.length)>0&&(Ve==null?void 0:Ve.custom_tags.map((Ge,wt)=>{var Ue;return o.createElement(Ee.Z,{title:Ge==null?void 0:Ge.tag_name,key:wt},o.createElement("div",{className:"font12 rounded-2px c-white flex item-center",style:{height:22,padding:"0 6px",maxWidth:((Ue=Ve==null?void 0:Ve.custom_tags)==null?void 0:Ue.length)>2?"60px":"71px",background:"rgba(48, 97, 208, .6)",border:"1px solid #8FAFF8"}},o.createElement("span",{className:"multi-llipsis1e"},Ge==null?void 0:Ge.tag_name)))})))),ce=="hide"&&(Ve==null?void 0:Ve.studying)&&z&&o.createElement("div",{className:`${d.movebq} user-path-items`,onClick:Ge=>{Ge.stopPropagation(),$(Ve)}},o.createElement("i",{className:"iconfont icon-yichu1 font12"}),o.createElement("span",null,"\u79FB\u9664")),!["notDisplay","collect","payed"].includes(ce)&&z&&o.createElement("div",{className:`${d.hiddenbq} user-path-items`,onClick:Ge=>{Ge.stopPropagation(),Oe(Ve)}},o.createElement("i",{className:`iconfont ${ce=="hide"?"icon-chakan2":"icon-yincangtiaojianshezhi"} font12`}),o.createElement("span",null,ce=="hide"?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF"))),o.createElement("div",{className:d.name},o.createElement(Ee.Z,{title:we&&(Ve!=null&&Ve.excellent_alias_name)?o.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${N}`,o.createElement("br",null),o.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Ve==null?void 0:Ve.excellent_alias_name}`)):N},o.createElement("span",{className:d.e},we&&(Ve==null?void 0:Ve.excellent_alias_name)||N))),z&&de&&((Y=Ve==null?void 0:Ve.progress)==null?void 0:Y.all_score)!=0&&o.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},o.createElement(ye.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((Q=Ve==null?void 0:Ve.progress)==null?void 0:Q.my_score)/((P=Ve==null?void 0:Ve.progress)==null?void 0:P.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(b=Ve==null?void 0:Ve.progress)==null?void 0:b.my_score,"/",(E=Ve==null?void 0:Ve.progress)==null?void 0:E.all_score),(!z||!de)&&o.createElement(Ee.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${me}`},o.createElement("div",{className:d.unit},o.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),me)),(!z||!de)&&o.createElement("div",{className:d.tags},o.createElement("div",null,o.createElement(Ee.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},o.createElement("span",null,o.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),o.createElement("span",null,Ve.stages_count))),o.createElement(Ee.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,Ve.members_count)))))))})),!w.length&&o.createElement(J.Z,null)))}},70467:function(Jt,ot,_){"use strict";_.d(ot,{jL:function(){return ye},w9:function(){return N},QD:function(){return Lt},cQ:function(){return K.Z},op:function(){return qe},O5:function(){return ze},_b:function(){return be},t7:function(){return re},Gi:function(){return Ke},YG:function(){return me},qp:function(){return X},vr:function(){return nt},qE:function(){return mt},Je:function(){return H},wb:function(){return Ve},cq:function(){return Le},tp:function(){return w}});var d=_(59301),ge={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"},ye=({dataSource:F=[],img:tt,imgWidth:se=346,title:it,sunTitle:Ot,bannerExtraContent:Ut})=>d.createElement("div",{className:ge.banner},d.createElement("div",{className:ge.content},d.createElement("aside",null,d.createElement("p",null,d.createElement("b",null,it),d.createElement("span",null,Ot)),F.length>0&&d.createElement("div",{className:ge.btns},F.map((Ht,Xt)=>d.createElement("div",{key:Xt,onClick:Ht.click},Ht.name,Ht.sign?d.createElement("span",{className:"sprite sprite-33"}):null))),Ut),tt&&d.createElement("img",{style:{marginTop:33,marginRight:38},src:tt,width:se}))),W={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"},g=_(92310),ne=_.n(g),J=_(78267),X=({dataSource:F=[],value:tt,onChange:se,onTitleChange:it,className:Ot,title:Ut,titleWidth:Ht=41,style:Xt={},fontColor:Vt="#6A7283",showCount:hn})=>{const[Dn,sn]=(0,d.useState)(1),[An,Kt]=(0,d.useState)(!1),kt=(0,d.useRef)(null),te=(0,d.useRef)(null);return(0,d.useEffect)(()=>{var he;F.length!==0&&(((he=kt==null?void 0:kt.current)==null?void 0:he.clientHeight)>97?sn(1):sn(0)),F.length===0&&sn(0),Kt(!1)},[F]),d.createElement("div",{className:ne()(W.row,Ot,"fadeIn","animated"),style:Xt},d.createElement("div",{onClick:(0,J.throttle)(()=>it==null?void 0:it(),2e3),style:{width:Ht,marginTop:An?12:4},className:`${W.title} ${it?"current":""}`},Ut),d.createElement("div",{className:An?`${W.tagsWrap} ${W.tagsBorderWrap}`:W.tagsWrap},d.createElement("div",{className:W.bar,ref:te,style:Dn>0?{height:Dn===1?97:"auto",overflow:Dn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},d.createElement("div",{className:W.tag,ref:kt},F==null?void 0:F.map(he=>d.createElement("span",{onClick:()=>se(he.id),key:he.id,style:{color:Vt},className:tt===he.id?W.active:""},d.createElement("span",{title:he.name,className:W.name},he.name),!!hn&&d.createElement("span",{className:W.num},he.count))))),!!Dn&&d.createElement(d.Fragment,null,Dn===1?d.createElement("div",{onClick:()=>{var he;sn(2),((he=kt==null?void 0:kt.current)==null?void 0:he.clientHeight)>245?Kt(!0):Kt(!1)},className:W.action},"\u5C55\u5F00",d.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):d.createElement("div",{onClick:()=>{te.current.scrollTop=0,sn(1),Kt(!1)},className:W.action},"\u6536\u8D77",d.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},U={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"},w=({dataSource:F=[],value:tt,onChange:se,className:it,style:Ot={}})=>d.createElement("div",{style:Ot,className:ne()(U.tabs,it)},F.map(Ut=>d.createElement("span",{onClick:()=>se(Ut.id),className:tt===Ut.id?U.active:"",key:Ut.id},Ut.name))),A={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"},I=_(37568),re=({dataSource:F=[],value:tt="",onChange:se,onInputChange:it=()=>{},className:Ot,style:Ut={},placeholder:Ht,allowClear:Xt=!1})=>{var Vt;const[hn,Dn]=(0,d.useState)(""),[sn,An]=(0,d.useState)("");(0,d.useEffect)(()=>{var te;let he=tt;(te=JSON.stringify(tt))!=null&&te.includes("{")&&(Dn(tt.id),he=tt.value||"");try{An(decodeURIComponent(he||""))}catch(st){An(decodeURIComponent(he||""))}},[tt]);const Kt=()=>{se(encodeURIComponent(sn),hn||null)},kt=te=>{te!==hn&&(Dn(te),se(encodeURIComponent(sn),te))};return d.createElement("div",{className:ne()(A.input,Ot),style:Ut},!!F.length&&d.createElement("div",{className:A.dropdown},d.createElement("div",{className:A.text},(Vt=F.find(te=>te.id===hn))==null?void 0:Vt.name,d.createElement("i",{className:"iconfont icon-zhankai4"}),d.createElement("b",{className:A.b1}),d.createElement("b",{className:A.b2})),d.createElement("div",{className:A.menu},F.map((te,he)=>d.createElement("div",{key:he,onClick:()=>kt(te.id)},te.name)))),d.createElement(I.default,{onPressEnter:Kt,value:sn,onChange:te=>{An(te.target.value),it(encodeURIComponent(te.target.value),hn||null)},placeholder:Ht,variant:"borderless",allowClear:Xt,onClear:()=>se("",hn||null)}),d.createElement("i",{onClick:Kt,className:"iconfont icon-sousuo9 font14 current"}))},G={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"},H=({value:F,onChange:tt,className:se,total:it,pageSize:Ot,style:Ut={}})=>{const Ht=F<2,Xt=F>=Math.ceil(it/Ot);return it<=Ot?d.createElement(d.Fragment,null):d.createElement("div",{className:ne()(G.quickPager,se),style:Ut},d.createElement("div",{onClick:()=>{Ht||tt(F-1,"prev")},className:Ht?G.disabled:""},"\u4E0A\u4E00\u9875"),d.createElement("div",{onClick:()=>{Xt||tt(F+1,"next")},className:Xt?G.disabled:""},"\u4E0B\u4E00\u9875"))},$={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"},z=_(29787),de=_(25399),we=_(63139),ce=_(14185),Oe=_(76406),Fe=_(90736),Ve=({className:F,dataSource:tt=[],col:se=4,right:it,bottom:Ot=23,precision:Ut=0,wrapWidth:Ht=1200,trackEventItems:Xt,loading:Vt})=>{const hn=Math.floor((Ht-(se-1)*it)/se);return d.createElement(z.Z,{spinning:Vt},d.createElement("div",{className:ne()($.list,F)},!!tt.length&&tt.map((Dn,sn)=>{const{name:An,id:Kt,identifier:kt,power:te,cover_image_id:he,pic:st}=Dn;return d.createElement("div",{className:$.wrap,key:Kt,style:{width:hn,marginRight:(1+sn)%se===0?0:it+Ut,marginBottom:Ot}},d.createElement("a",{target:"_blank",href:`/shixuns/${kt}/challenges`,className:$.li,onClick:Rt=>{Rt.preventDefault(),Xt&&(0,Oe.L9)([Xt]),te&&(0,Oe.xg)(`/shixuns/${kt}/challenges`)}},d.createElement("div",{className:$.img},d.createElement("img",{className:$.cover,src:`${st}`}),Dn.is_jupyter&&d.createElement("span",{className:`sprite sprite-43 ${$.sign}`}),Dn.is_jupyter_lab&&d.createElement("span",{className:`sprite sprite-42 ${$.sign}`}),Dn.is_unity_3d&&d.createElement("span",{className:`sprite sprite-44 ${$.sign}`})),d.createElement("div",{className:$.name},d.createElement(de.Z,{title:An||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},d.createElement("span",{className:$.e},An||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),d.createElement("div",{className:$.tags},d.createElement(de.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},d.createElement("span",null,d.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),d.createElement("span",null,Dn.challenges_count))),!!Dn.myshixuns_count&&d.createElement(de.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},d.createElement("span",null,d.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),d.createElement("span",null,Dn.myshixuns_count))),d.createElement(de.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},d.createElement("span",null,d.createElement("span",null,Dn.level))),d.createElement("div",{className:$.rate},d.createElement(we.Z,{allowHalf:!0,disabled:!0,defaultValue:Dn.score_info}),d.createElement("span",null,"\xA0",Dn.score_info?`${Dn.score_info}\u5206`:"5\u5206")))),!te&&d.createElement("div",{className:$.lockWrap},d.createElement("img",{src:`${ce.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),d.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!tt.length&&d.createElement(Fe.Z,null)))},K=_(54077),B={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",btnsTop:"btnsTop___Lrm6T",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},L=_(62957),Y=_(96599),Q="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",P=_(59301),b=(F,tt,se)=>new Promise((it,Ot)=>{var Ut=Vt=>{try{Xt(se.next(Vt))}catch(hn){Ot(hn)}},Ht=Vt=>{try{Xt(se.throw(Vt))}catch(hn){Ot(hn)}},Xt=Vt=>Vt.done?it(Vt.value):Promise.resolve(Vt.value).then(Ut,Ht);Xt((se=se.apply(F,tt)).next())}),N=({className:F,dataSource:tt=[],col:se=4,right:it,bottom:Ot=23,precision:Ut=0,wrapWidth:Ht=1200,trackEventItems:Xt,loading:Vt,category:hn,hiddenClick:Dn,handleVery:sn=()=>!0,isCurrent:An})=>{const[Kt,kt]=L.default.useModal(),te=Math.floor((Ht-(se-1)*it)/se),he=st=>b(void 0,null,function*(){Kt.confirm({title:"\u7F6E\u9876",width:500,content:P.createElement("div",null,"\u60A8\u786E\u5B9A\u8981\u5C06",P.createElement("span",{className:"c-blue"},"\u201C",st.name,"\u201D"),"\u8BFE\u5802\u7F6E\u9876\u5417\uFF1F"),okText:"\u786E\u8BA4\u7F6E\u9876",centered:!0,cancelText:"\u53D6\u6D88"})});return P.createElement(z.Z,{spinning:Vt},kt,P.createElement("div",{className:ne()(B.list,F)},!!tt.length&&tt.map((st,Rt)=>{const{subject_identifier:Ft,id:Gt,identifier:qt,power:Wt}=st,Qt=st.is_public!=0&&st.is_public;return P.createElement("div",{className:B.wrap,key:Gt,style:{width:te,marginRight:(1+Rt)%se===0?0:it+Ut,marginBottom:Ot}},st.homepage_show&&P.createElement("div",{className:B.btnsTop},P.createElement(Y.default,{color:"red"},"\u7F6E\u9876")),P.createElement("a",{className:B.li,onClick:un=>{un.preventDefault(),sn(st==null?void 0:st.first_category_url)&&(Xt&&(0,Oe.L9)([Xt]),(0,Oe.xg)(st.first_category_url))}},P.createElement("div",{className:B.top},P.createElement(de.Z,{title:st.name},P.createElement("div",{className:B.name},st.name)),P.createElement("img",{className:B.img,src:ce.Z.IMG_SERVER+"/images/"+st.avatar_url}),P.createElement("div",{className:B.text,title:st.creator},st.creator),Ft&&P.createElement("div",{className:B.btns},P.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),P.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Qt&&P.createElement("div",{className:B.sign},"\u516C\u5F00"),An&&P.createElement("div",{className:B.hidden,onClick:un=>{un.stopPropagation(),Dn(st)}},P.createElement("i",{className:`iconfont ${hn=="hide"?"icon-chakan2":"icon-yincangtiaojianshezhi"} font12`}),hn=="hide"?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")),P.createElement("div",{className:B.bottom},st.visits>0&&P.createElement(de.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},P.createElement("span",null,P.createElement("i",{className:"iconfont icon-liulanyan"}),P.createElement("span",null,st.visits))),st.course_members_count>0&&P.createElement(de.Z,{title:"\u6210\u5458",placement:"bottom"},P.createElement("span",null,P.createElement("i",{className:"iconfont icon-chengyuan"}),st.course_members_count)),st.tasks_count>0&&P.createElement(de.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},P.createElement("span",null,P.createElement("i",{className:"iconfont icon-zuoye"}),st.tasks_count)),st.is_end?P.createElement("div",{style:{color:"#6B758B"}}):P.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!st.is_accessible&&P.createElement("div",{className:B.lockWrap},P.createElement("img",{src:`${ce.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),P.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!tt.length&&P.createElement(Fe.Z,null)))},ie={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"},Ie=_(44283),me=({dataSource:F=[],value:tt,onChange:se,className:it,style:Ot={},tabBarExtraContent:Ut})=>d.createElement("div",{className:ne()(ie.tabs,it),style:Ot},d.createElement("div",{className:ie.tabsWrap},F.map((Ht,Xt)=>!(Ht!=null&&Ht.hide)&&d.createElement("aside",{className:ie.tab,onClick:()=>{se(Ht.id),Ht.link&&Ie.history.push(Ht.link)},key:Xt},d.createElement("div",{className:tt===Ht.id?ie.active:""},Ht.name),(Ht==null?void 0:Ht.resetCount)==null&&(Ht==null?void 0:Ht.total)!==void 0&&d.createElement("span",null,"\uFF08",Ht==null?void 0:Ht.total,"\uFF09"),(Ht==null?void 0:Ht.resetCount)!==void 0&&(Ht==null?void 0:Ht.total)!==void 0&&d.createElement(de.Z,{title:(Ht==null?void 0:Ht.tip)!=null?Ht==null?void 0:Ht.tip:""},d.createElement("span",{style:{color:"#9096A3"}},"\uFF08",d.createElement("span",{style:{color:"#000"}},Ht==null?void 0:Ht.resetCount),"/",d.createElement("span",null,Ht==null?void 0:Ht.total),"\uFF09"))))),d.createElement("div",{className:ie.tabBar},Ut)),Ke=({className:F,style:tt={},children:se})=>d.createElement("div",{className:ne()(F),style:tt},se),Qe={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"},Ge=_(75727),wt=_(93041);const Ue=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Le=({sortValue:F,dropValue:tt,className:se,onSort:it,onDrop:Ot,dataSource:Ut=Ue})=>{var Ht;return d.createElement("div",{className:ne()(Qe.orderWrap,se)},d.createElement(Ge.Z,{dropdownRender:()=>d.createElement(wt.default,null,Ut.map((Xt,Vt)=>d.createElement(wt.default.Item,{key:Vt,onClick:()=>Ot(Xt.id)},Xt.name)))},d.createElement("span",{className:Qe.orderTextWrap},(Ht=Ut.find(Xt=>tt===Xt.id))==null?void 0:Ht.name)),d.createElement("span",{className:Qe.orderIconWrap},d.createElement("span",{className:Qe.orderAsc},d.createElement("i",{className:F==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Qe.cursorPointer} ${Qe.active}`:`iconfont icon-sanjiaoxing-up font12 ${Qe.cursorPointer}`,onClick:()=>it(F==="asc"?"desc":"asc")})),d.createElement("span",{className:Qe.orderDesc},d.createElement("i",{className:F==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Qe.cursorPointer} ${Qe.active}`:`iconfont icon-sanjiaoxing-down font12 ${Qe.cursorPointer}`,onClick:()=>it(F==="asc"?"desc":"asc")}))))},lt={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"},Re=_(7939),Te=Object.defineProperty,pe=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Se=(F,tt,se)=>tt in F?Te(F,tt,{enumerable:!0,configurable:!0,writable:!0,value:se}):F[tt]=se,k=(F,tt)=>{for(var se in tt||(tt={}))We.call(tt,se)&&Se(F,se,tt[se]);if(pe)for(var se of pe(tt))De.call(tt,se)&&Se(F,se,tt[se]);return F},fe=(F,tt)=>{var se={};for(var it in F)We.call(F,it)&&tt.indexOf(it)<0&&(se[it]=F[it]);if(F!=null&&pe)for(var it of pe(F))tt.indexOf(it)<0&&De.call(F,it)&&(se[it]=F[it]);return se},ve=(F,tt,se)=>new Promise((it,Ot)=>{var Ut=Vt=>{try{Xt(se.next(Vt))}catch(hn){Ot(hn)}},Ht=Vt=>{try{Xt(se.throw(Vt))}catch(hn){Ot(hn)}},Xt=Vt=>Vt.done?it(Vt.value):Promise.resolve(Vt.value).then(Ut,Ht);Xt((se=se.apply(F,tt)).next())}),qe=F=>{var tt=F,{className:se,style:it,children:Ot,loading:Ut=!1,openLoading:Ht,onClick:Xt=()=>{},size:Vt="middle",shape:hn="round"}=tt,Dn=fe(tt,["className","style","children","loading","openLoading","onClick","size","shape"]);const[sn,An]=(0,d.useState)(!1);return d.createElement(Re.ZP,k({onClick:(0,J.throttle)(Kt=>ve(void 0,null,function*(){Ht&&An(!0);try{yield Xt(Kt)}catch(kt){console.log("error",kt)}Ht&&An(!1)}),2e3,{leading:!0,trailing:!1}),className:ne()(lt.btn,lt[`${Vt}-${hn}`],se),style:it,size:Vt,shape:hn,loading:sn||Ut},Dn),Ot)},at={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"},mt=({className:F,style:tt,children:se=null,onClick:it,title:Ot})=>d.createElement("div",{className:ne()(at.head,F),style:tt},d.createElement("span",{className:"primary-hover",onClick:it},d.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),d.createElement("b",{title:Ot},Ot),d.createElement("div",{className:at.node},se)),dt={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"},Lt=({confirmShow:F=!0,confirmTitle:tt,confirmClick:se,cancelShow:it=!0,cancelTitle:Ot,cancelClick:Ut,className:Ht,style:Xt,confirmLoading:Vt=!1})=>d.createElement("div",{className:ne()(dt.btns,Ht),style:Xt},F&&d.createElement(Re.ZP,{loading:Vt,onClick:se,type:"primary",className:dt.confirm},tt),it&&d.createElement(Re.ZP,{onClick:Ut,className:dt.cancel},Ot)),St={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"},nt=({className:F,style:tt={},LeftContent:se,children:it,RightContent:Ot})=>d.createElement("div",{className:ne()(St.fixedBottom,F),style:tt},d.createElement("div",{className:St.wrap},d.createElement("div",{className:St.left},se),d.createElement("div",{className:St.center},it),d.createElement("div",{className:St.right},Ot))),vt={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"},be=({className:F,style:tt={},dataSource:se=[]})=>d.createElement("div",{className:ne()(vt.crumbs,F),style:tt},se.map((it,Ot)=>Ot<se.length-1?d.createElement(d.Fragment,{key:Ot},it.path||it.onClick?d.createElement("span",{className:vt.hover,onClick:it!=null&&it.onClick?it.onClick:()=>Ie.history.push(it.path)},it.name):d.createElement("span",null,it.name),d.createElement("span",null,"\xA0",">","\xA0")):d.createElement("span",{key:Ot,style:{color:"#5F6368"}},it.name))),Je=_(11938),x=Object.defineProperty,T=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,Ae=(F,tt,se)=>tt in F?x(F,tt,{enumerable:!0,configurable:!0,writable:!0,value:se}):F[tt]=se,Me=(F,tt)=>{for(var se in tt||(tt={}))ae.call(tt,se)&&Ae(F,se,tt[se]);if(j)for(var se of j(tt))xt.call(tt,se)&&Ae(F,se,tt[se]);return F},Xe=(F,tt)=>T(F,$e(tt)),ee=(F,tt)=>{var se={};for(var it in F)ae.call(F,it)&&tt.indexOf(it)<0&&(se[it]=F[it]);if(F!=null&&j)for(var it of j(F))tt.indexOf(it)<0&&xt.call(F,it)&&(se[it]=F[it]);return se};const{Countdown:oe}=Je.default;var ze=F=>{var tt=F,{onChange:se}=tt,it=ee(tt,["onChange"]);const[Ot,Ut]=(0,d.useState)(null);(0,d.useEffect)(()=>{typeof Ot=="number"&&Ot>=0&&se(Ot)},[Ot]);const Ht=Xt=>{const Vt=Math.floor(Xt/1e3);Ut(Vt)};return d.createElement(oe,Xe(Me({},it),{onChange:Ht}))}},83792:function(Jt,ot,_){"use strict";_.r(ot),_.d(ot,{default:function(){return Ve}});var d=_(59301),ge=_(44283),Ee=_(91882),ye=_(62957),W=_(31691),g=_(76406),ne=_(32352),J=_(14185),o=_(35883),X=_(66649),U=_.n(X),S={flex_box_center:"flex_box_center___dn0xX",flex_space_between:"flex_space_between___JlcX8",flex_box_vertical_center:"flex_box_vertical_center___PGWCu",flex_box_center_end:"flex_box_center_end___sRxxV",flex_box_column:"flex_box_column___WPwan",top:"top___arr9I",desc:"desc___tW8Wt",liked:"liked___Bq9NY",likedActive:"likedActive___XzpPk",reply:"reply___12llT",replyList:"replyList___NJsYv",comment:"comment___RWWH5",headpic:"headpic___v_77H"};U().locale("ZH-cn");const w=({userDetail:K,dispatch:B})=>{var L;const Y=(0,ge.useParams)(),Q=(0,ge.useLocation)();(0,d.useEffect)(()=>{var b,E;Y.type=(E=(b=Q.pathname)==null?void 0:b.split("/"))==null?void 0:E[6]},[Q.pathname]);const{homeworkBanksDetail:P}=K;return d.createElement("section",{className:S.bg},d.createElement("section",{className:""},d.createElement("aside",{className:[S.desc,"c-black","font14","bg-white"].join(" ")},K.actionTabs.key!=="\u7F16\u8F91\u4F5C\u4E1A"&&d.createElement(o.Z,{value:(P==null?void 0:P.description)||"\u6682\u65E0\uFF5E"}),(L=P==null?void 0:P.attachments)==null?void 0:L.map((b,E)=>d.createElement("div",null,d.createElement("a",{href:`${J.Z.API_SERVER}${b.url}`},d.createElement("span",{className:"iconfont icon-fujian c-green font14"}),d.createElement("span",{className:"ml10 c-black"},b.title),d.createElement("span",{className:"c-light-black ml20 font12"},b.filesize)))),Y.type==="group"&&d.createElement(d.Fragment,null,(P.min_num||P.max_num)&&d.createElement("div",{className:"mt10"},d.createElement("span",{className:"c-grey-666"},"\u5206\u7EC4\u8981\u6C42\uFF1A"),d.createElement("span",{className:"c-black-051"},P.min_num,"~ ",P.max_num," \u4EBA\uFF08\u5B66\u751F\u63D0\u4EA4\u4F5C\u54C1\u65F6\u9700\u8981\u5173\u8054\u540C\u7EC4\u6210\u5458\uFF0C\u7EC4\u5185\u6210\u5458\u4F5C\u54C1\u5171\u4EAB\uFF09")),P.base_on_project?d.createElement("p",null,d.createElement("span",{className:"c-grey-666"},"\u57FA\u4E8E\u9879\u76EE\u5B9E\u65BD"),d.createElement("span",{className:"c-black-051"},"\uFF08\u5B66\u751F\u5FC5\u987B\u5728\u672C\u5E73\u53F0\u521B\u5EFA\u9879\u76EE\uFF0C\u9879\u76EE\u7BA1\u7406\u5458\u53EF\u4EE5\u63D0\u4EA4\u4F5C\u54C1\uFF09")):d.createElement("p",null,d.createElement("span",{className:"c-grey-666"},"\u4E0D\u57FA\u4E8E\u9879\u76EE"),d.createElement("span",{className:"c-black-051"},"\uFF08\u65E0\u9700\u5728\u5E73\u53F0\u521B\u5EFA\u9879\u76EE\uFF0C\u4EFB\u610F\u5C0F\u7EC4\u6210\u5458\u5747\u53EF\u4EE5\u63D0\u4EA4\u4F5C\u54C1\uFF09"))))))};var A=(0,ge.connect)(({userDetail:K})=>({userDetail:K}))(w),I=_(90736),q={flex_box_center:"flex_box_center___ukees",flex_space_between:"flex_space_between___PHPo4",flex_box_vertical_center:"flex_box_vertical_center___MgEzw",flex_box_center_end:"flex_box_center_end___owDkz",flex_box_column:"flex_box_column____I7hO",top:"top___DHLWM",desc:"desc___JJR8P",liked:"liked___knpCw",likedActive:"likedActive___KPZCk",reply:"reply___n7kXe",replyList:"replyList___MVu52",comment:"comment___Leq7e",headpic:"headpic___HL9zI"};U().locale("ZH-cn");const re=({userDetail:K,dispatch:B})=>{var L,Y;const{homeworkBanksDetail:Q}=K;return d.createElement("section",{className:q.bg},d.createElement("section",{className:""},d.createElement("aside",{className:[q.desc,"c-black","font14","bg-white"].join(" ")},Q!=null&&Q.reference_answer||(L=Q==null?void 0:Q.reference_attachments)!=null&&L.length?d.createElement(d.Fragment,null,d.createElement(o.Z,{value:(Q==null?void 0:Q.reference_answer)||""}),(Y=Q==null?void 0:Q.reference_attachments)==null?void 0:Y.map((P,b)=>d.createElement("div",null,d.createElement("a",{href:`${J.Z.API_SERVER}${P.url}`},d.createElement("span",{className:"iconfont icon-fujian c-green font14"}),d.createElement("span",{className:"ml10 c-black"},P.title),d.createElement("span",{className:"c-light-black ml20 font12"},P.filesize))))):d.createElement(I.Z,null))))};var G=(0,ge.connect)(({userDetail:K})=>({userDetail:K}))(re),D={flex_box_center:"flex_box_center___vHDeL",flex_space_between:"flex_space_between___rLrGx",flex_box_vertical_center:"flex_box_vertical_center___iGSf0",flex_box_center_end:"flex_box_center_end___mqG_2",flex_box_column:"flex_box_column___x9EJv",title:"title___LcvG_",export:"export___M5wlK",bg:"bg___XfKxA",tabs:"tabs___esytV"},H=_(78568),$=Object.defineProperty,z=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,ce=(K,B,L)=>B in K?$(K,B,{enumerable:!0,configurable:!0,writable:!0,value:L}):K[B]=L,Oe=(K,B)=>{for(var L in B||(B={}))de.call(B,L)&&ce(K,L,B[L]);if(z)for(var L of z(B))we.call(B,L)&&ce(K,L,B[L]);return K},Fe=(K,B,L)=>new Promise((Y,Q)=>{var P=N=>{try{E(L.next(N))}catch(ie){Q(ie)}},b=N=>{try{E(L.throw(N))}catch(ie){Q(ie)}},E=N=>N.done?Y(N.value):Promise.resolve(N.value).then(P,b);E((L=L.apply(K,B)).next())});const Ne=({userDetail:K,dispatch:B,history:L})=>{const[Y]=(0,ge.useSearchParams)(),Q=(0,ge.useParams)(),P=(0,ge.useLocation)(),[b,E]=(0,d.useState)(Y.get("tabs")||0),{homeworkBanksDetail:N}=K;(0,d.useEffect)(()=>{var Ze,me;Q.type=(me=(Ze=P.pathname)==null?void 0:Ze.split("/"))==null?void 0:me[6],B({type:"userDetail/getHomeworkBanksDetail",payload:Oe({},Q)})},[Q.topicId,P.pathname]);const ie=()=>{B({type:"userDetail/setActionTabs",payload:{key:"UserDetail-SendToClass",params:{object_id:[Q.topicId],object_type:Q.type}}})},Ie=[{name:"\u5185\u5BB9\u8BE6\u60C5",id:0,compontent:d.createElement("div",{className:"minH500"},d.createElement(A,null))},{name:"\u53C2\u8003\u7B54\u6848",id:1,compontent:d.createElement(G,null)}];return d.createElement("section",{className:D.bg},d.createElement("div",{className:"edu-container"},d.createElement("section",{className:"animated fadeIn"},d.createElement("aside",{className:"mt10"},d.createElement(Ee.Z,{separator:">"},d.createElement(Ee.Z.Item,null,d.createElement(ge.Link,{to:`/users/${Q.username}/${Q.topictype==="personal"?"topics":"topicbank"}/${Q.topictype}`},Q.topictype==="personal"?"\u6211\u7684\u8BFE\u5802\u8D44\u6E90":"\u516C\u5171\u9898\u5E93")),d.createElement(Ee.Z.Item,null,"\u8BE6\u60C5"))),d.createElement("aside",{className:[D.title,"mt20"].join(" ")},d.createElement("strong",{className:"font20 ml5"},N.name),N.is_public&&d.createElement(g.VV,{status:["\u516C\u5F00"]}))),d.createElement("aside",{className:"mt30 relative bg-white mb20"},d.createElement("div",{className:D.export},(N==null?void 0:N.authorize)&&d.createElement(d.Fragment,null,d.createElement("a",{onClick:Ze=>{Ze.preventDefault(),ye.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:()=>Fe(void 0,null,function*(){(yield(0,ne.Tv)({object_type:"normal",object_id:[Q.topicId]})).status===0&&L.push(`/users/${Q.username}/topics/personal`)})})}},"\u5220\u9664"),d.createElement(ge.Link,{to:`/users/${Q.username}/topics/${Q.topicId}/${Q.topictype}/${Q.type}/edit`},"\u7F16\u8F91")),d.createElement("a",{onClick:Ze=>{Ze.preventDefault(),ie()}},"\u53D1\u9001")),d.createElement(W.default,{defaultActiveKey:b,className:D.tabs},Ie.map((Ze,me)=>d.createElement(W.default.TabPane,{tab:Ze.name,key:Ze.id},Ze.compontent))))),d.createElement(H.Z,null))};var Ve=(0,ge.connect)(({userDetail:K,loading:B})=>({userDetail:K,loading:B.effects}))(Ne)},78568:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return K}});var d=_(59301),ge=_(44283),Ee=_(6767),ye=_(62957),W=_(31691),g=_(458),ne=_(47889),J={title:"title___XAxiE",radioWrap:"radioWrap___k0pOB",radio:"radio___x9kMt",colorFF0000:"colorFF0000___IMgd0",pagination:"pagination___ou2ht",checkboxWrapper:"checkboxWrapper___kF7xI"},o=_(76406),X=_(70467),U=_(29787),S=_(62673),w=_(32352),A=_(26724),I=_.n(A),q=(B,L,Y)=>new Promise((Q,P)=>{var b=ie=>{try{N(Y.next(ie))}catch(Ie){P(Ie)}},E=ie=>{try{N(Y.throw(ie))}catch(Ie){P(Ie)}},N=ie=>ie.done?Q(ie.value):Promise.resolve(ie.value).then(b,E);N((Y=Y.apply(B,L)).next())}),G=({username:B,setStages:L,stages:Y,hasError:Q,setHasError:P})=>{const[b,E]=(0,d.useState)(""),[N,ie]=(0,d.useState)(1),[Ie,Ze]=(0,d.useState)([]),[me,Ce]=(0,d.useState)(!1),[Ke,Qe]=(0,d.useState)(0);(0,d.useEffect)(()=>{Ge({page:1,search:""},!0)},[]);const Ge=(Ue,bt)=>q(void 0,null,function*(){Ce(!0);const Le=yield(0,w.w3)({username:B,category:"manage",page:Ue.page,search:Ue.search});Ce(!1),Ze(lt=>bt?Le==null?void 0:Le.subjects:[...lt,...Le==null?void 0:Le.subjects]),Qe(Le==null?void 0:Le.count)}),wt=(0,d.useRef)();return d.createElement("div",{className:J.wrap},d.createElement("div",{className:"mb10"},d.createElement(X.t7,{placeholder:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:b,style:{width:500},onChange:Ue=>{E(Ue),ie(1),wt.current.scrollTo({behavior:"smooth",top:0}),Ge({page:1,search:Ue},!0)}})),d.createElement(U.Z,{spinning:me},d.createElement("div",{className:J.radioWrap,ref:wt},d.createElement(I(),{initialLoad:!1,pageStart:1,threshold:6,loadMore:()=>{ie(N+1),Ge({page:N+1,search:b},!1)},hasMore:Ie.length<Ke,useWindow:!1},d.createElement(ne.ZP.Group,{value:Y.subjectId,onChange:Ue=>{L({subjectId:Ue.target.value,stage_ids:[]}),P(!1)}},Ie.map(Ue=>{const bt=Ue.stages.map(Le=>({label:Le.name,value:Le.id}));return d.createElement("div",{key:Ue.id},d.createElement(ne.ZP,{className:J.radio,value:Ue.id},Ue.name),Ue.id===Y.subjectId&&d.createElement("div",{className:J.checkboxWrapper},bt.length>0&&d.createElement(S.default,{indeterminate:Y.stage_ids.length>0&&Y.stage_ids.length<bt.length,onChange:Le=>{L({subjectId:Ue.id,stage_ids:Le.target.checked?bt.map(lt=>lt.value):[]})},checked:Y.stage_ids.length===bt.length},"\u5168\u9009"),d.createElement(S.default.Group,{options:bt,value:Y.stage_ids,onChange:Le=>L({subjectId:Ue.id,stage_ids:Le})})))}))))),Q&&d.createElement("div",{className:J.colorFF0000},"\u8BF7\u5148\u9009\u62E9\u5B9E\u8DF5\u8BFE\u7A0B\u53CA\u7AE0\u8282"))},D=_(39967),H=_(48404),$=Object.defineProperty,z=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,ce=(B,L,Y)=>L in B?$(B,L,{enumerable:!0,configurable:!0,writable:!0,value:Y}):B[L]=Y,Oe=(B,L)=>{for(var Y in L||(L={}))de.call(L,Y)&&ce(B,Y,L[Y]);if(z)for(var Y of z(L))we.call(L,Y)&&ce(B,Y,L[Y]);return B},Fe=(B,L)=>{var Y={};for(var Q in B)de.call(B,Q)&&L.indexOf(Q)<0&&(Y[Q]=B[Q]);if(B!=null&&z)for(var Q of z(B))L.indexOf(Q)<0&&we.call(B,Q)&&(Y[Q]=B[Q]);return Y},Ne=(B,L,Y)=>new Promise((Q,P)=>{var b=ie=>{try{N(Y.next(ie))}catch(Ie){P(Ie)}},E=ie=>{try{N(Y.throw(ie))}catch(Ie){P(Ie)}},N=ie=>ie.done?Q(ie.value):Promise.resolve(ie.value).then(b,E);N((Y=Y.apply(B,L)).next())});const Ve=B=>{var L=B,{userDetail:Y,globalSetting:Q,loading:P,user:b,dispatch:E}=L,N=Fe(L,["userDetail","globalSetting","loading","user","dispatch"]),ie,Ie,Ze,me,Ce;const[Ke,Qe]=(0,d.useState)("course"),[Ge,wt]=(0,d.useState)(""),[Ue,bt]=(0,d.useState)([]),[Le,lt]=(0,d.useState)(),[Re,Te]=(0,d.useState)(!1),[pe,We]=(0,d.useState)(!1);(0,d.useEffect)(()=>{Y.actionTabs.key==="UserDetail-SendToClass"&&De(Ge)},[Y.actionTabs.key]);const De=ve=>Ne(void 0,null,function*(){Te(!0);const Be=yield E({type:"userDetail/topicGetCourseList",payload:{search:ve}});Be&&bt((Be==null?void 0:Be.courses)||[]),Te(!1)}),[Se,k]=(0,d.useState)({subjectId:"",stage_ids:[]}),fe=()=>Ne(void 0,null,function*(){var ve,Be,qe,at,ct,mt;if(Ke==="course"){if(!Le){We(!0);return}const dt=yield E({type:"userDetail/topicSendToClass",payload:Oe({course_id:Le},(ve=Y.actionTabs)==null?void 0:ve.params)});if(E({type:"userDetail/setActionTabs",payload:{}}),dt&&dt.status===0){const gt={normal:"common_homework",group:"group_homework",exercise:"exercise",poll:"poll",videos:"video"};(0,o.xg)(`/classrooms/${Le}/${gt[(qe=(Be=Y.actionTabs)==null?void 0:Be.params)==null?void 0:qe.object_type]}`)}}else{if(!Se.subjectId||!Se.stage_ids.length){We(!0);return}(yield(0,H.nI)({id:(ct=(at=Y.actionTabs)==null?void 0:at.params)==null?void 0:ct.object_id,login:(mt=b.userInfo)==null?void 0:mt.login},{stage_ids:Se.stage_ids})).status===0&&(Ee.ZP.success("\u53D1\u9001\u6210\u529F"),E({type:"userDetail/setActionTabs",payload:{}}),(0,o.xg)(`/paths/${Se.subjectId}`))}});return d.createElement(ye.default,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,open:Y.actionTabs.key==="UserDetail-SendToClass",title:"\u53D1\u9001",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:P["userDetail/sendToClass"],width:600,afterClose:()=>{We(!1),bt([]),k({subjectId:"",stage_ids:[]}),wt("")},onOk:fe,wrapClassName:D.Z.CustomCss,onCancel:()=>{E({type:"userDetail/setActionTabs",payload:{}})}},d.createElement(W.default,{activeKey:Ke,onChange:ve=>{We(!1),Qe(ve)},items:[{label:"\u8BFE\u5802",key:"course",children:d.createElement("div",{className:J.wrap},d.createElement("div",{className:"mb10"},d.createElement(X.t7,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:Ge,style:{width:500},onChange:ve=>{wt(ve),De(ve)}})),d.createElement(g.Z,{active:!0,loading:Re},d.createElement("div",{className:J.radioWrap},d.createElement(ne.ZP.Group,{value:Le,onChange:ve=>{lt(ve.target.value),We(!1)}},Ue.map((ve,Be)=>d.createElement(ne.ZP,{className:J.radio,value:ve.course_id,key:ve.course_id},ve.course_name))))),((Ie=(ie=Y.actionTabs)==null?void 0:ie.params)==null?void 0:Ie.object_type)!=="videos"&&d.createElement("div",{className:J.title},"\u6E29\u99A8\u63D0\u793A\uFF1A\u9009\u62E9\u7684\u9898\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802"),pe&&d.createElement("div",{className:J.colorFF0000},"\u8BF7\u5148\u9009\u62E9\u8BFE\u5802")),show:!0},{label:"\u5B9E\u8DF5\u8BFE\u7A0B",key:"subject",children:d.createElement(G,{username:(Ze=b.userInfo)==null?void 0:Ze.login,stages:Se,setStages:k,hasError:pe,setHasError:We}),show:((Ce=(me=Y.actionTabs)==null?void 0:me.params)==null?void 0:Ce.object_type)==="videos"}].filter(ve=>ve.show)}))};var K=(0,ge.connect)(({userDetail:B,loading:L,globalSetting:Y,user:Q})=>({userDetail:B,globalSetting:Y,loading:L.effects,user:Q}))(Ve)},20047:function(Jt,ot,_){"use strict";_.d(ot,{AL:function(){return $},Iy:function(){return U},Qv:function(){return A},ez:function(){return H},jb:function(){return S}});var d=_(32834),ge=_.n(d),Ee=_(11690),ye=_.n(Ee);let W=1;function g(Oe,Fe){const Ne=Oe.match(/^(\s+)(?:```)/);if(Ne===null)return Fe;const Ve=Ne[1];return Fe.split(`
|
|
`).map(K=>{const B=K.match(/^\s+/);if(B===null)return K;const[L]=B;return L.length>=Ve.length?K.slice(Ve.length):K}).join(`
|
|
`)}let ne=[],J=["<ul>"];const o=new(ge()).Renderer,X=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function U(){ne.length=0,J=["<ul>"]}const S={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(Oe,Fe,Ne,Ve){if(Fe>=Oe.length||Oe[Fe].level<=Ne)return Fe;var K=Oe[Fe];Ve.push("<li><a href='#"+W+K.anchor+"'>"+K.text+"</a>"),Fe++;var B=[];return Fe=w(Oe,Fe,K.level,B),B.length>0&&(Ve.push("<ul>"),B.forEach(function(L){Ve.push(L)}),Ve.push("</ul>")),Ve.push("</li>"),Fe=w(Oe,Fe,Ne,Ve),Fe}function A(){return w(ne,0,0,J),J.push("</ul>"),J.join("")}const I={heading(Oe){const Fe=X.exec(Oe);if(W+=1,Fe)return{type:"heading",raw:Fe[0],depth:Fe[1].length,text:Fe[2]}},fences(Oe){const Fe=this.rules.block.fences.exec(Oe);if(Fe){const Ne=Fe[0];let Ve=g(Ne,Fe[3]||"");const K=Fe[2]?Fe[2].trim():Fe[2];if(["latex","katex","math"].indexOf(K)>=0){const B=G(),L=Ve;Ve=B,D[B]={type:"block",expression:L}}return{type:"code",raw:Ne,lang:K,text:Ve}}}},q=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let re=0;const G=()=>`__special_katext_id_${re++}__`;let D={};function H(){return D}function $(){re=0,D={}}function z(Oe){return Oe=Oe.replace(q,(Fe,Ne)=>{const Ve=G();return D[Ve]={type:"inline",expression:Ne},Ve}),Oe}const de=o.listitem;o.listitem=function(Oe){return de(z(Oe))};const we=o.paragraph;o.paragraph=function(Oe){return we(z(Oe))};const ce=o.tablecell;o.tablecell=function(Oe,Fe){return ce(z(Oe),Fe)},o.code=function(Oe,Fe,Ne){const Ve=(Fe||"").match(/\S*/)[0];return Ve?["latex","katex","math"].indexOf(Ve)>=0?`<p class='editormd-tex'>${Oe}</p>`:`<pre class="prettyprint linenums"><code class="language-${Fe}">${Ne?Oe:(0,Ee.escape)(Oe,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Ne?Oe:(0,Ee.escape)(Oe,!0))+"</code></pre>"},o.heading=function(Oe,Fe,Ne){let Ve=this.options.headerPrefix+Ne.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ne.push({anchor:Ve,level:Fe,text:Oe}),"<h"+Fe+' id="'+W+Ve+'">'+Oe+"</h"+Fe+">"},ge().setOptions({silent:!0,gfm:!0,pedantic:!1}),ge().use({tokenizer:I,renderer:o}),ot.ZP=ge()},29509:function(Jt,ot,_){"use strict";_.d(ot,{o2:function(){return W},yT:function(){return g}});var d=_(77654),ge=_(34998);const Ee=ge.i.map(ne=>`${ne}-inverse`),ye=["success","processing","error","default","warning"];function W(ne){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,d.Z)(Ee),(0,d.Z)(ge.i)).includes(ne):ge.i.includes(ne)}function g(ne){return ye.includes(ne)}},99402:function(Jt,ot,_){"use strict";_.d(ot,{T:function(){return ge},n:function(){return d}});function d(Ee){return["small","middle","large"].includes(Ee)}function ge(Ee){return Ee?typeof Ee=="number"&&!Number.isNaN(Ee):!1}},86013:function(Jt,ot,_){"use strict";var d=_(59301),ge=_(19248);const Ee=ye=>{let W;return typeof ye=="object"&&(ye!=null&&ye.clearIcon)?W=ye:ye&&(W={clearIcon:d.createElement(ge.Z,null)}),W};ot.Z=Ee},52838:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return g}});var d=_(37645);function ge(ne,J,o,X){if(X===!1)return{adjustX:!1,adjustY:!1};const U=X&&typeof X=="object"?X:{},S={};switch(ne){case"top":case"bottom":S.shiftX=J.arrowOffsetHorizontal*2+o,S.shiftY=!0,S.adjustY=!0;break;case"left":case"right":S.shiftY=J.arrowOffsetVertical*2+o,S.shiftX=!0,S.adjustX=!0;break}const w=Object.assign(Object.assign({},S),U);return w.shiftX||(w.adjustX=!0),w.shiftY||(w.adjustY=!0),w}const Ee={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"]}},ye={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"]}},W=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function g(ne){const{arrowWidth:J,autoAdjustOverflow:o,arrowPointAtCenter:X,offset:U,borderRadius:S,visibleFirst:w}=ne,A=J/2,I={};return Object.keys(Ee).forEach(q=>{const re=X&&ye[q]||Ee[q],G=Object.assign(Object.assign({},re),{offset:[0,0],dynamicInset:!0});switch(I[q]=G,W.has(q)&&(G.autoArrow=!1),q){case"top":case"topLeft":case"topRight":G.offset[1]=-A-U;break;case"bottom":case"bottomLeft":case"bottomRight":G.offset[1]=A+U;break;case"left":case"leftTop":case"leftBottom":G.offset[0]=-A-U;break;case"right":case"rightTop":case"rightBottom":G.offset[0]=A+U;break}const D=(0,d.wZ)({contentRadius:S,limitVerticalRadius:!0});if(X)switch(q){case"topLeft":case"bottomLeft":G.offset[0]=-D.arrowOffsetHorizontal-A;break;case"topRight":case"bottomRight":G.offset[0]=D.arrowOffsetHorizontal+A;break;case"leftTop":case"rightTop":G.offset[1]=-D.arrowOffsetHorizontal*2+A;break;case"leftBottom":case"rightBottom":G.offset[1]=D.arrowOffsetHorizontal*2-A;break}G.overflow=ge(q,D,J,o),w&&(G.htmlRegion="visibleFirst")}),I}},82855:function(Jt,ot,_){"use strict";_.d(ot,{F:function(){return W},Z:function(){return ye}});var d=_(92310),ge=_.n(d);const Ee=null;function ye(g,ne,J){return ge()({[`${g}-status-success`]:ne==="success",[`${g}-status-warning`]:ne==="warning",[`${g}-status-error`]:ne==="error",[`${g}-status-validating`]:ne==="validating",[`${g}-has-feedback`]:J})}const W=(g,ne)=>ne||g},91882:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return Q}});var d=_(59301),ge=_(92310),Ee=_.n(ge),ye=_(11592),W=_(26112),g=_(22703),ne=_(48755),J=_(84105),o=_(19563);const X=P=>{let{children:b}=P;const{getPrefixCls:E}=d.useContext(ne.E_),N=E("breadcrumb");return d.createElement("li",{className:`${N}-separator`,"aria-hidden":"true"},b===""?b:b||"/")};X.__ANT_BREADCRUMB_SEPARATOR=!0;var U=X,S=function(P,b){var E={};for(var N in P)Object.prototype.hasOwnProperty.call(P,N)&&b.indexOf(N)<0&&(E[N]=P[N]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,N=Object.getOwnPropertySymbols(P);ie<N.length;ie++)b.indexOf(N[ie])<0&&Object.prototype.propertyIsEnumerable.call(P,N[ie])&&(E[N[ie]]=P[N[ie]]);return E};function w(P,b){if(P.title===void 0||P.title===null)return null;const E=Object.keys(b).join("|");return typeof P.title=="object"?P.title:String(P.title).replace(new RegExp(`:(${E})`,"g"),(N,ie)=>b[ie]||N)}function A(P,b,E,N){if(E==null)return null;const{className:ie,onClick:Ie}=b,Ze=S(b,["className","onClick"]),me=Object.assign(Object.assign({},(0,W.Z)(Ze,{data:!0,aria:!0})),{onClick:Ie});return N!==void 0?d.createElement("a",Object.assign({},me,{className:Ee()(`${P}-link`,ie),href:N}),E):d.createElement("span",Object.assign({},me,{className:Ee()(`${P}-link`,ie)}),E)}function I(P,b){return(N,ie,Ie,Ze,me)=>{if(b)return b(N,ie,Ie,Ze);const Ce=w(N,ie);return A(P,N,Ce,me)}}var q=function(P,b){var E={};for(var N in P)Object.prototype.hasOwnProperty.call(P,N)&&b.indexOf(N)<0&&(E[N]=P[N]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,N=Object.getOwnPropertySymbols(P);ie<N.length;ie++)b.indexOf(N[ie])<0&&Object.prototype.propertyIsEnumerable.call(P,N[ie])&&(E[N[ie]]=P[N[ie]]);return E};const re=P=>{const{prefixCls:b,separator:E="/",children:N,menu:ie,overlay:Ie,dropdownProps:Ze,href:me}=P,Ke=(Qe=>{if(ie||Ie){const Ge=Object.assign({},Ze);if(ie){const wt=ie||{},{items:Ue}=wt,bt=q(wt,["items"]);Ge.menu=Object.assign(Object.assign({},bt),{items:Ue==null?void 0:Ue.map((Le,lt)=>{var{key:Re,title:Te,label:pe,path:We}=Le,De=q(Le,["key","title","label","path"]);let Se=pe!=null?pe:Te;return We&&(Se=d.createElement("a",{href:`${me}${We}`},Se)),Object.assign(Object.assign({},De),{key:Re!=null?Re:lt,label:Se})})})}else Ie&&(Ge.overlay=Ie);return d.createElement(o.Z,Object.assign({placement:"bottom"},Ge),d.createElement("span",{className:`${b}-overlay-link`},Qe,d.createElement(J.Z,null)))}return Qe})(N);return Ke!=null?d.createElement(d.Fragment,null,d.createElement("li",null,Ke),E&&d.createElement(U,null,E)):null},G=P=>{const{prefixCls:b,children:E,href:N}=P,ie=q(P,["prefixCls","children","href"]),{getPrefixCls:Ie}=d.useContext(ne.E_),Ze=Ie("breadcrumb",b);return d.createElement(re,Object.assign({},ie,{prefixCls:Ze}),A(Ze,ie,E,N))};G.__ANT_BREADCRUMB_ITEM=!0;var D=G,H=_(36237),$=_(63356),z=_(16931),de=_(51636);const we=P=>{const{componentCls:b,iconCls:E,calc:N}=P;return{[b]:Object.assign(Object.assign({},(0,$.Wf)(P)),{color:P.itemColor,fontSize:P.fontSize,[E]:{fontSize:P.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:P.linkColor,transition:`color ${P.motionDurationMid}`,padding:`0 ${(0,H.unit)(P.paddingXXS)}`,borderRadius:P.borderRadiusSM,height:P.fontHeight,display:"inline-block",marginInline:N(P.marginXXS).mul(-1).equal(),"&:hover":{color:P.linkHoverColor,backgroundColor:P.colorBgTextHover}},(0,$.Qy)(P)),"li:last-child":{color:P.lastItemColor},[`${b}-separator`]:{marginInline:P.separatorMargin,color:P.separatorColor},[`${b}-link`]:{[`
|
|
> ${E} + span,
|
|
> ${E} + a
|
|
`]:{marginInlineStart:P.marginXXS}},[`${b}-overlay-link`]:{borderRadius:P.borderRadiusSM,height:P.fontHeight,display:"inline-block",padding:`0 ${(0,H.unit)(P.paddingXXS)}`,marginInline:N(P.marginXXS).mul(-1).equal(),[`> ${E}`]:{marginInlineStart:P.marginXXS,fontSize:P.fontSizeIcon},"&:hover":{color:P.linkHoverColor,backgroundColor:P.colorBgTextHover,a:{color:P.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${P.componentCls}-rtl`]:{direction:"rtl"}})}},ce=P=>({itemColor:P.colorTextDescription,lastItemColor:P.colorText,iconFontSize:P.fontSize,linkColor:P.colorTextDescription,linkHoverColor:P.colorText,separatorColor:P.colorTextDescription,separatorMargin:P.marginXS});var Oe=(0,z.I$)("Breadcrumb",P=>{const b=(0,de.mergeToken)(P,{});return we(b)},ce),Fe=function(P,b){var E={};for(var N in P)Object.prototype.hasOwnProperty.call(P,N)&&b.indexOf(N)<0&&(E[N]=P[N]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,N=Object.getOwnPropertySymbols(P);ie<N.length;ie++)b.indexOf(N[ie])<0&&Object.prototype.propertyIsEnumerable.call(P,N[ie])&&(E[N[ie]]=P[N[ie]]);return E};function Ne(P){const{breadcrumbName:b,children:E}=P,N=Fe(P,["breadcrumbName","children"]),ie=Object.assign({title:b},N);return E&&(ie.menu={items:E.map(Ie=>{var{breadcrumbName:Ze}=Ie,me=Fe(Ie,["breadcrumbName"]);return Object.assign(Object.assign({},me),{title:Ze})})}),ie}function Ve(P,b){return(0,d.useMemo)(()=>P||(b?b.map(Ne):null),[P,b])}var K=function(P,b){var E={};for(var N in P)Object.prototype.hasOwnProperty.call(P,N)&&b.indexOf(N)<0&&(E[N]=P[N]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,N=Object.getOwnPropertySymbols(P);ie<N.length;ie++)b.indexOf(N[ie])<0&&Object.prototype.propertyIsEnumerable.call(P,N[ie])&&(E[N[ie]]=P[N[ie]]);return E};const B=(P,b)=>{if(b===void 0)return b;let E=(b||"").replace(/^\//,"");return Object.keys(P).forEach(N=>{E=E.replace(`:${N}`,P[N])}),E},L=P=>{const{prefixCls:b,separator:E="/",style:N,className:ie,rootClassName:Ie,routes:Ze,items:me,children:Ce,itemRender:Ke,params:Qe={}}=P,Ge=K(P,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:wt,direction:Ue,breadcrumb:bt}=d.useContext(ne.E_);let Le;const lt=wt("breadcrumb",b),[Re,Te,pe]=Oe(lt),We=Ve(me,Ze),De=I(lt,Ke);if(We&&We.length>0){const fe=[],ve=me||Ze;Le=We.map((Be,qe)=>{const{path:at,key:ct,type:mt,menu:dt,overlay:gt,onClick:Lt,className:St,separator:Ct,dropdownProps:nt}=Be,vt=B(Qe,at);vt!==void 0&&fe.push(vt);const pt=ct!=null?ct:qe;if(mt==="separator")return d.createElement(U,{key:pt},Ct);const be={},Je=qe===We.length-1;dt?be.menu=dt:gt&&(be.overlay=gt);let{href:x}=Be;return fe.length&&vt!==void 0&&(x=`#/${fe.join("/")}`),d.createElement(re,Object.assign({key:pt},be,(0,W.Z)(Be,{data:!0,aria:!0}),{className:St,dropdownProps:nt,href:x,separator:Je?"":E,onClick:Lt,prefixCls:lt}),De(Be,Qe,ve,fe,x))})}else if(Ce){const fe=(0,ye.Z)(Ce).length;Le=(0,ye.Z)(Ce).map((ve,Be)=>{if(!ve)return ve;const qe=Be===fe-1;return(0,g.Tm)(ve,{separator:qe?"":E,key:Be})})}const Se=Ee()(lt,bt==null?void 0:bt.className,{[`${lt}-rtl`]:Ue==="rtl"},ie,Ie,Te,pe),k=Object.assign(Object.assign({},bt==null?void 0:bt.style),N);return Re(d.createElement("nav",Object.assign({className:Se,style:k},Ge),d.createElement("ol",null,Le)))};L.Item=D,L.Separator=U;var Y=L,Q=Y},62673:function(Jt,ot,_){"use strict";_.d(ot,{default:function(){return Oe}});var d=_(59301),ge=_(92310),Ee=_.n(ge),ye=_(16632),W=_(8654),g=_(12919),ne=_(63872),J=_(48755),o=_(2171),X=_(83397),U=_(56553),w=d.createContext(null),A=_(36170),I=_(74632),q=function(Fe,Ne){var Ve={};for(var K in Fe)Object.prototype.hasOwnProperty.call(Fe,K)&&Ne.indexOf(K)<0&&(Ve[K]=Fe[K]);if(Fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var B=0,K=Object.getOwnPropertySymbols(Fe);B<K.length;B++)Ne.indexOf(K[B])<0&&Object.prototype.propertyIsEnumerable.call(Fe,K[B])&&(Ve[K[B]]=Fe[K[B]]);return Ve};const re=(Fe,Ne)=>{var Ve;const{prefixCls:K,className:B,rootClassName:L,children:Y,indeterminate:Q=!1,style:P,onMouseEnter:b,onMouseLeave:E,skipGroup:N=!1,disabled:ie}=Fe,Ie=q(Fe,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Ze,direction:me,checkbox:Ce}=d.useContext(J.E_),Ke=d.useContext(w),{isFormItemInput:Qe}=d.useContext(U.aM),Ge=d.useContext(o.Z),wt=(Ve=(Ke==null?void 0:Ke.disabled)||ie)!==null&&Ve!==void 0?Ve:Ge,Ue=d.useRef(Ie.value),bt=d.useRef(null),Le=(0,W.sQ)(Ne,bt);d.useEffect(()=>{Ke==null||Ke.registerValue(Ie.value)},[]),d.useEffect(()=>{if(!N)return Ie.value!==Ue.current&&(Ke==null||Ke.cancelValue(Ue.current),Ke==null||Ke.registerValue(Ie.value),Ue.current=Ie.value),()=>Ke==null?void 0:Ke.cancelValue(Ie.value)},[Ie.value]),d.useEffect(()=>{var Be;!((Be=bt.current)===null||Be===void 0)&&Be.input&&(bt.current.input.indeterminate=Q)},[Q]);const lt=Ze("checkbox",K),Re=(0,X.Z)(lt),[Te,pe,We]=(0,A.ZP)(lt,Re),De=Object.assign({},Ie);Ke&&!N&&(De.onChange=function(){Ie.onChange&&Ie.onChange.apply(Ie,arguments),Ke.toggleOption&&Ke.toggleOption({label:Y,value:Ie.value})},De.name=Ke.name,De.checked=Ke.value.includes(Ie.value));const Se=Ee()(`${lt}-wrapper`,{[`${lt}-rtl`]:me==="rtl",[`${lt}-wrapper-checked`]:De.checked,[`${lt}-wrapper-disabled`]:wt,[`${lt}-wrapper-in-form-item`]:Qe},Ce==null?void 0:Ce.className,B,L,We,Re,pe),k=Ee()({[`${lt}-indeterminate`]:Q},ne.A,pe),[fe,ve]=(0,I.Z)(De.onClick);return Te(d.createElement(g.Z,{component:"Checkbox",disabled:wt},d.createElement("label",{className:Se,style:Object.assign(Object.assign({},Ce==null?void 0:Ce.style),P),onMouseEnter:b,onMouseLeave:E,onClick:fe},d.createElement(ye.Z,Object.assign({},De,{onClick:ve,prefixCls:lt,className:k,disabled:wt,ref:Le})),Y!==void 0&&d.createElement("span",{className:`${lt}-label`},Y))))};var D=d.forwardRef(re),H=_(77654),$=_(2738),z=function(Fe,Ne){var Ve={};for(var K in Fe)Object.prototype.hasOwnProperty.call(Fe,K)&&Ne.indexOf(K)<0&&(Ve[K]=Fe[K]);if(Fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var B=0,K=Object.getOwnPropertySymbols(Fe);B<K.length;B++)Ne.indexOf(K[B])<0&&Object.prototype.propertyIsEnumerable.call(Fe,K[B])&&(Ve[K[B]]=Fe[K[B]]);return Ve},we=d.forwardRef((Fe,Ne)=>{const{defaultValue:Ve,children:K,options:B=[],prefixCls:L,className:Y,rootClassName:Q,style:P,onChange:b}=Fe,E=z(Fe,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:N,direction:ie}=d.useContext(J.E_),[Ie,Ze]=d.useState(E.value||Ve||[]),[me,Ce]=d.useState([]);d.useEffect(()=>{"value"in E&&Ze(E.value||[])},[E.value]);const Ke=d.useMemo(()=>B.map(k=>typeof k=="string"||typeof k=="number"?{label:k,value:k}:k),[B]),Qe=k=>{Ce(fe=>fe.filter(ve=>ve!==k))},Ge=k=>{Ce(fe=>[].concat((0,H.Z)(fe),[k]))},wt=k=>{const fe=Ie.indexOf(k.value),ve=(0,H.Z)(Ie);fe===-1?ve.push(k.value):ve.splice(fe,1),"value"in E||Ze(ve),b==null||b(ve.filter(Be=>me.includes(Be)).sort((Be,qe)=>{const at=Ke.findIndex(mt=>mt.value===Be),ct=Ke.findIndex(mt=>mt.value===qe);return at-ct}))},Ue=N("checkbox",L),bt=`${Ue}-group`,Le=(0,X.Z)(Ue),[lt,Re,Te]=(0,A.ZP)(Ue,Le),pe=(0,$.Z)(E,["value","disabled"]),We=B.length?Ke.map(k=>d.createElement(D,{prefixCls:Ue,key:k.value.toString(),disabled:"disabled"in k?k.disabled:E.disabled,value:k.value,checked:Ie.includes(k.value),onChange:k.onChange,className:`${bt}-item`,style:k.style,title:k.title,id:k.id,required:k.required},k.label)):K,De={toggleOption:wt,value:Ie,disabled:E.disabled,name:E.name,registerValue:Ge,cancelValue:Qe},Se=Ee()(bt,{[`${bt}-rtl`]:ie==="rtl"},Y,Q,Te,Le,Re);return lt(d.createElement("div",Object.assign({className:Se,style:P},pe,{ref:Ne}),d.createElement(w.Provider,{value:De},We)))});const ce=D;ce.Group=we,ce.__ANT_CHECKBOX=!0;var Oe=ce},36170:function(Jt,ot,_){"use strict";_.d(ot,{C2:function(){return g}});var d=_(36237),ge=_(63356),Ee=_(51636),ye=_(16931);const W=ne=>{const{checkboxCls:J}=ne,o=`${J}-wrapper`;return[{[`${J}-group`]:Object.assign(Object.assign({},(0,ge.Wf)(ne)),{display:"inline-flex",flexWrap:"wrap",columnGap:ne.marginXS,[`> ${ne.antCls}-row`]:{flex:1}}),[o]:Object.assign(Object.assign({},(0,ge.Wf)(ne)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${o}`]:{marginInlineStart:0},[`&${o}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[J]:Object.assign(Object.assign({},(0,ge.Wf)(ne)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:ne.borderRadiusSM,alignSelf:"center",[`${J}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${J}-inner`]:Object.assign({},(0,ge.oN)(ne))},[`${J}-inner`]:{boxSizing:"border-box",display:"block",width:ne.checkboxSize,height:ne.checkboxSize,direction:"ltr",backgroundColor:ne.colorBgContainer,border:`${(0,d.unit)(ne.lineWidth)} ${ne.lineType} ${ne.colorBorder}`,borderRadius:ne.borderRadiusSM,borderCollapse:"separate",transition:`all ${ne.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:ne.calc(ne.checkboxSize).div(14).mul(5).equal(),height:ne.calc(ne.checkboxSize).div(14).mul(8).equal(),border:`${(0,d.unit)(ne.lineWidthBold)} solid ${ne.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${ne.motionDurationFast} ${ne.motionEaseInBack}, opacity ${ne.motionDurationFast}`}},"& + span":{paddingInlineStart:ne.paddingXS,paddingInlineEnd:ne.paddingXS}})},{[`
|
|
${o}:not(${o}-disabled),
|
|
${J}:not(${J}-disabled)
|
|
`]:{[`&:hover ${J}-inner`]:{borderColor:ne.colorPrimary}},[`${o}:not(${o}-disabled)`]:{[`&:hover ${J}-checked:not(${J}-disabled) ${J}-inner`]:{backgroundColor:ne.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${J}-checked:not(${J}-disabled):after`]:{borderColor:ne.colorPrimaryHover}}},{[`${J}-checked`]:{[`${J}-inner`]:{backgroundColor:ne.colorPrimary,borderColor:ne.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${ne.motionDurationMid} ${ne.motionEaseOutBack} ${ne.motionDurationFast}`}}},[`
|
|
${o}-checked:not(${o}-disabled),
|
|
${J}-checked:not(${J}-disabled)
|
|
`]:{[`&:hover ${J}-inner`]:{backgroundColor:ne.colorPrimaryHover,borderColor:"transparent"}}},{[J]:{"&-indeterminate":{[`${J}-inner`]:{backgroundColor:`${ne.colorBgContainer} !important`,borderColor:`${ne.colorBorder} !important`,"&:after":{top:"50%",insetInlineStart:"50%",width:ne.calc(ne.fontSizeLG).div(2).equal(),height:ne.calc(ne.fontSizeLG).div(2).equal(),backgroundColor:ne.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${J}-inner`]:{backgroundColor:`${ne.colorBgContainer} !important`,borderColor:`${ne.colorPrimary} !important`}}}},{[`${o}-disabled`]:{cursor:"not-allowed"},[`${J}-disabled`]:{[`&, ${J}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${J}-inner`]:{background:ne.colorBgContainerDisabled,borderColor:ne.colorBorder,"&:after":{borderColor:ne.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:ne.colorTextDisabled},[`&${J}-indeterminate ${J}-inner::after`]:{background:ne.colorTextDisabled}}}]};function g(ne,J){const o=(0,Ee.mergeToken)(J,{checkboxCls:`.${ne}`,checkboxSize:J.controlInteractiveSize});return[W(o)]}ot.ZP=(0,ye.I$)("Checkbox",(ne,J)=>{let{prefixCls:o}=J;return[g(o,ne)]})},74632:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return Ee}});var d=_(59301),ge=_(16089);function Ee(ye){const W=d.useRef(null),g=()=>{ge.Z.cancel(W.current),W.current=null};return[()=>{g(),W.current=(0,ge.Z)(()=>{W.current=null})},o=>{W.current&&(o.stopPropagation(),g()),ye==null||ye(o)}]}},19563:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return Ze}});var d=_(59301),ge=_(33853),Ee=_(38819),ye=_(92310),W=_.n(ye),g=_(96478),ne=_(6089),J=_(18929),o=_(2738),X=_(75030),S=me=>typeof me!="object"&&typeof me!="function"||me===null,w=_(52838),A=_(45915),I=_(22703),q=_(32383),re=_(55743),G=_(48755),D=_(83397),H=_(93041),$=_(78857),z=_(57700),de=_(36237),we=_(63356),ce=_(46e3),Oe=_(93873),Fe=_(34925),Ne=_(37645),Ve=_(36305),K=_(16931),B=_(51636),Y=me=>{const{componentCls:Ce,menuCls:Ke,colorError:Qe,colorTextLightSolid:Ge}=me,wt=`${Ke}-item`;return{[`${Ce}, ${Ce}-menu-submenu`]:{[`${Ke} ${wt}`]:{[`&${wt}-danger:not(${wt}-disabled)`]:{color:Qe,"&:hover":{color:Ge,backgroundColor:Qe}}}}}};const Q=me=>{const{componentCls:Ce,menuCls:Ke,zIndexPopup:Qe,dropdownArrowDistance:Ge,sizePopupArrow:wt,antCls:Ue,iconCls:bt,motionDurationMid:Le,paddingBlock:lt,fontSize:Re,dropdownEdgeChildPadding:Te,colorTextDisabled:pe,fontSizeIcon:We,controlPaddingHorizontal:De,colorBgElevated:Se}=me;return[{[Ce]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Qe,display:"block","&::before":{position:"absolute",insetBlock:me.calc(wt).div(2).sub(Ge).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${Ue}-btn`]:{[`& > ${bt}-down, & > ${Ue}-btn-icon > ${bt}-down`]:{fontSize:We}},[`${Ce}-wrap`]:{position:"relative",[`${Ue}-btn > ${bt}-down`]:{fontSize:We},[`${bt}-down::before`]:{transition:`transform ${Le}`}},[`${Ce}-wrap-open`]:{[`${bt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${Ue}-slide-down-enter${Ue}-slide-down-enter-active${Ce}-placement-bottomLeft,
|
|
&${Ue}-slide-down-appear${Ue}-slide-down-appear-active${Ce}-placement-bottomLeft,
|
|
&${Ue}-slide-down-enter${Ue}-slide-down-enter-active${Ce}-placement-bottom,
|
|
&${Ue}-slide-down-appear${Ue}-slide-down-appear-active${Ce}-placement-bottom,
|
|
&${Ue}-slide-down-enter${Ue}-slide-down-enter-active${Ce}-placement-bottomRight,
|
|
&${Ue}-slide-down-appear${Ue}-slide-down-appear-active${Ce}-placement-bottomRight`]:{animationName:ce.fJ},[`&${Ue}-slide-up-enter${Ue}-slide-up-enter-active${Ce}-placement-topLeft,
|
|
&${Ue}-slide-up-appear${Ue}-slide-up-appear-active${Ce}-placement-topLeft,
|
|
&${Ue}-slide-up-enter${Ue}-slide-up-enter-active${Ce}-placement-top,
|
|
&${Ue}-slide-up-appear${Ue}-slide-up-appear-active${Ce}-placement-top,
|
|
&${Ue}-slide-up-enter${Ue}-slide-up-enter-active${Ce}-placement-topRight,
|
|
&${Ue}-slide-up-appear${Ue}-slide-up-appear-active${Ce}-placement-topRight`]:{animationName:ce.Qt},[`&${Ue}-slide-down-leave${Ue}-slide-down-leave-active${Ce}-placement-bottomLeft,
|
|
&${Ue}-slide-down-leave${Ue}-slide-down-leave-active${Ce}-placement-bottom,
|
|
&${Ue}-slide-down-leave${Ue}-slide-down-leave-active${Ce}-placement-bottomRight`]:{animationName:ce.Uw},[`&${Ue}-slide-up-leave${Ue}-slide-up-leave-active${Ce}-placement-topLeft,
|
|
&${Ue}-slide-up-leave${Ue}-slide-up-leave-active${Ce}-placement-top,
|
|
&${Ue}-slide-up-leave${Ue}-slide-up-leave-active${Ce}-placement-topRight`]:{animationName:ce.ly}}},(0,Ne.ZP)(me,Se,{arrowPlacement:{top:!0,bottom:!0}}),{[`${Ce} ${Ke}`]:{position:"relative",margin:0},[`${Ke}-submenu-popup`]:{position:"absolute",zIndex:Qe,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${Ce}, ${Ce}-menu-submenu`]:Object.assign(Object.assign({},(0,we.Wf)(me)),{[Ke]:Object.assign(Object.assign({padding:Te,listStyleType:"none",backgroundColor:Se,backgroundClip:"padding-box",borderRadius:me.borderRadiusLG,outline:"none",boxShadow:me.boxShadowSecondary},(0,we.Qy)(me)),{"&:empty":{padding:0,boxShadow:"none"},[`${Ke}-item-group-title`]:{padding:`${(0,de.unit)(lt)} ${(0,de.unit)(De)}`,color:me.colorTextDescription,transition:`all ${Le}`},[`${Ke}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ke}-item-icon`]:{minWidth:Re,marginInlineEnd:me.marginXS,fontSize:me.fontSizeSM},[`${Ke}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${Le}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${Ke}-item-extra`]:{paddingInlineStart:me.padding,marginInlineStart:"auto",fontSize:me.fontSizeSM,color:me.colorTextDescription}},[`${Ke}-item, ${Ke}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${(0,de.unit)(lt)} ${(0,de.unit)(De)}`,color:me.colorText,fontWeight:"normal",fontSize:Re,lineHeight:me.lineHeight,cursor:"pointer",transition:`all ${Le}`,borderRadius:me.borderRadiusSM,"&:hover, &-active":{backgroundColor:me.controlItemBgHover}},(0,we.Qy)(me)),{"&-selected":{color:me.colorPrimary,backgroundColor:me.controlItemBgActive,"&:hover, &-active":{backgroundColor:me.controlItemBgActiveHover}},"&-disabled":{color:pe,cursor:"not-allowed","&:hover":{color:pe,backgroundColor:Se,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${(0,de.unit)(me.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:me.colorSplit},[`${Ce}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:me.paddingXS,[`${Ce}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:me.colorTextDescription,fontSize:We,fontStyle:"normal"}}}),[`${Ke}-item-group-list`]:{margin:`0 ${(0,de.unit)(me.marginXS)}`,padding:0,listStyle:"none"},[`${Ke}-submenu-title`]:{paddingInlineEnd:me.calc(De).add(me.fontSizeSM).equal()},[`${Ke}-submenu-vertical`]:{position:"relative"},[`${Ke}-submenu${Ke}-submenu-disabled ${Ce}-menu-submenu-title`]:{[`&, ${Ce}-menu-submenu-arrow-icon`]:{color:pe,backgroundColor:Se,cursor:"not-allowed"}},[`${Ke}-submenu-selected ${Ce}-menu-submenu-title`]:{color:me.colorPrimary}})})},[(0,ce.oN)(me,"slide-up"),(0,ce.oN)(me,"slide-down"),(0,Oe.Fm)(me,"move-up"),(0,Oe.Fm)(me,"move-down"),(0,Fe._y)(me,"zoom-big")]]},P=me=>Object.assign(Object.assign({zIndexPopup:me.zIndexPopupBase+50,paddingBlock:(me.controlHeight-me.fontSize*me.lineHeight)/2},(0,Ne.wZ)({contentRadius:me.borderRadiusLG,limitVerticalRadius:!0})),(0,Ve.w)(me));var b=(0,K.I$)("Dropdown",me=>{const{marginXXS:Ce,sizePopupArrow:Ke,paddingXXS:Qe,componentCls:Ge}=me,wt=(0,B.mergeToken)(me,{menuCls:`${Ge}-menu`,dropdownArrowDistance:me.calc(Ke).div(2).add(Ce).equal(),dropdownEdgeChildPadding:Qe});return[Q(wt),Y(wt)]},P,{resetStyle:!1});const E=null,N=me=>{var Ce;const{menu:Ke,arrow:Qe,prefixCls:Ge,children:wt,trigger:Ue,disabled:bt,dropdownRender:Le,getPopupContainer:lt,overlayClassName:Re,rootClassName:Te,overlayStyle:pe,open:We,onOpenChange:De,visible:Se,onVisibleChange:k,mouseEnterDelay:fe=.15,mouseLeaveDelay:ve=.1,autoAdjustOverflow:Be=!0,placement:qe="",overlay:at,transitionName:ct}=me,{getPopupContainer:mt,getPrefixCls:dt,direction:gt,dropdown:Lt}=d.useContext(G.E_),St=(0,q.ln)("Dropdown"),Ct=d.useMemo(()=>{const it=dt();return ct!==void 0?ct:qe.includes("top")?`${it}-slide-down`:`${it}-slide-up`},[dt,qe,ct]),nt=d.useMemo(()=>qe?qe.includes("Center")?qe.slice(0,qe.indexOf("Center")):qe:gt==="rtl"?"bottomRight":"bottomLeft",[qe,gt]),vt=dt("dropdown",Ge),pt=(0,D.Z)(vt),[be,Je,x]=b(vt,pt),[,T]=(0,z.ZP)(),$e=d.Children.only(S(wt)?d.createElement("span",null,wt):wt),j=(0,I.Tm)($e,{className:W()(`${vt}-trigger`,{[`${vt}-rtl`]:gt==="rtl"},$e.props.className),disabled:(Ce=$e.props.disabled)!==null&&Ce!==void 0?Ce:bt}),ae=bt?[]:Ue,xt=!!(ae!=null&&ae.includes("contextMenu")),[Ae,Me]=(0,J.Z)(!1,{value:We!=null?We:Se}),Xe=(0,ne.Z)(it=>{De==null||De(it,{source:"trigger"}),k==null||k(it),Me(it)}),ee=W()(Re,Te,Je,x,pt,Lt==null?void 0:Lt.className,{[`${vt}-rtl`]:gt==="rtl"}),oe=(0,w.Z)({arrowPointAtCenter:typeof Qe=="object"&&Qe.pointAtCenter,autoAdjustOverflow:Be,offset:T.marginXXS,arrowWidth:Qe?T.sizePopupArrow:0,borderRadius:T.borderRadius}),xe=d.useCallback(()=>{Ke!=null&&Ke.selectable&&(Ke!=null&&Ke.multiple)||(De==null||De(!1,{source:"menu"}),Me(!1))},[Ke==null?void 0:Ke.selectable,Ke==null?void 0:Ke.multiple]),ze=()=>{let it;return Ke!=null&&Ke.items?it=d.createElement(H.default,Object.assign({},Ke)):typeof at=="function"?it=at():it=at,Le&&(it=Le(it)),it=d.Children.only(typeof it=="string"?d.createElement("span",null,it):it),d.createElement($.J,{prefixCls:`${vt}-menu`,rootClassName:W()(x,pt),expandIcon:d.createElement("span",{className:`${vt}-menu-submenu-arrow`},gt==="rtl"?d.createElement(ge.Z,{className:`${vt}-menu-submenu-arrow-icon`}):d.createElement(Ee.Z,{className:`${vt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:xe,validator:Ot=>{let{mode:Ut}=Ot}},it)},[F,tt]=(0,X.Cn)("Dropdown",pe==null?void 0:pe.zIndex);let se=d.createElement(g.Z,Object.assign({alignPoint:xt},(0,o.Z)(me,["rootClassName"]),{mouseEnterDelay:fe,mouseLeaveDelay:ve,visible:Ae,builtinPlacements:oe,arrow:!!Qe,overlayClassName:ee,prefixCls:vt,getPopupContainer:lt||mt,transitionName:Ct,trigger:ae,overlay:ze,placement:nt,onVisibleChange:Xe,overlayStyle:Object.assign(Object.assign(Object.assign({},Lt==null?void 0:Lt.style),pe),{zIndex:F})}),j);return F&&(se=d.createElement(re.Z.Provider,{value:tt},se)),be(se)},ie=(0,A.Z)(N,"align",void 0,"dropdown",me=>me),Ie=me=>d.createElement(ie,Object.assign({},me),d.createElement("span",null));N._InternalPanelDoNotUseOrYouWillBeFired=Ie;var Ze=N},75727:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return A}});var d=_(19563),ge=_(59301),Ee=_(18785),ye=_(92310),W=_.n(ye),g=_(7939),ne=_(48755),J=_(44104),o=_(70045),X=function(I,q){var re={};for(var G in I)Object.prototype.hasOwnProperty.call(I,G)&&q.indexOf(G)<0&&(re[G]=I[G]);if(I!=null&&typeof Object.getOwnPropertySymbols=="function")for(var D=0,G=Object.getOwnPropertySymbols(I);D<G.length;D++)q.indexOf(G[D])<0&&Object.prototype.propertyIsEnumerable.call(I,G[D])&&(re[G[D]]=I[G[D]]);return re};const U=I=>{const{getPopupContainer:q,getPrefixCls:re,direction:G}=ge.useContext(ne.E_),{prefixCls:D,type:H="default",danger:$,disabled:z,loading:de,onClick:we,htmlType:ce,children:Oe,className:Fe,menu:Ne,arrow:Ve,autoFocus:K,overlay:B,trigger:L,align:Y,open:Q,onOpenChange:P,placement:b,getPopupContainer:E,href:N,icon:ie=ge.createElement(Ee.Z,null),title:Ie,buttonsRender:Ze=fe=>fe,mouseEnterDelay:me,mouseLeaveDelay:Ce,overlayClassName:Ke,overlayStyle:Qe,destroyPopupOnHide:Ge,dropdownRender:wt}=I,Ue=X(I,["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"]),bt=re("dropdown",D),Le=`${bt}-button`,lt={menu:Ne,arrow:Ve,autoFocus:K,align:Y,disabled:z,trigger:z?[]:L,onOpenChange:P,getPopupContainer:E||q,mouseEnterDelay:me,mouseLeaveDelay:Ce,overlayClassName:Ke,overlayStyle:Qe,destroyPopupOnHide:Ge,dropdownRender:wt},{compactSize:Re,compactItemClassnames:Te}=(0,o.ri)(bt,G),pe=W()(Le,Te,Fe);"overlay"in I&&(lt.overlay=B),"open"in I&&(lt.open=Q),"placement"in I?lt.placement=b:lt.placement=G==="rtl"?"bottomLeft":"bottomRight";const We=ge.createElement(g.ZP,{type:H,danger:$,disabled:z,loading:de,onClick:we,htmlType:ce,href:N,title:Ie},Oe),De=ge.createElement(g.ZP,{type:H,danger:$,icon:ie}),[Se,k]=Ze([We,De]);return ge.createElement(J.Z.Compact,Object.assign({className:pe,size:Re,block:!0},Ue),Se,ge.createElement(d.Z,Object.assign({},lt),k))};U.__ANT_BUTTON=!0;var S=U;const w=d.Z;w.Button=S;var A=w},24971:function(Jt,ot,_){"use strict";var d=_(59301),ge=_(56553),Ee=_(48755);const ye=function(W,g){let ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var J,o;const{variant:X,[W]:U}=d.useContext(Ee.E_),S=d.useContext(ge.pg),w=U==null?void 0:U.variant;let A;typeof g!="undefined"?A=g:ne===!1?A="borderless":A=(o=(J=S!=null?S:w)!==null&&J!==void 0?J:X)!==null&&o!==void 0?o:"outlined";const I=Ee.tr.includes(A);return[A,I]};ot.Z=ye},49397:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return $}});var d=_(59301),ge=_(92310),Ee=_.n(ge),ye=_(36901),W=_(8654),g=_(62487),ne=_(86013),J=_(82855),o=_(48755),X=_(2171),U=_(83397),S=_(31756),w=_(56553),A=_(24971),I=_(70045),q=_(23826),re=_(53075);function G(z){return!!(z.prefix||z.suffix||z.allowClear||z.showCount)}var D=function(z,de){var we={};for(var ce in z)Object.prototype.hasOwnProperty.call(z,ce)&&de.indexOf(ce)<0&&(we[ce]=z[ce]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,ce=Object.getOwnPropertySymbols(z);Oe<ce.length;Oe++)de.indexOf(ce[Oe])<0&&Object.prototype.propertyIsEnumerable.call(z,ce[Oe])&&(we[ce[Oe]]=z[ce[Oe]]);return we},$=(0,d.forwardRef)((z,de)=>{const{prefixCls:we,bordered:ce=!0,status:Oe,size:Fe,disabled:Ne,onBlur:Ve,onFocus:K,suffix:B,allowClear:L,addonAfter:Y,addonBefore:Q,className:P,style:b,styles:E,rootClassName:N,onChange:ie,classNames:Ie,variant:Ze}=z,me=D(z,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:Ce,direction:Ke,allowClear:Qe,autoComplete:Ge,className:wt,style:Ue,classNames:bt,styles:Le}=(0,o.dj)("input"),lt=Ce("input",we),Re=(0,d.useRef)(null),Te=(0,U.Z)(lt),[pe,We,De]=(0,re.TI)(lt,N),[Se]=(0,re.ZP)(lt,Te),{compactSize:k,compactItemClassnames:fe}=(0,I.ri)(lt,Ke),ve=(0,S.Z)(T=>{var $e;return($e=Fe!=null?Fe:k)!==null&&$e!==void 0?$e:T}),Be=d.useContext(X.Z),qe=Ne!=null?Ne:Be,{status:at,hasFeedback:ct,feedbackIcon:mt}=(0,d.useContext)(w.aM),dt=(0,J.F)(at,Oe),gt=G(z)||!!ct,Lt=(0,d.useRef)(gt),St=(0,q.Z)(Re,!0),Ct=T=>{St(),Ve==null||Ve(T)},nt=T=>{St(),K==null||K(T)},vt=T=>{St(),ie==null||ie(T)},pt=(ct||B)&&d.createElement(d.Fragment,null,B,ct&&mt),be=(0,ne.Z)(L!=null?L:Qe),[Je,x]=(0,A.Z)("input",Ze,ce);return pe(Se(d.createElement(ye.default,Object.assign({ref:(0,W.sQ)(de,Re),prefixCls:lt,autoComplete:Ge},me,{disabled:qe,onBlur:Ct,onFocus:nt,style:Object.assign(Object.assign({},Ue),b),styles:Object.assign(Object.assign({},Le),E),suffix:pt,allowClear:be,className:Ee()(P,N,De,Te,fe,wt),onChange:vt,addonBefore:Q&&d.createElement(g.Z,{form:!0,space:!0},Q),addonAfter:Y&&d.createElement(g.Z,{form:!0,space:!0},Y),classNames:Object.assign(Object.assign(Object.assign({},Ie),bt),{input:Ee()({[`${lt}-sm`]:ve==="small",[`${lt}-lg`]:ve==="large",[`${lt}-rtl`]:Ke==="rtl"},Ie==null?void 0:Ie.input,bt.input,We),variant:Ee()({[`${lt}-${Je}`]:x},(0,J.Z)(lt,dt)),affixWrapper:Ee()({[`${lt}-affix-wrapper-sm`]:ve==="small",[`${lt}-affix-wrapper-lg`]:ve==="large",[`${lt}-affix-wrapper-rtl`]:Ke==="rtl"},We),wrapper:Ee()({[`${lt}-group-rtl`]:Ke==="rtl"},We),groupWrapper:Ee()({[`${lt}-group-wrapper-sm`]:ve==="small",[`${lt}-group-wrapper-lg`]:ve==="large",[`${lt}-group-wrapper-rtl`]:Ke==="rtl",[`${lt}-group-wrapper-${Je}`]:x},(0,J.Z)(`${lt}-group-wrapper`,dt,ct),We)})}))))})},79809:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return de}});var d=_(59301),ge=_(92310),Ee=_.n(ge),ye=_(22711),W=_(86013),g=_(82855),ne=_(48755),J=_(2171),o=_(83397),X=_(31756),U=_(56553),S=_(24971),w=_(70045),A=_(30292),I=_(53075),q=_(16931),re=_(51636),G=_(64910);const D=we=>{const{componentCls:ce,paddingLG:Oe}=we,Fe=`${ce}-textarea`;return{[`textarea${ce}`]:{maxWidth:"100%",height:"auto",minHeight:we.controlHeight,lineHeight:we.lineHeight,verticalAlign:"bottom",transition:`all ${we.motionDurationSlow}`,resize:"vertical",[`&${ce}-mouse-active`]:{transition:`all ${we.motionDurationSlow}, height 0s, width 0s`}},[`${ce}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[Fe]:{position:"relative","&-show-count":{[`> ${ce}`]:{height:"100%"},[`${ce}-data-count`]:{position:"absolute",bottom:we.calc(we.fontSize).mul(we.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:we.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
&-allow-clear > ${ce},
|
|
&-affix-wrapper${Fe}-has-feedback ${ce}
|
|
`]:{paddingInlineEnd:Oe},[`&-affix-wrapper${ce}-affix-wrapper`]:{padding:0,[`> textarea${ce}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:we.calc(we.controlHeight).sub(we.calc(we.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${ce}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${ce}-clear-icon`]:{position:"absolute",insetInlineEnd:we.paddingInline,insetBlockStart:we.paddingXS},[`${Fe}-suffix`]:{position:"absolute",top:0,insetInlineEnd:we.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${ce}-affix-wrapper-sm`]:{[`${ce}-suffix`]:{[`${ce}-clear-icon`]:{insetInlineEnd:we.paddingInlineSM}}}}}};var H=(0,q.I$)(["Input","TextArea"],we=>{const ce=(0,re.mergeToken)(we,(0,G.e)(we));return[D(ce)]},G.T,{resetFont:!1}),$=function(we,ce){var Oe={};for(var Fe in we)Object.prototype.hasOwnProperty.call(we,Fe)&&ce.indexOf(Fe)<0&&(Oe[Fe]=we[Fe]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ne=0,Fe=Object.getOwnPropertySymbols(we);Ne<Fe.length;Ne++)ce.indexOf(Fe[Ne])<0&&Object.prototype.propertyIsEnumerable.call(we,Fe[Ne])&&(Oe[Fe[Ne]]=we[Fe[Ne]]);return Oe},de=(0,d.forwardRef)((we,ce)=>{var Oe;const{prefixCls:Fe,bordered:Ne=!0,size:Ve,disabled:K,status:B,allowClear:L,classNames:Y,rootClassName:Q,className:P,style:b,styles:E,variant:N,showCount:ie,onMouseDown:Ie,onResize:Ze}=we,me=$(we,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:Ce,direction:Ke,allowClear:Qe,autoComplete:Ge,className:wt,style:Ue,classNames:bt,styles:Le}=(0,ne.dj)("textArea"),lt=d.useContext(J.Z),Re=K!=null?K:lt,{status:Te,hasFeedback:pe,feedbackIcon:We}=d.useContext(U.aM),De=(0,g.F)(Te,B),Se=d.useRef(null);d.useImperativeHandle(ce,()=>{var x;return{resizableTextArea:(x=Se.current)===null||x===void 0?void 0:x.resizableTextArea,focus:T=>{var $e,j;(0,A.nH)((j=($e=Se.current)===null||$e===void 0?void 0:$e.resizableTextArea)===null||j===void 0?void 0:j.textArea,T)},blur:()=>{var T;return(T=Se.current)===null||T===void 0?void 0:T.blur()}}});const k=Ce("input",Fe),fe=(0,o.Z)(k),[ve,Be,qe]=(0,I.TI)(k,Q),[at]=H(k,fe),{compactSize:ct,compactItemClassnames:mt}=(0,w.ri)(k,Ke),dt=(0,X.Z)(x=>{var T;return(T=Ve!=null?Ve:ct)!==null&&T!==void 0?T:x}),[gt,Lt]=(0,S.Z)("textArea",N,Ne),St=(0,W.Z)(L!=null?L:Qe),[Ct,nt]=d.useState(!1),[vt,pt]=d.useState(!1),be=x=>{nt(!0),Ie==null||Ie(x);const T=()=>{nt(!1),document.removeEventListener("mouseup",T)};document.addEventListener("mouseup",T)},Je=x=>{var T,$e;if(Ze==null||Ze(x),Ct&&typeof getComputedStyle=="function"){const j=($e=(T=Se.current)===null||T===void 0?void 0:T.nativeElement)===null||$e===void 0?void 0:$e.querySelector("textarea");j&&getComputedStyle(j).resize==="both"&&pt(!0)}};return ve(at(d.createElement(ye.default,Object.assign({autoComplete:Ge},me,{style:Object.assign(Object.assign({},Ue),b),styles:Object.assign(Object.assign({},Le),E),disabled:Re,allowClear:St,className:Ee()(qe,fe,P,Q,mt,wt,vt&&`${k}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},Y),bt),{textarea:Ee()({[`${k}-sm`]:dt==="small",[`${k}-lg`]:dt==="large"},Be,Y==null?void 0:Y.textarea,bt.textarea,Ct&&`${k}-mouse-active`),variant:Ee()({[`${k}-${gt}`]:Lt},(0,g.Z)(k,De)),affixWrapper:Ee()(`${k}-textarea-affix-wrapper`,{[`${k}-affix-wrapper-rtl`]:Ke==="rtl",[`${k}-affix-wrapper-sm`]:dt==="small",[`${k}-affix-wrapper-lg`]:dt==="large",[`${k}-textarea-show-count`]:ie||((Oe=we.count)===null||Oe===void 0?void 0:Oe.show)},Be)}),prefixCls:k,suffix:pe&&d.createElement("span",{className:`${k}-textarea-suffix`},We),showCount:ie,ref:Se,onResize:Je,onMouseDown:be}))))})},23826:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return ge}});var d=_(59301);function ge(Ee,ye){const W=(0,d.useRef)([]),g=()=>{W.current.push(setTimeout(()=>{var ne,J,o,X;!((ne=Ee.current)===null||ne===void 0)&&ne.input&&((J=Ee.current)===null||J===void 0?void 0:J.input.getAttribute("type"))==="password"&&(!((o=Ee.current)===null||o===void 0)&&o.input.hasAttribute("value"))&&((X=Ee.current)===null||X===void 0||X.input.removeAttribute("value"))}))};return(0,d.useEffect)(()=>(ye&&g(),()=>W.current.forEach(ne=>{ne&&clearTimeout(ne)})),[]),g}},37568:function(Jt,ot,_){"use strict";_.d(ot,{default:function(){return bt}});var d=_(59301),ge=_(92310),Ee=_.n(ge),ye=_(48755),W=_(56553),g=_(53075),J=Le=>{const{getPrefixCls:lt,direction:Re}=(0,d.useContext)(ye.E_),{prefixCls:Te,className:pe}=Le,We=lt("input-group",Te),De=lt("input"),[Se,k,fe]=(0,g.ZP)(De),ve=Ee()(We,fe,{[`${We}-lg`]:Le.size==="large",[`${We}-sm`]:Le.size==="small",[`${We}-compact`]:Le.compact,[`${We}-rtl`]:Re==="rtl"},k,pe),Be=(0,d.useContext)(W.aM),qe=(0,d.useMemo)(()=>Object.assign(Object.assign({},Be),{isFormItemInput:!1}),[Be]);return Se(d.createElement("span",{className:ve,style:Le.style,onMouseEnter:Le.onMouseEnter,onMouseLeave:Le.onMouseLeave,onFocus:Le.onFocus,onBlur:Le.onBlur},d.createElement(W.aM.Provider,{value:qe},Le.children)))},o=_(49397),X=_(77654),U=_(6089),S=_(26112),w=_(82855),A=_(31756),I=_(16931),q=_(51636),re=_(64910);const G=Le=>{const{componentCls:lt,paddingXS:Re}=Le;return{[lt]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:Re,"&-rtl":{direction:"rtl"},[`${lt}-input`]:{textAlign:"center",paddingInline:Le.paddingXXS},[`&${lt}-sm ${lt}-input`]:{paddingInline:Le.calc(Le.paddingXXS).div(2).equal()},[`&${lt}-lg ${lt}-input`]:{paddingInline:Le.paddingXS}}}};var D=(0,I.I$)(["Input","OTP"],Le=>{const lt=(0,q.mergeToken)(Le,(0,re.e)(Le));return[G(lt)]},re.T),H=_(16089),$=function(Le,lt){var Re={};for(var Te in Le)Object.prototype.hasOwnProperty.call(Le,Te)&<.indexOf(Te)<0&&(Re[Te]=Le[Te]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,Te=Object.getOwnPropertySymbols(Le);pe<Te.length;pe++)lt.indexOf(Te[pe])<0&&Object.prototype.propertyIsEnumerable.call(Le,Te[pe])&&(Re[Te[pe]]=Le[Te[pe]]);return Re},de=d.forwardRef((Le,lt)=>{const{value:Re,onChange:Te,onActiveChange:pe,index:We,mask:De}=Le,Se=$(Le,["value","onChange","onActiveChange","index","mask"]),k=Re&&typeof De=="string"?De:Re,fe=ct=>{Te(We,ct.target.value)},ve=d.useRef(null);d.useImperativeHandle(lt,()=>ve.current);const Be=()=>{(0,H.Z)(()=>{var ct;const mt=(ct=ve.current)===null||ct===void 0?void 0:ct.input;document.activeElement===mt&&mt&&mt.select()})},qe=ct=>{const{key:mt,ctrlKey:dt,metaKey:gt}=ct;mt==="ArrowLeft"?pe(We-1):mt==="ArrowRight"?pe(We+1):mt==="z"&&(dt||gt)&&ct.preventDefault(),Be()},at=ct=>{ct.key==="Backspace"&&!Re&&pe(We-1),Be()};return d.createElement(o.Z,Object.assign({type:De===!0?"password":"text"},Se,{ref:ve,value:k,onInput:fe,onFocus:Be,onKeyDown:qe,onKeyUp:at,onMouseDown:Be,onMouseUp:Be}))}),we=function(Le,lt){var Re={};for(var Te in Le)Object.prototype.hasOwnProperty.call(Le,Te)&<.indexOf(Te)<0&&(Re[Te]=Le[Te]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,Te=Object.getOwnPropertySymbols(Le);pe<Te.length;pe++)lt.indexOf(Te[pe])<0&&Object.prototype.propertyIsEnumerable.call(Le,Te[pe])&&(Re[Te[pe]]=Le[Te[pe]]);return Re};function ce(Le){return(Le||"").split("")}const Oe=Le=>{const{index:lt,prefixCls:Re,separator:Te}=Le,pe=typeof Te=="function"?Te(lt):Te;return pe?d.createElement("span",{className:`${Re}-separator`},pe):null};var Ne=d.forwardRef((Le,lt)=>{const{prefixCls:Re,length:Te=6,size:pe,defaultValue:We,value:De,onChange:Se,formatter:k,separator:fe,variant:ve,disabled:Be,status:qe,autoFocus:at,mask:ct,type:mt,onInput:dt,inputMode:gt}=Le,Lt=we(Le,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:St,direction:Ct}=d.useContext(ye.E_),nt=St("otp",Re),vt=(0,S.Z)(Lt,{aria:!0,data:!0,attr:!0}),[pt,be,Je]=D(nt),x=(0,A.Z)(tt=>pe!=null?pe:tt),T=d.useContext(W.aM),$e=(0,w.F)(T.status,qe),j=d.useMemo(()=>Object.assign(Object.assign({},T),{status:$e,hasFeedback:!1,feedbackIcon:null}),[T,$e]),ae=d.useRef(null),xt=d.useRef({});d.useImperativeHandle(lt,()=>({focus:()=>{var tt;(tt=xt.current[0])===null||tt===void 0||tt.focus()},blur:()=>{var tt;for(let se=0;se<Te;se+=1)(tt=xt.current[se])===null||tt===void 0||tt.blur()},nativeElement:ae.current}));const Ae=tt=>k?k(tt):tt,[Me,Xe]=d.useState(()=>ce(Ae(We||"")));d.useEffect(()=>{De!==void 0&&Xe(ce(De))},[De]);const ee=(0,U.Z)(tt=>{Xe(tt),dt&&dt(tt),Se&&tt.length===Te&&tt.every(se=>se)&&tt.some((se,it)=>Me[it]!==se)&&Se(tt.join(""))}),oe=(0,U.Z)((tt,se)=>{let it=(0,X.Z)(Me);for(let Ut=0;Ut<tt;Ut+=1)it[Ut]||(it[Ut]="");se.length<=1?it[tt]=se:it=it.slice(0,tt).concat(ce(se)),it=it.slice(0,Te);for(let Ut=it.length-1;Ut>=0&&!it[Ut];Ut-=1)it.pop();const Ot=Ae(it.map(Ut=>Ut||" ").join(""));return it=ce(Ot).map((Ut,Ht)=>Ut===" "&&!it[Ht]?it[Ht]:Ut),it}),xe=(tt,se)=>{var it;const Ot=oe(tt,se),Ut=Math.min(tt+se.length,Te-1);Ut!==tt&&Ot[tt]!==void 0&&((it=xt.current[Ut])===null||it===void 0||it.focus()),ee(Ot)},ze=tt=>{var se;(se=xt.current[tt])===null||se===void 0||se.focus()},F={variant:ve,disabled:Be,status:$e,mask:ct,type:mt,inputMode:gt};return pt(d.createElement("div",Object.assign({},vt,{ref:ae,className:Ee()(nt,{[`${nt}-sm`]:x==="small",[`${nt}-lg`]:x==="large",[`${nt}-rtl`]:Ct==="rtl"},Je,be)}),d.createElement(W.aM.Provider,{value:j},Array.from({length:Te}).map((tt,se)=>{const it=`otp-${se}`,Ot=Me[se]||"";return d.createElement(d.Fragment,{key:it},d.createElement(de,Object.assign({ref:Ut=>{xt.current[se]=Ut},index:se,size:x,htmlSize:1,className:`${nt}-input`,onChange:xe,value:Ot,onActiveChange:ze,autoFocus:se===0&&at},F)),se<Te-1&&d.createElement(Oe,{separator:fe,index:se,prefixCls:nt}))}))))}),Ve=_(73331),K=_(15277),B=_(2738),L=_(8654),Y=_(2171),Q=_(23826),P=function(Le,lt){var Re={};for(var Te in Le)Object.prototype.hasOwnProperty.call(Le,Te)&<.indexOf(Te)<0&&(Re[Te]=Le[Te]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,Te=Object.getOwnPropertySymbols(Le);pe<Te.length;pe++)lt.indexOf(Te[pe])<0&&Object.prototype.propertyIsEnumerable.call(Le,Te[pe])&&(Re[Te[pe]]=Le[Te[pe]]);return Re};const b=Le=>Le?d.createElement(K.Z,null):d.createElement(Ve.Z,null),E={click:"onClick",hover:"onMouseOver"};var ie=d.forwardRef((Le,lt)=>{const{disabled:Re,action:Te="click",visibilityToggle:pe=!0,iconRender:We=b}=Le,De=d.useContext(Y.Z),Se=Re!=null?Re:De,k=typeof pe=="object"&&pe.visible!==void 0,[fe,ve]=(0,d.useState)(()=>k?pe.visible:!1),Be=(0,d.useRef)(null);d.useEffect(()=>{k&&ve(pe.visible)},[k,pe]);const qe=(0,Q.Z)(Be),at=()=>{var x;if(Se)return;fe&&qe();const T=!fe;ve(T),typeof pe=="object"&&((x=pe.onVisibleChange)===null||x===void 0||x.call(pe,T))},ct=x=>{const T=E[Te]||"",$e=We(fe),j={[T]:at,className:`${x}-icon`,key:"passwordIcon",onMouseDown:ae=>{ae.preventDefault()},onMouseUp:ae=>{ae.preventDefault()}};return d.cloneElement(d.isValidElement($e)?$e:d.createElement("span",null,$e),j)},{className:mt,prefixCls:dt,inputPrefixCls:gt,size:Lt}=Le,St=P(Le,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Ct}=d.useContext(ye.E_),nt=Ct("input",gt),vt=Ct("input-password",dt),pt=pe&&ct(vt),be=Ee()(vt,mt,{[`${vt}-${Lt}`]:!!Lt}),Je=Object.assign(Object.assign({},(0,B.Z)(St,["suffix","iconRender","visibilityToggle"])),{type:fe?"text":"password",className:be,prefixCls:nt,suffix:pt});return Lt&&(Je.size=Lt),d.createElement(o.Z,Object.assign({ref:(0,L.sQ)(lt,Be)},Je))}),Ie=_(47472),Ze=_(22703),me=_(7939),Ce=_(70045),Ke=function(Le,lt){var Re={};for(var Te in Le)Object.prototype.hasOwnProperty.call(Le,Te)&<.indexOf(Te)<0&&(Re[Te]=Le[Te]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pe=0,Te=Object.getOwnPropertySymbols(Le);pe<Te.length;pe++)lt.indexOf(Te[pe])<0&&Object.prototype.propertyIsEnumerable.call(Le,Te[pe])&&(Re[Te[pe]]=Le[Te[pe]]);return Re},Ge=d.forwardRef((Le,lt)=>{const{prefixCls:Re,inputPrefixCls:Te,className:pe,size:We,suffix:De,enterButton:Se=!1,addonAfter:k,loading:fe,disabled:ve,onSearch:Be,onChange:qe,onCompositionStart:at,onCompositionEnd:ct}=Le,mt=Ke(Le,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:dt,direction:gt}=d.useContext(ye.E_),Lt=d.useRef(!1),St=dt("input-search",Re),Ct=dt("input",Te),{compactSize:nt}=(0,Ce.ri)(St,gt),vt=(0,A.Z)(xe=>{var ze;return(ze=We!=null?We:nt)!==null&&ze!==void 0?ze:xe}),pt=d.useRef(null),be=xe=>{xe!=null&&xe.target&&xe.type==="click"&&Be&&Be(xe.target.value,xe,{source:"clear"}),qe==null||qe(xe)},Je=xe=>{var ze;document.activeElement===((ze=pt.current)===null||ze===void 0?void 0:ze.input)&&xe.preventDefault()},x=xe=>{var ze,F;Be&&Be((F=(ze=pt.current)===null||ze===void 0?void 0:ze.input)===null||F===void 0?void 0:F.value,xe,{source:"input"})},T=xe=>{Lt.current||fe||x(xe)},$e=typeof Se=="boolean"?d.createElement(Ie.Z,null):null,j=`${St}-button`;let ae;const xt=Se||{},Ae=xt.type&&xt.type.__ANT_BUTTON===!0;Ae||xt.type==="button"?ae=(0,Ze.Tm)(xt,Object.assign({onMouseDown:Je,onClick:xe=>{var ze,F;(F=(ze=xt==null?void 0:xt.props)===null||ze===void 0?void 0:ze.onClick)===null||F===void 0||F.call(ze,xe),x(xe)},key:"enterButton"},Ae?{className:j,size:vt}:{})):ae=d.createElement(me.ZP,{className:j,type:Se?"primary":void 0,size:vt,disabled:ve,key:"enterButton",onMouseDown:Je,onClick:x,loading:fe,icon:$e},Se),k&&(ae=[ae,(0,Ze.Tm)(k,{key:"addonAfter"})]);const Me=Ee()(St,{[`${St}-rtl`]:gt==="rtl",[`${St}-${vt}`]:!!vt,[`${St}-with-button`]:!!Se},pe),Xe=Object.assign(Object.assign({},mt),{className:Me,prefixCls:Ct,type:"search"}),ee=xe=>{Lt.current=!0,at==null||at(xe)},oe=xe=>{Lt.current=!1,ct==null||ct(xe)};return d.createElement(o.Z,Object.assign({ref:(0,L.sQ)(pt,lt),onPressEnter:T},Xe,{size:vt,onCompositionStart:ee,onCompositionEnd:oe,addonAfter:ae,suffix:De,onChange:be,disabled:ve}))}),wt=_(79809);const Ue=o.Z;Ue.Group=J,Ue.Search=Ge,Ue.TextArea=wt.Z,Ue.Password=ie,Ue.OTP=Ne;var bt=Ue},53075:function(Jt,ot,_){"use strict";_.d(ot,{TI:function(){return H},ik:function(){return S},nz:function(){return J},s7:function(){return w},x0:function(){return U}});var d=_(36237),ge=_(63356),Ee=_(56119),ye=_(16931),W=_(51636),g=_(64910),ne=_(39082);const J=$=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:$,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),o=$=>({borderColor:$.activeBorderColor,boxShadow:$.activeShadow,outline:0,backgroundColor:$.activeBg}),X=$=>{const{paddingBlockLG:z,lineHeightLG:de,borderRadiusLG:we,paddingInlineLG:ce}=$;return{padding:`${(0,d.unit)(z)} ${(0,d.unit)(ce)}`,fontSize:$.inputFontSizeLG,lineHeight:de,borderRadius:we}},U=$=>({padding:`${(0,d.unit)($.paddingBlockSM)} ${(0,d.unit)($.paddingInlineSM)}`,fontSize:$.inputFontSizeSM,borderRadius:$.borderRadiusSM}),S=$=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,d.unit)($.paddingBlock)} ${(0,d.unit)($.paddingInline)}`,color:$.colorText,fontSize:$.inputFontSize,lineHeight:$.lineHeight,borderRadius:$.borderRadius,transition:`all ${$.motionDurationMid}`},J($.colorTextPlaceholder)),{"&-lg":Object.assign({},X($)),"&-sm":Object.assign({},U($)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),w=$=>{const{componentCls:z,antCls:de}=$;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:$.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${z}, &-lg > ${z}-group-addon`]:Object.assign({},X($)),[`&-sm ${z}, &-sm > ${z}-group-addon`]:Object.assign({},U($)),[`&-lg ${de}-select-single ${de}-select-selector`]:{height:$.controlHeightLG},[`&-sm ${de}-select-single ${de}-select-selector`]:{height:$.controlHeightSM},[`> ${z}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${z}-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,d.unit)($.paddingInline)}`,color:$.colorText,fontWeight:"normal",fontSize:$.inputFontSize,textAlign:"center",borderRadius:$.borderRadius,transition:`all ${$.motionDurationSlow}`,lineHeight:1,[`${de}-select`]:{margin:`${(0,d.unit)($.calc($.paddingBlock).add(1).mul(-1).equal())} ${(0,d.unit)($.calc($.paddingInline).mul(-1).equal())}`,[`&${de}-select-single:not(${de}-select-customize-input):not(${de}-pagination-size-changer)`]:{[`${de}-select-selector`]:{backgroundColor:"inherit",border:`${(0,d.unit)($.lineWidth)} ${$.lineType} transparent`,boxShadow:"none"}}},[`${de}-cascader-picker`]:{margin:`-9px ${(0,d.unit)($.calc($.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${de}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[z]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${z}-search-with-button &`]:{zIndex:0}}},[`> ${z}:first-child, ${z}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${de}-select ${de}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${z}-affix-wrapper`]:{[`&:not(:first-child) ${z}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${z}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${z}:last-child, ${z}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${de}-select ${de}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${z}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${z}-search &`]:{borderStartStartRadius:$.borderRadius,borderEndStartRadius:$.borderRadius}},[`&:not(:first-child), ${z}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${z}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,ge.dF)()),{[`${z}-group-addon, ${z}-group-wrap, > ${z}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:$.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
& > ${z}-affix-wrapper,
|
|
& > ${z}-number-affix-wrapper,
|
|
& > ${de}-picker-range
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:$.calc($.lineWidth).mul(-1).equal(),borderInlineEndWidth:$.lineWidth},[z]:{float:"none"},[`& > ${de}-select > ${de}-select-selector,
|
|
& > ${de}-select-auto-complete ${z},
|
|
& > ${de}-cascader-picker ${z},
|
|
& > ${z}-group-wrapper ${z}`]:{borderInlineEndWidth:$.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${de}-select-focused`]:{zIndex:1},[`& > ${de}-select > ${de}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
& > ${de}-select:first-child > ${de}-select-selector,
|
|
& > ${de}-select-auto-complete:first-child ${z},
|
|
& > ${de}-cascader-picker:first-child ${z}`]:{borderStartStartRadius:$.borderRadius,borderEndStartRadius:$.borderRadius},[`& > *:last-child,
|
|
& > ${de}-select:last-child > ${de}-select-selector,
|
|
& > ${de}-cascader-picker:last-child ${z},
|
|
& > ${de}-cascader-picker-focused:last-child ${z}`]:{borderInlineEndWidth:$.lineWidth,borderStartEndRadius:$.borderRadius,borderEndEndRadius:$.borderRadius},[`& > ${de}-select-auto-complete ${z}`]:{verticalAlign:"top"},[`${z}-group-wrapper + ${z}-group-wrapper`]:{marginInlineStart:$.calc($.lineWidth).mul(-1).equal(),[`${z}-affix-wrapper`]:{borderRadius:0}},[`${z}-group-wrapper:not(:last-child)`]:{[`&${z}-search > ${z}-group`]:{[`& > ${z}-group-addon > ${z}-search-button`]:{borderRadius:0},[`& > ${z}`]:{borderStartStartRadius:$.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:$.borderRadius}}}})}},A=$=>{const{componentCls:z,controlHeightSM:de,lineWidth:we,calc:ce}=$,Fe=ce(de).sub(ce(we).mul(2)).sub(16).div(2).equal();return{[z]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ge.Wf)($)),S($)),(0,ne.qG)($)),(0,ne.H8)($)),(0,ne.Mu)($)),(0,ne.vc)($)),{'&[type="color"]':{height:$.controlHeight,[`&${z}-lg`]:{height:$.controlHeightLG},[`&${z}-sm`]:{height:de,paddingTop:Fe,paddingBottom:Fe}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},I=$=>{const{componentCls:z}=$;return{[`${z}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:$.colorTextQuaternary,fontSize:$.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${$.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:$.colorTextTertiary},"&:active":{color:$.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,d.unit)($.inputAffixPadding)}`}}}},q=$=>{const{componentCls:z,inputAffixPadding:de,colorTextDescription:we,motionDurationSlow:ce,colorIcon:Oe,colorIconHover:Fe,iconCls:Ne}=$,Ve=`${z}-affix-wrapper`,K=`${z}-affix-wrapper-disabled`;return{[Ve]:Object.assign(Object.assign(Object.assign(Object.assign({},S($)),{display:"inline-flex",[`&:not(${z}-disabled):hover`]:{zIndex:1,[`${z}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${z}`]:{padding:0},[`> input${z}, > textarea${z}`]:{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"'},[z]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:$.paddingXS}},"&-show-count-suffix":{color:we},"&-show-count-has-suffix":{marginInlineEnd:$.paddingXXS},"&-prefix":{marginInlineEnd:de},"&-suffix":{marginInlineStart:de}}}),I($)),{[`${Ne}${z}-password-icon`]:{color:Oe,cursor:"pointer",transition:`all ${ce}`,"&:hover":{color:Fe}}}),[`${z}-underlined`]:{borderRadius:0},[K]:{[`${Ne}${z}-password-icon`]:{color:Oe,cursor:"not-allowed","&:hover":{color:Oe}}}}},re=$=>{const{componentCls:z,borderRadiusLG:de,borderRadiusSM:we}=$;return{[`${z}-group`]:Object.assign(Object.assign(Object.assign({},(0,ge.Wf)($)),w($)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${z}-group-addon`]:{borderRadius:de,fontSize:$.inputFontSizeLG}},"&-sm":{[`${z}-group-addon`]:{borderRadius:we}}},(0,ne.ir)($)),(0,ne.S5)($)),{[`&:not(${z}-compact-first-item):not(${z}-compact-last-item)${z}-compact-item`]:{[`${z}, ${z}-group-addon`]:{borderRadius:0}},[`&:not(${z}-compact-last-item)${z}-compact-first-item`]:{[`${z}, ${z}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${z}-compact-first-item)${z}-compact-last-item`]:{[`${z}, ${z}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${z}-compact-last-item)${z}-compact-item`]:{[`${z}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${z}-compact-first-item)${z}-compact-item`]:{[`${z}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},G=$=>{const{componentCls:z,antCls:de}=$,we=`${z}-search`;return{[we]:{[z]:{"&:hover, &:focus":{[`+ ${z}-group-addon ${we}-button:not(${de}-btn-primary)`]:{borderInlineStartColor:$.colorPrimaryHover}}},[`${z}-affix-wrapper`]:{height:$.controlHeight,borderRadius:0},[`${z}-lg`]:{lineHeight:$.calc($.lineHeightLG).sub(2e-4).equal()},[`> ${z}-group`]:{[`> ${z}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${we}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${we}-button:not(${de}-btn-primary)`]:{color:$.colorTextDescription,"&:hover":{color:$.colorPrimaryHover},"&:active":{color:$.colorPrimaryActive},[`&${de}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${we}-button`]:{height:$.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${z}-affix-wrapper, ${we}-button`]:{height:$.controlHeightLG}},"&-small":{[`${z}-affix-wrapper, ${we}-button`]:{height:$.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${z}-compact-item`]:{[`&:not(${z}-compact-last-item)`]:{[`${z}-group-addon`]:{[`${z}-search-button`]:{marginInlineEnd:$.calc($.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${z}-compact-first-item)`]:{[`${z},${z}-affix-wrapper`]:{borderRadius:0}},[`> ${z}-group-addon ${z}-search-button,
|
|
> ${z},
|
|
${z}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${z}-affix-wrapper-focused`]:{zIndex:2}}}}},D=$=>{const{componentCls:z}=$;return{[`${z}-out-of-range`]:{[`&, & input, & textarea, ${z}-show-count-suffix, ${z}-data-count`]:{color:$.colorError}}}},H=(0,ye.I$)(["Input","Shared"],$=>{const z=(0,W.mergeToken)($,(0,g.e)($));return[A(z),q(z)]},g.T,{resetFont:!1});ot.ZP=(0,ye.I$)(["Input","Component"],$=>{const z=(0,W.mergeToken)($,(0,g.e)($));return[re(z),G(z),D(z),(0,Ee.c)(z)]},g.T,{resetFont:!1})},64910:function(Jt,ot,_){"use strict";_.d(ot,{T:function(){return Ee},e:function(){return ge}});var d=_(51636);function ge(ye){return(0,d.mergeToken)(ye,{inputAffixPadding:ye.paddingXXS})}const Ee=ye=>{const{controlHeight:W,fontSize:g,lineHeight:ne,lineWidth:J,controlHeightSM:o,controlHeightLG:X,fontSizeLG:U,lineHeightLG:S,paddingSM:w,controlPaddingHorizontalSM:A,controlPaddingHorizontal:I,colorFillAlter:q,colorPrimaryHover:re,colorPrimary:G,controlOutlineWidth:D,controlOutline:H,colorErrorOutline:$,colorWarningOutline:z,colorBgContainer:de,inputFontSize:we,inputFontSizeLG:ce,inputFontSizeSM:Oe}=ye,Fe=we||g,Ne=Oe||Fe,Ve=ce||U,K=Math.round((W-Fe*ne)/2*10)/10-J,B=Math.round((o-Ne*ne)/2*10)/10-J,L=Math.ceil((X-Ve*S)/2*10)/10-J;return{paddingBlock:Math.max(K,0),paddingBlockSM:Math.max(B,0),paddingBlockLG:Math.max(L,0),paddingInline:w-J,paddingInlineSM:A-J,paddingInlineLG:I-J,addonBg:q,activeBorderColor:G,hoverBorderColor:re,activeShadow:`0 0 0 ${D}px ${H}`,errorActiveShadow:`0 0 0 ${D}px ${$}`,warningActiveShadow:`0 0 0 ${D}px ${z}`,hoverBg:de,activeBg:de,inputFontSize:Fe,inputFontSizeLG:Ve,inputFontSizeSM:Ne}}},39082:function(Jt,ot,_){"use strict";_.d(ot,{$U:function(){return W},H8:function(){return w},Mu:function(){return X},S5:function(){return I},Xy:function(){return ye},ir:function(){return o},qG:function(){return ne},vc:function(){return G}});var d=_(36237),ge=_(51636);const Ee=D=>({borderColor:D.hoverBorderColor,backgroundColor:D.hoverBg}),ye=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({},Ee((0,ge.mergeToken)(D,{hoverBorderColor:D.colorBorder,hoverBg:D.colorBgContainerDisabled})))}),W=(D,H)=>({background:D.colorBgContainer,borderWidth:D.lineWidth,borderStyle:D.lineType,borderColor:H.borderColor,"&:hover":{borderColor:H.hoverBorderColor,backgroundColor:D.hoverBg},"&:focus, &:focus-within":{borderColor:H.activeBorderColor,boxShadow:H.activeShadow,outline:0,backgroundColor:D.activeBg}}),g=(D,H)=>({[`&${D.componentCls}-status-${H.status}:not(${D.componentCls}-disabled)`]:Object.assign(Object.assign({},W(D,H)),{[`${D.componentCls}-prefix, ${D.componentCls}-suffix`]:{color:H.affixColor}}),[`&${D.componentCls}-status-${H.status}${D.componentCls}-disabled`]:{borderColor:H.borderColor}}),ne=(D,H)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},W(D,{borderColor:D.colorBorder,hoverBorderColor:D.hoverBorderColor,activeBorderColor:D.activeBorderColor,activeShadow:D.activeShadow})),{[`&${D.componentCls}-disabled, &[disabled]`]:Object.assign({},ye(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})),H)}),J=(D,H)=>({[`&${D.componentCls}-group-wrapper-status-${H.status}`]:{[`${D.componentCls}-group-addon`]:{borderColor:H.addonBorderColor,color:H.addonColor}}}),o=D=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${D.componentCls}-group`]:{"&-addon":{background:D.addonBg,border:`${(0,d.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},J(D,{status:"error",addonBorderColor:D.colorError,addonColor:D.colorErrorText})),J(D,{status:"warning",addonBorderColor:D.colorWarning,addonColor:D.colorWarningText})),{[`&${D.componentCls}-group-wrapper-disabled`]:{[`${D.componentCls}-group-addon`]:Object.assign({},ye(D))}})}),X=(D,H)=>{const{componentCls:$}=D;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${$}-disabled, &[disabled]`]:{color:D.colorTextDisabled,cursor:"not-allowed"},[`&${$}-status-error`]:{"&, & input, & textarea":{color:D.colorError}},[`&${$}-status-warning`]:{"&, & input, & textarea":{color:D.colorWarning}}},H)}},U=(D,H)=>{var $;return{background:H.bg,borderWidth:D.lineWidth,borderStyle:D.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:($=H==null?void 0:H.inputColor)!==null&&$!==void 0?$:"unset"},"&:hover":{background:H.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:H.activeBorderColor,backgroundColor:D.activeBg}}},S=(D,H)=>({[`&${D.componentCls}-status-${H.status}:not(${D.componentCls}-disabled)`]:Object.assign(Object.assign({},U(D,H)),{[`${D.componentCls}-prefix, ${D.componentCls}-suffix`]:{color:H.affixColor}})}),w=(D,H)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},U(D,{bg:D.colorFillTertiary,hoverBg:D.colorFillSecondary,activeBorderColor:D.activeBorderColor})),{[`&${D.componentCls}-disabled, &[disabled]`]:Object.assign({},ye(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})),H)}),A=(D,H)=>({[`&${D.componentCls}-group-wrapper-status-${H.status}`]:{[`${D.componentCls}-group-addon`]:{background:H.addonBg,color:H.addonColor}}}),I=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,d.unit)(D.lineWidth)} ${D.lineType} ${D.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,d.unit)(D.lineWidth)} ${D.lineType} ${D.colorSplit}`}}}},A(D,{status:"error",addonBg:D.colorErrorBg,addonColor:D.colorErrorText})),A(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,d.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderTop:`${(0,d.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderBottom:`${(0,d.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,d.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderTop:`${(0,d.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderBottom:`${(0,d.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`}}}})}),q=(D,H)=>({background:D.colorBgContainer,borderWidth:`${(0,d.unit)(D.lineWidth)} 0`,borderStyle:`${D.lineType} none`,borderColor:`transparent transparent ${H.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${H.borderColor} transparent`,backgroundColor:D.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${H.borderColor} transparent`,outline:0,backgroundColor:D.activeBg}}),re=(D,H)=>({[`&${D.componentCls}-status-${H.status}:not(${D.componentCls}-disabled)`]:Object.assign(Object.assign({},q(D,H)),{[`${D.componentCls}-prefix, ${D.componentCls}-suffix`]:{color:H.affixColor}}),[`&${D.componentCls}-status-${H.status}${D.componentCls}-disabled`]:{borderColor:`transparent transparent ${H.borderColor} transparent`}}),G=(D,H)=>({"&-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"}}),re(D,{status:"error",borderColor:D.colorError,hoverBorderColor:D.colorErrorBorderHover,activeBorderColor:D.colorError,activeShadow:D.errorActiveShadow,affixColor:D.colorError})),re(D,{status:"warning",borderColor:D.colorWarning,hoverBorderColor:D.colorWarningBorderHover,activeBorderColor:D.colorWarning,activeShadow:D.warningActiveShadow,affixColor:D.colorWarning})),H)})},24303:function(Jt,ot,_){"use strict";_.d(ot,{D:function(){return we},Z:function(){return Fe}});var d=_(59301),ge=_(60499),Ee={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"},ye=Ee,W=_(7657),g=function(Ve,K){return d.createElement(W.Z,(0,ge.Z)({},Ve,{ref:K,icon:ye}))},ne=d.forwardRef(g),J=ne,o=_(33853),X=_(38819),U=_(92310),S=_.n(U),w=_(2738),A=_(48755),I=_(6989),q=_(36237),re=_(48923),G=_(16931);const D=Ne=>{const{componentCls:Ve,siderBg:K,motionDurationMid:B,motionDurationSlow:L,antCls:Y,triggerHeight:Q,triggerColor:P,triggerBg:b,headerHeight:E,zeroTriggerWidth:N,zeroTriggerHeight:ie,borderRadiusLG:Ie,lightSiderBg:Ze,lightTriggerColor:me,lightTriggerBg:Ce,bodyBg:Ke}=Ne;return{[Ve]:{position:"relative",minWidth:0,background:K,transition:`all ${B}, background 0s`,"&-has-trigger":{paddingBottom:Q},"&-right":{order:1},[`${Ve}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${Y}-menu${Y}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${Ve}-children`]:{overflow:"hidden"},[`${Ve}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:Q,color:P,lineHeight:(0,q.unit)(Q),textAlign:"center",background:b,cursor:"pointer",transition:`all ${B}`},[`${Ve}-zero-width-trigger`]:{position:"absolute",top:E,insetInlineEnd:Ne.calc(N).mul(-1).equal(),zIndex:1,width:N,height:ie,color:P,fontSize:Ne.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:K,borderRadius:`0 ${(0,q.unit)(Ie)} ${(0,q.unit)(Ie)} 0`,cursor:"pointer",transition:`background ${L} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${L}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:Ne.calc(N).mul(-1).equal(),borderRadius:`${(0,q.unit)(Ie)} 0 0 ${(0,q.unit)(Ie)}`}},"&-light":{background:Ze,[`${Ve}-trigger`]:{color:me,background:Ce},[`${Ve}-zero-width-trigger`]:{color:me,background:Ce,border:`1px solid ${Ke}`,borderInlineStart:0}}}}};var H=(0,G.I$)(["Layout","Sider"],Ne=>[D(Ne)],re.eh,{deprecatedTokens:re.jn}),$=function(Ne,Ve){var K={};for(var B in Ne)Object.prototype.hasOwnProperty.call(Ne,B)&&Ve.indexOf(B)<0&&(K[B]=Ne[B]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,B=Object.getOwnPropertySymbols(Ne);L<B.length;L++)Ve.indexOf(B[L])<0&&Object.prototype.propertyIsEnumerable.call(Ne,B[L])&&(K[B[L]]=Ne[B[L]]);return K};const z={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},de=Ne=>!Number.isNaN(Number.parseFloat(Ne))&&isFinite(Ne),we=d.createContext({}),ce=(()=>{let Ne=0;return function(){let Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ne+=1,`${Ve}${Ne}`}})();var Fe=d.forwardRef((Ne,Ve)=>{const{prefixCls:K,className:B,trigger:L,children:Y,defaultCollapsed:Q=!1,theme:P="dark",style:b={},collapsible:E=!1,reverseArrow:N=!1,width:ie=200,collapsedWidth:Ie=80,zeroWidthTriggerStyle:Ze,breakpoint:me,onCollapse:Ce,onBreakpoint:Ke}=Ne,Qe=$(Ne,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Ge}=(0,d.useContext)(I.V),[wt,Ue]=(0,d.useState)("collapsed"in Ne?Ne.collapsed:Q),[bt,Le]=(0,d.useState)(!1);(0,d.useEffect)(()=>{"collapsed"in Ne&&Ue(Ne.collapsed)},[Ne.collapsed]);const lt=(vt,pt)=>{"collapsed"in Ne||Ue(vt),Ce==null||Ce(vt,pt)},{getPrefixCls:Re,direction:Te}=(0,d.useContext)(A.E_),pe=Re("layout-sider",K),[We,De,Se]=H(pe),k=(0,d.useRef)(null);k.current=vt=>{Le(vt.matches),Ke==null||Ke(vt.matches),wt!==vt.matches&<(vt.matches,"responsive")},(0,d.useEffect)(()=>{function vt(be){return k.current(be)}let pt;if(typeof window!="undefined"){const{matchMedia:be}=window;if(be&&me&&me in z){pt=be(`screen and (max-width: ${z[me]})`);try{pt.addEventListener("change",vt)}catch(Je){pt.addListener(vt)}vt(pt)}}return()=>{try{pt==null||pt.removeEventListener("change",vt)}catch(be){pt==null||pt.removeListener(vt)}}},[me]),(0,d.useEffect)(()=>{const vt=ce("ant-sider-");return Ge.addSider(vt),()=>Ge.removeSider(vt)},[]);const fe=()=>{lt(!wt,"clickTrigger")},ve=(0,w.Z)(Qe,["collapsed"]),Be=wt?Ie:ie,qe=de(Be)?`${Be}px`:String(Be),at=parseFloat(String(Ie||0))===0?d.createElement("span",{onClick:fe,className:S()(`${pe}-zero-width-trigger`,`${pe}-zero-width-trigger-${N?"right":"left"}`),style:Ze},L||d.createElement(J,null)):null,ct=Te==="rtl"==!N,gt={expanded:ct?d.createElement(X.Z,null):d.createElement(o.Z,null),collapsed:ct?d.createElement(o.Z,null):d.createElement(X.Z,null)}[wt?"collapsed":"expanded"],Lt=L!==null?at||d.createElement("div",{className:`${pe}-trigger`,onClick:fe,style:{width:qe}},L||gt):null,St=Object.assign(Object.assign({},b),{flex:`0 0 ${qe}`,maxWidth:qe,minWidth:qe,width:qe}),Ct=S()(pe,`${pe}-${P}`,{[`${pe}-collapsed`]:!!wt,[`${pe}-has-trigger`]:E&&L!==null&&!at,[`${pe}-below`]:!!bt,[`${pe}-zero-width`]:parseFloat(qe)===0},B,De,Se),nt=d.useMemo(()=>({siderCollapsed:wt}),[wt]);return We(d.createElement(we.Provider,{value:nt},d.createElement("aside",Object.assign({className:Ct},ve,{style:St,ref:Ve}),d.createElement("div",{className:`${pe}-children`},Y),E||bt&&at?Lt:null)))})},6989:function(Jt,ot,_){"use strict";_.d(ot,{V:function(){return ge}});var d=_(59301);const ge=d.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},48923:function(Jt,ot,_){"use strict";_.d(ot,{eh:function(){return ye},jn:function(){return W}});var d=_(36237),ge=_(16931);const Ee=g=>{const{antCls:ne,componentCls:J,colorText:o,footerBg:X,headerHeight:U,headerPadding:S,headerColor:w,footerPadding:A,fontSize:I,bodyBg:q,headerBg:re}=g;return{[J]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:q,"&, *":{boxSizing:"border-box"},[`&${J}-has-sider`]:{flexDirection:"row",[`> ${J}, > ${J}-content`]:{width:0}},[`${J}-header, &${J}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${J}-header`]:{height:U,padding:S,color:w,lineHeight:(0,d.unit)(U),background:re,[`${ne}-menu`]:{lineHeight:"inherit"}},[`${J}-footer`]:{padding:A,color:o,fontSize:I,background:X},[`${J}-content`]:{flex:"auto",color:o,minHeight:0}}},ye=g=>{const{colorBgLayout:ne,controlHeight:J,controlHeightLG:o,colorText:X,controlHeightSM:U,marginXXS:S,colorTextLightSolid:w,colorBgContainer:A}=g,I=o*1.25;return{colorBgHeader:"#001529",colorBgBody:ne,colorBgTrigger:"#002140",bodyBg:ne,headerBg:"#001529",headerHeight:J*2,headerPadding:`0 ${I}px`,headerColor:X,footerPadding:`${U}px ${I}px`,footerBg:ne,siderBg:"#001529",triggerHeight:o+S*2,triggerBg:"#002140",triggerColor:w,zeroTriggerWidth:o,zeroTriggerHeight:o,lightSiderBg:A,lightTriggerBg:A,lightTriggerColor:X}},W=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];ot.ZP=(0,ge.I$)("Layout",g=>[Ee(g)],ye,{deprecatedTokens:W})},78857:function(Jt,ot,_){"use strict";_.d(ot,{J:function(){return g}});var d=_(59301),ge=_(8654),Ee=_(62487),ye=function(ne,J){var o={};for(var X in ne)Object.prototype.hasOwnProperty.call(ne,X)&&J.indexOf(X)<0&&(o[X]=ne[X]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var U=0,X=Object.getOwnPropertySymbols(ne);U<X.length;U++)J.indexOf(X[U])<0&&Object.prototype.propertyIsEnumerable.call(ne,X[U])&&(o[X[U]]=ne[X[U]]);return o};const W=d.createContext(null),g=d.forwardRef((ne,J)=>{const{children:o}=ne,X=ye(ne,["children"]),U=d.useContext(W),S=d.useMemo(()=>Object.assign(Object.assign({},U),X),[U,X.prefixCls,X.mode,X.selectable,X.rootClassName]),w=(0,ge.t4)(o),A=(0,ge.x1)(J,w?(0,ge.C4)(o):null);return d.createElement(W.Provider,{value:S},d.createElement(Ee.Z,{space:!0},w?d.cloneElement(o,{ref:A}):o))});ot.Z=W},93041:function(Jt,ot,_){"use strict";_.d(ot,{default:function(){return We}});var d=_(59301),ge=_(28321),Ee=_(24303),ye=_(18785),W=_(92310),g=_.n(W),ne=_(6089),J=_(2738),o=_(86641),X=_(22703),U=_(48755),S=_(83397),A=(0,d.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),I=function(De,Se){var k={};for(var fe in De)Object.prototype.hasOwnProperty.call(De,fe)&&Se.indexOf(fe)<0&&(k[fe]=De[fe]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,fe=Object.getOwnPropertySymbols(De);ve<fe.length;ve++)Se.indexOf(fe[ve])<0&&Object.prototype.propertyIsEnumerable.call(De,fe[ve])&&(k[fe[ve]]=De[fe[ve]]);return k},re=De=>{const{prefixCls:Se,className:k,dashed:fe}=De,ve=I(De,["prefixCls","className","dashed"]),{getPrefixCls:Be}=d.useContext(U.E_),qe=Be("menu",Se),at=g()({[`${qe}-item-divider-dashed`]:!!fe},k);return d.createElement(ge.iz,Object.assign({className:at},ve))},G=_(11592),D=_(25399),$=De=>{var Se;const{className:k,children:fe,icon:ve,title:Be,danger:qe,extra:at}=De,{prefixCls:ct,firstLevel:mt,direction:dt,disableMenuItemTitleTooltip:gt,inlineCollapsed:Lt}=d.useContext(A),St=Je=>{const x=fe==null?void 0:fe[0],T=d.createElement("span",{className:g()(`${ct}-title-content`,{[`${ct}-title-content-with-extra`]:!!at||at===0})},fe);return(!ve||d.isValidElement(fe)&&fe.type==="span")&&fe&&Je&&mt&&typeof x=="string"?d.createElement("div",{className:`${ct}-inline-collapsed-noicon`},x.charAt(0)):T},{siderCollapsed:Ct}=d.useContext(Ee.D);let nt=Be;typeof Be=="undefined"?nt=mt?fe:"":Be===!1&&(nt="");const vt={title:nt};!Ct&&!Lt&&(vt.title=null,vt.open=!1);const pt=(0,G.Z)(fe).length;let be=d.createElement(ge.ck,Object.assign({},(0,J.Z)(De,["title","icon","danger"]),{className:g()({[`${ct}-item-danger`]:qe,[`${ct}-item-only-child`]:(ve?pt+1:pt)===1},k),title:typeof Be=="string"?Be:void 0}),(0,X.Tm)(ve,{className:g()(d.isValidElement(ve)?(Se=ve.props)===null||Se===void 0?void 0:Se.className:"",`${ct}-item-icon`)}),St(Lt));return gt||(be=d.createElement(D.Z,Object.assign({},vt,{placement:dt==="rtl"?"left":"right",classNames:{root:`${ct}-inline-collapsed-tooltip`}}),be)),be},z=_(78857),de=_(36237),we=_(17835),ce=_(63356),Oe=_(34961),Fe=_(46e3),Ne=_(34925),Ve=_(16931),K=_(51636),L=De=>{const{componentCls:Se,motionDurationSlow:k,horizontalLineHeight:fe,colorSplit:ve,lineWidth:Be,lineType:qe,itemPaddingInline:at}=De;return{[`${Se}-horizontal`]:{lineHeight:fe,border:0,borderBottom:`${(0,de.unit)(Be)} ${qe} ${ve}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Se}-item, ${Se}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:at},[`> ${Se}-item:hover,
|
|
> ${Se}-item-active,
|
|
> ${Se}-submenu ${Se}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Se}-item, ${Se}-submenu-title`]:{transition:[`border-color ${k}`,`background ${k}`].join(",")},[`${Se}-submenu-arrow`]:{display:"none"}}}},Q=De=>{let{componentCls:Se,menuArrowOffset:k,calc:fe}=De;return{[`${Se}-rtl`]:{direction:"rtl"},[`${Se}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Se}-rtl${Se}-vertical,
|
|
${Se}-submenu-rtl ${Se}-vertical`]:{[`${Se}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${(0,de.unit)(fe(k).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${(0,de.unit)(k)})`}}}}};const P=De=>Object.assign({},(0,ce.oN)(De));var E=(De,Se)=>{const{componentCls:k,itemColor:fe,itemSelectedColor:ve,subMenuItemSelectedColor:Be,groupTitleColor:qe,itemBg:at,subMenuItemBg:ct,itemSelectedBg:mt,activeBarHeight:dt,activeBarWidth:gt,activeBarBorderWidth:Lt,motionDurationSlow:St,motionEaseInOut:Ct,motionEaseOut:nt,itemPaddingInline:vt,motionDurationMid:pt,itemHoverColor:be,lineType:Je,colorSplit:x,itemDisabledColor:T,dangerItemColor:$e,dangerItemHoverColor:j,dangerItemSelectedColor:ae,dangerItemActiveBg:xt,dangerItemSelectedBg:Ae,popupBg:Me,itemHoverBg:Xe,itemActiveBg:ee,menuSubMenuBg:oe,horizontalItemSelectedColor:xe,horizontalItemSelectedBg:ze,horizontalItemBorderRadius:F,horizontalItemHoverBg:tt}=De;return{[`${k}-${Se}, ${k}-${Se} > ${k}`]:{color:fe,background:at,[`&${k}-root:focus-visible`]:Object.assign({},P(De)),[`${k}-item`]:{"&-group-title, &-extra":{color:qe}},[`${k}-submenu-selected > ${k}-submenu-title`]:{color:Be},[`${k}-item, ${k}-submenu-title`]:{color:fe,[`&:not(${k}-item-disabled):focus-visible`]:Object.assign({},P(De))},[`${k}-item-disabled, ${k}-submenu-disabled`]:{color:`${T} !important`},[`${k}-item:not(${k}-item-selected):not(${k}-submenu-selected)`]:{[`&:hover, > ${k}-submenu-title:hover`]:{color:be}},[`&:not(${k}-horizontal)`]:{[`${k}-item:not(${k}-item-selected)`]:{"&:hover":{backgroundColor:Xe},"&:active":{backgroundColor:ee}},[`${k}-submenu-title`]:{"&:hover":{backgroundColor:Xe},"&:active":{backgroundColor:ee}}},[`${k}-item-danger`]:{color:$e,[`&${k}-item:hover`]:{[`&:not(${k}-item-selected):not(${k}-submenu-selected)`]:{color:j}},[`&${k}-item:active`]:{background:xt}},[`${k}-item a`]:{"&, &:hover":{color:"inherit"}},[`${k}-item-selected`]:{color:ve,[`&${k}-item-danger`]:{color:ae},"a, a:hover":{color:"inherit"}},[`& ${k}-item-selected`]:{backgroundColor:mt,[`&${k}-item-danger`]:{backgroundColor:Ae}},[`&${k}-submenu > ${k}`]:{backgroundColor:oe},[`&${k}-popup > ${k}`]:{backgroundColor:Me},[`&${k}-submenu-popup > ${k}`]:{backgroundColor:Me},[`&${k}-horizontal`]:Object.assign(Object.assign({},Se==="dark"?{borderBottom:0}:{}),{[`> ${k}-item, > ${k}-submenu`]:{top:Lt,marginTop:De.calc(Lt).mul(-1).equal(),marginBottom:0,borderRadius:F,"&::after":{position:"absolute",insetInline:vt,bottom:0,borderBottom:`${(0,de.unit)(dt)} solid transparent`,transition:`border-color ${St} ${Ct}`,content:'""'},"&:hover, &-active, &-open":{background:tt,"&::after":{borderBottomWidth:dt,borderBottomColor:xe}},"&-selected":{color:xe,backgroundColor:ze,"&:hover":{backgroundColor:ze},"&::after":{borderBottomWidth:dt,borderBottomColor:xe}}}}),[`&${k}-root`]:{[`&${k}-inline, &${k}-vertical`]:{borderInlineEnd:`${(0,de.unit)(Lt)} ${Je} ${x}`}},[`&${k}-inline`]:{[`${k}-sub${k}-inline`]:{background:ct},[`${k}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${(0,de.unit)(gt)} solid ${ve}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${pt} ${nt}`,`opacity ${pt} ${nt}`].join(","),content:'""'},[`&${k}-item-danger`]:{"&::after":{borderInlineEndColor:ae}}},[`${k}-selected, ${k}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${pt} ${Ct}`,`opacity ${pt} ${Ct}`].join(",")}}}}}};const N=De=>{const{componentCls:Se,itemHeight:k,itemMarginInline:fe,padding:ve,menuArrowSize:Be,marginXS:qe,itemMarginBlock:at,itemWidth:ct,itemPaddingInline:mt}=De,dt=De.calc(Be).add(ve).add(qe).equal();return{[`${Se}-item`]:{position:"relative",overflow:"hidden"},[`${Se}-item, ${Se}-submenu-title`]:{height:k,lineHeight:(0,de.unit)(k),paddingInline:mt,overflow:"hidden",textOverflow:"ellipsis",marginInline:fe,marginBlock:at,width:ct},[`> ${Se}-item,
|
|
> ${Se}-submenu > ${Se}-submenu-title`]:{height:k,lineHeight:(0,de.unit)(k)},[`${Se}-item-group-list ${Se}-submenu-title,
|
|
${Se}-submenu-title`]:{paddingInlineEnd:dt}}};var Ie=De=>{const{componentCls:Se,iconCls:k,itemHeight:fe,colorTextLightSolid:ve,dropdownWidth:Be,controlHeightLG:qe,motionEaseOut:at,paddingXL:ct,itemMarginInline:mt,fontSizeLG:dt,motionDurationFast:gt,motionDurationSlow:Lt,paddingXS:St,boxShadowSecondary:Ct,collapsedWidth:nt,collapsedIconSize:vt}=De,pt={height:fe,lineHeight:(0,de.unit)(fe),listStylePosition:"inside",listStyleType:"disc"};return[{[Se]:{"&-inline, &-vertical":Object.assign({[`&${Se}-root`]:{boxShadow:"none"}},N(De))},[`${Se}-submenu-popup`]:{[`${Se}-vertical`]:Object.assign(Object.assign({},N(De)),{boxShadow:Ct})}},{[`${Se}-submenu-popup ${Se}-vertical${Se}-sub`]:{minWidth:Be,maxHeight:`calc(100vh - ${(0,de.unit)(De.calc(qe).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Se}-inline`]:{width:"100%",[`&${Se}-root`]:{[`${Se}-item, ${Se}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Lt}`,`background ${Lt}`,`padding ${gt} ${at}`].join(","),[`> ${Se}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Se}-sub${Se}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Se}-submenu > ${Se}-submenu-title`]:pt,[`& ${Se}-item-group-title`]:{paddingInlineStart:ct}},[`${Se}-item`]:pt}},{[`${Se}-inline-collapsed`]:{width:nt,[`&${Se}-root`]:{[`${Se}-item, ${Se}-submenu ${Se}-submenu-title`]:{[`> ${Se}-inline-collapsed-noicon`]:{fontSize:dt,textAlign:"center"}}},[`> ${Se}-item,
|
|
> ${Se}-item-group > ${Se}-item-group-list > ${Se}-item,
|
|
> ${Se}-item-group > ${Se}-item-group-list > ${Se}-submenu > ${Se}-submenu-title,
|
|
> ${Se}-submenu > ${Se}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${(0,de.unit)(De.calc(vt).div(2).equal())} - ${(0,de.unit)(mt)})`,textOverflow:"clip",[`
|
|
${Se}-submenu-arrow,
|
|
${Se}-submenu-expand-icon
|
|
`]:{opacity:0},[`${Se}-item-icon, ${k}`]:{margin:0,fontSize:vt,lineHeight:(0,de.unit)(fe),"+ span":{display:"inline-block",opacity:0}}},[`${Se}-item-icon, ${k}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Se}-item-icon, ${k}`]:{display:"none"},"a, a:hover":{color:ve}},[`${Se}-item-group-title`]:Object.assign(Object.assign({},ce.vS),{paddingInline:St})}}]};const Ze=De=>{const{componentCls:Se,motionDurationSlow:k,motionDurationMid:fe,motionEaseInOut:ve,motionEaseOut:Be,iconCls:qe,iconSize:at,iconMarginInlineEnd:ct}=De;return{[`${Se}-item, ${Se}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${k}`,`background ${k}`,`padding calc(${k} + 0.1s) ${ve}`].join(","),[`${Se}-item-icon, ${qe}`]:{minWidth:at,fontSize:at,transition:[`font-size ${fe} ${Be}`,`margin ${k} ${ve}`,`color ${k}`].join(","),"+ span":{marginInlineStart:ct,opacity:1,transition:[`opacity ${k} ${ve}`,`margin ${k}`,`color ${k}`].join(",")}},[`${Se}-item-icon`]:Object.assign({},(0,ce.Ro)()),[`&${Se}-item-only-child`]:{[`> ${qe}, > ${Se}-item-icon`]:{marginInlineEnd:0}}},[`${Se}-item-disabled, ${Se}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${Se}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},me=De=>{const{componentCls:Se,motionDurationSlow:k,motionEaseInOut:fe,borderRadius:ve,menuArrowSize:Be,menuArrowOffset:qe}=De;return{[`${Se}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:De.margin,width:Be,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${k} ${fe}, opacity ${k}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:De.calc(Be).mul(.6).equal(),height:De.calc(Be).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:ve,transition:[`background ${k} ${fe}`,`transform ${k} ${fe}`,`top ${k} ${fe}`,`color ${k} ${fe}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${(0,de.unit)(De.calc(qe).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${(0,de.unit)(qe)})`}}}}},Ce=De=>{const{antCls:Se,componentCls:k,fontSize:fe,motionDurationSlow:ve,motionDurationMid:Be,motionEaseInOut:qe,paddingXS:at,padding:ct,colorSplit:mt,lineWidth:dt,zIndexPopup:gt,borderRadiusLG:Lt,subMenuItemBorderRadius:St,menuArrowSize:Ct,menuArrowOffset:nt,lineType:vt,groupTitleLineHeight:pt,groupTitleFontSize:be}=De;return[{"":{[k]:Object.assign(Object.assign({},(0,ce.dF)()),{"&-hidden":{display:"none"}})},[`${k}-submenu-hidden`]:{display:"none"}},{[k]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ce.Wf)(De)),(0,ce.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:fe,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${ve} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${k}-item`]:{flex:"none"}},[`${k}-item, ${k}-submenu, ${k}-submenu-title`]:{borderRadius:De.itemBorderRadius},[`${k}-item-group-title`]:{padding:`${(0,de.unit)(at)} ${(0,de.unit)(ct)}`,fontSize:be,lineHeight:pt,transition:`all ${ve}`},[`&-horizontal ${k}-submenu`]:{transition:[`border-color ${ve} ${qe}`,`background ${ve} ${qe}`].join(",")},[`${k}-submenu, ${k}-submenu-inline`]:{transition:[`border-color ${ve} ${qe}`,`background ${ve} ${qe}`,`padding ${Be} ${qe}`].join(",")},[`${k}-submenu ${k}-sub`]:{cursor:"initial",transition:[`background ${ve} ${qe}`,`padding ${ve} ${qe}`].join(",")},[`${k}-title-content`]:{transition:`color ${ve}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${Se}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${k}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:De.padding}},[`${k}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${k}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:mt,borderStyle:vt,borderWidth:0,borderTopWidth:dt,marginBlock:dt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Ze(De)),{[`${k}-item-group`]:{[`${k}-item-group-list`]:{margin:0,padding:0,[`${k}-item, ${k}-submenu-title`]:{paddingInline:`${(0,de.unit)(De.calc(fe).mul(2).equal())} ${(0,de.unit)(ct)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:gt,borderRadius:Lt,boxShadow:"none",transformOrigin:"0 0",[`&${k}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${k}`]:Object.assign(Object.assign(Object.assign({borderRadius:Lt},Ze(De)),me(De)),{[`${k}-item, ${k}-submenu > ${k}-submenu-title`]:{borderRadius:St},[`${k}-submenu-title::after`]:{transition:`transform ${ve} ${qe}`}})},"\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:De.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:De.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:De.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:De.paddingXS}}}),me(De)),{[`&-inline-collapsed ${k}-submenu-arrow,
|
|
&-inline ${k}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${(0,de.unit)(nt)})`},"&::after":{transform:`rotate(45deg) translateX(${(0,de.unit)(De.calc(nt).mul(-1).equal())})`}},[`${k}-submenu-open${k}-submenu-inline > ${k}-submenu-title > ${k}-submenu-arrow`]:{transform:`translateY(${(0,de.unit)(De.calc(Ct).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${(0,de.unit)(De.calc(nt).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${(0,de.unit)(nt)})`}}})},{[`${Se}-layout-header`]:{[k]:{lineHeight:"inherit"}}}]},Ke=De=>{var Se,k,fe;const{colorPrimary:ve,colorError:Be,colorTextDisabled:qe,colorErrorBg:at,colorText:ct,colorTextDescription:mt,colorBgContainer:dt,colorFillAlter:gt,colorFillContent:Lt,lineWidth:St,lineWidthBold:Ct,controlItemBgActive:nt,colorBgTextHover:vt,controlHeightLG:pt,lineHeight:be,colorBgElevated:Je,marginXXS:x,padding:T,fontSize:$e,controlHeightSM:j,fontSizeLG:ae,colorTextLightSolid:xt,colorErrorHover:Ae}=De,Me=(Se=De.activeBarWidth)!==null&&Se!==void 0?Se:0,Xe=(k=De.activeBarBorderWidth)!==null&&k!==void 0?k:St,ee=(fe=De.itemMarginInline)!==null&&fe!==void 0?fe:De.marginXXS,oe=new we.FastColor(xt).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:De.zIndexPopupBase+50,radiusItem:De.borderRadiusLG,itemBorderRadius:De.borderRadiusLG,radiusSubMenuItem:De.borderRadiusSM,subMenuItemBorderRadius:De.borderRadiusSM,colorItemText:ct,itemColor:ct,colorItemTextHover:ct,itemHoverColor:ct,colorItemTextHoverHorizontal:ve,horizontalItemHoverColor:ve,colorGroupTitle:mt,groupTitleColor:mt,colorItemTextSelected:ve,itemSelectedColor:ve,subMenuItemSelectedColor:ve,colorItemTextSelectedHorizontal:ve,horizontalItemSelectedColor:ve,colorItemBg:dt,itemBg:dt,colorItemBgHover:vt,itemHoverBg:vt,colorItemBgActive:Lt,itemActiveBg:nt,colorSubItemBg:gt,subMenuItemBg:gt,colorItemBgSelected:nt,itemSelectedBg:nt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:Me,colorActiveBarHeight:Ct,activeBarHeight:Ct,colorActiveBarBorderSize:St,activeBarBorderWidth:Xe,colorItemTextDisabled:qe,itemDisabledColor:qe,colorDangerItemText:Be,dangerItemColor:Be,colorDangerItemTextHover:Be,dangerItemHoverColor:Be,colorDangerItemTextSelected:Be,dangerItemSelectedColor:Be,colorDangerItemBgActive:at,dangerItemActiveBg:at,colorDangerItemBgSelected:at,dangerItemSelectedBg:at,itemMarginInline:ee,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:pt,groupTitleLineHeight:be,collapsedWidth:pt*2,popupBg:Je,itemMarginBlock:x,itemPaddingInline:T,horizontalLineHeight:`${pt*1.15}px`,iconSize:$e,iconMarginInlineEnd:j-$e,collapsedIconSize:ae,groupTitleFontSize:$e,darkItemDisabledColor:new we.FastColor(xt).setA(.25).toRgbString(),darkItemColor:oe,darkDangerItemColor:Be,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:xt,darkItemSelectedBg:ve,darkDangerItemSelectedBg:Be,darkItemHoverBg:"transparent",darkGroupTitleColor:oe,darkItemHoverColor:xt,darkDangerItemHoverColor:Ae,darkDangerItemSelectedColor:xt,darkDangerItemActiveBg:Be,itemWidth:Me?`calc(100% + ${Xe}px)`:`calc(100% - ${ee*2}px)`}};var Qe=function(De){let Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:De,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return(0,Ve.I$)("Menu",ve=>{const{colorBgElevated:Be,controlHeightLG:qe,fontSize:at,darkItemColor:ct,darkDangerItemColor:mt,darkItemBg:dt,darkSubMenuItemBg:gt,darkItemSelectedColor:Lt,darkItemSelectedBg:St,darkDangerItemSelectedBg:Ct,darkItemHoverBg:nt,darkGroupTitleColor:vt,darkItemHoverColor:pt,darkItemDisabledColor:be,darkDangerItemHoverColor:Je,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:T,popupBg:$e,darkPopupBg:j}=ve,ae=ve.calc(at).div(7).mul(5).equal(),xt=(0,K.mergeToken)(ve,{menuArrowSize:ae,menuHorizontalHeight:ve.calc(qe).mul(1.15).equal(),menuArrowOffset:ve.calc(ae).mul(.25).equal(),menuSubMenuBg:Be,calc:ve.calc,popupBg:$e}),Ae=(0,K.mergeToken)(xt,{itemColor:ct,itemHoverColor:pt,groupTitleColor:vt,itemSelectedColor:Lt,subMenuItemSelectedColor:Lt,itemBg:dt,popupBg:j,subMenuItemBg:gt,itemActiveBg:"transparent",itemSelectedBg:St,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:nt,itemDisabledColor:be,dangerItemColor:mt,dangerItemHoverColor:Je,dangerItemSelectedColor:x,dangerItemActiveBg:T,dangerItemSelectedBg:Ct,menuSubMenuBg:gt,horizontalItemSelectedColor:Lt,horizontalItemSelectedBg:St});return[Ce(xt),L(xt),Ie(xt),E(xt,"light"),E(Ae,"dark"),Q(xt),(0,Oe.Z)(xt),(0,Fe.oN)(xt,"slide-up"),(0,Fe.oN)(xt,"slide-down"),(0,Ne._y)(xt,"zoom-big")]},Ke,{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:k,unitless:{groupTitleLineHeight:!0}})(De,Se)},Ge=_(75030),Ue=De=>{var Se;const{popupClassName:k,icon:fe,title:ve,theme:Be}=De,qe=d.useContext(A),{prefixCls:at,inlineCollapsed:ct,theme:mt}=qe,dt=(0,ge.Xl)();let gt;if(!fe)gt=ct&&!dt.length&&ve&&typeof ve=="string"?d.createElement("div",{className:`${at}-inline-collapsed-noicon`},ve.charAt(0)):d.createElement("span",{className:`${at}-title-content`},ve);else{const Ct=d.isValidElement(ve)&&ve.type==="span";gt=d.createElement(d.Fragment,null,(0,X.Tm)(fe,{className:g()(d.isValidElement(fe)?(Se=fe.props)===null||Se===void 0?void 0:Se.className:"",`${at}-item-icon`)}),Ct?ve:d.createElement("span",{className:`${at}-title-content`},ve))}const Lt=d.useMemo(()=>Object.assign(Object.assign({},qe),{firstLevel:!1}),[qe]),[St]=(0,Ge.Cn)("Menu");return d.createElement(A.Provider,{value:Lt},d.createElement(ge.Wd,Object.assign({},(0,J.Z)(De,["icon"]),{title:gt,popupClassName:g()(at,k,`${at}-${Be||mt}`),popupStyle:Object.assign({zIndex:St},De.popupStyle)})))},bt=function(De,Se){var k={};for(var fe in De)Object.prototype.hasOwnProperty.call(De,fe)&&Se.indexOf(fe)<0&&(k[fe]=De[fe]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,fe=Object.getOwnPropertySymbols(De);ve<fe.length;ve++)Se.indexOf(fe[ve])<0&&Object.prototype.propertyIsEnumerable.call(De,fe[ve])&&(k[fe[ve]]=De[fe[ve]]);return k};function Le(De){return De===null||De===!1}const lt={item:$,submenu:Ue,divider:re};var Te=(0,d.forwardRef)((De,Se)=>{var k;const fe=d.useContext(z.Z),ve=fe||{},{getPrefixCls:Be,getPopupContainer:qe,direction:at,menu:ct}=d.useContext(U.E_),mt=Be(),{prefixCls:dt,className:gt,style:Lt,theme:St="light",expandIcon:Ct,_internalDisableMenuItemTitleTooltip:nt,inlineCollapsed:vt,siderCollapsed:pt,rootClassName:be,mode:Je,selectable:x,onClick:T,overflowedIndicatorPopupClassName:$e}=De,j=bt(De,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),ae=(0,J.Z)(j,["collapsedWidth"]);(k=ve.validator)===null||k===void 0||k.call(ve,{mode:Je});const xt=(0,ne.Z)(function(){var Ut;T==null||T.apply(void 0,arguments),(Ut=ve.onClick)===null||Ut===void 0||Ut.call(ve)}),Ae=ve.mode||Je,Me=x!=null?x:ve.selectable,Xe=vt!=null?vt:pt,ee={horizontal:{motionName:`${mt}-slide-up`},inline:(0,o.Z)(mt),other:{motionName:`${mt}-zoom-big`}},oe=Be("menu",dt||ve.prefixCls),xe=(0,S.Z)(oe),[ze,F,tt]=Qe(oe,xe,!fe),se=g()(`${oe}-${St}`,ct==null?void 0:ct.className,gt),it=d.useMemo(()=>{var Ut,Ht;if(typeof Ct=="function"||Le(Ct))return Ct||null;if(typeof ve.expandIcon=="function"||Le(ve.expandIcon))return ve.expandIcon||null;if(typeof(ct==null?void 0:ct.expandIcon)=="function"||Le(ct==null?void 0:ct.expandIcon))return(ct==null?void 0:ct.expandIcon)||null;const Xt=(Ut=Ct!=null?Ct:ve==null?void 0:ve.expandIcon)!==null&&Ut!==void 0?Ut:ct==null?void 0:ct.expandIcon;return(0,X.Tm)(Xt,{className:g()(`${oe}-submenu-expand-icon`,d.isValidElement(Xt)?(Ht=Xt.props)===null||Ht===void 0?void 0:Ht.className:void 0)})},[Ct,ve==null?void 0:ve.expandIcon,ct==null?void 0:ct.expandIcon,oe]),Ot=d.useMemo(()=>({prefixCls:oe,inlineCollapsed:Xe||!1,direction:at,firstLevel:!0,theme:St,mode:Ae,disableMenuItemTitleTooltip:nt}),[oe,Xe,at,nt,St]);return ze(d.createElement(z.Z.Provider,{value:null},d.createElement(A.Provider,{value:Ot},d.createElement(ge.ZP,Object.assign({getPopupContainer:qe,overflowedIndicator:d.createElement(ye.Z,null),overflowedIndicatorPopupClassName:g()(oe,`${oe}-${St}`,$e),mode:Ae,selectable:Me,onClick:xt},ae,{inlineCollapsed:Xe,style:Object.assign(Object.assign({},ct==null?void 0:ct.style),Lt),className:se,prefixCls:oe,direction:at,defaultMotions:ee,expandIcon:it,ref:Se,rootClassName:g()(be,F,ve.rootClassName,tt,xe),_internalComponents:lt})))))});const pe=(0,d.forwardRef)((De,Se)=>{const k=(0,d.useRef)(null),fe=d.useContext(Ee.D);return(0,d.useImperativeHandle)(Se,()=>({menu:k.current,focus:ve=>{var Be;(Be=k.current)===null||Be===void 0||Be.focus(ve)}})),d.createElement(Te,Object.assign({ref:k},De,fe))});pe.Item=$,pe.SubMenu=Ue,pe.Divider=re,pe.ItemGroup=ge.BW;var We=pe},89787:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return pt}});var d=_(59301),ge=_(17835),Ee=_(29679),ye=_(40001),W=_(19248),g=_(99267),ne=_(92310),J=_.n(ne),o=_(2738),X=_(48755),U=_(60499),S=_(85899),w=_(42244),A={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},I=function(){var Je=(0,d.useRef)([]),x=(0,d.useRef)(null);return(0,d.useEffect)(function(){var T=Date.now(),$e=!1;Je.current.forEach(function(j){if(j){$e=!0;var ae=j.style;ae.transitionDuration=".3s, .3s, .3s, .06s",x.current&&T-x.current<100&&(ae.transitionDuration="0s, 0s")}}),$e&&(x.current=Date.now())}),Je.current},q=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],re=function(Je){var x=(0,S.Z)((0,S.Z)({},A),Je),T=x.className,$e=x.percent,j=x.prefixCls,ae=x.strokeColor,xt=x.strokeLinecap,Ae=x.strokeWidth,Me=x.style,Xe=x.trailColor,ee=x.trailWidth,oe=x.transition,xe=(0,w.Z)(x,q);delete xe.gapPosition;var ze=Array.isArray($e)?$e:[$e],F=Array.isArray(ae)?ae:[ae],tt=I(),se=Ae/2,it=100-Ae/2,Ot="M ".concat(xt==="round"?se:0,",").concat(se,`
|
|
L `).concat(xt==="round"?it:100,",").concat(se),Ut="0 0 100 ".concat(Ae),Ht=0;return d.createElement("svg",(0,U.Z)({className:J()("".concat(j,"-line"),T),viewBox:Ut,preserveAspectRatio:"none",style:Me},xe),d.createElement("path",{className:"".concat(j,"-line-trail"),d:Ot,strokeLinecap:xt,stroke:Xe,strokeWidth:ee||Ae,fillOpacity:"0"}),ze.map(function(Xt,Vt){var hn=1;switch(xt){case"round":hn=1-Ae/100;break;case"square":hn=1-Ae/2/100;break;default:hn=1;break}var Dn={strokeDasharray:"".concat(Xt*hn,"px, 100px"),strokeDashoffset:"-".concat(Ht,"px"),transition:oe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},sn=F[Vt]||F[F.length-1];return Ht+=Xt,d.createElement("path",{key:Vt,className:"".concat(j,"-line-path"),d:Ot,strokeLinecap:xt,stroke:sn,strokeWidth:Ae,fillOpacity:"0",ref:function(Kt){tt[Vt]=Kt},style:Dn})}))},G=re,D=_(43749),H=_(72190),$=_(47273),z=0,de=(0,$.Z)();function we(){var be;return de?(be=z,z+=1):be="TEST_OR_SSR",be}var ce=function(be){var Je=d.useState(),x=(0,H.Z)(Je,2),T=x[0],$e=x[1];return d.useEffect(function(){$e("rc_progress_".concat(we()))},[]),be||T},Oe=function(Je){var x=Je.bg,T=Je.children;return d.createElement("div",{style:{width:"100%",height:"100%",background:x}},T)};function Fe(be,Je){return Object.keys(be).map(function(x){var T=parseFloat(x),$e="".concat(Math.floor(T*Je),"%");return"".concat(be[x]," ").concat($e)})}var Ne=d.forwardRef(function(be,Je){var x=be.prefixCls,T=be.color,$e=be.gradientId,j=be.radius,ae=be.style,xt=be.ptg,Ae=be.strokeLinecap,Me=be.strokeWidth,Xe=be.size,ee=be.gapDegree,oe=T&&(0,D.Z)(T)==="object",xe=oe?"#FFF":void 0,ze=Xe/2,F=d.createElement("circle",{className:"".concat(x,"-circle-path"),r:j,cx:ze,cy:ze,stroke:xe,strokeLinecap:Ae,strokeWidth:Me,opacity:xt===0?0:1,style:ae,ref:Je});if(!oe)return F;var tt="".concat($e,"-conic"),se=ee?"".concat(180+ee/2,"deg"):"0deg",it=Fe(T,(360-ee)/360),Ot=Fe(T,1),Ut="conic-gradient(from ".concat(se,", ").concat(it.join(", "),")"),Ht="linear-gradient(to ".concat(ee?"bottom":"top",", ").concat(Ot.join(", "),")");return d.createElement(d.Fragment,null,d.createElement("mask",{id:tt},F),d.createElement("foreignObject",{x:0,y:0,width:Xe,height:Xe,mask:"url(#".concat(tt,")")},d.createElement(Oe,{bg:Ht},d.createElement(Oe,{bg:Ut}))))}),Ve=Ne,K=100,B=function(Je,x,T,$e,j,ae,xt,Ae,Me,Xe){var ee=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,oe=T/100*360*((360-ae)/360),xe=ae===0?0:{bottom:0,top:180,left:90,right:-90}[xt],ze=(100-$e)/100*x;Me==="round"&&$e!==100&&(ze+=Xe/2,ze>=x&&(ze=x-.01));var F=K/2;return{stroke:typeof Ae=="string"?Ae:void 0,strokeDasharray:"".concat(x,"px ").concat(Je),strokeDashoffset:ze+ee,transform:"rotate(".concat(j+oe+xe,"deg)"),transformOrigin:"".concat(F,"px ").concat(F,"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}},L=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Y(be){var Je=be!=null?be:[];return Array.isArray(Je)?Je:[Je]}var Q=function(Je){var x=(0,S.Z)((0,S.Z)({},A),Je),T=x.id,$e=x.prefixCls,j=x.steps,ae=x.strokeWidth,xt=x.trailWidth,Ae=x.gapDegree,Me=Ae===void 0?0:Ae,Xe=x.gapPosition,ee=x.trailColor,oe=x.strokeLinecap,xe=x.style,ze=x.className,F=x.strokeColor,tt=x.percent,se=(0,w.Z)(x,L),it=K/2,Ot=ce(T),Ut="".concat(Ot,"-gradient"),Ht=it-ae/2,Xt=Math.PI*2*Ht,Vt=Me>0?90+Me/2:-90,hn=Xt*((360-Me)/360),Dn=(0,D.Z)(j)==="object"?j:{count:j,gap:2},sn=Dn.count,An=Dn.gap,Kt=Y(tt),kt=Y(F),te=kt.find(function(Wt){return Wt&&(0,D.Z)(Wt)==="object"}),he=te&&(0,D.Z)(te)==="object",st=he?"butt":oe,Rt=B(Xt,hn,0,100,Vt,Me,Xe,ee,st,ae),Ft=I(),Gt=function(){var Qt=0;return Kt.map(function(un,gn){var Fn=kt[gn]||kt[kt.length-1],Pn=B(Xt,hn,Qt,un,Vt,Me,Xe,Fn,st,ae);return Qt+=un,d.createElement(Ve,{key:gn,color:Fn,ptg:un,radius:Ht,prefixCls:$e,gradientId:Ut,style:Pn,strokeLinecap:st,strokeWidth:ae,gapDegree:Me,ref:function(On){Ft[gn]=On},size:K})}).reverse()},qt=function(){var Qt=Math.round(sn*(Kt[0]/100)),un=100/sn,gn=0;return new Array(sn).fill(null).map(function(Fn,Pn){var bn=Pn<=Qt-1?kt[0]:ee,On=bn&&(0,D.Z)(bn)==="object"?"url(#".concat(Ut,")"):void 0,Sn=B(Xt,hn,gn,un,Vt,Me,Xe,bn,"butt",ae,An);return gn+=(hn-Sn.strokeDashoffset+An)*100/hn,d.createElement("circle",{key:Pn,className:"".concat($e,"-circle-path"),r:Ht,cx:it,cy:it,stroke:On,strokeWidth:ae,opacity:1,style:Sn,ref:function(rt){Ft[Pn]=rt}})})};return d.createElement("svg",(0,U.Z)({className:J()("".concat($e,"-circle"),ze),viewBox:"0 0 ".concat(K," ").concat(K),style:xe,id:T,role:"presentation"},se),!sn&&d.createElement("circle",{className:"".concat($e,"-circle-trail"),r:Ht,cx:it,cy:it,stroke:ee,strokeLinecap:st,strokeWidth:xt||ae,style:Rt}),sn?qt():Gt())},P=Q,b={Line:G,Circle:P},E=_(25399),N=_(68361);function ie(be){return!be||be<0?0:be>100?100:be}function Ie(be){let{success:Je,successPercent:x}=be,T=x;return Je&&"progress"in Je&&(T=Je.progress),Je&&"percent"in Je&&(T=Je.percent),T}const Ze=be=>{let{percent:Je,success:x,successPercent:T}=be;const $e=ie(Ie({success:x,successPercent:T}));return[$e,ie(ie(Je)-$e)]},me=be=>{let{success:Je={},strokeColor:x}=be;const{strokeColor:T}=Je;return[T||N.presetPrimaryColors.green,x||null]},Ce=(be,Je,x)=>{var T,$e,j,ae;let xt=-1,Ae=-1;if(Je==="step"){const Me=x.steps,Xe=x.strokeWidth;typeof be=="string"||typeof be=="undefined"?(xt=be==="small"?2:14,Ae=Xe!=null?Xe:8):typeof be=="number"?[xt,Ae]=[be,be]:[xt=14,Ae=8]=Array.isArray(be)?be:[be.width,be.height],xt*=Me}else if(Je==="line"){const Me=x==null?void 0:x.strokeWidth;typeof be=="string"||typeof be=="undefined"?Ae=Me||(be==="small"?6:8):typeof be=="number"?[xt,Ae]=[be,be]:[xt=-1,Ae=8]=Array.isArray(be)?be:[be.width,be.height]}else(Je==="circle"||Je==="dashboard")&&(typeof be=="string"||typeof be=="undefined"?[xt,Ae]=be==="small"?[60,60]:[120,120]:typeof be=="number"?[xt,Ae]=[be,be]:Array.isArray(be)&&(xt=($e=(T=be[0])!==null&&T!==void 0?T:be[1])!==null&&$e!==void 0?$e:120,Ae=(ae=(j=be[0])!==null&&j!==void 0?j:be[1])!==null&&ae!==void 0?ae:120));return[xt,Ae]},Ke=3,Qe=be=>Ke/be*100;var wt=be=>{const{prefixCls:Je,trailColor:x=null,strokeLinecap:T="round",gapPosition:$e,gapDegree:j,width:ae=120,type:xt,children:Ae,success:Me,size:Xe=ae,steps:ee}=be,[oe,xe]=Ce(Xe,"circle");let{strokeWidth:ze}=be;ze===void 0&&(ze=Math.max(Qe(oe),6));const F={width:oe,height:xe,fontSize:oe*.15+6},tt=d.useMemo(()=>{if(j||j===0)return j;if(xt==="dashboard")return 75},[j,xt]),se=Ze(be),it=$e||xt==="dashboard"&&"bottom"||void 0,Ot=Object.prototype.toString.call(be.strokeColor)==="[object Object]",Ut=me({success:Me,strokeColor:be.strokeColor}),Ht=J()(`${Je}-inner`,{[`${Je}-circle-gradient`]:Ot}),Xt=d.createElement(P,{steps:ee,percent:ee?se[1]:se,strokeWidth:ze,trailWidth:ze,strokeColor:ee?Ut[1]:Ut,strokeLinecap:T,trailColor:x,prefixCls:Je,gapDegree:tt,gapPosition:it}),Vt=oe<=20,hn=d.createElement("div",{className:Ht,style:F},Xt,!Vt&&Ae);return Vt?d.createElement(E.Z,{title:Ae},hn):hn},Ue=_(36237),bt=_(63356),Le=_(16931),lt=_(51636);const Re="--progress-line-stroke-color",Te="--progress-percent",pe=be=>{const Je=be?"100%":"-100%";return new Ue.Keyframes(`antProgress${be?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Je}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Je}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},We=be=>{const{componentCls:Je,iconCls:x}=be;return{[Je]:Object.assign(Object.assign({},(0,bt.Wf)(be)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:be.fontSize},[`${Je}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${Je}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:be.remainingColor,borderRadius:be.lineBorderRadius},[`${Je}-inner:not(${Je}-circle-gradient)`]:{[`${Je}-circle-path`]:{stroke:be.defaultColor}},[`${Je}-success-bg, ${Je}-bg`]:{position:"relative",background:be.defaultColor,borderRadius:be.lineBorderRadius,transition:`all ${be.motionDurationSlow} ${be.motionEaseInOutCirc}`},[`${Je}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${Je}-text`]:{width:"max-content",marginInlineStart:0,marginTop:be.marginXXS}},[`${Je}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${Re})`]},height:"100%",width:`calc(1 / var(${Te}) * 100%)`,display:"block"},[`&${Je}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${Je}-text-inner`]:{color:be.colorWhite,[`&${Je}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${Je}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:be.colorSuccess},[`${Je}-text`]:{display:"inline-block",marginInlineStart:be.marginXS,color:be.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[x]:{fontSize:be.fontSize},[`&${Je}-text-outer`]:{width:"max-content"},[`&${Je}-text-outer${Je}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:be.marginXS}},[`${Je}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,Ue.unit)(be.paddingXXS)}`,[`&${Je}-text-start`]:{justifyContent:"start"},[`&${Je}-text-end`]:{justifyContent:"end"}},[`&${Je}-status-active`]:{[`${Je}-bg::before`]:{position:"absolute",inset:0,backgroundColor:be.colorBgContainer,borderRadius:be.lineBorderRadius,opacity:0,animationName:pe(),animationDuration:be.progressActiveMotionDuration,animationTimingFunction:be.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Je}-rtl${Je}-status-active`]:{[`${Je}-bg::before`]:{animationName:pe(!0)}},[`&${Je}-status-exception`]:{[`${Je}-bg`]:{backgroundColor:be.colorError},[`${Je}-text`]:{color:be.colorError}},[`&${Je}-status-exception ${Je}-inner:not(${Je}-circle-gradient)`]:{[`${Je}-circle-path`]:{stroke:be.colorError}},[`&${Je}-status-success`]:{[`${Je}-bg`]:{backgroundColor:be.colorSuccess},[`${Je}-text`]:{color:be.colorSuccess}},[`&${Je}-status-success ${Je}-inner:not(${Je}-circle-gradient)`]:{[`${Je}-circle-path`]:{stroke:be.colorSuccess}}})}},De=be=>{const{componentCls:Je,iconCls:x}=be;return{[Je]:{[`${Je}-circle-trail`]:{stroke:be.remainingColor},[`&${Je}-circle ${Je}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Je}-circle ${Je}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:be.circleTextColor,fontSize:be.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[x]:{fontSize:be.circleIconFontSize}},[`${Je}-circle&-status-exception`]:{[`${Je}-text`]:{color:be.colorError}},[`${Je}-circle&-status-success`]:{[`${Je}-text`]:{color:be.colorSuccess}}},[`${Je}-inline-circle`]:{lineHeight:1,[`${Je}-inner`]:{verticalAlign:"bottom"}}}},Se=be=>{const{componentCls:Je}=be;return{[Je]:{[`${Je}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:be.progressStepMinWidth,marginInlineEnd:be.progressStepMarginInlineEnd,backgroundColor:be.remainingColor,transition:`all ${be.motionDurationSlow}`,"&-active":{backgroundColor:be.defaultColor}}}}}},k=be=>{const{componentCls:Je,iconCls:x}=be;return{[Je]:{[`${Je}-small&-line, ${Je}-small&-line ${Je}-text ${x}`]:{fontSize:be.fontSizeSM}}}},fe=be=>({circleTextColor:be.colorText,defaultColor:be.colorInfo,remainingColor:be.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${be.fontSize/be.fontSizeSM}em`});var ve=(0,Le.I$)("Progress",be=>{const Je=be.calc(be.marginXXS).div(2).equal(),x=(0,lt.mergeToken)(be,{progressStepMarginInlineEnd:Je,progressStepMinWidth:Je,progressActiveMotionDuration:"2.4s"});return[We(x),De(x),Se(x),k(x)]},fe),Be=function(be,Je){var x={};for(var T in be)Object.prototype.hasOwnProperty.call(be,T)&&Je.indexOf(T)<0&&(x[T]=be[T]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,T=Object.getOwnPropertySymbols(be);$e<T.length;$e++)Je.indexOf(T[$e])<0&&Object.prototype.propertyIsEnumerable.call(be,T[$e])&&(x[T[$e]]=be[T[$e]]);return x};const qe=be=>{let Je=[];return Object.keys(be).forEach(x=>{const T=parseFloat(x.replace(/%/g,""));Number.isNaN(T)||Je.push({key:T,value:be[x]})}),Je=Je.sort((x,T)=>x.key-T.key),Je.map(x=>{let{key:T,value:$e}=x;return`${$e} ${T}%`}).join(", ")},at=(be,Je)=>{const{from:x=N.presetPrimaryColors.blue,to:T=N.presetPrimaryColors.blue,direction:$e=Je==="rtl"?"to left":"to right"}=be,j=Be(be,["from","to","direction"]);if(Object.keys(j).length!==0){const xt=qe(j),Ae=`linear-gradient(${$e}, ${xt})`;return{background:Ae,[Re]:Ae}}const ae=`linear-gradient(${$e}, ${x}, ${T})`;return{background:ae,[Re]:ae}};var mt=be=>{const{prefixCls:Je,direction:x,percent:T,size:$e,strokeWidth:j,strokeColor:ae,strokeLinecap:xt="round",children:Ae,trailColor:Me=null,percentPosition:Xe,success:ee}=be,{align:oe,type:xe}=Xe,ze=ae&&typeof ae!="string"?at(ae,x):{[Re]:ae,background:ae},F=xt==="square"||xt==="butt"?0:void 0,tt=$e!=null?$e:[-1,j||($e==="small"?6:8)],[se,it]=Ce(tt,"line",{strokeWidth:j}),Ot={backgroundColor:Me||void 0,borderRadius:F},Ut=Object.assign(Object.assign({width:`${ie(T)}%`,height:it,borderRadius:F},ze),{[Te]:ie(T)/100}),Ht=Ie(be),Xt={width:`${ie(Ht)}%`,height:it,borderRadius:F,backgroundColor:ee==null?void 0:ee.strokeColor},Vt={width:se<0?"100%":se},hn=d.createElement("div",{className:`${Je}-inner`,style:Ot},d.createElement("div",{className:J()(`${Je}-bg`,`${Je}-bg-${xe}`),style:Ut},xe==="inner"&&Ae),Ht!==void 0&&d.createElement("div",{className:`${Je}-success-bg`,style:Xt})),Dn=xe==="outer"&&oe==="start",sn=xe==="outer"&&oe==="end";return xe==="outer"&&oe==="center"?d.createElement("div",{className:`${Je}-layout-bottom`},hn,Ae):d.createElement("div",{className:`${Je}-outer`,style:Vt},Dn&&Ae,hn,sn&&Ae)},gt=be=>{const{size:Je,steps:x,rounding:T=Math.round,percent:$e=0,strokeWidth:j=8,strokeColor:ae,trailColor:xt=null,prefixCls:Ae,children:Me}=be,Xe=T(x*($e/100)),ee=Je==="small"?2:14,oe=Je!=null?Je:[ee,j],[xe,ze]=Ce(oe,"step",{steps:x,strokeWidth:j}),F=xe/x,tt=Array.from({length:x});for(let se=0;se<x;se++){const it=Array.isArray(ae)?ae[se]:ae;tt[se]=d.createElement("div",{key:se,className:J()(`${Ae}-steps-item`,{[`${Ae}-steps-item-active`]:se<=Xe-1}),style:{backgroundColor:se<=Xe-1?it:xt,width:F,height:ze}})}return d.createElement("div",{className:`${Ae}-steps-outer`},tt,Me)},Lt=function(be,Je){var x={};for(var T in be)Object.prototype.hasOwnProperty.call(be,T)&&Je.indexOf(T)<0&&(x[T]=be[T]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,T=Object.getOwnPropertySymbols(be);$e<T.length;$e++)Je.indexOf(T[$e])<0&&Object.prototype.propertyIsEnumerable.call(be,T[$e])&&(x[T[$e]]=be[T[$e]]);return x};const St=null,Ct=["normal","exception","active","success"];var vt=d.forwardRef((be,Je)=>{const{prefixCls:x,className:T,rootClassName:$e,steps:j,strokeColor:ae,percent:xt=0,size:Ae="default",showInfo:Me=!0,type:Xe="line",status:ee,format:oe,style:xe,percentPosition:ze={}}=be,F=Lt(be,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:tt="end",type:se="outer"}=ze,it=Array.isArray(ae)?ae[0]:ae,Ot=typeof ae=="string"||Array.isArray(ae)?ae:void 0,Ut=d.useMemo(()=>{if(it){const Gt=typeof it=="string"?it:Object.values(it)[0];return new ge.FastColor(Gt).isLight()}return!1},[ae]),Ht=d.useMemo(()=>{var Gt,qt;const Wt=Ie(be);return parseInt(Wt!==void 0?(Gt=Wt!=null?Wt:0)===null||Gt===void 0?void 0:Gt.toString():(qt=xt!=null?xt:0)===null||qt===void 0?void 0:qt.toString(),10)},[xt,be.success,be.successPercent]),Xt=d.useMemo(()=>!Ct.includes(ee)&&Ht>=100?"success":ee||"normal",[ee,Ht]),{getPrefixCls:Vt,direction:hn,progress:Dn}=d.useContext(X.E_),sn=Vt("progress",x),[An,Kt,kt]=ve(sn),te=Xe==="line",he=te&&!j,st=d.useMemo(()=>{if(!Me)return null;const Gt=Ie(be);let qt;const Wt=oe||(un=>`${un}%`),Qt=te&&Ut&&se==="inner";return se==="inner"||oe||Xt!=="exception"&&Xt!=="success"?qt=Wt(ie(xt),ie(Gt)):Xt==="exception"?qt=te?d.createElement(W.Z,null):d.createElement(g.Z,null):Xt==="success"&&(qt=te?d.createElement(Ee.Z,null):d.createElement(ye.Z,null)),d.createElement("span",{className:J()(`${sn}-text`,{[`${sn}-text-bright`]:Qt,[`${sn}-text-${tt}`]:he,[`${sn}-text-${se}`]:he}),title:typeof qt=="string"?qt:void 0},qt)},[Me,xt,Ht,Xt,Xe,sn,oe]);let Rt;Xe==="line"?Rt=j?d.createElement(gt,Object.assign({},be,{strokeColor:Ot,prefixCls:sn,steps:typeof j=="object"?j.count:j}),st):d.createElement(mt,Object.assign({},be,{strokeColor:it,prefixCls:sn,direction:hn,percentPosition:{align:tt,type:se}}),st):(Xe==="circle"||Xe==="dashboard")&&(Rt=d.createElement(wt,Object.assign({},be,{strokeColor:it,prefixCls:sn,progressStatus:Xt}),st));const Ft=J()(sn,`${sn}-status-${Xt}`,{[`${sn}-${Xe==="dashboard"&&"circle"||Xe}`]:Xe!=="line",[`${sn}-inline-circle`]:Xe==="circle"&&Ce(Ae,"circle")[0]<=20,[`${sn}-line`]:he,[`${sn}-line-align-${tt}`]:he,[`${sn}-line-position-${se}`]:he,[`${sn}-steps`]:j,[`${sn}-show-info`]:Me,[`${sn}-${Ae}`]:typeof Ae=="string",[`${sn}-rtl`]:hn==="rtl"},Dn==null?void 0:Dn.className,T,$e,Kt,kt);return An(d.createElement("div",Object.assign({ref:Je,style:Object.assign(Object.assign({},Dn==null?void 0:Dn.style),xe),className:Ft,role:"progressbar","aria-valuenow":Ht,"aria-valuemin":0,"aria-valuemax":100},(0,o.Z)(F,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),Rt))}),pt=vt},47889:function(Jt,ot,_){"use strict";_.d(ot,{ZP:function(){return Ze}});var d=_(59301),ge=_(92310),Ee=_.n(ge),ye=_(18929),W=_(26112),g=_(48755),ne=_(83397),J=_(31756);const o=d.createContext(null),X=o.Provider;var U=o;const S=d.createContext(null),w=S.Provider;var A=_(16632),I=_(8654),q=_(12919),re=_(63872),G=_(74632),D=_(2171),H=_(56553),$=_(36237),z=_(63356),de=_(16931),we=_(51636);const ce=me=>{const{componentCls:Ce,antCls:Ke}=me,Qe=`${Ce}-group`;return{[Qe]:Object.assign(Object.assign({},(0,z.Wf)(me)),{display:"inline-block",fontSize:0,[`&${Qe}-rtl`]:{direction:"rtl"},[`&${Qe}-block`]:{display:"flex"},[`${Ke}-badge ${Ke}-badge-count`]:{zIndex:1},[`> ${Ke}-badge:not(:first-child) > ${Ke}-button-wrapper`]:{borderInlineStart:"none"}})}},Oe=me=>{const{componentCls:Ce,wrapperMarginInlineEnd:Ke,colorPrimary:Qe,radioSize:Ge,motionDurationSlow:wt,motionDurationMid:Ue,motionEaseInOutCirc:bt,colorBgContainer:Le,colorBorder:lt,lineWidth:Re,colorBgContainerDisabled:Te,colorTextDisabled:pe,paddingXS:We,dotColorDisabled:De,lineType:Se,radioColor:k,radioBgColor:fe,calc:ve}=me,Be=`${Ce}-inner`,at=ve(Ge).sub(ve(4).mul(2)),ct=ve(1).mul(Ge).equal({unit:!0});return{[`${Ce}-wrapper`]:Object.assign(Object.assign({},(0,z.Wf)(me)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Ke,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${Ce}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:me.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${Ce}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${(0,$.unit)(Re)} ${Se} ${Qe}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[Ce]:Object.assign(Object.assign({},(0,z.Wf)(me)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${Ce}-wrapper:hover &,
|
|
&:hover ${Be}`]:{borderColor:Qe},[`${Ce}-input:focus-visible + ${Be}`]:Object.assign({},(0,z.oN)(me)),[`${Ce}:hover::after, ${Ce}-wrapper:hover &::after`]:{visibility:"visible"},[`${Ce}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:ct,height:ct,marginBlockStart:ve(1).mul(Ge).div(-2).equal({unit:!0}),marginInlineStart:ve(1).mul(Ge).div(-2).equal({unit:!0}),backgroundColor:k,borderBlockStart:0,borderInlineStart:0,borderRadius:ct,transform:"scale(0)",opacity:0,transition:`all ${wt} ${bt}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:ct,height:ct,backgroundColor:Le,borderColor:lt,borderStyle:"solid",borderWidth:Re,borderRadius:"50%",transition:`all ${Ue}`},[`${Ce}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${Ce}-checked`]:{[Be]:{borderColor:Qe,backgroundColor:fe,"&::after":{transform:`scale(${me.calc(me.dotSize).div(Ge).equal()})`,opacity:1,transition:`all ${wt} ${bt}`}}},[`${Ce}-disabled`]:{cursor:"not-allowed",[Be]:{backgroundColor:Te,borderColor:lt,cursor:"not-allowed","&::after":{backgroundColor:De}},[`${Ce}-input`]:{cursor:"not-allowed"},[`${Ce}-disabled + span`]:{color:pe,cursor:"not-allowed"},[`&${Ce}-checked`]:{[Be]:{"&::after":{transform:`scale(${ve(at).div(Ge).equal()})`}}}},[`span${Ce} + *`]:{paddingInlineStart:We,paddingInlineEnd:We}})}},Fe=me=>{const{buttonColor:Ce,controlHeight:Ke,componentCls:Qe,lineWidth:Ge,lineType:wt,colorBorder:Ue,motionDurationSlow:bt,motionDurationMid:Le,buttonPaddingInline:lt,fontSize:Re,buttonBg:Te,fontSizeLG:pe,controlHeightLG:We,controlHeightSM:De,paddingXS:Se,borderRadius:k,borderRadiusSM:fe,borderRadiusLG:ve,buttonCheckedBg:Be,buttonSolidCheckedColor:qe,colorTextDisabled:at,colorBgContainerDisabled:ct,buttonCheckedBgDisabled:mt,buttonCheckedColorDisabled:dt,colorPrimary:gt,colorPrimaryHover:Lt,colorPrimaryActive:St,buttonSolidCheckedBg:Ct,buttonSolidCheckedHoverBg:nt,buttonSolidCheckedActiveBg:vt,calc:pt}=me;return{[`${Qe}-button-wrapper`]:{position:"relative",display:"inline-block",height:Ke,margin:0,paddingInline:lt,paddingBlock:0,color:Ce,fontSize:Re,lineHeight:(0,$.unit)(pt(Ke).sub(pt(Ge).mul(2)).equal()),background:Te,border:`${(0,$.unit)(Ge)} ${wt} ${Ue}`,borderBlockStartWidth:pt(Ge).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:Ge,cursor:"pointer",transition:[`color ${Le}`,`background ${Le}`,`box-shadow ${Le}`].join(","),a:{color:Ce},[`> ${Qe}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:pt(Ge).mul(-1).equal(),insetInlineStart:pt(Ge).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Ge,paddingInline:0,backgroundColor:Ue,transition:`background-color ${bt}`,content:'""'}},"&:first-child":{borderInlineStart:`${(0,$.unit)(Ge)} ${wt} ${Ue}`,borderStartStartRadius:k,borderEndStartRadius:k},"&:last-child":{borderStartEndRadius:k,borderEndEndRadius:k},"&:first-child:last-child":{borderRadius:k},[`${Qe}-group-large &`]:{height:We,fontSize:pe,lineHeight:(0,$.unit)(pt(We).sub(pt(Ge).mul(2)).equal()),"&:first-child":{borderStartStartRadius:ve,borderEndStartRadius:ve},"&:last-child":{borderStartEndRadius:ve,borderEndEndRadius:ve}},[`${Qe}-group-small &`]:{height:De,paddingInline:pt(Se).sub(Ge).equal(),paddingBlock:0,lineHeight:(0,$.unit)(pt(De).sub(pt(Ge).mul(2)).equal()),"&:first-child":{borderStartStartRadius:fe,borderEndStartRadius:fe},"&:last-child":{borderStartEndRadius:fe,borderEndEndRadius:fe}},"&:hover":{position:"relative",color:gt},"&:has(:focus-visible)":Object.assign({},(0,z.oN)(me)),[`${Qe}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${Qe}-button-wrapper-disabled)`]:{zIndex:1,color:gt,background:Be,borderColor:gt,"&::before":{backgroundColor:gt},"&:first-child":{borderColor:gt},"&:hover":{color:Lt,borderColor:Lt,"&::before":{backgroundColor:Lt}},"&:active":{color:St,borderColor:St,"&::before":{backgroundColor:St}}},[`${Qe}-group-solid &-checked:not(${Qe}-button-wrapper-disabled)`]:{color:qe,background:Ct,borderColor:Ct,"&:hover":{color:qe,background:nt,borderColor:nt},"&:active":{color:qe,background:vt,borderColor:vt}},"&-disabled":{color:at,backgroundColor:ct,borderColor:Ue,cursor:"not-allowed","&:first-child, &:hover":{color:at,backgroundColor:ct,borderColor:Ue}},[`&-disabled${Qe}-button-wrapper-checked`]:{color:dt,backgroundColor:mt,borderColor:Ue,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},Ne=me=>{const{wireframe:Ce,padding:Ke,marginXS:Qe,lineWidth:Ge,fontSizeLG:wt,colorText:Ue,colorBgContainer:bt,colorTextDisabled:Le,controlItemBgActiveDisabled:lt,colorTextLightSolid:Re,colorPrimary:Te,colorPrimaryHover:pe,colorPrimaryActive:We,colorWhite:De}=me,Se=4,k=wt,fe=Ce?k-Se*2:k-(Se+Ge)*2;return{radioSize:k,dotSize:fe,dotColorDisabled:Le,buttonSolidCheckedColor:Re,buttonSolidCheckedBg:Te,buttonSolidCheckedHoverBg:pe,buttonSolidCheckedActiveBg:We,buttonBg:bt,buttonCheckedBg:bt,buttonColor:Ue,buttonCheckedBgDisabled:lt,buttonCheckedColorDisabled:Le,buttonPaddingInline:Ke-Ge,wrapperMarginInlineEnd:Qe,radioColor:Ce?Te:De,radioBgColor:Ce?bt:Te}};var Ve=(0,de.I$)("Radio",me=>{const{controlOutline:Ce,controlOutlineWidth:Ke}=me,Qe=`0 0 0 ${(0,$.unit)(Ke)} ${Ce}`,Ge=Qe,wt=(0,we.mergeToken)(me,{radioFocusShadow:Qe,radioButtonFocusShadow:Ge});return[ce(wt),Oe(wt),Fe(wt)]},Ne,{unitless:{radioSize:!0,dotSize:!0}}),K=function(me,Ce){var Ke={};for(var Qe in me)Object.prototype.hasOwnProperty.call(me,Qe)&&Ce.indexOf(Qe)<0&&(Ke[Qe]=me[Qe]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Qe=Object.getOwnPropertySymbols(me);Ge<Qe.length;Ge++)Ce.indexOf(Qe[Ge])<0&&Object.prototype.propertyIsEnumerable.call(me,Qe[Ge])&&(Ke[Qe[Ge]]=me[Qe[Ge]]);return Ke};const B=(me,Ce)=>{var Ke,Qe;const Ge=d.useContext(U),wt=d.useContext(S),{getPrefixCls:Ue,direction:bt,radio:Le}=d.useContext(g.E_),lt=d.useRef(null),Re=(0,I.sQ)(Ce,lt),{isFormItemInput:Te}=d.useContext(H.aM),pe=be=>{var Je,x;(Je=me.onChange)===null||Je===void 0||Je.call(me,be),(x=Ge==null?void 0:Ge.onChange)===null||x===void 0||x.call(Ge,be)},{prefixCls:We,className:De,rootClassName:Se,children:k,style:fe,title:ve}=me,Be=K(me,["prefixCls","className","rootClassName","children","style","title"]),qe=Ue("radio",We),at=((Ge==null?void 0:Ge.optionType)||wt)==="button",ct=at?`${qe}-button`:qe,mt=(0,ne.Z)(qe),[dt,gt,Lt]=Ve(qe,mt),St=Object.assign({},Be),Ct=d.useContext(D.Z);Ge&&(St.name=Ge.name,St.onChange=pe,St.checked=me.value===Ge.value,St.disabled=(Ke=St.disabled)!==null&&Ke!==void 0?Ke:Ge.disabled),St.disabled=(Qe=St.disabled)!==null&&Qe!==void 0?Qe:Ct;const nt=Ee()(`${ct}-wrapper`,{[`${ct}-wrapper-checked`]:St.checked,[`${ct}-wrapper-disabled`]:St.disabled,[`${ct}-wrapper-rtl`]:bt==="rtl",[`${ct}-wrapper-in-form-item`]:Te,[`${ct}-wrapper-block`]:!!(Ge!=null&&Ge.block)},Le==null?void 0:Le.className,De,Se,gt,Lt,mt),[vt,pt]=(0,G.Z)(St.onClick);return dt(d.createElement(q.Z,{component:"Radio",disabled:St.disabled},d.createElement("label",{className:nt,style:Object.assign(Object.assign({},Le==null?void 0:Le.style),fe),onMouseEnter:me.onMouseEnter,onMouseLeave:me.onMouseLeave,title:ve,onClick:vt},d.createElement(A.Z,Object.assign({},St,{className:Ee()(St.className,{[re.A]:!at}),type:"radio",prefixCls:ct,ref:Re,onClick:pt})),k!==void 0?d.createElement("span",{className:`${ct}-label`},k):null)))};var Y=d.forwardRef(B),Q=_(80402);const P=d.forwardRef((me,Ce)=>{const{getPrefixCls:Ke,direction:Qe}=d.useContext(g.E_),Ge=(0,Q.Z)(),{prefixCls:wt,className:Ue,rootClassName:bt,options:Le,buttonStyle:lt="outline",disabled:Re,children:Te,size:pe,style:We,id:De,optionType:Se,name:k=Ge,defaultValue:fe,value:ve,block:Be=!1,onChange:qe,onMouseEnter:at,onMouseLeave:ct,onFocus:mt,onBlur:dt}=me,[gt,Lt]=(0,ye.Z)(fe,{value:ve}),St=d.useCallback(ae=>{const xt=gt,Ae=ae.target.value;"value"in me||Lt(Ae),Ae!==xt&&(qe==null||qe(ae))},[gt,Lt,qe]),Ct=Ke("radio",wt),nt=`${Ct}-group`,vt=(0,ne.Z)(Ct),[pt,be,Je]=Ve(Ct,vt);let x=Te;Le&&Le.length>0&&(x=Le.map(ae=>typeof ae=="string"||typeof ae=="number"?d.createElement(Y,{key:ae.toString(),prefixCls:Ct,disabled:Re,value:ae,checked:gt===ae},ae):d.createElement(Y,{key:`radio-group-value-options-${ae.value}`,prefixCls:Ct,disabled:ae.disabled||Re,value:ae.value,checked:gt===ae.value,title:ae.title,style:ae.style,id:ae.id,required:ae.required},ae.label)));const T=(0,J.Z)(pe),$e=Ee()(nt,`${nt}-${lt}`,{[`${nt}-${T}`]:T,[`${nt}-rtl`]:Qe==="rtl",[`${nt}-block`]:Be},Ue,bt,be,Je,vt),j=d.useMemo(()=>({onChange:St,value:gt,disabled:Re,name:k,optionType:Se,block:Be}),[St,gt,Re,k,Se,Be]);return pt(d.createElement("div",Object.assign({},(0,W.Z)(me,{aria:!0,data:!0}),{className:$e,style:We,onMouseEnter:at,onMouseLeave:ct,onFocus:mt,onBlur:dt,id:De,ref:Ce}),d.createElement(X,{value:j},x)))});var b=d.memo(P),E=function(me,Ce){var Ke={};for(var Qe in me)Object.prototype.hasOwnProperty.call(me,Qe)&&Ce.indexOf(Qe)<0&&(Ke[Qe]=me[Qe]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Qe=Object.getOwnPropertySymbols(me);Ge<Qe.length;Ge++)Ce.indexOf(Qe[Ge])<0&&Object.prototype.propertyIsEnumerable.call(me,Qe[Ge])&&(Ke[Qe[Ge]]=me[Qe[Ge]]);return Ke};const N=(me,Ce)=>{const{getPrefixCls:Ke}=d.useContext(g.E_),{prefixCls:Qe}=me,Ge=E(me,["prefixCls"]),wt=Ke("radio",Qe);return d.createElement(w,{value:"button"},d.createElement(Y,Object.assign({prefixCls:wt},Ge,{type:"radio",ref:Ce})))};var ie=d.forwardRef(N);const Ie=Y;Ie.Button=ie,Ie.Group=b,Ie.__ANT_RADIO=!0;var Ze=Ie},63139:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return Ze}});var d=_(59301),ge=_(60499),Ee={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"},ye=Ee,W=_(7657),g=function(Ce,Ke){return d.createElement(W.Z,(0,ge.Z)({},Ce,{ref:Ke,icon:ye}))},ne=d.forwardRef(g),J=ne,o=_(92310),X=_.n(o),U=_(18642),S=_(72190),w=_(42244),A=_(18929),I=_(10228),q=_(26112);function re(me,Ce){var Ke=me.disabled,Qe=me.prefixCls,Ge=me.character,wt=me.characterRender,Ue=me.index,bt=me.count,Le=me.value,lt=me.allowHalf,Re=me.focused,Te=me.onHover,pe=me.onClick,We=function(at){Te(at,Ue)},De=function(at){pe(at,Ue)},Se=function(at){at.keyCode===I.Z.ENTER&&pe(at,Ue)},k=Ue+1,fe=new Set([Qe]);Le===0&&Ue===0&&Re?fe.add("".concat(Qe,"-focused")):lt&&Le+.5>=k&&Le<k?(fe.add("".concat(Qe,"-half")),fe.add("".concat(Qe,"-active")),Re&&fe.add("".concat(Qe,"-focused"))):(k<=Le?fe.add("".concat(Qe,"-full")):fe.add("".concat(Qe,"-zero")),k===Le&&Re&&fe.add("".concat(Qe,"-focused")));var ve=typeof Ge=="function"?Ge(me):Ge,Be=d.createElement("li",{className:X()(Array.from(fe)),ref:Ce},d.createElement("div",{onClick:Ke?null:De,onKeyDown:Ke?null:Se,onMouseMove:Ke?null:We,role:"radio","aria-checked":Le>Ue?"true":"false","aria-posinset":Ue+1,"aria-setsize":bt,tabIndex:Ke?-1:0},d.createElement("div",{className:"".concat(Qe,"-first")},ve),d.createElement("div",{className:"".concat(Qe,"-second")},ve)));return wt&&(Be=wt(Be,me)),Be}var G=d.forwardRef(re);function D(){var me=d.useRef({});function Ce(Qe){return me.current[Qe]}function Ke(Qe){return function(Ge){me.current[Qe]=Ge}}return[Ce,Ke]}function H(me){var Ce=me.pageXOffset,Ke="scrollLeft";if(typeof Ce!="number"){var Qe=me.document;Ce=Qe.documentElement[Ke],typeof Ce!="number"&&(Ce=Qe.body[Ke])}return Ce}function $(me){var Ce,Ke,Qe=me.ownerDocument,Ge=Qe.body,wt=Qe&&Qe.documentElement,Ue=me.getBoundingClientRect();return Ce=Ue.left,Ke=Ue.top,Ce-=wt.clientLeft||Ge.clientLeft||0,Ke-=wt.clientTop||Ge.clientTop||0,{left:Ce,top:Ke}}function z(me){var Ce=$(me),Ke=me.ownerDocument,Qe=Ke.defaultView||Ke.parentWindow;return Ce.left+=H(Qe),Ce.left}var de=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function we(me,Ce){var Ke=me.prefixCls,Qe=Ke===void 0?"rc-rate":Ke,Ge=me.className,wt=me.defaultValue,Ue=me.value,bt=me.count,Le=bt===void 0?5:bt,lt=me.allowHalf,Re=lt===void 0?!1:lt,Te=me.allowClear,pe=Te===void 0?!0:Te,We=me.keyboard,De=We===void 0?!0:We,Se=me.character,k=Se===void 0?"\u2605":Se,fe=me.characterRender,ve=me.disabled,Be=me.direction,qe=Be===void 0?"ltr":Be,at=me.tabIndex,ct=at===void 0?0:at,mt=me.autoFocus,dt=me.onHoverChange,gt=me.onChange,Lt=me.onFocus,St=me.onBlur,Ct=me.onKeyDown,nt=me.onMouseLeave,vt=(0,w.Z)(me,de),pt=D(),be=(0,S.Z)(pt,2),Je=be[0],x=be[1],T=d.useRef(null),$e=function(){if(!ve){var st;(st=T.current)===null||st===void 0||st.focus()}};d.useImperativeHandle(Ce,function(){return{focus:$e,blur:function(){if(!ve){var st;(st=T.current)===null||st===void 0||st.blur()}}}});var j=(0,A.Z)(wt||0,{value:Ue}),ae=(0,S.Z)(j,2),xt=ae[0],Ae=ae[1],Me=(0,A.Z)(null),Xe=(0,S.Z)(Me,2),ee=Xe[0],oe=Xe[1],xe=function(st,Rt){var Ft=qe==="rtl",Gt=st+1;if(Re){var qt=Je(st),Wt=z(qt),Qt=qt.clientWidth;(Ft&&Rt-Wt>Qt/2||!Ft&&Rt-Wt<Qt/2)&&(Gt-=.5)}return Gt},ze=function(st){Ae(st),gt==null||gt(st)},F=d.useState(!1),tt=(0,S.Z)(F,2),se=tt[0],it=tt[1],Ot=function(){it(!0),Lt==null||Lt()},Ut=function(){it(!1),St==null||St()},Ht=d.useState(null),Xt=(0,S.Z)(Ht,2),Vt=Xt[0],hn=Xt[1],Dn=function(st,Rt){var Ft=xe(Rt,st.pageX);Ft!==ee&&(hn(Ft),oe(null)),dt==null||dt(Ft)},sn=function(st){ve||(hn(null),oe(null),dt==null||dt(void 0)),st&&(nt==null||nt(st))},An=function(st,Rt){var Ft=xe(Rt,st.pageX),Gt=!1;pe&&(Gt=Ft===xt),sn(),ze(Gt?0:Ft),oe(Gt?Ft:null)},Kt=function(st){var Rt=st.keyCode,Ft=qe==="rtl",Gt=Re?.5:1;De&&(Rt===I.Z.RIGHT&&xt<Le&&!Ft?(ze(xt+Gt),st.preventDefault()):Rt===I.Z.LEFT&&xt>0&&!Ft||Rt===I.Z.RIGHT&&xt>0&&Ft?(ze(xt-Gt),st.preventDefault()):Rt===I.Z.LEFT&&xt<Le&&Ft&&(ze(xt+Gt),st.preventDefault())),Ct==null||Ct(st)};d.useEffect(function(){mt&&!ve&&$e()},[]);var kt=new Array(Le).fill(0).map(function(he,st){return d.createElement(G,{ref:x(st),index:st,count:Le,disabled:ve,prefixCls:"".concat(Qe,"-star"),allowHalf:Re,value:Vt===null?xt:Vt,onClick:An,onHover:Dn,key:he||st,character:k,characterRender:fe,focused:se})}),te=X()(Qe,Ge,(0,U.Z)((0,U.Z)({},"".concat(Qe,"-disabled"),ve),"".concat(Qe,"-rtl"),qe==="rtl"));return d.createElement("ul",(0,ge.Z)({className:te,onMouseLeave:sn,tabIndex:ve?-1:ct,onFocus:ve?null:Ot,onBlur:ve?null:Ut,onKeyDown:ve?null:Kt,ref:T},(0,q.Z)(vt,{aria:!0,data:!0,attr:!0})),kt)}var ce=d.forwardRef(we),Oe=ce,Fe=_(48755),Ne=_(25399),Ve=_(36237),K=_(63356),B=_(16931),L=_(51636);const Y=me=>{const{componentCls:Ce}=me;return{[`${Ce}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:me.marginXS},"> div":{transition:`all ${me.motionDurationMid}, outline 0s`,"&:hover":{transform:me.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${(0,Ve.unit)(me.lineWidth)} dashed ${me.starColor}`,transform:me.starHoverScale}},"&-first, &-second":{color:me.starBg,transition:`all ${me.motionDurationMid}`,userSelect:"none"},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${Ce}-star-first, &-half ${Ce}-star-second`]:{opacity:1},[`&-half ${Ce}-star-first, &-full ${Ce}-star-second`]:{color:"inherit"}}}},Q=me=>({[`&-rtl${me.componentCls}`]:{direction:"rtl"}}),P=me=>{const{componentCls:Ce}=me;return{[Ce]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,K.Wf)(me)),{display:"inline-block",margin:0,padding:0,color:me.starColor,fontSize:me.starSize,lineHeight:1,listStyle:"none",outline:"none",[`&-disabled${Ce} ${Ce}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),Y(me)),Q(me))}},b=me=>({starColor:me.yellow6,starSize:me.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:me.colorFillContent});var E=(0,B.I$)("Rate",me=>{const Ce=(0,L.mergeToken)(me,{});return[P(Ce)]},b),N=_(2171),ie=function(me,Ce){var Ke={};for(var Qe in me)Object.prototype.hasOwnProperty.call(me,Qe)&&Ce.indexOf(Qe)<0&&(Ke[Qe]=me[Qe]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Qe=Object.getOwnPropertySymbols(me);Ge<Qe.length;Ge++)Ce.indexOf(Qe[Ge])<0&&Object.prototype.propertyIsEnumerable.call(me,Qe[Ge])&&(Ke[Qe[Ge]]=me[Qe[Ge]]);return Ke},Ze=d.forwardRef((me,Ce)=>{const{prefixCls:Ke,className:Qe,rootClassName:Ge,style:wt,tooltips:Ue,character:bt=d.createElement(J,null),disabled:Le}=me,lt=ie(me,["prefixCls","className","rootClassName","style","tooltips","character","disabled"]),Re=(at,ct)=>{let{index:mt}=ct;return Ue?d.createElement(Ne.Z,{title:Ue[mt]},at):at},{getPrefixCls:Te,direction:pe,rate:We}=d.useContext(Fe.E_),De=Te("rate",Ke),[Se,k,fe]=E(De),ve=Object.assign(Object.assign({},We==null?void 0:We.style),wt),Be=d.useContext(N.Z),qe=Le!=null?Le:Be;return Se(d.createElement(Oe,Object.assign({ref:Ce,character:bt,characterRender:Re,disabled:qe},lt,{className:X()(Qe,Ge,k,fe,We==null?void 0:We.className),style:ve,prefixCls:De,direction:pe})))})},44104:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return q}});var d=_(59301),ge=_(92310),Ee=_.n(ge),ye=_(11592),W=_(99402),g=_(48755),ne=_(70045);const J=d.createContext({latestIndex:0}),o=J.Provider;var U=re=>{let{className:G,index:D,children:H,split:$,style:z}=re;const{latestIndex:de}=d.useContext(J);return H==null?null:d.createElement(d.Fragment,null,d.createElement("div",{className:G,style:z},H),D<de&&$&&d.createElement("span",{className:`${G}-split`},$))},S=_(31547),w=function(re,G){var D={};for(var H in re)Object.prototype.hasOwnProperty.call(re,H)&&G.indexOf(H)<0&&(D[H]=re[H]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $=0,H=Object.getOwnPropertySymbols(re);$<H.length;$++)G.indexOf(H[$])<0&&Object.prototype.propertyIsEnumerable.call(re,H[$])&&(D[H[$]]=re[H[$]]);return D};const I=d.forwardRef((re,G)=>{var D;const{getPrefixCls:H,direction:$,size:z,className:de,style:we,classNames:ce,styles:Oe}=(0,g.dj)("space"),{size:Fe=z!=null?z:"small",align:Ne,className:Ve,rootClassName:K,children:B,direction:L="horizontal",prefixCls:Y,split:Q,style:P,wrap:b=!1,classNames:E,styles:N}=re,ie=w(re,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ie,Ze]=Array.isArray(Fe)?Fe:[Fe,Fe],me=(0,W.n)(Ze),Ce=(0,W.n)(Ie),Ke=(0,W.T)(Ze),Qe=(0,W.T)(Ie),Ge=(0,ye.Z)(B,{keepEmpty:!0}),wt=Ne===void 0&&L==="horizontal"?"center":Ne,Ue=H("space",Y),[bt,Le,lt]=(0,S.Z)(Ue),Re=Ee()(Ue,de,Le,`${Ue}-${L}`,{[`${Ue}-rtl`]:$==="rtl",[`${Ue}-align-${wt}`]:wt,[`${Ue}-gap-row-${Ze}`]:me,[`${Ue}-gap-col-${Ie}`]:Ce},Ve,K,lt),Te=Ee()(`${Ue}-item`,(D=E==null?void 0:E.item)!==null&&D!==void 0?D:ce.item);let pe=0;const We=Ge.map((k,fe)=>{var ve;k!=null&&(pe=fe);const Be=(k==null?void 0:k.key)||`${Te}-${fe}`;return d.createElement(U,{className:Te,key:Be,index:fe,split:Q,style:(ve=N==null?void 0:N.item)!==null&&ve!==void 0?ve:Oe.item},k)}),De=d.useMemo(()=>({latestIndex:pe}),[pe]);if(Ge.length===0)return null;const Se={};return b&&(Se.flexWrap="wrap"),!Ce&&Qe&&(Se.columnGap=Ie),!me&&Ke&&(Se.rowGap=Ze),bt(d.createElement("div",Object.assign({ref:G,className:Re,style:Object.assign(Object.assign(Object.assign({},Se),we),P)},ie),d.createElement(o,{value:De},We)))});I.Compact=ne.ZP;var q=I},11938:function(Jt,ot,_){"use strict";_.d(ot,{default:function(){return Ne}});var d=_(59301),ge=_(40192),Ee=_(22703),ye=_(92310),W=_.n(ye),g=_(26112),ne=_(48755),J=_(458),X=Ve=>{const{value:K,formatter:B,precision:L,decimalSeparator:Y,groupSeparator:Q="",prefixCls:P}=Ve;let b;if(typeof B=="function")b=B(K);else{const E=String(K),N=E.match(/^(-?)(\d*)(\.(\d+))?$/);if(!N||E==="-")b=E;else{const ie=N[1];let Ie=N[2]||"0",Ze=N[4]||"";Ie=Ie.replace(/\B(?=(\d{3})+(?!\d))/g,Q),typeof L=="number"&&(Ze=Ze.padEnd(L,"0").slice(0,L>0?L:0)),Ze&&(Ze=`${Y}${Ze}`),b=[d.createElement("span",{key:"int",className:`${P}-content-value-int`},ie,Ie),Ze&&d.createElement("span",{key:"decimal",className:`${P}-content-value-decimal`},Ze)]}}return d.createElement("span",{className:`${P}-content-value`},b)},U=_(63356),S=_(16931),w=_(51636);const A=Ve=>{const{componentCls:K,marginXXS:B,padding:L,colorTextDescription:Y,titleFontSize:Q,colorTextHeading:P,contentFontSize:b,fontFamily:E}=Ve;return{[K]:Object.assign(Object.assign({},(0,U.Wf)(Ve)),{[`${K}-title`]:{marginBottom:B,color:Y,fontSize:Q},[`${K}-skeleton`]:{paddingTop:L},[`${K}-content`]:{color:P,fontSize:b,fontFamily:E,[`${K}-content-value`]:{display:"inline-block",direction:"ltr"},[`${K}-content-prefix, ${K}-content-suffix`]:{display:"inline-block"},[`${K}-content-prefix`]:{marginInlineEnd:B},[`${K}-content-suffix`]:{marginInlineStart:B}}})}},I=Ve=>{const{fontSizeHeading3:K,fontSize:B}=Ve;return{titleFontSize:B,contentFontSize:K}};var q=(0,S.I$)("Statistic",Ve=>{const K=(0,w.mergeToken)(Ve,{});return[A(K)]},I),re=function(Ve,K){var B={};for(var L in Ve)Object.prototype.hasOwnProperty.call(Ve,L)&&K.indexOf(L)<0&&(B[L]=Ve[L]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Y=0,L=Object.getOwnPropertySymbols(Ve);Y<L.length;Y++)K.indexOf(L[Y])<0&&Object.prototype.propertyIsEnumerable.call(Ve,L[Y])&&(B[L[Y]]=Ve[L[Y]]);return B},D=Ve=>{const{prefixCls:K,className:B,rootClassName:L,style:Y,valueStyle:Q,value:P=0,title:b,valueRender:E,prefix:N,suffix:ie,loading:Ie=!1,formatter:Ze,precision:me,decimalSeparator:Ce=".",groupSeparator:Ke=",",onMouseEnter:Qe,onMouseLeave:Ge}=Ve,wt=re(Ve,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:Ue,direction:bt,className:Le,style:lt}=(0,ne.dj)("statistic"),Re=Ue("statistic",K),[Te,pe,We]=q(Re),De=d.createElement(X,{decimalSeparator:Ce,groupSeparator:Ke,prefixCls:Re,formatter:Ze,precision:me,value:P}),Se=W()(Re,{[`${Re}-rtl`]:bt==="rtl"},Le,B,L,pe,We),k=(0,g.Z)(wt,{aria:!0,data:!0});return Te(d.createElement("div",Object.assign({},k,{className:Se,style:Object.assign(Object.assign({},lt),Y),onMouseEnter:Qe,onMouseLeave:Ge}),b&&d.createElement("div",{className:`${Re}-title`},b),d.createElement(J.Z,{paragraph:!1,loading:Ie,className:`${Re}-skeleton`},d.createElement("div",{style:Q,className:`${Re}-content`},N&&d.createElement("span",{className:`${Re}-content-prefix`},N),E?E(De):De,ie&&d.createElement("span",{className:`${Re}-content-suffix`},ie)))))};const H=[["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 $(Ve,K){let B=Ve;const L=/\[[^\]]*]/g,Y=(K.match(L)||[]).map(E=>E.slice(1,-1)),Q=K.replace(L,"[]"),P=H.reduce((E,N)=>{let[ie,Ie]=N;if(E.includes(ie)){const Ze=Math.floor(B/Ie);return B-=Ze*Ie,E.replace(new RegExp(`${ie}+`,"g"),me=>{const Ce=me.length;return Ze.toString().padStart(Ce,"0")})}return E},Q);let b=0;return P.replace(L,()=>{const E=Y[b];return b+=1,E})}function z(Ve,K){const{format:B=""}=K,L=new Date(Ve).getTime(),Y=Date.now(),Q=Math.max(L-Y,0);return $(Q,B)}var de=function(Ve,K){var B={};for(var L in Ve)Object.prototype.hasOwnProperty.call(Ve,L)&&K.indexOf(L)<0&&(B[L]=Ve[L]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Y=0,L=Object.getOwnPropertySymbols(Ve);Y<L.length;Y++)K.indexOf(L[Y])<0&&Object.prototype.propertyIsEnumerable.call(Ve,L[Y])&&(B[L[Y]]=Ve[L[Y]]);return B};const we=1e3/30;function ce(Ve){return new Date(Ve).getTime()}const Oe=Ve=>{const{value:K,format:B="HH:mm:ss",onChange:L,onFinish:Y}=Ve,Q=de(Ve,["value","format","onChange","onFinish"]),P=(0,ge.Z)(),b=d.useRef(null),E=()=>{Y==null||Y(),b.current&&(clearInterval(b.current),b.current=null)},N=()=>{const Ze=ce(K);Ze>=Date.now()&&(b.current=setInterval(()=>{P(),L==null||L(Ze-Date.now()),Ze<Date.now()&&E()},we))};d.useEffect(()=>(N(),()=>{b.current&&(clearInterval(b.current),b.current=null)}),[K]);const ie=(Ze,me)=>z(Ze,Object.assign(Object.assign({},me),{format:B})),Ie=Ze=>(0,Ee.Tm)(Ze,{title:void 0});return d.createElement(D,Object.assign({},Q,{value:K,valueRender:Ie,formatter:ie}))};var Fe=d.memo(Oe);D.Countdown=Fe;var Ne=D},93873:function(Jt,ot,_){"use strict";_.d(ot,{Fm:function(){return S}});var d=_(36237),ge=_(48746);const Ee=new d.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ye=new d.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),W=new d.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 d.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ne=new d.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),J=new d.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 d.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),X=new d.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),U={"move-up":{inKeyframes:o,outKeyframes:X},"move-down":{inKeyframes:Ee,outKeyframes:ye},"move-left":{inKeyframes:W,outKeyframes:g},"move-right":{inKeyframes:ne,outKeyframes:J}},S=(w,A)=>{const{antCls:I}=w,q=`${I}-${A}`,{inKeyframes:re,outKeyframes:G}=U[A];return[(0,ge.R)(q,re,G,w.motionDurationMid),{[`
|
|
${q}-enter,
|
|
${q}-appear
|
|
`]:{opacity:0,animationTimingFunction:w.motionEaseOutCirc},[`${q}-leave`]:{animationTimingFunction:w.motionEaseInOutCirc}}]}},46e3:function(Jt,ot,_){"use strict";_.d(ot,{Qt:function(){return W},Uw:function(){return ye},fJ:function(){return Ee},ly:function(){return g},oN:function(){return S}});var d=_(36237),ge=_(48746);const Ee=new d.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ye=new d.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),W=new d.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),g=new d.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),ne=new d.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),J=new d.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),o=new d.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),X=new d.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),U={"slide-up":{inKeyframes:Ee,outKeyframes:ye},"slide-down":{inKeyframes:W,outKeyframes:g},"slide-left":{inKeyframes:ne,outKeyframes:J},"slide-right":{inKeyframes:o,outKeyframes:X}},S=(w,A)=>{const{antCls:I}=w,q=`${I}-${A}`,{inKeyframes:re,outKeyframes:G}=U[A];return[(0,ge.R)(q,re,G,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(Jt,ot,_){"use strict";_.d(ot,{ZP:function(){return g},qN:function(){return Ee},wZ:function(){return ye}});var d=_(36237),ge=_(36305);const Ee=8;function ye(ne){const{contentRadius:J,limitVerticalRadius:o}=ne,X=J>12?J+2:12;return{arrowOffsetHorizontal:X,arrowOffsetVertical:o?Ee:X}}function W(ne,J){return ne?J:{}}function g(ne,J,o){const{componentCls:X,boxShadowPopoverArrow:U,arrowOffsetVertical:S,arrowOffsetHorizontal:w}=ne,{arrowDistance:A=0,arrowPlacement:I={left:!0,right:!0,top:!0,bottom:!0}}=o||{};return{[X]:Object.assign(Object.assign(Object.assign(Object.assign({[`${X}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,ge.W)(ne,J,U)),{"&:before":{background:J}})]},W(!!I.top,{[[`&-placement-top > ${X}-arrow`,`&-placement-topLeft > ${X}-arrow`,`&-placement-topRight > ${X}-arrow`].join(",")]:{bottom:A,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${X}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":w,[`> ${X}-arrow`]:{left:{_skip_check_:!0,value:w}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,d.unit)(w)})`,[`> ${X}-arrow`]:{right:{_skip_check_:!0,value:w}}}})),W(!!I.bottom,{[[`&-placement-bottom > ${X}-arrow`,`&-placement-bottomLeft > ${X}-arrow`,`&-placement-bottomRight > ${X}-arrow`].join(",")]:{top:A,transform:"translateY(-100%)"},[`&-placement-bottom > ${X}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":w,[`> ${X}-arrow`]:{left:{_skip_check_:!0,value:w}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,d.unit)(w)})`,[`> ${X}-arrow`]:{right:{_skip_check_:!0,value:w}}}})),W(!!I.left,{[[`&-placement-left > ${X}-arrow`,`&-placement-leftTop > ${X}-arrow`,`&-placement-leftBottom > ${X}-arrow`].join(",")]:{right:{_skip_check_:!0,value:A},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${X}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${X}-arrow`]:{top:S},[`&-placement-leftBottom > ${X}-arrow`]:{bottom:S}})),W(!!I.right,{[[`&-placement-right > ${X}-arrow`,`&-placement-rightTop > ${X}-arrow`,`&-placement-rightBottom > ${X}-arrow`].join(",")]:{left:{_skip_check_:!0,value:A},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${X}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${X}-arrow`]:{top:S},[`&-placement-rightBottom > ${X}-arrow`]:{bottom:S}}))}}},36305:function(Jt,ot,_){"use strict";_.d(ot,{W:function(){return Ee},w:function(){return ge}});var d=_(36237);function ge(ye){const{sizePopupArrow:W,borderRadiusXS:g,borderRadiusOuter:ne}=ye,J=W/2,o=0,X=J,U=ne*1/Math.sqrt(2),S=J-ne*(1-1/Math.sqrt(2)),w=J-g*(1/Math.sqrt(2)),A=ne*(Math.sqrt(2)-1)+g*(1/Math.sqrt(2)),I=2*J-w,q=A,re=2*J-U,G=S,D=2*J-o,H=X,$=J*Math.sqrt(2)+ne*(Math.sqrt(2)-2),z=ne*(Math.sqrt(2)-1),de=`polygon(${z}px 100%, 50% ${z}px, ${2*J-z}px 100%, ${z}px 100%)`,we=`path('M ${o} ${X} A ${ne} ${ne} 0 0 0 ${U} ${S} L ${w} ${A} A ${g} ${g} 0 0 1 ${I} ${q} L ${re} ${G} A ${ne} ${ne} 0 0 0 ${D} ${H} Z')`;return{arrowShadowWidth:$,arrowPath:we,arrowPolygon:de}}const Ee=(ye,W,g)=>{const{sizePopupArrow:ne,arrowPolygon:J,arrowPath:o,arrowShadowWidth:X,borderRadiusXS:U,calc:S}=ye;return{pointerEvents:"none",width:ne,height:ne,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:ne,height:S(ne).div(2).equal(),background:W,clipPath:{_multi_value_:!0,value:[J,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:X,height:X,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,d.unit)(U)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:g,zIndex:0,background:"transparent"}}}},31691:function(Jt,ot,_){"use strict";_.d(ot,{default:function(){return kt}});var d=_(59301),ge=_(99267),Ee=_(18785),ye=_(62772),W=_(92310),g=_.n(W),ne=_(60499),J=_(18642),o=_(85899),X=_(72190),U=_(43749),S=_(42244),w=_(18929),A=_(49658),I=(0,d.createContext)(null),q=_(77654),re=_(29301),G=_(6089),D=_(8654),H=_(16089),$=function(he){var st=he.activeTabOffset,Rt=he.horizontal,Ft=he.rtl,Gt=he.indicator,qt=Gt===void 0?{}:Gt,Wt=qt.size,Qt=qt.align,un=Qt===void 0?"center":Qt,gn=(0,d.useState)(),Fn=(0,X.Z)(gn,2),Pn=Fn[0],bn=Fn[1],On=(0,d.useRef)(),Sn=d.useCallback(function(rt){return typeof Wt=="function"?Wt(rt):typeof Wt=="number"?Wt:rt},[Wt]);function Qn(){H.Z.cancel(On.current)}return(0,d.useEffect)(function(){var rt={};if(st)if(Rt){rt.width=Sn(st.width);var ht=Ft?"right":"left";un==="start"&&(rt[ht]=st[ht]),un==="center"&&(rt[ht]=st[ht]+st.width/2,rt.transform=Ft?"translateX(50%)":"translateX(-50%)"),un==="end"&&(rt[ht]=st[ht]+st.width,rt.transform="translateX(-100%)")}else rt.height=Sn(st.height),un==="start"&&(rt.top=st.top),un==="center"&&(rt.top=st.top+st.height/2,rt.transform="translateY(-50%)"),un==="end"&&(rt.top=st.top+st.height,rt.transform="translateY(-100%)");return Qn(),On.current=(0,H.Z)(function(){bn(rt)}),Qn},[st,Rt,Ft,un,Sn]),{style:Pn}},z=$,de={width:0,height:0,left:0,top:0};function we(te,he,st){return(0,d.useMemo)(function(){for(var Rt,Ft=new Map,Gt=he.get((Rt=te[0])===null||Rt===void 0?void 0:Rt.key)||de,qt=Gt.left+Gt.width,Wt=0;Wt<te.length;Wt+=1){var Qt=te[Wt].key,un=he.get(Qt);if(!un){var gn;un=he.get((gn=te[Wt-1])===null||gn===void 0?void 0:gn.key)||de}var Fn=Ft.get(Qt)||(0,o.Z)({},un);Fn.right=qt-Fn.left-Fn.width,Ft.set(Qt,Fn)}return Ft},[te.map(function(Rt){return Rt.key}).join("_"),he,st])}function ce(te,he){var st=d.useRef(te),Rt=d.useState({}),Ft=(0,X.Z)(Rt,2),Gt=Ft[1];function qt(Wt){var Qt=typeof Wt=="function"?Wt(st.current):Wt;Qt!==st.current&&he(Qt,st.current),st.current=Qt,Gt({})}return[st.current,qt]}var Oe=.1,Fe=.01,Ne=20,Ve=Math.pow(.995,Ne);function K(te,he){var st=(0,d.useState)(),Rt=(0,X.Z)(st,2),Ft=Rt[0],Gt=Rt[1],qt=(0,d.useState)(0),Wt=(0,X.Z)(qt,2),Qt=Wt[0],un=Wt[1],gn=(0,d.useState)(0),Fn=(0,X.Z)(gn,2),Pn=Fn[0],bn=Fn[1],On=(0,d.useState)(),Sn=(0,X.Z)(On,2),Qn=Sn[0],rt=Sn[1],ht=(0,d.useRef)();function Nt(dn){var fn=dn.touches[0],wn=fn.screenX,cn=fn.screenY;Gt({x:wn,y:cn}),window.clearInterval(ht.current)}function At(dn){if(Ft){var fn=dn.touches[0],wn=fn.screenX,cn=fn.screenY;Gt({x:wn,y:cn});var an=wn-Ft.x,mn=cn-Ft.y;he(an,mn);var Xn=Date.now();un(Xn),bn(Xn-Qt),rt({x:an,y:mn})}}function Pt(){if(Ft&&(Gt(null),rt(null),Qn)){var dn=Qn.x/Pn,fn=Qn.y/Pn,wn=Math.abs(dn),cn=Math.abs(fn);if(Math.max(wn,cn)<Oe)return;var an=dn,mn=fn;ht.current=window.setInterval(function(){if(Math.abs(an)<Fe&&Math.abs(mn)<Fe){window.clearInterval(ht.current);return}an*=Ve,mn*=Ve,he(an*Ne,mn*Ne)},Ne)}}var $t=(0,d.useRef)();function Zt(dn){var fn=dn.deltaX,wn=dn.deltaY,cn=0,an=Math.abs(fn),mn=Math.abs(wn);an===mn?cn=$t.current==="x"?fn:wn:an>mn?(cn=fn,$t.current="x"):(cn=wn,$t.current="y"),he(-cn,-cn)&&dn.preventDefault()}var tn=(0,d.useRef)(null);tn.current={onTouchStart:Nt,onTouchMove:At,onTouchEnd:Pt,onWheel:Zt},d.useEffect(function(){function dn(an){tn.current.onTouchStart(an)}function fn(an){tn.current.onTouchMove(an)}function wn(an){tn.current.onTouchEnd(an)}function cn(an){tn.current.onWheel(an)}return document.addEventListener("touchmove",fn,{passive:!1}),document.addEventListener("touchend",wn,{passive:!0}),te.current.addEventListener("touchstart",dn,{passive:!0}),te.current.addEventListener("wheel",cn,{passive:!1}),function(){document.removeEventListener("touchmove",fn),document.removeEventListener("touchend",wn)}},[])}var B=_(34280);function L(te){var he=(0,d.useState)(0),st=(0,X.Z)(he,2),Rt=st[0],Ft=st[1],Gt=(0,d.useRef)(0),qt=(0,d.useRef)();return qt.current=te,(0,B.o)(function(){var Wt;(Wt=qt.current)===null||Wt===void 0||Wt.call(qt)},[Rt]),function(){Gt.current===Rt&&(Gt.current+=1,Ft(Gt.current))}}function Y(te){var he=(0,d.useRef)([]),st=(0,d.useState)({}),Rt=(0,X.Z)(st,2),Ft=Rt[1],Gt=(0,d.useRef)(typeof te=="function"?te():te),qt=L(function(){var Qt=Gt.current;he.current.forEach(function(un){Qt=un(Qt)}),he.current=[],Gt.current=Qt,Ft({})});function Wt(Qt){he.current.push(Qt),qt()}return[Gt.current,Wt]}var Q={width:0,height:0,left:0,top:0,right:0};function P(te,he,st,Rt,Ft,Gt,qt){var Wt=qt.tabs,Qt=qt.tabPosition,un=qt.rtl,gn,Fn,Pn;return["top","bottom"].includes(Qt)?(gn="width",Fn=un?"right":"left",Pn=Math.abs(st)):(gn="height",Fn="top",Pn=-st),(0,d.useMemo)(function(){if(!Wt.length)return[0,0];for(var bn=Wt.length,On=bn,Sn=0;Sn<bn;Sn+=1){var Qn=te.get(Wt[Sn].key)||Q;if(Math.floor(Qn[Fn]+Qn[gn])>Math.floor(Pn+he)){On=Sn-1;break}}for(var rt=0,ht=bn-1;ht>=0;ht-=1){var Nt=te.get(Wt[ht].key)||Q;if(Nt[Fn]<Pn){rt=ht+1;break}}return rt>=On?[0,0]:[rt,On]},[te,he,Rt,Ft,Gt,Pn,Qt,Wt.map(function(bn){return bn.key}).join("_"),un])}function b(te){var he;return te instanceof Map?(he={},te.forEach(function(st,Rt){he[Rt]=st})):he=te,JSON.stringify(he)}var E="TABS_DQ";function N(te){return String(te).replace(/"/g,E)}function ie(te,he,st,Rt){return!(!st||Rt||te===!1||te===void 0&&(he===!1||he===null))}var Ie=d.forwardRef(function(te,he){var st=te.prefixCls,Rt=te.editable,Ft=te.locale,Gt=te.style;return!Rt||Rt.showAdd===!1?null:d.createElement("button",{ref:he,type:"button",className:"".concat(st,"-nav-add"),style:Gt,"aria-label":(Ft==null?void 0:Ft.addAriaLabel)||"Add tab",onClick:function(Wt){Rt.onEdit("add",{event:Wt})}},Rt.addIcon||"+")}),Ze=Ie,me=d.forwardRef(function(te,he){var st=te.position,Rt=te.prefixCls,Ft=te.extra;if(!Ft)return null;var Gt,qt={};return(0,U.Z)(Ft)==="object"&&!d.isValidElement(Ft)?qt=Ft:qt.right=Ft,st==="right"&&(Gt=qt.right),st==="left"&&(Gt=qt.left),Gt?d.createElement("div",{className:"".concat(Rt,"-extra-content"),ref:he},Gt):null}),Ce=me,Ke=_(96478),Qe=_(28321),Ge=_(10228),wt=d.forwardRef(function(te,he){var st=te.prefixCls,Rt=te.id,Ft=te.tabs,Gt=te.locale,qt=te.mobile,Wt=te.more,Qt=Wt===void 0?{}:Wt,un=te.style,gn=te.className,Fn=te.editable,Pn=te.tabBarGutter,bn=te.rtl,On=te.removeAriaLabel,Sn=te.onTabClick,Qn=te.getPopupContainer,rt=te.popupClassName,ht=(0,d.useState)(!1),Nt=(0,X.Z)(ht,2),At=Nt[0],Pt=Nt[1],$t=(0,d.useState)(null),Zt=(0,X.Z)($t,2),tn=Zt[0],dn=Zt[1],fn=Qt.icon,wn=fn===void 0?"More":fn,cn="".concat(Rt,"-more-popup"),an="".concat(st,"-dropdown"),mn=tn!==null?"".concat(cn,"-").concat(tn):null,Xn=Gt==null?void 0:Gt.dropdownAriaLabel;function Jn(In,Kn){In.preventDefault(),In.stopPropagation(),Fn.onEdit("remove",{key:Kn,event:In})}var on=d.createElement(Qe.ZP,{onClick:function(Kn){var lr=Kn.key,Tt=Kn.domEvent;Sn(lr,Tt),Pt(!1)},prefixCls:"".concat(an,"-menu"),id:cn,tabIndex:-1,role:"listbox","aria-activedescendant":mn,selectedKeys:[tn],"aria-label":Xn!==void 0?Xn:"expanded dropdown"},Ft.map(function(In){var Kn=In.closable,lr=In.disabled,Tt=In.closeIcon,Tn=In.key,er=In.label,mr=ie(Kn,Tt,Fn,lr);return d.createElement(Qe.sN,{key:Tn,id:"".concat(cn,"-").concat(Tn),role:"option","aria-controls":Rt&&"".concat(Rt,"-panel-").concat(Tn),disabled:lr},d.createElement("span",null,er),mr&&d.createElement("button",{type:"button","aria-label":On||"remove",tabIndex:0,className:"".concat(an,"-menu-item-remove"),onClick:function(Er){Er.stopPropagation(),Jn(Er,Tn)}},Tt||Fn.removeIcon||"\xD7"))}));function kn(In){for(var Kn=Ft.filter(function(mr){return!mr.disabled}),lr=Kn.findIndex(function(mr){return mr.key===tn})||0,Tt=Kn.length,Tn=0;Tn<Tt;Tn+=1){lr=(lr+In+Tt)%Tt;var er=Kn[lr];if(!er.disabled){dn(er.key);return}}}function rr(In){var Kn=In.which;if(!At){[Ge.Z.DOWN,Ge.Z.SPACE,Ge.Z.ENTER].includes(Kn)&&(Pt(!0),In.preventDefault());return}switch(Kn){case Ge.Z.UP:kn(-1),In.preventDefault();break;case Ge.Z.DOWN:kn(1),In.preventDefault();break;case Ge.Z.ESC:Pt(!1);break;case Ge.Z.SPACE:case Ge.Z.ENTER:tn!==null&&Sn(tn,In);break}}(0,d.useEffect)(function(){var In=document.getElementById(mn);In&&In.scrollIntoView&&In.scrollIntoView(!1)},[tn]),(0,d.useEffect)(function(){At||dn(null)},[At]);var Hn=(0,J.Z)({},bn?"marginRight":"marginLeft",Pn);Ft.length||(Hn.visibility="hidden",Hn.order=1);var zn=g()((0,J.Z)({},"".concat(an,"-rtl"),bn)),or=qt?null:d.createElement(Ke.Z,(0,ne.Z)({prefixCls:an,overlay:on,visible:Ft.length?At:!1,onVisibleChange:Pt,overlayClassName:g()(zn,rt),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Qn},Qt),d.createElement("button",{type:"button",className:"".concat(st,"-nav-more"),style:Hn,"aria-haspopup":"listbox","aria-controls":cn,id:"".concat(Rt,"-more"),"aria-expanded":At,onKeyDown:rr},wn));return d.createElement("div",{className:g()("".concat(st,"-nav-operations"),gn),style:un,ref:he},or,d.createElement(Ze,{prefixCls:st,locale:Gt,editable:Fn}))}),Ue=d.memo(wt,function(te,he){return he.tabMoving}),bt=function(he){var st=he.prefixCls,Rt=he.id,Ft=he.active,Gt=he.focus,qt=he.tab,Wt=qt.key,Qt=qt.label,un=qt.disabled,gn=qt.closeIcon,Fn=qt.icon,Pn=he.closable,bn=he.renderWrapper,On=he.removeAriaLabel,Sn=he.editable,Qn=he.onClick,rt=he.onFocus,ht=he.onBlur,Nt=he.onKeyDown,At=he.onMouseDown,Pt=he.onMouseUp,$t=he.style,Zt=he.tabCount,tn=he.currentPosition,dn="".concat(st,"-tab"),fn=ie(Pn,gn,Sn,un);function wn(Jn){un||Qn(Jn)}function cn(Jn){Jn.preventDefault(),Jn.stopPropagation(),Sn.onEdit("remove",{key:Wt,event:Jn})}var an=d.useMemo(function(){return Fn&&typeof Qt=="string"?d.createElement("span",null,Qt):Qt},[Qt,Fn]),mn=d.useRef(null);d.useEffect(function(){Gt&&mn.current&&mn.current.focus()},[Gt]);var Xn=d.createElement("div",{key:Wt,"data-node-key":N(Wt),className:g()(dn,(0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)({},"".concat(dn,"-with-remove"),fn),"".concat(dn,"-active"),Ft),"".concat(dn,"-disabled"),un),"".concat(dn,"-focus"),Gt)),style:$t,onClick:wn},d.createElement("div",{ref:mn,role:"tab","aria-selected":Ft,id:Rt&&"".concat(Rt,"-tab-").concat(Wt),className:"".concat(dn,"-btn"),"aria-controls":Rt&&"".concat(Rt,"-panel-").concat(Wt),"aria-disabled":un,tabIndex:un?null:Ft?0:-1,onClick:function(on){on.stopPropagation(),wn(on)},onKeyDown:Nt,onMouseDown:At,onMouseUp:Pt,onFocus:rt,onBlur:ht},Gt&&d.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"Tab ".concat(tn," of ").concat(Zt)),Fn&&d.createElement("span",{className:"".concat(dn,"-icon")},Fn),Qt&&an),fn&&d.createElement("button",{type:"button",role:"tab","aria-label":On||"remove",tabIndex:Ft?0:-1,className:"".concat(dn,"-remove"),onClick:function(on){on.stopPropagation(),cn(on)}},gn||Sn.removeIcon||"\xD7"));return bn?bn(Xn):Xn},Le=bt,lt=function(he,st){var Rt=he.offsetWidth,Ft=he.offsetHeight,Gt=he.offsetTop,qt=he.offsetLeft,Wt=he.getBoundingClientRect(),Qt=Wt.width,un=Wt.height,gn=Wt.left,Fn=Wt.top;return Math.abs(Qt-Rt)<1?[Qt,un,gn-st.left,Fn-st.top]:[Rt,Ft,qt,Gt]},Re=function(he){var st=he.current||{},Rt=st.offsetWidth,Ft=Rt===void 0?0:Rt,Gt=st.offsetHeight,qt=Gt===void 0?0:Gt;if(he.current){var Wt=he.current.getBoundingClientRect(),Qt=Wt.width,un=Wt.height;if(Math.abs(Qt-Ft)<1)return[Qt,un]}return[Ft,qt]},Te=function(he,st){return he[st?0:1]},pe=d.forwardRef(function(te,he){var st=te.className,Rt=te.style,Ft=te.id,Gt=te.animated,qt=te.activeKey,Wt=te.rtl,Qt=te.extra,un=te.editable,gn=te.locale,Fn=te.tabPosition,Pn=te.tabBarGutter,bn=te.children,On=te.onTabClick,Sn=te.onTabScroll,Qn=te.indicator,rt=d.useContext(I),ht=rt.prefixCls,Nt=rt.tabs,At=(0,d.useRef)(null),Pt=(0,d.useRef)(null),$t=(0,d.useRef)(null),Zt=(0,d.useRef)(null),tn=(0,d.useRef)(null),dn=(0,d.useRef)(null),fn=(0,d.useRef)(null),wn=Fn==="top"||Fn==="bottom",cn=ce(0,function(gr,tr){wn&&Sn&&Sn({direction:gr>tr?"left":"right"})}),an=(0,X.Z)(cn,2),mn=an[0],Xn=an[1],Jn=ce(0,function(gr,tr){!wn&&Sn&&Sn({direction:gr>tr?"top":"bottom"})}),on=(0,X.Z)(Jn,2),kn=on[0],rr=on[1],Hn=(0,d.useState)([0,0]),zn=(0,X.Z)(Hn,2),or=zn[0],In=zn[1],Kn=(0,d.useState)([0,0]),lr=(0,X.Z)(Kn,2),Tt=lr[0],Tn=lr[1],er=(0,d.useState)([0,0]),mr=(0,X.Z)(er,2),Cr=mr[0],Er=mr[1],xr=(0,d.useState)([0,0]),Mn=(0,X.Z)(xr,2),Ln=Mn[0],yr=Mn[1],cr=Y(new Map),dr=(0,X.Z)(cr,2),xi=dr[0],ei=dr[1],Ar=we(Nt,xi,Tt[0]),xn=Te(or,wn),fr=Te(Tt,wn),pr=Te(Cr,wn),Xr=Te(Ln,wn),ai=Math.floor(xn)<Math.floor(fr+pr),kr=ai?xn-Xr:xn-pr,Ur="".concat(ht,"-nav-operations-hidden"),Rr=0,hr=0;wn&&Wt?(Rr=0,hr=Math.max(0,fr-kr)):(Rr=Math.min(0,kr-fr),hr=0);function hi(gr){return gr<Rr?Rr:gr>hr?hr:gr}var Gr=(0,d.useRef)(null),ri=(0,d.useState)(),oi=(0,X.Z)(ri,2),ti=oi[0],nr=oi[1];function fi(){nr(Date.now())}function mi(){Gr.current&&clearTimeout(Gr.current)}K(Zt,function(gr,tr){function Lr(Nr,qr){Nr(function(zr){var si=hi(zr+qr);return si})}return ai?(wn?Lr(Xn,gr):Lr(rr,tr),mi(),fi(),!0):!1}),(0,d.useEffect)(function(){return mi(),ti&&(Gr.current=setTimeout(function(){nr(0)},100)),mi},[ti]);var vi=P(Ar,kr,wn?mn:kn,fr,pr,Xr,(0,o.Z)((0,o.Z)({},te),{},{tabs:Nt})),Wr=(0,X.Z)(vi,2),Vn=Wr[0],Oi=Wr[1],rn=(0,G.Z)(function(){var gr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qt,tr=Ar.get(gr)||{width:0,height:0,left:0,right:0,top:0};if(wn){var Lr=mn;Wt?tr.right<mn?Lr=tr.right:tr.right+tr.width>mn+kr&&(Lr=tr.right+tr.width-kr):tr.left<-mn?Lr=-tr.left:tr.left+tr.width>-mn+kr&&(Lr=-(tr.left+tr.width-kr)),rr(0),Xn(hi(Lr))}else{var Nr=kn;tr.top<-kn?Nr=-tr.top:tr.top+tr.height>-kn+kr&&(Nr=-(tr.top+tr.height-kr)),Xn(0),rr(hi(Nr))}}),Vr=(0,d.useState)(),Ii=(0,X.Z)(Vr,2),pi=Ii[0],Br=Ii[1],li=(0,d.useState)(!1),Gn=(0,X.Z)(li,2),Qr=Gn[0],gi=Gn[1],ni=Nt.filter(function(gr){return!gr.disabled}).map(function(gr){return gr.key}),Dr=function(tr){var Lr=ni.indexOf(pi||qt),Nr=ni.length,qr=(Lr+tr+Nr)%Nr,zr=ni[qr];Br(zr)},Pr=function(tr){var Lr=tr.code,Nr=Wt&&wn,qr=ni[0],zr=ni[ni.length-1];switch(Lr){case"ArrowLeft":{wn&&Dr(Nr?1:-1);break}case"ArrowRight":{wn&&Dr(Nr?-1:1);break}case"ArrowUp":{tr.preventDefault(),wn||Dr(-1);break}case"ArrowDown":{tr.preventDefault(),wn||Dr(1);break}case"Home":{tr.preventDefault(),Br(qr);break}case"End":{tr.preventDefault(),Br(zr);break}case"Enter":case"Space":{tr.preventDefault(),On(qt,tr);break}case"Backspace":case"Delete":{var si=ni.indexOf(pi),yi=Nt.find(function(bi){return bi.key===pi}),ji=ie(yi==null?void 0:yi.closable,yi==null?void 0:yi.closeIcon,un,yi==null?void 0:yi.disabled);ji&&(tr.preventDefault(),tr.stopPropagation(),un.onEdit("remove",{key:pi,event:tr}),si===ni.length-1?Dr(-1):Dr(1));break}}},Zr={};wn?Zr[Wt?"marginRight":"marginLeft"]=Pn:Zr.marginTop=Pn;var ii=Nt.map(function(gr,tr){var Lr=gr.key;return d.createElement(Le,{id:Ft,prefixCls:ht,key:Lr,tab:gr,style:tr===0?void 0:Zr,closable:gr.closable,editable:un,active:Lr===qt,focus:Lr===pi,renderWrapper:bn,removeAriaLabel:gn==null?void 0:gn.removeAriaLabel,tabCount:ni.length,currentPosition:tr+1,onClick:function(qr){On(Lr,qr)},onKeyDown:Pr,onFocus:function(){Qr||Br(Lr),rn(Lr),fi(),Zt.current&&(Wt||(Zt.current.scrollLeft=0),Zt.current.scrollTop=0)},onBlur:function(){Br(void 0)},onMouseDown:function(){gi(!0)},onMouseUp:function(){gi(!1)}})}),wi=function(){return ei(function(){var tr,Lr=new Map,Nr=(tr=tn.current)===null||tr===void 0?void 0:tr.getBoundingClientRect();return Nt.forEach(function(qr){var zr,si=qr.key,yi=(zr=tn.current)===null||zr===void 0?void 0:zr.querySelector('[data-node-key="'.concat(N(si),'"]'));if(yi){var ji=lt(yi,Nr),bi=(0,X.Z)(ji,4),_s=bi[0],cs=bi[1],js=bi[2],ns=bi[3];Lr.set(si,{width:_s,height:cs,left:js,top:ns})}}),Lr})};(0,d.useEffect)(function(){wi()},[Nt.map(function(gr){return gr.key}).join("_")]);var ui=L(function(){var gr=Re(At),tr=Re(Pt),Lr=Re($t);In([gr[0]-tr[0]-Lr[0],gr[1]-tr[1]-Lr[1]]);var Nr=Re(fn);Er(Nr);var qr=Re(dn);yr(qr);var zr=Re(tn);Tn([zr[0]-Nr[0],zr[1]-Nr[1]]),wi()}),zi=Nt.slice(0,Vn),Gi=Nt.slice(Oi+1),Mi=[].concat((0,q.Z)(zi),(0,q.Z)(Gi)),_i=Ar.get(qt),Cn=z({activeTabOffset:_i,horizontal:wn,indicator:Qn,rtl:Wt}),Zn=Cn.style;(0,d.useEffect)(function(){rn()},[qt,Rr,hr,b(_i),b(Ar),wn]),(0,d.useEffect)(function(){ui()},[Wt]);var br=!!Mi.length,qn="".concat(ht,"-nav-wrap"),sr,Ei,Jr,Ri;return wn?Wt?(Ei=mn>0,sr=mn!==hr):(sr=mn<0,Ei=mn!==Rr):(Jr=kn<0,Ri=kn!==Rr),d.createElement(re.Z,{onResize:ui},d.createElement("div",{ref:(0,D.x1)(he,At),role:"tablist","aria-orientation":wn?"horizontal":"vertical",className:g()("".concat(ht,"-nav"),st),style:Rt,onKeyDown:function(){fi()}},d.createElement(Ce,{ref:Pt,position:"left",extra:Qt,prefixCls:ht}),d.createElement(re.Z,{onResize:ui},d.createElement("div",{className:g()(qn,(0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)({},"".concat(qn,"-ping-left"),sr),"".concat(qn,"-ping-right"),Ei),"".concat(qn,"-ping-top"),Jr),"".concat(qn,"-ping-bottom"),Ri)),ref:Zt},d.createElement(re.Z,{onResize:ui},d.createElement("div",{ref:tn,className:"".concat(ht,"-nav-list"),style:{transform:"translate(".concat(mn,"px, ").concat(kn,"px)"),transition:ti?"none":void 0}},ii,d.createElement(Ze,{ref:fn,prefixCls:ht,locale:gn,editable:un,style:(0,o.Z)((0,o.Z)({},ii.length===0?void 0:Zr),{},{visibility:br?"hidden":null})}),d.createElement("div",{className:g()("".concat(ht,"-ink-bar"),(0,J.Z)({},"".concat(ht,"-ink-bar-animated"),Gt.inkBar)),style:Zn}))))),d.createElement(Ue,(0,ne.Z)({},te,{removeAriaLabel:gn==null?void 0:gn.removeAriaLabel,ref:dn,prefixCls:ht,tabs:Mi,className:!br&&Ur,tabMoving:!!ti})),d.createElement(Ce,{ref:$t,position:"right",extra:Qt,prefixCls:ht})))}),We=pe,De=d.forwardRef(function(te,he){var st=te.prefixCls,Rt=te.className,Ft=te.style,Gt=te.id,qt=te.active,Wt=te.tabKey,Qt=te.children;return d.createElement("div",{id:Gt&&"".concat(Gt,"-panel-").concat(Wt),role:"tabpanel",tabIndex:qt?0:-1,"aria-labelledby":Gt&&"".concat(Gt,"-tab-").concat(Wt),"aria-hidden":!qt,style:Ft,className:g()(st,qt&&"".concat(st,"-active"),Rt),ref:he},Qt)}),Se=De,k=["renderTabBar"],fe=["label","key"],ve=function(he){var st=he.renderTabBar,Rt=(0,S.Z)(he,k),Ft=d.useContext(I),Gt=Ft.tabs;if(st){var qt=(0,o.Z)((0,o.Z)({},Rt),{},{panes:Gt.map(function(Wt){var Qt=Wt.label,un=Wt.key,gn=(0,S.Z)(Wt,fe);return d.createElement(Se,(0,ne.Z)({tab:Qt,key:un,tabKey:un},gn))})});return st(qt,We)}return d.createElement(We,Rt)},Be=ve,qe=_(77900),at=["key","forceRender","style","className","destroyInactiveTabPane"],ct=function(he){var st=he.id,Rt=he.activeKey,Ft=he.animated,Gt=he.tabPosition,qt=he.destroyInactiveTabPane,Wt=d.useContext(I),Qt=Wt.prefixCls,un=Wt.tabs,gn=Ft.tabPane,Fn="".concat(Qt,"-tabpane");return d.createElement("div",{className:g()("".concat(Qt,"-content-holder"))},d.createElement("div",{className:g()("".concat(Qt,"-content"),"".concat(Qt,"-content-").concat(Gt),(0,J.Z)({},"".concat(Qt,"-content-animated"),gn))},un.map(function(Pn){var bn=Pn.key,On=Pn.forceRender,Sn=Pn.style,Qn=Pn.className,rt=Pn.destroyInactiveTabPane,ht=(0,S.Z)(Pn,at),Nt=bn===Rt;return d.createElement(qe.default,(0,ne.Z)({key:bn,visible:Nt,forceRender:On,removeOnLeave:!!(qt||rt),leavedClassName:"".concat(Fn,"-hidden")},Ft.tabPaneMotion),function(At,Pt){var $t=At.style,Zt=At.className;return d.createElement(Se,(0,ne.Z)({},ht,{prefixCls:Fn,id:st,tabKey:bn,animated:gn,active:Nt,style:(0,o.Z)((0,o.Z)({},Sn),$t),className:g()(Qn,Zt),ref:Pt}))})})))},mt=ct,dt=_(48736);function gt(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},he;return te===!1?he={inkBar:!1,tabPane:!1}:te===!0?he={inkBar:!0,tabPane:!1}:he=(0,o.Z)({inkBar:!0},(0,U.Z)(te)==="object"?te:{}),he.tabPaneMotion&&he.tabPane===void 0&&(he.tabPane=!0),!he.tabPaneMotion&&he.tabPane&&(he.tabPane=!1),he}var Lt=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],St=0,Ct=d.forwardRef(function(te,he){var st=te.id,Rt=te.prefixCls,Ft=Rt===void 0?"rc-tabs":Rt,Gt=te.className,qt=te.items,Wt=te.direction,Qt=te.activeKey,un=te.defaultActiveKey,gn=te.editable,Fn=te.animated,Pn=te.tabPosition,bn=Pn===void 0?"top":Pn,On=te.tabBarGutter,Sn=te.tabBarStyle,Qn=te.tabBarExtraContent,rt=te.locale,ht=te.more,Nt=te.destroyInactiveTabPane,At=te.renderTabBar,Pt=te.onChange,$t=te.onTabClick,Zt=te.onTabScroll,tn=te.getPopupContainer,dn=te.popupClassName,fn=te.indicator,wn=(0,S.Z)(te,Lt),cn=d.useMemo(function(){return(qt||[]).filter(function(Ln){return Ln&&(0,U.Z)(Ln)==="object"&&"key"in Ln})},[qt]),an=Wt==="rtl",mn=gt(Fn),Xn=(0,d.useState)(!1),Jn=(0,X.Z)(Xn,2),on=Jn[0],kn=Jn[1];(0,d.useEffect)(function(){kn((0,A.Z)())},[]);var rr=(0,w.Z)(function(){var Ln;return(Ln=cn[0])===null||Ln===void 0?void 0:Ln.key},{value:Qt,defaultValue:un}),Hn=(0,X.Z)(rr,2),zn=Hn[0],or=Hn[1],In=(0,d.useState)(function(){return cn.findIndex(function(Ln){return Ln.key===zn})}),Kn=(0,X.Z)(In,2),lr=Kn[0],Tt=Kn[1];(0,d.useEffect)(function(){var Ln=cn.findIndex(function(cr){return cr.key===zn});if(Ln===-1){var yr;Ln=Math.max(0,Math.min(lr,cn.length-1)),or((yr=cn[Ln])===null||yr===void 0?void 0:yr.key)}Tt(Ln)},[cn.map(function(Ln){return Ln.key}).join("_"),zn,lr]);var Tn=(0,w.Z)(null,{value:st}),er=(0,X.Z)(Tn,2),mr=er[0],Cr=er[1];(0,d.useEffect)(function(){st||(Cr("rc-tabs-".concat(St)),St+=1)},[]);function Er(Ln,yr){$t==null||$t(Ln,yr);var cr=Ln!==zn;or(Ln),cr&&(Pt==null||Pt(Ln))}var xr={id:mr,activeKey:zn,animated:mn,tabPosition:bn,rtl:an,mobile:on},Mn=(0,o.Z)((0,o.Z)({},xr),{},{editable:gn,locale:rt,more:ht,tabBarGutter:On,onTabClick:Er,onTabScroll:Zt,extra:Qn,style:Sn,panes:null,getPopupContainer:tn,popupClassName:dn,indicator:fn});return d.createElement(I.Provider,{value:{tabs:cn,prefixCls:Ft}},d.createElement("div",(0,ne.Z)({ref:he,id:st,className:g()(Ft,"".concat(Ft,"-").concat(bn),(0,J.Z)((0,J.Z)((0,J.Z)({},"".concat(Ft,"-mobile"),on),"".concat(Ft,"-editable"),gn),"".concat(Ft,"-rtl"),an),Gt)},wn),d.createElement(Be,(0,ne.Z)({},Mn,{renderTabBar:At})),d.createElement(mt,(0,ne.Z)({destroyInactiveTabPane:Nt},xr,{animated:mn}))))}),nt=Ct,vt=nt,pt=_(48755),be=_(83397),Je=_(31756),x=_(86641);const T={motionAppear:!1,motionEnter:!0,motionLeave:!0};function $e(te){let he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},st;return he===!1?st={inkBar:!1,tabPane:!1}:he===!0?st={inkBar:!0,tabPane:!0}:st=Object.assign({inkBar:!0},typeof he=="object"?he:{}),st.tabPane&&(st.tabPaneMotion=Object.assign(Object.assign({},T),{motionName:(0,x.m)(te,"switch")})),st}var j=_(11592),ae=function(te,he){var st={};for(var Rt in te)Object.prototype.hasOwnProperty.call(te,Rt)&&he.indexOf(Rt)<0&&(st[Rt]=te[Rt]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ft=0,Rt=Object.getOwnPropertySymbols(te);Ft<Rt.length;Ft++)he.indexOf(Rt[Ft])<0&&Object.prototype.propertyIsEnumerable.call(te,Rt[Ft])&&(st[Rt[Ft]]=te[Rt[Ft]]);return st};function xt(te){return te.filter(he=>he)}function Ae(te,he){if(te)return te;const st=(0,j.Z)(he).map(Rt=>{if(d.isValidElement(Rt)){const{key:Ft,props:Gt}=Rt,qt=Gt||{},{tab:Wt}=qt,Qt=ae(qt,["tab"]);return Object.assign(Object.assign({key:String(Ft)},Qt),{label:Wt})}return null});return xt(st)}var Me=_(36237),Xe=_(63356),ee=_(16931),oe=_(51636),xe=_(46e3),F=te=>{const{componentCls:he,motionDurationSlow:st}=te;return[{[he]:{[`${he}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${st}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${st}`}}}}},[(0,xe.oN)(te,"slide-up"),(0,xe.oN)(te,"slide-down")]]};const tt=te=>{const{componentCls:he,tabsCardPadding:st,cardBg:Rt,cardGutter:Ft,colorBorderSecondary:Gt,itemSelectedColor:qt}=te;return{[`${he}-card`]:{[`> ${he}-nav, > div > ${he}-nav`]:{[`${he}-tab`]:{margin:0,padding:st,background:Rt,border:`${(0,Me.unit)(te.lineWidth)} ${te.lineType} ${Gt}`,transition:`all ${te.motionDurationSlow} ${te.motionEaseInOut}`},[`${he}-tab-active`]:{color:qt,background:te.colorBgContainer},[`${he}-tab-focus`]:Object.assign({},(0,Xe.oN)(te,-3)),[`${he}-ink-bar`]:{visibility:"hidden"},[`& ${he}-tab${he}-tab-focus ${he}-tab-btn`]:{outline:"none"}},[`&${he}-top, &${he}-bottom`]:{[`> ${he}-nav, > div > ${he}-nav`]:{[`${he}-tab + ${he}-tab`]:{marginLeft:{_skip_check_:!0,value:(0,Me.unit)(Ft)}}}},[`&${he}-top`]:{[`> ${he}-nav, > div > ${he}-nav`]:{[`${he}-tab`]:{borderRadius:`${(0,Me.unit)(te.borderRadiusLG)} ${(0,Me.unit)(te.borderRadiusLG)} 0 0`},[`${he}-tab-active`]:{borderBottomColor:te.colorBgContainer}}},[`&${he}-bottom`]:{[`> ${he}-nav, > div > ${he}-nav`]:{[`${he}-tab`]:{borderRadius:`0 0 ${(0,Me.unit)(te.borderRadiusLG)} ${(0,Me.unit)(te.borderRadiusLG)}`},[`${he}-tab-active`]:{borderTopColor:te.colorBgContainer}}},[`&${he}-left, &${he}-right`]:{[`> ${he}-nav, > div > ${he}-nav`]:{[`${he}-tab + ${he}-tab`]:{marginTop:(0,Me.unit)(Ft)}}},[`&${he}-left`]:{[`> ${he}-nav, > div > ${he}-nav`]:{[`${he}-tab`]:{borderRadius:{_skip_check_:!0,value:`${(0,Me.unit)(te.borderRadiusLG)} 0 0 ${(0,Me.unit)(te.borderRadiusLG)}`}},[`${he}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:te.colorBgContainer}}}},[`&${he}-right`]:{[`> ${he}-nav, > div > ${he}-nav`]:{[`${he}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${(0,Me.unit)(te.borderRadiusLG)} ${(0,Me.unit)(te.borderRadiusLG)} 0`}},[`${he}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:te.colorBgContainer}}}}}}},se=te=>{const{componentCls:he,itemHoverColor:st,dropdownEdgeChildVerticalPadding:Rt}=te;return{[`${he}-dropdown`]:Object.assign(Object.assign({},(0,Xe.Wf)(te)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:te.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${he}-dropdown-menu`]:{maxHeight:te.tabsDropdownHeight,margin:0,padding:`${(0,Me.unit)(Rt)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:te.colorBgContainer,backgroundClip:"padding-box",borderRadius:te.borderRadiusLG,outline:"none",boxShadow:te.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Xe.vS),{display:"flex",alignItems:"center",minWidth:te.tabsDropdownWidth,margin:0,padding:`${(0,Me.unit)(te.paddingXXS)} ${(0,Me.unit)(te.paddingSM)}`,color:te.colorText,fontWeight:"normal",fontSize:te.fontSize,lineHeight:te.lineHeight,cursor:"pointer",transition:`all ${te.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:te.marginSM},color:te.colorTextDescription,fontSize:te.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:st}},"&:hover":{background:te.controlItemBgHover},"&-disabled":{"&, &:hover":{color:te.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},it=te=>{const{componentCls:he,margin:st,colorBorderSecondary:Rt,horizontalMargin:Ft,verticalItemPadding:Gt,verticalItemMargin:qt,calc:Wt}=te;return{[`${he}-top, ${he}-bottom`]:{flexDirection:"column",[`> ${he}-nav, > div > ${he}-nav`]:{margin:Ft,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${(0,Me.unit)(te.lineWidth)} ${te.lineType} ${Rt}`,content:"''"},[`${he}-ink-bar`]:{height:te.lineWidthBold,"&-animated":{transition:`width ${te.motionDurationSlow}, left ${te.motionDurationSlow},
|
|
right ${te.motionDurationSlow}`}},[`${he}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:te.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:te.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:te.boxShadowTabsOverflowRight},[`&${he}-nav-wrap-ping-left::before`]:{opacity:1},[`&${he}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${he}-top`]:{[`> ${he}-nav,
|
|
> div > ${he}-nav`]:{"&::before":{bottom:0},[`${he}-ink-bar`]:{bottom:0}}},[`${he}-bottom`]:{[`> ${he}-nav, > div > ${he}-nav`]:{order:1,marginTop:st,marginBottom:0,"&::before":{top:0},[`${he}-ink-bar`]:{top:0}},[`> ${he}-content-holder, > div > ${he}-content-holder`]:{order:0}},[`${he}-left, ${he}-right`]:{[`> ${he}-nav, > div > ${he}-nav`]:{flexDirection:"column",minWidth:Wt(te.controlHeight).mul(1.25).equal(),[`${he}-tab`]:{padding:Gt,textAlign:"center"},[`${he}-tab + ${he}-tab`]:{margin:qt},[`${he}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:te.controlHeight},"&::before":{top:0,boxShadow:te.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:te.boxShadowTabsOverflowBottom},[`&${he}-nav-wrap-ping-top::before`]:{opacity:1},[`&${he}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${he}-ink-bar`]:{width:te.lineWidthBold,"&-animated":{transition:`height ${te.motionDurationSlow}, top ${te.motionDurationSlow}`}},[`${he}-nav-list, ${he}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${he}-left`]:{[`> ${he}-nav, > div > ${he}-nav`]:{[`${he}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${he}-content-holder, > div > ${he}-content-holder`]:{marginLeft:{_skip_check_:!0,value:(0,Me.unit)(Wt(te.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${(0,Me.unit)(te.lineWidth)} ${te.lineType} ${te.colorBorder}`},[`> ${he}-content > ${he}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:te.paddingLG}}}},[`${he}-right`]:{[`> ${he}-nav, > div > ${he}-nav`]:{order:1,[`${he}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${he}-content-holder, > div > ${he}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:Wt(te.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${(0,Me.unit)(te.lineWidth)} ${te.lineType} ${te.colorBorder}`},[`> ${he}-content > ${he}-tabpane`]:{paddingRight:{_skip_check_:!0,value:te.paddingLG}}}}}},Ot=te=>{const{componentCls:he,cardPaddingSM:st,cardPaddingLG:Rt,horizontalItemPaddingSM:Ft,horizontalItemPaddingLG:Gt}=te;return{[he]:{"&-small":{[`> ${he}-nav`]:{[`${he}-tab`]:{padding:Ft,fontSize:te.titleFontSizeSM}}},"&-large":{[`> ${he}-nav`]:{[`${he}-tab`]:{padding:Gt,fontSize:te.titleFontSizeLG}}}},[`${he}-card`]:{[`&${he}-small`]:{[`> ${he}-nav`]:{[`${he}-tab`]:{padding:st}},[`&${he}-bottom`]:{[`> ${he}-nav ${he}-tab`]:{borderRadius:`0 0 ${(0,Me.unit)(te.borderRadius)} ${(0,Me.unit)(te.borderRadius)}`}},[`&${he}-top`]:{[`> ${he}-nav ${he}-tab`]:{borderRadius:`${(0,Me.unit)(te.borderRadius)} ${(0,Me.unit)(te.borderRadius)} 0 0`}},[`&${he}-right`]:{[`> ${he}-nav ${he}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${(0,Me.unit)(te.borderRadius)} ${(0,Me.unit)(te.borderRadius)} 0`}}},[`&${he}-left`]:{[`> ${he}-nav ${he}-tab`]:{borderRadius:{_skip_check_:!0,value:`${(0,Me.unit)(te.borderRadius)} 0 0 ${(0,Me.unit)(te.borderRadius)}`}}}},[`&${he}-large`]:{[`> ${he}-nav`]:{[`${he}-tab`]:{padding:Rt}}}}}},Ut=te=>{const{componentCls:he,itemActiveColor:st,itemHoverColor:Rt,iconCls:Ft,tabsHorizontalItemMargin:Gt,horizontalItemPadding:qt,itemSelectedColor:Wt,itemColor:Qt}=te,un=`${he}-tab`;return{[un]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:qt,fontSize:te.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:Qt,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:st}},"&-btn":{outline:"none",transition:`all ${te.motionDurationSlow}`,[`${un}-icon:not(:last-child)`]:{marginInlineEnd:te.marginSM}},"&-remove":Object.assign({flex:"none",marginRight:{_skip_check_:!0,value:te.calc(te.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:te.marginXS},color:te.colorTextDescription,fontSize:te.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${te.motionDurationSlow}`,"&:hover":{color:te.colorTextHeading}},(0,Xe.Qy)(te)),"&:hover":{color:Rt},[`&${un}-active ${un}-btn`]:{color:Wt,textShadow:te.tabsActiveTextShadow},[`&${un}-focus ${un}-btn`]:Object.assign({},(0,Xe.oN)(te)),[`&${un}-disabled`]:{color:te.colorTextDisabled,cursor:"not-allowed"},[`&${un}-disabled ${un}-btn, &${un}-disabled ${he}-remove`]:{"&:focus, &:active":{color:te.colorTextDisabled}},[`& ${un}-remove ${Ft}`]:{margin:0},[`${Ft}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:te.marginSM}}},[`${un} + ${un}`]:{margin:{_skip_check_:!0,value:Gt}}}},Ht=te=>{const{componentCls:he,tabsHorizontalItemMarginRTL:st,iconCls:Rt,cardGutter:Ft,calc:Gt}=te;return{[`${he}-rtl`]:{direction:"rtl",[`${he}-nav`]:{[`${he}-tab`]:{margin:{_skip_check_:!0,value:st},[`${he}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[Rt]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:(0,Me.unit)(te.marginSM)}},[`${he}-tab-remove`]:{marginRight:{_skip_check_:!0,value:(0,Me.unit)(te.marginXS)},marginLeft:{_skip_check_:!0,value:(0,Me.unit)(Gt(te.marginXXS).mul(-1).equal())},[Rt]:{margin:0}}}},[`&${he}-left`]:{[`> ${he}-nav`]:{order:1},[`> ${he}-content-holder`]:{order:0}},[`&${he}-right`]:{[`> ${he}-nav`]:{order:0},[`> ${he}-content-holder`]:{order:1}},[`&${he}-card${he}-top, &${he}-card${he}-bottom`]:{[`> ${he}-nav, > div > ${he}-nav`]:{[`${he}-tab + ${he}-tab`]:{marginRight:{_skip_check_:!0,value:Ft},marginLeft:{_skip_check_:!0,value:0}}}}},[`${he}-dropdown-rtl`]:{direction:"rtl"},[`${he}-menu-item`]:{[`${he}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Xt=te=>{const{componentCls:he,tabsCardPadding:st,cardHeight:Rt,cardGutter:Ft,itemHoverColor:Gt,itemActiveColor:qt,colorBorderSecondary:Wt}=te;return{[he]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Xe.Wf)(te)),{display:"flex",[`> ${he}-nav, > div > ${he}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${he}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${te.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${he}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${te.motionDurationSlow}`},[`${he}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${he}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${he}-nav-more`]:{position:"relative",padding:st,background:"transparent",border:0,color:te.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:te.calc(te.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${he}-nav-add`]:Object.assign({minWidth:Rt,marginLeft:{_skip_check_:!0,value:Ft},padding:(0,Me.unit)(te.paddingXS),background:"transparent",border:`${(0,Me.unit)(te.lineWidth)} ${te.lineType} ${Wt}`,borderRadius:`${(0,Me.unit)(te.borderRadiusLG)} ${(0,Me.unit)(te.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:te.colorText,transition:`all ${te.motionDurationSlow} ${te.motionEaseInOut}`,"&:hover":{color:Gt},"&:active, &:focus:not(:focus-visible)":{color:qt}},(0,Xe.Qy)(te,-3))},[`${he}-extra-content`]:{flex:"none"},[`${he}-ink-bar`]:{position:"absolute",background:te.inkBarColor,pointerEvents:"none"}}),Ut(te)),{[`${he}-content`]:{position:"relative",width:"100%"},[`${he}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${he}-tabpane`]:Object.assign(Object.assign({},(0,Xe.Qy)(te)),{"&-hidden":{display:"none"}})}),[`${he}-centered`]:{[`> ${he}-nav, > div > ${he}-nav`]:{[`${he}-nav-wrap`]:{[`&:not([class*='${he}-nav-wrap-ping']) > ${he}-nav-list`]:{margin:"auto"}}}}}},Vt=te=>{const he=te.controlHeightLG;return{zIndexPopup:te.zIndexPopupBase+50,cardBg:te.colorFillAlter,cardHeight:he,cardPadding:`${(he-Math.round(te.fontSize*te.lineHeight))/2-te.lineWidth}px ${te.padding}px`,cardPaddingSM:`${te.paddingXXS*1.5}px ${te.padding}px`,cardPaddingLG:`${te.paddingXS}px ${te.padding}px ${te.paddingXXS*1.5}px`,titleFontSize:te.fontSize,titleFontSizeLG:te.fontSizeLG,titleFontSizeSM:te.fontSize,inkBarColor:te.colorPrimary,horizontalMargin:`0 0 ${te.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${te.paddingSM}px 0`,horizontalItemPaddingSM:`${te.paddingXS}px 0`,horizontalItemPaddingLG:`${te.padding}px 0`,verticalItemPadding:`${te.paddingXS}px ${te.paddingLG}px`,verticalItemMargin:`${te.margin}px 0 0 0`,itemColor:te.colorText,itemSelectedColor:te.colorPrimary,itemHoverColor:te.colorPrimaryHover,itemActiveColor:te.colorPrimaryActive,cardGutter:te.marginXXS/2}};var hn=(0,ee.I$)("Tabs",te=>{const he=(0,oe.mergeToken)(te,{tabsCardPadding:te.cardPadding,dropdownEdgeChildVerticalPadding:te.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${(0,Me.unit)(te.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${(0,Me.unit)(te.horizontalItemGutter)}`});return[Ot(he),Ht(he),it(he),se(he),tt(he),Xt(he),F(he)]},Vt),sn=()=>null,An=function(te,he){var st={};for(var Rt in te)Object.prototype.hasOwnProperty.call(te,Rt)&&he.indexOf(Rt)<0&&(st[Rt]=te[Rt]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ft=0,Rt=Object.getOwnPropertySymbols(te);Ft<Rt.length;Ft++)he.indexOf(Rt[Ft])<0&&Object.prototype.propertyIsEnumerable.call(te,Rt[Ft])&&(st[Rt[Ft]]=te[Rt[Ft]]);return st};const Kt=te=>{var he,st,Rt,Ft,Gt,qt,Wt,Qt,un,gn,Fn;const{type:Pn,className:bn,rootClassName:On,size:Sn,onEdit:Qn,hideAdd:rt,centered:ht,addIcon:Nt,removeIcon:At,moreIcon:Pt,more:$t,popupClassName:Zt,children:tn,items:dn,animated:fn,style:wn,indicatorSize:cn,indicator:an}=te,mn=An(te,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator"]),{prefixCls:Xn}=mn,{direction:Jn,tabs:on,getPrefixCls:kn,getPopupContainer:rr}=d.useContext(pt.E_),Hn=kn("tabs",Xn),zn=(0,be.Z)(Hn),[or,In,Kn]=hn(Hn,zn);let lr;Pn==="editable-card"&&(lr={onEdit:(xr,Mn)=>{let{key:Ln,event:yr}=Mn;Qn==null||Qn(xr==="add"?yr:Ln,xr)},removeIcon:(he=At!=null?At:on==null?void 0:on.removeIcon)!==null&&he!==void 0?he:d.createElement(ge.Z,null),addIcon:(Nt!=null?Nt:on==null?void 0:on.addIcon)||d.createElement(ye.Z,null),showAdd:rt!==!0});const Tt=kn(),Tn=(0,Je.Z)(Sn),er=Ae(dn,tn),mr=$e(Hn,fn),Cr=Object.assign(Object.assign({},on==null?void 0:on.style),wn),Er={align:(st=an==null?void 0:an.align)!==null&&st!==void 0?st:(Rt=on==null?void 0:on.indicator)===null||Rt===void 0?void 0:Rt.align,size:(Wt=(Gt=(Ft=an==null?void 0:an.size)!==null&&Ft!==void 0?Ft:cn)!==null&&Gt!==void 0?Gt:(qt=on==null?void 0:on.indicator)===null||qt===void 0?void 0:qt.size)!==null&&Wt!==void 0?Wt:on==null?void 0:on.indicatorSize};return or(d.createElement(vt,Object.assign({direction:Jn,getPopupContainer:rr},mn,{items:er,className:g()({[`${Hn}-${Tn}`]:Tn,[`${Hn}-card`]:["card","editable-card"].includes(Pn),[`${Hn}-editable-card`]:Pn==="editable-card",[`${Hn}-centered`]:ht},on==null?void 0:on.className,bn,On,In,Kn,zn),popupClassName:g()(Zt,In,Kn,zn),style:Cr,editable:lr,more:Object.assign({icon:(Fn=(gn=(un=(Qt=on==null?void 0:on.more)===null||Qt===void 0?void 0:Qt.icon)!==null&&un!==void 0?un:on==null?void 0:on.moreIcon)!==null&&gn!==void 0?gn:Pt)!==null&&Fn!==void 0?Fn:d.createElement(Ee.Z,null),transitionName:`${Tt}-slide-up`},$t),prefixCls:Hn,animated:mr,indicator:Er})))};Kt.TabPane=sn;var kt=Kt},96599:function(Jt,ot,_){"use strict";_.d(ot,{default:function(){return B}});var d=_(59301),ge=_(92310),Ee=_.n(ge),ye=_(2738),W=_(29509),g=_(78776),ne=_(22703),J=_(12919),o=_(48755),X=_(36237),U=_(17835),S=_(63356),w=_(51636),A=_(16931);const I=L=>{const{paddingXXS:Y,lineWidth:Q,tagPaddingHorizontal:P,componentCls:b,calc:E}=L,N=E(P).sub(Q).equal(),ie=E(Y).sub(Q).equal();return{[b]:Object.assign(Object.assign({},(0,S.Wf)(L)),{display:"inline-block",height:"auto",marginInlineEnd:L.marginXS,paddingInline:N,fontSize:L.tagFontSize,lineHeight:L.tagLineHeight,whiteSpace:"nowrap",background:L.defaultBg,border:`${(0,X.unit)(L.lineWidth)} ${L.lineType} ${L.colorBorder}`,borderRadius:L.borderRadiusSM,opacity:1,transition:`all ${L.motionDurationMid}`,textAlign:"start",position:"relative",[`&${b}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:L.defaultColor},[`${b}-close-icon`]:{marginInlineStart:ie,fontSize:L.tagIconSize,color:L.colorTextDescription,cursor:"pointer",transition:`all ${L.motionDurationMid}`,"&:hover":{color:L.colorTextHeading}},[`&${b}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${L.iconCls}-close, ${L.iconCls}-close:hover`]:{color:L.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${b}-checkable-checked):hover`]:{color:L.colorPrimary,backgroundColor:L.colorFillSecondary},"&:active, &-checked":{color:L.colorTextLightSolid},"&-checked":{backgroundColor:L.colorPrimary,"&:hover":{backgroundColor:L.colorPrimaryHover}},"&:active":{backgroundColor:L.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${L.iconCls} + span, > span + ${L.iconCls}`]:{marginInlineStart:N}}),[`${b}-borderless`]:{borderColor:"transparent",background:L.tagBorderlessBg}}},q=L=>{const{lineWidth:Y,fontSizeIcon:Q,calc:P}=L,b=L.fontSizeSM;return(0,w.mergeToken)(L,{tagFontSize:b,tagLineHeight:(0,X.unit)(P(L.lineHeightSM).mul(b).equal()),tagIconSize:P(Q).sub(P(Y).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:L.defaultBg})},re=L=>({defaultBg:new U.FastColor(L.colorFillQuaternary).onBackground(L.colorBgContainer).toHexString(),defaultColor:L.colorText});var G=(0,A.I$)("Tag",L=>{const Y=q(L);return I(Y)},re),D=function(L,Y){var Q={};for(var P in L)Object.prototype.hasOwnProperty.call(L,P)&&Y.indexOf(P)<0&&(Q[P]=L[P]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,P=Object.getOwnPropertySymbols(L);b<P.length;b++)Y.indexOf(P[b])<0&&Object.prototype.propertyIsEnumerable.call(L,P[b])&&(Q[P[b]]=L[P[b]]);return Q},$=d.forwardRef((L,Y)=>{const{prefixCls:Q,style:P,className:b,checked:E,onChange:N,onClick:ie}=L,Ie=D(L,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:Ze,tag:me}=d.useContext(o.E_),Ce=bt=>{N==null||N(!E),ie==null||ie(bt)},Ke=Ze("tag",Q),[Qe,Ge,wt]=G(Ke),Ue=Ee()(Ke,`${Ke}-checkable`,{[`${Ke}-checkable-checked`]:E},me==null?void 0:me.className,b,Ge,wt);return Qe(d.createElement("span",Object.assign({},Ie,{ref:Y,style:Object.assign(Object.assign({},P),me==null?void 0:me.style),className:Ue,onClick:Ce})))}),z=_(93427);const de=L=>(0,z.Z)(L,(Y,Q)=>{let{textColor:P,lightBorderColor:b,lightColor:E,darkColor:N}=Q;return{[`${L.componentCls}${L.componentCls}-${Y}`]:{color:P,background:E,borderColor:b,"&-inverse":{color:L.colorTextLightSolid,background:N,borderColor:N},[`&${L.componentCls}-borderless`]:{borderColor:"transparent"}}}});var we=(0,A.bk)(["Tag","preset"],L=>{const Y=q(L);return de(Y)},re);function ce(L){return typeof L!="string"?L:L.charAt(0).toUpperCase()+L.slice(1)}const Oe=(L,Y,Q)=>{const P=ce(Q);return{[`${L.componentCls}${L.componentCls}-${Y}`]:{color:L[`color${Q}`],background:L[`color${P}Bg`],borderColor:L[`color${P}Border`],[`&${L.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Fe=(0,A.bk)(["Tag","status"],L=>{const Y=q(L);return[Oe(Y,"success","Success"),Oe(Y,"processing","Info"),Oe(Y,"error","Error"),Oe(Y,"warning","Warning")]},re),Ne=function(L,Y){var Q={};for(var P in L)Object.prototype.hasOwnProperty.call(L,P)&&Y.indexOf(P)<0&&(Q[P]=L[P]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,P=Object.getOwnPropertySymbols(L);b<P.length;b++)Y.indexOf(P[b])<0&&Object.prototype.propertyIsEnumerable.call(L,P[b])&&(Q[P[b]]=L[P[b]]);return Q};const K=d.forwardRef((L,Y)=>{const{prefixCls:Q,className:P,rootClassName:b,style:E,children:N,icon:ie,color:Ie,onClose:Ze,bordered:me=!0,visible:Ce}=L,Ke=Ne(L,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:Qe,direction:Ge,tag:wt}=d.useContext(o.E_),[Ue,bt]=d.useState(!0),Le=(0,ye.Z)(Ke,["closeIcon","closable"]);d.useEffect(()=>{Ce!==void 0&&bt(Ce)},[Ce]);const lt=(0,W.o2)(Ie),Re=(0,W.yT)(Ie),Te=lt||Re,pe=Object.assign(Object.assign({backgroundColor:Ie&&!Te?Ie:void 0},wt==null?void 0:wt.style),E),We=Qe("tag",Q),[De,Se,k]=G(We),fe=Ee()(We,wt==null?void 0:wt.className,{[`${We}-${Ie}`]:Te,[`${We}-has-color`]:Ie&&!Te,[`${We}-hidden`]:!Ue,[`${We}-rtl`]:Ge==="rtl",[`${We}-borderless`]:!me},P,b,Se,k),ve=dt=>{dt.stopPropagation(),Ze==null||Ze(dt),!dt.defaultPrevented&&bt(!1)},[,Be]=(0,g.Z)((0,g.w)(L),(0,g.w)(wt),{closable:!1,closeIconRender:dt=>{const gt=d.createElement("span",{className:`${We}-close-icon`,onClick:ve},dt);return(0,ne.wm)(dt,gt,Lt=>({onClick:St=>{var Ct;(Ct=Lt==null?void 0:Lt.onClick)===null||Ct===void 0||Ct.call(Lt,St),ve(St)},className:Ee()(Lt==null?void 0:Lt.className,`${We}-close-icon`)}))}}),qe=typeof Ke.onClick=="function"||N&&N.type==="a",at=ie||null,ct=at?d.createElement(d.Fragment,null,at,N&&d.createElement("span",null,N)):N,mt=d.createElement("span",Object.assign({},Le,{ref:Y,className:fe,style:pe}),ct,Be,lt&&d.createElement(we,{key:"preset",prefixCls:We}),Re&&d.createElement(Fe,{key:"status",prefixCls:We}));return De(qe?d.createElement(J.Z,{component:"Tag"},mt):mt)});K.CheckableTag=$;var B=K},93427:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return ge}});var d=_(34998);function ge(Ee,ye){return d.i.reduce((W,g)=>{const ne=Ee[`${g}1`],J=Ee[`${g}3`],o=Ee[`${g}6`],X=Ee[`${g}7`];return Object.assign(Object.assign({},W),ye(g,{lightColor:ne,lightBorderColor:J,darkColor:o,textColor:X}))},{})}},25399:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return Y}});var d=_(59301),ge=_(92310),Ee=_.n(ge),ye=_(29125),W=_(18929),g=_(62487),ne=_(75030),J=_(86641),o=_(52838),X=_(22703),U=_(32383),S=_(55743),w=_(57700),A=_(48755),I=_(36237),q=_(63356),re=_(34925),G=_(37645),D=_(36305),H=_(93427),$=_(51636),z=_(16931);const de=Q=>{const{calc:P,componentCls:b,tooltipMaxWidth:E,tooltipColor:N,tooltipBg:ie,tooltipBorderRadius:Ie,zIndexPopup:Ze,controlHeight:me,boxShadowSecondary:Ce,paddingSM:Ke,paddingXS:Qe,arrowOffsetHorizontal:Ge,sizePopupArrow:wt}=Q,Ue=P(Ie).add(wt).add(Ge).equal(),bt=P(Ie).mul(2).add(wt).equal();return[{[b]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,q.Wf)(Q)),{position:"absolute",zIndex:Ze,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":ie,[`${b}-inner`]:{minWidth:bt,minHeight:me,padding:`${(0,I.unit)(Q.calc(Ke).div(2).equal())} ${(0,I.unit)(Qe)}`,color:N,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:ie,borderRadius:Ie,boxShadow:Ce,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:Ue},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${b}-inner`]:{borderRadius:Q.min(Ie,G.qN)}},[`${b}-content`]:{position:"relative"}}),(0,H.Z)(Q,(Le,lt)=>{let{darkColor:Re}=lt;return{[`&${b}-${Le}`]:{[`${b}-inner`]:{backgroundColor:Re},[`${b}-arrow`]:{"--antd-arrow-background-color":Re}}}})),{"&-rtl":{direction:"rtl"}})},(0,G.ZP)(Q,"var(--antd-arrow-background-color)"),{[`${b}-pure`]:{position:"relative",maxWidth:"none",margin:Q.sizePopupArrow}}]},we=Q=>Object.assign(Object.assign({zIndexPopup:Q.zIndexPopupBase+70},(0,G.wZ)({contentRadius:Q.borderRadius,limitVerticalRadius:!0})),(0,D.w)((0,$.mergeToken)(Q,{borderRadiusOuter:Math.min(Q.borderRadiusOuter,4)})));var ce=function(Q){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,z.I$)("Tooltip",E=>{const{borderRadius:N,colorTextLightSolid:ie,colorBgSpotlight:Ie}=E,Ze=(0,$.mergeToken)(E,{tooltipMaxWidth:250,tooltipColor:ie,tooltipBorderRadius:N,tooltipBg:Ie});return[de(Ze),(0,re._y)(E,"zoom-big-fast")]},we,{resetStyle:!1,injectStyle:P})(Q)},Oe=_(29509);function Fe(Q,P){const b=(0,Oe.o2)(P),E=Ee()({[`${Q}-${P}`]:P&&b}),N={},ie={};return P&&!b&&(N.background=P,ie["--antd-arrow-background-color"]=P),{className:E,overlayStyle:N,arrowStyle:ie}}var Ve=Q=>{const{prefixCls:P,className:b,placement:E="top",title:N,color:ie,overlayInnerStyle:Ie}=Q,{getPrefixCls:Ze}=d.useContext(A.E_),me=Ze("tooltip",P),[Ce,Ke,Qe]=ce(me),Ge=Fe(me,ie),wt=Ge.arrowStyle,Ue=Object.assign(Object.assign({},Ie),Ge.overlayStyle),bt=Ee()(Ke,Qe,me,`${me}-pure`,`${me}-placement-${E}`,b,Ge.className);return Ce(d.createElement("div",{className:bt,style:wt},d.createElement("div",{className:`${me}-arrow`}),d.createElement(ye.G,Object.assign({},Q,{className:Ke,prefixCls:me,overlayInnerStyle:Ue}),N)))},K=function(Q,P){var b={};for(var E in Q)Object.prototype.hasOwnProperty.call(Q,E)&&P.indexOf(E)<0&&(b[E]=Q[E]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var N=0,E=Object.getOwnPropertySymbols(Q);N<E.length;N++)P.indexOf(E[N])<0&&Object.prototype.propertyIsEnumerable.call(Q,E[N])&&(b[E[N]]=Q[E[N]]);return b};const L=d.forwardRef((Q,P)=>{var b,E;const{prefixCls:N,openClassName:ie,getTooltipContainer:Ie,color:Ze,overlayInnerStyle:me,children:Ce,afterOpenChange:Ke,afterVisibleChange:Qe,destroyTooltipOnHide:Ge,arrow:wt=!0,title:Ue,overlay:bt,builtinPlacements:Le,arrowPointAtCenter:lt=!1,autoAdjustOverflow:Re=!0,motion:Te,getPopupContainer:pe,placement:We="top",mouseEnterDelay:De=.1,mouseLeaveDelay:Se=.1,overlayStyle:k,rootClassName:fe,overlayClassName:ve,styles:Be,classNames:qe}=Q,at=K(Q,["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"]),ct=!!wt,[,mt]=(0,w.ZP)(),{getPopupContainer:dt,getPrefixCls:gt,direction:Lt,className:St,style:Ct,classNames:nt,styles:vt}=(0,A.dj)("tooltip"),pt=(0,U.ln)("Tooltip"),be=d.useRef(null),Je=()=>{var sn;(sn=be.current)===null||sn===void 0||sn.forceAlign()};d.useImperativeHandle(P,()=>{var sn,An;return{forceAlign:Je,forcePopupAlign:()=>{pt.deprecated(!1,"forcePopupAlign","forceAlign"),Je()},nativeElement:(sn=be.current)===null||sn===void 0?void 0:sn.nativeElement,popupElement:(An=be.current)===null||An===void 0?void 0:An.popupElement}});const[x,T]=(0,W.Z)(!1,{value:(b=Q.open)!==null&&b!==void 0?b:Q.visible,defaultValue:(E=Q.defaultOpen)!==null&&E!==void 0?E:Q.defaultVisible}),$e=!Ue&&!bt&&Ue!==0,j=sn=>{var An,Kt;T($e?!1:sn),$e||((An=Q.onOpenChange)===null||An===void 0||An.call(Q,sn),(Kt=Q.onVisibleChange)===null||Kt===void 0||Kt.call(Q,sn))},ae=d.useMemo(()=>{var sn,An;let Kt=lt;return typeof wt=="object"&&(Kt=(An=(sn=wt.pointAtCenter)!==null&&sn!==void 0?sn:wt.arrowPointAtCenter)!==null&&An!==void 0?An:lt),Le||(0,o.Z)({arrowPointAtCenter:Kt,autoAdjustOverflow:Re,arrowWidth:ct?mt.sizePopupArrow:0,borderRadius:mt.borderRadius,offset:mt.marginXXS,visibleFirst:!0})},[lt,wt,Le,mt]),xt=d.useMemo(()=>Ue===0?Ue:bt||Ue||"",[bt,Ue]),Ae=d.createElement(g.Z,{space:!0},typeof xt=="function"?xt():xt),Me=gt("tooltip",N),Xe=gt(),ee=Q["data-popover-inject"];let oe=x;!("open"in Q)&&!("visible"in Q)&&$e&&(oe=!1);const xe=d.isValidElement(Ce)&&!(0,X.M2)(Ce)?Ce:d.createElement("span",null,Ce),ze=xe.props,F=!ze.className||typeof ze.className=="string"?Ee()(ze.className,ie||`${Me}-open`):ze.className,[tt,se,it]=ce(Me,!ee),Ot=Fe(Me,Ze),Ut=Ot.arrowStyle,Ht=Ee()(ve,{[`${Me}-rtl`]:Lt==="rtl"},Ot.className,fe,se,it,St,nt.root,qe==null?void 0:qe.root),Xt=Ee()(nt.body,qe==null?void 0:qe.body),[Vt,hn]=(0,ne.Cn)("Tooltip",at.zIndex),Dn=d.createElement(ye.Z,Object.assign({},at,{zIndex:Vt,showArrow:ct,placement:We,mouseEnterDelay:De,mouseLeaveDelay:Se,prefixCls:Me,classNames:{root:Ht,body:Xt},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ut),vt.root),Ct),k),Be==null?void 0:Be.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},vt.body),me),Be==null?void 0:Be.body),Ot.overlayStyle)},getTooltipContainer:pe||Ie||dt,ref:be,builtinPlacements:ae,overlay:Ae,visible:oe,onVisibleChange:j,afterVisibleChange:Ke!=null?Ke:Qe,arrowContent:d.createElement("span",{className:`${Me}-arrow-content`}),motion:{motionName:(0,J.m)(Xe,"zoom-big-fast",Q.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!Ge}),oe?(0,X.Tm)(xe,{className:F}):xe);return tt(d.createElement(S.Z.Provider,{value:hn},Dn))});L._InternalPanelDoNotUseOrYouWillBeFired=Ve;var Y=L},64018:function(){var Jt,ot,_,d=!1,ge,Ee;window.PR_SHOULD_USE_CONTINUATION=!0;var ye,W;(function(){var g=window,ne=["break,continue,do,else,for,if,return,while"],J=[ne,"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=[J,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],X=[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"],U=[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",A=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],I="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=[ne,"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"],re=[ne,"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"],G=[ne,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],D=[X,S,U,A,I,q,re,G],H=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,$="str",z="kwd",de="com",we="typ",ce="lit",Oe="pun",Fe="pln",Ne="tag",Ve="dec",K="src",B="atn",L="atv",Y="nocode",Q="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function P(Te){for(var pe=0,We=!1,De=!1,Se=0,k=Te.length;Se<k;++Se){var fe=Te[Se];if(fe.ignoreCase)De=!0;else if(/[a-z]/i.test(fe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){We=!0,De=!1;break}}var ve={b:8,t:9,n:10,v:11,f:12,r:13};function Be(dt){var gt=dt.charCodeAt(0);if(gt!==92)return gt;var Lt=dt.charAt(1);return gt=ve[Lt],gt||("0"<=Lt&&Lt<="7"?parseInt(dt.substring(1),8):Lt==="u"||Lt==="x"?parseInt(dt.substring(2),16):dt.charCodeAt(1))}function qe(dt){if(dt<32)return(dt<16?"\\x0":"\\x")+dt.toString(16);var gt=String.fromCharCode(dt);return gt==="\\"||gt==="-"||gt==="]"||gt==="^"?"\\"+gt:gt}function at(dt){var gt=dt.substring(1,dt.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Lt=[],St=gt[0]==="^",Ct=["["];St&&Ct.push("^");for(var nt=St?1:0,vt=gt.length;nt<vt;++nt){var pt=gt[nt];if(/\\[bdsw]/i.test(pt))Ct.push(pt);else{var be=Be(pt),Je;nt+2<vt&>[nt+1]==="-"?(Je=Be(gt[nt+2]),nt+=2):Je=be,Lt.push([be,Je]),Je<65||be>122||(Je<65||be>90||Lt.push([Math.max(65,be)|32,Math.min(Je,90)|32]),Je<97||be>122||Lt.push([Math.max(97,be)&-33,Math.min(Je,122)&-33]))}}Lt.sort(function(j,ae){return j[0]-ae[0]||ae[1]-j[1]});for(var x=[],T=[],nt=0;nt<Lt.length;++nt){var $e=Lt[nt];$e[0]<=T[1]+1?T[1]=Math.max(T[1],$e[1]):x.push(T=$e)}for(var nt=0;nt<x.length;++nt){var $e=x[nt];Ct.push(qe($e[0])),$e[1]>$e[0]&&($e[1]+1>$e[0]&&Ct.push("-"),Ct.push(qe($e[1])))}return Ct.push("]"),Ct.join("")}function ct(dt){for(var gt=dt.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Lt=gt.length,St=[],Ct=0,nt=0;Ct<Lt;++Ct){var vt=gt[Ct];if(vt==="(")++nt;else if(vt.charAt(0)==="\\"){var pt=+vt.substring(1);pt&&(pt<=nt?St[pt]=-1:gt[Ct]=qe(pt))}}for(var Ct=1;Ct<St.length;++Ct)St[Ct]===-1&&(St[Ct]=++pe);for(var Ct=0,nt=0;Ct<Lt;++Ct){var vt=gt[Ct];if(vt==="(")++nt,St[nt]||(gt[Ct]="(?:");else if(vt.charAt(0)==="\\"){var pt=+vt.substring(1);pt&&pt<=nt&&(gt[Ct]="\\"+St[pt])}}for(var Ct=0;Ct<Lt;++Ct)gt[Ct]==="^"&>[Ct+1]!=="^"&&(gt[Ct]="");if(dt.ignoreCase&&We)for(var Ct=0;Ct<Lt;++Ct){var vt=gt[Ct],be=vt.charAt(0);vt.length>=2&&be==="["?gt[Ct]=at(vt):be!=="\\"&&(gt[Ct]=vt.replace(/[a-zA-Z]/g,function(T){var $e=T.charCodeAt(0);return"["+String.fromCharCode($e&-33,$e|32)+"]"}))}return gt.join("")}for(var mt=[],Se=0,k=Te.length;Se<k;++Se){var fe=Te[Se];if(fe.global||fe.multiline)throw new Error(""+fe);mt.push("(?:"+ct(fe)+")")}return new RegExp(mt.join("|"),De?"gi":"g")}function b(Te,pe){var We=/(?:^|\s)nocode(?:\s|$)/,De=[],Se=0,k=[],fe=0;function ve(Be){var qe=Be.nodeType;if(qe==1){if(We.test(Be.className))return;for(var at=Be.firstChild;at;at=at.nextSibling)ve(at);var ct=Be.nodeName.toLowerCase();(ct==="br"||ct==="li")&&(De[fe]=`
|
|
`,k[fe<<1]=Se++,k[fe++<<1|1]=Be)}else if(qe==3||qe==4){var mt=Be.nodeValue;mt.length&&(pe?mt=mt.replace(/\r\n?/g,`
|
|
`):mt=mt.replace(/[ \t\r\n]+/g," "),De[fe]=mt,k[fe<<1]=Se,Se+=mt.length,k[fe++<<1|1]=Be)}}return ve(Te),{sourceCode:De.join("").replace(/\n$/,""),spans:k}}function E(Te,pe,We,De,Se){if(We){var k={sourceNode:Te,pre:1,langExtension:null,numberLines:null,sourceCode:We,spans:null,basePos:pe,decorations:null};De(k),Se.push.apply(Se,k.decorations)}}var N=/\S/;function ie(Te){for(var pe=void 0,We=Te.firstChild;We;We=We.nextSibling){var De=We.nodeType;pe=De===1?pe?Te:We:De===3&&N.test(We.nodeValue)?Te:pe}return pe===Te?void 0:pe}function Ie(Te,pe){var We={},De;(function(){for(var fe=Te.concat(pe),ve=[],Be={},qe=0,at=fe.length;qe<at;++qe){var ct=fe[qe],mt=ct[3];if(mt)for(var dt=mt.length;--dt>=0;)We[mt.charAt(dt)]=ct;var gt=ct[1],Lt=""+gt;Be.hasOwnProperty(Lt)||(ve.push(gt),Be[Lt]=null)}ve.push(/[\0-\uffff]/),De=P(ve)})();var Se=pe.length,k=function(fe){for(var ve=fe.sourceCode,Be=fe.basePos,qe=fe.sourceNode,at=[Be,Fe],ct=0,mt=ve.match(De)||[],dt={},gt=0,Lt=mt.length;gt<Lt;++gt){var St=mt[gt],Ct=dt[St],nt=void 0,vt;if(typeof Ct=="string")vt=!1;else{var pt=We[St.charAt(0)];if(pt)nt=St.match(pt[1]),Ct=pt[0];else{for(var be=0;be<Se;++be)if(pt=pe[be],nt=St.match(pt[1]),nt){Ct=pt[0];break}nt||(Ct=Fe)}vt=Ct.length>=5&&Ct.substring(0,5)==="lang-",vt&&!(nt&&typeof nt[1]=="string")&&(vt=!1,Ct=K),vt||(dt[St]=Ct)}var Je=ct;if(ct+=St.length,!vt)at.push(Be+Je,Ct);else{var x=nt[1],T=St.indexOf(x),$e=T+x.length;nt[2]&&($e=St.length-nt[2].length,T=$e-x.length);var j=Ct.substring(5);E(qe,Be+Je,St.substring(0,T),k,at),E(qe,Be+Je+T,x,wt(j,x),at),E(qe,Be+Je+$e,St.substring($e),k,at)}}fe.decorations=at};return k}function Ze(Te){var pe=[],We=[];Te.tripleQuotedStrings?pe.push([$,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Te.multiLineStrings?pe.push([$,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):pe.push([$,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Te.verbatimStrings&&We.push([$,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var De=Te.hashComments;De&&(Te.cStyleComments?(De>1?pe.push([de,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):pe.push([de,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),We.push([$,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):pe.push([de,/^#[^\r\n]*/,null,"#"])),Te.cStyleComments&&(We.push([de,/^\/\/[^\r\n]*/,null]),We.push([de,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Se=Te.regexLiterals;if(Se){var k=Se>1?"":`
|
|
\r`,fe=k?".":"[\\S\\s]",ve="/(?=[^/*"+k+"])(?:[^/\\x5B\\x5C"+k+"]|\\x5C"+fe+"|\\x5B(?:[^\\x5C\\x5D"+k+"]|\\x5C"+fe+")*(?:\\x5D|$))+/";We.push(["lang-regex",RegExp("^"+Q+"("+ve+")")])}var Be=Te.types;Be&&We.push([we,Be]);var qe=(""+Te.keywords).replace(/^ | $/g,"");qe.length&&We.push([z,new RegExp("^(?:"+qe.replace(/[\s,]+/g,"|")+")\\b"),null]),pe.push([Fe,/^\s+/,null,` \r
|
|
\xA0`]);var at="^.[^\\s\\w.$@'\"`/\\\\]*";return Te.regexLiterals&&(at+="(?!s*/)"),We.push([ce,/^@[a-z_$][a-z_$@0-9]*/i,null],[we,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Fe,/^[a-z_$][a-z_$@0-9]*/i,null],[ce,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Fe,/^\\[\s\S]?/,null],[Oe,new RegExp(at),null]),Ie(pe,We)}var me=Ze({keywords:D,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ce(Te,pe,We){for(var De=/(?:^|\s)nocode(?:\s|$)/,Se=/\r\n?|\n/,k=Te.ownerDocument,fe=k.createElement("li");Te.firstChild;)fe.appendChild(Te.firstChild);var ve=[fe];function Be(gt){var Lt=gt.nodeType;if(Lt==1&&!De.test(gt.className))if(gt.nodeName==="br")qe(gt),gt.parentNode&>.parentNode.removeChild(gt);else for(var St=gt.firstChild;St;St=St.nextSibling)Be(St);else if((Lt==3||Lt==4)&&We){var Ct=gt.nodeValue,nt=Ct.match(Se);if(nt){var vt=Ct.substring(0,nt.index);gt.nodeValue=vt;var pt=Ct.substring(nt.index+nt[0].length);if(pt){var be=gt.parentNode;be.insertBefore(k.createTextNode(pt),gt.nextSibling)}qe(gt),vt||gt.parentNode.removeChild(gt)}}}function qe(gt){for(;!gt.nextSibling;)if(gt=gt.parentNode,!gt)return;function Lt(nt,vt){var pt=vt?nt.cloneNode(!1):nt,be=nt.parentNode;if(be){var Je=Lt(be,1),x=nt.nextSibling;Je.appendChild(pt);for(var T=x;T;T=x)x=T.nextSibling,Je.appendChild(T)}return pt}for(var St=Lt(gt.nextSibling,0),Ct;(Ct=St.parentNode)&&Ct.nodeType===1;)St=Ct;ve.push(St)}for(var at=0;at<ve.length;++at)Be(ve[at]);pe===(pe|0)&&ve[0].setAttribute("value",pe);var ct=k.createElement("ol");ct.className="linenums";for(var mt=Math.max(0,pe-1|0)||0,at=0,dt=ve.length;at<dt;++at)fe=ve[at],fe.className="L"+(at+mt)%10,fe.firstChild||fe.appendChild(k.createTextNode("\xA0")),ct.appendChild(fe);Te.appendChild(ct)}function Ke(Te){var pe=/\bMSIE\s(\d+)/.exec(navigator.userAgent);pe=pe&&+pe[1]<=8;var We=/\n/g,De=Te.sourceCode,Se=De.length,k=0,fe=Te.spans,ve=fe.length,Be=0,qe=Te.decorations,at=qe.length,ct=0;qe[at]=Se;var mt,dt;for(dt=mt=0;dt<at;)qe[dt]!==qe[dt+2]?(qe[mt++]=qe[dt++],qe[mt++]=qe[dt++]):dt+=2;for(at=mt,dt=mt=0;dt<at;){for(var gt=qe[dt],Lt=qe[dt+1],St=dt+2;St+2<=at&&qe[St+1]===Lt;)St+=2;qe[mt++]=gt,qe[mt++]=Lt,dt=St}at=qe.length=mt;var Ct=Te.sourceNode,nt="";Ct&&(nt=Ct.style.display,Ct.style.display="none");try{for(var vt=null;Be<ve;){var pt=fe[Be],be=fe[Be+2]||Se,Je=qe[ct+2]||Se,St=Math.min(be,Je),x=fe[Be+1],T;if(x.nodeType!==1&&(T=De.substring(k,St))){pe&&(T=T.replace(We,"\r")),x.nodeValue=T;var $e=x.ownerDocument,j=$e.createElement("span");j.className=qe[ct+1];var ae=x.parentNode;ae.replaceChild(j,x),j.appendChild(x),k<be&&(fe[Be+1]=x=$e.createTextNode(De.substring(St,be)),ae.insertBefore(x,j.nextSibling))}k=St,k>=be&&(Be+=2),k>=Je&&(ct+=2)}}finally{Ct&&(Ct.style.display=nt)}}var Qe={};function Ge(Te,pe){for(var We=pe.length;--We>=0;){var De=pe[We];Qe.hasOwnProperty(De)?g.console&&console.warn("cannot override language handler %s",De):Qe[De]=Te}}function wt(Te,pe){return Te&&Qe.hasOwnProperty(Te)||(Te=/^\s*</.test(pe)?"default-markup":"default-code"),Qe[Te]}Ge(me,["default-code"]),Ge(Ie([],[[Fe,/^[^<?]+/],[Ve,/^<!\w[^>]*(?:>|$)/],[de,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Oe,/^(?:<[%?]|[%?]>)/],["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"]),Ge(Ie([[Fe,/^[\s]+/,null,` \r
|
|
`],[L,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Ne,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[B,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Oe,/^[=<>\/]+/],["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"]),Ge(Ie([],[[L,/^[\s\S]+/]]),["uq.val"]),Ge(Ze({keywords:X,hashComments:!0,cStyleComments:!0,types:H}),["c","cc","cpp","cxx","cyc","m"]),Ge(Ze({keywords:"null,true,false"}),["json"]),Ge(Ze({keywords:S,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:H}),["cs"]),Ge(Ze({keywords:U,cStyleComments:!0}),["java"]),Ge(Ze({keywords:G,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Ge(Ze({keywords:q,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Ge(Ze({keywords:I,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Ge(Ze({keywords:re,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Ge(Ze({keywords:A,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Ge(Ze({keywords:w,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Ge(Ie([],[[$,/^[\s\S]+/]]),["regex"]);function Ue(Te){var pe=Te.langExtension;try{var We=b(Te.sourceNode,Te.pre),De=We.sourceCode;Te.sourceCode=De,Te.spans=We.spans,Te.basePos=0,wt(pe,De)(Te),Ke(Te)}catch(Se){g.console&&console.log(Se&&Se.stack||Se)}}function bt(Te,pe,We){var De=We||!1,Se=pe||null,k=document.createElement("div");k.innerHTML="<pre>"+Te+"</pre>",k=k.firstChild,De&&Ce(k,De,!0);var fe={langExtension:Se,numberLines:De,sourceNode:k,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Ue(fe),k.innerHTML}function Le(Te,pe){var We=pe||document.body,De=We.ownerDocument||document;function Se(pt){return We.getElementsByTagName(pt)}for(var k=[Se("pre"),Se("code"),Se("xmp")],fe=[],ve=0;ve<k.length;++ve)for(var Be=0,qe=k[ve].length;Be<qe;++Be)fe.push(k[ve][Be]);k=null;var at=Date;at.now||(at={now:function(){return+new Date}});var ct=0,mt=/\blang(?:uage)?-([\w.]+)(?!\S)/,dt=/\bprettyprint\b/,gt=/\bprettyprinted\b/,Lt=/pre|xmp/i,St=/^code$/i,Ct=/^(?:pre|code|xmp)$/i,nt={};function vt(){for(var pt=g.PR_SHOULD_USE_CONTINUATION?at.now()+250:1/0;ct<fe.length&&at.now()<pt;ct++){for(var be=fe[ct],Je=nt,x=be;x=x.previousSibling;){var T=x.nodeType,$e=(T===7||T===8)&&x.nodeValue;if($e?!/^\??prettify\b/.test($e):T!==3||/\S/.test(x.nodeValue))break;if($e){Je={},$e.replace(/\b(\w+)=([\w:.%+-]+)/g,function(se,it,Ot){Je[it]=Ot});break}}var j=be.className;if((Je!==nt||dt.test(j))&&!gt.test(j)){for(var ae=!1,xt=be.parentNode;xt;xt=xt.parentNode){var Ae=xt.tagName;if(Ct.test(Ae)&&xt.className&&dt.test(xt.className)){ae=!0;break}}if(!ae){be.className+=" prettyprinted";var Me=Je.lang;if(!Me){Me=j.match(mt);var Xe;!Me&&(Xe=ie(be))&&St.test(Xe.tagName)&&(Me=Xe.className.match(mt)),Me&&(Me=Me[1])}var ee;if(Lt.test(be.tagName))ee=1;else{var oe=be.currentStyle,xe=De.defaultView,ze=oe?oe.whiteSpace:xe&&xe.getComputedStyle?xe.getComputedStyle(be,null).getPropertyValue("white-space"):0;ee=ze&&ze.substring(0,3)==="pre"}var F=Je.linenums;(F=F==="true"||+F)||(F=j.match(/\blinenums\b(?::(\d+))?/),F=F?F[1]&&F[1].length?+F[1]:!0:!1),F&&Ce(be,F,ee);var tt={langExtension:Me,sourceNode:be,numberLines:F,pre:ee,sourceCode:null,basePos:null,spans:null,decorations:null};Ue(tt)}}}ct<fe.length?g.setTimeout(vt,250):typeof Te=="function"&&Te()}vt()}var lt=g.PR={createSimpleLexer:Ie,registerLangHandler:Ge,sourceDecorator:Ze,PR_ATTRIB_NAME:B,PR_ATTRIB_VALUE:L,PR_COMMENT:de,PR_DECLARATION:Ve,PR_KEYWORD:z,PR_LITERAL:ce,PR_NOCODE:Y,PR_PLAIN:Fe,PR_PUNCTUATION:Oe,PR_SOURCE:K,PR_STRING:$,PR_TAG:Ne,PR_TYPE:we,prettyPrintOne:d?g.prettyPrintOne=bt:ye=bt,prettyPrint:W=d?g.prettyPrint=Le:W=Le},Re=g.define;typeof Re=="function"&&Re.amd&&Re("google-code-prettify",[],function(){return lt})})()},25769:function(Jt,ot,_){"use strict";var d=_(98040),ge={"text/plain":"Text","text/html":"Url",default:"Text"},Ee="Copy to clipboard: #{key}, Enter";function ye(g){var ne=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return g.replace(/#{\s*key\s*}/g,ne)}function W(g,ne){var J,o,X,U,S,w,A=!1;ne||(ne={}),J=ne.debug||!1;try{X=d(),U=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(),ne.format)if(q.preventDefault(),typeof q.clipboardData=="undefined"){J&&console.warn("unable to use e.clipboardData"),J&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var re=ge[ne.format]||ge.default;window.clipboardData.setData(re,g)}else q.clipboardData.clearData(),q.clipboardData.setData(ne.format,g);ne.onCopy&&(q.preventDefault(),ne.onCopy(q.clipboardData))}),document.body.appendChild(w),U.selectNodeContents(w),S.addRange(U);var I=document.execCommand("copy");if(!I)throw new Error("copy command was unsuccessful");A=!0}catch(q){J&&console.error("unable to copy using execCommand: ",q),J&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(ne.format||"text",g),ne.onCopy&&ne.onCopy(window.clipboardData),A=!0}catch(re){J&&console.error("unable to copy using clipboardData: ",re),J&&console.error("falling back to prompt"),o=ye("message"in ne?ne.message:Ee),window.prompt(o,g)}}finally{S&&(typeof S.removeRange=="function"?S.removeRange(U):S.removeAllRanges()),w&&document.body.removeChild(w),X()}return A}Jt.exports=W},53184:function(Jt,ot,_){"use strict";var d,ge;function Ee(ye,W,g){var ne=function(J,o){return ye.js_beautify(J,o)};return ne.js=ye.js_beautify,ne.css=W.css_beautify,ne.html=g.html_beautify,ne.js_beautify=ye.js_beautify,ne.css_beautify=W.css_beautify,ne.html_beautify=g.html_beautify,ne}d=[_(58553),_(87804),_(40998)],ge=function(ye,W,g){return Ee(ye,W,g)}.apply(ot,d),ge!==void 0&&(Jt.exports=ge)},87804:function(Jt,ot){var _,d;(function(){var ge;(function(){"use strict";var ye=[,,function(J){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 X(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}X.prototype.get_indent_size=function(S,w){var A=this.__base_string_length;return w=w||0,S<0&&(A=0),A+=S*this.__indent_size,A+=w,A},X.prototype.get_indent_string=function(S,w){var A=this.__base_string;return w=w||0,S<0&&(S=0,A=""),w+=S*this.__indent_size,this.__ensure_cache(w),A+=this.__cache[w],A},X.prototype.__ensure_cache=function(S){for(;S>=this.__cache.length;)this.__add_column()},X.prototype.__add_column=function(){var S=this.__cache.length,w=0,A="";this.__indent_size&&S>=this.__indent_size&&(w=Math.floor(S/this.__indent_size),S-=w*this.__indent_size,A=new Array(w+1).join(this.__indent_string)),S&&(A+=new Array(S+1).join(" ")),this.__cache.push(A)};function U(S,w){this.__indent_cache=new X(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()}U.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},U.prototype.get_line_number=function(){return this.__lines.length},U.prototype.get_indent_string=function(S,w){return this.__indent_cache.get_indent_string(S,w)},U.prototype.get_indent_size=function(S,w){return this.__indent_cache.get_indent_size(S,w)},U.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},U.prototype.add_new_line=function(S){return this.is_empty()||!S&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},U.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 A=this.__lines.join(`
|
|
`);return S!==`
|
|
`&&(A=A.replace(/[\n]/g,S)),A},U.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},U.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)},U.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},U.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()},U.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(" "))},U.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()},U.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},U.prototype.just_added_newline=function(){return this.current_line.is_empty()},U.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},U.prototype.ensure_empty_line_above=function(S,w){for(var A=this.__lines.length-2;A>=0;){var I=this.__lines[A];if(I.is_empty())break;if(I.item(0).indexOf(S)!==0&&I.item(-1)!==w){this.__lines.splice(A+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}A--}},J.exports.Output=U},,,,function(J){function o(S,w){this.raw_options=X(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 A=this.raw_options[S],I=w||[];return typeof A=="object"?A!==null&&typeof A.concat=="function"&&(I=A.concat()):typeof A=="string"&&(I=A.split(/[^a-zA-Z0-9_\/\-]+/)),I},o.prototype._get_boolean=function(S,w){var A=this.raw_options[S],I=A===void 0?!!w:!!A;return I},o.prototype._get_characters=function(S,w){var A=this.raw_options[S],I=w||"";return typeof A=="string"&&(I=A.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),I},o.prototype._get_number=function(S,w){var A=this.raw_options[S];w=parseInt(w,10),isNaN(w)&&(w=0);var I=parseInt(A,10);return isNaN(I)&&(I=w),I},o.prototype._get_selection=function(S,w,A){var I=this._get_selection_list(S,w,A);if(I.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 I[0]},o.prototype._get_selection_list=function(S,w,A){if(!w||w.length===0)throw new Error("Selection list cannot be empty.");if(A=A||[w[0]],!this._is_valid_selection(A,w))throw new Error("Invalid Default Value!");var I=this._get_array(S,A);if(!this._is_valid_selection(I,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 I},o.prototype._is_valid_selection=function(S,w){return S.length&&w.length&&!S.some(function(A){return w.indexOf(A)===-1})};function X(S,w){var A={};S=U(S);var I;for(I in S)I!==w&&(A[I]=S[I]);if(w&&S[w])for(I in S[w])A[I]=S[w][I];return A}function U(S){var w={},A;for(A in S){var I=A.replace(/-/g,"_");w[I]=S[A]}return w}J.exports.Options=o,J.exports.normalizeOpts=U,J.exports.mergeOpts=X},,function(J){var o=RegExp.prototype.hasOwnProperty("sticky");function X(U){this.__input=U||"",this.__input_length=this.__input.length,this.__position=0}X.prototype.restart=function(){this.__position=0},X.prototype.back=function(){this.__position>0&&(this.__position-=1)},X.prototype.hasNext=function(){return this.__position<this.__input_length},X.prototype.next=function(){var U=null;return this.hasNext()&&(U=this.__input.charAt(this.__position),this.__position+=1),U},X.prototype.peek=function(U){var S=null;return U=U||0,U+=this.__position,U>=0&&U<this.__input_length&&(S=this.__input.charAt(U)),S},X.prototype.__match=function(U,S){U.lastIndex=S;var w=U.exec(this.__input);return w&&!(o&&U.sticky)&&w.index!==S&&(w=null),w},X.prototype.test=function(U,S){return S=S||0,S+=this.__position,S>=0&&S<this.__input_length?!!this.__match(U,S):!1},X.prototype.testChar=function(U,S){var w=this.peek(S);return U.lastIndex=0,w!==null&&U.test(w)},X.prototype.match=function(U){var S=this.__match(U,this.__position);return S?this.__position+=S[0].length:S=null,S},X.prototype.read=function(U,S,w){var A="",I;return U&&(I=this.match(U),I&&(A+=I[0])),S&&(I||!U)&&(A+=this.readUntil(S,w)),A},X.prototype.readUntil=function(U,S){var w="",A=this.__position;U.lastIndex=this.__position;var I=U.exec(this.__input);return I?(A=I.index,S&&(A+=I[0].length)):A=this.__input_length,w=this.__input.substring(this.__position,A),this.__position=A,w},X.prototype.readUntilAfter=function(U){return this.readUntil(U,!0)},X.prototype.get_regexp=function(U,S){var w=null,A="g";return S&&o&&(A="y"),typeof U=="string"&&U!==""?w=new RegExp(U,A):U&&(w=new RegExp(U.source,A)),w},X.prototype.get_literal_regexp=function(U){return RegExp(U.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},X.prototype.peekUntilAfter=function(U){var S=this.__position,w=this.readUntilAfter(U);return this.__position=S,w},X.prototype.lookBack=function(U){var S=this.__position-1;return S>=U.length&&this.__input.substring(S-U.length,S).toLowerCase()===U},J.exports.InputScanner=X},,,,,function(J){function o(X,U){X=typeof X=="string"?X:X.source,U=typeof U=="string"?U:U.source,this.__directives_block_pattern=new RegExp(X+/ beautify( \w+[:]\w+)+ /.source+U,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(X+/\sbeautify\signore:end\s/.source+U,"g")}o.prototype.get_directives=function(X){if(!X.match(this.__directives_block_pattern))return null;var U={};this.__directive_pattern.lastIndex=0;for(var S=this.__directive_pattern.exec(X);S;)U[S[1]]=S[2],S=this.__directive_pattern.exec(X);return U},o.prototype.readIgnored=function(X){return X.readUntilAfter(this.__directives_end_ignore_pattern)},J.exports.Directives=o},,function(J,o,X){var U=X(16).Beautifier,S=X(17).Options;function w(A,I){var q=new U(A,I);return q.beautify()}J.exports=w,J.exports.defaultOptions=function(){return new S}},function(J,o,X){var U=X(17).Options,S=X(2).Output,w=X(8).InputScanner,A=X(13).Directives,I=new A(/\/\*/,/\*\//),q=/\r\n|[\r\n]/,re=/\r\n|[\r\n]/g,G=/\s/,D=/(?:\s|\n)+/g,H=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,$=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function z(de,we){this._source_text=de||"",this._options=new U(we),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}z.prototype.eatString=function(de){var we="";for(this._ch=this._input.next();this._ch;){if(we+=this._ch,this._ch==="\\")we+=this._input.next();else if(de.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return we},z.prototype.eatWhitespace=function(de){for(var we=G.test(this._input.peek()),ce=0;G.test(this._input.peek());)this._ch=this._input.next(),de&&this._ch===`
|
|
`&&(ce===0||ce<this._options.max_preserve_newlines)&&(ce++,this._output.add_new_line(!0));return we},z.prototype.foundNestedPseudoClass=function(){for(var de=0,we=1,ce=this._input.peek(we);ce;){if(ce==="{")return!0;if(ce==="(")de+=1;else if(ce===")"){if(de===0)return!1;de-=1}else if(ce===";"||ce==="}")return!1;we++,ce=this._input.peek(we)}return!1},z.prototype.print_string=function(de){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(de)},z.prototype.preserveSingleSpace=function(de){de&&(this._output.space_before_token=!0)},z.prototype.indent=function(){this._indentLevel++},z.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},z.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var de=this._source_text,we=this._options.eol;we==="auto"&&(we=`
|
|
`,de&&q.test(de||"")&&(we=de.match(q)[0])),de=de.replace(re,`
|
|
`);var ce=de.match(/^[\t ]*/)[0];this._output=new S(this._options,ce),this._input=new w(de),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var Oe=0,Fe=!1,Ne=!1,Ve=!1,K=!1,B=!1,L=this._ch,Y=!1,Q,P,b;Q=this._input.read(D),P=Q!=="",b=L,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),L=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var E=this._input.read(H),N=I.get_directives(E);N&&N.ignore==="start"&&(E+=I.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($)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(P),this.print_string(this._ch);var ie=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ie.match(/[ :]$/)&&(ie=this.eatString(": ").replace(/\s+$/,""),this.print_string(ie),this._output.space_before_token=!0),Oe===0&&ie.indexOf(":")!==-1&&(Ne=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(P),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Ie=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Ie.match(/[ :]$/)&&(Ie=this.eatString(": ").replace(/\s+$/,""),this.print_string(Ie),this._output.space_before_token=!0),Oe===0&&Ie.indexOf(":")!==-1?(Ne=!0,this.indent()):Ie in this.NESTED_AT_RULE?(this._nestedLevel+=1,Ie in this.CONDITIONAL_GROUP_RULE&&(Ve=!0)):Oe===0&&!Ne&&(K=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(P),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")Ne&&(Ne=!1,this.outdent()),K=!1,Ve?(Ve=!1,Fe=this._indentLevel>=this._nestedLevel):Fe=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Fe&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(b==="("?this._output.space_before_token=!1:b!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),b==="{"&&this._output.trim(!0),Ne&&(this.outdent(),Ne=!1),this.print_string(this._ch),Fe=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var Ze=0;Ze<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Ze++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Ze])){Y=!0;break}(Fe||Ve)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!K&&Oe===0?(this.print_string(":"),Ne||(Ne=!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 me=b==='"'||b==="'";this.preserveSingleSpace(me||P),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")Y=!1,Oe===0?(Ne&&(this.outdent(),Ne=!1),K=!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(),Oe++,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(")")),Oe&&(Oe--,this.outdent()));else{var Ce=!1;this._input.lookBack("with")&&(Ce=!0),this.preserveSingleSpace(P||Ce),this.print_string(this._ch),Ne&&b==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),B=!0):(this.eatWhitespace(),Oe++,this.indent())}else if(this._ch===")")Oe&&(Oe--,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&&(!Ne||B)&&Oe===0&&!K?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!Ne&&Oe===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&&G.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(P),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),G.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 Ke=b==='"'||b==="'";this.preserveSingleSpace(Ke||P),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&Y&&this._output.add_new_line()}var Qe=this._output.get_code(we);return Qe},J.exports.Beautifier=z},function(J,o,X){var U=X(6).Options;function S(w){U.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 A=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||A;var I=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var q=0;q<I.length;q++)I[q]!=="expand"?this.brace_style="collapse":this.brace_style=I[q]}S.prototype=new U,J.exports.Options=S}],W={};function g(J){var o=W[J];if(o!==void 0)return o.exports;var X=W[J]={exports:{}};return ye[J](X,X.exports,g),X.exports}var ne=g(15);ge=ne})();var Ee=ge;_=[],d=function(){return{css_beautify:Ee}}.apply(ot,_),d!==void 0&&(Jt.exports=d)})()},40998:function(Jt,ot,_){var d,ge;(function(){var Ee;(function(){"use strict";var ne=[,,function(U){function S(I){this.__parent=I,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 I=new S(this.__parent);return I.set_indent(this.__indent_count,this.__alignment_count),I},S.prototype.item=function(I){return I<0?this.__items[this.__items.length+I]:this.__items[I]},S.prototype.has_match=function(I){for(var q=this.__items.length-1;q>=0;q--)if(this.__items[q].match(I))return!0;return!1},S.prototype.set_indent=function(I,q){this.is_empty()&&(this.__indent_count=I||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 I=this.__parent.current_line;return I.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),I.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),I.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,I.__items[0]===" "&&(I.__items.splice(0,1),I.__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(I){this.__items.push(I);var q=I.lastIndexOf(`
|
|
`);q!==-1?this.__character_count=I.length-q:this.__character_count+=I.length},S.prototype.pop=function(){var I=null;return this.is_empty()||(I=this.__items.pop(),this.__character_count-=I.length),I},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 I="";return this.is_empty()?this.__parent.indent_empty_lines&&(I=this.__parent.get_indent_string(this.__indent_count)):(I=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),I+=this.__items.join("")),I};function w(I,q){this.__cache=[""],this.__indent_size=I.indent_size,this.__indent_string=I.indent_char,I.indent_with_tabs||(this.__indent_string=new Array(I.indent_size+1).join(I.indent_char)),q=q||"",I.indent_level>0&&(q=new Array(I.indent_level+1).join(this.__indent_string)),this.__base_string=q,this.__base_string_length=q.length}w.prototype.get_indent_size=function(I,q){var re=this.__base_string_length;return q=q||0,I<0&&(re=0),re+=I*this.__indent_size,re+=q,re},w.prototype.get_indent_string=function(I,q){var re=this.__base_string;return q=q||0,I<0&&(I=0,re=""),q+=I*this.__indent_size,this.__ensure_cache(q),re+=this.__cache[q],re},w.prototype.__ensure_cache=function(I){for(;I>=this.__cache.length;)this.__add_column()},w.prototype.__add_column=function(){var I=this.__cache.length,q=0,re="";this.__indent_size&&I>=this.__indent_size&&(q=Math.floor(I/this.__indent_size),I-=q*this.__indent_size,re=new Array(q+1).join(this.__indent_string)),I&&(re+=new Array(I+1).join(" ")),this.__cache.push(re)};function A(I,q){this.__indent_cache=new w(I,q),this.raw=!1,this._end_with_newline=I.end_with_newline,this.indent_size=I.indent_size,this.wrap_line_length=I.wrap_line_length,this.indent_empty_lines=I.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()}A.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},A.prototype.get_line_number=function(){return this.__lines.length},A.prototype.get_indent_string=function(I,q){return this.__indent_cache.get_indent_string(I,q)},A.prototype.get_indent_size=function(I,q){return this.__indent_cache.get_indent_size(I,q)},A.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},A.prototype.add_new_line=function(I){return this.is_empty()||!I&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},A.prototype.get_code=function(I){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 re=this.__lines.join(`
|
|
`);return I!==`
|
|
`&&(re=re.replace(/[\n]/g,I)),re},A.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},A.prototype.set_indent=function(I,q){return I=I||0,q=q||0,this.next_line.set_indent(I,q),this.__lines.length>1?(this.current_line.set_indent(I,q),!0):(this.current_line.set_indent(),!1)},A.prototype.add_raw_token=function(I){for(var q=0;q<I.newlines;q++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(I.whitespace_before),this.current_line.push(I.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},A.prototype.add_token=function(I){this.__add_space_before_token(),this.current_line.push(I),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},A.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(" "))},A.prototype.remove_indent=function(I){for(var q=this.__lines.length;I<q;)this.__lines[I]._remove_indent(),I++;this.current_line._remove_wrap_indent()},A.prototype.trim=function(I){for(I=I===void 0?!1:I,this.current_line.trim();I&&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},A.prototype.just_added_newline=function(){return this.current_line.is_empty()},A.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},A.prototype.ensure_empty_line_above=function(I,q){for(var re=this.__lines.length-2;re>=0;){var G=this.__lines[re];if(G.is_empty())break;if(G.item(0).indexOf(I)!==0&&G.item(-1)!==q){this.__lines.splice(re+1,0,new S(this)),this.previous_line=this.__lines[this.__lines.length-2];break}re--}},U.exports.Output=A},function(U){function S(w,A,I,q){this.type=w,this.text=A,this.comments_before=null,this.newlines=I||0,this.whitespace_before=q||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}U.exports.Token=S},,,function(U){function S(I,q){this.raw_options=w(I,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(I,q){var re=this.raw_options[I],G=q||[];return typeof re=="object"?re!==null&&typeof re.concat=="function"&&(G=re.concat()):typeof re=="string"&&(G=re.split(/[^a-zA-Z0-9_\/\-]+/)),G},S.prototype._get_boolean=function(I,q){var re=this.raw_options[I],G=re===void 0?!!q:!!re;return G},S.prototype._get_characters=function(I,q){var re=this.raw_options[I],G=q||"";return typeof re=="string"&&(G=re.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),G},S.prototype._get_number=function(I,q){var re=this.raw_options[I];q=parseInt(q,10),isNaN(q)&&(q=0);var G=parseInt(re,10);return isNaN(G)&&(G=q),G},S.prototype._get_selection=function(I,q,re){var G=this._get_selection_list(I,q,re);if(G.length!==1)throw new Error("Invalid Option Value: The option '"+I+`' can only be one of the following values:
|
|
`+q+`
|
|
You passed in: '`+this.raw_options[I]+"'");return G[0]},S.prototype._get_selection_list=function(I,q,re){if(!q||q.length===0)throw new Error("Selection list cannot be empty.");if(re=re||[q[0]],!this._is_valid_selection(re,q))throw new Error("Invalid Default Value!");var G=this._get_array(I,re);if(!this._is_valid_selection(G,q))throw new Error("Invalid Option Value: The option '"+I+`' can contain only the following values:
|
|
`+q+`
|
|
You passed in: '`+this.raw_options[I]+"'");return G},S.prototype._is_valid_selection=function(I,q){return I.length&&q.length&&!I.some(function(re){return q.indexOf(re)===-1})};function w(I,q){var re={};I=A(I);var G;for(G in I)G!==q&&(re[G]=I[G]);if(q&&I[q])for(G in I[q])re[G]=I[q][G];return re}function A(I){var q={},re;for(re in I){var G=re.replace(/-/g,"_");q[G]=I[re]}return q}U.exports.Options=S,U.exports.normalizeOpts=A,U.exports.mergeOpts=w},,function(U){var S=RegExp.prototype.hasOwnProperty("sticky");function w(A){this.__input=A||"",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 A=null;return this.hasNext()&&(A=this.__input.charAt(this.__position),this.__position+=1),A},w.prototype.peek=function(A){var I=null;return A=A||0,A+=this.__position,A>=0&&A<this.__input_length&&(I=this.__input.charAt(A)),I},w.prototype.__match=function(A,I){A.lastIndex=I;var q=A.exec(this.__input);return q&&!(S&&A.sticky)&&q.index!==I&&(q=null),q},w.prototype.test=function(A,I){return I=I||0,I+=this.__position,I>=0&&I<this.__input_length?!!this.__match(A,I):!1},w.prototype.testChar=function(A,I){var q=this.peek(I);return A.lastIndex=0,q!==null&&A.test(q)},w.prototype.match=function(A){var I=this.__match(A,this.__position);return I?this.__position+=I[0].length:I=null,I},w.prototype.read=function(A,I,q){var re="",G;return A&&(G=this.match(A),G&&(re+=G[0])),I&&(G||!A)&&(re+=this.readUntil(I,q)),re},w.prototype.readUntil=function(A,I){var q="",re=this.__position;A.lastIndex=this.__position;var G=A.exec(this.__input);return G?(re=G.index,I&&(re+=G[0].length)):re=this.__input_length,q=this.__input.substring(this.__position,re),this.__position=re,q},w.prototype.readUntilAfter=function(A){return this.readUntil(A,!0)},w.prototype.get_regexp=function(A,I){var q=null,re="g";return I&&S&&(re="y"),typeof A=="string"&&A!==""?q=new RegExp(A,re):A&&(q=new RegExp(A.source,re)),q},w.prototype.get_literal_regexp=function(A){return RegExp(A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},w.prototype.peekUntilAfter=function(A){var I=this.__position,q=this.readUntilAfter(A);return this.__position=I,q},w.prototype.lookBack=function(A){var I=this.__position-1;return I>=A.length&&this.__input.substring(I-A.length,I).toLowerCase()===A},U.exports.InputScanner=w},function(U,S,w){var A=w(8).InputScanner,I=w(3).Token,q=w(10).TokenStream,re=w(11).WhitespacePattern,G={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},D=function(H,$){this._input=new A(H),this._options=$||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new re(this._input)};D.prototype.tokenize=function(){this._input.restart(),this.__tokens=new q,this._reset();for(var H,$=new I(G.START,""),z=null,de=[],we=new q;$.type!==G.EOF;){for(H=this._get_next_token($,z);this._is_comment(H);)we.add(H),H=this._get_next_token($,z);we.isEmpty()||(H.comments_before=we,we=new q),H.parent=z,this._is_opening(H)?(de.push(z),z=H):z&&this._is_closing(H,z)&&(H.opened=z,z.closed=H,z=de.pop(),H.parent=z),H.previous=$,$.next=H,this.__tokens.add(H),$=H}return this.__tokens},D.prototype._is_first_token=function(){return this.__tokens.isEmpty()},D.prototype._reset=function(){},D.prototype._get_next_token=function(H,$){this._readWhitespace();var z=this._input.read(/.+/g);return z?this._create_token(G.RAW,z):this._create_token(G.EOF,"")},D.prototype._is_comment=function(H){return!1},D.prototype._is_opening=function(H){return!1},D.prototype._is_closing=function(H,$){return!1},D.prototype._create_token=function(H,$){var z=new I(H,$,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return z},D.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},U.exports.Tokenizer=D,U.exports.TOKEN=G},function(U){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 A=null;return w=w||0,w+=this.__position,w>=0&&w<this.__tokens_length&&(A=this.__tokens[w]),A},S.prototype.add=function(w){this.__parent_token&&(w.parent=this.__parent_token),this.__tokens.push(w),this.__tokens_length+=1},U.exports.TokenStream=S},function(U,S,w){var A=w(12).Pattern;function I(q,re){A.call(this,q,re),re?this._line_regexp=this._input.get_regexp(re._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}I.prototype=new A,I.prototype.__set_whitespace_patterns=function(q,re){q+="\\t ",re+="\\n\\r",this._match_pattern=this._input.get_regexp("["+q+re+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+re+"]")},I.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 re=this.__split(this._newline_regexp,q);this.newline_count=re.length-1,this.whitespace_before_token=re[this.newline_count]}return q},I.prototype.matching=function(q,re){var G=this._create();return G.__set_whitespace_patterns(q,re),G._update(),G},I.prototype._create=function(){return new I(this._input,this)},I.prototype.__split=function(q,re){q.lastIndex=0;for(var G=0,D=[],H=q.exec(re);H;)D.push(re.substring(G,H.index)),G=H.index+H[0].length,H=q.exec(re);return G<re.length?D.push(re.substring(G,re.length)):D.push(""),D},U.exports.WhitespacePattern=I},function(U){function S(w,A){this._input=w,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,A&&(this._starting_pattern=this._input.get_regexp(A._starting_pattern,!0),this._match_pattern=this._input.get_regexp(A._match_pattern,!0),this._until_pattern=this._input.get_regexp(A._until_pattern),this._until_after=A._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 A=this._create();return A._until_after=!0,A._until_pattern=this._input.get_regexp(w),A._update(),A},S.prototype.until=function(w){var A=this._create();return A._until_after=!1,A._until_pattern=this._input.get_regexp(w),A._update(),A},S.prototype.starting_with=function(w){var A=this._create();return A._starting_pattern=this._input.get_regexp(w,!0),A._update(),A},S.prototype.matching=function(w){var A=this._create();return A._match_pattern=this._input.get_regexp(w,!0),A._update(),A},S.prototype._create=function(){return new S(this._input,this)},S.prototype._update=function(){},U.exports.Pattern=S},function(U){function S(w,A){w=typeof w=="string"?w:w.source,A=typeof A=="string"?A:A.source,this.__directives_block_pattern=new RegExp(w+/ beautify( \w+[:]\w+)+ /.source+A,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(w+/\sbeautify\signore:end\s/.source+A,"g")}S.prototype.get_directives=function(w){if(!w.match(this.__directives_block_pattern))return null;var A={};this.__directive_pattern.lastIndex=0;for(var I=this.__directive_pattern.exec(w);I;)A[I[1]]=I[2],I=this.__directive_pattern.exec(w);return A},S.prototype.readIgnored=function(w){return w.readUntilAfter(this.__directives_end_ignore_pattern)},U.exports.Directives=S},function(U,S,w){var A=w(12).Pattern,I={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function q(re,G){A.call(this,re,G),this.__template_pattern=null,this._disabled=Object.assign({},I),this._excluded=Object.assign({},I),G&&(this.__template_pattern=this._input.get_regexp(G.__template_pattern),this._excluded=Object.assign(this._excluded,G._excluded),this._disabled=Object.assign(this._disabled,G._disabled));var D=new A(re);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 A,q.prototype._create=function(){return new q(this._input,this)},q.prototype._update=function(){this.__set_templated_pattern()},q.prototype.disable=function(re){var G=this._create();return G._disabled[re]=!0,G._update(),G},q.prototype.read_options=function(re){var G=this._create();for(var D in I)G._disabled[D]=re.templating.indexOf(D)===-1;return G._update(),G},q.prototype.exclude=function(re){var G=this._create();return G._excluded[re]=!0,G._update(),G},q.prototype.read=function(){var re="";this._match_pattern?re=this._input.read(this._starting_pattern):re=this._input.read(this._starting_pattern,this.__template_pattern);for(var G=this._read_template();G;)this._match_pattern?G+=this._input.read(this._match_pattern):G+=this._input.readUntil(this.__template_pattern),re+=G,G=this._read_template();return this._until_after&&(re+=this._input.readUntilAfter(this._until_pattern)),re},q.prototype.__set_templated_pattern=function(){var re=[];this._disabled.php||re.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||re.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||re.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||re.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(re.push(this.__patterns.django._starting_pattern.source),re.push(this.__patterns.django_value._starting_pattern.source),re.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||re.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&re.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+re.join("|")+")")},q.prototype._read_template=function(){var re="",G=this._input.peek();if(G==="<"){var D=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&D==="?"&&(re=re||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&D==="%"&&(re=re||this.__patterns.erb.read())}else G==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(re=re||this.__patterns.handlebars_comment.read(),re=re||this.__patterns.handlebars_unescaped.read(),re=re||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(re=re||this.__patterns.django_value.read()),this._excluded.django||(re=re||this.__patterns.django_comment.read(),re=re||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(re=re||this.__patterns.smarty_comment.read(),re=re||this.__patterns.smarty_literal.read(),re=re||this.__patterns.smarty.read()));return re},U.exports.TemplatablePattern=q},,,,function(U,S,w){var A=w(19).Beautifier,I=w(20).Options;function q(re,G,D,H){var $=new A(re,G,D,H);return $.beautify()}U.exports=q,U.exports.defaultOptions=function(){return new I}},function(U,S,w){var A=w(20).Options,I=w(2).Output,q=w(21).Tokenizer,re=w(21).TOKEN,G=/\r\n|[\r\n]/,D=/\r\n|[\r\n]/g,H=function(K,B){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=K.max_preserve_newlines,this.preserve_newlines=K.preserve_newlines,this._output=new I(K,B)};H.prototype.current_line_has_match=function(K){return this._output.current_line.has_match(K)},H.prototype.set_space_before_token=function(K,B){this._output.space_before_token=K,this._output.non_breaking_space=B},H.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},H.prototype.add_raw_token=function(K){this._output.add_raw_token(K)},H.prototype.print_preserved_newlines=function(K){var B=0;K.type!==re.TEXT&&K.previous.type!==re.TEXT&&(B=K.newlines?1:0),this.preserve_newlines&&(B=K.newlines<this.max_preserve_newlines+1?K.newlines:this.max_preserve_newlines+1);for(var L=0;L<B;L++)this.print_newline(L>0);return B!==0},H.prototype.traverse_whitespace=function(K){return K.whitespace_before||K.newlines?(this.print_preserved_newlines(K)||(this._output.space_before_token=!0),!0):!1},H.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},H.prototype.print_newline=function(K){this._output.add_new_line(K)},H.prototype.print_token=function(K){K.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(K.text))},H.prototype.indent=function(){this.indent_level++},H.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},H.prototype.get_full_indent=function(K){return K=this.indent_level+(K||0),K<1?"":this._output.get_indent_string(K)};var $=function(K){for(var B=null,L=K.next;L.type!==re.EOF&&K.closed!==L;){if(L.type===re.ATTRIBUTE&&L.text==="type"){L.next&&L.next.type===re.EQUALS&&L.next.next&&L.next.next.type===re.VALUE&&(B=L.next.next.text);break}L=L.next}return B},z=function(K,B){var L=null,Y=null;return B.closed?(K==="script"?L="text/javascript":K==="style"&&(L="text/css"),L=$(B)||L,L.search("text/css")>-1?Y="css":L.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?Y="javascript":L.search(/(text|application|dojo)\/(x-)?(html)/)>-1?Y="html":L.search(/test\/null/)>-1&&(Y="null"),Y):null};function de(K,B){return B.indexOf(K)!==-1}function we(K,B,L){this.parent=K||null,this.tag=B?B.tag_name:"",this.indent_level=L||0,this.parser_token=B||null}function ce(K){this._printer=K,this._current_frame=null}ce.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},ce.prototype.record_tag=function(K){var B=new we(this._current_frame,K,this._printer.indent_level);this._current_frame=B},ce.prototype._try_pop_frame=function(K){var B=null;return K&&(B=K.parser_token,this._printer.indent_level=K.indent_level,this._current_frame=K.parent),B},ce.prototype._get_frame=function(K,B){for(var L=this._current_frame;L&&K.indexOf(L.tag)===-1;){if(B&&B.indexOf(L.tag)!==-1){L=null;break}L=L.parent}return L},ce.prototype.try_pop=function(K,B){var L=this._get_frame([K],B);return this._try_pop_frame(L)},ce.prototype.indent_to_tag=function(K){var B=this._get_frame(K);B&&(this._printer.indent_level=B.indent_level)};function Oe(K,B,L,Y){this._source_text=K||"",B=B||{},this._js_beautify=L,this._css_beautify=Y,this._tag_stack=null;var Q=new A(B,"html");this._options=Q,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"}Oe.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var K=this._source_text,B=this._options.eol;this._options.eol==="auto"&&(B=`
|
|
`,K&&G.test(K)&&(B=K.match(G)[0])),K=K.replace(D,`
|
|
`);var L=K.match(/^[\t ]*/)[0],Y={text:"",type:""},Q=new Fe(this._options),P=new H(this._options,L),b=new q(K,this._options).tokenize();this._tag_stack=new ce(P);for(var E=null,N=b.next();N.type!==re.EOF;)N.type===re.TAG_OPEN||N.type===re.COMMENT?(E=this._handle_tag_open(P,N,Q,Y,b),Q=E):N.type===re.ATTRIBUTE||N.type===re.EQUALS||N.type===re.VALUE||N.type===re.TEXT&&!Q.tag_complete?E=this._handle_inside_tag(P,N,Q,Y):N.type===re.TAG_CLOSE?E=this._handle_tag_close(P,N,Q):N.type===re.TEXT?E=this._handle_text(P,N,Q):N.type===re.CONTROL_FLOW_OPEN?E=this._handle_control_flow_open(P,N):N.type===re.CONTROL_FLOW_CLOSE?E=this._handle_control_flow_close(P,N):P.add_raw_token(N),Y=E,N=b.next();var ie=P._output.get_code(B);return ie},Oe.prototype._handle_control_flow_open=function(K,B){var L={text:B.text,type:B.type};return K.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),B.newlines?K.print_preserved_newlines(B):K.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),K.print_token(B),K.indent(),L},Oe.prototype._handle_control_flow_close=function(K,B){var L={text:B.text,type:B.type};return K.deindent(),B.newlines?K.print_preserved_newlines(B):K.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),K.print_token(B),L},Oe.prototype._handle_tag_close=function(K,B,L){var Y={text:B.text,type:B.type};return K.alignment_size=0,L.tag_complete=!0,K.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),L.is_unformatted?K.add_raw_token(B):(L.tag_start_char==="<"&&(K.set_space_before_token(B.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&L.has_wrapped_attrs&&K.print_newline(!1)),K.print_token(B)),L.indent_content&&!(L.is_unformatted||L.is_content_unformatted)&&(K.indent(),L.indent_content=!1),!L.is_inline_element&&!(L.is_unformatted||L.is_content_unformatted)&&K.set_wrap_point(),Y},Oe.prototype._handle_inside_tag=function(K,B,L,Y){var Q=L.has_wrapped_attrs,P={text:B.text,type:B.type};return K.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),L.is_unformatted?K.add_raw_token(B):L.tag_start_char==="{"&&B.type===re.TEXT?K.print_preserved_newlines(B)?(B.newlines=0,K.add_raw_token(B)):K.print_token(B):(B.type===re.ATTRIBUTE?K.set_space_before_token(!0):(B.type===re.EQUALS||B.type===re.VALUE&&B.previous.type===re.EQUALS)&&K.set_space_before_token(!1),B.type===re.ATTRIBUTE&&L.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(K.traverse_whitespace(B),Q=Q||B.newlines!==0),this._is_wrap_attributes_force&&L.attr_count>=this._options.wrap_attributes_min_attrs&&(Y.type!==re.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(K.print_newline(!1),Q=!0)),K.print_token(B),Q=Q||K.previous_token_wrapped(),L.has_wrapped_attrs=Q),P},Oe.prototype._handle_text=function(K,B,L){var Y={text:B.text,type:"TK_CONTENT"};return L.custom_beautifier_name?this._print_custom_beatifier_text(K,B,L):L.is_unformatted||L.is_content_unformatted?K.add_raw_token(B):(K.traverse_whitespace(B),K.print_token(B)),Y},Oe.prototype._print_custom_beatifier_text=function(K,B,L){var Y=this;if(B.text!==""){var Q=B.text,P,b=1,E="",N="";L.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?P=this._js_beautify:L.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?P=this._css_beautify:L.custom_beautifier_name==="html"&&(P=function(Ke,Qe){var Ge=new Oe(Ke,Qe,Y._js_beautify,Y._css_beautify);return Ge.beautify()}),this._options.indent_scripts==="keep"?b=0:this._options.indent_scripts==="separate"&&(b=-K.indent_level);var ie=K.get_full_indent(b);if(Q=Q.replace(/\n[ \t]*$/,""),L.custom_beautifier_name!=="html"&&Q[0]==="<"&&Q.match(/^(<!--|<!\[CDATA\[)/)){var Ie=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(Q);if(!Ie){K.add_raw_token(B);return}E=ie+Ie[1]+`
|
|
`,Q=Ie[4],Ie[5]&&(N=ie+Ie[5]),Q=Q.replace(/\n[ \t]*$/,""),(Ie[2]||Ie[3].indexOf(`
|
|
`)!==-1)&&(Ie=Ie[3].match(/[ \t]+$/),Ie&&(B.whitespace_before=Ie[0]))}if(Q)if(P){var Ze=function(){this.eol=`
|
|
`};Ze.prototype=this._options.raw_options;var me=new Ze;Q=P(ie+Q,me)}else{var Ce=B.whitespace_before;Ce&&(Q=Q.replace(new RegExp(`
|
|
(`+Ce+")?","g"),`
|
|
`)),Q=ie+Q.replace(/\n/g,`
|
|
`+ie)}E&&(Q?Q=E+Q+`
|
|
`+N:Q=E+N),K.print_newline(!1),Q&&(B.text=Q,B.whitespace_before="",B.newlines=0,K.add_raw_token(B),K.print_newline(!0))}},Oe.prototype._handle_tag_open=function(K,B,L,Y,Q){var P=this._get_tag_open_token(B);if((L.is_unformatted||L.is_content_unformatted)&&!L.is_empty_element&&B.type===re.TAG_OPEN&&!P.is_start_tag?(K.add_raw_token(B),P.start_tag_token=this._tag_stack.try_pop(P.tag_name)):(K.traverse_whitespace(B),this._set_tag_position(K,B,P,L,Y),P.is_inline_element||K.set_wrap_point(),K.print_token(B)),P.is_start_tag&&this._is_wrap_attributes_force){var b=0,E;do E=Q.peek(b),E.type===re.ATTRIBUTE&&(P.attr_count+=1),b+=1;while(E.type!==re.EOF&&E.type!==re.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(P.alignment_size=B.text.length+1),!P.tag_complete&&!P.is_unformatted&&(K.alignment_size=P.alignment_size),P};var Fe=function(K,B,L){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="",!L)this.tag_complete=!0;else{var Y;this.tag_start_char=L.text[0],this.text=L.text,this.tag_start_char==="<"?(Y=L.text.match(/^<([^\s>]*)/),this.tag_check=Y?Y[1]:""):(Y=L.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=Y?Y[1]:"",(L.text.startsWith("{{#>")||L.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&L.next!==null?this.tag_check=L.next.text.split(" ")[0]:this.tag_check=L.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),L.type===re.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||L.closed&&L.closed.text==="/>";var Q=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(Q=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!K.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(Q)))}};Oe.prototype._get_tag_open_token=function(K){var B=new Fe(this._options,this._tag_stack.get_parser_token(),K);return B.alignment_size=this._options.wrap_attributes_indent_size,B.is_end_tag=B.is_end_tag||de(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&&de(B.tag_check,this._options.unformatted),B.is_content_unformatted=!B.is_empty_element&&de(B.tag_check,this._options.content_unformatted),B.is_inline_element=de(B.tag_name,this._options.inline)||this._options.inline_custom_elements&&B.tag_name.includes("-")||B.tag_start_char==="{",B},Oe.prototype._set_tag_position=function(K,B,L,Y,Q){if(L.is_empty_element||(L.is_end_tag?L.start_tag_token=this._tag_stack.try_pop(L.tag_name):(this._do_optional_end_element(L)&&(L.is_inline_element||K.print_newline(!1)),this._tag_stack.record_tag(L),(L.tag_name==="script"||L.tag_name==="style")&&!(L.is_unformatted||L.is_content_unformatted)&&(L.custom_beautifier_name=z(L.tag_check,B)))),de(L.tag_check,this._options.extra_liners)&&(K.print_newline(!1),K._output.just_added_blankline()||K.print_newline(!0)),L.is_empty_element){if(L.tag_start_char==="{"&&L.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),L.indent_content=!0;var P=K.current_line_has_match(/{{#if/);P||K.print_newline(!1)}L.tag_name==="!--"&&Q.type===re.TAG_CLOSE&&Y.is_end_tag&&L.text.indexOf(`
|
|
`)===-1||(L.is_inline_element||L.is_unformatted||K.print_newline(!1),this._calcluate_parent_multiline(K,L))}else if(L.is_end_tag){var b=!1;b=L.start_tag_token&&L.start_tag_token.multiline_content,b=b||!L.is_inline_element&&!(Y.is_inline_element||Y.is_unformatted)&&!(Q.type===re.TAG_CLOSE&&L.start_tag_token===Y)&&Q.type!=="TK_CONTENT",(L.is_content_unformatted||L.is_unformatted)&&(b=!1),b&&K.print_newline(!1)}else L.indent_content=!L.custom_beautifier_name,L.tag_start_char==="<"&&(L.tag_name==="html"?L.indent_content=this._options.indent_inner_html:L.tag_name==="head"?L.indent_content=this._options.indent_head_inner_html:L.tag_name==="body"&&(L.indent_content=this._options.indent_body_inner_html)),!(L.is_inline_element||L.is_unformatted)&&(Q.type!=="TK_CONTENT"||L.is_content_unformatted)&&K.print_newline(!1),this._calcluate_parent_multiline(K,L)},Oe.prototype._calcluate_parent_multiline=function(K,B){B.parent&&K._output.just_added_newline()&&!((B.is_inline_element||B.is_unformatted)&&B.parent.is_inline_element)&&(B.parent.multiline_content=!0)};var Ne=["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"],Ve=["a","audio","del","ins","map","noscript","video"];Oe.prototype._do_optional_end_element=function(K){var B=null;if(!(K.is_empty_element||!K.is_start_tag||!K.parent)){if(K.tag_name==="body")B=B||this._tag_stack.try_pop("head");else if(K.tag_name==="li")B=B||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(K.tag_name==="dd"||K.tag_name==="dt")B=B||this._tag_stack.try_pop("dt",["dl"]),B=B||this._tag_stack.try_pop("dd",["dl"]);else if(K.parent.tag_name==="p"&&Ne.indexOf(K.tag_name)!==-1){var L=K.parent.parent;(!L||Ve.indexOf(L.tag_name)===-1)&&(B=B||this._tag_stack.try_pop("p"))}else K.tag_name==="rp"||K.tag_name==="rt"?(B=B||this._tag_stack.try_pop("rt",["ruby","rtc"]),B=B||this._tag_stack.try_pop("rp",["ruby","rtc"])):K.tag_name==="optgroup"?B=B||this._tag_stack.try_pop("optgroup",["select"]):K.tag_name==="option"?B=B||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):K.tag_name==="colgroup"?B=B||this._tag_stack.try_pop("caption",["table"]):K.tag_name==="thead"?(B=B||this._tag_stack.try_pop("caption",["table"]),B=B||this._tag_stack.try_pop("colgroup",["table"])):K.tag_name==="tbody"||K.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"])):K.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"])):(K.tag_name==="th"||K.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 K.parent=this._tag_stack.get_parser_token(),B}},U.exports.Beautifier=Oe},function(U,S,w){var A=w(6).Options;function I(q){A.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"])}I.prototype=new A,U.exports.Options=I},function(U,S,w){var A=w(9).Tokenizer,I=w(9).TOKEN,q=w(13).Directives,re=w(14).TemplatablePattern,G=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:I.START,RAW:I.RAW,EOF:I.EOF},H=new q(/<\!--/,/-->/),$=function(z,de){A.call(this,z,de),this._current_tag_name="";var we=new re(this._input).read_options(this._options),ce=new G(this._input);if(this.__patterns={word:we.until(/[\n\r\t <]/),word_control_flow_close_excluded:we.until(/[\n\r\t <}]/),single_quote:we.until_after(/'/),double_quote:we.until_after(/"/),attribute:we.until(/[\n\r\t =>]|\/>/),element_name:we.until(/[\n\r\t >\/]/),angular_control_flow_start:ce.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:ce.starting_with(/{{!--/).until_after(/--}}/),handlebars:ce.starting_with(/{{/).until_after(/}}/),handlebars_open:ce.until(/[\n\r\t }]/),handlebars_raw_close:ce.until(/}}/),comment:ce.starting_with(/<!--/).until_after(/-->/),cdata:ce.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:ce.starting_with(/<!\[/).until_after(/]>/),processing:ce.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 Oe=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=ce.matching(Oe).until_after(Oe)}};$.prototype=new A,$.prototype._is_comment=function(z){return!1},$.prototype._is_opening=function(z){return z.type===D.TAG_OPEN||z.type===D.CONTROL_FLOW_OPEN},$.prototype._is_closing=function(z,de){return z.type===D.TAG_CLOSE&&de&&((z.text===">"||z.text==="/>")&&de.text[0]==="<"||z.text==="}}"&&de.text[0]==="{"&&de.text[1]==="{")||z.type===D.CONTROL_FLOW_CLOSE&&z.text==="}"&&de.text.endsWith("{")},$.prototype._reset=function(){this._current_tag_name=""},$.prototype._get_next_token=function(z,de){var we=null;this._readWhitespace();var ce=this._input.peek();return ce===null?this._create_token(D.EOF,""):(we=we||this._read_open_handlebars(ce,de),we=we||this._read_attribute(ce,z,de),we=we||this._read_close(ce,de),we=we||this._read_script_and_style(ce,z),we=we||this._read_control_flows(ce,de),we=we||this._read_raw_content(ce,z,de),we=we||this._read_content_word(ce,de),we=we||this._read_comment_or_cdata(ce),we=we||this._read_processing(ce),we=we||this._read_open(ce,de),we=we||this._create_token(D.UNKNOWN,this._input.next()),we)},$.prototype._read_comment_or_cdata=function(z){var de=null,we=null,ce=null;if(z==="<"){var Oe=this._input.peek(1);Oe==="!"&&(we=this.__patterns.comment.read(),we?(ce=H.get_directives(we),ce&&ce.ignore==="start"&&(we+=H.readIgnored(this._input))):we=this.__patterns.cdata.read()),we&&(de=this._create_token(D.COMMENT,we),de.directives=ce)}return de},$.prototype._read_processing=function(z){var de=null,we=null,ce=null;if(z==="<"){var Oe=this._input.peek(1);(Oe==="!"||Oe==="?")&&(we=this.__patterns.conditional_comment.read(),we=we||this.__patterns.processing.read()),we&&(de=this._create_token(D.COMMENT,we),de.directives=ce)}return de},$.prototype._read_open=function(z,de){var we=null,ce=null;return(!de||de.type===D.CONTROL_FLOW_OPEN)&&z==="<"&&(we=this._input.next(),this._input.peek()==="/"&&(we+=this._input.next()),we+=this.__patterns.element_name.read(),ce=this._create_token(D.TAG_OPEN,we)),ce},$.prototype._read_open_handlebars=function(z,de){var we=null,ce=null;return(!de||de.type===D.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&z==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(we=this.__patterns.handlebars_comment.read(),we=we||this.__patterns.handlebars.read(),ce=this._create_token(D.COMMENT,we)):(we=this.__patterns.handlebars_open.read(),ce=this._create_token(D.TAG_OPEN,we))),ce},$.prototype._read_control_flows=function(z,de){var we="",ce=null;if(!this._options.templating.includes("angular"))return ce;if(z==="@"){if(we=this.__patterns.angular_control_flow_start.read(),we==="")return ce;for(var Oe=we.endsWith("(")?1:0,Fe=0;!(we.endsWith("{")&&Oe===Fe);){var Ne=this._input.next();if(Ne===null)break;Ne==="("?Oe++:Ne===")"&&Fe++,we+=Ne}ce=this._create_token(D.CONTROL_FLOW_OPEN,we)}else z==="}"&&de&&de.type===D.CONTROL_FLOW_OPEN&&(we=this._input.next(),ce=this._create_token(D.CONTROL_FLOW_CLOSE,we));return ce},$.prototype._read_close=function(z,de){var we=null,ce=null;return de&&de.type===D.TAG_OPEN&&(de.text[0]==="<"&&(z===">"||z==="/"&&this._input.peek(1)===">")?(we=this._input.next(),z==="/"&&(we+=this._input.next()),ce=this._create_token(D.TAG_CLOSE,we)):de.text[0]==="{"&&z==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),ce=this._create_token(D.TAG_CLOSE,"}}"))),ce},$.prototype._read_attribute=function(z,de,we){var ce=null,Oe="";if(we&&we.text[0]==="<")if(z==="=")ce=this._create_token(D.EQUALS,this._input.next());else if(z==='"'||z==="'"){var Fe=this._input.next();z==='"'?Fe+=this.__patterns.double_quote.read():Fe+=this.__patterns.single_quote.read(),ce=this._create_token(D.VALUE,Fe)}else Oe=this.__patterns.attribute.read(),Oe&&(de.type===D.EQUALS?ce=this._create_token(D.VALUE,Oe):ce=this._create_token(D.ATTRIBUTE,Oe));return ce},$.prototype._is_content_unformatted=function(z){return this._options.void_elements.indexOf(z)===-1&&(this._options.content_unformatted.indexOf(z)!==-1||this._options.unformatted.indexOf(z)!==-1)},$.prototype._read_raw_content=function(z,de,we){var ce="";if(we&&we.text[0]==="{")ce=this.__patterns.handlebars_raw_close.read();else if(de.type===D.TAG_CLOSE&&de.opened.text[0]==="<"&&de.text[0]!=="/"){var Oe=de.opened.text.substr(1).toLowerCase();this._is_content_unformatted(Oe)&&(ce=this._input.readUntil(new RegExp("</"+Oe+"[\\n\\r\\t ]*?>","ig")))}return ce?this._create_token(D.TEXT,ce):null},$.prototype._read_script_and_style=function(z,de){if(de.type===D.TAG_CLOSE&&de.opened.text[0]==="<"&&de.text[0]!=="/"){var we=de.opened.text.substr(1).toLowerCase();if(we==="script"||we==="style"){var ce=this._read_comment_or_cdata(z);if(ce)return ce.type=D.TEXT,ce;var Oe=this._input.readUntil(new RegExp("</"+we+"[\\n\\r\\t ]*?>","ig"));if(Oe)return this._create_token(D.TEXT,Oe)}}return null},$.prototype._read_content_word=function(z,de){var we="";return this._options.unformatted_content_delimiter&&z===this._options.unformatted_content_delimiter[0]&&(we=this.__patterns.unformatted_content_delimiter.read()),we||(we=de&&de.type===D.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),we?this._create_token(D.TEXT,we):null},U.exports.Tokenizer=$,U.exports.TOKEN=D}],J={};function o(U){var S=J[U];if(S!==void 0)return S.exports;var w=J[U]={exports:{}};return ne[U](w,w.exports,o),w.exports}var X=o(18);Ee=X})();var ye=Ee;if(1)d=[_,_(58553),_(87804)],ge=function(ne){var J=_(58553),o=_(87804);return{html_beautify:function(X,U){return ye(X,U,J.js_beautify,o.css_beautify)}}}.apply(ot,d),ge!==void 0&&(Jt.exports=ge);else var W,g})()},58553:function(Jt,ot){var _,d;(function(){var ge;(function(){"use strict";var ye=[function(J,o,X){var U=X(1).Beautifier,S=X(5).Options;function w(A,I){var q=new U(A,I);return q.beautify()}J.exports=w,J.exports.defaultOptions=function(){return new S}},function(J,o,X){var U=X(2).Output,S=X(3).Token,w=X(4),A=X(5).Options,I=X(7).Tokenizer,q=X(7).line_starters,re=X(7).positionable_operators,G=X(7).TOKEN;function D(E,N){return N.indexOf(E)!==-1}function H(E){return E.replace(/^\s+/g,"")}function $(E){for(var N={},ie=0;ie<E.length;ie++)N[E[ie].replace(/-/g,"_")]=E[ie];return N}function z(E,N){return E&&E.type===G.RESERVED&&E.text===N}function de(E,N){return E&&E.type===G.RESERVED&&D(E.text,N)}var we=["case","return","do","if","throw","else","await","break","continue","async"],ce=["before-newline","after-newline","preserve-newline"],Oe=$(ce),Fe=[Oe.before_newline,Oe.preserve_newline],Ne={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Ve(E,N){N.multiline_frame||N.mode===Ne.ForInitializer||N.mode===Ne.Conditional||E.remove_indent(N.start_line_index)}function K(E){E=E.replace(w.allLineBreaks,`
|
|
`);for(var N=[],ie=E.indexOf(`
|
|
`);ie!==-1;)N.push(E.substring(0,ie)),E=E.substring(ie+1),ie=E.indexOf(`
|
|
`);return E.length&&N.push(E),N}function B(E){return E===Ne.ArrayLiteral}function L(E){return D(E,[Ne.Expression,Ne.ForInitializer,Ne.Conditional])}function Y(E,N){for(var ie=0;ie<E.length;ie++){var Ie=E[ie].trim();if(Ie.charAt(0)!==N)return!1}return!0}function Q(E,N){for(var ie=0,Ie=E.length,Ze;ie<Ie;ie++)if(Ze=E[ie],Ze&&Ze.indexOf(N)!==0)return!1;return!0}function P(E,N){N=N||{},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 A(N)}P.prototype.create_flags=function(E,N){var ie=0;E&&(ie=E.indentation_level,!this._output.just_added_newline()&&E.line_indent_level>ie&&(ie=E.line_indent_level));var Ie={mode:N,parent:E,last_token:E?E.last_token:new S(G.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:ie,alignment:0,line_indent_level:E?E.line_indent_level:ie,start_line_index:this._output.get_line_number(),ternary_depth:0};return Ie},P.prototype._reset=function(E){var N=E.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new U(this._options,N),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(Ne.BlockStatement);var ie=new I(E,this._options);return this._tokens=ie.tokenize(),E},P.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var E,N=this._reset(this._source_text),ie=this._options.eol;this._options.eol==="auto"&&(ie=`
|
|
`,N&&w.lineBreak.test(N||"")&&(ie=N.match(w.lineBreak)[0]));for(var Ie=this._tokens.next();Ie;)this.handle_token(Ie),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Ie,Ie=this._tokens.next();return E=this._output.get_code(ie),E},P.prototype.handle_token=function(E,N){E.type===G.START_EXPR?this.handle_start_expr(E):E.type===G.END_EXPR?this.handle_end_expr(E):E.type===G.START_BLOCK?this.handle_start_block(E):E.type===G.END_BLOCK?this.handle_end_block(E):E.type===G.WORD?this.handle_word(E):E.type===G.RESERVED?this.handle_word(E):E.type===G.SEMICOLON?this.handle_semicolon(E):E.type===G.STRING?this.handle_string(E):E.type===G.EQUALS?this.handle_equals(E):E.type===G.OPERATOR?this.handle_operator(E):E.type===G.COMMA?this.handle_comma(E):E.type===G.BLOCK_COMMENT?this.handle_block_comment(E,N):E.type===G.COMMENT?this.handle_comment(E,N):E.type===G.DOT?this.handle_dot(E):E.type===G.EOF?this.handle_eof(E):E.type===G.UNKNOWN?this.handle_unknown(E,N):this.handle_unknown(E,N)},P.prototype.handle_whitespace_and_comments=function(E,N){var ie=E.newlines,Ie=this._options.keep_array_indentation&&B(this._flags.mode);if(E.comments_before)for(var Ze=E.comments_before.next();Ze;)this.handle_whitespace_and_comments(Ze,N),this.handle_token(Ze,N),Ze=E.comments_before.next();if(Ie)for(var me=0;me<ie;me+=1)this.print_newline(me>0,N);else if(this._options.max_preserve_newlines&&ie>this._options.max_preserve_newlines&&(ie=this._options.max_preserve_newlines),this._options.preserve_newlines&&ie>1){this.print_newline(!1,N);for(var Ce=1;Ce<ie;Ce+=1)this.print_newline(!0,N)}};var b=["async","break","continue","return","throw","yield"];P.prototype.allow_wrap_or_preserved_newline=function(E,N){if(N=N===void 0?!1:N,!this._output.just_added_newline()){var ie=this._options.preserve_newlines&&E.newlines||N,Ie=D(this._flags.last_token.text,re)||D(E.text,re);if(Ie){var Ze=D(this._flags.last_token.text,re)&&D(this._options.operator_position,Fe)||D(E.text,re);ie=ie&&Ze}if(ie)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(de(this._flags.last_token,b))return;this._output.set_wrap_point()}}},P.prototype.print_newline=function(E,N){if(!N&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==G.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var ie=this._tokens.peek();this._flags.mode===Ne.Statement&&!(this._flags.if_block&&z(ie,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(E)&&(this._flags.multiline_frame=!0)},P.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))},P.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===G.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var N=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(N),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)},P.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},P.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))},P.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)},P.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===Ne.Statement&&Ve(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},P.prototype.start_of_object_property=function(){return this._flags.parent.mode===Ne.ObjectLiteral&&this._flags.mode===Ne.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||de(this._flags.last_token,["get","set"]))},P.prototype.start_of_statement=function(E){var N=!1;return N=N||de(this._flags.last_token,["var","let","const"])&&E.type===G.WORD,N=N||z(this._flags.last_token,"do"),N=N||!(this._flags.parent.mode===Ne.ObjectLiteral&&this._flags.mode===Ne.Statement)&&de(this._flags.last_token,b)&&!E.newlines,N=N||z(this._flags.last_token,"else")&&!(z(E,"if")&&!E.comments_before),N=N||this._flags.last_token.type===G.END_EXPR&&(this._previous_flags.mode===Ne.ForInitializer||this._previous_flags.mode===Ne.Conditional),N=N||this._flags.last_token.type===G.WORD&&this._flags.mode===Ne.BlockStatement&&!this._flags.in_case&&!(E.text==="--"||E.text==="++")&&this._last_last_text!=="function"&&E.type!==G.WORD&&E.type!==G.RESERVED,N=N||this._flags.mode===Ne.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||de(this._flags.last_token,["get","set"])),N?(this.set_mode(Ne.Statement),this.indent(),this.handle_whitespace_and_comments(E,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E,de(E,["do","for","if","while"])),!0):!1},P.prototype.handle_start_expr=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E);var N=Ne.Expression;if(E.text==="["){if(this._flags.last_token.type===G.WORD||this._flags.last_token.text===")"){de(this._flags.last_token,q)&&(this._output.space_before_token=!0),this.print_token(E),this.set_mode(N),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}N=Ne.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,[G.START_EXPR,G.END_EXPR,G.WORD,G.OPERATOR,G.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===G.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,N=Ne.ForInitializer):D(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,N=Ne.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===G.EQUALS||this._flags.last_token.type===G.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E);else if(this._flags.last_token.type===G.WORD){this._output.space_before_token=!1;var ie=this._tokens.peek(-3);if(this._options.space_after_named_function&&ie){var Ie=this._tokens.peek(-4);de(ie,["async","function"])||ie.text==="*"&&de(Ie,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Ne.ObjectLiteral?(ie.text==="{"||ie.text===","||ie.text==="*"&&(Ie.text==="{"||Ie.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===G.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===Ne.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===G.START_BLOCK?this.print_newline():(this._flags.last_token.type===G.END_EXPR||this._flags.last_token.type===G.START_EXPR||this._flags.last_token.type===G.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===G.COMMA)&&this.allow_wrap_or_preserved_newline(E,E.newlines),this.print_token(E),this.set_mode(N),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},P.prototype.handle_end_expr=function(E){for(;this._flags.mode===Ne.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===G.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(),Ve(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Ne.Conditional&&(this._previous_flags.mode=Ne.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},P.prototype.handle_start_block=function(E){this.handle_whitespace_and_comments(E);var N=this._tokens.peek(),ie=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===G.END_EXPR?(this.set_mode(Ne.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Ne.BlockStatement):ie&&(D(ie.text,[":",","])&&D(N.type,[G.STRING,G.WORD,G.RESERVED])||D(N.text,["get","set","..."])&&D(ie.type,[G.WORD,G.RESERVED]))?D(this._last_last_text,["class","interface"])&&!D(ie.text,[":",","])?this.set_mode(Ne.BlockStatement):this.set_mode(Ne.ObjectLiteral):this._flags.last_token.type===G.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Ne.BlockStatement):D(this._flags.last_token.type,[G.EQUALS,G.START_EXPR,G.COMMA,G.OPERATOR])||de(this._flags.last_token,["return","throw","import","default"])?this.set_mode(Ne.ObjectLiteral):this.set_mode(Ne.BlockStatement),this._flags.last_token&&de(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Ie=!N.comments_before&&N.text==="}",Ze=Ie&&this._flags.last_word==="function"&&this._flags.last_token.type===G.END_EXPR;if(this._options.brace_preserve_inline){var me=0,Ce=null;this._flags.inline_frame=!0;do if(me+=1,Ce=this._tokens.peek(me-1),Ce.newlines){this._flags.inline_frame=!1;break}while(Ce.type!==G.EOF&&!(Ce.type===G.END_BLOCK&&Ce.opened===E))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&E.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==G.OPERATOR&&(Ze||this._flags.last_token.type===G.EQUALS||de(this._flags.last_token,we)&&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===G.START_EXPR||this._flags.last_token.type===G.COMMA)&&((this._flags.last_token.type===G.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===G.COMMA||this._flags.last_token.type===G.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!==G.OPERATOR&&this._flags.last_token.type!==G.START_EXPR&&(D(this._flags.last_token.type,[G.START_BLOCK,G.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(E),this.indent(),!Ie&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},P.prototype.handle_end_block=function(E){for(this.handle_whitespace_and_comments(E);this._flags.mode===Ne.Statement;)this.restore_mode();var N=this._flags.last_token.type===G.START_BLOCK;this._flags.inline_frame&&!N?this._output.space_before_token=!0:this._options.brace_style==="expand"?N||this.print_newline():N||(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)},P.prototype.handle_word=function(E){if(E.type===G.RESERVED){if(D(E.text,["set","get"])&&this._flags.mode!==Ne.ObjectLiteral)E.type=G.WORD;else if(E.text==="import"&&D(this._tokens.peek().text,["(","."]))E.type=G.WORD;else if(D(E.text,["as","from"])&&!this._flags.import_block)E.type=G.WORD;else if(this._flags.mode===Ne.ObjectLiteral){var N=this._tokens.peek();N.text===":"&&(E.type=G.WORD)}}if(this.start_of_statement(E)?de(this._flags.last_token,["var","let","const"])&&E.type===G.WORD&&(this._flags.declaration_statement=!0):E.newlines&&!L(this._flags.mode)&&(this._flags.last_token.type!==G.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==G.EQUALS&&(this._options.preserve_newlines||!de(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(z(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&&z(E,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===Ne.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&de(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===G.COMMA||this._flags.last_token.type===G.START_EXPR||this._flags.last_token.type===G.EQUALS||this._flags.last_token.type===G.OPERATOR)&&!this.start_of_object_property()&&!(D(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===Ne.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(E),z(E,"function")){(D(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(D(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===G.OPERATOR))&&!this._output.just_added_blankline()&&!E.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===G.RESERVED||this._flags.last_token.type===G.WORD?de(this._flags.last_token,["get","set","new","export"])||de(this._flags.last_token,b)?this._output.space_before_token=!0:z(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===G.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(L(this._flags.mode)||B(this._flags.mode))||this.print_newline(),this.print_token(E),this._flags.last_word=E.text;return}var ie="NONE";if(this._flags.last_token.type===G.END_BLOCK?this._previous_flags.inline_frame?ie="SPACE":de(E,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&E.newlines?ie="NEWLINE":(ie="SPACE",this._output.space_before_token=!0):ie="NEWLINE":this._flags.last_token.type===G.SEMICOLON&&this._flags.mode===Ne.BlockStatement?ie="NEWLINE":this._flags.last_token.type===G.SEMICOLON&&L(this._flags.mode)?ie="SPACE":this._flags.last_token.type===G.STRING?ie="NEWLINE":this._flags.last_token.type===G.RESERVED||this._flags.last_token.type===G.WORD||this._flags.last_token.text==="*"&&(D(this._last_last_text,["function","yield"])||this._flags.mode===Ne.ObjectLiteral&&D(this._last_last_text,["{",","]))?ie="SPACE":this._flags.last_token.type===G.START_BLOCK?this._flags.inline_frame?ie="SPACE":ie="NEWLINE":this._flags.last_token.type===G.END_EXPR&&(this._output.space_before_token=!0,ie="NEWLINE"),de(E,q)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ie="SPACE":ie="NEWLINE"),de(E,["else","catch","finally"]))if((!(this._flags.last_token.type===G.END_BLOCK&&this._previous_flags.mode===Ne.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 Ie=this._output.current_line;Ie.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ie==="NEWLINE"?de(this._flags.last_token,we)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&de(E,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==G.END_EXPR?(this._flags.last_token.type!==G.START_EXPR||!de(E,["var","let","const"]))&&this._flags.last_token.text!==":"&&(z(E,"if")&&z(E.previous,"else")?this._output.space_before_token=!0:this.print_newline()):de(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():ie==="SPACE"&&(this._output.space_before_token=!0);E.previous&&(E.previous.type===G.WORD||E.previous.type===G.RESERVED)&&(this._output.space_before_token=!0),this.print_token(E),this._flags.last_word=E.text,E.type===G.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&&z(E,"from")&&(this._flags.import_block=!1))},P.prototype.handle_semicolon=function(E){this.start_of_statement(E)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(E);for(var N=this._tokens.peek();this._flags.mode===Ne.Statement&&!(this._flags.if_block&&z(N,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(E)},P.prototype.handle_string=function(E){E.text.startsWith("`")&&E.newlines===0&&E.whitespace_before===""&&(E.previous.text===")"||this._flags.last_token.type===G.WORD)||(this.start_of_statement(E)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(E),this._flags.last_token.type===G.RESERVED||this._flags.last_token.type===G.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===G.COMMA||this._flags.last_token.type===G.START_EXPR||this._flags.last_token.type===G.EQUALS||this._flags.last_token.type===G.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E):E.text.startsWith("`")&&this._flags.last_token.type===G.END_EXPR&&(E.previous.text==="]"||E.previous.text===")")&&E.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(E)},P.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},P.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?(L(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===Ne.ObjectLiteral||this._flags.mode===Ne.Statement&&this._flags.parent.mode===Ne.ObjectLiteral?(this._flags.mode===Ne.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(E)},P.prototype.handle_operator=function(E){var N=E.text==="*"&&(de(this._flags.last_token,["function","yield"])||D(this._flags.last_token.type,[G.START_BLOCK,G.COMMA,G.END_BLOCK,G.SEMICOLON])),ie=D(E.text,["-","+"])&&(D(this._flags.last_token.type,[G.START_BLOCK,G.START_EXPR,G.EQUALS,G.OPERATOR])||D(this._flags.last_token.text,q)||this._flags.last_token.text===",");if(!this.start_of_statement(E)){var Ie=!N;this.handle_whitespace_and_comments(E,Ie)}if(E.text==="*"&&this._flags.last_token.type===G.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===G.OPERATOR&&D(this._options.operator_position,Fe)&&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!==G.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 Ze=!0,me=!0,Ce=!1;if(E.text===":"?this._flags.ternary_depth===0?Ze=!1:(this._flags.ternary_depth-=1,Ce=!0):E.text==="?"&&(this._flags.ternary_depth+=1),!ie&&!N&&this._options.preserve_newlines&&D(E.text,re)){var Ke=E.text===":",Qe=Ke&&Ce,Ge=Ke&&!Ce;switch(this._options.operator_position){case Oe.before_newline:this._output.space_before_token=!Ge,this.print_token(E),(!Ke||Qe)&&this.allow_wrap_or_preserved_newline(E),this._output.space_before_token=!0;return;case Oe.after_newline:this._output.space_before_token=!0,!Ke||Qe?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 Oe.preserve_newline:Ge||this.allow_wrap_or_preserved_newline(E),Ze=!(this._output.just_added_newline()||Ge),this._output.space_before_token=Ze,this.print_token(E),this._output.space_before_token=!0;return}}if(N){this.allow_wrap_or_preserved_newline(E),Ze=!1;var wt=this._tokens.peek();me=wt&&D(wt.type,[G.WORD,G.RESERVED])}else if(E.text==="...")this.allow_wrap_or_preserved_newline(E),Ze=this._flags.last_token.type===G.START_BLOCK,me=!1;else if(D(E.text,["--","++","!","~"])||ie){if((this._flags.last_token.type===G.COMMA||this._flags.last_token.type===G.START_EXPR)&&this.allow_wrap_or_preserved_newline(E),Ze=!1,me=!1,E.newlines&&(E.text==="--"||E.text==="++"||E.text==="~")){var Ue=de(this._flags.last_token,we)&&E.newlines;Ue&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Ue,!0)}this._flags.last_token.text===";"&&L(this._flags.mode)&&(Ze=!0),this._flags.last_token.type===G.RESERVED?Ze=!0:this._flags.last_token.type===G.END_EXPR?Ze=!(this._flags.last_token.text==="]"&&(E.text==="--"||E.text==="++")):this._flags.last_token.type===G.OPERATOR&&(Ze=D(E.text,["--","-","++","+"])&&D(this._flags.last_token.text,["--","-","++","+"]),D(E.text,["+","-"])&&D(this._flags.last_token.text,["--","++"])&&(me=!0)),(this._flags.mode===Ne.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Ne.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Ze,this.print_token(E),this._output.space_before_token=me},P.prototype.handle_block_comment=function(E,N){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,N),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,N)},P.prototype.print_block_commment=function(E,N){var ie=K(E.text),Ie,Ze=!1,me=!1,Ce=E.whitespace_before,Ke=Ce.length;if(this.print_newline(!1,N),this.print_token_line_indentation(E),this._output.add_token(ie[0]),this.print_newline(!1,N),ie.length>1){for(ie=ie.slice(1),Ze=Y(ie,"*"),me=Q(ie,Ce),Ze&&(this._flags.alignment=1),Ie=0;Ie<ie.length;Ie++)Ze?(this.print_token_line_indentation(E),this._output.add_token(H(ie[Ie]))):me&&ie[Ie]?(this.print_token_line_indentation(E),this._output.add_token(ie[Ie].substring(Ke))):(this._output.current_line.set_indent(-1),this._output.add_token(ie[Ie])),this.print_newline(!1,N);this._flags.alignment=0}},P.prototype.handle_comment=function(E,N){E.newlines?this.print_newline(!1,N):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(E),this.print_newline(!1,N)},P.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),de(this._flags.last_token,we)?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)},P.prototype.handle_unknown=function(E,N){this.print_token(E),E.text[E.text.length-1]===`
|
|
`&&this.print_newline(!1,N)},P.prototype.handle_eof=function(E){for(;this._flags.mode===Ne.Statement;)this.restore_mode();this.handle_whitespace_and_comments(E)},J.exports.Beautifier=P},function(J){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 X(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}X.prototype.get_indent_size=function(S,w){var A=this.__base_string_length;return w=w||0,S<0&&(A=0),A+=S*this.__indent_size,A+=w,A},X.prototype.get_indent_string=function(S,w){var A=this.__base_string;return w=w||0,S<0&&(S=0,A=""),w+=S*this.__indent_size,this.__ensure_cache(w),A+=this.__cache[w],A},X.prototype.__ensure_cache=function(S){for(;S>=this.__cache.length;)this.__add_column()},X.prototype.__add_column=function(){var S=this.__cache.length,w=0,A="";this.__indent_size&&S>=this.__indent_size&&(w=Math.floor(S/this.__indent_size),S-=w*this.__indent_size,A=new Array(w+1).join(this.__indent_string)),S&&(A+=new Array(S+1).join(" ")),this.__cache.push(A)};function U(S,w){this.__indent_cache=new X(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()}U.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},U.prototype.get_line_number=function(){return this.__lines.length},U.prototype.get_indent_string=function(S,w){return this.__indent_cache.get_indent_string(S,w)},U.prototype.get_indent_size=function(S,w){return this.__indent_cache.get_indent_size(S,w)},U.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},U.prototype.add_new_line=function(S){return this.is_empty()||!S&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},U.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 A=this.__lines.join(`
|
|
`);return S!==`
|
|
`&&(A=A.replace(/[\n]/g,S)),A},U.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},U.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)},U.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},U.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()},U.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(" "))},U.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()},U.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},U.prototype.just_added_newline=function(){return this.current_line.is_empty()},U.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},U.prototype.ensure_empty_line_above=function(S,w){for(var A=this.__lines.length-2;A>=0;){var I=this.__lines[A];if(I.is_empty())break;if(I.item(0).indexOf(S)!==0&&I.item(-1)!==w){this.__lines.splice(A+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}A--}},J.exports.Output=U},function(J){function o(X,U,S,w){this.type=X,this.text=U,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}J.exports.Token=o},function(J,o){var X="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",U="\\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",A="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",I="(?:"+A+"|["+X+S+"])",q="(?:"+A+"|["+U+S+w+"])*";o.identifier=new RegExp(I+q,"g"),o.identifierStart=new RegExp(I),o.identifierMatch=new RegExp("(?:"+A+"|["+U+S+w+"])+");var re=/[\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(J,o,X){var U=X(6).Options,S=["before-newline","after-newline","preserve-newline"];function w(A){U.call(this,A,"js");var I=this.raw_options.brace_style||null;I==="expand-strict"?this.raw_options.brace_style="expand":I==="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 re=0;re<q.length;re++)q[re]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=q[re];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 U,J.exports.Options=w},function(J){function o(S,w){this.raw_options=X(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 A=this.raw_options[S],I=w||[];return typeof A=="object"?A!==null&&typeof A.concat=="function"&&(I=A.concat()):typeof A=="string"&&(I=A.split(/[^a-zA-Z0-9_\/\-]+/)),I},o.prototype._get_boolean=function(S,w){var A=this.raw_options[S],I=A===void 0?!!w:!!A;return I},o.prototype._get_characters=function(S,w){var A=this.raw_options[S],I=w||"";return typeof A=="string"&&(I=A.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),I},o.prototype._get_number=function(S,w){var A=this.raw_options[S];w=parseInt(w,10),isNaN(w)&&(w=0);var I=parseInt(A,10);return isNaN(I)&&(I=w),I},o.prototype._get_selection=function(S,w,A){var I=this._get_selection_list(S,w,A);if(I.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 I[0]},o.prototype._get_selection_list=function(S,w,A){if(!w||w.length===0)throw new Error("Selection list cannot be empty.");if(A=A||[w[0]],!this._is_valid_selection(A,w))throw new Error("Invalid Default Value!");var I=this._get_array(S,A);if(!this._is_valid_selection(I,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 I},o.prototype._is_valid_selection=function(S,w){return S.length&&w.length&&!S.some(function(A){return w.indexOf(A)===-1})};function X(S,w){var A={};S=U(S);var I;for(I in S)I!==w&&(A[I]=S[I]);if(w&&S[w])for(I in S[w])A[I]=S[w][I];return A}function U(S){var w={},A;for(A in S){var I=A.replace(/-/g,"_");w[I]=S[A]}return w}J.exports.Options=o,J.exports.normalizeOpts=U,J.exports.mergeOpts=X},function(J,o,X){var U=X(8).InputScanner,S=X(9).Tokenizer,w=X(9).TOKEN,A=X(13).Directives,I=X(4),q=X(12).Pattern,re=X(14).TemplatablePattern;function G(Y,Q){return Q.indexOf(Y)!==-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},H=new A(/\/\*/,/\*\//),$=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,z=/[0-9]/,de=/[^\d\.]/,we=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),ce=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";ce=ce.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),ce="\\?\\.(?!\\d) "+ce,ce=ce.replace(/ /g,"|");var Oe=new RegExp(ce),Fe="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Ne=Fe.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Ve=new RegExp("^(?:"+Ne.join("|")+")$"),K,B=function(Y,Q){S.call(this,Y,Q),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var P=new q(this._input),b=new re(this._input).read_options(this._options);this.__patterns={template:b,identifier:b.starting_with(I.identifier).matching(I.identifierMatch),number:P.matching($),punct:P.matching(Oe),comment:P.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:P.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:P.matching(/<!--/),html_comment_end:P.matching(/-->/),include:P.starting_with(/#include/).until_after(I.lineBreak),shebang:P.starting_with(/#!/).until_after(I.lineBreak),xml:P.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:b.until(/['\\\n\r\u2028\u2029]/),double_quote:b.until(/["\\\n\r\u2028\u2029]/),template_text:b.until(/[`\\$]/),template_expression:b.until(/[`}\\]/)}};B.prototype=new S,B.prototype._is_comment=function(Y){return Y.type===D.COMMENT||Y.type===D.BLOCK_COMMENT||Y.type===D.UNKNOWN},B.prototype._is_opening=function(Y){return Y.type===D.START_BLOCK||Y.type===D.START_EXPR},B.prototype._is_closing=function(Y,Q){return(Y.type===D.END_BLOCK||Y.type===D.END_EXPR)&&Q&&(Y.text==="]"&&Q.text==="["||Y.text===")"&&Q.text==="("||Y.text==="}"&&Q.text==="{")},B.prototype._reset=function(){K=!1},B.prototype._get_next_token=function(Y,Q){var P=null;this._readWhitespace();var b=this._input.peek();return b===null?this._create_token(D.EOF,""):(P=P||this._read_non_javascript(b),P=P||this._read_string(b),P=P||this._read_pair(b,this._input.peek(1)),P=P||this._read_word(Y),P=P||this._read_singles(b),P=P||this._read_comment(b),P=P||this._read_regexp(b,Y),P=P||this._read_xml(b,Y),P=P||this._read_punctuation(),P=P||this._create_token(D.UNKNOWN,this._input.next()),P)},B.prototype._read_word=function(Y){var Q;if(Q=this.__patterns.identifier.read(),Q!=="")return Q=Q.replace(I.allLineBreaks,`
|
|
`),!(Y.type===D.DOT||Y.type===D.RESERVED&&(Y.text==="set"||Y.text==="get"))&&Ve.test(Q)?(Q==="in"||Q==="of")&&(Y.type===D.WORD||Y.type===D.STRING)?this._create_token(D.OPERATOR,Q):this._create_token(D.RESERVED,Q):this._create_token(D.WORD,Q);if(Q=this.__patterns.number.read(),Q!=="")return this._create_token(D.WORD,Q)},B.prototype._read_singles=function(Y){var Q=null;return Y==="("||Y==="["?Q=this._create_token(D.START_EXPR,Y):Y===")"||Y==="]"?Q=this._create_token(D.END_EXPR,Y):Y==="{"?Q=this._create_token(D.START_BLOCK,Y):Y==="}"?Q=this._create_token(D.END_BLOCK,Y):Y===";"?Q=this._create_token(D.SEMICOLON,Y):Y==="."&&de.test(this._input.peek(1))?Q=this._create_token(D.DOT,Y):Y===","&&(Q=this._create_token(D.COMMA,Y)),Q&&this._input.next(),Q},B.prototype._read_pair=function(Y,Q){var P=null;return Y==="#"&&Q==="{"&&(P=this._create_token(D.START_BLOCK,Y+Q)),P&&(this._input.next(),this._input.next()),P},B.prototype._read_punctuation=function(){var Y=this.__patterns.punct.read();if(Y!=="")return Y==="="?this._create_token(D.EQUALS,Y):Y==="?."?this._create_token(D.DOT,Y):this._create_token(D.OPERATOR,Y)},B.prototype._read_non_javascript=function(Y){var Q="";if(Y==="#"){if(this._is_first_token()&&(Q=this.__patterns.shebang.read(),Q))return this._create_token(D.UNKNOWN,Q.trim()+`
|
|
`);if(Q=this.__patterns.include.read(),Q)return this._create_token(D.UNKNOWN,Q.trim()+`
|
|
`);Y=this._input.next();var P="#";if(this._input.hasNext()&&this._input.testChar(z)){do Y=this._input.next(),P+=Y;while(this._input.hasNext()&&Y!=="#"&&Y!=="=");return Y==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(P+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(P+="{}",this._input.next(),this._input.next())),this._create_token(D.WORD,P)}this._input.back()}else if(Y==="<"&&this._is_first_token()){if(Q=this.__patterns.html_comment_start.read(),Q){for(;this._input.hasNext()&&!this._input.testChar(I.newline);)Q+=this._input.next();return K=!0,this._create_token(D.COMMENT,Q)}}else if(K&&Y==="-"&&(Q=this.__patterns.html_comment_end.read(),Q))return K=!1,this._create_token(D.COMMENT,Q);return null},B.prototype._read_comment=function(Y){var Q=null;if(Y==="/"){var P="";if(this._input.peek(1)==="*"){P=this.__patterns.block_comment.read();var b=H.get_directives(P);b&&b.ignore==="start"&&(P+=H.readIgnored(this._input)),P=P.replace(I.allLineBreaks,`
|
|
`),Q=this._create_token(D.BLOCK_COMMENT,P),Q.directives=b}else this._input.peek(1)==="/"&&(P=this.__patterns.comment.read(),Q=this._create_token(D.COMMENT,P))}return Q},B.prototype._read_string=function(Y){if(Y==="`"||Y==="'"||Y==='"'){var Q=this._input.next();return this.has_char_escapes=!1,Y==="`"?Q+=this._read_string_recursive("`",!0,"${"):Q+=this._read_string_recursive(Y),this.has_char_escapes&&this._options.unescape_strings&&(Q=L(Q)),this._input.peek()===Y&&(Q+=this._input.next()),Q=Q.replace(I.allLineBreaks,`
|
|
`),this._create_token(D.STRING,Q)}return null},B.prototype._allow_regexp_or_xml=function(Y){return Y.type===D.RESERVED&&G(Y.text,["return","case","throw","else","do","typeof","yield"])||Y.type===D.END_EXPR&&Y.text===")"&&Y.opened.previous.type===D.RESERVED&&G(Y.opened.previous.text,["if","while","for"])||G(Y.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(Y,Q){if(Y==="/"&&this._allow_regexp_or_xml(Q)){for(var P=this._input.next(),b=!1,E=!1;this._input.hasNext()&&(b||E||this._input.peek()!==Y)&&!this._input.testChar(I.newline);)P+=this._input.peek(),b?b=!1:(b=this._input.peek()==="\\",this._input.peek()==="["?E=!0:this._input.peek()==="]"&&(E=!1)),this._input.next();return this._input.peek()===Y&&(P+=this._input.next(),P+=this._input.read(I.identifier)),this._create_token(D.STRING,P)}return null},B.prototype._read_xml=function(Y,Q){if(this._options.e4x&&Y==="<"&&this._allow_regexp_or_xml(Q)){var P="",b=this.__patterns.xml.read_match();if(b){for(var E=b[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),N=E.indexOf("{")===0,ie=0;b;){var Ie=!!b[1],Ze=b[2],me=!!b[b.length-1]||Ze.slice(0,8)==="![CDATA[";if(!me&&(Ze===E||N&&Ze.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Ie?--ie:++ie),P+=b[0],ie<=0)break;b=this.__patterns.xml.read_match()}return b||(P+=this._input.match(/[\s\S]*/g)[0]),P=P.replace(I.allLineBreaks,`
|
|
`),this._create_token(D.STRING,P)}}return null};function L(Y){for(var Q="",P=0,b=new U(Y),E=null;b.hasNext();)if(E=b.match(/([\s]|[^\\]|\\\\)+/g),E&&(Q+=E[0]),b.peek()==="\\"){if(b.next(),b.peek()==="x")E=b.match(/x([0-9A-Fa-f]{2})/g);else if(b.peek()==="u")E=b.match(/u([0-9A-Fa-f]{4})/g),E||(E=b.match(/u\{([0-9A-Fa-f]+)\}/g));else{Q+="\\",b.hasNext()&&(Q+=b.next());continue}if(!E||(P=parseInt(E[1],16),P>126&&P<=255&&E[0].indexOf("x")===0))return Y;P>=0&&P<32||P>1114111?Q+="\\"+E[0]:P===34||P===39||P===92?Q+="\\"+String.fromCharCode(P):Q+=String.fromCharCode(P)}return Q}B.prototype._read_string_recursive=function(Y,Q,P){var b,E;Y==="'"?E=this.__patterns.single_quote:Y==='"'?E=this.__patterns.double_quote:Y==="`"?E=this.__patterns.template_text:Y==="}"&&(E=this.__patterns.template_expression);for(var N=E.read(),ie="";this._input.hasNext();){if(ie=this._input.next(),ie===Y||!Q&&I.newline.test(ie)){this._input.back();break}else ie==="\\"&&this._input.hasNext()?(b=this._input.peek(),b==="x"||b==="u"?this.has_char_escapes=!0:b==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),ie+=this._input.next()):P&&(P==="${"&&ie==="$"&&this._input.peek()==="{"&&(ie+=this._input.next()),P===ie&&(Y==="`"?ie+=this._read_string_recursive("}",Q,"`"):ie+=this._read_string_recursive("`",Q,"${"),this._input.hasNext()&&(ie+=this._input.next())));ie+=E.read(),N+=ie}return N},J.exports.Tokenizer=B,J.exports.TOKEN=D,J.exports.positionable_operators=we.slice(),J.exports.line_starters=Fe.slice()},function(J){var o=RegExp.prototype.hasOwnProperty("sticky");function X(U){this.__input=U||"",this.__input_length=this.__input.length,this.__position=0}X.prototype.restart=function(){this.__position=0},X.prototype.back=function(){this.__position>0&&(this.__position-=1)},X.prototype.hasNext=function(){return this.__position<this.__input_length},X.prototype.next=function(){var U=null;return this.hasNext()&&(U=this.__input.charAt(this.__position),this.__position+=1),U},X.prototype.peek=function(U){var S=null;return U=U||0,U+=this.__position,U>=0&&U<this.__input_length&&(S=this.__input.charAt(U)),S},X.prototype.__match=function(U,S){U.lastIndex=S;var w=U.exec(this.__input);return w&&!(o&&U.sticky)&&w.index!==S&&(w=null),w},X.prototype.test=function(U,S){return S=S||0,S+=this.__position,S>=0&&S<this.__input_length?!!this.__match(U,S):!1},X.prototype.testChar=function(U,S){var w=this.peek(S);return U.lastIndex=0,w!==null&&U.test(w)},X.prototype.match=function(U){var S=this.__match(U,this.__position);return S?this.__position+=S[0].length:S=null,S},X.prototype.read=function(U,S,w){var A="",I;return U&&(I=this.match(U),I&&(A+=I[0])),S&&(I||!U)&&(A+=this.readUntil(S,w)),A},X.prototype.readUntil=function(U,S){var w="",A=this.__position;U.lastIndex=this.__position;var I=U.exec(this.__input);return I?(A=I.index,S&&(A+=I[0].length)):A=this.__input_length,w=this.__input.substring(this.__position,A),this.__position=A,w},X.prototype.readUntilAfter=function(U){return this.readUntil(U,!0)},X.prototype.get_regexp=function(U,S){var w=null,A="g";return S&&o&&(A="y"),typeof U=="string"&&U!==""?w=new RegExp(U,A):U&&(w=new RegExp(U.source,A)),w},X.prototype.get_literal_regexp=function(U){return RegExp(U.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},X.prototype.peekUntilAfter=function(U){var S=this.__position,w=this.readUntilAfter(U);return this.__position=S,w},X.prototype.lookBack=function(U){var S=this.__position-1;return S>=U.length&&this.__input.substring(S-U.length,S).toLowerCase()===U},J.exports.InputScanner=X},function(J,o,X){var U=X(8).InputScanner,S=X(3).Token,w=X(10).TokenStream,A=X(11).WhitespacePattern,I={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},q=function(re,G){this._input=new U(re),this._options=G||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new A(this._input)};q.prototype.tokenize=function(){this._input.restart(),this.__tokens=new w,this._reset();for(var re,G=new S(I.START,""),D=null,H=[],$=new w;G.type!==I.EOF;){for(re=this._get_next_token(G,D);this._is_comment(re);)$.add(re),re=this._get_next_token(G,D);$.isEmpty()||(re.comments_before=$,$=new w),re.parent=D,this._is_opening(re)?(H.push(D),D=re):D&&this._is_closing(re,D)&&(re.opened=D,D.closed=re,D=H.pop(),re.parent=D),re.previous=G,G.next=re,this.__tokens.add(re),G=re}return this.__tokens},q.prototype._is_first_token=function(){return this.__tokens.isEmpty()},q.prototype._reset=function(){},q.prototype._get_next_token=function(re,G){this._readWhitespace();var D=this._input.read(/.+/g);return D?this._create_token(I.RAW,D):this._create_token(I.EOF,"")},q.prototype._is_comment=function(re){return!1},q.prototype._is_opening=function(re){return!1},q.prototype._is_closing=function(re,G){return!1},q.prototype._create_token=function(re,G){var D=new S(re,G,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return D},q.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},J.exports.Tokenizer=q,J.exports.TOKEN=I},function(J){function o(X){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=X}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 X=null;return this.hasNext()&&(X=this.__tokens[this.__position],this.__position+=1),X},o.prototype.peek=function(X){var U=null;return X=X||0,X+=this.__position,X>=0&&X<this.__tokens_length&&(U=this.__tokens[X]),U},o.prototype.add=function(X){this.__parent_token&&(X.parent=this.__parent_token),this.__tokens.push(X),this.__tokens_length+=1},J.exports.TokenStream=o},function(J,o,X){var U=X(12).Pattern;function S(w,A){U.call(this,w,A),A?this._line_regexp=this._input.get_regexp(A._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}S.prototype=new U,S.prototype.__set_whitespace_patterns=function(w,A){w+="\\t ",A+="\\n\\r",this._match_pattern=this._input.get_regexp("["+w+A+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+A+"]")},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 A=this.__split(this._newline_regexp,w);this.newline_count=A.length-1,this.whitespace_before_token=A[this.newline_count]}return w},S.prototype.matching=function(w,A){var I=this._create();return I.__set_whitespace_patterns(w,A),I._update(),I},S.prototype._create=function(){return new S(this._input,this)},S.prototype.__split=function(w,A){w.lastIndex=0;for(var I=0,q=[],re=w.exec(A);re;)q.push(A.substring(I,re.index)),I=re.index+re[0].length,re=w.exec(A);return I<A.length?q.push(A.substring(I,A.length)):q.push(""),q},J.exports.WhitespacePattern=S},function(J){function o(X,U){this._input=X,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,U&&(this._starting_pattern=this._input.get_regexp(U._starting_pattern,!0),this._match_pattern=this._input.get_regexp(U._match_pattern,!0),this._until_pattern=this._input.get_regexp(U._until_pattern),this._until_after=U._until_after)}o.prototype.read=function(){var X=this._input.read(this._starting_pattern);return(!this._starting_pattern||X)&&(X+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),X},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(X){var U=this._create();return U._until_after=!0,U._until_pattern=this._input.get_regexp(X),U._update(),U},o.prototype.until=function(X){var U=this._create();return U._until_after=!1,U._until_pattern=this._input.get_regexp(X),U._update(),U},o.prototype.starting_with=function(X){var U=this._create();return U._starting_pattern=this._input.get_regexp(X,!0),U._update(),U},o.prototype.matching=function(X){var U=this._create();return U._match_pattern=this._input.get_regexp(X,!0),U._update(),U},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},J.exports.Pattern=o},function(J){function o(X,U){X=typeof X=="string"?X:X.source,U=typeof U=="string"?U:U.source,this.__directives_block_pattern=new RegExp(X+/ beautify( \w+[:]\w+)+ /.source+U,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(X+/\sbeautify\signore:end\s/.source+U,"g")}o.prototype.get_directives=function(X){if(!X.match(this.__directives_block_pattern))return null;var U={};this.__directive_pattern.lastIndex=0;for(var S=this.__directive_pattern.exec(X);S;)U[S[1]]=S[2],S=this.__directive_pattern.exec(X);return U},o.prototype.readIgnored=function(X){return X.readUntilAfter(this.__directives_end_ignore_pattern)},J.exports.Directives=o},function(J,o,X){var U=X(12).Pattern,S={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function w(A,I){U.call(this,A,I),this.__template_pattern=null,this._disabled=Object.assign({},S),this._excluded=Object.assign({},S),I&&(this.__template_pattern=this._input.get_regexp(I.__template_pattern),this._excluded=Object.assign(this._excluded,I._excluded),this._disabled=Object.assign(this._disabled,I._disabled));var q=new U(A);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 U,w.prototype._create=function(){return new w(this._input,this)},w.prototype._update=function(){this.__set_templated_pattern()},w.prototype.disable=function(A){var I=this._create();return I._disabled[A]=!0,I._update(),I},w.prototype.read_options=function(A){var I=this._create();for(var q in S)I._disabled[q]=A.templating.indexOf(q)===-1;return I._update(),I},w.prototype.exclude=function(A){var I=this._create();return I._excluded[A]=!0,I._update(),I},w.prototype.read=function(){var A="";this._match_pattern?A=this._input.read(this._starting_pattern):A=this._input.read(this._starting_pattern,this.__template_pattern);for(var I=this._read_template();I;)this._match_pattern?I+=this._input.read(this._match_pattern):I+=this._input.readUntil(this.__template_pattern),A+=I,I=this._read_template();return this._until_after&&(A+=this._input.readUntilAfter(this._until_pattern)),A},w.prototype.__set_templated_pattern=function(){var A=[];this._disabled.php||A.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||A.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||A.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||A.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(A.push(this.__patterns.django._starting_pattern.source),A.push(this.__patterns.django_value._starting_pattern.source),A.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||A.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&A.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+A.join("|")+")")},w.prototype._read_template=function(){var A="",I=this._input.peek();if(I==="<"){var q=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&q==="?"&&(A=A||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&q==="%"&&(A=A||this.__patterns.erb.read())}else I==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(A=A||this.__patterns.handlebars_comment.read(),A=A||this.__patterns.handlebars_unescaped.read(),A=A||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(A=A||this.__patterns.django_value.read()),this._excluded.django||(A=A||this.__patterns.django_comment.read(),A=A||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(A=A||this.__patterns.smarty_comment.read(),A=A||this.__patterns.smarty_literal.read(),A=A||this.__patterns.smarty.read()));return A},J.exports.TemplatablePattern=w}],W={};function g(J){var o=W[J];if(o!==void 0)return o.exports;var X=W[J]={exports:{}};return ye[J](X,X.exports,g),X.exports}var ne=g(0);ge=ne})();var Ee=ge;_=[],d=function(){return{js_beautify:Ee}}.apply(ot,_),d!==void 0&&(Jt.exports=d)})()},15342:function(Jt){(function(_,d){Jt.exports=d()})(typeof self!="undefined"?self:this,function(){return function(ot){var _={};function d(ge){if(_[ge])return _[ge].exports;var Ee=_[ge]={i:ge,l:!1,exports:{}};return ot[ge].call(Ee.exports,Ee,Ee.exports,d),Ee.l=!0,Ee.exports}return d.m=ot,d.c=_,d.d=function(ge,Ee,ye){d.o(ge,Ee)||Object.defineProperty(ge,Ee,{enumerable:!0,get:ye})},d.r=function(ge){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ge,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ge,"__esModule",{value:!0})},d.t=function(ge,Ee){if(Ee&1&&(ge=d(ge)),Ee&8||Ee&4&&typeof ge=="object"&&ge&&ge.__esModule)return ge;var ye=Object.create(null);if(d.r(ye),Object.defineProperty(ye,"default",{enumerable:!0,value:ge}),Ee&2&&typeof ge!="string")for(var W in ge)d.d(ye,W,function(g){return ge[g]}.bind(null,W));return ye},d.n=function(ge){var Ee=ge&&ge.__esModule?function(){return ge.default}:function(){return ge};return d.d(Ee,"a",Ee),Ee},d.o=function(ge,Ee){return Object.prototype.hasOwnProperty.call(ge,Ee)},d.p="",d(d.s=1)}([function(ot,_,d){},function(ot,_,d){"use strict";d.r(_);var ge=d(0),Ee=function(){function Z(u,f,m){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=u,this.start=f,this.end=m}return Z.range=function(f,m){return m?!f||!f.loc||!m.loc||f.loc.lexer!==m.loc.lexer?null:new Z(f.loc.lexer,f.loc.start,m.loc.end):f&&f.loc},Z}(),ye=function(){function Z(f,m){this.text=void 0,this.loc=void 0,this.text=f,this.loc=m}var u=Z.prototype;return u.range=function(m,y){return new Z(y,Ee.range(this,m))},Z}(),W=function Z(u,f){this.position=void 0;var m="KaTeX parse error: "+u,y,R=f&&f.loc;if(R&&R.start<=R.end){var V=R.lexer.input;y=R.start;var _e=R.end;y===V.length?m+=" at end of input: ":m+=" at position "+(y+1)+": ";var ke=V.slice(y,_e).replace(/[^]/g,"$&\u0332"),et;y>15?et="\u2026"+V.slice(y-15,y):et=V.slice(0,y);var ft;_e+15<V.length?ft=V.slice(_e,_e+15)+"\u2026":ft=V.slice(_e),m+=et+ke+ft}var It=new Error(m);return It.name="ParseError",It.__proto__=Z.prototype,It.position=y,It};W.prototype.__proto__=Error.prototype;var g=W,ne=function(u,f){return u.indexOf(f)!==-1},J=function(u,f){return u===void 0?f:u},o=/([A-Z])/g,X=function(u){return u.replace(o,"-$1").toLowerCase()},U={"&":"&",">":">","<":"<",'"':""","'":"'"},S=/[&><"']/g;function w(Z){return String(Z).replace(S,function(u){return U[u]})}var A=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},I=function(u){var f=A(u);return f.type==="mathord"||f.type==="textord"||f.type==="atom"},q=function(u){if(!u)throw new Error("Expected non-null, but got "+String(u));return u},re=function(u){var f=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(u);return f!=null?f[1]:"_relative"},G={contains:ne,deflt:J,escape:w,hyphenate:X,getBaseElem:A,isCharacterBox:I,protocolFromUrl:re},D=function(){function Z(f){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,f=f||{},this.displayMode=G.deflt(f.displayMode,!1),this.output=G.deflt(f.output,"htmlAndMathml"),this.leqno=G.deflt(f.leqno,!1),this.fleqn=G.deflt(f.fleqn,!1),this.throwOnError=G.deflt(f.throwOnError,!0),this.errorColor=G.deflt(f.errorColor,"#cc0000"),this.macros=f.macros||{},this.minRuleThickness=Math.max(0,G.deflt(f.minRuleThickness,0)),this.colorIsTextColor=G.deflt(f.colorIsTextColor,!1),this.strict=G.deflt(f.strict,"warn"),this.trust=G.deflt(f.trust,!1),this.maxSize=Math.max(0,G.deflt(f.maxSize,1/0)),this.maxExpand=Math.max(0,G.deflt(f.maxExpand,1e3))}var u=Z.prototype;return u.reportNonstrict=function(m,y,R){var V=this.strict;if(typeof V=="function"&&(V=V(m,y,R)),!(!V||V==="ignore")){if(V===!0||V==="error")throw new g("LaTeX-incompatible input and strict mode is set to 'error': "+(y+" ["+m+"]"),R);V==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(y+" ["+m+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+V+"': "+y+" ["+m+"]"))}},u.useStrictBehavior=function(m,y,R){var V=this.strict;if(typeof V=="function")try{V=V(m,y,R)}catch(_e){V="error"}return!V||V==="ignore"?!1:V===!0||V==="error"?!0:V==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(y+" ["+m+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+V+"': "+y+" ["+m+"]")),!1)},u.isTrusted=function(m){m.url&&!m.protocol&&(m.protocol=G.protocolFromUrl(m.url));var y=typeof this.trust=="function"?this.trust(m):this.trust;return!!y},Z}(),H=function(){function Z(f,m,y){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=f,this.size=m,this.cramped=y}var u=Z.prototype;return u.sup=function(){return Ve[K[this.id]]},u.sub=function(){return Ve[B[this.id]]},u.fracNum=function(){return Ve[L[this.id]]},u.fracDen=function(){return Ve[Y[this.id]]},u.cramp=function(){return Ve[Q[this.id]]},u.text=function(){return Ve[P[this.id]]},u.isTight=function(){return this.size>=2},Z}(),$=0,z=1,de=2,we=3,ce=4,Oe=5,Fe=6,Ne=7,Ve=[new H($,0,!1),new H(z,0,!0),new H(de,1,!1),new H(we,1,!0),new H(ce,2,!1),new H(Oe,2,!0),new H(Fe,3,!1),new H(Ne,3,!0)],K=[ce,Oe,ce,Oe,Fe,Ne,Fe,Ne],B=[Oe,Oe,Oe,Oe,Ne,Ne,Ne,Ne],L=[de,we,ce,Oe,Fe,Ne,Fe,Ne],Y=[we,we,Oe,Oe,Ne,Ne,Ne,Ne],Q=[z,z,we,we,Oe,Oe,Ne,Ne],P=[$,z,de,we,de,we,de,we],b={DISPLAY:Ve[$],TEXT:Ve[de],SCRIPT:Ve[ce],SCRIPTSCRIPT:Ve[Fe]},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 N(Z){for(var u=0;u<E.length;u++)for(var f=E[u],m=0;m<f.blocks.length;m++){var y=f.blocks[m];if(Z>=y[0]&&Z<=y[1])return f.name}return null}var ie=[];E.forEach(function(Z){return Z.blocks.forEach(function(u){return ie.push.apply(ie,u)})});function Ie(Z){for(var u=0;u<ie.length;u+=2)if(Z>=ie[u]&&Z<=ie[u+1])return!0;return!1}var Ze=80,me=function(u,f){return"M95,"+(622+u+f)+`
|
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
c69,-144,104.5,-217.7,106.5,-221
|
|
l`+u/2.075+" -"+u+`
|
|
c5.3,-9.3,12,-14,20,-14
|
|
H400000v`+(40+u)+`H845.2724
|
|
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
M`+(834+u)+" "+f+"h400000v"+(40+u)+"h-400000z"},Ce=function(u,f){return"M263,"+(601+u+f)+`c0.7,0,18,39.7,52,119
|
|
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
c340,-704.7,510.7,-1060.3,512,-1067
|
|
l`+u/2.084+" -"+u+`
|
|
c4.7,-7.3,11,-11,19,-11
|
|
H40000v`+(40+u)+`H1012.3
|
|
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
M`+(1001+u)+" "+f+"h400000v"+(40+u)+"h-400000z"},Ke=function(u,f){return"M983 "+(10+u+f)+`
|
|
l`+u/3.13+" -"+u+`
|
|
c4,-6.7,10,-10,18,-10 H400000v`+(40+u)+`
|
|
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
M`+(1001+u)+" "+f+"h400000v"+(40+u)+"h-400000z"},Qe=function(u,f){return"M424,"+(2398+u+f)+`
|
|
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
l`+u/4.223+" -"+u+`c4,-6.7,10,-10,18,-10 H400000
|
|
v`+(40+u)+`H1014.6
|
|
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
c-2,6,-10,9,-24,9
|
|
c-8,0,-12,-0.7,-12,-2z M`+(1001+u)+" "+f+`
|
|
h400000v`+(40+u)+"h-400000z"},Ge=function(u,f){return"M473,"+(2713+u+f)+`
|
|
c339.3,-1799.3,509.3,-2700,510,-2702 l`+u/5.298+" -"+u+`
|
|
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+u)+`H1017.7
|
|
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
606zM`+(1001+u)+" "+f+"h400000v"+(40+u)+"H1017.7z"},wt=function(u,f,m){var y=m-54-f-u;return"M702 "+(u+f)+"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 `+f+"H400000v"+(40+u)+"H742z"},Ue=function(u,f,m){f=1e3*f;var y="";switch(u){case"sqrtMain":y=me(f,Ze);break;case"sqrtSize1":y=Ce(f,Ze);break;case"sqrtSize2":y=Ke(f,Ze);break;case"sqrtSize3":y=Qe(f,Ze);break;case"sqrtSize4":y=Ge(f,Ze);break;case"sqrtTall":y=wt(f,Ze,m)}return y},bt={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`},Le=function(){function Z(f){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=f,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var u=Z.prototype;return u.hasClass=function(m){return G.contains(this.classes,m)},u.toNode=function(){for(var m=document.createDocumentFragment(),y=0;y<this.children.length;y++)m.appendChild(this.children[y].toNode());return m},u.toMarkup=function(){for(var m="",y=0;y<this.children.length;y++)m+=this.children[y].toMarkup();return m},u.toText=function(){var m=function(R){return R.toText()};return this.children.map(m).join("")},Z}(),lt=function(u){return u.filter(function(f){return f}).join(" ")},Re=function(u,f,m){if(this.classes=u||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=m||{},f){f.style.isTight()&&this.classes.push("mtight");var y=f.getColor();y&&(this.style.color=y)}},Te=function(u){var f=document.createElement(u);f.className=lt(this.classes);for(var m in this.style)this.style.hasOwnProperty(m)&&(f.style[m]=this.style[m]);for(var y in this.attributes)this.attributes.hasOwnProperty(y)&&f.setAttribute(y,this.attributes[y]);for(var R=0;R<this.children.length;R++)f.appendChild(this.children[R].toNode());return f},pe=function(u){var f="<"+u;this.classes.length&&(f+=' class="'+G.escape(lt(this.classes))+'"');var m="";for(var y in this.style)this.style.hasOwnProperty(y)&&(m+=G.hyphenate(y)+":"+this.style[y]+";");m&&(f+=' style="'+G.escape(m)+'"');for(var R in this.attributes)this.attributes.hasOwnProperty(R)&&(f+=" "+R+'="'+G.escape(this.attributes[R])+'"');f+=">";for(var V=0;V<this.children.length;V++)f+=this.children[V].toMarkup();return f+="</"+u+">",f},We=function(){function Z(f,m,y,R){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,f,y,R),this.children=m||[]}var u=Z.prototype;return u.setAttribute=function(m,y){this.attributes[m]=y},u.hasClass=function(m){return G.contains(this.classes,m)},u.toNode=function(){return Te.call(this,"span")},u.toMarkup=function(){return pe.call(this,"span")},Z}(),De=function(){function Z(f,m,y,R){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,m,R),this.children=y||[],this.setAttribute("href",f)}var u=Z.prototype;return u.setAttribute=function(m,y){this.attributes[m]=y},u.hasClass=function(m){return G.contains(this.classes,m)},u.toNode=function(){return Te.call(this,"a")},u.toMarkup=function(){return pe.call(this,"a")},Z}(),Se=function(){function Z(f,m,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=m,this.src=f,this.classes=["mord"],this.style=y}var u=Z.prototype;return u.hasClass=function(m){return G.contains(this.classes,m)},u.toNode=function(){var m=document.createElement("img");m.src=this.src,m.alt=this.alt,m.className="mord";for(var y in this.style)this.style.hasOwnProperty(y)&&(m.style[y]=this.style[y]);return m},u.toMarkup=function(){var m="<img src='"+this.src+" 'alt='"+this.alt+"' ",y="";for(var R in this.style)this.style.hasOwnProperty(R)&&(y+=G.hyphenate(R)+":"+this.style[R]+";");return y&&(m+=' style="'+G.escape(y)+'"'),m+="'/>",m},Z}(),k={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},fe=function(){function Z(f,m,y,R,V,_e,ke,et){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=f,this.height=m||0,this.depth=y||0,this.italic=R||0,this.skew=V||0,this.width=_e||0,this.classes=ke||[],this.style=et||{},this.maxFontSize=0;var ft=N(this.text.charCodeAt(0));ft&&this.classes.push(ft+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=k[this.text])}var u=Z.prototype;return u.hasClass=function(m){return G.contains(this.classes,m)},u.toNode=function(){var m=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=lt(this.classes));for(var R in this.style)this.style.hasOwnProperty(R)&&(y=y||document.createElement("span"),y.style[R]=this.style[R]);return y?(y.appendChild(m),y):m},u.toMarkup=function(){var m=!1,y="<span";this.classes.length&&(m=!0,y+=' class="',y+=G.escape(lt(this.classes)),y+='"');var R="";this.italic>0&&(R+="margin-right:"+this.italic+"em;");for(var V in this.style)this.style.hasOwnProperty(V)&&(R+=G.hyphenate(V)+":"+this.style[V]+";");R&&(m=!0,y+=' style="'+G.escape(R)+'"');var _e=G.escape(this.text);return m?(y+=">",y+=_e,y+="</span>",y):_e},Z}(),ve=function(){function Z(f,m){this.children=void 0,this.attributes=void 0,this.children=f||[],this.attributes=m||{}}var u=Z.prototype;return u.toNode=function(){var m="http://www.w3.org/2000/svg",y=document.createElementNS(m,"svg");for(var R in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,R)&&y.setAttribute(R,this.attributes[R]);for(var V=0;V<this.children.length;V++)y.appendChild(this.children[V].toNode());return y},u.toMarkup=function(){var m="<svg";for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&(m+=" "+y+"='"+this.attributes[y]+"'");m+=">";for(var R=0;R<this.children.length;R++)m+=this.children[R].toMarkup();return m+="</svg>",m},Z}(),Be=function(){function Z(f,m){this.pathName=void 0,this.alternate=void 0,this.pathName=f,this.alternate=m}var u=Z.prototype;return u.toNode=function(){var m="http://www.w3.org/2000/svg",y=document.createElementNS(m,"path");return this.alternate?y.setAttribute("d",this.alternate):y.setAttribute("d",bt[this.pathName]),y},u.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+bt[this.pathName]+"'/>"},Z}(),qe=function(){function Z(f){this.attributes=void 0,this.attributes=f||{}}var u=Z.prototype;return u.toNode=function(){var m="http://www.w3.org/2000/svg",y=document.createElementNS(m,"line");for(var R in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,R)&&y.setAttribute(R,this.attributes[R]);return y},u.toMarkup=function(){var m="<line";for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&(m+=" "+y+"='"+this.attributes[y]+"'");return m+="/>",m},Z}();function at(Z){if(Z instanceof fe)return Z;throw new Error("Expected symbolNode but got "+String(Z)+".")}function ct(Z){if(Z instanceof We)return Z;throw new Error("Expected span<HtmlDomNode> but got "+String(Z)+".")}var mt={"AMS-Regular":{65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473]},"Fraktur-Regular":{33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],163:[0,.69444,0,0,.86853],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],163:[0,.69444,0,0,.76909],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],305:[0,.43056,0,.02778,.32246],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],567:[.19444,.43056,0,.08334,.38403],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,1],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.67,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.744,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.744,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333]},"Math-Italic":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"Math-Regular":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"SansSerif-Bold":{33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212]},"Size1-Regular":{40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},dt={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},gt={\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function Lt(Z,u){mt[Z]=u}function St(Z,u,f){if(!mt[u])throw new Error("Font metrics not found for font: "+u+".");var m=Z.charCodeAt(0),y=mt[u][m];if(!y&&Z[0]in gt&&(m=gt[Z[0]].charCodeAt(0),y=mt[u][m]),!y&&f==="text"&&Ie(m)&&(y=mt[u][77]),y)return{depth:y[0],height:y[1],italic:y[2],skew:y[3],width:y[4]}}var Ct={};function nt(Z){var u;if(Z>=5?u=0:Z>=3?u=1:u=2,!Ct[u]){var f=Ct[u]={cssEmPerMu:dt.quad[u]/18};for(var m in dt)dt.hasOwnProperty(m)&&(f[m]=dt[m][u])}return Ct[u]}var vt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},pt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},be={math:{},text:{}},Je=be;function x(Z,u,f,m,y,R){be[Z][y]={font:u,group:f,replace:m},R&&m&&(be[Z][m]=be[Z][y])}var T="math",$e="text",j="main",ae="ams",xt="accent-token",Ae="bin",Me="close",Xe="inner",ee="mathord",oe="op-token",xe="open",ze="punct",F="rel",tt="spacing",se="textord";x(T,j,F,"\u2261","\\equiv",!0),x(T,j,F,"\u227A","\\prec",!0),x(T,j,F,"\u227B","\\succ",!0),x(T,j,F,"\u223C","\\sim",!0),x(T,j,F,"\u22A5","\\perp"),x(T,j,F,"\u2AAF","\\preceq",!0),x(T,j,F,"\u2AB0","\\succeq",!0),x(T,j,F,"\u2243","\\simeq",!0),x(T,j,F,"\u2223","\\mid",!0),x(T,j,F,"\u226A","\\ll",!0),x(T,j,F,"\u226B","\\gg",!0),x(T,j,F,"\u224D","\\asymp",!0),x(T,j,F,"\u2225","\\parallel"),x(T,j,F,"\u22C8","\\bowtie",!0),x(T,j,F,"\u2323","\\smile",!0),x(T,j,F,"\u2291","\\sqsubseteq",!0),x(T,j,F,"\u2292","\\sqsupseteq",!0),x(T,j,F,"\u2250","\\doteq",!0),x(T,j,F,"\u2322","\\frown",!0),x(T,j,F,"\u220B","\\ni",!0),x(T,j,F,"\u221D","\\propto",!0),x(T,j,F,"\u22A2","\\vdash",!0),x(T,j,F,"\u22A3","\\dashv",!0),x(T,j,F,"\u220B","\\owns"),x(T,j,ze,".","\\ldotp"),x(T,j,ze,"\u22C5","\\cdotp"),x(T,j,se,"#","\\#"),x($e,j,se,"#","\\#"),x(T,j,se,"&","\\&"),x($e,j,se,"&","\\&"),x(T,j,se,"\u2135","\\aleph",!0),x(T,j,se,"\u2200","\\forall",!0),x(T,j,se,"\u210F","\\hbar",!0),x(T,j,se,"\u2203","\\exists",!0),x(T,j,se,"\u2207","\\nabla",!0),x(T,j,se,"\u266D","\\flat",!0),x(T,j,se,"\u2113","\\ell",!0),x(T,j,se,"\u266E","\\natural",!0),x(T,j,se,"\u2663","\\clubsuit",!0),x(T,j,se,"\u2118","\\wp",!0),x(T,j,se,"\u266F","\\sharp",!0),x(T,j,se,"\u2662","\\diamondsuit",!0),x(T,j,se,"\u211C","\\Re",!0),x(T,j,se,"\u2661","\\heartsuit",!0),x(T,j,se,"\u2111","\\Im",!0),x(T,j,se,"\u2660","\\spadesuit",!0),x($e,j,se,"\xA7","\\S",!0),x($e,j,se,"\xB6","\\P",!0),x(T,j,se,"\u2020","\\dag"),x($e,j,se,"\u2020","\\dag"),x($e,j,se,"\u2020","\\textdagger"),x(T,j,se,"\u2021","\\ddag"),x($e,j,se,"\u2021","\\ddag"),x($e,j,se,"\u2021","\\textdaggerdbl"),x(T,j,Me,"\u23B1","\\rmoustache",!0),x(T,j,xe,"\u23B0","\\lmoustache",!0),x(T,j,Me,"\u27EF","\\rgroup",!0),x(T,j,xe,"\u27EE","\\lgroup",!0),x(T,j,Ae,"\u2213","\\mp",!0),x(T,j,Ae,"\u2296","\\ominus",!0),x(T,j,Ae,"\u228E","\\uplus",!0),x(T,j,Ae,"\u2293","\\sqcap",!0),x(T,j,Ae,"\u2217","\\ast"),x(T,j,Ae,"\u2294","\\sqcup",!0),x(T,j,Ae,"\u25EF","\\bigcirc"),x(T,j,Ae,"\u2219","\\bullet"),x(T,j,Ae,"\u2021","\\ddagger"),x(T,j,Ae,"\u2240","\\wr",!0),x(T,j,Ae,"\u2A3F","\\amalg"),x(T,j,Ae,"&","\\And"),x(T,j,F,"\u27F5","\\longleftarrow",!0),x(T,j,F,"\u21D0","\\Leftarrow",!0),x(T,j,F,"\u27F8","\\Longleftarrow",!0),x(T,j,F,"\u27F6","\\longrightarrow",!0),x(T,j,F,"\u21D2","\\Rightarrow",!0),x(T,j,F,"\u27F9","\\Longrightarrow",!0),x(T,j,F,"\u2194","\\leftrightarrow",!0),x(T,j,F,"\u27F7","\\longleftrightarrow",!0),x(T,j,F,"\u21D4","\\Leftrightarrow",!0),x(T,j,F,"\u27FA","\\Longleftrightarrow",!0),x(T,j,F,"\u21A6","\\mapsto",!0),x(T,j,F,"\u27FC","\\longmapsto",!0),x(T,j,F,"\u2197","\\nearrow",!0),x(T,j,F,"\u21A9","\\hookleftarrow",!0),x(T,j,F,"\u21AA","\\hookrightarrow",!0),x(T,j,F,"\u2198","\\searrow",!0),x(T,j,F,"\u21BC","\\leftharpoonup",!0),x(T,j,F,"\u21C0","\\rightharpoonup",!0),x(T,j,F,"\u2199","\\swarrow",!0),x(T,j,F,"\u21BD","\\leftharpoondown",!0),x(T,j,F,"\u21C1","\\rightharpoondown",!0),x(T,j,F,"\u2196","\\nwarrow",!0),x(T,j,F,"\u21CC","\\rightleftharpoons",!0),x(T,ae,F,"\u226E","\\nless",!0),x(T,ae,F,"\uE010","\\@nleqslant"),x(T,ae,F,"\uE011","\\@nleqq"),x(T,ae,F,"\u2A87","\\lneq",!0),x(T,ae,F,"\u2268","\\lneqq",!0),x(T,ae,F,"\uE00C","\\@lvertneqq"),x(T,ae,F,"\u22E6","\\lnsim",!0),x(T,ae,F,"\u2A89","\\lnapprox",!0),x(T,ae,F,"\u2280","\\nprec",!0),x(T,ae,F,"\u22E0","\\npreceq",!0),x(T,ae,F,"\u22E8","\\precnsim",!0),x(T,ae,F,"\u2AB9","\\precnapprox",!0),x(T,ae,F,"\u2241","\\nsim",!0),x(T,ae,F,"\uE006","\\@nshortmid"),x(T,ae,F,"\u2224","\\nmid",!0),x(T,ae,F,"\u22AC","\\nvdash",!0),x(T,ae,F,"\u22AD","\\nvDash",!0),x(T,ae,F,"\u22EA","\\ntriangleleft"),x(T,ae,F,"\u22EC","\\ntrianglelefteq",!0),x(T,ae,F,"\u228A","\\subsetneq",!0),x(T,ae,F,"\uE01A","\\@varsubsetneq"),x(T,ae,F,"\u2ACB","\\subsetneqq",!0),x(T,ae,F,"\uE017","\\@varsubsetneqq"),x(T,ae,F,"\u226F","\\ngtr",!0),x(T,ae,F,"\uE00F","\\@ngeqslant"),x(T,ae,F,"\uE00E","\\@ngeqq"),x(T,ae,F,"\u2A88","\\gneq",!0),x(T,ae,F,"\u2269","\\gneqq",!0),x(T,ae,F,"\uE00D","\\@gvertneqq"),x(T,ae,F,"\u22E7","\\gnsim",!0),x(T,ae,F,"\u2A8A","\\gnapprox",!0),x(T,ae,F,"\u2281","\\nsucc",!0),x(T,ae,F,"\u22E1","\\nsucceq",!0),x(T,ae,F,"\u22E9","\\succnsim",!0),x(T,ae,F,"\u2ABA","\\succnapprox",!0),x(T,ae,F,"\u2246","\\ncong",!0),x(T,ae,F,"\uE007","\\@nshortparallel"),x(T,ae,F,"\u2226","\\nparallel",!0),x(T,ae,F,"\u22AF","\\nVDash",!0),x(T,ae,F,"\u22EB","\\ntriangleright"),x(T,ae,F,"\u22ED","\\ntrianglerighteq",!0),x(T,ae,F,"\uE018","\\@nsupseteqq"),x(T,ae,F,"\u228B","\\supsetneq",!0),x(T,ae,F,"\uE01B","\\@varsupsetneq"),x(T,ae,F,"\u2ACC","\\supsetneqq",!0),x(T,ae,F,"\uE019","\\@varsupsetneqq"),x(T,ae,F,"\u22AE","\\nVdash",!0),x(T,ae,F,"\u2AB5","\\precneqq",!0),x(T,ae,F,"\u2AB6","\\succneqq",!0),x(T,ae,F,"\uE016","\\@nsubseteqq"),x(T,ae,Ae,"\u22B4","\\unlhd"),x(T,ae,Ae,"\u22B5","\\unrhd"),x(T,ae,F,"\u219A","\\nleftarrow",!0),x(T,ae,F,"\u219B","\\nrightarrow",!0),x(T,ae,F,"\u21CD","\\nLeftarrow",!0),x(T,ae,F,"\u21CF","\\nRightarrow",!0),x(T,ae,F,"\u21AE","\\nleftrightarrow",!0),x(T,ae,F,"\u21CE","\\nLeftrightarrow",!0),x(T,ae,F,"\u25B3","\\vartriangle"),x(T,ae,se,"\u210F","\\hslash"),x(T,ae,se,"\u25BD","\\triangledown"),x(T,ae,se,"\u25CA","\\lozenge"),x(T,ae,se,"\u24C8","\\circledS"),x(T,ae,se,"\xAE","\\circledR"),x($e,ae,se,"\xAE","\\circledR"),x(T,ae,se,"\u2221","\\measuredangle",!0),x(T,ae,se,"\u2204","\\nexists"),x(T,ae,se,"\u2127","\\mho"),x(T,ae,se,"\u2132","\\Finv",!0),x(T,ae,se,"\u2141","\\Game",!0),x(T,ae,se,"\u2035","\\backprime"),x(T,ae,se,"\u25B2","\\blacktriangle"),x(T,ae,se,"\u25BC","\\blacktriangledown"),x(T,ae,se,"\u25A0","\\blacksquare"),x(T,ae,se,"\u29EB","\\blacklozenge"),x(T,ae,se,"\u2605","\\bigstar"),x(T,ae,se,"\u2222","\\sphericalangle",!0),x(T,ae,se,"\u2201","\\complement",!0),x(T,ae,se,"\xF0","\\eth",!0),x(T,ae,se,"\u2571","\\diagup"),x(T,ae,se,"\u2572","\\diagdown"),x(T,ae,se,"\u25A1","\\square"),x(T,ae,se,"\u25A1","\\Box"),x(T,ae,se,"\u25CA","\\Diamond"),x(T,ae,se,"\xA5","\\yen",!0),x($e,ae,se,"\xA5","\\yen",!0),x(T,ae,se,"\u2713","\\checkmark",!0),x($e,ae,se,"\u2713","\\checkmark"),x(T,ae,se,"\u2136","\\beth",!0),x(T,ae,se,"\u2138","\\daleth",!0),x(T,ae,se,"\u2137","\\gimel",!0),x(T,ae,se,"\u03DD","\\digamma",!0),x(T,ae,se,"\u03F0","\\varkappa"),x(T,ae,xe,"\u250C","\\ulcorner",!0),x(T,ae,Me,"\u2510","\\urcorner",!0),x(T,ae,xe,"\u2514","\\llcorner",!0),x(T,ae,Me,"\u2518","\\lrcorner",!0),x(T,ae,F,"\u2266","\\leqq",!0),x(T,ae,F,"\u2A7D","\\leqslant",!0),x(T,ae,F,"\u2A95","\\eqslantless",!0),x(T,ae,F,"\u2272","\\lesssim",!0),x(T,ae,F,"\u2A85","\\lessapprox",!0),x(T,ae,F,"\u224A","\\approxeq",!0),x(T,ae,Ae,"\u22D6","\\lessdot"),x(T,ae,F,"\u22D8","\\lll",!0),x(T,ae,F,"\u2276","\\lessgtr",!0),x(T,ae,F,"\u22DA","\\lesseqgtr",!0),x(T,ae,F,"\u2A8B","\\lesseqqgtr",!0),x(T,ae,F,"\u2251","\\doteqdot"),x(T,ae,F,"\u2253","\\risingdotseq",!0),x(T,ae,F,"\u2252","\\fallingdotseq",!0),x(T,ae,F,"\u223D","\\backsim",!0),x(T,ae,F,"\u22CD","\\backsimeq",!0),x(T,ae,F,"\u2AC5","\\subseteqq",!0),x(T,ae,F,"\u22D0","\\Subset",!0),x(T,ae,F,"\u228F","\\sqsubset",!0),x(T,ae,F,"\u227C","\\preccurlyeq",!0),x(T,ae,F,"\u22DE","\\curlyeqprec",!0),x(T,ae,F,"\u227E","\\precsim",!0),x(T,ae,F,"\u2AB7","\\precapprox",!0),x(T,ae,F,"\u22B2","\\vartriangleleft"),x(T,ae,F,"\u22B4","\\trianglelefteq"),x(T,ae,F,"\u22A8","\\vDash",!0),x(T,ae,F,"\u22AA","\\Vvdash",!0),x(T,ae,F,"\u2323","\\smallsmile"),x(T,ae,F,"\u2322","\\smallfrown"),x(T,ae,F,"\u224F","\\bumpeq",!0),x(T,ae,F,"\u224E","\\Bumpeq",!0),x(T,ae,F,"\u2267","\\geqq",!0),x(T,ae,F,"\u2A7E","\\geqslant",!0),x(T,ae,F,"\u2A96","\\eqslantgtr",!0),x(T,ae,F,"\u2273","\\gtrsim",!0),x(T,ae,F,"\u2A86","\\gtrapprox",!0),x(T,ae,Ae,"\u22D7","\\gtrdot"),x(T,ae,F,"\u22D9","\\ggg",!0),x(T,ae,F,"\u2277","\\gtrless",!0),x(T,ae,F,"\u22DB","\\gtreqless",!0),x(T,ae,F,"\u2A8C","\\gtreqqless",!0),x(T,ae,F,"\u2256","\\eqcirc",!0),x(T,ae,F,"\u2257","\\circeq",!0),x(T,ae,F,"\u225C","\\triangleq",!0),x(T,ae,F,"\u223C","\\thicksim"),x(T,ae,F,"\u2248","\\thickapprox"),x(T,ae,F,"\u2AC6","\\supseteqq",!0),x(T,ae,F,"\u22D1","\\Supset",!0),x(T,ae,F,"\u2290","\\sqsupset",!0),x(T,ae,F,"\u227D","\\succcurlyeq",!0),x(T,ae,F,"\u22DF","\\curlyeqsucc",!0),x(T,ae,F,"\u227F","\\succsim",!0),x(T,ae,F,"\u2AB8","\\succapprox",!0),x(T,ae,F,"\u22B3","\\vartriangleright"),x(T,ae,F,"\u22B5","\\trianglerighteq"),x(T,ae,F,"\u22A9","\\Vdash",!0),x(T,ae,F,"\u2223","\\shortmid"),x(T,ae,F,"\u2225","\\shortparallel"),x(T,ae,F,"\u226C","\\between",!0),x(T,ae,F,"\u22D4","\\pitchfork",!0),x(T,ae,F,"\u221D","\\varpropto"),x(T,ae,F,"\u25C0","\\blacktriangleleft"),x(T,ae,F,"\u2234","\\therefore",!0),x(T,ae,F,"\u220D","\\backepsilon"),x(T,ae,F,"\u25B6","\\blacktriangleright"),x(T,ae,F,"\u2235","\\because",!0),x(T,ae,F,"\u22D8","\\llless"),x(T,ae,F,"\u22D9","\\gggtr"),x(T,ae,Ae,"\u22B2","\\lhd"),x(T,ae,Ae,"\u22B3","\\rhd"),x(T,ae,F,"\u2242","\\eqsim",!0),x(T,j,F,"\u22C8","\\Join"),x(T,ae,F,"\u2251","\\Doteq",!0),x(T,ae,Ae,"\u2214","\\dotplus",!0),x(T,ae,Ae,"\u2216","\\smallsetminus"),x(T,ae,Ae,"\u22D2","\\Cap",!0),x(T,ae,Ae,"\u22D3","\\Cup",!0),x(T,ae,Ae,"\u2A5E","\\doublebarwedge",!0),x(T,ae,Ae,"\u229F","\\boxminus",!0),x(T,ae,Ae,"\u229E","\\boxplus",!0),x(T,ae,Ae,"\u22C7","\\divideontimes",!0),x(T,ae,Ae,"\u22C9","\\ltimes",!0),x(T,ae,Ae,"\u22CA","\\rtimes",!0),x(T,ae,Ae,"\u22CB","\\leftthreetimes",!0),x(T,ae,Ae,"\u22CC","\\rightthreetimes",!0),x(T,ae,Ae,"\u22CF","\\curlywedge",!0),x(T,ae,Ae,"\u22CE","\\curlyvee",!0),x(T,ae,Ae,"\u229D","\\circleddash",!0),x(T,ae,Ae,"\u229B","\\circledast",!0),x(T,ae,Ae,"\u22C5","\\centerdot"),x(T,ae,Ae,"\u22BA","\\intercal",!0),x(T,ae,Ae,"\u22D2","\\doublecap"),x(T,ae,Ae,"\u22D3","\\doublecup"),x(T,ae,Ae,"\u22A0","\\boxtimes",!0),x(T,ae,F,"\u21E2","\\dashrightarrow",!0),x(T,ae,F,"\u21E0","\\dashleftarrow",!0),x(T,ae,F,"\u21C7","\\leftleftarrows",!0),x(T,ae,F,"\u21C6","\\leftrightarrows",!0),x(T,ae,F,"\u21DA","\\Lleftarrow",!0),x(T,ae,F,"\u219E","\\twoheadleftarrow",!0),x(T,ae,F,"\u21A2","\\leftarrowtail",!0),x(T,ae,F,"\u21AB","\\looparrowleft",!0),x(T,ae,F,"\u21CB","\\leftrightharpoons",!0),x(T,ae,F,"\u21B6","\\curvearrowleft",!0),x(T,ae,F,"\u21BA","\\circlearrowleft",!0),x(T,ae,F,"\u21B0","\\Lsh",!0),x(T,ae,F,"\u21C8","\\upuparrows",!0),x(T,ae,F,"\u21BF","\\upharpoonleft",!0),x(T,ae,F,"\u21C3","\\downharpoonleft",!0),x(T,ae,F,"\u22B8","\\multimap",!0),x(T,ae,F,"\u21AD","\\leftrightsquigarrow",!0),x(T,ae,F,"\u21C9","\\rightrightarrows",!0),x(T,ae,F,"\u21C4","\\rightleftarrows",!0),x(T,ae,F,"\u21A0","\\twoheadrightarrow",!0),x(T,ae,F,"\u21A3","\\rightarrowtail",!0),x(T,ae,F,"\u21AC","\\looparrowright",!0),x(T,ae,F,"\u21B7","\\curvearrowright",!0),x(T,ae,F,"\u21BB","\\circlearrowright",!0),x(T,ae,F,"\u21B1","\\Rsh",!0),x(T,ae,F,"\u21CA","\\downdownarrows",!0),x(T,ae,F,"\u21BE","\\upharpoonright",!0),x(T,ae,F,"\u21C2","\\downharpoonright",!0),x(T,ae,F,"\u21DD","\\rightsquigarrow",!0),x(T,ae,F,"\u21DD","\\leadsto"),x(T,ae,F,"\u21DB","\\Rrightarrow",!0),x(T,ae,F,"\u21BE","\\restriction"),x(T,j,se,"\u2018","`"),x(T,j,se,"$","\\$"),x($e,j,se,"$","\\$"),x($e,j,se,"$","\\textdollar"),x(T,j,se,"%","\\%"),x($e,j,se,"%","\\%"),x(T,j,se,"_","\\_"),x($e,j,se,"_","\\_"),x($e,j,se,"_","\\textunderscore"),x(T,j,se,"\u2220","\\angle",!0),x(T,j,se,"\u221E","\\infty",!0),x(T,j,se,"\u2032","\\prime"),x(T,j,se,"\u25B3","\\triangle"),x(T,j,se,"\u0393","\\Gamma",!0),x(T,j,se,"\u0394","\\Delta",!0),x(T,j,se,"\u0398","\\Theta",!0),x(T,j,se,"\u039B","\\Lambda",!0),x(T,j,se,"\u039E","\\Xi",!0),x(T,j,se,"\u03A0","\\Pi",!0),x(T,j,se,"\u03A3","\\Sigma",!0),x(T,j,se,"\u03A5","\\Upsilon",!0),x(T,j,se,"\u03A6","\\Phi",!0),x(T,j,se,"\u03A8","\\Psi",!0),x(T,j,se,"\u03A9","\\Omega",!0),x(T,j,se,"A","\u0391"),x(T,j,se,"B","\u0392"),x(T,j,se,"E","\u0395"),x(T,j,se,"Z","\u0396"),x(T,j,se,"H","\u0397"),x(T,j,se,"I","\u0399"),x(T,j,se,"K","\u039A"),x(T,j,se,"M","\u039C"),x(T,j,se,"N","\u039D"),x(T,j,se,"O","\u039F"),x(T,j,se,"P","\u03A1"),x(T,j,se,"T","\u03A4"),x(T,j,se,"X","\u03A7"),x(T,j,se,"\xAC","\\neg",!0),x(T,j,se,"\xAC","\\lnot"),x(T,j,se,"\u22A4","\\top"),x(T,j,se,"\u22A5","\\bot"),x(T,j,se,"\u2205","\\emptyset"),x(T,ae,se,"\u2205","\\varnothing"),x(T,j,ee,"\u03B1","\\alpha",!0),x(T,j,ee,"\u03B2","\\beta",!0),x(T,j,ee,"\u03B3","\\gamma",!0),x(T,j,ee,"\u03B4","\\delta",!0),x(T,j,ee,"\u03F5","\\epsilon",!0),x(T,j,ee,"\u03B6","\\zeta",!0),x(T,j,ee,"\u03B7","\\eta",!0),x(T,j,ee,"\u03B8","\\theta",!0),x(T,j,ee,"\u03B9","\\iota",!0),x(T,j,ee,"\u03BA","\\kappa",!0),x(T,j,ee,"\u03BB","\\lambda",!0),x(T,j,ee,"\u03BC","\\mu",!0),x(T,j,ee,"\u03BD","\\nu",!0),x(T,j,ee,"\u03BE","\\xi",!0),x(T,j,ee,"\u03BF","\\omicron",!0),x(T,j,ee,"\u03C0","\\pi",!0),x(T,j,ee,"\u03C1","\\rho",!0),x(T,j,ee,"\u03C3","\\sigma",!0),x(T,j,ee,"\u03C4","\\tau",!0),x(T,j,ee,"\u03C5","\\upsilon",!0),x(T,j,ee,"\u03D5","\\phi",!0),x(T,j,ee,"\u03C7","\\chi",!0),x(T,j,ee,"\u03C8","\\psi",!0),x(T,j,ee,"\u03C9","\\omega",!0),x(T,j,ee,"\u03B5","\\varepsilon",!0),x(T,j,ee,"\u03D1","\\vartheta",!0),x(T,j,ee,"\u03D6","\\varpi",!0),x(T,j,ee,"\u03F1","\\varrho",!0),x(T,j,ee,"\u03C2","\\varsigma",!0),x(T,j,ee,"\u03C6","\\varphi",!0),x(T,j,Ae,"\u2217","*"),x(T,j,Ae,"+","+"),x(T,j,Ae,"\u2212","-"),x(T,j,Ae,"\u22C5","\\cdot",!0),x(T,j,Ae,"\u2218","\\circ"),x(T,j,Ae,"\xF7","\\div",!0),x(T,j,Ae,"\xB1","\\pm",!0),x(T,j,Ae,"\xD7","\\times",!0),x(T,j,Ae,"\u2229","\\cap",!0),x(T,j,Ae,"\u222A","\\cup",!0),x(T,j,Ae,"\u2216","\\setminus"),x(T,j,Ae,"\u2227","\\land"),x(T,j,Ae,"\u2228","\\lor"),x(T,j,Ae,"\u2227","\\wedge",!0),x(T,j,Ae,"\u2228","\\vee",!0),x(T,j,se,"\u221A","\\surd"),x(T,j,xe,"(","("),x(T,j,xe,"[","["),x(T,j,xe,"\u27E8","\\langle",!0),x(T,j,xe,"\u2223","\\lvert"),x(T,j,xe,"\u2225","\\lVert"),x(T,j,Me,")",")"),x(T,j,Me,"]","]"),x(T,j,Me,"?","?"),x(T,j,Me,"!","!"),x(T,j,Me,"\u27E9","\\rangle",!0),x(T,j,Me,"\u2223","\\rvert"),x(T,j,Me,"\u2225","\\rVert"),x(T,j,F,"=","="),x(T,j,F,"<","<"),x(T,j,F,">",">"),x(T,j,F,":",":"),x(T,j,F,"\u2248","\\approx",!0),x(T,j,F,"\u2245","\\cong",!0),x(T,j,F,"\u2265","\\ge"),x(T,j,F,"\u2265","\\geq",!0),x(T,j,F,"\u2190","\\gets"),x(T,j,F,">","\\gt"),x(T,j,F,"\u2208","\\in",!0),x(T,j,F,"\uE020","\\@not"),x(T,j,F,"\u2282","\\subset",!0),x(T,j,F,"\u2283","\\supset",!0),x(T,j,F,"\u2286","\\subseteq",!0),x(T,j,F,"\u2287","\\supseteq",!0),x(T,ae,F,"\u2288","\\nsubseteq",!0),x(T,ae,F,"\u2289","\\nsupseteq",!0),x(T,j,F,"\u22A8","\\models"),x(T,j,F,"\u2190","\\leftarrow",!0),x(T,j,F,"\u2264","\\le"),x(T,j,F,"\u2264","\\leq",!0),x(T,j,F,"<","\\lt"),x(T,j,F,"\u2192","\\rightarrow",!0),x(T,j,F,"\u2192","\\to"),x(T,ae,F,"\u2271","\\ngeq",!0),x(T,ae,F,"\u2270","\\nleq",!0),x(T,j,tt,"\xA0","\\ "),x(T,j,tt,"\xA0","~"),x(T,j,tt,"\xA0","\\space"),x(T,j,tt,"\xA0","\\nobreakspace"),x($e,j,tt,"\xA0","\\ "),x($e,j,tt,"\xA0","~"),x($e,j,tt,"\xA0","\\space"),x($e,j,tt,"\xA0","\\nobreakspace"),x(T,j,tt,null,"\\nobreak"),x(T,j,tt,null,"\\allowbreak"),x(T,j,ze,",",","),x(T,j,ze,";",";"),x(T,ae,Ae,"\u22BC","\\barwedge",!0),x(T,ae,Ae,"\u22BB","\\veebar",!0),x(T,j,Ae,"\u2299","\\odot",!0),x(T,j,Ae,"\u2295","\\oplus",!0),x(T,j,Ae,"\u2297","\\otimes",!0),x(T,j,se,"\u2202","\\partial",!0),x(T,j,Ae,"\u2298","\\oslash",!0),x(T,ae,Ae,"\u229A","\\circledcirc",!0),x(T,ae,Ae,"\u22A1","\\boxdot",!0),x(T,j,Ae,"\u25B3","\\bigtriangleup"),x(T,j,Ae,"\u25BD","\\bigtriangledown"),x(T,j,Ae,"\u2020","\\dagger"),x(T,j,Ae,"\u22C4","\\diamond"),x(T,j,Ae,"\u22C6","\\star"),x(T,j,Ae,"\u25C3","\\triangleleft"),x(T,j,Ae,"\u25B9","\\triangleright"),x(T,j,xe,"{","\\{"),x($e,j,se,"{","\\{"),x($e,j,se,"{","\\textbraceleft"),x(T,j,Me,"}","\\}"),x($e,j,se,"}","\\}"),x($e,j,se,"}","\\textbraceright"),x(T,j,xe,"{","\\lbrace"),x(T,j,Me,"}","\\rbrace"),x(T,j,xe,"[","\\lbrack"),x($e,j,se,"[","\\lbrack"),x(T,j,Me,"]","\\rbrack"),x($e,j,se,"]","\\rbrack"),x(T,j,xe,"(","\\lparen"),x(T,j,Me,")","\\rparen"),x($e,j,se,"<","\\textless"),x($e,j,se,">","\\textgreater"),x(T,j,xe,"\u230A","\\lfloor",!0),x(T,j,Me,"\u230B","\\rfloor",!0),x(T,j,xe,"\u2308","\\lceil",!0),x(T,j,Me,"\u2309","\\rceil",!0),x(T,j,se,"\\","\\backslash"),x(T,j,se,"\u2223","|"),x(T,j,se,"\u2223","\\vert"),x($e,j,se,"|","\\textbar"),x(T,j,se,"\u2225","\\|"),x(T,j,se,"\u2225","\\Vert"),x($e,j,se,"\u2225","\\textbardbl"),x($e,j,se,"~","\\textasciitilde"),x($e,j,se,"\\","\\textbackslash"),x($e,j,se,"^","\\textasciicircum"),x(T,j,F,"\u2191","\\uparrow",!0),x(T,j,F,"\u21D1","\\Uparrow",!0),x(T,j,F,"\u2193","\\downarrow",!0),x(T,j,F,"\u21D3","\\Downarrow",!0),x(T,j,F,"\u2195","\\updownarrow",!0),x(T,j,F,"\u21D5","\\Updownarrow",!0),x(T,j,oe,"\u2210","\\coprod"),x(T,j,oe,"\u22C1","\\bigvee"),x(T,j,oe,"\u22C0","\\bigwedge"),x(T,j,oe,"\u2A04","\\biguplus"),x(T,j,oe,"\u22C2","\\bigcap"),x(T,j,oe,"\u22C3","\\bigcup"),x(T,j,oe,"\u222B","\\int"),x(T,j,oe,"\u222B","\\intop"),x(T,j,oe,"\u222C","\\iint"),x(T,j,oe,"\u222D","\\iiint"),x(T,j,oe,"\u220F","\\prod"),x(T,j,oe,"\u2211","\\sum"),x(T,j,oe,"\u2A02","\\bigotimes"),x(T,j,oe,"\u2A01","\\bigoplus"),x(T,j,oe,"\u2A00","\\bigodot"),x(T,j,oe,"\u222E","\\oint"),x(T,j,oe,"\u222F","\\oiint"),x(T,j,oe,"\u2230","\\oiiint"),x(T,j,oe,"\u2A06","\\bigsqcup"),x(T,j,oe,"\u222B","\\smallint"),x($e,j,Xe,"\u2026","\\textellipsis"),x(T,j,Xe,"\u2026","\\mathellipsis"),x($e,j,Xe,"\u2026","\\ldots",!0),x(T,j,Xe,"\u2026","\\ldots",!0),x(T,j,Xe,"\u22EF","\\@cdots",!0),x(T,j,Xe,"\u22F1","\\ddots",!0),x(T,j,se,"\u22EE","\\varvdots"),x(T,j,xt,"\u02CA","\\acute"),x(T,j,xt,"\u02CB","\\grave"),x(T,j,xt,"\xA8","\\ddot"),x(T,j,xt,"~","\\tilde"),x(T,j,xt,"\u02C9","\\bar"),x(T,j,xt,"\u02D8","\\breve"),x(T,j,xt,"\u02C7","\\check"),x(T,j,xt,"^","\\hat"),x(T,j,xt,"\u20D7","\\vec"),x(T,j,xt,"\u02D9","\\dot"),x(T,j,xt,"\u02DA","\\mathring"),x(T,j,ee,"\u0131","\\imath",!0),x(T,j,ee,"\u0237","\\jmath",!0),x($e,j,se,"\u0131","\\i",!0),x($e,j,se,"\u0237","\\j",!0),x($e,j,se,"\xDF","\\ss",!0),x($e,j,se,"\xE6","\\ae",!0),x($e,j,se,"\xE6","\\ae",!0),x($e,j,se,"\u0153","\\oe",!0),x($e,j,se,"\xF8","\\o",!0),x($e,j,se,"\xC6","\\AE",!0),x($e,j,se,"\u0152","\\OE",!0),x($e,j,se,"\xD8","\\O",!0),x($e,j,xt,"\u02CA","\\'"),x($e,j,xt,"\u02CB","\\`"),x($e,j,xt,"\u02C6","\\^"),x($e,j,xt,"\u02DC","\\~"),x($e,j,xt,"\u02C9","\\="),x($e,j,xt,"\u02D8","\\u"),x($e,j,xt,"\u02D9","\\."),x($e,j,xt,"\u02DA","\\r"),x($e,j,xt,"\u02C7","\\v"),x($e,j,xt,"\xA8",'\\"'),x($e,j,xt,"\u02DD","\\H"),x($e,j,xt,"\u25EF","\\textcircled");var it={"--":!0,"---":!0,"``":!0,"''":!0};x($e,j,se,"\u2013","--"),x($e,j,se,"\u2013","\\textendash"),x($e,j,se,"\u2014","---"),x($e,j,se,"\u2014","\\textemdash"),x($e,j,se,"\u2018","`"),x($e,j,se,"\u2018","\\textquoteleft"),x($e,j,se,"\u2019","'"),x($e,j,se,"\u2019","\\textquoteright"),x($e,j,se,"\u201C","``"),x($e,j,se,"\u201C","\\textquotedblleft"),x($e,j,se,"\u201D","''"),x($e,j,se,"\u201D","\\textquotedblright"),x(T,j,se,"\xB0","\\degree",!0),x($e,j,se,"\xB0","\\degree"),x($e,j,se,"\xB0","\\textdegree",!0),x(T,j,ee,"\xA3","\\pounds"),x(T,j,ee,"\xA3","\\mathsterling",!0),x($e,j,ee,"\xA3","\\pounds"),x($e,j,ee,"\xA3","\\textsterling",!0),x(T,ae,se,"\u2720","\\maltese"),x($e,ae,se,"\u2720","\\maltese"),x($e,j,tt,"\xA0","\\ "),x($e,j,tt,"\xA0"," "),x($e,j,tt,"\xA0","~");for(var Ot='0123456789/@."',Ut=0;Ut<Ot.length;Ut++){var Ht=Ot.charAt(Ut);x(T,j,se,Ht,Ht)}for(var Xt='0123456789!@*()-=+[]<>|";:?/.,',Vt=0;Vt<Xt.length;Vt++){var hn=Xt.charAt(Vt);x($e,j,se,hn,hn)}for(var Dn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",sn=0;sn<Dn.length;sn++){var An=Dn.charAt(sn);x(T,j,ee,An,An),x($e,j,se,An,An)}x(T,ae,se,"C","\u2102"),x($e,ae,se,"C","\u2102"),x(T,ae,se,"H","\u210D"),x($e,ae,se,"H","\u210D"),x(T,ae,se,"N","\u2115"),x($e,ae,se,"N","\u2115"),x(T,ae,se,"P","\u2119"),x($e,ae,se,"P","\u2119"),x(T,ae,se,"Q","\u211A"),x($e,ae,se,"Q","\u211A"),x(T,ae,se,"R","\u211D"),x($e,ae,se,"R","\u211D"),x(T,ae,se,"Z","\u2124"),x($e,ae,se,"Z","\u2124"),x(T,j,ee,"h","\u210E"),x($e,j,ee,"h","\u210E");for(var Kt="",kt=0;kt<Dn.length;kt++){var te=Dn.charAt(kt);Kt=String.fromCharCode(55349,56320+kt),x(T,j,ee,te,Kt),x($e,j,se,te,Kt),Kt=String.fromCharCode(55349,56372+kt),x(T,j,ee,te,Kt),x($e,j,se,te,Kt),Kt=String.fromCharCode(55349,56424+kt),x(T,j,ee,te,Kt),x($e,j,se,te,Kt),Kt=String.fromCharCode(55349,56580+kt),x(T,j,ee,te,Kt),x($e,j,se,te,Kt),Kt=String.fromCharCode(55349,56736+kt),x(T,j,ee,te,Kt),x($e,j,se,te,Kt),Kt=String.fromCharCode(55349,56788+kt),x(T,j,ee,te,Kt),x($e,j,se,te,Kt),Kt=String.fromCharCode(55349,56840+kt),x(T,j,ee,te,Kt),x($e,j,se,te,Kt),Kt=String.fromCharCode(55349,56944+kt),x(T,j,ee,te,Kt),x($e,j,se,te,Kt),kt<26&&(Kt=String.fromCharCode(55349,56632+kt),x(T,j,ee,te,Kt),x($e,j,se,te,Kt),Kt=String.fromCharCode(55349,56476+kt),x(T,j,ee,te,Kt),x($e,j,se,te,Kt))}Kt="\u{1D55C}",x(T,j,ee,"k",Kt),x($e,j,se,"k",Kt);for(var he=0;he<10;he++){var st=he.toString();Kt=String.fromCharCode(55349,57294+he),x(T,j,ee,st,Kt),x($e,j,se,st,Kt),Kt=String.fromCharCode(55349,57314+he),x(T,j,ee,st,Kt),x($e,j,se,st,Kt),Kt=String.fromCharCode(55349,57324+he),x(T,j,ee,st,Kt),x($e,j,se,st,Kt),Kt=String.fromCharCode(55349,57334+he),x(T,j,ee,st,Kt),x($e,j,se,st,Kt)}for(var Rt="\xC7\xD0\xDE\xE7\xFE",Ft=0;Ft<Rt.length;Ft++){var Gt=Rt.charAt(Ft);x(T,j,ee,Gt,Gt),x($e,j,se,Gt,Gt)}x($e,j,se,"\xF0","\xF0"),x($e,j,se,"\u2013","\u2013"),x($e,j,se,"\u2014","\u2014"),x($e,j,se,"\u2018","\u2018"),x($e,j,se,"\u2019","\u2019"),x($e,j,se,"\u201C","\u201C"),x($e,j,se,"\u201D","\u201D");var qt=[["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"]],Qt=function(u,f){var m=u.charCodeAt(0),y=u.charCodeAt(1),R=(m-55296)*1024+(y-56320)+65536,V=f==="math"?0:1;if(119808<=R&&R<120484){var _e=Math.floor((R-119808)/26);return[qt[_e][2],qt[_e][V]]}else if(120782<=R&&R<=120831){var ke=Math.floor((R-120782)/10);return[Wt[ke][2],Wt[ke][V]]}else{if(R===120485||R===120486)return[qt[0][2],qt[0][V]];if(120486<R&&R<120782)return["",""];throw new g("Unsupported character: "+u)}},un=[[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]],gn=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Fn=function(u,f){return f.size<2?u:un[u-1][f.size-1]},Pn=function(){function Z(f){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=f.style,this.color=f.color,this.size=f.size||Z.BASESIZE,this.textSize=f.textSize||this.size,this.phantom=!!f.phantom,this.font=f.font||"",this.fontFamily=f.fontFamily||"",this.fontWeight=f.fontWeight||"",this.fontShape=f.fontShape||"",this.sizeMultiplier=gn[this.size-1],this.maxSize=f.maxSize,this.minRuleThickness=f.minRuleThickness,this._fontMetrics=void 0}var u=Z.prototype;return u.extend=function(m){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 R in m)m.hasOwnProperty(R)&&(y[R]=m[R]);return new Z(y)},u.havingStyle=function(m){return this.style===m?this:this.extend({style:m,size:Fn(this.textSize,m)})},u.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},u.havingSize=function(m){return this.size===m&&this.textSize===m?this:this.extend({style:this.style.text(),size:m,textSize:m,sizeMultiplier:gn[m-1]})},u.havingBaseStyle=function(m){m=m||this.style.text();var y=Fn(Z.BASESIZE,m);return this.size===y&&this.textSize===Z.BASESIZE&&this.style===m?this:this.extend({style:m,size:y})},u.havingBaseSizing=function(){var m;switch(this.style.id){case 4:case 5:m=3;break;case 6:case 7:m=1;break;default:m=6}return this.extend({style:this.style.text(),size:m})},u.withColor=function(m){return this.extend({color:m})},u.withPhantom=function(){return this.extend({phantom:!0})},u.withFont=function(m){return this.extend({font:m})},u.withTextFontFamily=function(m){return this.extend({fontFamily:m,font:""})},u.withTextFontWeight=function(m){return this.extend({fontWeight:m,font:""})},u.withTextFontShape=function(m){return this.extend({fontShape:m,font:""})},u.sizingClasses=function(m){return m.size!==this.size?["sizing","reset-size"+m.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=nt(this.size)),this._fontMetrics},u.getColor=function(){return this.phantom?"transparent":this.color},Z}();Pn.BASESIZE=6;var bn=Pn,On={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},Sn={ex:!0,em:!0,mu:!0},Qn=function(u){return typeof u!="string"&&(u=u.unit),u in On||u in Sn||u==="ex"},rt=function(u,f){var m;if(u.unit in On)m=On[u.unit]/f.fontMetrics().ptPerEm/f.sizeMultiplier;else if(u.unit==="mu")m=f.fontMetrics().cssEmPerMu;else{var y;if(f.style.isTight()?y=f.havingStyle(f.style.text()):y=f,u.unit==="ex")m=y.fontMetrics().xHeight;else if(u.unit==="em")m=y.fontMetrics().quad;else throw new g("Invalid unit: '"+u.unit+"'");y!==f&&(m*=y.sizeMultiplier/f.sizeMultiplier)}return Math.min(u.number*m,f.maxSize)},ht=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],Nt=function(u,f,m){return Je[m][u]&&Je[m][u].replace&&(u=Je[m][u].replace),{value:u,metrics:St(u,f,m)}},At=function(u,f,m,y,R){var V=Nt(u,f,m),_e=V.metrics;u=V.value;var ke;if(_e){var et=_e.italic;(m==="text"||y&&y.font==="mathit")&&(et=0),ke=new fe(u,_e.height,_e.depth,et,_e.skew,_e.width,R)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+u+"' in style '"+f+"' and mode '"+m+"'")),ke=new fe(u,0,0,0,0,0,R);if(y){ke.maxFontSize=y.sizeMultiplier,y.style.isTight()&&ke.classes.push("mtight");var ft=y.getColor();ft&&(ke.style.color=ft)}return ke},Pt=function(u,f,m,y){return y===void 0&&(y=[]),m.font==="boldsymbol"&&Nt(u,"Main-Bold",f).metrics?At(u,"Main-Bold",f,m,y.concat(["mathbf"])):u==="\\"||Je[f][u].font==="main"?At(u,"Main-Regular",f,m,y):At(u,"AMS-Regular",f,m,y.concat(["amsrm"]))},$t=function(u,f,m,y){return/[0-9]/.test(u.charAt(0))||G.contains(ht,u)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Zt=function(u,f,m,y){return G.contains(ht,u)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(u.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},tn=function(u,f,m,y){return Nt(u,"Math-BoldItalic",f).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},dn=function(u,f,m){var y=u.mode,R=u.text,V=["mord"],_e=y==="math"||y==="text"&&f.font,ke=_e?f.font:f.fontFamily;if(R.charCodeAt(0)===55349){var et=Qt(R,y),ft=et[0],It=et[1];return At(R,ft,y,f,V.concat(It))}else if(ke){var jt,nn;if(ke==="boldsymbol"||ke==="mathnormal"){var ln=ke==="boldsymbol"?tn(R,y,f,V):Zt(R,y,f,V);jt=ln.fontName,nn=[ln.fontClass]}else G.contains(ht,R)?(jt="Main-Italic",nn=["mathit"]):_e?(jt=In[ke].fontName,nn=[ke]):(jt=or(ke,f.fontWeight,f.fontShape),nn=[ke,f.fontWeight,f.fontShape]);if(Nt(R,jt,y).metrics)return At(R,jt,y,f,V.concat(nn));if(it.hasOwnProperty(R)&&jt.substr(0,10)==="Typewriter"){for(var vn=[],$n=0;$n<R.length;$n++)vn.push(At(R[$n],jt,y,f,V.concat(nn)));return on(vn)}}if(m==="mathord"){var jn=$t(R,y,f,V);return At(R,jn.fontName,y,f,V.concat([jn.fontClass]))}else if(m==="textord"){var ir=Je[y][R]&&Je[y][R].font;if(ir==="ams"){var ur=or("amsrm",f.fontWeight,f.fontShape);return At(R,ur,y,f,V.concat("amsrm",f.fontWeight,f.fontShape))}else if(ir==="main"||!ir){var jr=or("textrm",f.fontWeight,f.fontShape);return At(R,jr,y,f,V.concat(f.fontWeight,f.fontShape))}else{var Or=or(ir,f.fontWeight,f.fontShape);return At(R,Or,y,f,V.concat(Or,f.fontWeight,f.fontShape))}}else throw new Error("unexpected type: "+m+" in makeOrd")},fn=function(u,f){if(lt(u.classes)!==lt(f.classes)||u.skew!==f.skew||u.maxFontSize!==f.maxFontSize)return!1;for(var m in u.style)if(u.style.hasOwnProperty(m)&&u.style[m]!==f.style[m])return!1;for(var y in f.style)if(f.style.hasOwnProperty(y)&&u.style[y]!==f.style[y])return!1;return!0},wn=function(u){for(var f=0;f<u.length-1;f++){var m=u[f],y=u[f+1];m instanceof fe&&y instanceof fe&&fn(m,y)&&(m.text+=y.text,m.height=Math.max(m.height,y.height),m.depth=Math.max(m.depth,y.depth),m.italic=y.italic,u.splice(f+1,1),f--)}return u},cn=function(u){for(var f=0,m=0,y=0,R=0;R<u.children.length;R++){var V=u.children[R];V.height>f&&(f=V.height),V.depth>m&&(m=V.depth),V.maxFontSize>y&&(y=V.maxFontSize)}u.height=f,u.depth=m,u.maxFontSize=y},an=function(u,f,m,y){var R=new We(u,f,m,y);return cn(R),R},mn=function(u,f,m,y){return new We(u,f,m,y)},Xn=function(u,f,m){var y=an([u],[],f);return y.height=Math.max(m||f.fontMetrics().defaultRuleThickness,f.minRuleThickness),y.style.borderBottomWidth=y.height+"em",y.maxFontSize=1,y},Jn=function(u,f,m,y){var R=new De(u,f,m,y);return cn(R),R},on=function(u){var f=new Le(u);return cn(f),f},kn=function(u,f){return u instanceof Le?an([],[u],f):u},rr=function(u){if(u.positionType==="individualShift"){for(var f=u.children,m=[f[0]],y=-f[0].shift-f[0].elem.depth,R=y,V=1;V<f.length;V++){var _e=-f[V].shift-R-f[V].elem.depth,ke=_e-(f[V-1].elem.height+f[V-1].elem.depth);R=R+_e,m.push({type:"kern",size:ke}),m.push(f[V])}return{children:m,depth:y}}var et;if(u.positionType==="top"){for(var ft=u.positionData,It=0;It<u.children.length;It++){var jt=u.children[It];ft-=jt.type==="kern"?jt.size:jt.elem.height+jt.elem.depth}et=ft}else if(u.positionType==="bottom")et=-u.positionData;else{var nn=u.children[0];if(nn.type!=="elem")throw new Error('First child must have type "elem".');if(u.positionType==="shift")et=-nn.elem.depth-u.positionData;else if(u.positionType==="firstBaseline")et=-nn.elem.depth;else throw new Error("Invalid positionType "+u.positionType+".")}return{children:u.children,depth:et}},Hn=function(u,f){for(var m=rr(u),y=m.children,R=m.depth,V=0,_e=0;_e<y.length;_e++){var ke=y[_e];if(ke.type==="elem"){var et=ke.elem;V=Math.max(V,et.maxFontSize,et.height)}}V+=2;var ft=an(["pstrut"],[]);ft.style.height=V+"em";for(var It=[],jt=R,nn=R,ln=R,vn=0;vn<y.length;vn++){var $n=y[vn];if($n.type==="kern")ln+=$n.size;else{var jn=$n.elem,ir=$n.wrapperClasses||[],ur=$n.wrapperStyle||{},jr=an(ir,[ft,jn],void 0,ur);jr.style.top=-V-ln-jn.depth+"em",$n.marginLeft&&(jr.style.marginLeft=$n.marginLeft),$n.marginRight&&(jr.style.marginRight=$n.marginRight),It.push(jr),ln+=jn.height+jn.depth}jt=Math.min(jt,ln),nn=Math.max(nn,ln)}var Or=an(["vlist"],It);Or.style.height=nn+"em";var Hr;if(jt<0){var Kr=an([],[]),$r=an(["vlist"],[Kr]);$r.style.height=-jt+"em";var Di=an(["vlist-s"],[new fe("\u200B")]);Hr=[an(["vlist-r"],[Or,Di]),an(["vlist-r"],[$r])]}else Hr=[an(["vlist-r"],[Or])];var Yr=an(["vlist-t"],Hr);return Hr.length===2&&Yr.classes.push("vlist-t2"),Yr.height=nn,Yr.depth=-jt,Yr},zn=function(u,f){var m=an(["mspace"],[],f),y=rt(u,f);return m.style.marginRight=y+"em",m},or=function(u,f,m){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 R;return f==="textbf"&&m==="textit"?R="BoldItalic":f==="textbf"?R="Bold":f==="textit"?R="Italic":R="Regular",y+"-"+R},In={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"}},Kn={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},lr=function(u,f){var m=Kn[u],y=m[0],R=m[1],V=m[2],_e=new Be(y),ke=new ve([_e],{width:R+"em",height:V+"em",style:"width:"+R+"em",viewBox:"0 0 "+1e3*R+" "+1e3*V,preserveAspectRatio:"xMinYMin"}),et=mn(["overlay"],[ke],f);return et.height=V,et.style.height=V+"em",et.style.width=R+"em",et},Tt={fontMap:In,makeSymbol:At,mathsym:Pt,makeSpan:an,makeSvgSpan:mn,makeLineSpan:Xn,makeAnchor:Jn,makeFragment:on,wrapFragment:kn,makeVList:Hn,makeOrd:dn,makeGlue:zn,staticSvg:lr,svgData:Kn,tryCombineChars:wn};function Tn(Z,u){var f=er(Z,u);if(!f)throw new Error("Expected node of type "+u+", but got "+(Z?"node of type "+Z.type:String(Z)));return f}function er(Z,u){return Z&&Z.type===u?Z:null}function mr(Z,u){var f=Cr(Z,u);if(!f)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 f}function Cr(Z,u){return Z&&Z.type==="atom"&&Z.family===u?Z:null}function Er(Z){var u=xr(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 xr(Z){return Z&&(Z.type==="atom"||pt.hasOwnProperty(Z.type))?Z:null}var Mn={number:3,unit:"mu"},Ln={number:4,unit:"mu"},yr={number:5,unit:"mu"},cr={mord:{mop:Mn,mbin:Ln,mrel:yr,minner:Mn},mop:{mord:Mn,mop:Mn,mrel:yr,minner:Mn},mbin:{mord:Ln,mop:Ln,mopen:Ln,minner:Ln},mrel:{mord:yr,mop:yr,mopen:yr,minner:yr},mopen:{},mclose:{mop:Mn,mbin:Ln,mrel:yr,minner:Mn},mpunct:{mord:Mn,mop:Mn,mrel:yr,mopen:Mn,mclose:Mn,mpunct:Mn,minner:Mn},minner:{mord:Mn,mop:Mn,mbin:Ln,mrel:yr,mopen:Mn,mpunct:Mn,minner:Mn}},dr={mord:{mop:Mn},mop:{mord:Mn,mop:Mn},mbin:{},mrel:{},mopen:{},mclose:{mop:Mn},mpunct:{},minner:{mop:Mn}},xi={},ei={},Ar={};function xn(Z){for(var u=Z.type,f=Z.names,m=Z.props,y=Z.handler,R=Z.htmlBuilder,V=Z.mathmlBuilder,_e={type:u,numArgs:m.numArgs,argTypes:m.argTypes,greediness:m.greediness===void 0?1:m.greediness,allowedInText:!!m.allowedInText,allowedInMath:m.allowedInMath===void 0?!0:m.allowedInMath,numOptionalArgs:m.numOptionalArgs||0,infix:!!m.infix,handler:y},ke=0;ke<f.length;++ke)xi[f[ke]]=_e;u&&(R&&(ei[u]=R),V&&(Ar[u]=V))}function fr(Z){var u=Z.type,f=Z.htmlBuilder,m=Z.mathmlBuilder;xn({type:u,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:f,mathmlBuilder:m})}var pr=function(u){var f=er(u,"ordgroup");return f?f.body:[u]},Xr=Tt.makeSpan,ai=["leftmost","mbin","mopen","mrel","mop","mpunct"],kr=["rightmost","mrel","mclose","mpunct"],Ur={display:b.DISPLAY,text:b.TEXT,script:b.SCRIPT,scriptscript:b.SCRIPTSCRIPT},Rr={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},hr=function(u,f,m,y){y===void 0&&(y=[null,null]);for(var R=[],V=0;V<u.length;V++){var _e=nr(u[V],f);if(_e instanceof Le){var ke=_e.children;R.push.apply(R,ke)}else R.push(_e)}if(!m)return R;var et=f;if(u.length===1){var ft=er(u[0],"sizing")||er(u[0],"styling");ft&&(ft.type==="sizing"?et=f.havingSize(ft.size):ft.type==="styling"&&(et=f.havingStyle(Ur[ft.style])))}var It=Xr([y[0]||"leftmost"],[],f),jt=Xr([y[1]||"rightmost"],[],f);return hi(R,function(nn,ln){var vn=ln.classes[0],$n=nn.classes[0];vn==="mbin"&&G.contains(kr,$n)?ln.classes[0]="mord":$n==="mbin"&&G.contains(ai,vn)&&(nn.classes[0]="mord")},{node:It},jt),hi(R,function(nn,ln){var vn=oi(ln),$n=oi(nn),jn=vn&&$n?nn.hasClass("mtight")?dr[vn][$n]:cr[vn][$n]:null;if(jn)return Tt.makeGlue(jn,et)},{node:It},jt),R},hi=function Z(u,f,m,y){y&&u.push(y);for(var R=0;R<u.length;R++){var V=u[R],_e=Gr(V);if(_e){Z(_e.children,f,m);continue}if(V.classes[0]!=="mspace"){var ke=f(V,m.node);ke&&(m.insertAfter?m.insertAfter(ke):(u.unshift(ke),R++)),m.node=V,m.insertAfter=function(et){return function(ft){u.splice(et+1,0,ft),R++}}(R)}}y&&u.pop()},Gr=function(u){return u instanceof Le||u instanceof De?u:null},ri=function Z(u,f){var m=Gr(u);if(m){var y=m.children;if(y.length){if(f==="right")return Z(y[y.length-1],"right");if(f==="left")return Z(y[0],"left")}}return u},oi=function(u,f){return u?(f&&(u=ri(u,f)),Rr[u.classes[0]]||null):null},ti=function(u,f){var m=["nulldelimiter"].concat(u.baseSizingClasses());return Xr(f.concat(m))},nr=function(u,f,m){if(!u)return Xr();if(ei[u.type]){var y=ei[u.type](u,f);if(m&&f.size!==m.size){y=Xr(f.sizingClasses(m),[y],f);var R=f.sizeMultiplier/m.sizeMultiplier;y.height*=R,y.depth*=R}return y}else throw new g("Got group of unknown type: '"+u.type+"'")};function fi(Z,u){var f=Xr(["base"],Z,u),m=Xr(["strut"]);return m.style.height=f.height+f.depth+"em",m.style.verticalAlign=-f.depth+"em",f.children.unshift(m),f}function mi(Z,u){var f=null;Z.length===1&&Z[0].type==="tag"&&(f=Z[0].tag,Z=Z[0].body);for(var m=hr(Z,u,!0),y=[],R=[],V=0;V<m.length;V++)if(R.push(m[V]),m[V].hasClass("mbin")||m[V].hasClass("mrel")||m[V].hasClass("allowbreak")){for(var _e=!1;V<m.length-1&&m[V+1].hasClass("mspace")&&!m[V+1].hasClass("newline");)V++,R.push(m[V]),m[V].hasClass("nobreak")&&(_e=!0);_e||(y.push(fi(R,u)),R=[])}else m[V].hasClass("newline")&&(R.pop(),R.length>0&&(y.push(fi(R,u)),R=[]),y.push(m[V]));R.length>0&&y.push(fi(R,u));var ke;f&&(ke=fi(hr(f,u,!0)),ke.classes=["tag"],y.push(ke));var et=Xr(["katex-html"],y);if(et.setAttribute("aria-hidden","true"),ke){var ft=ke.children[0];ft.style.height=et.height+et.depth+"em",ft.style.verticalAlign=-et.depth+"em"}return et}function vi(Z){return new Le(Z)}var Wr=function(){function Z(f,m){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=f,this.attributes={},this.children=m||[]}var u=Z.prototype;return u.setAttribute=function(m,y){this.attributes[m]=y},u.getAttribute=function(m){return this.attributes[m]},u.toNode=function(){var m=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&m.setAttribute(y,this.attributes[y]);for(var R=0;R<this.children.length;R++)m.appendChild(this.children[R].toNode());return m},u.toMarkup=function(){var m="<"+this.type;for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&(m+=" "+y+'="',m+=G.escape(this.attributes[y]),m+='"');m+=">";for(var R=0;R<this.children.length;R++)m+=this.children[R].toMarkup();return m+="</"+this.type+">",m},u.toText=function(){return this.children.map(function(m){return m.toText()}).join("")},Z}(),Vn=function(){function Z(f){this.text=void 0,this.text=f}var u=Z.prototype;return u.toNode=function(){return document.createTextNode(this.text)},u.toMarkup=function(){return G.escape(this.toText())},u.toText=function(){return this.text},Z}(),Oi=function(){function Z(f){this.width=void 0,this.character=void 0,this.width=f,f>=.05555&&f<=.05556?this.character="\u200A":f>=.1666&&f<=.1667?this.character="\u2009":f>=.2222&&f<=.2223?this.character="\u2005":f>=.2777&&f<=.2778?this.character="\u2005\u200A":f>=-.05556&&f<=-.05555?this.character="\u200A\u2063":f>=-.1667&&f<=-.1666?this.character="\u2009\u2063":f>=-.2223&&f<=-.2222?this.character="\u205F\u2063":f>=-.2778&&f<=-.2777?this.character="\u2005\u2063":this.character=null}var u=Z.prototype;return u.toNode=function(){if(this.character)return document.createTextNode(this.character);var m=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return m.setAttribute("width",this.width+"em"),m},u.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+this.width+'em"/>'},u.toText=function(){return this.character?this.character:" "},Z}(),rn={MathNode:Wr,TextNode:Vn,SpaceNode:Oi,newDocumentFragment:vi},Vr=function(u,f,m){return Je[f][u]&&Je[f][u].replace&&u.charCodeAt(0)!==55349&&!(it.hasOwnProperty(u)&&m&&(m.fontFamily&&m.fontFamily.substr(4,2)==="tt"||m.font&&m.font.substr(4,2)==="tt"))&&(u=Je[f][u].replace),new rn.TextNode(u)},Ii=function(u){return u.length===1?u[0]:new rn.MathNode("mrow",u)},pi=function(u,f){if(f.fontFamily==="texttt")return"monospace";if(f.fontFamily==="textsf")return f.fontShape==="textit"&&f.fontWeight==="textbf"?"sans-serif-bold-italic":f.fontShape==="textit"?"sans-serif-italic":f.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(f.fontShape==="textit"&&f.fontWeight==="textbf")return"bold-italic";if(f.fontShape==="textit")return"italic";if(f.fontWeight==="textbf")return"bold";var m=f.font;if(!m||m==="mathnormal")return null;var y=u.mode;if(m==="mathit")return"italic";if(m==="boldsymbol")return"bold-italic";if(m==="mathbf")return"bold";if(m==="mathbb")return"double-struck";if(m==="mathfrak")return"fraktur";if(m==="mathscr"||m==="mathcal")return"script";if(m==="mathsf")return"sans-serif";if(m==="mathtt")return"monospace";var R=u.text;if(G.contains(["\\imath","\\jmath"],R))return null;Je[y][R]&&Je[y][R].replace&&(R=Je[y][R].replace);var V=Tt.fontMap[m].fontName;return St(R,V,y)?Tt.fontMap[m].variant:null},Br=function(u,f,m){if(u.length===1){var y=Gn(u[0],f);return m&&y instanceof Wr&&y.type==="mo"&&(y.setAttribute("lspace","0em"),y.setAttribute("rspace","0em")),[y]}for(var R=[],V,_e=0;_e<u.length;_e++){var ke=Gn(u[_e],f);if(ke instanceof Wr&&V instanceof Wr){if(ke.type==="mtext"&&V.type==="mtext"&&ke.getAttribute("mathvariant")===V.getAttribute("mathvariant")){var et;(et=V.children).push.apply(et,ke.children);continue}else if(ke.type==="mn"&&V.type==="mn"){var ft;(ft=V.children).push.apply(ft,ke.children);continue}else if(ke.type==="mi"&&ke.children.length===1&&V.type==="mn"){var It=ke.children[0];if(It instanceof Vn&&It.text==="."){var jt;(jt=V.children).push.apply(jt,ke.children);continue}}else if(V.type==="mi"&&V.children.length===1){var nn=V.children[0];if(nn instanceof Vn&&nn.text==="\u0338"&&(ke.type==="mo"||ke.type==="mi"||ke.type==="mn")){var ln=ke.children[0];ln instanceof Vn&&ln.text.length>0&&(ln.text=ln.text.slice(0,1)+"\u0338"+ln.text.slice(1),R.pop())}}}R.push(ke),V=ke}return R},li=function(u,f,m){return Ii(Br(u,f,m))},Gn=function(u,f){if(!u)return new rn.MathNode("mrow");if(Ar[u.type]){var m=Ar[u.type](u,f);return m}else throw new g("Got group of unknown type: '"+u.type+"'")};function Qr(Z,u,f,m){var y=Br(Z,f),R;y.length===1&&y[0]instanceof Wr&&G.contains(["mrow","mtable"],y[0].type)?R=y[0]:R=new rn.MathNode("mrow",y);var V=new rn.MathNode("annotation",[new rn.TextNode(u)]);V.setAttribute("encoding","application/x-tex");var _e=new rn.MathNode("semantics",[R,V]),ke=new rn.MathNode("math",[_e]);ke.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var et=m?"katex":"katex-mathml";return Tt.makeSpan([et],[ke])}var gi=function(u){return new bn({style:u.displayMode?b.DISPLAY:b.TEXT,maxSize:u.maxSize,minRuleThickness:u.minRuleThickness})},ni=function(u,f){if(f.displayMode){var m=["katex-display"];f.leqno&&m.push("leqno"),f.fleqn&&m.push("fleqn"),u=Tt.makeSpan(m,[u])}return u},Dr=function(u,f,m){var y=gi(m),R;if(m.output==="mathml")return Qr(u,f,y,!0);if(m.output==="html"){var V=mi(u,y);R=Tt.makeSpan(["katex"],[V])}else{var _e=Qr(u,f,y,!1),ke=mi(u,y);R=Tt.makeSpan(["katex"],[_e,ke])}return ni(R,m)},Pr=function(u,f,m){var y=gi(m),R=mi(u,y),V=Tt.makeSpan(["katex"],[R]);return ni(V,m)},Zr=Dr,ii={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB"},wi=function(u){var f=new rn.MathNode("mo",[new rn.TextNode(ii[u.substr(1)])]);return f.setAttribute("stretchy","true"),f},ui={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},zi=function(u){return u.type==="ordgroup"?u.body.length:1},Gi=function(u,f){function m(){var ke=4e5,et=u.label.substr(1);if(G.contains(["widehat","widecheck","widetilde","utilde"],et)){var ft=u,It=zi(ft.base),jt,nn,ln;if(It>5)et==="widehat"||et==="widecheck"?(jt=420,ke=2364,ln=.42,nn=et+"4"):(jt=312,ke=2340,ln=.34,nn="tilde4");else{var vn=[1,1,2,2,3,3][It];et==="widehat"||et==="widecheck"?(ke=[0,1062,2364,2364,2364][vn],jt=[0,239,300,360,420][vn],ln=[0,.24,.3,.3,.36,.42][vn],nn=et+vn):(ke=[0,600,1033,2339,2340][vn],jt=[0,260,286,306,312][vn],ln=[0,.26,.286,.3,.306,.34][vn],nn="tilde"+vn)}var $n=new Be(nn),jn=new ve([$n],{width:"100%",height:ln+"em",viewBox:"0 0 "+ke+" "+jt,preserveAspectRatio:"none"});return{span:Tt.makeSvgSpan([],[jn],f),minWidth:0,height:ln}}else{var ir=[],ur=ui[et],jr=ur[0],Or=ur[1],Hr=ur[2],Kr=Hr/1e3,$r=jr.length,Di,Yr;if($r===1){var _t=ur[3];Di=["hide-tail"],Yr=[_t]}else if($r===2)Di=["halfarrow-left","halfarrow-right"],Yr=["xMinYMin","xMaxYMin"];else if($r===3)Di=["brace-left","brace-center","brace-right"],Yr=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
`+$r+" children.");for(var $i=0;$i<$r;$i++){var Ji=new Be(jr[$i]),Zi=new ve([Ji],{width:"400em",height:Kr+"em",viewBox:"0 0 "+ke+" "+Hr,preserveAspectRatio:Yr[$i]+" slice"}),ci=Tt.makeSvgSpan([Di[$i]],[Zi],f);if($r===1)return{span:ci,minWidth:Or,height:Kr};ci.style.height=Kr+"em",ir.push(ci)}return{span:Tt.makeSpan(["stretchy"],ir,f),minWidth:Or,height:Kr}}}var y=m(),R=y.span,V=y.minWidth,_e=y.height;return R.height=_e,R.style.height=_e+"em",V>0&&(R.style.minWidth=V+"em"),R},Mi=function(u,f,m,y){var R,V=u.height+u.depth+2*m;if(/fbox|color/.test(f)){if(R=Tt.makeSpan(["stretchy",f],[],y),f==="fbox"){var _e=y.color&&y.getColor();_e&&(R.style.borderColor=_e)}}else{var ke=[];/^[bx]cancel$/.test(f)&&ke.push(new qe({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(f)&&ke.push(new qe({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var et=new ve(ke,{width:"100%",height:V+"em"});R=Tt.makeSvgSpan([],[et],y)}return R.height=V,R.style.height=V+"em",R},_i={encloseSpan:Mi,mathMLnode:wi,svgSpan:Gi},Cn=function(u,f){var m,y,R=er(u,"supsub"),V;R?(y=Tn(R.base,"accent"),m=y.base,R.base=m,V=ct(nr(R,f)),R.base=y):(y=Tn(u,"accent"),m=y.base);var _e=nr(m,f.havingCrampedStyle()),ke=y.isShifty&&G.isCharacterBox(m),et=0;if(ke){var ft=G.getBaseElem(m),It=nr(ft,f.havingCrampedStyle());et=at(It).skew}var jt=Math.min(_e.height,f.fontMetrics().xHeight),nn;if(y.isStretchy)nn=_i.svgSpan(y,f),nn=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:_e},{type:"elem",elem:nn,wrapperClasses:["svg-align"],wrapperStyle:et>0?{width:"calc(100% - "+2*et+"em)",marginLeft:2*et+"em"}:void 0}]},f);else{var ln,vn;y.label==="\\vec"?(ln=Tt.staticSvg("vec",f),vn=Tt.svgData.vec[1]):(ln=Tt.makeOrd({mode:y.mode,text:y.label},f,"textord"),ln=at(ln),ln.italic=0,vn=ln.width),nn=Tt.makeSpan(["accent-body"],[ln]);var $n=y.label==="\\textcircled";$n&&(nn.classes.push("accent-full"),jt=_e.height);var jn=et;$n||(jn-=vn/2),nn.style.left=jn+"em",y.label==="\\textcircled"&&(nn.style.top=".2em"),nn=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:_e},{type:"kern",size:-jt},{type:"elem",elem:nn}]},f)}var ir=Tt.makeSpan(["mord","accent"],[nn],f);return V?(V.children[0]=ir,V.height=Math.max(ir.height,V.height),V.classes[0]="mord",V):ir},Zn=function(u,f){var m=u.isStretchy?_i.mathMLnode(u.label):new rn.MathNode("mo",[Vr(u.label,u.mode)]),y=new rn.MathNode("mover",[Gn(u.base,f),m]);return y.setAttribute("accent","true"),y},br=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(Z){return"\\"+Z}).join("|"));xn({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(u,f){var m=f[0],y=!br.test(u.funcName),R=!y||u.funcName==="\\widehat"||u.funcName==="\\widetilde"||u.funcName==="\\widecheck";return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:y,isShifty:R,base:m}},htmlBuilder:Cn,mathmlBuilder:Zn}),xn({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(u,f){var m=f[0];return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:!1,isShifty:!0,base:m}},htmlBuilder:Cn,mathmlBuilder:Zn}),xn({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(u,f){var m=u.parser,y=u.funcName,R=f[0];return{type:"accentUnder",mode:m.mode,label:y,base:R}},htmlBuilder:function(u,f){var m=nr(u.base,f),y=_i.svgSpan(u,f),R=u.label==="\\utilde"?.12:0,V=Tt.makeVList({positionType:"bottom",positionData:y.height+R,children:[{type:"elem",elem:y,wrapperClasses:["svg-align"]},{type:"kern",size:R},{type:"elem",elem:m}]},f);return Tt.makeSpan(["mord","accentunder"],[V],f)},mathmlBuilder:function(u,f){var m=_i.mathMLnode(u.label),y=new rn.MathNode("munder",[Gn(u.base,f),m]);return y.setAttribute("accentunder","true"),y}});var qn=function(u){var f=new rn.MathNode("mpadded",u?[u]:[]);return f.setAttribute("width","+0.6em"),f.setAttribute("lspace","0.3em"),f};xn({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,f,m){var y=u.parser,R=u.funcName;return{type:"xArrow",mode:y.mode,label:R,body:f[0],below:m[0]}},htmlBuilder:function(u,f){var m=f.style,y=f.havingStyle(m.sup()),R=Tt.wrapFragment(nr(u.body,y,f),f);R.classes.push("x-arrow-pad");var V;u.below&&(y=f.havingStyle(m.sub()),V=Tt.wrapFragment(nr(u.below,y,f),f),V.classes.push("x-arrow-pad"));var _e=_i.svgSpan(u,f),ke=-f.fontMetrics().axisHeight+.5*_e.height,et=-f.fontMetrics().axisHeight-.5*_e.height-.111;(R.depth>.25||u.label==="\\xleftequilibrium")&&(et-=R.depth);var ft;if(V){var It=-f.fontMetrics().axisHeight+V.height+.5*_e.height+.111;ft=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:R,shift:et},{type:"elem",elem:_e,shift:ke},{type:"elem",elem:V,shift:It}]},f)}else ft=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:R,shift:et},{type:"elem",elem:_e,shift:ke}]},f);return ft.children[0].children[0].children[1].classes.push("svg-align"),Tt.makeSpan(["mrel","x-arrow"],[ft],f)},mathmlBuilder:function(u,f){var m=_i.mathMLnode(u.label),y;if(u.body){var R=qn(Gn(u.body,f));if(u.below){var V=qn(Gn(u.below,f));y=new rn.MathNode("munderover",[m,V,R])}else y=new rn.MathNode("mover",[m,R])}else if(u.below){var _e=qn(Gn(u.below,f));y=new rn.MathNode("munder",[m,_e])}else y=qn(),y=new rn.MathNode("mover",[m,y]);return y}}),xn({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){for(var m=u.parser,y=Tn(f[0],"ordgroup"),R=y.body,V="",_e=0;_e<R.length;_e++){var ke=Tn(R[_e],"textord");V+=ke.text}var et=parseInt(V);if(isNaN(et))throw new g("\\@char has non-numeric argument "+V);return{type:"textord",mode:m.mode,text:String.fromCharCode(et)}}});var sr=function(u,f){var m=hr(u.body,f.withColor(u.color),!1);return Tt.makeFragment(m)},Ei=function(u,f){var m=Br(u.body,f.withColor(u.color)),y=new rn.MathNode("mstyle",m);return y.setAttribute("mathcolor",u.color),y};xn({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(u,f){var m=u.parser,y=Tn(f[0],"color-token").color,R=f[1];return{type:"color",mode:m.mode,color:y,body:pr(R)}},htmlBuilder:sr,mathmlBuilder:Ei}),xn({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(u,f){var m=u.parser,y=u.breakOnTokenText,R=Tn(f[0],"color-token").color;m.gullet.macros.set("\\current@color",R);var V=m.parseExpression(!0,y);return{type:"color",mode:m.mode,color:R,body:V}},htmlBuilder:sr,mathmlBuilder:Ei}),xn({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,f,m){var y=u.parser,R=u.funcName,V=m[0],_e=R==="\\cr",ke=!1;return _e||(y.settings.displayMode&&y.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?ke=!1:ke=!0),{type:"cr",mode:y.mode,newLine:ke,newRow:_e,size:V&&Tn(V,"size").value}},htmlBuilder:function(u,f){if(u.newRow)throw new g("\\cr valid only within a tabular/array environment");var m=Tt.makeSpan(["mspace"],[],f);return u.newLine&&(m.classes.push("newline"),u.size&&(m.style.marginTop=rt(u.size,f)+"em")),m},mathmlBuilder:function(u,f){var m=new rn.MathNode("mspace");return u.newLine&&(m.setAttribute("linebreak","newline"),u.size&&m.setAttribute("height",rt(u.size,f)+"em")),m}});var Jr=function(u,f,m){var y=Je.math[u]&&Je.math[u].replace,R=St(y||u,f,m);if(!R)throw new Error("Unsupported symbol "+u+" and font size "+f+".");return R},Ri=function(u,f,m,y){var R=m.havingBaseStyle(f),V=Tt.makeSpan(y.concat(R.sizingClasses(m)),[u],m),_e=R.sizeMultiplier/m.sizeMultiplier;return V.height*=_e,V.depth*=_e,V.maxFontSize=R.sizeMultiplier,V},gr=function(u,f,m){var y=f.havingBaseStyle(m),R=(1-f.sizeMultiplier/y.sizeMultiplier)*f.fontMetrics().axisHeight;u.classes.push("delimcenter"),u.style.top=R+"em",u.height-=R,u.depth+=R},tr=function(u,f,m,y,R,V){var _e=Tt.makeSymbol(u,"Main-Regular",R,y),ke=Ri(_e,f,y,V);return m&&gr(ke,y,f),ke},Lr=function(u,f,m,y){return Tt.makeSymbol(u,"Size"+f+"-Regular",m,y)},Nr=function(u,f,m,y,R,V){var _e=Lr(u,f,R,y),ke=Ri(Tt.makeSpan(["delimsizing","size"+f],[_e],y),b.TEXT,y,V);return m&&gr(ke,y,b.TEXT),ke},qr=function(u,f,m){var y;f==="Size1-Regular"?y="delim-size1":y="delim-size4";var R=Tt.makeSpan(["delimsizinginner",y],[Tt.makeSpan([],[Tt.makeSymbol(u,f,m)])]);return{type:"elem",elem:R}},zr={type:"kern",size:-.005},si=function(u,f,m,y,R,V){var _e,ke,et,ft;_e=et=ft=u,ke=null;var It="Size1-Regular";u==="\\uparrow"?et=ft="\u23D0":u==="\\Uparrow"?et=ft="\u2016":u==="\\downarrow"?_e=et="\u23D0":u==="\\Downarrow"?_e=et="\u2016":u==="\\updownarrow"?(_e="\\uparrow",et="\u23D0",ft="\\downarrow"):u==="\\Updownarrow"?(_e="\\Uparrow",et="\u2016",ft="\\Downarrow"):u==="["||u==="\\lbrack"?(_e="\u23A1",et="\u23A2",ft="\u23A3",It="Size4-Regular"):u==="]"||u==="\\rbrack"?(_e="\u23A4",et="\u23A5",ft="\u23A6",It="Size4-Regular"):u==="\\lfloor"||u==="\u230A"?(et=_e="\u23A2",ft="\u23A3",It="Size4-Regular"):u==="\\lceil"||u==="\u2308"?(_e="\u23A1",et=ft="\u23A2",It="Size4-Regular"):u==="\\rfloor"||u==="\u230B"?(et=_e="\u23A5",ft="\u23A6",It="Size4-Regular"):u==="\\rceil"||u==="\u2309"?(_e="\u23A4",et=ft="\u23A5",It="Size4-Regular"):u==="("||u==="\\lparen"?(_e="\u239B",et="\u239C",ft="\u239D",It="Size4-Regular"):u===")"||u==="\\rparen"?(_e="\u239E",et="\u239F",ft="\u23A0",It="Size4-Regular"):u==="\\{"||u==="\\lbrace"?(_e="\u23A7",ke="\u23A8",ft="\u23A9",et="\u23AA",It="Size4-Regular"):u==="\\}"||u==="\\rbrace"?(_e="\u23AB",ke="\u23AC",ft="\u23AD",et="\u23AA",It="Size4-Regular"):u==="\\lgroup"||u==="\u27EE"?(_e="\u23A7",ft="\u23A9",et="\u23AA",It="Size4-Regular"):u==="\\rgroup"||u==="\u27EF"?(_e="\u23AB",ft="\u23AD",et="\u23AA",It="Size4-Regular"):u==="\\lmoustache"||u==="\u23B0"?(_e="\u23A7",ft="\u23AD",et="\u23AA",It="Size4-Regular"):(u==="\\rmoustache"||u==="\u23B1")&&(_e="\u23AB",ft="\u23A9",et="\u23AA",It="Size4-Regular");var jt=Jr(_e,It,R),nn=jt.height+jt.depth,ln=Jr(et,It,R),vn=ln.height+ln.depth,$n=Jr(ft,It,R),jn=$n.height+$n.depth,ir=0,ur=1;if(ke!==null){var jr=Jr(ke,It,R);ir=jr.height+jr.depth,ur=2}var Or=nn+jn+ir,Hr=Math.max(0,Math.ceil((f-Or)/(ur*vn))),Kr=Or+Hr*ur*vn,$r=y.fontMetrics().axisHeight;m&&($r*=y.sizeMultiplier);var Di=Kr/2-$r,Yr=(Hr+1)*.005-vn,_t=[];if(_t.push(qr(ft,It,R)),ke===null)for(var $i=0;$i<Hr;$i++)_t.push(zr),_t.push(qr(et,It,R));else{for(var Ji=0;Ji<Hr;Ji++)_t.push(zr),_t.push(qr(et,It,R));_t.push({type:"kern",size:Yr}),_t.push(qr(et,It,R)),_t.push(zr),_t.push(qr(ke,It,R));for(var Zi=0;Zi<Hr;Zi++)_t.push(zr),_t.push(qr(et,It,R))}_t.push({type:"kern",size:Yr}),_t.push(qr(et,It,R)),_t.push(zr),_t.push(qr(_e,It,R));var ci=y.havingBaseStyle(b.TEXT),fs=Tt.makeVList({positionType:"bottom",positionData:Di,children:_t},ci);return Ri(Tt.makeSpan(["delimsizing","mult"],[fs],ci),b.TEXT,y,V)},yi=80,ji=.08,bi=function(u,f,m,y,R){var V=Ue(u,y,m),_e=new Be(u,V),ke=new ve([_e],{width:"400em",height:f+"em",viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});return Tt.makeSvgSpan(["hide-tail"],[ke],R)},_s=function(u,f){var m=f.havingBaseSizing(),y=Cs("\\surd",u*m.sizeMultiplier,Hs,m),R=m.sizeMultiplier,V=Math.max(0,f.minRuleThickness-f.fontMetrics().sqrtRuleThickness),_e,ke=0,et=0,ft=0,It;return y.type==="small"?(ft=1e3+1e3*V+yi,u<1?R=1:u<1.4&&(R=.7),ke=(1+V+ji)/R,et=(1+V)/R,_e=bi("sqrtMain",ke,ft,V,f),_e.style.minWidth="0.853em",It=.833/R):y.type==="large"?(ft=(1e3+yi)*Ts[y.size],et=(Ts[y.size]+V)/R,ke=(Ts[y.size]+V+ji)/R,_e=bi("sqrtSize"+y.size,ke,ft,V,f),_e.style.minWidth="1.02em",It=1/R):(ke=u+V+ji,et=u+V,ft=Math.floor(1e3*u+V)+yi,_e=bi("sqrtTall",ke,ft,V,f),_e.style.minWidth="0.742em",It=1.056),_e.height=et,_e.style.height=ke+"em",{span:_e,advanceWidth:It,ruleWidth:(f.fontMetrics().sqrtRuleThickness+V)*R}},cs=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],js=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],ns=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Ts=[0,1.2,1.8,2.4,3],Fi=function(u,f,m,y,R){if(u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle"),G.contains(cs,u)||G.contains(ns,u))return Nr(u,f,!1,m,y,R);if(G.contains(js,u))return si(u,Ts[f],!1,m,y,R);throw new g("Illegal delimiter: '"+u+"'")},aa=[{type:"small",style:b.SCRIPTSCRIPT},{type:"small",style:b.SCRIPT},{type:"small",style:b.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],wa=[{type:"small",style:b.SCRIPTSCRIPT},{type:"small",style:b.SCRIPT},{type:"small",style:b.TEXT},{type:"stack"}],Hs=[{type:"small",style:b.SCRIPTSCRIPT},{type:"small",style:b.SCRIPT},{type:"small",style:b.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],oa=function(u){if(u.type==="small")return"Main-Regular";if(u.type==="large")return"Size"+u.size+"-Regular";if(u.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+u.type+"' here.")},Cs=function(u,f,m,y){for(var R=Math.min(2,3-y.style.size),V=R;V<m.length&&m[V].type!=="stack";V++){var _e=Jr(u,oa(m[V]),"math"),ke=_e.height+_e.depth;if(m[V].type==="small"){var et=y.havingBaseStyle(m[V].style);ke*=et.sizeMultiplier}if(ke>f)return m[V]}return m[m.length-1]},rs=function(u,f,m,y,R,V){u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle");var _e;G.contains(ns,u)?_e=aa:G.contains(cs,u)?_e=Hs:_e=wa;var ke=Cs(u,f,_e,y);return ke.type==="small"?tr(u,ke.style,m,y,R,V):ke.type==="large"?Nr(u,ke.size,m,y,R,V):si(u,f,m,y,R,V)},Ks=function(u,f,m,y,R,V){var _e=y.fontMetrics().axisHeight*y.sizeMultiplier,ke=901,et=5/y.fontMetrics().ptPerEm,ft=Math.max(f-_e,m+_e),It=Math.max(ft/500*ke,2*ft-et);return rs(u,It,!0,y,R,V)},Hi={sqrtImage:_s,sizedDelim:Fi,customSizedDelim:rs,leftRightDelim:Ks},Gs={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},la=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Li(Z,u){var f=xr(Z);if(f&&G.contains(la,f.text))return f;throw new g("Invalid delimiter: '"+(f?f.text:JSON.stringify(Z))+"' after '"+u.funcName+"'",Z)}xn({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1},handler:function(u,f){var m=Li(f[0],u);return{type:"delimsizing",mode:u.parser.mode,size:Gs[u.funcName].size,mclass:Gs[u.funcName].mclass,delim:m.text}},htmlBuilder:function(u,f){return u.delim==="."?Tt.makeSpan([u.mclass]):Hi.sizedDelim(u.delim,u.size,f,u.mode,[u.mclass])},mathmlBuilder:function(u){var f=[];u.delim!=="."&&f.push(Vr(u.delim,u.mode));var m=new rn.MathNode("mo",f);return u.mclass==="mopen"||u.mclass==="mclose"?m.setAttribute("fence","true"):m.setAttribute("fence","false"),m}});function ds(Z){if(!Z.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}xn({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(u,f){var m=u.parser.gullet.macros.get("\\current@color");if(m&&typeof m!="string")throw new g("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:u.parser.mode,delim:Li(f[0],u).text,color:m}}}),xn({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(u,f){var m=Li(f[0],u),y=u.parser;++y.leftrightDepth;var R=y.parseExpression(!1);--y.leftrightDepth,y.expect("\\right",!1);var V=Tn(y.parseFunction(),"leftright-right");return{type:"leftright",mode:y.mode,body:R,left:m.text,right:V.delim,rightColor:V.color}},htmlBuilder:function(u,f){ds(u);for(var m=hr(u.body,f,!0,["mopen","mclose"]),y=0,R=0,V=!1,_e=0;_e<m.length;_e++)m[_e].isMiddle?V=!0:(y=Math.max(m[_e].height,y),R=Math.max(m[_e].depth,R));y*=f.sizeMultiplier,R*=f.sizeMultiplier;var ke;if(u.left==="."?ke=ti(f,["mopen"]):ke=Hi.leftRightDelim(u.left,y,R,f,u.mode,["mopen"]),m.unshift(ke),V)for(var et=1;et<m.length;et++){var ft=m[et],It=ft.isMiddle;It&&(m[et]=Hi.leftRightDelim(It.delim,y,R,It.options,u.mode,[]))}var jt;if(u.right===".")jt=ti(f,["mclose"]);else{var nn=u.rightColor?f.withColor(u.rightColor):f;jt=Hi.leftRightDelim(u.right,y,R,nn,u.mode,["mclose"])}return m.push(jt),Tt.makeSpan(["minner"],m,f)},mathmlBuilder:function(u,f){ds(u);var m=Br(u.body,f);if(u.left!=="."){var y=new rn.MathNode("mo",[Vr(u.left,u.mode)]);y.setAttribute("fence","true"),m.unshift(y)}if(u.right!=="."){var R=new rn.MathNode("mo",[Vr(u.right,u.mode)]);R.setAttribute("fence","true"),u.rightColor&&R.setAttribute("mathcolor",u.rightColor),m.push(R)}return Ii(m)}}),xn({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(u,f){var m=Li(f[0],u);if(!u.parser.leftrightDepth)throw new g("\\middle without preceding \\left",m);return{type:"middle",mode:u.parser.mode,delim:m.text}},htmlBuilder:function(u,f){var m;if(u.delim===".")m=ti(f,[]);else{m=Hi.sizedDelim(u.delim,1,f,u.mode,[]);var y={delim:u.delim,options:f};m.isMiddle=y}return m},mathmlBuilder:function(u,f){var m=u.delim==="\\vert"||u.delim==="|"?Vr("|","text"):Vr(u.delim,u.mode),y=new rn.MathNode("mo",[m]);return y.setAttribute("fence","true"),y.setAttribute("lspace","0.05em"),y.setAttribute("rspace","0.05em"),y}});var ys=function(u,f){var m=Tt.wrapFragment(nr(u.body,f),f),y=u.label.substr(1),R=f.sizeMultiplier,V,_e=0,ke=G.isCharacterBox(u.body);if(y==="sout")V=Tt.makeSpan(["stretchy","sout"]),V.height=f.fontMetrics().defaultRuleThickness/R,_e=-.5*f.fontMetrics().xHeight;else{/cancel/.test(y)?ke||m.classes.push("cancel-pad"):m.classes.push("boxpad");var et=0,ft=0;/box/.test(y)?(ft=Math.max(f.fontMetrics().fboxrule,f.minRuleThickness),et=f.fontMetrics().fboxsep+(y==="colorbox"?0:ft)):et=ke?.2:0,V=_i.encloseSpan(m,y,et,f),/fbox|boxed|fcolorbox/.test(y)&&(V.style.borderStyle="solid",V.style.borderWidth=ft+"em"),_e=m.depth+et,u.backgroundColor&&(V.style.backgroundColor=u.backgroundColor,u.borderColor&&(V.style.borderColor=u.borderColor))}var It;return u.backgroundColor?It=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:V,shift:_e},{type:"elem",elem:m,shift:0}]},f):It=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:m,shift:0},{type:"elem",elem:V,shift:_e,wrapperClasses:/cancel/.test(y)?["svg-align"]:[]}]},f),/cancel/.test(y)&&(It.height=m.height,It.depth=m.depth),/cancel/.test(y)&&!ke?Tt.makeSpan(["mord","cancel-lap"],[It],f):Tt.makeSpan(["mord"],[It],f)},As=function(u,f){var m=0,y=new rn.MathNode(u.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Gn(u.body,f)]);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(m=f.fontMetrics().fboxsep*f.fontMetrics().ptPerEm,y.setAttribute("width","+"+2*m+"pt"),y.setAttribute("height","+"+2*m+"pt"),y.setAttribute("lspace",m+"pt"),y.setAttribute("voffset",m+"pt"),u.label==="\\fcolorbox"){var R=Math.max(f.fontMetrics().fboxrule,f.minRuleThickness);y.setAttribute("style","border: "+R+"em solid "+String(u.borderColor))}break;case"\\xcancel":y.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return u.backgroundColor&&y.setAttribute("mathbackground",u.backgroundColor),y};xn({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(u,f,m){var y=u.parser,R=u.funcName,V=Tn(f[0],"color-token").color,_e=f[1];return{type:"enclose",mode:y.mode,label:R,backgroundColor:V,body:_e}},htmlBuilder:ys,mathmlBuilder:As}),xn({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(u,f,m){var y=u.parser,R=u.funcName,V=Tn(f[0],"color-token").color,_e=Tn(f[1],"color-token").color,ke=f[2];return{type:"enclose",mode:y.mode,label:R,backgroundColor:_e,borderColor:V,body:ke}},htmlBuilder:ys,mathmlBuilder:As}),xn({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(u,f){var m=u.parser;return{type:"enclose",mode:m.mode,label:"\\fbox",body:f[0]}}}),xn({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(u,f,m){var y=u.parser,R=u.funcName,V=f[0];return{type:"enclose",mode:y.mode,label:R,body:V}},htmlBuilder:ys,mathmlBuilder:As});var ua={};function Wi(Z){for(var u=Z.type,f=Z.names,m=Z.props,y=Z.handler,R=Z.htmlBuilder,V=Z.mathmlBuilder,_e={type:u,numArgs:m.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:y},ke=0;ke<f.length;++ke)ua[f[ke]]=_e;R&&(ei[u]=R),V&&(Ar[u]=V)}function ca(Z){var u=[];Z.consumeSpaces();for(var f=Z.fetch().text;f==="\\hline"||f==="\\hdashline";)Z.consume(),u.push(f==="\\hdashline"),Z.consumeSpaces(),f=Z.fetch().text;return u}function is(Z,u,f){var m=u.hskipBeforeAndAfter,y=u.addJot,R=u.cols,V=u.arraystretch,_e=u.colSeparationType;if(Z.gullet.beginGroup(),Z.gullet.macros.set("\\\\","\\cr"),!V){var ke=Z.gullet.expandMacroAsText("\\arraystretch");if(ke==null)V=1;else if(V=parseFloat(ke),!V||V<0)throw new g("Invalid \\arraystretch: "+ke)}Z.gullet.beginGroup();var et=[],ft=[et],It=[],jt=[];for(jt.push(ca(Z));;){var nn=Z.parseExpression(!1,"\\cr");Z.gullet.endGroup(),Z.gullet.beginGroup(),nn={type:"ordgroup",mode:Z.mode,body:nn},f&&(nn={type:"styling",mode:Z.mode,style:f,body:[nn]}),et.push(nn);var ln=Z.fetch().text;if(ln==="&")Z.consume();else if(ln==="\\end"){et.length===1&&nn.type==="styling"&&nn.body[0].body.length===0&&ft.pop(),jt.length<ft.length+1&&jt.push([]);break}else if(ln==="\\cr"){var vn=Tn(Z.parseFunction(),"cr");It.push(vn.size),jt.push(ca(Z)),et=[],ft.push(et)}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:V,body:ft,cols:R,rowGaps:It,hskipBeforeAndAfter:m,hLinesBeforeRow:jt,colSeparationType:_e}}function Ds(Z){return Z.substr(0,1)==="d"?"display":"text"}var Vi=function(u,f){var m,y,R=u.body.length,V=u.hLinesBeforeRow,_e=0,ke=new Array(R),et=[],ft=Math.max(f.fontMetrics().arrayRuleWidth,f.minRuleThickness),It=1/f.fontMetrics().ptPerEm,jt=5*It;if(u.colSeparationType&&u.colSeparationType==="small"){var nn=f.havingStyle(b.SCRIPT).sizeMultiplier;jt=.2778*(nn/f.sizeMultiplier)}var ln=12*It,vn=3*It,$n=u.arraystretch*ln,jn=.7*$n,ir=.3*$n,ur=0;function jr(ea){for(var _a=0;_a<ea.length;++_a)_a>0&&(ur+=.25),et.push({pos:ur,isDashed:ea[_a]})}for(jr(V[0]),m=0;m<u.body.length;++m){var Or=u.body[m],Hr=jn,Kr=ir;_e<Or.length&&(_e=Or.length);var $r=new Array(Or.length);for(y=0;y<Or.length;++y){var Di=nr(Or[y],f);Kr<Di.depth&&(Kr=Di.depth),Hr<Di.height&&(Hr=Di.height),$r[y]=Di}var Yr=u.rowGaps[m],_t=0;Yr&&(_t=rt(Yr,f),_t>0&&(_t+=ir,Kr<_t&&(Kr=_t),_t=0)),u.addJot&&(Kr+=vn),$r.height=Hr,$r.depth=Kr,ur+=Hr,$r.pos=ur,ur+=Kr+_t,ke[m]=$r,jr(V[m+1])}var $i=ur/2+f.fontMetrics().axisHeight,Ji=u.cols||[],Zi=[],ci,fs;for(y=0,fs=0;y<_e||fs<Ji.length;++y,++fs){for(var qi=Ji[fs]||{},lo=!0;qi.type==="separator";){if(lo||(ci=Tt.makeSpan(["arraycolsep"],[]),ci.style.width=f.fontMetrics().doubleRuleSep+"em",Zi.push(ci)),qi.separator==="|"||qi.separator===":"){var No=qi.separator==="|"?"solid":"dashed",Ns=Tt.makeSpan(["vertical-separator"],[],f);Ns.style.height=ur+"em",Ns.style.borderRightWidth=ft+"em",Ns.style.borderRightStyle=No,Ns.style.margin="0 -"+ft/2+"em",Ns.style.verticalAlign=-(ur-$i)+"em",Zi.push(Ns)}else throw new g("Invalid separator type: "+qi.separator);fs++,qi=Ji[fs]||{},lo=!1}if(!(y>=_e)){var Fs=void 0;(y>0||u.hskipBeforeAndAfter)&&(Fs=G.deflt(qi.pregap,jt),Fs!==0&&(ci=Tt.makeSpan(["arraycolsep"],[]),ci.style.width=Fs+"em",Zi.push(ci)));var Yi=[];for(m=0;m<R;++m){var $s=ke[m],qs=$s[y];if(qs){var ga=$s.pos-$i;qs.depth=$s.depth,qs.height=$s.height,Yi.push({type:"elem",elem:qs,shift:ga})}}Yi=Tt.makeVList({positionType:"individualShift",children:Yi},f),Yi=Tt.makeSpan(["col-align-"+(qi.align||"c")],[Yi]),Zi.push(Yi),(y<_e-1||u.hskipBeforeAndAfter)&&(Fs=G.deflt(qi.postgap,jt),Fs!==0&&(ci=Tt.makeSpan(["arraycolsep"],[]),ci.style.width=Fs+"em",Zi.push(ci)))}}if(ke=Tt.makeSpan(["mtable"],Zi),et.length>0){for(var Ui=Tt.makeLineSpan("hline",f,ft),Fo=Tt.makeLineSpan("hdashline",f,ft),va=[{type:"elem",elem:ke,shift:0}];et.length>0;){var Na=et.pop(),uo=Na.pos-$i;Na.isDashed?va.push({type:"elem",elem:Fo,shift:uo}):va.push({type:"elem",elem:Ui,shift:uo})}ke=Tt.makeVList({positionType:"individualShift",children:va},f)}return Tt.makeSpan(["mord"],[ke],f)},Ws={c:"center ",l:"left ",r:"right "},wr=function(u,f){var m=new rn.MathNode("mtable",u.body.map(function(ur){return new rn.MathNode("mtr",ur.map(function(jr){return new rn.MathNode("mtd",[Gn(jr,f)])}))})),y=u.arraystretch===.5?.1:.16+u.arraystretch-1+(u.addJot?.09:0);m.setAttribute("rowspacing",y+"em");var R="",V="";if(u.cols){var _e=u.cols,ke="",et=!1,ft=0,It=_e.length;_e[0].type==="separator"&&(R+="top ",ft=1),_e[_e.length-1].type==="separator"&&(R+="bottom ",It-=1);for(var jt=ft;jt<It;jt++)_e[jt].type==="align"?(V+=Ws[_e[jt].align],et&&(ke+="none "),et=!0):_e[jt].type==="separator"&&et&&(ke+=_e[jt].separator==="|"?"solid ":"dashed ",et=!1);m.setAttribute("columnalign",V.trim()),/[sd]/.test(ke)&&m.setAttribute("columnlines",ke.trim())}if(u.colSeparationType==="align"){for(var nn=u.cols||[],ln="",vn=1;vn<nn.length;vn++)ln+=vn%2?"0em ":"1em ";m.setAttribute("columnspacing",ln.trim())}else u.colSeparationType==="alignat"?m.setAttribute("columnspacing","0em"):u.colSeparationType==="small"?m.setAttribute("columnspacing","0.2778em"):m.setAttribute("columnspacing","1em");var $n="",jn=u.hLinesBeforeRow;R+=jn[0].length>0?"left ":"",R+=jn[jn.length-1].length>0?"right ":"";for(var ir=1;ir<jn.length-1;ir++)$n+=jn[ir].length===0?"none ":jn[ir][0]?"dashed ":"solid ";return/[sd]/.test($n)&&m.setAttribute("rowlines",$n.trim()),R!==""&&(m=new rn.MathNode("menclose",[m]),m.setAttribute("notation",R.trim())),u.arraystretch&&u.arraystretch<1&&(m=new rn.MathNode("mstyle",[m]),m.setAttribute("scriptlevel","1")),m},Tr=function(u,f){var m=[],y=is(u.parser,{cols:m,addJot:!0},"display"),R,V=0,_e={type:"ordgroup",mode:u.mode,body:[]},ke=er(f[0],"ordgroup");if(ke){for(var et="",ft=0;ft<ke.body.length;ft++){var It=Tn(ke.body[ft],"textord");et+=It.text}R=Number(et),V=R*2}var jt=!V;y.body.forEach(function($n){for(var jn=1;jn<$n.length;jn+=2){var ir=Tn($n[jn],"styling"),ur=Tn(ir.body[0],"ordgroup");ur.body.unshift(_e)}if(jt)V<$n.length&&(V=$n.length);else{var jr=$n.length/2;if(R<jr)throw new g("Too many math in a row: "+("expected "+R+", but got "+jr),$n[0])}});for(var nn=0;nn<V;++nn){var ln="r",vn=0;nn%2===1?ln="l":nn>0&&jt&&(vn=1),m[nn]={type:"align",align:ln,pregap:vn,postgap:0}}return y.colSeparationType=jt?"align":"alignat",y};Wi({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(u,f){var m=xr(f[0]),y=m?[f[0]]:Tn(f[0],"ordgroup").body,R=y.map(function(_e){var ke=Er(_e),et=ke.text;if("lcr".indexOf(et)!==-1)return{type:"align",align:et};if(et==="|")return{type:"separator",separator:"|"};if(et===":")return{type:"separator",separator:":"};throw new g("Unknown column alignment: "+et,_e)}),V={cols:R,hskipBeforeAndAfter:!0};return is(u.parser,V,Ds(u.envName))},htmlBuilder:Vi,mathmlBuilder:wr}),Wi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(u){var f={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[u.envName],m={hskipBeforeAndAfter:!1},y=is(u.parser,m,Ds(u.envName));return f?{type:"leftright",mode:u.mode,body:[y],left:f[0],right:f[1],rightColor:void 0}:y},htmlBuilder:Vi,mathmlBuilder:wr}),Wi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(u){var f={arraystretch:.5},m=is(u.parser,f,"script");return m.colSeparationType="small",m},htmlBuilder:Vi,mathmlBuilder:wr}),Wi({type:"array",names:["subarray"],props:{numArgs:1},handler:function(u,f){var m=xr(f[0]),y=m?[f[0]]:Tn(f[0],"ordgroup").body,R=y.map(function(_e){var ke=Er(_e),et=ke.text;if("lc".indexOf(et)!==-1)return{type:"align",align:et};throw new g("Unknown column alignment: "+et,_e)});if(R.length>1)throw new g("{subarray} can contain only one column");var V={cols:R,hskipBeforeAndAfter:!1,arraystretch:.5};if(V=is(u.parser,V,"script"),V.body[0].length>1)throw new g("{subarray} can contain only one column");return V},htmlBuilder:Vi,mathmlBuilder:wr}),Wi({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(u){var f={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},m=is(u.parser,f,Ds(u.envName));return{type:"leftright",mode:u.mode,body:[m],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:Vi,mathmlBuilder:wr}),Wi({type:"array",names:["aligned"],props:{numArgs:0},handler:Tr,htmlBuilder:Vi,mathmlBuilder:wr}),Wi({type:"array",names:["gathered"],props:{numArgs:0},handler:function(u){var f={cols:[{type:"align",align:"c"}],addJot:!0};return is(u.parser,f,"display")},htmlBuilder:Vi,mathmlBuilder:wr}),Wi({type:"array",names:["alignedat"],props:{numArgs:1},handler:Tr,htmlBuilder:Vi,mathmlBuilder:wr}),xn({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(u,f){throw new g(u.funcName+" valid only within array environment")}});var Fr=ua,Si=Fr;xn({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(u,f){var m=u.parser,y=u.funcName,R=f[0];if(R.type!=="ordgroup")throw new g("Invalid environment name",R);for(var V="",_e=0;_e<R.body.length;++_e)V+=Tn(R.body[_e],"textord").text;if(y==="\\begin"){if(!Si.hasOwnProperty(V))throw new g("No such environment: "+V,R);var ke=Si[V],et=m.parseArguments("\\begin{"+V+"}",ke),ft=et.args,It=et.optArgs,jt={mode:m.mode,envName:V,parser:m},nn=ke.handler(jt,ft,It);m.expect("\\end",!1);var ln=m.nextToken,vn=Tn(m.parseFunction(),"environment");if(vn.name!==V)throw new g("Mismatch: \\begin{"+V+"} matched by \\end{"+vn.name+"}",ln);return nn}return{type:"environment",mode:m.mode,name:V,nameGroup:R}}});var Ti=Tt.makeSpan;function bs(Z,u){var f=hr(Z.body,u,!0);return Ti([Z.mclass],f,u)}function xs(Z,u){var f,m=Br(Z.body,u);return Z.mclass==="minner"?rn.newDocumentFragment(m):(Z.mclass==="mord"?Z.isCharacterBox?(f=m[0],f.type="mi"):f=new rn.MathNode("mi",m):(Z.isCharacterBox?(f=m[0],f.type="mo"):f=new rn.MathNode("mo",m),Z.mclass==="mbin"?(f.attributes.lspace="0.22em",f.attributes.rspace="0.22em"):Z.mclass==="mpunct"?(f.attributes.lspace="0em",f.attributes.rspace="0.17em"):(Z.mclass==="mopen"||Z.mclass==="mclose")&&(f.attributes.lspace="0em",f.attributes.rspace="0em")),f)}xn({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(u,f){var m=u.parser,y=u.funcName,R=f[0];return{type:"mclass",mode:m.mode,mclass:"m"+y.substr(5),body:pr(R),isCharacterBox:G.isCharacterBox(R)}},htmlBuilder:bs,mathmlBuilder:xs});var ss=function(u){var f=u.type==="ordgroup"&&u.body.length?u.body[0]:u;return f.type==="atom"&&(f.family==="bin"||f.family==="rel")?"m"+f.family:"mord"};xn({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(u,f){var m=u.parser;return{type:"mclass",mode:m.mode,mclass:ss(f[0]),body:[f[1]],isCharacterBox:G.isCharacterBox(f[1])}}}),xn({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(u,f){var m=u.parser,y=u.funcName,R=f[1],V=f[0],_e;y!=="\\stackrel"?_e=ss(R):_e="mrel";var ke={type:"op",mode:R.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:y!=="\\stackrel",body:pr(R)},et={type:"supsub",mode:V.mode,base:ke,sup:y==="\\underset"?null:V,sub:y==="\\underset"?V:null};return{type:"mclass",mode:m.mode,mclass:_e,body:[et],isCharacterBox:G.isCharacterBox(et)}},htmlBuilder:bs,mathmlBuilder:xs});var Vs=function(u,f){var m=u.font,y=f.withFont(m);return nr(u.body,y)},Is=function(u,f){var m=u.font,y=f.withFont(m);return Gn(u.body,y)},as={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};xn({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(u,f){var m=u.parser,y=u.funcName,R=f[0],V=y;return V in as&&(V=as[V]),{type:"font",mode:m.mode,font:V.slice(1),body:R}},htmlBuilder:Vs,mathmlBuilder:Is}),xn({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(u,f){var m=u.parser,y=f[0],R=G.isCharacterBox(y);return{type:"mclass",mode:m.mode,mclass:ss(y),body:[{type:"font",mode:m.mode,font:"boldsymbol",body:y}],isCharacterBox:R}}}),xn({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(u,f){var m=u.parser,y=u.funcName,R=u.breakOnTokenText,V=m.mode,_e=m.parseExpression(!0,R),ke="math"+y.slice(1);return{type:"font",mode:V,font:ke,body:{type:"ordgroup",mode:m.mode,body:_e}}},htmlBuilder:Vs,mathmlBuilder:Is});var Rs=function(u,f){var m=f;return u==="display"?m=m.id>=b.SCRIPT.id?m.text():b.DISPLAY:u==="text"&&m.size===b.DISPLAY.size?m=b.TEXT:u==="script"?m=b.SCRIPT:u==="scriptscript"&&(m=b.SCRIPTSCRIPT),m},Ls=function(u,f){var m=Rs(u.size,f.style),y=m.fracNum(),R=m.fracDen(),V;V=f.havingStyle(y);var _e=nr(u.numer,V,f);if(u.continued){var ke=8.5/f.fontMetrics().ptPerEm,et=3.5/f.fontMetrics().ptPerEm;_e.height=_e.height<ke?ke:_e.height,_e.depth=_e.depth<et?et:_e.depth}V=f.havingStyle(R);var ft=nr(u.denom,V,f),It,jt,nn;u.hasBarLine?(u.barSize?(jt=rt(u.barSize,f),It=Tt.makeLineSpan("frac-line",f,jt)):It=Tt.makeLineSpan("frac-line",f),jt=It.height,nn=It.height):(It=null,jt=0,nn=f.fontMetrics().defaultRuleThickness);var ln,vn,$n;m.size===b.DISPLAY.size||u.size==="display"?(ln=f.fontMetrics().num1,jt>0?vn=3*nn:vn=7*nn,$n=f.fontMetrics().denom1):(jt>0?(ln=f.fontMetrics().num2,vn=nn):(ln=f.fontMetrics().num3,vn=3*nn),$n=f.fontMetrics().denom2);var jn;if(It){var ur=f.fontMetrics().axisHeight;ln-_e.depth-(ur+.5*jt)<vn&&(ln+=vn-(ln-_e.depth-(ur+.5*jt))),ur-.5*jt-(ft.height-$n)<vn&&($n+=vn-(ur-.5*jt-(ft.height-$n)));var jr=-(ur-.5*jt);jn=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ft,shift:$n},{type:"elem",elem:It,shift:jr},{type:"elem",elem:_e,shift:-ln}]},f)}else{var ir=ln-_e.depth-(ft.height-$n);ir<vn&&(ln+=.5*(vn-ir),$n+=.5*(vn-ir)),jn=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ft,shift:$n},{type:"elem",elem:_e,shift:-ln}]},f)}V=f.havingStyle(m),jn.height*=V.sizeMultiplier/f.sizeMultiplier,jn.depth*=V.sizeMultiplier/f.sizeMultiplier;var Or;m.size===b.DISPLAY.size?Or=f.fontMetrics().delim1:Or=f.fontMetrics().delim2;var Hr,Kr;return u.leftDelim==null?Hr=ti(f,["mopen"]):Hr=Hi.customSizedDelim(u.leftDelim,Or,!0,f.havingStyle(m),u.mode,["mopen"]),u.continued?Kr=Tt.makeSpan([]):u.rightDelim==null?Kr=ti(f,["mclose"]):Kr=Hi.customSizedDelim(u.rightDelim,Or,!0,f.havingStyle(m),u.mode,["mclose"]),Tt.makeSpan(["mord"].concat(V.sizingClasses(f)),[Hr,Tt.makeSpan(["mfrac"],[jn]),Kr],f)},ks=function(u,f){var m=new rn.MathNode("mfrac",[Gn(u.numer,f),Gn(u.denom,f)]);if(!u.hasBarLine)m.setAttribute("linethickness","0px");else if(u.barSize){var y=rt(u.barSize,f);m.setAttribute("linethickness",y+"em")}var R=Rs(u.size,f.style);if(R.size!==f.style.size){m=new rn.MathNode("mstyle",[m]);var V=R.size===b.DISPLAY.size?"true":"false";m.setAttribute("displaystyle",V),m.setAttribute("scriptlevel","0")}if(u.leftDelim!=null||u.rightDelim!=null){var _e=[];if(u.leftDelim!=null){var ke=new rn.MathNode("mo",[new rn.TextNode(u.leftDelim.replace("\\",""))]);ke.setAttribute("fence","true"),_e.push(ke)}if(_e.push(m),u.rightDelim!=null){var et=new rn.MathNode("mo",[new rn.TextNode(u.rightDelim.replace("\\",""))]);et.setAttribute("fence","true"),_e.push(et)}return Ii(_e)}return m};xn({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(u,f){var m=u.parser,y=u.funcName,R=f[0],V=f[1],_e,ke=null,et=null,ft="auto";switch(y){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":_e=!0;break;case"\\\\atopfrac":_e=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":_e=!1,ke="(",et=")";break;case"\\\\bracefrac":_e=!1,ke="\\{",et="\\}";break;case"\\\\brackfrac":_e=!1,ke="[",et="]";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:m.mode,continued:y==="\\cfrac",numer:R,denom:V,hasBarLine:_e,leftDelim:ke,rightDelim:et,size:ft,barSize:null}},htmlBuilder:Ls,mathmlBuilder:ks}),xn({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(u){var f=u.parser,m=u.funcName,y=u.token,R;switch(m){case"\\over":R="\\frac";break;case"\\choose":R="\\binom";break;case"\\atop":R="\\\\atopfrac";break;case"\\brace":R="\\\\bracefrac";break;case"\\brack":R="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:f.mode,replaceWith:R,token:y}}});var Ci=["display","text","script","scriptscript"],ki=function(u){var f=null;return u.length>0&&(f=u,f=f==="."?null:f),f};xn({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(u,f){var m=u.parser,y=f[4],R=f[5],V=er(f[0],"atom");V&&(V=mr(f[0],"open"));var _e=V?ki(V.text):null,ke=er(f[1],"atom");ke&&(ke=mr(f[1],"close"));var et=ke?ki(ke.text):null,ft=Tn(f[2],"size"),It,jt=null;ft.isBlank?It=!0:(jt=ft.value,It=jt.number>0);var nn="auto",ln=er(f[3],"ordgroup");if(ln){if(ln.body.length>0){var vn=Tn(ln.body[0],"textord");nn=Ci[Number(vn.text)]}}else ln=Tn(f[3],"textord"),nn=Ci[Number(ln.text)];return{type:"genfrac",mode:m.mode,numer:y,denom:R,continued:!1,hasBarLine:It,barSize:jt,leftDelim:_e,rightDelim:et,size:nn}},htmlBuilder:Ls,mathmlBuilder:ks}),xn({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(u,f){var m=u.parser,y=u.funcName,R=u.token;return{type:"infix",mode:m.mode,replaceWith:"\\\\abovefrac",size:Tn(f[0],"size").value,token:R}}}),xn({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(u,f){var m=u.parser,y=u.funcName,R=f[0],V=q(Tn(f[1],"infix").size),_e=f[2],ke=V.number>0;return{type:"genfrac",mode:m.mode,numer:R,denom:_e,continued:!1,hasBarLine:ke,barSize:V,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Ls,mathmlBuilder:ks});var Ha=function(u,f){var m=f.style,y,R,V=er(u,"supsub");V?(y=V.sup?nr(V.sup,f.havingStyle(m.sup()),f):nr(V.sub,f.havingStyle(m.sub()),f),R=Tn(V.base,"horizBrace")):R=Tn(u,"horizBrace");var _e=nr(R.base,f.havingBaseStyle(b.DISPLAY)),ke=_i.svgSpan(R,f),et;if(R.isOver?(et=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:_e},{type:"kern",size:.1},{type:"elem",elem:ke}]},f),et.children[0].children[0].children[1].classes.push("svg-align")):(et=Tt.makeVList({positionType:"bottom",positionData:_e.depth+.1+ke.height,children:[{type:"elem",elem:ke},{type:"kern",size:.1},{type:"elem",elem:_e}]},f),et.children[0].children[0].children[0].classes.push("svg-align")),y){var ft=Tt.makeSpan(["mord",R.isOver?"mover":"munder"],[et],f);R.isOver?et=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ft},{type:"kern",size:.2},{type:"elem",elem:y}]},f):et=Tt.makeVList({positionType:"bottom",positionData:ft.depth+.2+y.height+y.depth,children:[{type:"elem",elem:y},{type:"kern",size:.2},{type:"elem",elem:ft}]},f)}return Tt.makeSpan(["mord",R.isOver?"mover":"munder"],[et],f)},Yt=function(u,f){var m=_i.mathMLnode(u.label);return new rn.MathNode(u.isOver?"mover":"munder",[Gn(u.base,f),m])};xn({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(u,f){var m=u.parser,y=u.funcName;return{type:"horizBrace",mode:m.mode,label:y,isOver:/^\\over/.test(y),base:f[0]}},htmlBuilder:Ha,mathmlBuilder:Yt}),xn({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(u,f){var m=u.parser,y=f[1],R=Tn(f[0],"url").url;return m.settings.isTrusted({command:"\\href",url:R})?{type:"href",mode:m.mode,href:R,body:pr(y)}:m.formatUnsupportedCmd("\\href")},htmlBuilder:function(u,f){var m=hr(u.body,f,!1);return Tt.makeAnchor(u.href,[],m,f)},mathmlBuilder:function(u,f){var m=li(u.body,f);return m instanceof Wr||(m=new Wr("mrow",[m])),m.setAttribute("href",u.href),m}}),xn({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(u,f){var m=u.parser,y=Tn(f[0],"url").url;if(!m.settings.isTrusted({command:"\\url",url:y}))return m.formatUnsupportedCmd("\\url");for(var R=[],V=0;V<y.length;V++){var _e=y[V];_e==="~"&&(_e="\\textasciitilde"),R.push({type:"textord",mode:"text",text:_e})}var ke={type:"text",mode:m.mode,font:"\\texttt",body:R};return{type:"href",mode:m.mode,href:y,body:pr(ke)}}}),xn({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(u,f){var m=u.parser;return{type:"htmlmathml",mode:m.mode,html:pr(f[0]),mathml:pr(f[1])}},htmlBuilder:function(u,f){var m=hr(u.html,f,!1);return Tt.makeFragment(m)},mathmlBuilder:function(u,f){return li(u.mathml,f)}});var Zs=function(u){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(u))return{number:+u,unit:"bp"};var f=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(u);if(!f)throw new g("Invalid size: '"+u+"' in \\includegraphics");var m={number:+(f[1]+f[2]),unit:f[3]};if(!Qn(m))throw new g("Invalid unit: '"+m.unit+"' in \\includegraphics.");return m};xn({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(u,f,m){var y=u.parser,R={number:0,unit:"em"},V={number:.9,unit:"em"},_e={number:0,unit:"em"},ke="";if(m[0])for(var et=Tn(m[0],"raw").string,ft=et.split(","),It=0;It<ft.length;It++){var jt=ft[It].split("=");if(jt.length===2){var nn=jt[1].trim();switch(jt[0].trim()){case"alt":ke=nn;break;case"width":R=Zs(nn);break;case"height":V=Zs(nn);break;case"totalheight":_e=Zs(nn);break;default:throw new g("Invalid key: '"+jt[0]+"' in \\includegraphics.")}}}var ln=Tn(f[0],"url").url;return ke===""&&(ke=ln,ke=ke.replace(/^.*[\\/]/,""),ke=ke.substring(0,ke.lastIndexOf("."))),y.settings.isTrusted({command:"\\includegraphics",url:ln})?{type:"includegraphics",mode:y.mode,alt:ke,width:R,height:V,totalheight:_e,src:ln}:y.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(u,f){var m=rt(u.height,f),y=0;u.totalheight.number>0&&(y=rt(u.totalheight,f)-m,y=Number(y.toFixed(2)));var R=0;u.width.number>0&&(R=rt(u.width,f));var V={height:m+y+"em"};R>0&&(V.width=R+"em"),y>0&&(V.verticalAlign=-y+"em");var _e=new Se(u.src,u.alt,V);return _e.height=m,_e.depth=y,_e},mathmlBuilder:function(u,f){var m=new rn.MathNode("mglyph",[]);m.setAttribute("alt",u.alt);var y=rt(u.height,f),R=0;if(u.totalheight.number>0&&(R=rt(u.totalheight,f)-y,R=R.toFixed(2),m.setAttribute("valign","-"+R+"em")),m.setAttribute("height",y+R+"em"),u.width.number>0){var V=rt(u.width,f);m.setAttribute("width",V+"em")}return m.setAttribute("src",u.src),m}}),xn({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,f){var m=u.parser,y=u.funcName,R=Tn(f[0],"size");if(m.settings.strict){var V=y[1]==="m",_e=R.value.unit==="mu";V?(_e||m.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+y+" supports only mu units, "+("not "+R.value.unit+" units")),m.mode!=="math"&&m.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+y+" works only in math mode")):_e&&m.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+y+" doesn't support mu units")}return{type:"kern",mode:m.mode,dimension:R.value}},htmlBuilder:function(u,f){return Tt.makeGlue(u.dimension,f)},mathmlBuilder:function(u,f){var m=rt(u.dimension,f);return new rn.SpaceNode(m)}}),xn({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var m=u.parser,y=u.funcName,R=f[0];return{type:"lap",mode:m.mode,alignment:y.slice(5),body:R}},htmlBuilder:function(u,f){var m;u.alignment==="clap"?(m=Tt.makeSpan([],[nr(u.body,f)]),m=Tt.makeSpan(["inner"],[m],f)):m=Tt.makeSpan(["inner"],[nr(u.body,f)]);var y=Tt.makeSpan(["fix"],[]),R=Tt.makeSpan([u.alignment],[m,y],f),V=Tt.makeSpan(["strut"]);return V.style.height=R.height+R.depth+"em",V.style.verticalAlign=-R.depth+"em",R.children.unshift(V),R=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:R}]},f),Tt.makeSpan(["mord"],[R],f)},mathmlBuilder:function(u,f){var m=new rn.MathNode("mpadded",[Gn(u.body,f)]);if(u.alignment!=="rlap"){var y=u.alignment==="llap"?"-1":"-0.5";m.setAttribute("lspace",y+"width")}return m.setAttribute("width","0px"),m}}),xn({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,f){var m=u.funcName,y=u.parser,R=y.mode;y.switchMode("math");var V=m==="\\("?"\\)":"$",_e=y.parseExpression(!1,V);return y.expect(V),y.switchMode(R),{type:"styling",mode:y.mode,style:"text",body:_e}}}),xn({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,f){throw new g("Mismatched "+u.funcName)}});var Ta=function(u,f){switch(f.style.size){case b.DISPLAY.size:return u.display;case b.TEXT.size:return u.text;case b.SCRIPT.size:return u.script;case b.SCRIPTSCRIPT.size:return u.scriptscript;default:return u.text}};xn({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(u,f){var m=u.parser;return{type:"mathchoice",mode:m.mode,display:pr(f[0]),text:pr(f[1]),script:pr(f[2]),scriptscript:pr(f[3])}},htmlBuilder:function(u,f){var m=Ta(u,f),y=hr(m,f,!1);return Tt.makeFragment(y)},mathmlBuilder:function(u,f){var m=Ta(u,f);return li(m,f)}});var Ca=function(u,f,m,y,R,V,_e){u=Tt.makeSpan([],[u]);var ke,et;if(f){var ft=nr(f,y.havingStyle(R.sup()),y);et={elem:ft,kern:Math.max(y.fontMetrics().bigOpSpacing1,y.fontMetrics().bigOpSpacing3-ft.depth)}}if(m){var It=nr(m,y.havingStyle(R.sub()),y);ke={elem:It,kern:Math.max(y.fontMetrics().bigOpSpacing2,y.fontMetrics().bigOpSpacing4-It.height)}}var jt;if(et&&ke){var nn=y.fontMetrics().bigOpSpacing5+ke.elem.height+ke.elem.depth+ke.kern+u.depth+_e;jt=Tt.makeVList({positionType:"bottom",positionData:nn,children:[{type:"kern",size:y.fontMetrics().bigOpSpacing5},{type:"elem",elem:ke.elem,marginLeft:-V+"em"},{type:"kern",size:ke.kern},{type:"elem",elem:u},{type:"kern",size:et.kern},{type:"elem",elem:et.elem,marginLeft:V+"em"},{type:"kern",size:y.fontMetrics().bigOpSpacing5}]},y)}else if(ke){var ln=u.height-_e;jt=Tt.makeVList({positionType:"top",positionData:ln,children:[{type:"kern",size:y.fontMetrics().bigOpSpacing5},{type:"elem",elem:ke.elem,marginLeft:-V+"em"},{type:"kern",size:ke.kern},{type:"elem",elem:u}]},y)}else if(et){var vn=u.depth+_e;jt=Tt.makeVList({positionType:"bottom",positionData:vn,children:[{type:"elem",elem:u},{type:"kern",size:et.kern},{type:"elem",elem:et.elem,marginLeft:V+"em"},{type:"kern",size:y.fontMetrics().bigOpSpacing5}]},y)}else return u;return Tt.makeSpan(["mop","op-limits"],[jt],y)},Ka=["\\smallint"],hs=function(u,f){var m,y,R=!1,V,_e=er(u,"supsub");_e?(m=_e.sup,y=_e.sub,V=Tn(_e.base,"op"),R=!0):V=Tn(u,"op");var ke=f.style,et=!1;ke.size===b.DISPLAY.size&&V.symbol&&!G.contains(Ka,V.name)&&(et=!0);var ft;if(V.symbol){var It=et?"Size2-Regular":"Size1-Regular",jt="";if((V.name==="\\oiint"||V.name==="\\oiiint")&&(jt=V.name.substr(1),V.name=jt==="oiint"?"\\iint":"\\iiint"),ft=Tt.makeSymbol(V.name,It,"math",f,["mop","op-symbol",et?"large-op":"small-op"]),jt.length>0){var nn=ft.italic,ln=Tt.staticSvg(jt+"Size"+(et?"2":"1"),f);ft=Tt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ft,shift:0},{type:"elem",elem:ln,shift:et?.08:0}]},f),V.name="\\"+jt,ft.classes.unshift("mop"),ft.italic=nn}}else if(V.body){var vn=hr(V.body,f,!0);vn.length===1&&vn[0]instanceof fe?(ft=vn[0],ft.classes[0]="mop"):ft=Tt.makeSpan(["mop"],Tt.tryCombineChars(vn),f)}else{for(var $n=[],jn=1;jn<V.name.length;jn++)$n.push(Tt.mathsym(V.name[jn],V.mode,f));ft=Tt.makeSpan(["mop"],$n,f)}var ir=0,ur=0;return(ft instanceof fe||V.name==="\\oiint"||V.name==="\\oiiint")&&!V.suppressBaseShift&&(ir=(ft.height-ft.depth)/2-f.fontMetrics().axisHeight,ur=ft.italic),R?Ca(ft,m,y,f,ke,ur,ir):(ir&&(ft.style.position="relative",ft.style.top=ir+"em"),ft)},Ps=function(u,f){var m;if(u.symbol)m=new Wr("mo",[Vr(u.name,u.mode)]),G.contains(Ka,u.name)&&m.setAttribute("largeop","false");else if(u.body)m=new Wr("mo",Br(u.body,f));else{m=new Wr("mi",[new Vn(u.name.slice(1))]);var y=new Wr("mo",[Vr("\u2061","text")]);u.parentIsSupSub?m=new Wr("mo",[m,y]):m=vi([m,y])}return m},Co={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};xn({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:function(u,f){var m=u.parser,y=u.funcName,R=y;return R.length===1&&(R=Co[R]),{type:"op",mode:m.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:R}},htmlBuilder:hs,mathmlBuilder:Ps}),xn({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(u,f){var m=u.parser,y=f[0];return{type:"op",mode:m.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:pr(y)}},htmlBuilder:hs,mathmlBuilder:Ps});var Ao={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};xn({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler:function(u){var f=u.parser,m=u.funcName;return{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:m}},htmlBuilder:hs,mathmlBuilder:Ps}),xn({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(u){var f=u.parser,m=u.funcName;return{type:"op",mode:f.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:m}},htmlBuilder:hs,mathmlBuilder:Ps}),xn({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(u){var f=u.parser,m=u.funcName,y=m;return y.length===1&&(y=Ao[y]),{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:y}},htmlBuilder:hs,mathmlBuilder:Ps});var da=function(u,f){var m,y,R=!1,V,_e=er(u,"supsub");_e?(m=_e.sup,y=_e.sub,V=Tn(_e.base,"operatorname"),R=!0):V=Tn(u,"operatorname");var ke;if(V.body.length>0){for(var et=V.body.map(function(nn){var ln=nn.text;return typeof ln=="string"?{type:"textord",mode:nn.mode,text:ln}:nn}),ft=hr(et,f.withFont("mathrm"),!0),It=0;It<ft.length;It++){var jt=ft[It];jt instanceof fe&&(jt.text=jt.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}ke=Tt.makeSpan(["mop"],ft,f)}else ke=Tt.makeSpan(["mop"],[],f);return R?Ca(ke,m,y,f,f.style,0,0):ke},Ys=function(u,f){for(var m=Br(u.body,f.withFont("mathrm")),y=!0,R=0;R<m.length;R++){var V=m[R];if(!(V instanceof rn.SpaceNode))if(V instanceof rn.MathNode)switch(V.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var _e=V.children[0];V.children.length===1&&_e instanceof rn.TextNode?_e.text=_e.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):y=!1;break}default:y=!1}else y=!1}if(y){var ke=m.map(function(It){return It.toText()}).join("");m=[new rn.TextNode(ke)]}var et=new rn.MathNode("mi",m);et.setAttribute("mathvariant","normal");var ft=new rn.MathNode("mo",[Vr("\u2061","text")]);return u.parentIsSupSub?new rn.MathNode("mo",[et,ft]):rn.newDocumentFragment([et,ft])};xn({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(u,f){var m=u.parser,y=u.funcName,R=f[0];return{type:"operatorname",mode:m.mode,body:pr(R),alwaysHandleSupSub:y==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:da,mathmlBuilder:Ys}),fr({type:"ordgroup",htmlBuilder:function(u,f){return u.semisimple?Tt.makeFragment(hr(u.body,f,!1)):Tt.makeSpan(["mord"],hr(u.body,f,!0),f)},mathmlBuilder:function(u,f){return li(u.body,f,!0)}}),xn({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(u,f){var m=u.parser,y=f[0];return{type:"overline",mode:m.mode,body:y}},htmlBuilder:function(u,f){var m=nr(u.body,f.havingCrampedStyle()),y=Tt.makeLineSpan("overline-line",f),R=f.fontMetrics().defaultRuleThickness,V=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:m},{type:"kern",size:3*R},{type:"elem",elem:y},{type:"kern",size:R}]},f);return Tt.makeSpan(["mord","overline"],[V],f)},mathmlBuilder:function(u,f){var m=new rn.MathNode("mo",[new rn.TextNode("\u203E")]);m.setAttribute("stretchy","true");var y=new rn.MathNode("mover",[Gn(u.body,f),m]);return y.setAttribute("accent","true"),y}}),xn({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var m=u.parser,y=f[0];return{type:"phantom",mode:m.mode,body:pr(y)}},htmlBuilder:function(u,f){var m=hr(u.body,f.withPhantom(),!1);return Tt.makeFragment(m)},mathmlBuilder:function(u,f){var m=Br(u.body,f);return new rn.MathNode("mphantom",m)}}),xn({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var m=u.parser,y=f[0];return{type:"hphantom",mode:m.mode,body:y}},htmlBuilder:function(u,f){var m=Tt.makeSpan([],[nr(u.body,f.withPhantom())]);if(m.height=0,m.depth=0,m.children)for(var y=0;y<m.children.length;y++)m.children[y].height=0,m.children[y].depth=0;return m=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:m}]},f),Tt.makeSpan(["mord"],[m],f)},mathmlBuilder:function(u,f){var m=Br(pr(u.body),f),y=new rn.MathNode("mphantom",m),R=new rn.MathNode("mpadded",[y]);return R.setAttribute("height","0px"),R.setAttribute("depth","0px"),R}}),xn({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var m=u.parser,y=f[0];return{type:"vphantom",mode:m.mode,body:y}},htmlBuilder:function(u,f){var m=Tt.makeSpan(["inner"],[nr(u.body,f.withPhantom())]),y=Tt.makeSpan(["fix"],[]);return Tt.makeSpan(["mord","rlap"],[m,y],f)},mathmlBuilder:function(u,f){var m=Br(pr(u.body),f),y=new rn.MathNode("mphantom",m),R=new rn.MathNode("mpadded",[y]);return R.setAttribute("width","0px"),R}}),xn({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(u,f){var m=u.parser,y=Tn(f[0],"size").value,R=f[1];return{type:"raisebox",mode:m.mode,dy:y,body:R}},htmlBuilder:function(u,f){var m=nr(u.body,f),y=rt(u.dy,f);return Tt.makeVList({positionType:"shift",positionData:-y,children:[{type:"elem",elem:m}]},f)},mathmlBuilder:function(u,f){var m=new rn.MathNode("mpadded",[Gn(u.body,f)]),y=u.dy.number+u.dy.unit;return m.setAttribute("voffset",y),m}}),xn({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(u,f,m){var y=u.parser,R=m[0],V=Tn(f[0],"size"),_e=Tn(f[1],"size");return{type:"rule",mode:y.mode,shift:R&&Tn(R,"size").value,width:V.value,height:_e.value}},htmlBuilder:function(u,f){var m=Tt.makeSpan(["mord","rule"],[],f),y=rt(u.width,f),R=rt(u.height,f),V=u.shift?rt(u.shift,f):0;return m.style.borderRightWidth=y+"em",m.style.borderTopWidth=R+"em",m.style.bottom=V+"em",m.width=y,m.height=R+V,m.depth=-V,m.maxFontSize=R*1.125*f.sizeMultiplier,m},mathmlBuilder:function(u,f){var m=rt(u.width,f),y=rt(u.height,f),R=u.shift?rt(u.shift,f):0,V=f.color&&f.getColor()||"black",_e=new rn.MathNode("mspace");_e.setAttribute("mathbackground",V),_e.setAttribute("width",m+"em"),_e.setAttribute("height",y+"em");var ke=new rn.MathNode("mpadded",[_e]);return R>=0?ke.setAttribute("height","+"+R+"em"):(ke.setAttribute("height",R+"em"),ke.setAttribute("depth","+"+-R+"em")),ke.setAttribute("voffset",R+"em"),ke}});function Es(Z,u,f){for(var m=hr(Z,u,!1),y=u.sizeMultiplier/f.sizeMultiplier,R=0;R<m.length;R++){var V=m[R].classes.indexOf("sizing");V<0?Array.prototype.push.apply(m[R].classes,u.sizingClasses(f)):m[R].classes[V+1]==="reset-size"+u.size&&(m[R].classes[V+1]="reset-size"+f.size),m[R].height*=y,m[R].depth*=y}return Tt.makeFragment(m)}var Ga=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Do=function(u,f){var m=f.havingSize(u.size);return Es(u.body,m,f)};xn({type:"sizing",names:Ga,props:{numArgs:0,allowedInText:!0},handler:function(u,f){var m=u.breakOnTokenText,y=u.funcName,R=u.parser,V=R.parseExpression(!1,m);return{type:"sizing",mode:R.mode,size:Ga.indexOf(y)+1,body:V}},htmlBuilder:Do,mathmlBuilder:function(u,f){var m=f.havingSize(u.size),y=Br(u.body,m),R=new rn.MathNode("mstyle",y);return R.setAttribute("mathsize",m.sizeMultiplier+"em"),R}}),xn({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(u,f,m){var y=u.parser,R=!1,V=!1,_e=m[0]&&Tn(m[0],"ordgroup");if(_e)for(var ke="",et=0;et<_e.body.length;++et){var ft=_e.body[et];if(ke=ft.text,ke==="t")R=!0;else if(ke==="b")V=!0;else{R=!1,V=!1;break}}else R=!0,V=!0;var It=f[0];return{type:"smash",mode:y.mode,body:It,smashHeight:R,smashDepth:V}},htmlBuilder:function(u,f){var m=Tt.makeSpan([],[nr(u.body,f)]);if(!u.smashHeight&&!u.smashDepth)return m;if(u.smashHeight&&(m.height=0,m.children))for(var y=0;y<m.children.length;y++)m.children[y].height=0;if(u.smashDepth&&(m.depth=0,m.children))for(var R=0;R<m.children.length;R++)m.children[R].depth=0;var V=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:m}]},f);return Tt.makeSpan(["mord"],[V],f)},mathmlBuilder:function(u,f){var m=new rn.MathNode("mpadded",[Gn(u.body,f)]);return u.smashHeight&&m.setAttribute("height","0px"),u.smashDepth&&m.setAttribute("depth","0px"),m}}),xn({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,f,m){var y=u.parser,R=m[0],V=f[0];return{type:"sqrt",mode:y.mode,body:V,index:R}},htmlBuilder:function(u,f){var m=nr(u.body,f.havingCrampedStyle());m.height===0&&(m.height=f.fontMetrics().xHeight),m=Tt.wrapFragment(m,f);var y=f.fontMetrics(),R=y.defaultRuleThickness,V=R;f.style.id<b.TEXT.id&&(V=f.fontMetrics().xHeight);var _e=R+V/4,ke=m.height+m.depth+_e+R,et=Hi.sqrtImage(ke,f),ft=et.span,It=et.ruleWidth,jt=et.advanceWidth,nn=ft.height-It;nn>m.height+m.depth+_e&&(_e=(_e+nn-m.height-m.depth)/2);var ln=ft.height-m.height-_e-It;m.style.paddingLeft=jt+"em";var vn=Tt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:m,wrapperClasses:["svg-align"]},{type:"kern",size:-(m.height+ln)},{type:"elem",elem:ft},{type:"kern",size:It}]},f);if(u.index){var $n=f.havingStyle(b.SCRIPTSCRIPT),jn=nr(u.index,$n,f),ir=.6*(vn.height-vn.depth),ur=Tt.makeVList({positionType:"shift",positionData:-ir,children:[{type:"elem",elem:jn}]},f),jr=Tt.makeSpan(["root"],[ur]);return Tt.makeSpan(["mord","sqrt"],[jr,vn],f)}else return Tt.makeSpan(["mord","sqrt"],[vn],f)},mathmlBuilder:function(u,f){var m=u.body,y=u.index;return y?new rn.MathNode("mroot",[Gn(m,f),Gn(y,f)]):new rn.MathNode("msqrt",[Gn(m,f)])}});var Wa={display:b.DISPLAY,text:b.TEXT,script:b.SCRIPT,scriptscript:b.SCRIPTSCRIPT};xn({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(u,f){var m=u.breakOnTokenText,y=u.funcName,R=u.parser,V=R.parseExpression(!0,m),_e=y.slice(1,y.length-5);return{type:"styling",mode:R.mode,style:_e,body:V}},htmlBuilder:function(u,f){var m=Wa[u.style],y=f.havingStyle(m).withFont("");return Es(u.body,y,f)},mathmlBuilder:function(u,f){var m=Wa[u.style],y=f.havingStyle(m),R=Br(u.body,y),V=new rn.MathNode("mstyle",R),_e={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},ke=_e[u.style];return V.setAttribute("scriptlevel",ke[0]),V.setAttribute("displaystyle",ke[1]),V}});var Io=function(u,f){var m=u.base;if(m)if(m.type==="op"){var y=m.limits&&(f.style.size===b.DISPLAY.size||m.alwaysHandleSupSub);return y?hs:null}else if(m.type==="operatorname"){var R=m.alwaysHandleSupSub&&(f.style.size===b.DISPLAY.size||m.limits);return R?da:null}else{if(m.type==="accent")return G.isCharacterBox(m.base)?Cn:null;if(m.type==="horizBrace"){var V=!u.sub;return V===m.isOver?Ha:null}else return null}else return null};fr({type:"supsub",htmlBuilder:function(u,f){var m=Io(u,f);if(m)return m(u,f);var y=u.base,R=u.sup,V=u.sub,_e=nr(y,f),ke,et,ft=f.fontMetrics(),It=0,jt=0,nn=y&&G.isCharacterBox(y);if(R){var ln=f.havingStyle(f.style.sup());ke=nr(R,ln,f),nn||(It=_e.height-ln.fontMetrics().supDrop*ln.sizeMultiplier/f.sizeMultiplier)}if(V){var vn=f.havingStyle(f.style.sub());et=nr(V,vn,f),nn||(jt=_e.depth+vn.fontMetrics().subDrop*vn.sizeMultiplier/f.sizeMultiplier)}var $n;f.style===b.DISPLAY?$n=ft.sup1:f.style.cramped?$n=ft.sup3:$n=ft.sup2;var jn=f.sizeMultiplier,ir=.5/ft.ptPerEm/jn+"em",ur=null;if(et){var jr=u.base&&u.base.type==="op"&&u.base.name&&(u.base.name==="\\oiint"||u.base.name==="\\oiiint");(_e instanceof fe||jr)&&(ur=-_e.italic+"em")}var Or;if(ke&&et){It=Math.max(It,$n,ke.depth+.25*ft.xHeight),jt=Math.max(jt,ft.sub2);var Hr=ft.defaultRuleThickness,Kr=4*Hr;if(It-ke.depth-(et.height-jt)<Kr){jt=Kr-(It-ke.depth)+et.height;var $r=.8*ft.xHeight-(It-ke.depth);$r>0&&(It+=$r,jt-=$r)}var Di=[{type:"elem",elem:et,shift:jt,marginRight:ir,marginLeft:ur},{type:"elem",elem:ke,shift:-It,marginRight:ir}];Or=Tt.makeVList({positionType:"individualShift",children:Di},f)}else if(et){jt=Math.max(jt,ft.sub1,et.height-.8*ft.xHeight);var Yr=[{type:"elem",elem:et,marginLeft:ur,marginRight:ir}];Or=Tt.makeVList({positionType:"shift",positionData:jt,children:Yr},f)}else if(ke)It=Math.max(It,$n,ke.depth+.25*ft.xHeight),Or=Tt.makeVList({positionType:"shift",positionData:-It,children:[{type:"elem",elem:ke,marginRight:ir}]},f);else throw new Error("supsub must have either sup or sub.");var _t=oi(_e,"right")||"mord";return Tt.makeSpan([_t],[_e,Tt.makeSpan(["msupsub"],[Or])],f)},mathmlBuilder:function(u,f){var m=!1,y,R,V=er(u.base,"horizBrace");V&&(R=!!u.sup,R===V.isOver&&(m=!0,y=V.isOver)),u.base&&(u.base.type==="op"||u.base.type==="operatorname")&&(u.base.parentIsSupSub=!0);var _e=[Gn(u.base,f)];u.sub&&_e.push(Gn(u.sub,f)),u.sup&&_e.push(Gn(u.sup,f));var ke;if(m)ke=y?"mover":"munder";else if(u.sub)if(u.sup){var It=u.base;It&&It.type==="op"&&It.limits&&f.style===b.DISPLAY||It&&It.type==="operatorname"&&It.alwaysHandleSupSub&&(f.style===b.DISPLAY||It.limits)?ke="munderover":ke="msubsup"}else{var ft=u.base;ft&&ft.type==="op"&&ft.limits&&(f.style===b.DISPLAY||ft.alwaysHandleSupSub)||ft&&ft.type==="operatorname"&&ft.alwaysHandleSupSub&&(ft.limits||f.style===b.DISPLAY)?ke="munder":ke="msub"}else{var et=u.base;et&&et.type==="op"&&et.limits&&(f.style===b.DISPLAY||et.alwaysHandleSupSub)||et&&et.type==="operatorname"&&et.alwaysHandleSupSub&&(et.limits||f.style===b.DISPLAY)?ke="mover":ke="msup"}var jt=new rn.MathNode(ke,_e);return jt}}),fr({type:"atom",htmlBuilder:function(u,f){return Tt.mathsym(u.text,u.mode,f,["m"+u.family])},mathmlBuilder:function(u,f){var m=new rn.MathNode("mo",[Vr(u.text,u.mode)]);if(u.family==="bin"){var y=pi(u,f);y==="bold-italic"&&m.setAttribute("mathvariant",y)}else u.family==="punct"?m.setAttribute("separator","true"):(u.family==="open"||u.family==="close")&&m.setAttribute("stretchy","false");return m}});var Aa={mi:"italic",mn:"normal",mtext:"normal"};fr({type:"mathord",htmlBuilder:function(u,f){return Tt.makeOrd(u,f,"mathord")},mathmlBuilder:function(u,f){var m=new rn.MathNode("mi",[Vr(u.text,u.mode,f)]),y=pi(u,f)||"italic";return y!==Aa[m.type]&&m.setAttribute("mathvariant",y),m}}),fr({type:"textord",htmlBuilder:function(u,f){return Tt.makeOrd(u,f,"textord")},mathmlBuilder:function(u,f){var m=Vr(u.text,u.mode,f),y=pi(u,f)||"normal",R;return u.mode==="text"?R=new rn.MathNode("mtext",[m]):/[0-9]/.test(u.text)?R=new rn.MathNode("mn",[m]):u.text==="\\prime"?R=new rn.MathNode("mo",[m]):R=new rn.MathNode("mi",[m]),y!==Aa[R.type]&&R.setAttribute("mathvariant",y),R}});var Xs={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Os={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};fr({type:"spacing",htmlBuilder:function(u,f){if(Os.hasOwnProperty(u.text)){var m=Os[u.text].className||"";if(u.mode==="text"){var y=Tt.makeOrd(u,f,"textord");return y.classes.push(m),y}else return Tt.makeSpan(["mspace",m],[Tt.mathsym(u.text,u.mode,f)],f)}else{if(Xs.hasOwnProperty(u.text))return Tt.makeSpan(["mspace",Xs[u.text]],[],f);throw new g('Unknown type of space "'+u.text+'"')}},mathmlBuilder:function(u,f){var m;if(Os.hasOwnProperty(u.text))m=new rn.MathNode("mtext",[new rn.TextNode("\xA0")]);else{if(Xs.hasOwnProperty(u.text))return new rn.MathNode("mspace");throw new g('Unknown type of space "'+u.text+'"')}return m}});var Ms=function(){var u=new rn.MathNode("mtd",[]);return u.setAttribute("width","50%"),u};fr({type:"tag",mathmlBuilder:function(u,f){var m=new rn.MathNode("mtable",[new rn.MathNode("mtr",[Ms(),new rn.MathNode("mtd",[li(u.body,f)]),Ms(),new rn.MathNode("mtd",[li(u.tag,f)])])]);return m.setAttribute("width","100%"),m}});var Va={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Da={"\\textbf":"textbf","\\textmd":"textmd"},Za={"\\textit":"textit","\\textup":"textup"},ha=function(u,f){var m=u.font;return m?Va[m]?f.withTextFontFamily(Va[m]):Da[m]?f.withTextFontWeight(Da[m]):f.withTextFontShape(Za[m]):f};xn({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(u,f){var m=u.parser,y=u.funcName,R=f[0];return{type:"text",mode:m.mode,body:pr(R),font:y}},htmlBuilder:function(u,f){var m=ha(u,f),y=hr(u.body,m,!0);return Tt.makeSpan(["mord","text"],Tt.tryCombineChars(y),m)},mathmlBuilder:function(u,f){var m=ha(u,f);return li(u.body,m)}}),xn({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(u,f){var m=u.parser;return{type:"underline",mode:m.mode,body:f[0]}},htmlBuilder:function(u,f){var m=nr(u.body,f),y=Tt.makeLineSpan("underline-line",f),R=f.fontMetrics().defaultRuleThickness,V=Tt.makeVList({positionType:"top",positionData:m.height,children:[{type:"kern",size:R},{type:"elem",elem:y},{type:"kern",size:3*R},{type:"elem",elem:m}]},f);return Tt.makeSpan(["mord","underline"],[V],f)},mathmlBuilder:function(u,f){var m=new rn.MathNode("mo",[new rn.TextNode("\u203E")]);m.setAttribute("stretchy","true");var y=new rn.MathNode("munder",[Gn(u.body,f),m]);return y.setAttribute("accentunder","true"),y}}),xn({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(u,f,m){throw new g("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(u,f){for(var m=Ya(u),y=[],R=f.havingStyle(f.style.text()),V=0;V<m.length;V++){var _e=m[V];_e==="~"&&(_e="\\textasciitilde"),y.push(Tt.makeSymbol(_e,"Typewriter-Regular",u.mode,R,["mord","texttt"]))}return Tt.makeSpan(["mord","text"].concat(R.sizingClasses(f)),Tt.tryCombineChars(y),R)},mathmlBuilder:function(u,f){var m=new rn.TextNode(Ya(u)),y=new rn.MathNode("mtext",[m]);return y.setAttribute("mathvariant","monospace"),y}});var Ya=function(u){return u.body.replace(/ /g,u.star?"\u2423":"\xA0")},fa=xi,Qs=fa,Ia=`[ \r
|
|
]`,Ra="\\\\[a-zA-Z@]+",Xa="\\\\[^\uD800-\uDFFF]",Ro=""+Ra+Ia+"*",Qa=new RegExp("^("+Ra+")"+Ia+"*$"),La="[\u0300-\u036F]",Lo=new RegExp(La+"+$"),ka="("+Ia+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(La+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(La+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+Ro)+("|"+Xa+")"),Ja=function(){function Z(f,m){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=f,this.settings=m,this.tokenRegex=new RegExp(ka,"g"),this.catcodes={"%":14}}var u=Z.prototype;return u.setCatcode=function(m,y){this.catcodes[m]=y},u.lex=function(){var m=this.input,y=this.tokenRegex.lastIndex;if(y===m.length)return new ye("EOF",new Ee(this,y,y));var R=this.tokenRegex.exec(m);if(R===null||R.index!==y)throw new g("Unexpected character: '"+m[y]+"'",new ye(m[y],new Ee(this,y,y+1)));var V=R[2]||" ";if(this.catcodes[V]===14){var _e=m.indexOf(`
|
|
`,this.tokenRegex.lastIndex);return _e===-1?(this.tokenRegex.lastIndex=m.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=_e+1,this.lex()}var ke=V.match(Qa);return ke&&(V=ke[1]),new ye(V,new Ee(this,y,this.tokenRegex.lastIndex))},Z}(),ko=function(){function Z(f,m){f===void 0&&(f={}),m===void 0&&(m={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=m,this.builtins=f,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 m=this.undefStack.pop();for(var y in m)m.hasOwnProperty(y)&&(m[y]===void 0?delete this.current[y]:this.current[y]=m[y])},u.has=function(m){return this.current.hasOwnProperty(m)||this.builtins.hasOwnProperty(m)},u.get=function(m){return this.current.hasOwnProperty(m)?this.current[m]:this.builtins[m]},u.set=function(m,y,R){if(R===void 0&&(R=!1),R){for(var V=0;V<this.undefStack.length;V++)delete this.undefStack[V][m];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][m]=y)}else{var _e=this.undefStack[this.undefStack.length-1];_e&&!_e.hasOwnProperty(m)&&(_e[m]=this.current[m])}this.current[m]=y},Z}(),qa={},Po=qa;function He(Z,u){qa[Z]=u}He("\\@firstoftwo",function(Z){var u=Z.consumeArgs(2);return{tokens:u[0],numArgs:0}}),He("\\@secondoftwo",function(Z){var u=Z.consumeArgs(2);return{tokens:u[1],numArgs:0}}),He("\\@ifnextchar",function(Z){var u=Z.consumeArgs(3),f=Z.future();return u[0].length===1&&u[0][0].text===f.text?{tokens:u[1],numArgs:0}:{tokens:u[2],numArgs:0}}),He("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),He("\\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};He("\\char",function(Z){var u=Z.popToken(),f,m="";if(u.text==="'")f=8,u=Z.popToken();else if(u.text==='"')f=16,u=Z.popToken();else if(u.text==="`")if(u=Z.popToken(),u.text[0]==="\\")m=u.text.charCodeAt(1);else{if(u.text==="EOF")throw new g("\\char` missing argument");m=u.text.charCodeAt(0)}else f=10;if(f){if(m=eo[u.text],m==null||m>=f)throw new g("Invalid base-"+f+" digit "+u.text);for(var y;(y=eo[Z.future().text])!=null&&y<f;)m*=f,m+=y,Z.popToken()}return"\\@char{"+m+"}"});var Pa=function(u,f){var m=u.consumeArgs(1)[0];if(m.length!==1)throw new g("\\gdef's first argument must be a macro name");var y=m[0].text,R=0;for(m=u.consumeArgs(1)[0];m.length===1&&m[0].text==="#";){if(m=u.consumeArgs(1)[0],m.length!==1)throw new g('Invalid argument number length "'+m.length+'"');if(!/^[1-9]$/.test(m[0].text))throw new g('Invalid argument number "'+m[0].text+'"');if(R++,parseInt(m[0].text)!==R)throw new g('Argument number "'+m[0].text+'" out of order');m=u.consumeArgs(1)[0]}return u.macros.set(y,{tokens:m,numArgs:R},f),""};He("\\gdef",function(Z){return Pa(Z,!0)}),He("\\def",function(Z){return Pa(Z,!1)}),He("\\global",function(Z){var u=Z.consumeArgs(1)[0];if(u.length!==1)throw new g("Invalid command after \\global");var f=u[0].text;if(f==="\\def")return Pa(Z,!0);throw new g("Invalid command '"+f+"' after \\global")});var Oa=function(u,f,m){var y=u.consumeArgs(1)[0];if(y.length!==1)throw new g("\\newcommand's first argument must be a macro name");var R=y[0].text,V=u.isDefined(R);if(V&&!f)throw new g("\\newcommand{"+R+"} attempting to redefine "+(R+"; use \\renewcommand"));if(!V&&!m)throw new g("\\renewcommand{"+R+"} when command "+R+" does not yet exist; use \\newcommand");var _e=0;if(y=u.consumeArgs(1)[0],y.length===1&&y[0].text==="["){for(var ke="",et=u.expandNextToken();et.text!=="]"&&et.text!=="EOF";)ke+=et.text,et=u.expandNextToken();if(!ke.match(/^\s*[0-9]+\s*$/))throw new g("Invalid number of arguments: "+ke);_e=parseInt(ke),y=u.consumeArgs(1)[0]}return u.macros.set(R,{tokens:y,numArgs:_e}),""};He("\\newcommand",function(Z){return Oa(Z,!1,!0)}),He("\\renewcommand",function(Z){return Oa(Z,!0,!1)}),He("\\providecommand",function(Z){return Oa(Z,!0,!0)}),He("\\bgroup","{"),He("\\egroup","}"),He("\\lq","`"),He("\\rq","'"),He("\\aa","\\r a"),He("\\AA","\\r A"),He("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),He("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),He("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),He("\u212C","\\mathscr{B}"),He("\u2130","\\mathscr{E}"),He("\u2131","\\mathscr{F}"),He("\u210B","\\mathscr{H}"),He("\u2110","\\mathscr{I}"),He("\u2112","\\mathscr{L}"),He("\u2133","\\mathscr{M}"),He("\u211B","\\mathscr{R}"),He("\u212D","\\mathfrak{C}"),He("\u210C","\\mathfrak{H}"),He("\u2128","\\mathfrak{Z}"),He("\\Bbbk","\\Bbb{k}"),He("\xB7","\\cdotp"),He("\\llap","\\mathllap{\\textrm{#1}}"),He("\\rlap","\\mathrlap{\\textrm{#1}}"),He("\\clap","\\mathclap{\\textrm{#1}}"),He("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),He("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),He("\\ne","\\neq"),He("\u2260","\\neq"),He("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),He("\u2209","\\notin"),He("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),He("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),He("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),He("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),He("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),He("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),He("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),He("\u27C2","\\perp"),He("\u203C","\\mathclose{!\\mkern-0.8mu!}"),He("\u220C","\\notni"),He("\u231C","\\ulcorner"),He("\u231D","\\urcorner"),He("\u231E","\\llcorner"),He("\u231F","\\lrcorner"),He("\xA9","\\copyright"),He("\xAE","\\textregistered"),He("\uFE0F","\\textregistered"),He("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),He("\u22EE","\\vdots"),He("\\varGamma","\\mathit{\\Gamma}"),He("\\varDelta","\\mathit{\\Delta}"),He("\\varTheta","\\mathit{\\Theta}"),He("\\varLambda","\\mathit{\\Lambda}"),He("\\varXi","\\mathit{\\Xi}"),He("\\varPi","\\mathit{\\Pi}"),He("\\varSigma","\\mathit{\\Sigma}"),He("\\varUpsilon","\\mathit{\\Upsilon}"),He("\\varPhi","\\mathit{\\Phi}"),He("\\varPsi","\\mathit{\\Psi}"),He("\\varOmega","\\mathit{\\Omega}"),He("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),He("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),He("\\boxed","\\fbox{$\\displaystyle{#1}$}"),He("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),He("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),He("\\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"};He("\\dots",function(Z){var u="\\dotso",f=Z.expandAfterFuture().text;return f in to?u=to[f]:(f.substr(0,4)==="\\not"||f in Je.math&&G.contains(["bin","rel"],Je.math[f].group))&&(u="\\dotsb"),u});var Bs={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};He("\\dotso",function(Z){var u=Z.future().text;return u in Bs?"\\ldots\\,":"\\ldots"}),He("\\dotsc",function(Z){var u=Z.future().text;return u in Bs&&u!==","?"\\ldots\\,":"\\ldots"}),He("\\cdots",function(Z){var u=Z.future().text;return u in Bs?"\\@cdots\\,":"\\@cdots"}),He("\\dotsb","\\cdots"),He("\\dotsm","\\cdots"),He("\\dotsi","\\!\\cdots"),He("\\dotsx","\\ldots\\,"),He("\\DOTSI","\\relax"),He("\\DOTSB","\\relax"),He("\\DOTSX","\\relax"),He("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),He("\\,","\\tmspace+{3mu}{.1667em}"),He("\\thinspace","\\,"),He("\\>","\\mskip{4mu}"),He("\\:","\\tmspace+{4mu}{.2222em}"),He("\\medspace","\\:"),He("\\;","\\tmspace+{5mu}{.2777em}"),He("\\thickspace","\\;"),He("\\!","\\tmspace-{3mu}{.1667em}"),He("\\negthinspace","\\!"),He("\\negmedspace","\\tmspace-{4mu}{.2222em}"),He("\\negthickspace","\\tmspace-{5mu}{.277em}"),He("\\enspace","\\kern.5em "),He("\\enskip","\\hskip.5em\\relax"),He("\\quad","\\hskip1em\\relax"),He("\\qquad","\\hskip2em\\relax"),He("\\tag","\\@ifstar\\tag@literal\\tag@paren"),He("\\tag@paren","\\tag@literal{({#1})}"),He("\\tag@literal",function(Z){if(Z.macros.get("\\df@tag"))throw new g("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),He("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),He("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),He("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),He("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),He("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),He("\\\\","\\newline"),He("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var no=mt["Main-Regular"][84][1]-.7*mt["Main-Regular"][65][1]+"em";He("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+no+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),He("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+no+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),He("\\hspace","\\@ifstar\\@hspacer\\@hspace"),He("\\@hspace","\\hskip #1\\relax"),He("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),He("\\ordinarycolon",":"),He("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),He("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),He("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),He("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),He("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),He("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),He("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),He("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),He("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),He("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),He("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),He("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),He("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),He("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),He("\u2237","\\dblcolon"),He("\u2239","\\eqcolon"),He("\u2254","\\coloneqq"),He("\u2255","\\eqqcolon"),He("\u2A74","\\Coloneqq"),He("\\ratio","\\vcentcolon"),He("\\coloncolon","\\dblcolon"),He("\\colonequals","\\coloneqq"),He("\\coloncolonequals","\\Coloneqq"),He("\\equalscolon","\\eqqcolon"),He("\\equalscoloncolon","\\Eqqcolon"),He("\\colonminus","\\coloneq"),He("\\coloncolonminus","\\Coloneq"),He("\\minuscolon","\\eqcolon"),He("\\minuscoloncolon","\\Eqcolon"),He("\\coloncolonapprox","\\Colonapprox"),He("\\coloncolonsim","\\Colonsim"),He("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),He("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),He("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),He("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),He("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),He("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),He("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),He("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),He("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),He("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),He("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),He("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),He("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),He("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),He("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),He("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),He("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),He("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),He("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),He("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),He("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),He("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),He("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),He("\u27E6","\\llbracket"),He("\u27E7","\\rrbracket"),He("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),He("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),He("\u2983","\\lBrace"),He("\u2984","\\rBrace"),He("\\darr","\\downarrow"),He("\\dArr","\\Downarrow"),He("\\Darr","\\Downarrow"),He("\\lang","\\langle"),He("\\rang","\\rangle"),He("\\uarr","\\uparrow"),He("\\uArr","\\Uparrow"),He("\\Uarr","\\Uparrow"),He("\\N","\\mathbb{N}"),He("\\R","\\mathbb{R}"),He("\\Z","\\mathbb{Z}"),He("\\alef","\\aleph"),He("\\alefsym","\\aleph"),He("\\Alpha","\\mathrm{A}"),He("\\Beta","\\mathrm{B}"),He("\\bull","\\bullet"),He("\\Chi","\\mathrm{X}"),He("\\clubs","\\clubsuit"),He("\\cnums","\\mathbb{C}"),He("\\Complex","\\mathbb{C}"),He("\\Dagger","\\ddagger"),He("\\diamonds","\\diamondsuit"),He("\\empty","\\emptyset"),He("\\Epsilon","\\mathrm{E}"),He("\\Eta","\\mathrm{H}"),He("\\exist","\\exists"),He("\\harr","\\leftrightarrow"),He("\\hArr","\\Leftrightarrow"),He("\\Harr","\\Leftrightarrow"),He("\\hearts","\\heartsuit"),He("\\image","\\Im"),He("\\infin","\\infty"),He("\\Iota","\\mathrm{I}"),He("\\isin","\\in"),He("\\Kappa","\\mathrm{K}"),He("\\larr","\\leftarrow"),He("\\lArr","\\Leftarrow"),He("\\Larr","\\Leftarrow"),He("\\lrarr","\\leftrightarrow"),He("\\lrArr","\\Leftrightarrow"),He("\\Lrarr","\\Leftrightarrow"),He("\\Mu","\\mathrm{M}"),He("\\natnums","\\mathbb{N}"),He("\\Nu","\\mathrm{N}"),He("\\Omicron","\\mathrm{O}"),He("\\plusmn","\\pm"),He("\\rarr","\\rightarrow"),He("\\rArr","\\Rightarrow"),He("\\Rarr","\\Rightarrow"),He("\\real","\\Re"),He("\\reals","\\mathbb{R}"),He("\\Reals","\\mathbb{R}"),He("\\Rho","\\mathrm{P}"),He("\\sdot","\\cdot"),He("\\sect","\\S"),He("\\spades","\\spadesuit"),He("\\sub","\\subset"),He("\\sube","\\subseteq"),He("\\supe","\\supseteq"),He("\\Tau","\\mathrm{T}"),He("\\thetasym","\\vartheta"),He("\\weierp","\\wp"),He("\\Zeta","\\mathrm{Z}"),He("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),He("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),He("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),He("\\blue","\\textcolor{##6495ed}{#1}"),He("\\orange","\\textcolor{##ffa500}{#1}"),He("\\pink","\\textcolor{##ff00af}{#1}"),He("\\red","\\textcolor{##df0030}{#1}"),He("\\green","\\textcolor{##28ae7b}{#1}"),He("\\gray","\\textcolor{gray}{#1}"),He("\\purple","\\textcolor{##9d38bd}{#1}"),He("\\blueA","\\textcolor{##ccfaff}{#1}"),He("\\blueB","\\textcolor{##80f6ff}{#1}"),He("\\blueC","\\textcolor{##63d9ea}{#1}"),He("\\blueD","\\textcolor{##11accd}{#1}"),He("\\blueE","\\textcolor{##0c7f99}{#1}"),He("\\tealA","\\textcolor{##94fff5}{#1}"),He("\\tealB","\\textcolor{##26edd5}{#1}"),He("\\tealC","\\textcolor{##01d1c1}{#1}"),He("\\tealD","\\textcolor{##01a995}{#1}"),He("\\tealE","\\textcolor{##208170}{#1}"),He("\\greenA","\\textcolor{##b6ffb0}{#1}"),He("\\greenB","\\textcolor{##8af281}{#1}"),He("\\greenC","\\textcolor{##74cf70}{#1}"),He("\\greenD","\\textcolor{##1fab54}{#1}"),He("\\greenE","\\textcolor{##0d923f}{#1}"),He("\\goldA","\\textcolor{##ffd0a9}{#1}"),He("\\goldB","\\textcolor{##ffbb71}{#1}"),He("\\goldC","\\textcolor{##ff9c39}{#1}"),He("\\goldD","\\textcolor{##e07d10}{#1}"),He("\\goldE","\\textcolor{##a75a05}{#1}"),He("\\redA","\\textcolor{##fca9a9}{#1}"),He("\\redB","\\textcolor{##ff8482}{#1}"),He("\\redC","\\textcolor{##f9685d}{#1}"),He("\\redD","\\textcolor{##e84d39}{#1}"),He("\\redE","\\textcolor{##bc2612}{#1}"),He("\\maroonA","\\textcolor{##ffbde0}{#1}"),He("\\maroonB","\\textcolor{##ff92c6}{#1}"),He("\\maroonC","\\textcolor{##ed5fa6}{#1}"),He("\\maroonD","\\textcolor{##ca337c}{#1}"),He("\\maroonE","\\textcolor{##9e034e}{#1}"),He("\\purpleA","\\textcolor{##ddd7ff}{#1}"),He("\\purpleB","\\textcolor{##c6b9fc}{#1}"),He("\\purpleC","\\textcolor{##aa87ff}{#1}"),He("\\purpleD","\\textcolor{##7854ab}{#1}"),He("\\purpleE","\\textcolor{##543b78}{#1}"),He("\\mintA","\\textcolor{##f5f9e8}{#1}"),He("\\mintB","\\textcolor{##edf2df}{#1}"),He("\\mintC","\\textcolor{##e0e5cc}{#1}"),He("\\grayA","\\textcolor{##f6f7f7}{#1}"),He("\\grayB","\\textcolor{##f0f1f2}{#1}"),He("\\grayC","\\textcolor{##e3e5e6}{#1}"),He("\\grayD","\\textcolor{##d6d8da}{#1}"),He("\\grayE","\\textcolor{##babec2}{#1}"),He("\\grayF","\\textcolor{##888d93}{#1}"),He("\\grayG","\\textcolor{##626569}{#1}"),He("\\grayH","\\textcolor{##3b3e40}{#1}"),He("\\grayI","\\textcolor{##21242c}{#1}"),He("\\kaBlue","\\textcolor{##314453}{#1}"),He("\\kaGreen","\\textcolor{##71B307}{#1}");var Ma={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},ro=function(){function Z(f,m,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=m,this.expansionCount=0,this.feed(f),this.macros=new ko(Po,m.macros),this.mode=y,this.stack=[]}var u=Z.prototype;return u.feed=function(m){this.lexer=new Ja(m,this.settings)},u.switchMode=function(m){this.mode=m},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(m){this.stack.push(m)},u.pushTokens=function(m){var y;(y=this.stack).push.apply(y,m)},u.consumeSpaces=function(){for(;;){var m=this.future();if(m.text===" ")this.stack.pop();else break}},u.consumeArgs=function(m){for(var y=[],R=0;R<m;++R){this.consumeSpaces();var V=this.popToken();if(V.text==="{"){for(var _e=[],ke=1;ke!==0;){var et=this.popToken();if(_e.push(et),et.text==="{")++ke;else if(et.text==="}")--ke;else if(et.text==="EOF")throw new g("End of input in macro argument",V)}_e.pop(),_e.reverse(),y[R]=_e}else{if(V.text==="EOF")throw new g("End of input expecting macro argument");y[R]=[V]}}return y},u.expandOnce=function(){var m=this.popToken(),y=m.text,R=this._getExpansion(y);if(R==null)return this.pushToken(m),m;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new g("Too many expansions: infinite loop or need to increase maxExpand setting");var V=R.tokens;if(R.numArgs){var _e=this.consumeArgs(R.numArgs);V=V.slice();for(var ke=V.length-1;ke>=0;--ke){var et=V[ke];if(et.text==="#"){if(ke===0)throw new g("Incomplete placeholder at end of macro body",et);if(et=V[--ke],et.text==="#")V.splice(ke+1,1);else if(/^[1-9]$/.test(et.text)){var ft;(ft=V).splice.apply(ft,[ke,2].concat(_e[+et.text-1]))}else throw new g("Not a valid argument number",et)}}}return this.pushTokens(V),V},u.expandAfterFuture=function(){return this.expandOnce(),this.future()},u.expandNextToken=function(){for(;;){var m=this.expandOnce();if(m instanceof ye)if(m.text==="\\relax")this.stack.pop();else return this.stack.pop()}throw new Error},u.expandMacro=function(m){if(this.macros.get(m)){var y=[],R=this.stack.length;for(this.pushToken(new ye(m));this.stack.length>R;){var V=this.expandOnce();V instanceof ye&&y.push(this.stack.pop())}return y}},u.expandMacroAsText=function(m){var y=this.expandMacro(m);return y&&y.map(function(R){return R.text}).join("")},u._getExpansion=function(m){var y=this.macros.get(m);if(y==null)return y;var R=typeof y=="function"?y(this):y;if(typeof R=="string"){var V=0;if(R.indexOf("#")!==-1)for(var _e=R.replace(/##/g,"");_e.indexOf("#"+(V+1))!==-1;)++V;for(var ke=new Ja(R,this.settings),et=[],ft=ke.lex();ft.text!=="EOF";)et.push(ft),ft=ke.lex();et.reverse();var It={tokens:et,numArgs:V};return It}return R},u.isDefined=function(m){return this.macros.has(m)||Qs.hasOwnProperty(m)||Je.math.hasOwnProperty(m)||Je.text.hasOwnProperty(m)||Ma.hasOwnProperty(m)},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"}},ma={\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"},Ai=function(){function Z(f,m){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(f,m,this.mode),this.settings=m,this.leftrightDepth=0}var u=Z.prototype;return u.expect=function(m,y){if(y===void 0&&(y=!0),this.fetch().text!==m)throw new g("Expected '"+m+"', 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(m){this.mode=m,this.gullet.switchMode(m)},u.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var m=this.parseExpression(!1);return this.expect("EOF"),this.gullet.endGroup(),m},u.parseExpression=function(m,y){for(var R=[];;){this.mode==="math"&&this.consumeSpaces();var V=this.fetch();if(Z.endOfExpression.indexOf(V.text)!==-1||y&&V.text===y||m&&Qs[V.text]&&Qs[V.text].infix)break;var _e=this.parseAtom(y);if(!_e)break;R.push(_e)}return this.mode==="text"&&this.formLigatures(R),this.handleInfixNodes(R)},u.handleInfixNodes=function(m){for(var y=-1,R,V=0;V<m.length;V++){var _e=er(m[V],"infix");if(_e){if(y!==-1)throw new g("only one infix operator per group",_e.token);y=V,R=_e.replaceWith}}if(y!==-1&&R){var ke,et,ft=m.slice(0,y),It=m.slice(y+1);ft.length===1&&ft[0].type==="ordgroup"?ke=ft[0]:ke={type:"ordgroup",mode:this.mode,body:ft},It.length===1&&It[0].type==="ordgroup"?et=It[0]:et={type:"ordgroup",mode:this.mode,body:It};var jt;return R==="\\\\abovefrac"?jt=this.callFunction(R,[ke,m[y],et],[]):jt=this.callFunction(R,[ke,et],[]),[jt]}else return m},u.handleSupSubscript=function(m){var y=this.fetch(),R=y.text;this.consume();var V=this.parseGroup(m,!1,Z.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!V)throw new g("Expected group after '"+R+"'",y);return V},u.formatUnsupportedCmd=function(m){for(var y=[],R=0;R<m.length;R++)y.push({type:"textord",mode:"text",text:m[R]});var V={type:"text",mode:this.mode,body:y},_e={type:"color",mode:this.mode,color:this.settings.errorColor,body:[V]};return _e},u.parseAtom=function(m){var y=this.parseGroup("atom",!1,null,m);if(this.mode==="text")return y;for(var R,V;;){this.consumeSpaces();var _e=this.fetch();if(_e.text==="\\limits"||_e.text==="\\nolimits"){var ke=er(y,"op");if(ke){var et=_e.text==="\\limits";ke.limits=et,ke.alwaysHandleSupSub=!0}else if(ke=er(y,"operatorname"),ke&&ke.alwaysHandleSupSub){var ft=_e.text==="\\limits";ke.limits=ft}else throw new g("Limit controls must follow a math operator",_e);this.consume()}else if(_e.text==="^"){if(R)throw new g("Double superscript",_e);R=this.handleSupSubscript("superscript")}else if(_e.text==="_"){if(V)throw new g("Double subscript",_e);V=this.handleSupSubscript("subscript")}else if(_e.text==="'"){if(R)throw new g("Double superscript",_e);var It={type:"textord",mode:this.mode,text:"\\prime"},jt=[It];for(this.consume();this.fetch().text==="'";)jt.push(It),this.consume();this.fetch().text==="^"&&jt.push(this.handleSupSubscript("superscript")),R={type:"ordgroup",mode:this.mode,body:jt}}else break}return R||V?{type:"supsub",mode:this.mode,base:y,sup:R,sub:V}:y},u.parseFunction=function(m,y,R){var V=this.fetch(),_e=V.text,ke=Qs[_e];if(!ke)return null;if(this.consume(),R!=null&&ke.greediness<=R)throw new g("Got function '"+_e+"' with no arguments"+(y?" as "+y:""),V);if(this.mode==="text"&&!ke.allowedInText)throw new g("Can't use function '"+_e+"' in text mode",V);if(this.mode==="math"&&ke.allowedInMath===!1)throw new g("Can't use function '"+_e+"' in math mode",V);var et=this.parseArguments(_e,ke),ft=et.args,It=et.optArgs;return this.callFunction(_e,ft,It,V,m)},u.callFunction=function(m,y,R,V,_e){var ke={funcName:m,parser:this,token:V,breakOnTokenText:_e},et=Qs[m];if(et&&et.handler)return et.handler(ke,y,R);throw new g("No function handler for "+m)},u.parseArguments=function(m,y){var R=y.numArgs+y.numOptionalArgs;if(R===0)return{args:[],optArgs:[]};for(var V=y.greediness,_e=[],ke=[],et=0;et<R;et++){var ft=y.argTypes&&y.argTypes[et],It=et<y.numOptionalArgs,jt=et>0&&!It||et===0&&!It&&this.mode==="math",nn=this.parseGroupOfType("argument to '"+m+"'",ft,It,V,jt);if(!nn){if(It){ke.push(null);continue}throw new g("Expected group after '"+m+"'",this.fetch())}(It?ke:_e).push(nn)}return{args:_e,optArgs:ke}},u.parseGroupOfType=function(m,y,R,V,_e){switch(y){case"color":return _e&&this.consumeSpaces(),this.parseColorGroup(R);case"size":return _e&&this.consumeSpaces(),this.parseSizeGroup(R);case"url":return this.parseUrlGroup(R,_e);case"math":case"text":return this.parseGroup(m,R,V,void 0,y,_e);case"hbox":{var ke=this.parseGroup(m,R,V,void 0,"text",_e);if(!ke)return ke;var et={type:"styling",mode:ke.mode,body:[ke],style:"text"};return et}case"raw":{if(_e&&this.consumeSpaces(),R&&this.fetch().text==="{")return null;var ft=this.parseStringGroup("raw",R,!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(m,R,V,void 0,void 0,_e);default:throw new g("Unknown group type as "+m,this.fetch())}},u.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},u.parseStringGroup=function(m,y,R){var V=y?"[":"{",_e=y?"]":"}",ke=this.fetch();if(ke.text!==V){if(y)return null;if(R&&ke.text!=="EOF"&&/[^{}[\]]/.test(ke.text))return this.consume(),ke}var et=this.mode;this.mode="text",this.expect(V);for(var ft="",It=this.fetch(),jt=0,nn=It,ln;(ln=this.fetch()).text!==_e||R&&jt>0;){switch(ln.text){case"EOF":throw new g("Unexpected end of input in "+m,It.range(nn,ft));case V:jt++;break;case _e:jt--;break}nn=ln,ft+=nn.text,this.consume()}return this.expect(_e),this.mode=et,It.range(nn,ft)},u.parseRegexGroup=function(m,y){var R=this.mode;this.mode="text";for(var V=this.fetch(),_e=V,ke="",et;(et=this.fetch()).text!=="EOF"&&m.test(ke+et.text);)_e=et,ke+=_e.text,this.consume();if(ke==="")throw new g("Invalid "+y+": '"+V.text+"'",V);return this.mode=R,V.range(_e,ke)},u.parseColorGroup=function(m){var y=this.parseStringGroup("color",m);if(!y)return null;var R=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(y.text);if(!R)throw new g("Invalid color: '"+y.text+"'",y);var V=R[0];return/^[0-9a-f]{6}$/i.test(V)&&(V="#"+V),{type:"color-token",mode:this.mode,color:V}},u.parseSizeGroup=function(m){var y,R=!1;if(!m&&this.fetch().text!=="{"?y=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):y=this.parseStringGroup("size",m),!y)return null;!m&&y.text.length===0&&(y.text="0pt",R=!0);var V=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(y.text);if(!V)throw new g("Invalid size: '"+y.text+"'",y);var _e={number:+(V[1]+V[2]),unit:V[3]};if(!Qn(_e))throw new g("Invalid unit: '"+_e.unit+"'",y);return{type:"size",mode:this.mode,value:_e,isBlank:R}},u.parseUrlGroup=function(m,y){this.gullet.lexer.setCatcode("%",13);var R=this.parseStringGroup("url",m,!0);if(this.gullet.lexer.setCatcode("%",14),!R)return null;var V=R.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:V}},u.parseGroup=function(m,y,R,V,_e,ke){var et=this.mode;_e&&this.switchMode(_e),ke&&this.consumeSpaces();var ft=this.fetch(),It=ft.text,jt;if(y?It==="[":It==="{"||It==="\\begingroup"){this.consume();var nn=Z.endOfGroup[It];this.gullet.beginGroup();var ln=this.parseExpression(!1,nn),vn=this.fetch();this.expect(nn),this.gullet.endGroup(),jt={type:"ordgroup",mode:this.mode,loc:Ee.range(ft,vn),body:ln,semisimple:It==="\\begingroup"||void 0}}else if(y)jt=null;else if(jt=this.parseFunction(V,m,R)||this.parseSymbol(),jt==null&&It[0]==="\\"&&!Ma.hasOwnProperty(It)){if(this.settings.throwOnError)throw new g("Undefined control sequence: "+It,ft);jt=this.formatUnsupportedCmd(It),this.consume()}return _e&&this.switchMode(et),jt},u.formLigatures=function(m){for(var y=m.length-1,R=0;R<y;++R){var V=m[R],_e=V.text;_e==="-"&&m[R+1].text==="-"&&(R+1<y&&m[R+2].text==="-"?(m.splice(R,3,{type:"textord",mode:"text",loc:Ee.range(V,m[R+2]),text:"---"}),y-=2):(m.splice(R,2,{type:"textord",mode:"text",loc:Ee.range(V,m[R+1]),text:"--"}),y-=1)),(_e==="'"||_e==="`")&&m[R+1].text===_e&&(m.splice(R,2,{type:"textord",mode:"text",loc:Ee.range(V,m[R+1]),text:_e+_e}),y-=1)}},u.parseSymbol=function(){var m=this.fetch(),y=m.text;if(/^\\verb[^a-zA-Z]/.test(y)){this.consume();var R=y.slice(5),V=R.charAt(0)==="*";if(V&&(R=R.slice(1)),R.length<2||R.charAt(0)!==R.slice(-1))throw new g(`\\verb assertion failed --
|
|
please report what input caused this bug`);return R=R.slice(1,-1),{type:"verb",mode:"text",body:R,star:V}}ma.hasOwnProperty(y[0])&&!Je[this.mode][y[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+y[0]+'" used in math mode',m),y=ma[y[0]]+y.substr(1));var _e=Lo.exec(y);_e&&(y=y.substring(0,_e.index),y==="i"?y="\u0131":y==="j"&&(y="\u0237"));var ke;if(Je[this.mode][y]){this.settings.strict&&this.mode==="math"&&Rt.indexOf(y)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+y[0]+'" used in math mode',m);var et=Je[this.mode][y].group,ft=Ee.range(m),It;if(vt.hasOwnProperty(et)){var jt=et;It={type:"atom",mode:this.mode,family:jt,loc:ft,text:y}}else It={type:et,mode:this.mode,loc:ft,text:y};ke=It}else if(y.charCodeAt(0)>=128)this.settings.strict&&(Ie(y.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+y[0]+'" used in math mode',m):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+y[0]+'"'+(" ("+y.charCodeAt(0)+")"),m)),ke={type:"textord",mode:"text",loc:Ee.range(m),text:y};else return null;if(this.consume(),_e)for(var nn=0;nn<_e[0].length;nn++){var ln=_e[0][nn];if(!io[ln])throw new g("Unknown accent ' "+ln+"'",m);var vn=io[ln][this.mode];if(!vn)throw new g("Accent "+ln+" unsupported in "+this.mode+" mode",m);ke={type:"accent",mode:this.mode,loc:Ee.range(m),label:vn,isStretchy:!1,isShifty:!0,base:ke}}return ke},Z}();Ai.endOfExpression=["}","\\endgroup","\\end","\\right","&"],Ai.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},Ai.SUPSUB_GREEDINESS=1;var Qi=function(u,f){if(!(typeof u=="string"||u instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var m=new Ai(u,f);delete m.gullet.macros.current["\\df@tag"];var y=m.parse();if(m.gullet.macros.get("\\df@tag")){if(!f.displayMode)throw new g("\\tag works only in display equations");m.gullet.feed("\\df@tag"),y=[{type:"tag",mode:"text",body:y,tag:m.parse()}]}return y},Js=Qi,so=function(u,f,m){f.textContent="";var y=Ba(u,m).toNode();f.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 pa=function(u,f){var m=Ba(u,f).toMarkup();return m},Oo=function(u,f){var m=new D(f);return Js(u,m)},ao=function(u,f,m){if(m.throwOnError||!(u instanceof g))throw u;var y=Tt.makeSpan(["katex-error"],[new fe(f)]);return y.setAttribute("title",u.toString()),y.setAttribute("style","color:"+m.errorColor),y},Ba=function(u,f){var m=new D(f);try{var y=Js(u,m);return Dr(y,u,m)}catch(R){return ao(R,u,m)}},Mo=function(u,f){var m=new D(f);try{var y=Js(u,m);return Pr(y,u,m)}catch(R){return ao(R,u,m)}},oo={version:"0.11.1",render:so,renderToString:pa,ParseError:g,__parse:Oo,__renderToDomTree:Ba,__renderToHTMLTree:Mo,__setFontMetrics:Lt,__defineSymbol:x,__defineMacro:He,__domTree:{Span:We,Anchor:De,SymbolNode:fe,SvgNode:ve,PathNode:Be,LineNode:qe}},Bo=_.default=oo}]).default})},32834:function(Jt){(function(ot,_){Jt.exports=_()})(this,function(){"use strict";function ot(Ae,Me){for(var Xe=0;Xe<Me.length;Xe++){var ee=Me[Xe];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(Ae,ee.key,ee)}}function _(Ae,Me,Xe){return Me&&ot(Ae.prototype,Me),Xe&&ot(Ae,Xe),Ae}function d(Ae,Me){if(Ae){if(typeof Ae=="string")return ge(Ae,Me);var Xe=Object.prototype.toString.call(Ae).slice(8,-1);if(Xe==="Object"&&Ae.constructor&&(Xe=Ae.constructor.name),Xe==="Map"||Xe==="Set")return Array.from(Ae);if(Xe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Xe))return ge(Ae,Me)}}function ge(Ae,Me){(Me==null||Me>Ae.length)&&(Me=Ae.length);for(var Xe=0,ee=new Array(Me);Xe<Me;Xe++)ee[Xe]=Ae[Xe];return ee}function Ee(Ae,Me){var Xe=typeof Symbol!="undefined"&&Ae[Symbol.iterator]||Ae["@@iterator"];if(Xe)return(Xe=Xe.call(Ae)).next.bind(Xe);if(Array.isArray(Ae)||(Xe=d(Ae))||Me&&Ae&&typeof Ae.length=="number"){Xe&&(Ae=Xe);var ee=0;return function(){return ee>=Ae.length?{done:!0}:{done:!1,value:Ae[ee++]}}}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 ye={exports:{}};function W(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function g(Ae){ye.exports.defaults=Ae}ye.exports={defaults:W(),getDefaults:W,changeDefaults:g};var ne=/[&<>"']/,J=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,X=/[<>"']|&(?!#?\w+;)/g,U={"&":"&","<":"<",">":">",'"':""","'":"'"},S=function(Me){return U[Me]};function w(Ae,Me){if(Me){if(ne.test(Ae))return Ae.replace(J,S)}else if(o.test(Ae))return Ae.replace(X,S);return Ae}var A=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function I(Ae){return Ae.replace(A,function(Me,Xe){return Xe=Xe.toLowerCase(),Xe==="colon"?":":Xe.charAt(0)==="#"?Xe.charAt(1)==="x"?String.fromCharCode(parseInt(Xe.substring(2),16)):String.fromCharCode(+Xe.substring(1)):""})}var q=/(^|[^\[])\^/g;function re(Ae,Me){Ae=Ae.source||Ae,Me=Me||"";var Xe={replace:function(oe,xe){return xe=xe.source||xe,xe=xe.replace(q,"$1"),Ae=Ae.replace(oe,xe),Xe},getRegex:function(){return new RegExp(Ae,Me)}};return Xe}var G=/[^\w:]/g,D=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function H(Ae,Me,Xe){if(Ae){var ee;try{ee=decodeURIComponent(I(Xe)).replace(G,"").toLowerCase()}catch(oe){return null}if(ee.indexOf("javascript:")===0||ee.indexOf("vbscript:")===0||ee.indexOf("data:")===0)return null}Me&&!D.test(Xe)&&(Xe=ce(Me,Xe));try{Xe=encodeURI(Xe).replace(/%25/g,"%")}catch(oe){return null}return Xe}var $={},z=/^[^:]+:\/*[^/]*$/,de=/^([^:]+:)[\s\S]*$/,we=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ce(Ae,Me){$[" "+Ae]||(z.test(Ae)?$[" "+Ae]=Ae+"/":$[" "+Ae]=Ve(Ae,"/",!0)),Ae=$[" "+Ae];var Xe=Ae.indexOf(":")===-1;return Me.substring(0,2)==="//"?Xe?Me:Ae.replace(de,"$1")+Me:Me.charAt(0)==="/"?Xe?Me:Ae.replace(we,"$1")+Me:Ae+Me}var Oe={exec:function(){}};function Fe(Ae){for(var Me=1,Xe,ee;Me<arguments.length;Me++){Xe=arguments[Me];for(ee in Xe)Object.prototype.hasOwnProperty.call(Xe,ee)&&(Ae[ee]=Xe[ee])}return Ae}function Ne(Ae,Me){var Xe=Ae.replace(/\|/g,function(xe,ze,F){for(var tt=!1,se=ze;--se>=0&&F[se]==="\\";)tt=!tt;return tt?"|":" |"}),ee=Xe.split(/ \|/),oe=0;if(ee.length>Me)ee.splice(Me);else for(;ee.length<Me;)ee.push("");for(;oe<ee.length;oe++)ee[oe]=ee[oe].trim().replace(/\\\|/g,"|");return ee}function Ve(Ae,Me,Xe){var ee=Ae.length;if(ee===0)return"";for(var oe=0;oe<ee;){var xe=Ae.charAt(ee-oe-1);if(xe===Me&&!Xe)oe++;else if(xe!==Me&&Xe)oe++;else break}return Ae.substr(0,ee-oe)}function K(Ae,Me){if(Ae.indexOf(Me[1])===-1)return-1;for(var Xe=Ae.length,ee=0,oe=0;oe<Xe;oe++)if(Ae[oe]==="\\")oe++;else if(Ae[oe]===Me[0])ee++;else if(Ae[oe]===Me[1]&&(ee--,ee<0))return oe;return-1}function B(Ae){Ae&&Ae.sanitize&&!Ae.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function L(Ae,Me){if(Me<1)return"";for(var Xe="";Me>1;)Me&1&&(Xe+=Ae),Me>>=1,Ae+=Ae;return Xe+Ae}var Y={escape:w,unescape:I,edit:re,cleanUrl:H,resolveUrl:ce,noopTest:Oe,merge:Fe,splitCells:Ne,rtrim:Ve,findClosingBracket:K,checkSanitizeDeprecation:B,repeatString:L},Q=ye.exports.defaults,P=Y.rtrim,b=Y.splitCells,E=Y.escape,N=Y.findClosingBracket;function ie(Ae,Me,Xe){var ee=Me.href,oe=Me.title?E(Me.title):null,xe=Ae[1].replace(/\\([\[\]])/g,"$1");return Ae[0].charAt(0)!=="!"?{type:"link",raw:Xe,href:ee,title:oe,text:xe}:{type:"image",raw:Xe,href:ee,title:oe,text:E(xe)}}function Ie(Ae,Me){var Xe=Ae.match(/^(\s+)(?:```)/);if(Xe===null)return Me;var ee=Xe[1];return Me.split(`
|
|
`).map(function(oe){var xe=oe.match(/^\s+/);if(xe===null)return oe;var ze=xe[0];return ze.length>=ee.length?oe.slice(ee.length):oe}).join(`
|
|
`)}var Ze=function(){function Ae(Xe){this.options=Xe||Q}var Me=Ae.prototype;return Me.space=function(ee){var oe=this.rules.block.newline.exec(ee);if(oe)return oe[0].length>1?{type:"space",raw:oe[0]}:{raw:`
|
|
`}},Me.code=function(ee){var oe=this.rules.block.code.exec(ee);if(oe){var xe=oe[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:oe[0],codeBlockStyle:"indented",text:this.options.pedantic?xe:P(xe,`
|
|
`)}}},Me.fences=function(ee){var oe=this.rules.block.fences.exec(ee);if(oe){var xe=oe[0],ze=Ie(xe,oe[3]||"");return{type:"code",raw:xe,lang:oe[2]?oe[2].trim():oe[2],text:ze}}},Me.heading=function(ee){var oe=this.rules.block.heading.exec(ee);if(oe){var xe=oe[2].trim();if(/#$/.test(xe)){var ze=P(xe,"#");(this.options.pedantic||!ze||/ $/.test(ze))&&(xe=ze.trim())}return{type:"heading",raw:oe[0],depth:oe[1].length,text:xe}}},Me.nptable=function(ee){var oe=this.rules.block.nptable.exec(ee);if(oe){var xe={type:"table",header:b(oe[1].replace(/^ *| *\| *$/g,"")),align:oe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:oe[3]?oe[3].replace(/\n$/,"").split(`
|
|
`):[],raw:oe[0]};if(xe.header.length===xe.align.length){var ze=xe.align.length,F;for(F=0;F<ze;F++)/^ *-+: *$/.test(xe.align[F])?xe.align[F]="right":/^ *:-+: *$/.test(xe.align[F])?xe.align[F]="center":/^ *:-+ *$/.test(xe.align[F])?xe.align[F]="left":xe.align[F]=null;for(ze=xe.cells.length,F=0;F<ze;F++)xe.cells[F]=b(xe.cells[F],xe.header.length);return xe}}},Me.hr=function(ee){var oe=this.rules.block.hr.exec(ee);if(oe)return{type:"hr",raw:oe[0]}},Me.blockquote=function(ee){var oe=this.rules.block.blockquote.exec(ee);if(oe){var xe=oe[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:oe[0],text:xe}}},Me.list=function(ee){var oe=this.rules.block.list.exec(ee);if(oe){var xe=oe[0],ze=oe[2],F=ze.length>1,tt={type:"list",raw:xe,ordered:F,start:F?+ze.slice(0,-1):"",loose:!1,items:[]},se=oe[0].match(this.rules.block.item),it=!1,Ot,Ut,Ht,Xt,Vt,hn,Dn,sn,An,Kt=se.length;Ht=this.rules.block.listItemStart.exec(se[0]);for(var kt=0;kt<Kt;kt++){if(Ot=se[kt],xe=Ot,this.options.pedantic||(An=Ot.match(new RegExp("\\n\\s*\\n {0,"+(Ht[0].length-1)+"}\\S")),An&&(Vt=Ot.length-An.index+se.slice(kt+1).join(`
|
|
`).length,tt.raw=tt.raw.substring(0,tt.raw.length-Vt),Ot=Ot.substring(0,An.index),xe=Ot,Kt=kt+1)),kt!==Kt-1){if(Xt=this.rules.block.listItemStart.exec(se[kt+1]),this.options.pedantic?Xt[1].length>Ht[1].length:Xt[1].length>=Ht[0].length||Xt[1].length>3){se.splice(kt,2,se[kt]+(!this.options.pedantic&&Xt[1].length<Ht[0].length&&!se[kt].match(/\n$/)?"":`
|
|
`)+se[kt+1]),kt--,Kt--;continue}else(!this.options.pedantic||this.options.smartLists?Xt[2][Xt[2].length-1]!==ze[ze.length-1]:F===(Xt[2].length===1))&&(Vt=se.slice(kt+1).join(`
|
|
`).length,tt.raw=tt.raw.substring(0,tt.raw.length-Vt),kt=Kt-1);Ht=Xt}Ut=Ot.length,Ot=Ot.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Ot.indexOf(`
|
|
`)&&(Ut-=Ot.length,Ot=this.options.pedantic?Ot.replace(/^ {1,4}/gm,""):Ot.replace(new RegExp("^ {1,"+Ut+"}","gm"),"")),Ot=P(Ot,`
|
|
`),kt!==Kt-1&&(xe=xe+`
|
|
`),hn=it||/\n\n(?!\s*$)/.test(xe),kt!==Kt-1&&(it=xe.slice(-2)===`
|
|
|
|
`,hn||(hn=it)),hn&&(tt.loose=!0),this.options.gfm&&(Dn=/^\[[ xX]\] /.test(Ot),sn=void 0,Dn&&(sn=Ot[1]!==" ",Ot=Ot.replace(/^\[[ xX]\] +/,""))),tt.items.push({type:"list_item",raw:xe,task:Dn,checked:sn,loose:hn,text:Ot})}return tt}},Me.html=function(ee){var oe=this.rules.block.html.exec(ee);if(oe)return{type:this.options.sanitize?"paragraph":"html",raw:oe[0],pre:!this.options.sanitizer&&(oe[1]==="pre"||oe[1]==="script"||oe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(oe[0]):E(oe[0]):oe[0]}},Me.def=function(ee){var oe=this.rules.block.def.exec(ee);if(oe){oe[3]&&(oe[3]=oe[3].substring(1,oe[3].length-1));var xe=oe[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:xe,raw:oe[0],href:oe[2],title:oe[3]}}},Me.table=function(ee){var oe=this.rules.block.table.exec(ee);if(oe){var xe={type:"table",header:b(oe[1].replace(/^ *| *\| *$/g,"")),align:oe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:oe[3]?oe[3].replace(/\n$/,"").split(`
|
|
`):[]};if(xe.header.length===xe.align.length){xe.raw=oe[0];var ze=xe.align.length,F;for(F=0;F<ze;F++)/^ *-+: *$/.test(xe.align[F])?xe.align[F]="right":/^ *:-+: *$/.test(xe.align[F])?xe.align[F]="center":/^ *:-+ *$/.test(xe.align[F])?xe.align[F]="left":xe.align[F]=null;for(ze=xe.cells.length,F=0;F<ze;F++)xe.cells[F]=b(xe.cells[F].replace(/^ *\| *| *\| *$/g,""),xe.header.length);return xe}}},Me.lheading=function(ee){var oe=this.rules.block.lheading.exec(ee);if(oe)return{type:"heading",raw:oe[0],depth:oe[2].charAt(0)==="="?1:2,text:oe[1]}},Me.paragraph=function(ee){var oe=this.rules.block.paragraph.exec(ee);if(oe)return{type:"paragraph",raw:oe[0],text:oe[1].charAt(oe[1].length-1)===`
|
|
`?oe[1].slice(0,-1):oe[1]}},Me.text=function(ee){var oe=this.rules.block.text.exec(ee);if(oe)return{type:"text",raw:oe[0],text:oe[0]}},Me.escape=function(ee){var oe=this.rules.inline.escape.exec(ee);if(oe)return{type:"escape",raw:oe[0],text:E(oe[1])}},Me.tag=function(ee,oe,xe){var ze=this.rules.inline.tag.exec(ee);if(ze)return!oe&&/^<a /i.test(ze[0])?oe=!0:oe&&/^<\/a>/i.test(ze[0])&&(oe=!1),!xe&&/^<(pre|code|kbd|script)(\s|>)/i.test(ze[0])?xe=!0:xe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ze[0])&&(xe=!1),{type:this.options.sanitize?"text":"html",raw:ze[0],inLink:oe,inRawBlock:xe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ze[0]):E(ze[0]):ze[0]}},Me.link=function(ee){var oe=this.rules.inline.link.exec(ee);if(oe){var xe=oe[2].trim();if(!this.options.pedantic&&/^</.test(xe)){if(!/>$/.test(xe))return;var ze=P(xe.slice(0,-1),"\\");if((xe.length-ze.length)%2===0)return}else{var F=N(oe[2],"()");if(F>-1){var tt=oe[0].indexOf("!")===0?5:4,se=tt+oe[1].length+F;oe[2]=oe[2].substring(0,F),oe[0]=oe[0].substring(0,se).trim(),oe[3]=""}}var it=oe[2],Ot="";if(this.options.pedantic){var Ut=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(it);Ut&&(it=Ut[1],Ot=Ut[3])}else Ot=oe[3]?oe[3].slice(1,-1):"";return it=it.trim(),/^</.test(it)&&(this.options.pedantic&&!/>$/.test(xe)?it=it.slice(1):it=it.slice(1,-1)),ie(oe,{href:it&&it.replace(this.rules.inline._escapes,"$1"),title:Ot&&Ot.replace(this.rules.inline._escapes,"$1")},oe[0])}},Me.reflink=function(ee,oe){var xe;if((xe=this.rules.inline.reflink.exec(ee))||(xe=this.rules.inline.nolink.exec(ee))){var ze=(xe[2]||xe[1]).replace(/\s+/g," ");if(ze=oe[ze.toLowerCase()],!ze||!ze.href){var F=xe[0].charAt(0);return{type:"text",raw:F,text:F}}return ie(xe,ze,xe[0])}},Me.emStrong=function(ee,oe,xe){xe===void 0&&(xe="");var ze=this.rules.inline.emStrong.lDelim.exec(ee);if(ze&&!(ze[3]&&xe.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 F=ze[1]||ze[2]||"";if(!F||F&&(xe===""||this.rules.inline.punctuation.exec(xe))){var tt=ze[0].length-1,se,it,Ot=tt,Ut=0,Ht=ze[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Ht.lastIndex=0,oe=oe.slice(-1*ee.length+tt);(ze=Ht.exec(oe))!=null;)if(se=ze[1]||ze[2]||ze[3]||ze[4]||ze[5]||ze[6],!!se){if(it=se.length,ze[3]||ze[4]){Ot+=it;continue}else if((ze[5]||ze[6])&&tt%3&&!((tt+it)%3)){Ut+=it;continue}if(Ot-=it,!(Ot>0))return it=Math.min(it,it+Ot+Ut),Math.min(tt,it)%2?{type:"em",raw:ee.slice(0,tt+ze.index+it+1),text:ee.slice(1,tt+ze.index+it)}:{type:"strong",raw:ee.slice(0,tt+ze.index+it+1),text:ee.slice(2,tt+ze.index+it-1)}}}}},Me.codespan=function(ee){var oe=this.rules.inline.code.exec(ee);if(oe){var xe=oe[2].replace(/\n/g," "),ze=/[^ ]/.test(xe),F=/^ /.test(xe)&&/ $/.test(xe);return ze&&F&&(xe=xe.substring(1,xe.length-1)),xe=E(xe,!0),{type:"codespan",raw:oe[0],text:xe}}},Me.br=function(ee){var oe=this.rules.inline.br.exec(ee);if(oe)return{type:"br",raw:oe[0]}},Me.del=function(ee){var oe=this.rules.inline.del.exec(ee);if(oe)return{type:"del",raw:oe[0],text:oe[2]}},Me.autolink=function(ee,oe){var xe=this.rules.inline.autolink.exec(ee);if(xe){var ze,F;return xe[2]==="@"?(ze=E(this.options.mangle?oe(xe[1]):xe[1]),F="mailto:"+ze):(ze=E(xe[1]),F=ze),{type:"link",raw:xe[0],text:ze,href:F,tokens:[{type:"text",raw:ze,text:ze}]}}},Me.url=function(ee,oe){var xe;if(xe=this.rules.inline.url.exec(ee)){var ze,F;if(xe[2]==="@")ze=E(this.options.mangle?oe(xe[0]):xe[0]),F="mailto:"+ze;else{var tt;do tt=xe[0],xe[0]=this.rules.inline._backpedal.exec(xe[0])[0];while(tt!==xe[0]);ze=E(xe[0]),xe[1]==="www."?F="http://"+ze:F=ze}return{type:"link",raw:xe[0],text:ze,href:F,tokens:[{type:"text",raw:ze,text:ze}]}}},Me.inlineText=function(ee,oe,xe){var ze=this.rules.inline.text.exec(ee);if(ze){var F;return oe?F=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ze[0]):E(ze[0]):ze[0]:F=E(this.options.smartypants?xe(ze[0]):ze[0]),{type:"text",raw:ze[0],text:F}}},Ae}(),me=Y.noopTest,Ce=Y.edit,Ke=Y.merge,Qe={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:me,table:me,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};Qe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Qe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Qe.def=Ce(Qe.def).replace("label",Qe._label).replace("title",Qe._title).getRegex(),Qe.bullet=/(?:[*+-]|\d{1,9}[.)])/,Qe.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Qe.item=Ce(Qe.item,"gm").replace(/bull/g,Qe.bullet).getRegex(),Qe.listItemStart=Ce(/^( *)(bull) */).replace("bull",Qe.bullet).getRegex(),Qe.list=Ce(Qe.list).replace(/bull/g,Qe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Qe.def.source+")").getRegex(),Qe._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Qe._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Qe.html=Ce(Qe.html,"i").replace("comment",Qe._comment).replace("tag",Qe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qe.paragraph=Ce(Qe._paragraph).replace("hr",Qe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Qe._tag).getRegex(),Qe.blockquote=Ce(Qe.blockquote).replace("paragraph",Qe.paragraph).getRegex(),Qe.normal=Ke({},Qe),Qe.gfm=Ke({},Qe.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Qe.gfm.nptable=Ce(Qe.gfm.nptable).replace("hr",Qe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Qe._tag).getRegex(),Qe.gfm.table=Ce(Qe.gfm.table).replace("hr",Qe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Qe._tag).getRegex(),Qe.pedantic=Ke({},Qe.normal,{html:Ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Qe._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:me,paragraph:Ce(Qe.normal._paragraph).replace("hr",Qe.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",Qe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Ge={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:me,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:me,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Ge._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Ge.punctuation=Ce(Ge.punctuation).replace(/punctuation/g,Ge._punctuation).getRegex(),Ge.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Ge.escapedEmSt=/\\\*|\\_/g,Ge._comment=Ce(Qe._comment).replace("(?:-->|$)","-->").getRegex(),Ge.emStrong.lDelim=Ce(Ge.emStrong.lDelim).replace(/punct/g,Ge._punctuation).getRegex(),Ge.emStrong.rDelimAst=Ce(Ge.emStrong.rDelimAst,"g").replace(/punct/g,Ge._punctuation).getRegex(),Ge.emStrong.rDelimUnd=Ce(Ge.emStrong.rDelimUnd,"g").replace(/punct/g,Ge._punctuation).getRegex(),Ge._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ge._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ge._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])?)+(?![-_])/,Ge.autolink=Ce(Ge.autolink).replace("scheme",Ge._scheme).replace("email",Ge._email).getRegex(),Ge._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ge.tag=Ce(Ge.tag).replace("comment",Ge._comment).replace("attribute",Ge._attribute).getRegex(),Ge._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ge._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Ge._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ge.link=Ce(Ge.link).replace("label",Ge._label).replace("href",Ge._href).replace("title",Ge._title).getRegex(),Ge.reflink=Ce(Ge.reflink).replace("label",Ge._label).getRegex(),Ge.reflinkSearch=Ce(Ge.reflinkSearch,"g").replace("reflink",Ge.reflink).replace("nolink",Ge.nolink).getRegex(),Ge.normal=Ke({},Ge),Ge.pedantic=Ke({},Ge.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:Ce(/^!?\[(label)\]\((.*?)\)/).replace("label",Ge._label).getRegex(),reflink:Ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ge._label).getRegex()}),Ge.gfm=Ke({},Ge.normal,{escape:Ce(Ge.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Ge.gfm.url=Ce(Ge.gfm.url,"i").replace("email",Ge.gfm._extended_email).getRegex(),Ge.breaks=Ke({},Ge.gfm,{br:Ce(Ge.br).replace("{2,}","*").getRegex(),text:Ce(Ge.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var wt={block:Qe,inline:Ge},Ue=Ze,bt=ye.exports.defaults,Le=wt.block,lt=wt.inline,Re=Y.repeatString;function Te(Ae){return Ae.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function pe(Ae){var Me="",Xe,ee,oe=Ae.length;for(Xe=0;Xe<oe;Xe++)ee=Ae.charCodeAt(Xe),Math.random()>.5&&(ee="x"+ee.toString(16)),Me+="&#"+ee+";";return Me}var We=function(){function Ae(Xe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Xe||bt,this.options.tokenizer=this.options.tokenizer||new Ue,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ee={block:Le.normal,inline:lt.normal};this.options.pedantic?(ee.block=Le.pedantic,ee.inline=lt.pedantic):this.options.gfm&&(ee.block=Le.gfm,this.options.breaks?ee.inline=lt.breaks:ee.inline=lt.gfm),this.tokenizer.rules=ee}Ae.lex=function(ee,oe){var xe=new Ae(oe);return xe.lex(ee)},Ae.lexInline=function(ee,oe){var xe=new Ae(oe);return xe.inlineTokens(ee)};var Me=Ae.prototype;return Me.lex=function(ee){return ee=ee.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(ee,this.tokens,!0),this.inline(this.tokens),this.tokens},Me.blockTokens=function(ee,oe,xe){oe===void 0&&(oe=[]),xe===void 0&&(xe=!0),this.options.pedantic&&(ee=ee.replace(/^ +$/gm,""));for(var ze,F,tt,se;ee;){if(ze=this.tokenizer.space(ee)){ee=ee.substring(ze.raw.length),ze.type&&oe.push(ze);continue}if(ze=this.tokenizer.code(ee)){ee=ee.substring(ze.raw.length),se=oe[oe.length-1],se&&se.type==="paragraph"?(se.raw+=`
|
|
`+ze.raw,se.text+=`
|
|
`+ze.text):oe.push(ze);continue}if(ze=this.tokenizer.fences(ee)){ee=ee.substring(ze.raw.length),oe.push(ze);continue}if(ze=this.tokenizer.heading(ee)){ee=ee.substring(ze.raw.length),oe.push(ze);continue}if(ze=this.tokenizer.nptable(ee)){ee=ee.substring(ze.raw.length),oe.push(ze);continue}if(ze=this.tokenizer.hr(ee)){ee=ee.substring(ze.raw.length),oe.push(ze);continue}if(ze=this.tokenizer.blockquote(ee)){ee=ee.substring(ze.raw.length),ze.tokens=this.blockTokens(ze.text,[],xe),oe.push(ze);continue}if(ze=this.tokenizer.list(ee)){for(ee=ee.substring(ze.raw.length),tt=ze.items.length,F=0;F<tt;F++)ze.items[F].tokens=this.blockTokens(ze.items[F].text,[],!1);oe.push(ze);continue}if(ze=this.tokenizer.html(ee)){ee=ee.substring(ze.raw.length),oe.push(ze);continue}if(xe&&(ze=this.tokenizer.def(ee))){ee=ee.substring(ze.raw.length),this.tokens.links[ze.tag]||(this.tokens.links[ze.tag]={href:ze.href,title:ze.title});continue}if(ze=this.tokenizer.table(ee)){ee=ee.substring(ze.raw.length),oe.push(ze);continue}if(ze=this.tokenizer.lheading(ee)){ee=ee.substring(ze.raw.length),oe.push(ze);continue}if(xe&&(ze=this.tokenizer.paragraph(ee))){ee=ee.substring(ze.raw.length),oe.push(ze);continue}if(ze=this.tokenizer.text(ee)){ee=ee.substring(ze.raw.length),se=oe[oe.length-1],se&&se.type==="text"?(se.raw+=`
|
|
`+ze.raw,se.text+=`
|
|
`+ze.text):oe.push(ze);continue}if(ee){var it="Infinite loop on byte: "+ee.charCodeAt(0);if(this.options.silent){console.error(it);break}else throw new Error(it)}}return oe},Me.inline=function(ee){var oe,xe,ze,F,tt,se,it=ee.length;for(oe=0;oe<it;oe++)switch(se=ee[oe],se.type){case"paragraph":case"text":case"heading":{se.tokens=[],this.inlineTokens(se.text,se.tokens);break}case"table":{for(se.tokens={header:[],cells:[]},F=se.header.length,xe=0;xe<F;xe++)se.tokens.header[xe]=[],this.inlineTokens(se.header[xe],se.tokens.header[xe]);for(F=se.cells.length,xe=0;xe<F;xe++)for(tt=se.cells[xe],se.tokens.cells[xe]=[],ze=0;ze<tt.length;ze++)se.tokens.cells[xe][ze]=[],this.inlineTokens(tt[ze],se.tokens.cells[xe][ze]);break}case"blockquote":{this.inline(se.tokens);break}case"list":{for(F=se.items.length,xe=0;xe<F;xe++)this.inline(se.items[xe].tokens);break}}return ee},Me.inlineTokens=function(ee,oe,xe,ze){oe===void 0&&(oe=[]),xe===void 0&&(xe=!1),ze===void 0&&(ze=!1);var F,tt,se=ee,it,Ot,Ut;if(this.tokens.links){var Ht=Object.keys(this.tokens.links);if(Ht.length>0)for(;(it=this.tokenizer.rules.inline.reflinkSearch.exec(se))!=null;)Ht.includes(it[0].slice(it[0].lastIndexOf("[")+1,-1))&&(se=se.slice(0,it.index)+"["+Re("a",it[0].length-2)+"]"+se.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(it=this.tokenizer.rules.inline.blockSkip.exec(se))!=null;)se=se.slice(0,it.index)+"["+Re("a",it[0].length-2)+"]"+se.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(it=this.tokenizer.rules.inline.escapedEmSt.exec(se))!=null;)se=se.slice(0,it.index)+"++"+se.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;ee;){if(Ot||(Ut=""),Ot=!1,F=this.tokenizer.escape(ee)){ee=ee.substring(F.raw.length),oe.push(F);continue}if(F=this.tokenizer.tag(ee,xe,ze)){ee=ee.substring(F.raw.length),xe=F.inLink,ze=F.inRawBlock;var Xt=oe[oe.length-1];Xt&&F.type==="text"&&Xt.type==="text"?(Xt.raw+=F.raw,Xt.text+=F.text):oe.push(F);continue}if(F=this.tokenizer.link(ee)){ee=ee.substring(F.raw.length),F.type==="link"&&(F.tokens=this.inlineTokens(F.text,[],!0,ze)),oe.push(F);continue}if(F=this.tokenizer.reflink(ee,this.tokens.links)){ee=ee.substring(F.raw.length);var Vt=oe[oe.length-1];F.type==="link"?(F.tokens=this.inlineTokens(F.text,[],!0,ze),oe.push(F)):Vt&&F.type==="text"&&Vt.type==="text"?(Vt.raw+=F.raw,Vt.text+=F.text):oe.push(F);continue}if(F=this.tokenizer.emStrong(ee,se,Ut)){ee=ee.substring(F.raw.length),F.tokens=this.inlineTokens(F.text,[],xe,ze),oe.push(F);continue}if(F=this.tokenizer.codespan(ee)){ee=ee.substring(F.raw.length),oe.push(F);continue}if(F=this.tokenizer.br(ee)){ee=ee.substring(F.raw.length),oe.push(F);continue}if(F=this.tokenizer.del(ee)){ee=ee.substring(F.raw.length),F.tokens=this.inlineTokens(F.text,[],xe,ze),oe.push(F);continue}if(F=this.tokenizer.autolink(ee,pe)){ee=ee.substring(F.raw.length),oe.push(F);continue}if(!xe&&(F=this.tokenizer.url(ee,pe))){ee=ee.substring(F.raw.length),oe.push(F);continue}if(F=this.tokenizer.inlineText(ee,ze,Te)){ee=ee.substring(F.raw.length),F.raw.slice(-1)!=="_"&&(Ut=F.raw.slice(-1)),Ot=!0,tt=oe[oe.length-1],tt&&tt.type==="text"?(tt.raw+=F.raw,tt.text+=F.text):oe.push(F);continue}if(ee){var hn="Infinite loop on byte: "+ee.charCodeAt(0);if(this.options.silent){console.error(hn);break}else throw new Error(hn)}}return oe},_(Ae,null,[{key:"rules",get:function(){return{block:Le,inline:lt}}}]),Ae}(),De=ye.exports.defaults,Se=Y.cleanUrl,k=Y.escape,fe=function(){function Ae(Xe){this.options=Xe||De}var Me=Ae.prototype;return Me.code=function(ee,oe,xe){var ze=(oe||"").match(/\S*/)[0];if(this.options.highlight){var F=this.options.highlight(ee,ze);F!=null&&F!==ee&&(xe=!0,ee=F)}return ee=ee.replace(/\n$/,"")+`
|
|
`,ze?'<pre><code class="'+this.options.langPrefix+k(ze,!0)+'">'+(xe?ee:k(ee,!0))+`</code></pre>
|
|
`:"<pre><code>"+(xe?ee:k(ee,!0))+`</code></pre>
|
|
`},Me.blockquote=function(ee){return`<blockquote>
|
|
`+ee+`</blockquote>
|
|
`},Me.html=function(ee){return ee},Me.heading=function(ee,oe,xe,ze){return this.options.headerIds?"<h"+oe+' id="'+this.options.headerPrefix+ze.slug(xe)+'">'+ee+"</h"+oe+`>
|
|
`:"<h"+oe+">"+ee+"</h"+oe+`>
|
|
`},Me.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Me.list=function(ee,oe,xe){var ze=oe?"ol":"ul",F=oe&&xe!==1?' start="'+xe+'"':"";return"<"+ze+F+`>
|
|
`+ee+"</"+ze+`>
|
|
`},Me.listitem=function(ee){return"<li>"+ee+`</li>
|
|
`},Me.checkbox=function(ee){return"<input "+(ee?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Me.paragraph=function(ee){return"<p>"+ee+`</p>
|
|
`},Me.table=function(ee,oe){return oe&&(oe="<tbody>"+oe+"</tbody>"),`<table>
|
|
<thead>
|
|
`+ee+`</thead>
|
|
`+oe+`</table>
|
|
`},Me.tablerow=function(ee){return`<tr>
|
|
`+ee+`</tr>
|
|
`},Me.tablecell=function(ee,oe){var xe=oe.header?"th":"td",ze=oe.align?"<"+xe+' align="'+oe.align+'">':"<"+xe+">";return ze+ee+"</"+xe+`>
|
|
`},Me.strong=function(ee){return"<strong>"+ee+"</strong>"},Me.em=function(ee){return"<em>"+ee+"</em>"},Me.codespan=function(ee){return"<code>"+ee+"</code>"},Me.br=function(){return this.options.xhtml?"<br/>":"<br>"},Me.del=function(ee){return"<del>"+ee+"</del>"},Me.link=function(ee,oe,xe){if(ee=Se(this.options.sanitize,this.options.baseUrl,ee),ee===null)return xe;var ze='<a href="'+k(ee)+'"';return oe&&(ze+=' title="'+oe+'"'),ze+=">"+xe+"</a>",ze},Me.image=function(ee,oe,xe){if(ee=Se(this.options.sanitize,this.options.baseUrl,ee),ee===null)return xe;var ze='<img src="'+ee+'" alt="'+xe+'"';return oe&&(ze+=' title="'+oe+'"'),ze+=this.options.xhtml?"/>":">",ze},Me.text=function(ee){return ee},Ae}(),ve=function(){function Ae(){}var Me=Ae.prototype;return Me.strong=function(ee){return ee},Me.em=function(ee){return ee},Me.codespan=function(ee){return ee},Me.del=function(ee){return ee},Me.html=function(ee){return ee},Me.text=function(ee){return ee},Me.link=function(ee,oe,xe){return""+xe},Me.image=function(ee,oe,xe){return""+xe},Me.br=function(){return""},Ae}(),Be=function(){function Ae(){this.seen={}}var Me=Ae.prototype;return Me.serialize=function(ee){return ee.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Me.getNextSafeSlug=function(ee,oe){var xe=ee,ze=0;if(this.seen.hasOwnProperty(xe)){ze=this.seen[ee];do ze++,xe=ee+"-"+ze;while(this.seen.hasOwnProperty(xe))}return oe||(this.seen[ee]=ze,this.seen[xe]=0),xe},Me.slug=function(ee,oe){oe===void 0&&(oe={});var xe=this.serialize(ee);return this.getNextSafeSlug(xe,oe.dryrun)},Ae}(),qe=fe,at=ve,ct=Be,mt=ye.exports.defaults,dt=Y.unescape,gt=function(){function Ae(Xe){this.options=Xe||mt,this.options.renderer=this.options.renderer||new qe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new at,this.slugger=new ct}Ae.parse=function(ee,oe){var xe=new Ae(oe);return xe.parse(ee)},Ae.parseInline=function(ee,oe){var xe=new Ae(oe);return xe.parseInline(ee)};var Me=Ae.prototype;return Me.parse=function(ee,oe){oe===void 0&&(oe=!0);var xe="",ze,F,tt,se,it,Ot,Ut,Ht,Xt,Vt,hn,Dn,sn,An,Kt,kt,te,he,st=ee.length;for(ze=0;ze<st;ze++)switch(Vt=ee[ze],Vt.type){case"space":continue;case"hr":{xe+=this.renderer.hr();continue}case"heading":{xe+=this.renderer.heading(this.parseInline(Vt.tokens),Vt.depth,dt(this.parseInline(Vt.tokens,this.textRenderer)),this.slugger);continue}case"code":{xe+=this.renderer.code(Vt.text,Vt.lang,Vt.escaped);continue}case"table":{for(Ht="",Ut="",se=Vt.header.length,F=0;F<se;F++)Ut+=this.renderer.tablecell(this.parseInline(Vt.tokens.header[F]),{header:!0,align:Vt.align[F]});for(Ht+=this.renderer.tablerow(Ut),Xt="",se=Vt.cells.length,F=0;F<se;F++){for(Ot=Vt.tokens.cells[F],Ut="",it=Ot.length,tt=0;tt<it;tt++)Ut+=this.renderer.tablecell(this.parseInline(Ot[tt]),{header:!1,align:Vt.align[tt]});Xt+=this.renderer.tablerow(Ut)}xe+=this.renderer.table(Ht,Xt);continue}case"blockquote":{Xt=this.parse(Vt.tokens),xe+=this.renderer.blockquote(Xt);continue}case"list":{for(hn=Vt.ordered,Dn=Vt.start,sn=Vt.loose,se=Vt.items.length,Xt="",F=0;F<se;F++)Kt=Vt.items[F],kt=Kt.checked,te=Kt.task,An="",Kt.task&&(he=this.renderer.checkbox(kt),sn?Kt.tokens.length>0&&Kt.tokens[0].type==="text"?(Kt.tokens[0].text=he+" "+Kt.tokens[0].text,Kt.tokens[0].tokens&&Kt.tokens[0].tokens.length>0&&Kt.tokens[0].tokens[0].type==="text"&&(Kt.tokens[0].tokens[0].text=he+" "+Kt.tokens[0].tokens[0].text)):Kt.tokens.unshift({type:"text",text:he}):An+=he),An+=this.parse(Kt.tokens,sn),Xt+=this.renderer.listitem(An,te,kt);xe+=this.renderer.list(Xt,hn,Dn);continue}case"html":{xe+=this.renderer.html(Vt.text);continue}case"paragraph":{xe+=this.renderer.paragraph(this.parseInline(Vt.tokens));continue}case"text":{for(Xt=Vt.tokens?this.parseInline(Vt.tokens):Vt.text;ze+1<st&&ee[ze+1].type==="text";)Vt=ee[++ze],Xt+=`
|
|
`+(Vt.tokens?this.parseInline(Vt.tokens):Vt.text);xe+=oe?this.renderer.paragraph(Xt):Xt;continue}default:{var Rt='Token with "'+Vt.type+'" type was not found.';if(this.options.silent){console.error(Rt);return}else throw new Error(Rt)}}return xe},Me.parseInline=function(ee,oe){oe=oe||this.renderer;var xe="",ze,F,tt=ee.length;for(ze=0;ze<tt;ze++)switch(F=ee[ze],F.type){case"escape":{xe+=oe.text(F.text);break}case"html":{xe+=oe.html(F.text);break}case"link":{xe+=oe.link(F.href,F.title,this.parseInline(F.tokens,oe));break}case"image":{xe+=oe.image(F.href,F.title,F.text);break}case"strong":{xe+=oe.strong(this.parseInline(F.tokens,oe));break}case"em":{xe+=oe.em(this.parseInline(F.tokens,oe));break}case"codespan":{xe+=oe.codespan(F.text);break}case"br":{xe+=oe.br();break}case"del":{xe+=oe.del(this.parseInline(F.tokens,oe));break}case"text":{xe+=oe.text(F.text);break}default:{var se='Token with "'+F.type+'" type was not found.';if(this.options.silent){console.error(se);return}else throw new Error(se)}}return xe},Ae}(),Lt=We,St=gt,Ct=Ze,nt=fe,vt=ve,pt=Be,be=Y.merge,Je=Y.checkSanitizeDeprecation,x=Y.escape,T=ye.exports.getDefaults,$e=ye.exports.changeDefaults,j=ye.exports.defaults;function ae(Ae,Me,Xe){if(typeof Ae=="undefined"||Ae===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ae!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ae)+", string expected");if(typeof Me=="function"&&(Xe=Me,Me=null),Me=be({},ae.defaults,Me||{}),Je(Me),Xe){var ee=Me.highlight,oe;try{oe=Lt.lex(Ae,Me)}catch(tt){return Xe(tt)}var xe=function(se){var it;if(!se)try{Me.walkTokens&&ae.walkTokens(oe,Me.walkTokens),it=St.parse(oe,Me)}catch(Ot){se=Ot}return Me.highlight=ee,se?Xe(se):Xe(null,it)};if(!ee||ee.length<3||(delete Me.highlight,!oe.length))return xe();var ze=0;ae.walkTokens(oe,function(tt){tt.type==="code"&&(ze++,setTimeout(function(){ee(tt.text,tt.lang,function(se,it){if(se)return xe(se);it!=null&&it!==tt.text&&(tt.text=it,tt.escaped=!0),ze--,ze===0&&xe()})},0))}),ze===0&&xe();return}try{var F=Lt.lex(Ae,Me);return Me.walkTokens&&ae.walkTokens(F,Me.walkTokens),St.parse(F,Me)}catch(tt){if(tt.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Me.silent)return"<p>An error occurred:</p><pre>"+x(tt.message+"",!0)+"</pre>";throw tt}}ae.options=ae.setOptions=function(Ae){return be(ae.defaults,Ae),$e(ae.defaults),ae},ae.getDefaults=T,ae.defaults=j,ae.use=function(Ae){var Me=be({},Ae);if(Ae.renderer&&function(){var ee=ae.defaults.renderer||new nt,oe=function(F){var tt=ee[F];ee[F]=function(){for(var se=arguments.length,it=new Array(se),Ot=0;Ot<se;Ot++)it[Ot]=arguments[Ot];var Ut=Ae.renderer[F].apply(ee,it);return Ut===!1&&(Ut=tt.apply(ee,it)),Ut}};for(var xe in Ae.renderer)oe(xe);Me.renderer=ee}(),Ae.tokenizer&&function(){var ee=ae.defaults.tokenizer||new Ct,oe=function(F){var tt=ee[F];ee[F]=function(){for(var se=arguments.length,it=new Array(se),Ot=0;Ot<se;Ot++)it[Ot]=arguments[Ot];var Ut=Ae.tokenizer[F].apply(ee,it);return Ut===!1&&(Ut=tt.apply(ee,it)),Ut}};for(var xe in Ae.tokenizer)oe(xe);Me.tokenizer=ee}(),Ae.walkTokens){var Xe=ae.defaults.walkTokens;Me.walkTokens=function(ee){Ae.walkTokens(ee),Xe&&Xe(ee)}}ae.setOptions(Me)},ae.walkTokens=function(Ae,Me){for(var Xe=Ee(Ae),ee;!(ee=Xe()).done;){var oe=ee.value;switch(Me(oe),oe.type){case"table":{for(var xe=Ee(oe.tokens.header),ze;!(ze=xe()).done;){var F=ze.value;ae.walkTokens(F,Me)}for(var tt=Ee(oe.tokens.cells),se;!(se=tt()).done;)for(var it=se.value,Ot=Ee(it),Ut;!(Ut=Ot()).done;){var Ht=Ut.value;ae.walkTokens(Ht,Me)}break}case"list":{ae.walkTokens(oe.items,Me);break}default:oe.tokens&&ae.walkTokens(oe.tokens,Me)}}},ae.parseInline=function(Ae,Me){if(typeof Ae=="undefined"||Ae===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Ae!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Ae)+", string expected");Me=be({},ae.defaults,Me||{}),Je(Me);try{var Xe=Lt.lexInline(Ae,Me);return Me.walkTokens&&ae.walkTokens(Xe,Me.walkTokens),St.parseInline(Xe,Me)}catch(ee){if(ee.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Me.silent)return"<p>An error occurred:</p><pre>"+x(ee.message+"",!0)+"</pre>";throw ee}},ae.Parser=St,ae.parser=St.parse,ae.Renderer=nt,ae.TextRenderer=vt,ae.Lexer=Lt,ae.lexer=Lt.lex,ae.Tokenizer=Ct,ae.Slugger=pt,ae.parse=ae;var xt=ae;return xt})},11690:function(Jt){const ot=/[&<>"']/,_=/[&<>"']/g,d=/[<>"']|&(?!#?\w+;)/,ge=/[<>"']|&(?!#?\w+;)/g,Ee={"&":"&","<":"<",">":">",'"':""","'":"'"},ye=ce=>Ee[ce];function W(ce,Oe){if(Oe){if(ot.test(ce))return ce.replace(_,ye)}else if(d.test(ce))return ce.replace(ge,ye);return ce}const g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ne(ce){return ce.replace(g,(Oe,Fe)=>(Fe=Fe.toLowerCase(),Fe==="colon"?":":Fe.charAt(0)==="#"?Fe.charAt(1)==="x"?String.fromCharCode(parseInt(Fe.substring(2),16)):String.fromCharCode(+Fe.substring(1)):""))}const J=/(^|[^\[])\^/g;function o(ce,Oe){ce=ce.source||ce,Oe=Oe||"";const Fe={replace:(Ne,Ve)=>(Ve=Ve.source||Ve,Ve=Ve.replace(J,"$1"),ce=ce.replace(Ne,Ve),Fe),getRegex:()=>new RegExp(ce,Oe)};return Fe}const X=/[^\w:]/g,U=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function S(ce,Oe,Fe){if(ce){let Ne;try{Ne=decodeURIComponent(ne(Fe)).replace(X,"").toLowerCase()}catch(Ve){return null}if(Ne.indexOf("javascript:")===0||Ne.indexOf("vbscript:")===0||Ne.indexOf("data:")===0)return null}Oe&&!U.test(Fe)&&(Fe=re(Oe,Fe));try{Fe=encodeURI(Fe).replace(/%25/g,"%")}catch(Ne){return null}return Fe}const w={},A=/^[^:]+:\/*[^/]*$/,I=/^([^:]+:)[\s\S]*$/,q=/^([^:]+:\/*[^/]*)[\s\S]*$/;function re(ce,Oe){w[" "+ce]||(A.test(ce)?w[" "+ce]=ce+"/":w[" "+ce]=$(ce,"/",!0)),ce=w[" "+ce];const Fe=ce.indexOf(":")===-1;return Oe.substring(0,2)==="//"?Fe?Oe:ce.replace(I,"$1")+Oe:Oe.charAt(0)==="/"?Fe?Oe:ce.replace(q,"$1")+Oe:ce+Oe}const G={exec:function(){}};function D(ce){let Oe=1,Fe,Ne;for(;Oe<arguments.length;Oe++){Fe=arguments[Oe];for(Ne in Fe)Object.prototype.hasOwnProperty.call(Fe,Ne)&&(ce[Ne]=Fe[Ne])}return ce}function H(ce,Oe){const Fe=ce.replace(/\|/g,(K,B,L)=>{let Y=!1,Q=B;for(;--Q>=0&&L[Q]==="\\";)Y=!Y;return Y?"|":" |"}),Ne=Fe.split(/ \|/);let Ve=0;if(Ne.length>Oe)Ne.splice(Oe);else for(;Ne.length<Oe;)Ne.push("");for(;Ve<Ne.length;Ve++)Ne[Ve]=Ne[Ve].trim().replace(/\\\|/g,"|");return Ne}function $(ce,Oe,Fe){const Ne=ce.length;if(Ne===0)return"";let Ve=0;for(;Ve<Ne;){const K=ce.charAt(Ne-Ve-1);if(K===Oe&&!Fe)Ve++;else if(K!==Oe&&Fe)Ve++;else break}return ce.substr(0,Ne-Ve)}function z(ce,Oe){if(ce.indexOf(Oe[1])===-1)return-1;const Fe=ce.length;let Ne=0,Ve=0;for(;Ve<Fe;Ve++)if(ce[Ve]==="\\")Ve++;else if(ce[Ve]===Oe[0])Ne++;else if(ce[Ve]===Oe[1]&&(Ne--,Ne<0))return Ve;return-1}function de(ce){ce&&ce.sanitize&&!ce.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function we(ce,Oe){if(Oe<1)return"";let Fe="";for(;Oe>1;)Oe&1&&(Fe+=ce),Oe>>=1,ce+=ce;return Fe+ce}Jt.exports={escape:W,unescape:ne,edit:o,cleanUrl:S,resolveUrl:re,noopTest:G,merge:D,splitCells:H,rtrim:$,findClosingBracket:z,checkSanitizeDeprecation:de,repeatString:we}},75918:function(Jt,ot,_){"use strict";_.d(ot,{Wi:function(){return g},Z0:function(){return ne},aU:function(){return W},eZ:function(){return o},wY:function(){return J}});var d=_(4348),ge=_(69323),Ee=_(13268),ye=function(X,U,S,w){function A(I){return I instanceof S?I:new S(function(q){q(I)})}return new(S||(S=Promise))(function(I,q){function re(H){try{D(w.next(H))}catch($){q($)}}function G(H){try{D(w.throw(H))}catch($){q($)}}function D(H){H.done?I(H.value):A(H.value).then(re,G)}D((w=w.apply(X,U||[])).next())})};class W extends ge.JT{constructor(U,S="",w="",A=!0,I){super(),this._onDidChange=this._register(new d.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=U,this._label=S,this._cssClass=w,this._enabled=A,this._actionCallback=I}get id(){return this._id}get label(){return this._label}set label(U){this._setLabel(U)}_setLabel(U){this._label!==U&&(this._label=U,this._onDidChange.fire({label:U}))}get tooltip(){return this._tooltip||""}set tooltip(U){this._setTooltip(U)}_setTooltip(U){this._tooltip!==U&&(this._tooltip=U,this._onDidChange.fire({tooltip:U}))}get class(){return this._cssClass}set class(U){this._setClass(U)}_setClass(U){this._cssClass!==U&&(this._cssClass=U,this._onDidChange.fire({class:U}))}get enabled(){return this._enabled}set enabled(U){this._setEnabled(U)}_setEnabled(U){this._enabled!==U&&(this._enabled=U,this._onDidChange.fire({enabled:U}))}get checked(){return this._checked}set checked(U){this._setChecked(U)}_setChecked(U){this._checked!==U&&(this._checked=U,this._onDidChange.fire({checked:U}))}run(U,S){return ye(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(U))})}}class g extends ge.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new d.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new d.Q5),this.onDidRun=this._onDidRun.event}run(U,S){return ye(this,void 0,void 0,function*(){if(!U.enabled)return;this._onBeforeRun.fire({action:U});let w;try{yield this.runAction(U,S)}catch(A){w=A}this._onDidRun.fire({action:U,error:w})})}runAction(U,S){return ye(this,void 0,void 0,function*(){yield U.run(S)})}}class ne extends W{constructor(U){super(ne.ID,U,U?"separator text":"separator"),this.checked=!1,this.enabled=!1}}ne.ID="vs.actions.separator";class J{constructor(U,S,w,A){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=U,this.label=S,this.class=A,this._actions=w}get actions(){return this._actions}dispose(){}run(){return ye(this,void 0,void 0,function*(){})}}class o extends W{constructor(){super(o.ID,Ee.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(Jt,ot,_){"use strict";_.d(ot,{ok:function(){return d}});function d(ge,Ee){if(!ge)throw new Error(Ee?`Assertion failed (${Ee})`:"Assertion Failed")}},52615:function(Jt,ot,_){"use strict";_.d(ot,{CM:function(){return W},JL:function(){return g},dT:function(){return J},fK:function(){return ye},lA:function(){return ne}});var d=_(4348);class ge{constructor(){this._icons=new Map,this._onDidRegister=new d.Q5}add(X){const U=this._icons.get(X.id);U?X.description?U.description=X.description:console.error(`Duplicate registration of codicon ${X.id}`):(this._icons.set(X.id,X),this._onDidRegister.fire(X))}get(X){return this._icons.get(X)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const Ee=new ge,ye=Ee;function W(o,X){return new ne(o,X)}function g(o){return o?o.replace(/\$\((.*?)\)/g,(X,U)=>` ${U} `).trim():""}class ne{constructor(X,U,S){this.id=X,this.definition=U,this.description=S,Ee.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var J;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const X=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function U(A){if(A instanceof ne)return["codicon","codicon-"+A.id];const I=X.exec(A.id);if(!I)return U(ne.error);let[,q,re]=I;const G=["codicon","codicon-"+q];return re&&G.push("codicon-modifier-"+re.substr(1)),G}o.asClassNameArray=U;function S(A){return U(A).join(" ")}o.asClassName=S;function w(A){return"."+U(A).join(".")}o.asCSSSelector=w})(J||(J={})),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"})}(ne||(ne={}))},79881:function(Jt,ot,_){"use strict";_.d(ot,{B8:function(){return U},Cp:function(){return ye},F0:function(){return J},L6:function(){return X},VV:function(){return ne},b1:function(){return o},dL:function(){return Ee},ri:function(){return W}});class d{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(w){setTimeout(()=>{throw w.stack?new Error(w.message+`
|
|
|
|
`+w.stack):w},0)}}emit(w){this.listeners.forEach(A=>{A(w)})}onUnexpectedError(w){this.unexpectedErrorHandler(w),this.emit(w)}onUnexpectedExternalError(w){this.unexpectedErrorHandler(w)}}const ge=new d;function Ee(S){ne(S)||ge.onUnexpectedError(S)}function ye(S){ne(S)||ge.onUnexpectedExternalError(S)}function W(S){if(S instanceof Error){let{name:w,message:A}=S;const I=S.stacktrace||S.stack;return{$isError:!0,name:w,message:A,stack:I}}return S}const g="Canceled";function ne(S){return S instanceof Error&&S.name===g&&S.message===g}function J(){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 X(S){return S?new Error(`Illegal state: ${S}`):new Error("Illegal state")}class U extends Error{constructor(w){super("NotSupported"),w&&(this.message=w)}}},4348:function(Jt,ot,_){"use strict";_.d(ot,{D0:function(){return U},E7:function(){return S},K3:function(){return X},Q5:function(){return o},ZD:function(){return w},ju:function(){return W}});var d=_(79881),ge=_(69323),Ee=_(34502),ye=_(95830),W;(function(A){A.None=()=>ge.JT.None;function I(L){return(Y,Q=null,P)=>{let b=!1,E;return E=L(N=>{if(!b)return E?E.dispose():b=!0,Y.call(Q,N)},null,P),b&&E.dispose(),E}}A.once=I;function q(L,Y){return z((Q,P=null,b)=>L(E=>Q.call(P,Y(E)),null,b))}A.map=q;function re(L,Y){return z((Q,P=null,b)=>L(E=>{Y(E),Q.call(P,E)},null,b))}A.forEach=re;function G(L,Y){return z((Q,P=null,b)=>L(E=>Y(E)&&Q.call(P,E),null,b))}A.filter=G;function D(L){return L}A.signal=D;function H(...L){return(Y,Q=null,P)=>(0,ge.F8)(...L.map(b=>b(E=>Y.call(Q,E),null,P)))}A.any=H;function $(L,Y,Q){let P=Q;return q(L,b=>(P=Y(P,b),P))}A.reduce=$;function z(L){let Y;const Q=new o({onFirstListenerAdd(){Y=L(Q.fire,Q)},onLastListenerRemove(){Y.dispose()}});return Q.event}function de(L,Y,Q=100,P=!1,b){let E,N,ie,Ie=0;const Ze=new o({leakWarningThreshold:b,onFirstListenerAdd(){E=L(me=>{Ie++,N=Y(N,me),P&&!ie&&(Ze.fire(N),N=void 0),clearTimeout(ie),ie=setTimeout(()=>{const Ce=N;N=void 0,ie=void 0,(!P||Ie>1)&&Ze.fire(Ce),Ie=0},Q)})},onLastListenerRemove(){E.dispose()}});return Ze.event}A.debounce=de;function we(L,Y=(Q,P)=>Q===P){let Q=!0,P;return G(L,b=>{const E=Q||!Y(b,P);return Q=!1,P=b,E})}A.latch=we;function ce(L,Y){return[A.filter(L,Y),A.filter(L,Q=>!Y(Q))]}A.split=ce;function Oe(L,Y=!1,Q=[]){let P=Q.slice(),b=L(ie=>{P?P.push(ie):N.fire(ie)});const E=()=>{P&&P.forEach(ie=>N.fire(ie)),P=null},N=new o({onFirstListenerAdd(){b||(b=L(ie=>N.fire(ie)))},onFirstListenerDidAdd(){P&&(Y?setTimeout(E):E())},onLastListenerRemove(){b&&b.dispose(),b=null}});return N.event}A.buffer=Oe;class Fe{constructor(Y){this.event=Y}map(Y){return new Fe(q(this.event,Y))}forEach(Y){return new Fe(re(this.event,Y))}filter(Y){return new Fe(G(this.event,Y))}reduce(Y,Q){return new Fe($(this.event,Y,Q))}latch(){return new Fe(we(this.event))}debounce(Y,Q=100,P=!1,b){return new Fe(de(this.event,Y,Q,P,b))}on(Y,Q,P){return this.event(Y,Q,P)}once(Y,Q,P){return I(this.event)(Y,Q,P)}}function Ne(L){return new Fe(L)}A.chain=Ne;function Ve(L,Y,Q=P=>P){const P=(...ie)=>N.fire(Q(...ie)),b=()=>L.on(Y,P),E=()=>L.removeListener(Y,P),N=new o({onFirstListenerAdd:b,onLastListenerRemove:E});return N.event}A.fromNodeEventEmitter=Ve;function K(L,Y,Q=P=>P){const P=(...ie)=>N.fire(Q(...ie)),b=()=>L.addEventListener(Y,P),E=()=>L.removeEventListener(Y,P),N=new o({onFirstListenerAdd:b,onLastListenerRemove:E});return N.event}A.fromDOMEventEmitter=K;function B(L){return new Promise(Y=>I(L)(Y))}A.toPromise=B})(W||(W={}));class g{constructor(I){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${I}_${g._idPool++}`}start(I){this._stopWatch=new ye.G(!0),this._listenerCount=I}stop(){if(this._stopWatch){const I=this._stopWatch.elapsed();this._elapsedOverall+=I,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${I.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}g._idPool=0;let ne=-1;class J{constructor(I,q=Math.random().toString(18).slice(2,5)){this.customThreshold=I,this.name=q,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(I){let q=ne;if(typeof this.customThreshold=="number"&&(q=this.customThreshold),q<=0||I<q)return;this._stacks||(this._stacks=new Map);const re=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),G=this._stacks.get(re)||0;if(this._stacks.set(re,G+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=q*.5;let D,H=0;for(const[$,z]of this._stacks)(!D||H<z)&&(D=$,H=z);console.warn(`[${this.name}] potential listener LEAK detected, having ${I} listeners already. MOST frequent listener (${H}):`),console.warn(D)}return()=>{const D=this._stacks.get(re)||0;this._stacks.set(re,D-1)}}}class o{constructor(I){var q;this._disposed=!1,this._options=I,this._leakageMon=ne>0?new J(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=(I,q,re)=>{var G;this._listeners||(this._listeners=new Ee.S);const D=this._listeners.isEmpty();D&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const H=this._listeners.push(q?[I,q]:I);D&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,I,q);const $=(G=this._leakageMon)===null||G===void 0?void 0:G.check(this._listeners.size),z=(0,ge.OF)(()=>{$&&$(),this._disposed||(H(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return re instanceof ge.SL?re.add(z):Array.isArray(re)&&re.push(z),z}),this._event}fire(I){var q,re;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Ee.S);for(let G of this._listeners)this._deliveryQueue.push([G,I]);for((q=this._perfMon)===null||q===void 0||q.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[G,D]=this._deliveryQueue.shift();try{typeof G=="function"?G.call(void 0,D):G[0].call(G[1],D)}catch(H){(0,d.dL)(H)}}(re=this._perfMon)===null||re===void 0||re.stop()}}dispose(){var I,q,re,G,D;this._disposed||(this._disposed=!0,(I=this._listeners)===null||I===void 0||I.clear(),(q=this._deliveryQueue)===null||q===void 0||q.clear(),(G=(re=this._options)===null||re===void 0?void 0:re.onLastListenerRemove)===null||G===void 0||G.call(re),(D=this._leakageMon)===null||D===void 0||D.dispose())}}class X extends o{constructor(I){super(I),this._isPaused=0,this._eventQueue=new Ee.S,this._mergeFn=I==null?void 0:I.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const I=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(I))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(I){this._listeners&&(this._isPaused!==0?this._eventQueue.push(I):super.fire(I))}}class U extends X{constructor(I){var q;super(I),this._delay=(q=I.delay)!==null&&q!==void 0?q:100}fire(I){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(I)}}class S{constructor(){this.buffers=[]}wrapEvent(I){return(q,re,G)=>I(D=>{const H=this.buffers[this.buffers.length-1];H?H.push(()=>q.call(re,D)):q.call(re,D)},void 0,G)}bufferEvents(I){const q=[];this.buffers.push(q);const re=I();return this.buffers.pop(),q.forEach(G=>G()),re}}class w{constructor(){this.listening=!1,this.inputEvent=W.None,this.inputEventListener=ge.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(I){this.inputEvent=I,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=I(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Jt,ot,_){"use strict";_.d(ot,{I:function(){return d}});function d(ge){const Ee=this;let ye=!1,W;return function(){return ye||(ye=!0,W=ge.apply(Ee,arguments)),W}}},88226:function(Jt,ot,_){"use strict";_.d(ot,{$:function(){return d}});var d;(function(ge){function Ee(H){return H&&typeof H=="object"&&typeof H[Symbol.iterator]=="function"}ge.is=Ee;const ye=Object.freeze([]);function W(){return ye}ge.empty=W;function*g(H){yield H}ge.single=g;function ne(H){return H||ye}ge.from=ne;function J(H){return!H||H[Symbol.iterator]().next().done===!0}ge.isEmpty=J;function o(H){return H[Symbol.iterator]().next().value}ge.first=o;function X(H,$){for(const z of H)if($(z))return!0;return!1}ge.some=X;function U(H,$){for(const z of H)if($(z))return z}ge.find=U;function*S(H,$){for(const z of H)$(z)&&(yield z)}ge.filter=S;function*w(H,$){let z=0;for(const de of H)yield $(de,z++)}ge.map=w;function*A(...H){for(const $ of H)for(const z of $)yield z}ge.concat=A;function*I(H){for(const $ of H)for(const z of $)yield z}ge.concatNested=I;function q(H,$,z){let de=z;for(const we of H)de=$(de,we);return de}ge.reduce=q;function*re(H,$,z=H.length){for($<0&&($+=H.length),z<0?z+=H.length:z>H.length&&(z=H.length);$<z;$++)yield H[$]}ge.slice=re;function G(H,$=Number.POSITIVE_INFINITY){const z=[];if($===0)return[z,H];const de=H[Symbol.iterator]();for(let we=0;we<$;we++){const ce=de.next();if(ce.done)return[z,ge.empty()];z.push(ce.value)}return[z,{[Symbol.iterator](){return de}}]}ge.consume=G;function D(H,$,z=(de,we)=>de===we){const de=H[Symbol.iterator](),we=$[Symbol.iterator]();for(;;){const ce=de.next(),Oe=we.next();if(ce.done!==Oe.done)return!1;if(ce.done)return!0;if(!z(ce.value,Oe.value))return!1}}ge.equals=D})(d||(d={}))},69323:function(Jt,ot,_){"use strict";_.d(ot,{B9:function(){return w},F8:function(){return A},JT:function(){return re},Jz:function(){return D},OF:function(){return I},SL:function(){return q},Wf:function(){return S},XK:function(){return G},dk:function(){return X}});var d=_(17845),ge=_(88226);const Ee=!1;let ye=null;function W(H){ye=H}if(Ee){const H="__is_disposable_tracked__";W(new class{trackDisposable($){const z=new Error("Potentially leaked disposable").stack;setTimeout(()=>{$[H]||console.log(z)},3e3)}setParent($,z){if($&&$!==re.None)try{$[H]=!0}catch(de){}}markAsDisposed($){if($&&$!==re.None)try{$[H]=!0}catch(z){}}markAsSingleton($){}})}function g(H){return ye==null||ye.trackDisposable(H),H}function ne(H){ye==null||ye.markAsDisposed(H)}function J(H,$){ye==null||ye.setParent(H,$)}function o(H,$){if(ye)for(const z of H)ye.setParent(z,$)}function X(H){return ye==null||ye.markAsSingleton(H),H}class U extends Error{constructor($){super(`Encountered errors while disposing of store. Errors: [${$.join(", ")}]`),this.errors=$}}function S(H){return typeof H.dispose=="function"&&H.dispose.length===0}function w(H){if(ge.$.is(H)){let $=[];for(const z of H)if(z)try{z.dispose()}catch(de){$.push(de)}if($.length===1)throw $[0];if($.length>1)throw new U($);return Array.isArray(H)?[]:H}else if(H)return H.dispose(),H}function A(...H){const $=I(()=>w(H));return o(H,$),$}function I(H){const $=g({dispose:(0,d.I)(()=>{ne($),H()})});return $}class q{constructor(){this._toDispose=new Set,this._isDisposed=!1,g(this)}dispose(){this._isDisposed||(ne(this),this._isDisposed=!0,this.clear())}clear(){try{w(this._toDispose.values())}finally{this._toDispose.clear()}}add($){if(!$)return $;if($===this)throw new Error("Cannot register a disposable on itself!");return J($,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($),$}}q.DISABLE_DISPOSED_WARNING=!1;class re{constructor(){this._store=new q,g(this),J(this._store,this)}dispose(){ne(this),this._store.dispose()}_register($){if($===this)throw new Error("Cannot register a disposable on itself!");return this._store.add($)}}re.None=Object.freeze({dispose(){}});class G{constructor(){this._isDisposed=!1,g(this)}get value(){return this._isDisposed?void 0:this._value}set value($){var z;this._isDisposed||$===this._value||((z=this._value)===null||z===void 0||z.dispose(),$&&J($,this),this._value=$)}clear(){this.value=void 0}dispose(){var $;this._isDisposed=!0,ne(this),($=this._value)===null||$===void 0||$.dispose(),this._value=void 0}clearAndLeak(){const $=this._value;return this._value=void 0,$&&J($,null),$}}class D{constructor($){this.object=$}dispose(){}}},34502:function(Jt,ot,_){"use strict";_.d(ot,{S:function(){return ge}});class d{constructor(ye){this.element=ye,this.next=d.Undefined,this.prev=d.Undefined}}d.Undefined=new d(void 0);class ge{constructor(){this._first=d.Undefined,this._last=d.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===d.Undefined}clear(){let ye=this._first;for(;ye!==d.Undefined;){const W=ye.next;ye.prev=d.Undefined,ye.next=d.Undefined,ye=W}this._first=d.Undefined,this._last=d.Undefined,this._size=0}unshift(ye){return this._insert(ye,!1)}push(ye){return this._insert(ye,!0)}_insert(ye,W){const g=new d(ye);if(this._first===d.Undefined)this._first=g,this._last=g;else if(W){const J=this._last;this._last=g,g.prev=J,J.next=g}else{const J=this._first;this._first=g,g.next=J,J.prev=g}this._size+=1;let ne=!1;return()=>{ne||(ne=!0,this._remove(g))}}shift(){if(this._first!==d.Undefined){const ye=this._first.element;return this._remove(this._first),ye}}pop(){if(this._last!==d.Undefined){const ye=this._last.element;return this._remove(this._last),ye}}_remove(ye){if(ye.prev!==d.Undefined&&ye.next!==d.Undefined){const W=ye.prev;W.next=ye.next,ye.next.prev=W}else ye.prev===d.Undefined&&ye.next===d.Undefined?(this._first=d.Undefined,this._last=d.Undefined):ye.next===d.Undefined?(this._last=this._last.prev,this._last.next=d.Undefined):ye.prev===d.Undefined&&(this._first=this._first.next,this._first.prev=d.Undefined);this._size-=1}*[Symbol.iterator](){let ye=this._first;for(;ye!==d.Undefined;)yield ye.element,ye=ye.next}}},23345:function(Jt,ot,_){"use strict";_.d(ot,{$L:function(){return de},ED:function(){return D},IJ:function(){return $},OS:function(){return Fe},WE:function(){return ce},dz:function(){return H},gn:function(){return we},li:function(){return I},r:function(){return K},tY:function(){return z},xS:function(){return Oe}});var d=_(97671),ge;const Ee="en";let ye=!1,W=!1,g=!1,ne=!1,J=!1,o=!1,X=!1,U,S=null,w=null,A;const I=typeof self=="object"?self:typeof _.g=="object"?_.g:{};let q;typeof I.vscode!="undefined"&&typeof I.vscode.process!="undefined"?q=I.vscode.process:typeof d!="undefined"&&(q=d);const re=typeof((ge=q==null?void 0:q.versions)===null||ge===void 0?void 0:ge.electron)=="string"&&q.type==="renderer";if(typeof navigator=="object"&&!re)A=navigator.userAgent,ye=A.indexOf("Windows")>=0,W=A.indexOf("Macintosh")>=0,X=(A.indexOf("Macintosh")>=0||A.indexOf("iPad")>=0||A.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,g=A.indexOf("Linux")>=0,o=!0,U=navigator.language,S=U;else if(typeof q=="object"){ye=q.platform==="win32",W=q.platform==="darwin",g=q.platform==="linux",ne=g&&!!q.env.SNAP&&!!q.env.SNAP_REVISION,U=Ee,S=Ee;const B=q.env.VSCODE_NLS_CONFIG;if(B)try{const L=JSON.parse(B),Y=L.availableLanguages["*"];U=L.locale,S=Y||Ee,w=L._translationsConfigFile}catch(L){}J=!0}else console.error("Unable to resolve platform.");let G=0;W?G=1:ye?G=3:g&&(G=2);const D=ye,H=W,$=g,z=J,de=o,we=X,ce=A,Oe=function(){if(I.setImmediate)return I.setImmediate.bind(I);if(typeof I.postMessage=="function"&&!I.importScripts){let Y=[];I.addEventListener("message",P=>{if(P.data&&P.data.vscodeSetImmediateId)for(let b=0,E=Y.length;b<E;b++){const N=Y[b];if(N.id===P.data.vscodeSetImmediateId){Y.splice(b,1),N.callback();return}}});let Q=0;return P=>{const b=++Q;Y.push({id:b,callback:P}),I.postMessage({vscodeSetImmediateId:b},"*")}}if(typeof(q==null?void 0:q.nextTick)=="function")return q.nextTick.bind(q);const L=Promise.resolve();return Y=>L.then(Y)}(),Fe=W||X?2:ye?1:3;let Ne=!0,Ve=!1;function K(){if(!Ve){Ve=!0;const B=new Uint8Array(2);B[0]=1,B[1]=2,Ne=new Uint16Array(B.buffer)[0]===513}return Ne}},95830:function(Jt,ot,_){"use strict";_.d(ot,{G:function(){return Ee}});var d=_(23345);const ge=d.li.performance&&typeof d.li.performance.now=="function";class Ee{constructor(W){this._highResolution=ge&&W,this._startTime=this._now(),this._stopTime=-1}static create(W=!0){return new Ee(W)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?d.li.performance.now():Date.now()}}},82983:function(Jt,ot,_){"use strict";_.d(ot,{$i:function(){return Ie},C8:function(){return Qe},GF:function(){return U},HO:function(){return Q},IO:function(){return S},K7:function(){return Ke},Kw:function(){return Ue},LC:function(){return I},Mh:function(){return Oe},P1:function(){return Fe},PJ:function(){return bt},Qe:function(){return Ze},R1:function(){return X},RP:function(){return N},S6:function(){return Le},TT:function(){return D},Ut:function(){return b},V8:function(){return q},WU:function(){return Ee},YK:function(){return Ve},YU:function(){return ye},ZG:function(){return Ne},ZH:function(){return B},ab:function(){return me},c1:function(){return Ge},df:function(){return de},ec:function(){return W},fi:function(){return lt},fy:function(){return g},j3:function(){return ne},j_:function(){return $},m5:function(){return d},mK:function(){return z},mr:function(){return w},oH:function(){return pe},oL:function(){return J},ok:function(){return ce},ow:function(){return re},qq:function(){return we},qu:function(){return G},rL:function(){return K},uS:function(){return wt},un:function(){return o},uq:function(){return A},vH:function(){return Y},xe:function(){return Ce},zY:function(){return H}});function d(k){return!k||typeof k!="string"?!0:k.trim().length===0}const ge=/{(\d+)}/g;function Ee(k,...fe){return fe.length===0?k:k.replace(ge,function(ve,Be){const qe=parseInt(Be,10);return isNaN(qe)||qe<0||qe>=fe.length?ve:fe[qe]})}function ye(k){return k.replace(/[<>&]/g,function(fe){switch(fe){case"<":return"<";case">":return">";case"&":return"&";default:return fe}})}function W(k){return k.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function g(k,fe=" "){const ve=ne(k,fe);return J(ve,fe)}function ne(k,fe){if(!k||!fe)return k;const ve=fe.length;if(ve===0||k.length===0)return k;let Be=0;for(;k.indexOf(fe,Be)===Be;)Be=Be+ve;return k.substring(Be)}function J(k,fe){if(!k||!fe)return k;const ve=fe.length,Be=k.length;if(ve===0||Be===0)return k;let qe=Be,at=-1;for(;at=k.lastIndexOf(fe,qe-1),!(at===-1||at+ve!==qe);){if(at===0)return"";qe=at}return k.substring(0,qe)}function o(k){return k.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function X(k){return k.replace(/\*/g,"")}function U(k,fe,ve={}){if(!k)throw new Error("Cannot create regex from empty string");fe||(k=W(k)),ve.wholeWord&&(/\B/.test(k.charAt(0))||(k="\\b"+k),/\B/.test(k.charAt(k.length-1))||(k=k+"\\b"));let Be="";return ve.global&&(Be+="g"),ve.matchCase||(Be+="i"),ve.multiline&&(Be+="m"),ve.unicode&&(Be+="u"),new RegExp(k,Be)}function S(k){return k.source==="^"||k.source==="^$"||k.source==="$"||k.source==="^\\s*$"?!1:!!(k.exec("")&&k.lastIndex===0)}function w(k){return(k.global?"g":"")+(k.ignoreCase?"i":"")+(k.multiline?"m":"")+(k.unicode?"u":"")}function A(k){return k.split(/\r\n|\r|\n/)}function I(k){for(let fe=0,ve=k.length;fe<ve;fe++){const Be=k.charCodeAt(fe);if(Be!==32&&Be!==9)return fe}return-1}function q(k,fe=0,ve=k.length){for(let Be=fe;Be<ve;Be++){const qe=k.charCodeAt(Be);if(qe!==32&&qe!==9)return k.substring(fe,Be)}return k.substring(fe,ve)}function re(k,fe=k.length-1){for(let ve=fe;ve>=0;ve--){const Be=k.charCodeAt(ve);if(Be!==32&&Be!==9)return ve}return-1}function G(k,fe){return k<fe?-1:k>fe?1:0}function D(k,fe,ve=0,Be=k.length,qe=0,at=fe.length){for(;ve<Be&&qe<at;ve++,qe++){let dt=k.charCodeAt(ve),gt=fe.charCodeAt(qe);if(dt<gt)return-1;if(dt>gt)return 1}const ct=Be-ve,mt=at-qe;return ct<mt?-1:ct>mt?1:0}function H(k,fe){return $(k,fe,0,k.length,0,fe.length)}function $(k,fe,ve=0,Be=k.length,qe=0,at=fe.length){for(;ve<Be&&qe<at;ve++,qe++){let dt=k.charCodeAt(ve),gt=fe.charCodeAt(qe);if(dt===gt)continue;if(dt>=128||gt>=128)return D(k.toLowerCase(),fe.toLowerCase(),ve,Be,qe,at);z(dt)&&(dt-=32),z(gt)&&(gt-=32);const Lt=dt-gt;if(Lt!==0)return Lt}const ct=Be-ve,mt=at-qe;return ct<mt?-1:ct>mt?1:0}function z(k){return k>=97&&k<=122}function de(k){return k>=65&&k<=90}function we(k,fe){return k.length===fe.length&&$(k,fe)===0}function ce(k,fe){const ve=fe.length;return fe.length>k.length?!1:$(k,fe,0,ve)===0}function Oe(k,fe){let ve,Be=Math.min(k.length,fe.length);for(ve=0;ve<Be;ve++)if(k.charCodeAt(ve)!==fe.charCodeAt(ve))return ve;return Be}function Fe(k,fe){let ve,Be=Math.min(k.length,fe.length);const qe=k.length-1,at=fe.length-1;for(ve=0;ve<Be;ve++)if(k.charCodeAt(qe-ve)!==fe.charCodeAt(at-ve))return ve;return Be}function Ne(k){return 55296<=k&&k<=56319}function Ve(k){return 56320<=k&&k<=57343}function K(k,fe){return(k-55296<<10)+(fe-56320)+65536}function B(k,fe,ve){const Be=k.charCodeAt(ve);if(Ne(Be)&&ve+1<fe){const qe=k.charCodeAt(ve+1);if(Ve(qe))return K(Be,qe)}return Be}function L(k,fe){const ve=k.charCodeAt(fe-1);if(Ve(ve)&&fe>1){const Be=k.charCodeAt(fe-2);if(Ne(Be))return K(Be,ve)}return ve}function Y(k,fe){const ve=Re.getInstance(),Be=fe,qe=k.length,at=B(k,qe,fe);fe+=at>=65536?2:1;let ct=ve.getGraphemeBreakType(at);for(;fe<qe;){const mt=B(k,qe,fe),dt=ve.getGraphemeBreakType(mt);if(lt(ct,dt))break;fe+=mt>=65536?2:1,ct=dt}return fe-Be}function Q(k,fe){const ve=Re.getInstance(),Be=fe,qe=L(k,fe);fe-=qe>=65536?2:1;let at=ve.getGraphemeBreakType(qe);for(;fe>0;){const ct=L(k,fe),mt=ve.getGraphemeBreakType(ct);if(lt(mt,at))break;fe-=ct>=65536?2:1,at=mt}return Be-fe}const P=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function b(k){return P.test(k)}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 N(k){return E.test(k)}const ie=/^[\t\n\r\x20-\x7E]*$/;function Ie(k){return ie.test(k)}const Ze=/[\u2028\u2029]/;function me(k){return Ze.test(k)}function Ce(k){for(let fe=0,ve=k.length;fe<ve;fe++)if(Ke(k.charCodeAt(fe)))return!0;return!1}function Ke(k){return k=+k,k>=11904&&k<=55215||k>=63744&&k<=64255||k>=65281&&k<=65374}function Qe(k){return k>=127462&&k<=127487||k===8986||k===8987||k===9200||k===9203||k>=9728&&k<=10175||k===11088||k===11093||k>=127744&&k<=128591||k>=128640&&k<=128764||k>=128992&&k<=129003||k>=129280&&k<=129535||k>=129648&&k<=129750}const Ge="\uFEFF";function wt(k){return!!(k&&k.length>0&&k.charCodeAt(0)===65279)}function Ue(k,fe=!1){return k?(fe&&(k=k.replace(/\\./g,"")),k.toLowerCase()!==k):!1}function bt(k){return k=k%(2*26),k<26?String.fromCharCode(97+k):String.fromCharCode(65+k-26)}function Le(k){return Re.getInstance().getGraphemeBreakType(k)}function lt(k,fe){return k===0?fe!==5&&fe!==7:k===2&&fe===3?!1:k===4||k===2||k===3||fe===4||fe===2||fe===3?!0:!(k===8&&(fe===8||fe===9||fe===11||fe===12)||(k===11||k===9)&&(fe===9||fe===10)||(k===12||k===10)&&fe===10||fe===5||fe===13||fe===7||k===1||k===13&&fe===14||k===6&&fe===6)}class Re{constructor(){this._data=Te()}static getInstance(){return Re._INSTANCE||(Re._INSTANCE=new Re),Re._INSTANCE}getGraphemeBreakType(fe){if(fe<32)return fe===10?3:fe===13?2:4;if(fe<127)return 0;const ve=this._data,Be=ve.length/3;let qe=1;for(;qe<=Be;)if(fe<ve[3*qe])qe=2*qe;else if(fe>ve[3*qe+1])qe=2*qe+1;else return ve[3*qe+2];return 0}}Re._INSTANCE=null;function Te(){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 pe(k,fe){if(k===0)return 0;const ve=We(k,fe);if(ve!==void 0)return ve;const Be=L(fe,k);return k-=De(Be),k}function We(k,fe){let ve=L(fe,k);for(k-=De(ve);Se(ve)||ve===65039||ve===8419;){if(k===0)return;ve=L(fe,k),k-=De(ve)}if(Qe(ve)){if(k>=0){const Be=L(fe,k);Be===8205&&(k-=De(Be))}return k}}function De(k){return k>=65536?2:1}function Se(k){return 127995<=k&&k<=127999}},72999:function(Jt,ot,_){"use strict";_.d(ot,{$E:function(){return I},$K:function(){return ne},D8:function(){return S},HD:function(){return ge},IU:function(){return q},Jp:function(){return J},Kn:function(){return Ee},cW:function(){return X},f6:function(){return re},hj:function(){return ye},jn:function(){return W},kJ:function(){return d},mf:function(){return U},o8:function(){return g},p_:function(){return o},vE:function(){return G}});function d(D){return Array.isArray(D)}function ge(D){return typeof D=="string"}function Ee(D){return typeof D=="object"&&D!==null&&!Array.isArray(D)&&!(D instanceof RegExp)&&!(D instanceof Date)}function ye(D){return typeof D=="number"&&!isNaN(D)}function W(D){return D===!0||D===!1}function g(D){return typeof D=="undefined"}function ne(D){return!J(D)}function J(D){return g(D)||D===null}function o(D,H){if(!D)throw new Error(H?`Unexpected type, expected '${H}'`:"Unexpected type")}function X(D){if(J(D))throw new Error("Assertion Failed: argument is undefined or null");return D}function U(D){return typeof D=="function"}function S(D,H){const $=Math.min(D.length,H.length);for(let z=0;z<$;z++)w(D[z],H[z])}function w(D,H){if(ge(H)){if(typeof D!==H)throw new Error(`argument does not match constraint: typeof ${H}`)}else if(U(H)){try{if(D instanceof H)return}catch($){}if(!J(D)&&D.constructor===H||H.length===1&&H.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 A(D){let H=[],$=Object.getPrototypeOf(D);for(;Object.prototype!==$;)H=H.concat(Object.getOwnPropertyNames($)),$=Object.getPrototypeOf($);return H}function I(D){const H=[];for(const $ of A(D))typeof D[$]=="function"&&H.push($);return H}function q(D,H){const $=de=>function(){const we=Array.prototype.slice.call(arguments,0);return H(de,we)};let z={};for(const de of D)z[de]=$(de);return z}function re(D){return D===null?void 0:D}function G(D,H="Unreachable"){throw new Error(H)}},13268:function(Jt,ot,_){"use strict";_.d(ot,{N:function(){return ge}});function d(Ee,ye){let W;return ye.length===0?W=Ee:W=Ee.replace(/\{(\d+)\}/g,function(g,ne){const J=ne[0];return typeof ye[J]!="undefined"?ye[J]:g}),W}function ge(Ee,ye,...W){return d(ye,W)}},96236:function(Jt,ot,_){"use strict";_.d(ot,{BH:function(){return q},NZ:function(){return re},U8:function(){return G},co:function(){return I},eH:function(){return A},vr:function(){return w}});var d=_(75918),ge=_(52615),Ee=_(4348),ye=_(88226),W=_(69323),g=_(34502),ne=_(35884),J=_(90689),o=_(16925),X=_(49055),U=function(D,H,$,z){var de=arguments.length,we=de<3?H:z===null?z=Object.getOwnPropertyDescriptor(H,$):z,ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")we=Reflect.decorate(D,H,$,z);else for(var Oe=D.length-1;Oe>=0;Oe--)(ce=D[Oe])&&(we=(de<3?ce(we):de>3?ce(H,$,we):ce(H,$))||we);return de>3&&we&&Object.defineProperty(H,$,we),we},S=function(D,H){return function($,z){H($,z,D)}};function w(D){return D.command!==void 0}class A{constructor(H){this.id=A._idPool++,this._debugName=H}}A._idPool=0,A.CommandPalette=new A("CommandPalette"),A.EditorContext=new A("EditorContext"),A.SimpleEditorContext=new A("SimpleEditorContext"),A.EditorContextCopy=new A("EditorContextCopy"),A.EditorContextPeek=new A("EditorContextPeek"),A.MenubarEditMenu=new A("MenubarEditMenu"),A.MenubarCopy=new A("MenubarCopy"),A.MenubarGoMenu=new A("MenubarGoMenu"),A.MenubarSelectionMenu=new A("MenubarSelectionMenu"),A.InlineCompletionsActions=new A("InlineCompletionsActions");const I=(0,o.yh)("menuService"),q=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Ee.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:D=>D===A.CommandPalette}}addCommand(D){return this.addCommands(ye.$.single(D))}addCommands(D){for(const H of D)this._commands.set(H.id,H);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,W.OF)(()=>{let H=!1;for(const $ of D)H=this._commands.delete($.id)||H;H&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(D){return this._commands.get(D)}getCommands(){const D=new Map;return this._commands.forEach((H,$)=>D.set($,H)),D}appendMenuItem(D,H){return this.appendMenuItems(ye.$.single({id:D,item:H}))}appendMenuItems(D){const H=new Set,$=new g.S;for(const{id:z,item:de}of D){let we=this._menuItems.get(z);we||(we=new g.S,this._menuItems.set(z,we)),$.push(we.push(de)),H.add(z)}return this._onDidChangeMenu.fire(H),(0,W.OF)(()=>{if($.size>0){for(let z of $)z();this._onDidChangeMenu.fire(H),$.clear()}})}getMenuItems(D){let H;return this._menuItems.has(D)?H=[...this._menuItems.get(D)]:H=[],D===A.CommandPalette&&this._appendImplicitItems(H),H}_appendImplicitItems(D){const H=new Set;for(const $ of D)w($)&&(H.add($.command.id),$.alt&&H.add($.alt.id));this._commands.forEach(($,z)=>{H.has(z)||D.push({command:$})})}};class re extends d.wY{constructor(H,$,z,de){super(`submenuitem.${H.submenu.id}`,typeof H.title=="string"?H.title:H.title.value,[],"submenu"),this.item=H,this._menuService=$,this._contextKeyService=z,this._options=de}get actions(){const H=[],$=this._menuService.createMenu(this.item.submenu,this._contextKeyService),z=$.getActions(this._options);$.dispose();for(const[,de]of z)de.length>0&&(H.push(...de),H.push(new d.Z0));return H.length&&H.pop(),H}}let G=class Eu{constructor(H,$,z,de,we){var ce,Oe;if(this._commandService=we,this.id=H.id,this.label=z!=null&&z.renderShortTitle&&H.shortTitle?typeof H.shortTitle=="string"?H.shortTitle:H.shortTitle.value:typeof H.title=="string"?H.title:H.title.value,this.tooltip=(Oe=typeof H.tooltip=="string"?H.tooltip:(ce=H.tooltip)===null||ce===void 0?void 0:ce.value)!==null&&Oe!==void 0?Oe:"",this.enabled=!H.precondition||de.contextMatchesRules(H.precondition),this.checked=void 0,H.toggled){const Fe=H.toggled.condition?H.toggled:{condition:H.toggled};this.checked=de.contextMatchesRules(Fe.condition),this.checked&&Fe.tooltip&&(this.tooltip=typeof Fe.tooltip=="string"?Fe.tooltip:Fe.tooltip.value),Fe.title&&(this.label=typeof Fe.title=="string"?Fe.title:Fe.title.value)}this.item=H,this.alt=$?new Eu($,void 0,z,de,we):void 0,this._options=z,X.kS.isThemeIcon(H.icon)&&(this.class=ge.dT.asClassName(H.icon))}dispose(){}run(...H){var $,z;let de=[];return!(($=this._options)===null||$===void 0)&&$.arg&&(de=[...de,this._options.arg]),!((z=this._options)===null||z===void 0)&&z.shouldForwardArgs&&(de=[...de,...H]),this._commandService.executeCommand(this.id,...de)}};G=U([S(3,J.i6),S(4,ne.H)],G)},35884:function(Jt,ot,_){"use strict";_.d(ot,{H:function(){return ne},P:function(){return J}});var d=_(4348),ge=_(88226),Ee=_(69323),ye=_(34502),W=_(72999),g=_(16925);const ne=(0,g.yh)("commandService"),J=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new d.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,X){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!X)throw new Error("invalid command");return this.registerCommand({id:o,handler:X})}if(o.description){const I=[];for(let re of o.description.args)I.push(re.constraint);const q=o.handler;o.handler=function(re,...G){return(0,W.D8)(G,I),q(re,...G)}}const{id:U}=o;let S=this._commands.get(U);S||(S=new ye.S,this._commands.set(U,S));let w=S.unshift(o),A=(0,Ee.OF)(()=>{w();const I=this._commands.get(U);I!=null&&I.isEmpty()&&this._commands.delete(U)});return this._onDidRegisterCommand.fire(U),A}registerCommandAlias(o,X){return J.registerCommand(o,(U,...S)=>U.get(ne).executeCommand(X,...S))}getCommand(o){const X=this._commands.get(o);if(!(!X||X.isEmpty()))return ge.$.first(X)}getCommands(){const o=new Map;for(const X of this._commands.keys()){const U=this.getCommand(X);U&&o.set(X,U)}return o}};J.registerCommand("noop",()=>{})},90689:function(Jt,ot,_){"use strict";_.d(ot,{Ao:function(){return ne},Eq:function(){return K},Fb:function(){return J},K8:function(){return Y},i6:function(){return Ve},uy:function(){return Ne}});var d=_(23345),ge=_(82983),Ee=_(16925);let ye=d.WE||"";const W=new Map;W.set("false",!1),W.set("true",!0),W.set("isMac",d.dz),W.set("isLinux",d.IJ),W.set("isWindows",d.ED),W.set("isWeb",d.$L),W.set("isMacNative",d.dz&&!d.$L),W.set("isEdge",ye.indexOf("Edg/")>=0),W.set("isFirefox",ye.indexOf("Firefox")>=0),W.set("isChrome",ye.indexOf("Chrome")>=0),W.set("isSafari",ye.indexOf("Safari")>=0);const g=Object.prototype.hasOwnProperty;class ne{static has(b){return S.create(b)}static equals(b,E){return w.create(b,E)}static regex(b,E){return de.create(b,E)}static not(b){return re.create(b)}static and(...b){return Oe.create(b,null)}static or(...b){return Fe.create(b,null,!0)}static deserialize(b,E=!1){if(b)return this._deserializeOrExpression(b,E)}static _deserializeOrExpression(b,E){let N=b.split("||");return Fe.create(N.map(ie=>this._deserializeAndExpression(ie,E)),null,!0)}static _deserializeAndExpression(b,E){let N=b.split("&&");return Oe.create(N.map(ie=>this._deserializeOne(ie,E)),null)}static _deserializeOne(b,E){if(b=b.trim(),b.indexOf("!=")>=0){let N=b.split("!=");return q.create(N[0].trim(),this._deserializeValue(N[1],E))}if(b.indexOf("==")>=0){let N=b.split("==");return w.create(N[0].trim(),this._deserializeValue(N[1],E))}if(b.indexOf("=~")>=0){let N=b.split("=~");return de.create(N[0].trim(),this._deserializeRegexValue(N[1],E))}if(b.indexOf(" in ")>=0){let N=b.split(" in ");return A.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(b)){const N=b.split(">=");return H.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(b)){const N=b.split(">");return D.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(b)){const N=b.split("<=");return z.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(b)){const N=b.split("<");return $.create(N[0].trim(),N[1].trim())}return/^\!\s*/.test(b)?re.create(b.substr(1).trim()):S.create(b)}static _deserializeValue(b,E){if(b=b.trim(),b==="true")return!0;if(b==="false")return!1;let N=/^'([^']*)'$/.exec(b);return N?N[1].trim():b}static _deserializeRegexValue(b,E){if((0,ge.m5)(b)){if(E)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let N=b.indexOf("/"),ie=b.lastIndexOf("/");if(N===ie||N<0){if(E)throw new Error(`bad regexp-value '${b}', missing /-enclosure`);return console.warn(`bad regexp-value '${b}', missing /-enclosure`),null}let Ie=b.slice(N+1,ie),Ze=b[ie+1]==="i"?"i":"";try{return new RegExp(Ie,Ze)}catch(me){if(E)throw new Error(`bad regexp-value '${b}', parse error: ${me}`);return console.warn(`bad regexp-value '${b}', parse error: ${me}`),null}}}function J(P,b){const E=P?P.substituteConstants():void 0,N=b?b.substituteConstants():void 0;return!E&&!N?!0:!E||!N?!1:E.equals(N)}function o(P,b){return P.cmp(b)}class X{constructor(){this.type=0}cmp(b){return this.type-b.type}equals(b){return b.type===this.type}substituteConstants(){return this}evaluate(b){return!1}serialize(){return"false"}keys(){return[]}negate(){return U.INSTANCE}}X.INSTANCE=new X;class U{constructor(){this.type=1}cmp(b){return this.type-b.type}equals(b){return b.type===this.type}substituteConstants(){return this}evaluate(b){return!0}serialize(){return"true"}keys(){return[]}negate(){return X.INSTANCE}}U.INSTANCE=new U;class S{constructor(b,E){this.key=b,this.negated=E,this.type=2}static create(b,E=null){const N=W.get(b);return typeof N=="boolean"?N?U.INSTANCE:X.INSTANCE:new S(b,E)}cmp(b){return b.type!==this.type?this.type-b.type:B(this.key,b.key)}equals(b){return b.type===this.type?this.key===b.key:!1}substituteConstants(){const b=W.get(this.key);return typeof b=="boolean"?b?U.INSTANCE:X.INSTANCE:this}evaluate(b){return!!b.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=re.create(this.key,this)),this.negated}}class w{constructor(b,E,N){this.key=b,this.value=E,this.negated=N,this.type=4}static create(b,E,N=null){if(typeof E=="boolean")return E?S.create(b,N):re.create(b,N);const ie=W.get(b);return typeof ie=="boolean"?E===(ie?"true":"false")?U.INSTANCE:X.INSTANCE:new w(b,E,N)}cmp(b){return b.type!==this.type?this.type-b.type:L(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){const b=W.get(this.key);if(typeof b=="boolean"){const E=b?"true":"false";return this.value===E?U.INSTANCE:X.INSTANCE}return this}evaluate(b){return b.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=q.create(this.key,this.value,this)),this.negated}}class A{constructor(b,E){this.key=b,this.valueKey=E,this.type=10,this.negated=null}static create(b,E){return new A(b,E)}cmp(b){return b.type!==this.type?this.type-b.type:L(this.key,this.valueKey,b.key,b.valueKey)}equals(b){return b.type===this.type?this.key===b.key&&this.valueKey===b.valueKey:!1}substituteConstants(){return this}evaluate(b){const E=b.getValue(this.valueKey),N=b.getValue(this.key);return Array.isArray(E)?E.indexOf(N)>=0:typeof N=="string"&&typeof E=="object"&&E!==null?g.call(E,N):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=I.create(this)),this.negated}}class I{constructor(b){this._actual=b,this.type=11}static create(b){return new I(b)}cmp(b){return b.type!==this.type?this.type-b.type:this._actual.cmp(b._actual)}equals(b){return b.type===this.type?this._actual.equals(b._actual):!1}substituteConstants(){return this}evaluate(b){return!this._actual.evaluate(b)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class q{constructor(b,E,N){this.key=b,this.value=E,this.negated=N,this.type=5}static create(b,E,N=null){if(typeof E=="boolean")return E?re.create(b,N):S.create(b,N);const ie=W.get(b);return typeof ie=="boolean"?E===(ie?"true":"false")?X.INSTANCE:U.INSTANCE:new q(b,E,N)}cmp(b){return b.type!==this.type?this.type-b.type:L(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){const b=W.get(this.key);if(typeof b=="boolean"){const E=b?"true":"false";return this.value===E?X.INSTANCE:U.INSTANCE}return this}evaluate(b){return b.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=w.create(this.key,this.value,this)),this.negated}}class re{constructor(b,E){this.key=b,this.negated=E,this.type=3}static create(b,E=null){const N=W.get(b);return typeof N=="boolean"?N?X.INSTANCE:U.INSTANCE:new re(b,E)}cmp(b){return b.type!==this.type?this.type-b.type:B(this.key,b.key)}equals(b){return b.type===this.type?this.key===b.key:!1}substituteConstants(){const b=W.get(this.key);return typeof b=="boolean"?b?X.INSTANCE:U.INSTANCE:this}evaluate(b){return!b.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 G(P,b){if(typeof P=="string"){const E=parseFloat(P);isNaN(E)||(P=E)}return typeof P=="string"||typeof P=="number"?b(P):X.INSTANCE}class D{constructor(b,E,N){this.key=b,this.value=E,this.negated=N,this.type=12}static create(b,E,N=null){return G(E,ie=>new D(b,ie,N))}cmp(b){return b.type!==this.type?this.type-b.type:L(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=z.create(this.key,this.value,this)),this.negated}}class H{constructor(b,E,N){this.key=b,this.value=E,this.negated=N,this.type=13}static create(b,E,N=null){return G(E,ie=>new H(b,ie,N))}cmp(b){return b.type!==this.type?this.type-b.type:L(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=$.create(this.key,this.value,this)),this.negated}}class ${constructor(b,E,N){this.key=b,this.value=E,this.negated=N,this.type=14}static create(b,E,N=null){return G(E,ie=>new $(b,ie,N))}cmp(b){return b.type!==this.type?this.type-b.type:L(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=H.create(this.key,this.value,this)),this.negated}}class z{constructor(b,E,N){this.key=b,this.value=E,this.negated=N,this.type=15}static create(b,E,N=null){return G(E,ie=>new z(b,ie,N))}cmp(b){return b.type!==this.type?this.type-b.type:L(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}class de{constructor(b,E){this.key=b,this.regexp=E,this.type=7,this.negated=null}static create(b,E){return new de(b,E)}cmp(b){if(b.type!==this.type)return this.type-b.type;if(this.key<b.key)return-1;if(this.key>b.key)return 1;const E=this.regexp?this.regexp.source:"",N=b.regexp?b.regexp.source:"";return E<N?-1:E>N?1:0}equals(b){if(b.type===this.type){const E=this.regexp?this.regexp.source:"",N=b.regexp?b.regexp.source:"";return this.key===b.key&&E===N}return!1}substituteConstants(){return this}evaluate(b){let E=b.getValue(this.key);return this.regexp?this.regexp.test(E):!1}serialize(){const b=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${b}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=we.create(this)),this.negated}}class we{constructor(b){this._actual=b,this.type=8}static create(b){return new we(b)}cmp(b){return b.type!==this.type?this.type-b.type:this._actual.cmp(b._actual)}equals(b){return b.type===this.type?this._actual.equals(b._actual):!1}substituteConstants(){return this}evaluate(b){return!this._actual.evaluate(b)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function ce(P){let b=null;for(let E=0,N=P.length;E<N;E++){const ie=P[E].substituteConstants();if(P[E]!==ie&&b===null){b=[];for(let Ie=0;Ie<E;Ie++)b[Ie]=P[Ie]}b!==null&&(b[E]=ie)}return b===null?P:b}class Oe{constructor(b,E){this.expr=b,this.negated=E,this.type=6}static create(b,E){return Oe._normalizeArr(b,E)}cmp(b){if(b.type!==this.type)return this.type-b.type;if(this.expr.length<b.expr.length)return-1;if(this.expr.length>b.expr.length)return 1;for(let E=0,N=this.expr.length;E<N;E++){const ie=o(this.expr[E],b.expr[E]);if(ie!==0)return ie}return 0}equals(b){if(b.type===this.type){if(this.expr.length!==b.expr.length)return!1;for(let E=0,N=this.expr.length;E<N;E++)if(!this.expr[E].equals(b.expr[E]))return!1;return!0}return!1}substituteConstants(){const b=ce(this.expr);return b===this.expr?this:Oe.create(b,this.negated)}evaluate(b){for(let E=0,N=this.expr.length;E<N;E++)if(!this.expr[E].evaluate(b))return!1;return!0}static _normalizeArr(b,E){const N=[];let ie=!1;for(const Ie of b)if(Ie){if(Ie.type===1){ie=!0;continue}if(Ie.type===0)return X.INSTANCE;if(Ie.type===6){N.push(...Ie.expr);continue}N.push(Ie)}if(N.length===0&&ie)return U.INSTANCE;if(N.length!==0){if(N.length===1)return N[0];N.sort(o);for(let Ie=1;Ie<N.length;Ie++)N[Ie-1].equals(N[Ie])&&(N.splice(Ie,1),Ie--);if(N.length===1)return N[0];for(;N.length>1;){const Ie=N[N.length-1];if(Ie.type!==9)break;N.pop();const Ze=N.pop(),me=N.length===0,Ce=Fe.create(Ie.expr.map(Ke=>Oe.create([Ke,Ze],null)),null,me);Ce&&(N.push(Ce),N.sort(o))}return N.length===1?N[0]:new Oe(N,E)}}serialize(){return this.expr.map(b=>b.serialize()).join(" && ")}keys(){const b=[];for(let E of this.expr)b.push(...E.keys());return b}negate(){if(!this.negated){const b=[];for(let E of this.expr)b.push(E.negate());this.negated=Fe.create(b,this,!0)}return this.negated}}class Fe{constructor(b,E){this.expr=b,this.negated=E,this.type=9}static create(b,E,N){return Fe._normalizeArr(b,E,N)}cmp(b){if(b.type!==this.type)return this.type-b.type;if(this.expr.length<b.expr.length)return-1;if(this.expr.length>b.expr.length)return 1;for(let E=0,N=this.expr.length;E<N;E++){const ie=o(this.expr[E],b.expr[E]);if(ie!==0)return ie}return 0}equals(b){if(b.type===this.type){if(this.expr.length!==b.expr.length)return!1;for(let E=0,N=this.expr.length;E<N;E++)if(!this.expr[E].equals(b.expr[E]))return!1;return!0}return!1}substituteConstants(){const b=ce(this.expr);return b===this.expr?this:Fe.create(b,this.negated,!1)}evaluate(b){for(let E=0,N=this.expr.length;E<N;E++)if(this.expr[E].evaluate(b))return!0;return!1}static _normalizeArr(b,E,N){let ie=[],Ie=!1;if(b){for(let Ze=0,me=b.length;Ze<me;Ze++){const Ce=b[Ze];if(Ce){if(Ce.type===0){Ie=!0;continue}if(Ce.type===1)return U.INSTANCE;if(Ce.type===9){ie=ie.concat(Ce.expr);continue}ie.push(Ce)}}if(ie.length===0&&Ie)return X.INSTANCE;ie.sort(o)}if(ie.length!==0){if(ie.length===1)return ie[0];for(let Ze=1;Ze<ie.length;Ze++)ie[Ze-1].equals(ie[Ze])&&(ie.splice(Ze,1),Ze--);if(ie.length===1)return ie[0];if(N){for(let Ze=0;Ze<ie.length;Ze++)for(let me=Ze+1;me<ie.length;me++)Y(ie[Ze],ie[me])&&(ie.splice(me,1),me--);if(ie.length===1)return ie[0]}return new Fe(ie,E)}}serialize(){return this.expr.map(b=>b.serialize()).join(" || ")}keys(){const b=[];for(let E of this.expr)b.push(...E.keys());return b}negate(){if(!this.negated){let b=[];for(let E of this.expr)b.push(E.negate());for(;b.length>1;){const E=b.shift(),N=b.shift(),ie=[];for(const Ze of Q(E))for(const me of Q(N))ie.push(Oe.create([Ze,me],null));const Ie=b.length===0;b.unshift(Fe.create(ie,null,Ie))}this.negated=b[0]}return this.negated}}class Ne extends S{constructor(b,E,N){super(b,null),this._defaultValue=E,typeof N=="object"?Ne._info.push(Object.assign(Object.assign({},N),{key:b})):N!==!0&&Ne._info.push({key:b,description:N,type:E!=null?typeof E:void 0})}static all(){return Ne._info.values()}bindTo(b){return b.createKey(this.key,this._defaultValue)}getValue(b){return b.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(b){return w.create(this.key,b)}}Ne._info=[];const Ve=(0,Ee.yh)("contextKeyService"),K="setContext";function B(P,b){return P<b?-1:P>b?1:0}function L(P,b,E,N){return P<E?-1:P>E?1:b<N?-1:b>N?1:0}function Y(P,b){if(b.type===6&&P.type!==9&&P.type!==6){for(const ie of b.expr)if(P.equals(ie))return!0}const E=P.negate(),N=Q(E).concat(Q(b));N.sort(o);for(let ie=0;ie<N.length;ie++){const Ze=N[ie].negate();for(let me=ie+1;me<N.length;me++){const Ce=N[me];if(Ze.equals(Ce))return!0}}return!1}function Q(P){return P.type===9?P.expr:[P]}},16925:function(Jt,ot,_){"use strict";_.d(ot,{I8:function(){return d},TG:function(){return ge},jt:function(){return W},yh:function(){return ye}});var d;(function(g){g.serviceIds=new Map,g.DI_TARGET="$di$target",g.DI_DEPENDENCIES="$di$dependencies";function ne(J){return J[g.DI_DEPENDENCIES]||[]}g.getServiceDependencies=ne})(d||(d={}));const ge=ye("instantiationService");function Ee(g,ne,J,o){ne[d.DI_TARGET]===ne?ne[d.DI_DEPENDENCIES].push({id:g,index:J,optional:o}):(ne[d.DI_DEPENDENCIES]=[{id:g,index:J,optional:o}],ne[d.DI_TARGET]=ne)}function ye(g){if(d.serviceIds.has(g))return d.serviceIds.get(g);const ne=function(J,o,X){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Ee(ne,J,X,!1)};return ne.toString=()=>g,d.serviceIds.set(g,ne),ne}function W(g){return function(ne,J,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");Ee(g,ne,o,!0)}}},44650:function(Jt,ot,_){"use strict";_.d(ot,{B:function(){return ye}});var d=_(76068),ge=_(72999);class Ee{constructor(){this.data=new Map}add(g,ne){d.ok(ge.HD(g)),d.ok(ge.Kn(ne)),d.ok(!this.data.has(g),"There is already an extension with this id"),this.data.set(g,ne)}as(g){return this.data.get(g)||null}}const ye=new Ee},66213:function(Jt,ot,_){"use strict";_.d(ot,{e:function(){return d}});var d;(function(ge){ge.DARK="dark",ge.LIGHT="light",ge.HIGH_CONTRAST="hc"})(d||(d={}))},49055:function(Jt,ot,_){"use strict";_.d(ot,{EN:function(){return o},IP:function(){return S},Ic:function(){return I},XE:function(){return ne},bB:function(){return q},kS:function(){return X},m6:function(){return U}});var d=_(52615),ge=_(4348),Ee=_(69323),ye=_(16925),W=_(44650),g=_(66213);const ne=(0,ye.yh)("themeService");var J;(function(re){function G(D){return D&&typeof D=="object"&&typeof D.id=="string"}re.isThemeColor=G})(J||(J={}));function o(re){return{id:re}}var X;(function(re){function G(we){return we&&typeof we=="object"&&typeof we.id=="string"&&(typeof we.color=="undefined"||J.isThemeColor(we.color))}re.isThemeIcon=G;const D=new RegExp(`^\\$\\((${d.dT.iconNameExpression}(?:${d.dT.iconModifierExpression})?)\\)$`);function H(we){const ce=D.exec(we);if(!ce)return;let[,Oe]=ce;return{id:Oe}}re.fromString=H;function $(we,ce){let Oe=we.id;const Fe=Oe.lastIndexOf("~");return Fe!==-1&&(Oe=Oe.substring(0,Fe)),ce&&(Oe=`${Oe}~${ce}`),{id:Oe}}re.modify=$;function z(we,ce){var Oe,Fe;return we.id===ce.id&&((Oe=we.color)===null||Oe===void 0?void 0:Oe.id)===((Fe=ce.color)===null||Fe===void 0?void 0:Fe.id)}re.isEqual=z;function de(we,ce){return{id:we.id,color:ce?o(ce):void 0}}re.asThemeIcon=de,re.asClassNameArray=d.dT.asClassNameArray,re.asClassName=d.dT.asClassName,re.asCSSSelector=d.dT.asCSSSelector})(X||(X={}));function U(re){switch(re){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 ge.Q5}onColorThemeChange(G){return this.themingParticipants.push(G),this.onThemingParticipantAddedEmitter.fire(G),(0,Ee.OF)(()=>{const D=this.themingParticipants.indexOf(G);this.themingParticipants.splice(D,1)})}getThemingParticipants(){return this.themingParticipants}}let A=new w;W.B.add(S.ThemingContribution,A);function I(re){return A.onColorThemeChange(re)}class q extends Ee.JT{constructor(G){super(),this.themeService=G,this.theme=G.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(D=>this.onThemeChange(D)))}onThemeChange(G){this.theme=G,this.updateStyles()}updateStyles(){}}},16632:function(Jt,ot,_){"use strict";var d=_(60499),ge=_(85899),Ee=_(18642),ye=_(72190),W=_(42244),g=_(92310),ne=_.n(g),J=_(18929),o=_(59301),X=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],U=(0,o.forwardRef)(function(S,w){var A=S.prefixCls,I=A===void 0?"rc-checkbox":A,q=S.className,re=S.style,G=S.checked,D=S.disabled,H=S.defaultChecked,$=H===void 0?!1:H,z=S.type,de=z===void 0?"checkbox":z,we=S.title,ce=S.onChange,Oe=(0,W.Z)(S,X),Fe=(0,o.useRef)(null),Ne=(0,o.useRef)(null),Ve=(0,J.Z)($,{value:G}),K=(0,ye.Z)(Ve,2),B=K[0],L=K[1];(0,o.useImperativeHandle)(w,function(){return{focus:function(b){var E;(E=Fe.current)===null||E===void 0||E.focus(b)},blur:function(){var b;(b=Fe.current)===null||b===void 0||b.blur()},input:Fe.current,nativeElement:Ne.current}});var Y=ne()(I,q,(0,Ee.Z)((0,Ee.Z)({},"".concat(I,"-checked"),B),"".concat(I,"-disabled"),D)),Q=function(b){D||("checked"in S||L(b.target.checked),ce==null||ce({target:(0,ge.Z)((0,ge.Z)({},S),{},{type:de,checked:b.target.checked}),stopPropagation:function(){b.stopPropagation()},preventDefault:function(){b.preventDefault()},nativeEvent:b.nativeEvent}))};return o.createElement("span",{className:Y,title:we,style:re,ref:Ne},o.createElement("input",(0,d.Z)({},Oe,{className:"".concat(I,"-input"),ref:Fe,onChange:Q,disabled:D,checked:!!B,type:de})),o.createElement("span",{className:"".concat(I,"-inner")}))});ot.Z=U},96478:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return we}});var d=_(60499),ge=_(18642),Ee=_(72190),ye=_(42244),W=_(68196),g=_(92310),ne=_.n(g),J=_(8654),o=_(59301),X=_(10228),U=_(16089),S=X.Z.ESC,w=X.Z.TAB;function A(ce){var Oe=ce.visible,Fe=ce.triggerRef,Ne=ce.onVisibleChange,Ve=ce.autoFocus,K=ce.overlayRef,B=o.useRef(!1),L=function(){if(Oe){var b,E;(b=Fe.current)===null||b===void 0||(E=b.focus)===null||E===void 0||E.call(b),Ne==null||Ne(!1)}},Y=function(){var b;return(b=K.current)!==null&&b!==void 0&&b.focus?(K.current.focus(),B.current=!0,!0):!1},Q=function(b){switch(b.keyCode){case S:L();break;case w:{var E=!1;B.current||(E=Y()),E?b.preventDefault():L();break}}};o.useEffect(function(){return Oe?(window.addEventListener("keydown",Q),Ve&&(0,U.Z)(Y,3),function(){window.removeEventListener("keydown",Q),B.current=!1}):function(){B.current=!1}},[Oe])}var I=(0,o.forwardRef)(function(ce,Oe){var Fe=ce.overlay,Ne=ce.arrow,Ve=ce.prefixCls,K=(0,o.useMemo)(function(){var L;return typeof Fe=="function"?L=Fe():L=Fe,L},[Fe]),B=(0,J.sQ)(Oe,(0,J.C4)(K));return o.createElement(o.Fragment,null,Ne&&o.createElement("div",{className:"".concat(Ve,"-arrow")}),o.cloneElement(K,{ref:(0,J.Yr)(K)?B:void 0}))}),q=I,re={adjustX:1,adjustY:1},G=[0,0],D={topLeft:{points:["bl","tl"],overflow:re,offset:[0,-4],targetOffset:G},top:{points:["bc","tc"],overflow:re,offset:[0,-4],targetOffset:G},topRight:{points:["br","tr"],overflow:re,offset:[0,-4],targetOffset:G},bottomLeft:{points:["tl","bl"],overflow:re,offset:[0,4],targetOffset:G},bottom:{points:["tc","bc"],overflow:re,offset:[0,4],targetOffset:G},bottomRight:{points:["tr","br"],overflow:re,offset:[0,4],targetOffset:G}},H=D,$=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function z(ce,Oe){var Fe,Ne=ce.arrow,Ve=Ne===void 0?!1:Ne,K=ce.prefixCls,B=K===void 0?"rc-dropdown":K,L=ce.transitionName,Y=ce.animation,Q=ce.align,P=ce.placement,b=P===void 0?"bottomLeft":P,E=ce.placements,N=E===void 0?H:E,ie=ce.getPopupContainer,Ie=ce.showAction,Ze=ce.hideAction,me=ce.overlayClassName,Ce=ce.overlayStyle,Ke=ce.visible,Qe=ce.trigger,Ge=Qe===void 0?["hover"]:Qe,wt=ce.autoFocus,Ue=ce.overlay,bt=ce.children,Le=ce.onVisibleChange,lt=(0,ye.Z)(ce,$),Re=o.useState(),Te=(0,Ee.Z)(Re,2),pe=Te[0],We=Te[1],De="visible"in ce?Ke:pe,Se=o.useRef(null),k=o.useRef(null),fe=o.useRef(null);o.useImperativeHandle(Oe,function(){return Se.current});var ve=function(St){We(St),Le==null||Le(St)};A({visible:De,triggerRef:fe,onVisibleChange:ve,autoFocus:wt,overlayRef:k});var Be=function(St){var Ct=ce.onOverlayClick;We(!1),Ct&&Ct(St)},qe=function(){return o.createElement(q,{ref:k,overlay:Ue,prefixCls:B,arrow:Ve})},at=function(){return typeof Ue=="function"?qe:qe()},ct=function(){var St=ce.minOverlayWidthMatchTrigger,Ct=ce.alignPoint;return"minOverlayWidthMatchTrigger"in ce?St:!Ct},mt=function(){var St=ce.openClassName;return St!==void 0?St:"".concat(B,"-open")},dt=o.cloneElement(bt,{className:ne()((Fe=bt.props)===null||Fe===void 0?void 0:Fe.className,De&&mt()),ref:(0,J.Yr)(bt)?(0,J.sQ)(fe,(0,J.C4)(bt)):void 0}),gt=Ze;return!gt&&Ge.indexOf("contextMenu")!==-1&&(gt=["click"]),o.createElement(W.Z,(0,d.Z)({builtinPlacements:N},lt,{prefixCls:B,ref:Se,popupClassName:ne()(me,(0,ge.Z)({},"".concat(B,"-show-arrow"),Ve)),popupStyle:Ce,action:Ge,showAction:Ie,hideAction:gt,popupPlacement:b,popupAlign:Q,popupTransitionName:L,popupAnimation:Y,popupVisible:De,stretch:ct()?"minWidth":"",popup:at(),onPopupVisibleChange:ve,onPopupClick:Be,getPopupContainer:ie}),dt)}var de=o.forwardRef(z),we=de},66003:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return ne}});var d=_(42244),ge=_(85899),Ee=_(43749),ye=_(59301),W=["show"];function g(J,o){if(!o.max)return!0;var X=o.strategy(J);return X<=o.max}function ne(J,o){return ye.useMemo(function(){var X={};o&&(X.show=(0,Ee.Z)(o)==="object"&&o.formatter?o.formatter:!!o),X=(0,ge.Z)((0,ge.Z)({},X),J);var U=X,S=U.show,w=(0,d.Z)(U,W);return(0,ge.Z)((0,ge.Z)({},w),{},{show:!!S,showFormatter:typeof S=="function"?S:void 0,strategy:w.strategy||function(A){return A.length}})},[J,o])}},36901:function(Jt,ot,_){"use strict";_.r(ot),_.d(ot,{BaseInput:function(){return X},default:function(){return H}});var d=_(85899),ge=_(60499),Ee=_(18642),ye=_(43749),W=_(92310),g=_.n(W),ne=_(59301),J=_(30292),o=ne.forwardRef(function($,z){var de,we,ce,Oe=$.inputElement,Fe=$.children,Ne=$.prefixCls,Ve=$.prefix,K=$.suffix,B=$.addonBefore,L=$.addonAfter,Y=$.className,Q=$.style,P=$.disabled,b=$.readOnly,E=$.focused,N=$.triggerFocus,ie=$.allowClear,Ie=$.value,Ze=$.handleReset,me=$.hidden,Ce=$.classes,Ke=$.classNames,Qe=$.dataAttrs,Ge=$.styles,wt=$.components,Ue=$.onClear,bt=Fe!=null?Fe:Oe,Le=(wt==null?void 0:wt.affixWrapper)||"span",lt=(wt==null?void 0:wt.groupWrapper)||"span",Re=(wt==null?void 0:wt.wrapper)||"span",Te=(wt==null?void 0:wt.groupAddon)||"span",pe=(0,ne.useRef)(null),We=function(vt){var pt;(pt=pe.current)!==null&&pt!==void 0&&pt.contains(vt.target)&&(N==null||N())},De=(0,J.X3)($),Se=(0,ne.cloneElement)(bt,{value:Ie,className:g()((de=bt.props)===null||de===void 0?void 0:de.className,!De&&(Ke==null?void 0:Ke.variant))||null}),k=(0,ne.useRef)(null);if(ne.useImperativeHandle(z,function(){return{nativeElement:k.current||pe.current}}),De){var fe=null;if(ie){var ve=!P&&!b&&Ie,Be="".concat(Ne,"-clear-icon"),qe=(0,ye.Z)(ie)==="object"&&ie!==null&&ie!==void 0&&ie.clearIcon?ie.clearIcon:"\u2716";fe=ne.createElement("button",{type:"button",tabIndex:-1,onClick:function(vt){Ze==null||Ze(vt),Ue==null||Ue()},onMouseDown:function(vt){return vt.preventDefault()},className:g()(Be,(0,Ee.Z)((0,Ee.Z)({},"".concat(Be,"-hidden"),!ve),"".concat(Be,"-has-suffix"),!!K))},qe)}var at="".concat(Ne,"-affix-wrapper"),ct=g()(at,(0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)({},"".concat(Ne,"-disabled"),P),"".concat(at,"-disabled"),P),"".concat(at,"-focused"),E),"".concat(at,"-readonly"),b),"".concat(at,"-input-with-clear-btn"),K&&ie&&Ie),Ce==null?void 0:Ce.affixWrapper,Ke==null?void 0:Ke.affixWrapper,Ke==null?void 0:Ke.variant),mt=(K||ie)&&ne.createElement("span",{className:g()("".concat(Ne,"-suffix"),Ke==null?void 0:Ke.suffix),style:Ge==null?void 0:Ge.suffix},fe,K);Se=ne.createElement(Le,(0,ge.Z)({className:ct,style:Ge==null?void 0:Ge.affixWrapper,onClick:We},Qe==null?void 0:Qe.affixWrapper,{ref:pe}),Ve&&ne.createElement("span",{className:g()("".concat(Ne,"-prefix"),Ke==null?void 0:Ke.prefix),style:Ge==null?void 0:Ge.prefix},Ve),Se,mt)}if((0,J.He)($)){var dt="".concat(Ne,"-group"),gt="".concat(dt,"-addon"),Lt="".concat(dt,"-wrapper"),St=g()("".concat(Ne,"-wrapper"),dt,Ce==null?void 0:Ce.wrapper,Ke==null?void 0:Ke.wrapper),Ct=g()(Lt,(0,Ee.Z)({},"".concat(Lt,"-disabled"),P),Ce==null?void 0:Ce.group,Ke==null?void 0:Ke.groupWrapper);Se=ne.createElement(lt,{className:Ct,ref:k},ne.createElement(Re,{className:St},B&&ne.createElement(Te,{className:gt},B),Se,L&&ne.createElement(Te,{className:gt},L)))}return ne.cloneElement(Se,{className:g()((we=Se.props)===null||we===void 0?void 0:we.className,Y)||null,style:(0,d.Z)((0,d.Z)({},(ce=Se.props)===null||ce===void 0?void 0:ce.style),Q),hidden:me})}),X=o,U=_(77654),S=_(72190),w=_(42244),A=_(18929),I=_(2738),q=_(66003),re=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],G=(0,ne.forwardRef)(function($,z){var de=$.autoComplete,we=$.onChange,ce=$.onFocus,Oe=$.onBlur,Fe=$.onPressEnter,Ne=$.onKeyDown,Ve=$.onKeyUp,K=$.prefixCls,B=K===void 0?"rc-input":K,L=$.disabled,Y=$.htmlSize,Q=$.className,P=$.maxLength,b=$.suffix,E=$.showCount,N=$.count,ie=$.type,Ie=ie===void 0?"text":ie,Ze=$.classes,me=$.classNames,Ce=$.styles,Ke=$.onCompositionStart,Qe=$.onCompositionEnd,Ge=(0,w.Z)($,re),wt=(0,ne.useState)(!1),Ue=(0,S.Z)(wt,2),bt=Ue[0],Le=Ue[1],lt=(0,ne.useRef)(!1),Re=(0,ne.useRef)(!1),Te=(0,ne.useRef)(null),pe=(0,ne.useRef)(null),We=function(xt){Te.current&&(0,J.nH)(Te.current,xt)},De=(0,A.Z)($.defaultValue,{value:$.value}),Se=(0,S.Z)(De,2),k=Se[0],fe=Se[1],ve=k==null?"":String(k),Be=(0,ne.useState)(null),qe=(0,S.Z)(Be,2),at=qe[0],ct=qe[1],mt=(0,q.Z)(N,E),dt=mt.max||P,gt=mt.strategy(ve),Lt=!!dt&>>dt;(0,ne.useImperativeHandle)(z,function(){var ae;return{focus:We,blur:function(){var Ae;(Ae=Te.current)===null||Ae===void 0||Ae.blur()},setSelectionRange:function(Ae,Me,Xe){var ee;(ee=Te.current)===null||ee===void 0||ee.setSelectionRange(Ae,Me,Xe)},select:function(){var Ae;(Ae=Te.current)===null||Ae===void 0||Ae.select()},input:Te.current,nativeElement:((ae=pe.current)===null||ae===void 0?void 0:ae.nativeElement)||Te.current}}),(0,ne.useEffect)(function(){Re.current&&(Re.current=!1),Le(function(ae){return ae&&L?!1:ae})},[L]);var St=function(xt,Ae,Me){var Xe=Ae;if(!lt.current&&mt.exceedFormatter&&mt.max&&mt.strategy(Ae)>mt.max){if(Xe=mt.exceedFormatter(Ae,{max:mt.max}),Ae!==Xe){var ee,oe;ct([((ee=Te.current)===null||ee===void 0?void 0:ee.selectionStart)||0,((oe=Te.current)===null||oe===void 0?void 0:oe.selectionEnd)||0])}}else if(Me.source==="compositionEnd")return;fe(Xe),Te.current&&(0,J.rJ)(Te.current,xt,we,Xe)};(0,ne.useEffect)(function(){if(at){var ae;(ae=Te.current)===null||ae===void 0||ae.setSelectionRange.apply(ae,(0,U.Z)(at))}},[at]);var Ct=function(xt){St(xt,xt.target.value,{source:"change"})},nt=function(xt){lt.current=!1,St(xt,xt.currentTarget.value,{source:"compositionEnd"}),Qe==null||Qe(xt)},vt=function(xt){Fe&&xt.key==="Enter"&&!Re.current&&(Re.current=!0,Fe(xt)),Ne==null||Ne(xt)},pt=function(xt){xt.key==="Enter"&&(Re.current=!1),Ve==null||Ve(xt)},be=function(xt){Le(!0),ce==null||ce(xt)},Je=function(xt){Re.current&&(Re.current=!1),Le(!1),Oe==null||Oe(xt)},x=function(xt){fe(""),We(),Te.current&&(0,J.rJ)(Te.current,xt,we)},T=Lt&&"".concat(B,"-out-of-range"),$e=function(){var xt=(0,I.Z)($,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return ne.createElement("input",(0,ge.Z)({autoComplete:de},xt,{onChange:Ct,onFocus:be,onBlur:Je,onKeyDown:vt,onKeyUp:pt,className:g()(B,(0,Ee.Z)({},"".concat(B,"-disabled"),L),me==null?void 0:me.input),style:Ce==null?void 0:Ce.input,ref:Te,size:Y,type:Ie,onCompositionStart:function(Me){lt.current=!0,Ke==null||Ke(Me)},onCompositionEnd:nt}))},j=function(){var xt=Number(dt)>0;if(b||mt.show){var Ae=mt.showFormatter?mt.showFormatter({value:ve,count:gt,maxLength:dt}):"".concat(gt).concat(xt?" / ".concat(dt):"");return ne.createElement(ne.Fragment,null,mt.show&&ne.createElement("span",{className:g()("".concat(B,"-show-count-suffix"),(0,Ee.Z)({},"".concat(B,"-show-count-has-suffix"),!!b),me==null?void 0:me.count),style:(0,d.Z)({},Ce==null?void 0:Ce.count)},Ae),b)}return null};return ne.createElement(X,(0,ge.Z)({},Ge,{prefixCls:B,className:g()(Q,T),handleReset:x,value:ve,focused:bt,triggerFocus:We,suffix:j(),disabled:L,classes:Ze,classNames:me,styles:Ce}),$e())}),D=G,H=D},30292:function(Jt,ot,_){"use strict";_.d(ot,{He:function(){return d},X3:function(){return ge},nH:function(){return W},rJ:function(){return ye}});function d(g){return!!(g.addonBefore||g.addonAfter)}function ge(g){return!!(g.prefix||g.suffix||g.allowClear)}function Ee(g,ne,J){var o=ne.cloneNode(!0),X=Object.create(g,{target:{value:o},currentTarget:{value:o}});return o.value=J,typeof ne.selectionStart=="number"&&typeof ne.selectionEnd=="number"&&(o.selectionStart=ne.selectionStart,o.selectionEnd=ne.selectionEnd),o.setSelectionRange=function(){ne.setSelectionRange.apply(ne,arguments)},X}function ye(g,ne,J,o){if(J){var X=ne;if(ne.type==="click"){X=Ee(ne,g,""),J(X);return}if(g.type!=="file"&&o!==void 0){X=Ee(ne,g,o),J(X);return}J(X)}}function W(g,ne){if(g){g.focus(ne);var J=ne||{},o=J.cursor;if(o){var X=g.value.length;switch(o){case"start":g.setSelectionRange(0,0);break;case"end":g.setSelectionRange(X,X);break;default:g.setSelectionRange(0,X)}}}}},28321:function(Jt,ot,_){"use strict";_.d(ot,{iz:function(){return Rt},ck:function(){return Xe},BW:function(){return Wt},sN:function(){return Xe},Wd:function(){return he},ZP:function(){return Qn},Xl:function(){return Fe}});var d=_(60499),ge=_(18642),Ee=_(85899),ye=_(77654),W=_(72190),g=_(42244),ne=_(92310),J=_.n(ne),o=_(83836),X=_(18929),U=_(13697),S=_(48736),w=_(59301),A=_(4676),I=w.createContext(null);function q(rt,ht){return rt===void 0?null:"".concat(rt,"-").concat(ht)}function re(rt){var ht=w.useContext(I);return q(ht,rt)}var G=_(80547),D=["children","locked"],H=w.createContext(null);function $(rt,ht){var Nt=(0,Ee.Z)({},rt);return Object.keys(ht).forEach(function(At){var Pt=ht[At];Pt!==void 0&&(Nt[At]=Pt)}),Nt}function z(rt){var ht=rt.children,Nt=rt.locked,At=(0,g.Z)(rt,D),Pt=w.useContext(H),$t=(0,G.Z)(function(){return $(Pt,At)},[Pt,At],function(Zt,tn){return!Nt&&(Zt[0]!==tn[0]||!(0,U.Z)(Zt[1],tn[1],!0))});return w.createElement(H.Provider,{value:$t},ht)}var de=[],we=w.createContext(null);function ce(){return w.useContext(we)}var Oe=w.createContext(de);function Fe(rt){var ht=w.useContext(Oe);return w.useMemo(function(){return rt!==void 0?[].concat((0,ye.Z)(ht),[rt]):ht},[ht,rt])}var Ne=w.createContext(null),Ve=w.createContext({}),K=Ve,B=_(29194);function L(rt){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,B.Z)(rt)){var Nt=rt.nodeName.toLowerCase(),At=["input","select","textarea","button"].includes(Nt)||rt.isContentEditable||Nt==="a"&&!!rt.getAttribute("href"),Pt=rt.getAttribute("tabindex"),$t=Number(Pt),Zt=null;return Pt&&!Number.isNaN($t)?Zt=$t:At&&Zt===null&&(Zt=0),At&&rt.disabled&&(Zt=null),Zt!==null&&(Zt>=0||ht&&Zt<0)}return!1}function Y(rt){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nt=(0,ye.Z)(rt.querySelectorAll("*")).filter(function(At){return L(At,ht)});return L(rt,ht)&&Nt.unshift(rt),Nt}var Q=null;function P(){Q=document.activeElement}function b(){Q=null}function E(){if(Q)try{Q.focus()}catch(rt){}}function N(rt,ht){if(ht.keyCode===9){var Nt=Y(rt),At=Nt[ht.shiftKey?0:Nt.length-1],Pt=At===document.activeElement||rt===document.activeElement;if(Pt){var $t=Nt[ht.shiftKey?Nt.length-1:0];$t.focus(),ht.preventDefault()}}}var ie=_(10228),Ie=_(16089),Ze=ie.Z.LEFT,me=ie.Z.RIGHT,Ce=ie.Z.UP,Ke=ie.Z.DOWN,Qe=ie.Z.ENTER,Ge=ie.Z.ESC,wt=ie.Z.HOME,Ue=ie.Z.END,bt=[Ce,Ke,Ze,me];function Le(rt,ht,Nt,At){var Pt,$t="prev",Zt="next",tn="children",dn="parent";if(rt==="inline"&&At===Qe)return{inlineTrigger:!0};var fn=(0,ge.Z)((0,ge.Z)({},Ce,$t),Ke,Zt),wn=(0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)({},Ze,Nt?Zt:$t),me,Nt?$t:Zt),Ke,tn),Qe,tn),cn=(0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)({},Ce,$t),Ke,Zt),Qe,tn),Ge,dn),Ze,Nt?tn:dn),me,Nt?dn:tn),an={inline:fn,horizontal:wn,vertical:cn,inlineSub:fn,horizontalSub:cn,verticalSub:cn},mn=(Pt=an["".concat(rt).concat(ht?"":"Sub")])===null||Pt===void 0?void 0:Pt[At];switch(mn){case $t:return{offset:-1,sibling:!0};case Zt:return{offset:1,sibling:!0};case dn:return{offset:-1,sibling:!1};case tn:return{offset:1,sibling:!1};default:return null}}function lt(rt){for(var ht=rt;ht;){if(ht.getAttribute("data-menu-list"))return ht;ht=ht.parentElement}return null}function Re(rt,ht){for(var Nt=rt||document.activeElement;Nt;){if(ht.has(Nt))return Nt;Nt=Nt.parentElement}return null}function Te(rt,ht){var Nt=Y(rt,!0);return Nt.filter(function(At){return ht.has(At)})}function pe(rt,ht,Nt){var At=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!rt)return null;var Pt=Te(rt,ht),$t=Pt.length,Zt=Pt.findIndex(function(tn){return Nt===tn});return At<0?Zt===-1?Zt=$t-1:Zt-=1:At>0&&(Zt+=1),Zt=(Zt+$t)%$t,Pt[Zt]}var We=function(ht,Nt){var At=new Set,Pt=new Map,$t=new Map;return ht.forEach(function(Zt){var tn=document.querySelector("[data-menu-id='".concat(q(Nt,Zt),"']"));tn&&(At.add(tn),$t.set(tn,Zt),Pt.set(Zt,tn))}),{elements:At,key2element:Pt,element2key:$t}};function De(rt,ht,Nt,At,Pt,$t,Zt,tn,dn,fn){var wn=w.useRef(),cn=w.useRef();cn.current=ht;var an=function(){Ie.Z.cancel(wn.current)};return w.useEffect(function(){return function(){an()}},[]),function(mn){var Xn=mn.which;if([].concat(bt,[Qe,Ge,wt,Ue]).includes(Xn)){var Jn=$t(),on=We(Jn,At),kn=on,rr=kn.elements,Hn=kn.key2element,zn=kn.element2key,or=Hn.get(ht),In=Re(or,rr),Kn=zn.get(In),lr=Le(rt,Zt(Kn,!0).length===1,Nt,Xn);if(!lr&&Xn!==wt&&Xn!==Ue)return;(bt.includes(Xn)||[wt,Ue].includes(Xn))&&mn.preventDefault();var Tt=function(Ln){if(Ln){var yr=Ln,cr=Ln.querySelector("a");cr!=null&&cr.getAttribute("href")&&(yr=cr);var dr=zn.get(Ln);tn(dr),an(),wn.current=(0,Ie.Z)(function(){cn.current===dr&&yr.focus()})}};if([wt,Ue].includes(Xn)||lr.sibling||!In){var Tn;!In||rt==="inline"?Tn=Pt.current:Tn=lt(In);var er,mr=Te(Tn,rr);Xn===wt?er=mr[0]:Xn===Ue?er=mr[mr.length-1]:er=pe(Tn,rr,In,lr.offset),Tt(er)}else if(lr.inlineTrigger)dn(Kn);else if(lr.offset>0)dn(Kn,!0),an(),wn.current=(0,Ie.Z)(function(){on=We(Jn,At);var Mn=In.getAttribute("aria-controls"),Ln=document.getElementById(Mn),yr=pe(Ln,on.elements);Tt(yr)},5);else if(lr.offset<0){var Cr=Zt(Kn,!0),Er=Cr[Cr.length-2],xr=Hn.get(Er);dn(Er,!1),Tt(xr)}}fn==null||fn(mn)}}function Se(rt){Promise.resolve().then(rt)}var k="__RC_UTIL_PATH_SPLIT__",fe=function(ht){return ht.join(k)},ve=function(ht){return ht.split(k)},Be="rc-menu-more";function qe(){var rt=w.useState({}),ht=(0,W.Z)(rt,2),Nt=ht[1],At=(0,w.useRef)(new Map),Pt=(0,w.useRef)(new Map),$t=w.useState([]),Zt=(0,W.Z)($t,2),tn=Zt[0],dn=Zt[1],fn=(0,w.useRef)(0),wn=(0,w.useRef)(!1),cn=function(){wn.current||Nt({})},an=(0,w.useCallback)(function(Hn,zn){var or=fe(zn);Pt.current.set(or,Hn),At.current.set(Hn,or),fn.current+=1;var In=fn.current;Se(function(){In===fn.current&&cn()})},[]),mn=(0,w.useCallback)(function(Hn,zn){var or=fe(zn);Pt.current.delete(or),At.current.delete(Hn)},[]),Xn=(0,w.useCallback)(function(Hn){dn(Hn)},[]),Jn=(0,w.useCallback)(function(Hn,zn){var or=At.current.get(Hn)||"",In=ve(or);return zn&&tn.includes(In[0])&&In.unshift(Be),In},[tn]),on=(0,w.useCallback)(function(Hn,zn){return Hn.filter(function(or){return or!==void 0}).some(function(or){var In=Jn(or,!0);return In.includes(zn)})},[Jn]),kn=function(){var zn=(0,ye.Z)(At.current.keys());return tn.length&&zn.push(Be),zn},rr=(0,w.useCallback)(function(Hn){var zn="".concat(At.current.get(Hn)).concat(k),or=new Set;return(0,ye.Z)(Pt.current.keys()).forEach(function(In){In.startsWith(zn)&&or.add(Pt.current.get(In))}),or},[]);return w.useEffect(function(){return function(){wn.current=!0}},[]),{registerPath:an,unregisterPath:mn,refreshOverflowKeys:Xn,isSubPathKey:on,getKeyPath:Jn,getKeys:kn,getSubPathKeys:rr}}function at(rt){var ht=w.useRef(rt);ht.current=rt;var Nt=w.useCallback(function(){for(var At,Pt=arguments.length,$t=new Array(Pt),Zt=0;Zt<Pt;Zt++)$t[Zt]=arguments[Zt];return(At=ht.current)===null||At===void 0?void 0:At.call.apply(At,[ht].concat($t))},[]);return rt?Nt:void 0}var ct=Math.random().toFixed(5).toString().slice(2),mt=0;function dt(rt){var ht=(0,X.Z)(rt,{value:rt}),Nt=(0,W.Z)(ht,2),At=Nt[0],Pt=Nt[1];return w.useEffect(function(){mt+=1;var $t="".concat(ct,"-").concat(mt);Pt("rc-menu-uuid-".concat($t))},[]),At}var gt=_(38705),Lt=_(17212),St=_(39153),Ct=_(55401),nt=_(2738),vt=_(8654);function pt(rt,ht,Nt,At){var Pt=w.useContext(H),$t=Pt.activeKey,Zt=Pt.onActive,tn=Pt.onInactive,dn={active:$t===rt};return ht||(dn.onMouseEnter=function(fn){Nt==null||Nt({key:rt,domEvent:fn}),Zt(rt)},dn.onMouseLeave=function(fn){At==null||At({key:rt,domEvent:fn}),tn(rt)}),dn}function be(rt){var ht=w.useContext(H),Nt=ht.mode,At=ht.rtl,Pt=ht.inlineIndent;if(Nt!=="inline")return null;var $t=rt;return At?{paddingRight:$t*Pt}:{paddingLeft:$t*Pt}}function Je(rt){var ht=rt.icon,Nt=rt.props,At=rt.children,Pt;return ht===null||ht===!1?null:(typeof ht=="function"?Pt=w.createElement(ht,(0,Ee.Z)({},Nt)):typeof ht!="boolean"&&(Pt=ht),Pt||At||null)}var x=["item"];function T(rt){var ht=rt.item,Nt=(0,g.Z)(rt,x);return Object.defineProperty(Nt,"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."),ht}}),Nt}var $e=["title","attribute","elementRef"],j=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],ae=["active"],xt=function(rt){(0,St.Z)(Nt,rt);var ht=(0,Ct.Z)(Nt);function Nt(){return(0,gt.Z)(this,Nt),ht.apply(this,arguments)}return(0,Lt.Z)(Nt,[{key:"render",value:function(){var Pt=this.props,$t=Pt.title,Zt=Pt.attribute,tn=Pt.elementRef,dn=(0,g.Z)(Pt,$e),fn=(0,nt.Z)(dn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,S.ZP)(!Zt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),w.createElement(o.Z.Item,(0,d.Z)({},Zt,{title:typeof $t=="string"?$t:void 0},fn,{ref:tn}))}}]),Nt}(w.Component),Ae=w.forwardRef(function(rt,ht){var Nt=rt.style,At=rt.className,Pt=rt.eventKey,$t=rt.warnKey,Zt=rt.disabled,tn=rt.itemIcon,dn=rt.children,fn=rt.role,wn=rt.onMouseEnter,cn=rt.onMouseLeave,an=rt.onClick,mn=rt.onKeyDown,Xn=rt.onFocus,Jn=(0,g.Z)(rt,j),on=re(Pt),kn=w.useContext(H),rr=kn.prefixCls,Hn=kn.onItemClick,zn=kn.disabled,or=kn.overflowDisabled,In=kn.itemIcon,Kn=kn.selectedKeys,lr=kn.onActive,Tt=w.useContext(K),Tn=Tt._internalRenderMenuItem,er="".concat(rr,"-item"),mr=w.useRef(),Cr=w.useRef(),Er=zn||Zt,xr=(0,vt.x1)(ht,Cr),Mn=Fe(Pt),Ln=function(Ur){return{key:Pt,keyPath:(0,ye.Z)(Mn).reverse(),item:mr.current,domEvent:Ur}},yr=tn||In,cr=pt(Pt,Er,wn,cn),dr=cr.active,xi=(0,g.Z)(cr,ae),ei=Kn.includes(Pt),Ar=be(Mn.length),xn=function(Ur){if(!Er){var Rr=Ln(Ur);an==null||an(T(Rr)),Hn(Rr)}},fr=function(Ur){if(mn==null||mn(Ur),Ur.which===ie.Z.ENTER){var Rr=Ln(Ur);an==null||an(T(Rr)),Hn(Rr)}},pr=function(Ur){lr(Pt),Xn==null||Xn(Ur)},Xr={};rt.role==="option"&&(Xr["aria-selected"]=ei);var ai=w.createElement(xt,(0,d.Z)({ref:mr,elementRef:xr,role:fn===null?"none":fn||"menuitem",tabIndex:Zt?null:-1,"data-menu-id":or&&on?null:on},(0,nt.Z)(Jn,["extra"]),xi,Xr,{component:"li","aria-disabled":Zt,style:(0,Ee.Z)((0,Ee.Z)({},Ar),Nt),className:J()(er,(0,ge.Z)((0,ge.Z)((0,ge.Z)({},"".concat(er,"-active"),dr),"".concat(er,"-selected"),ei),"".concat(er,"-disabled"),Er),At),onClick:xn,onKeyDown:fr,onFocus:pr}),dn,w.createElement(Je,{props:(0,Ee.Z)((0,Ee.Z)({},rt),{},{isSelected:ei}),icon:yr}));return Tn&&(ai=Tn(ai,rt,{selected:ei})),ai});function Me(rt,ht){var Nt=rt.eventKey,At=ce(),Pt=Fe(Nt);return w.useEffect(function(){if(At)return At.registerPath(Nt,Pt),function(){At.unregisterPath(Nt,Pt)}},[Pt]),At?null:w.createElement(Ae,(0,d.Z)({},rt,{ref:ht}))}var Xe=w.forwardRef(Me),ee=["className","children"],oe=function(ht,Nt){var At=ht.className,Pt=ht.children,$t=(0,g.Z)(ht,ee),Zt=w.useContext(H),tn=Zt.prefixCls,dn=Zt.mode,fn=Zt.rtl;return w.createElement("ul",(0,d.Z)({className:J()(tn,fn&&"".concat(tn,"-rtl"),"".concat(tn,"-sub"),"".concat(tn,"-").concat(dn==="inline"?"inline":"vertical"),At),role:"menu"},$t,{"data-menu-list":!0,ref:Nt}),Pt)},xe=w.forwardRef(oe);xe.displayName="SubMenuList";var ze=xe,F=_(11592);function tt(rt,ht){return(0,F.Z)(rt).map(function(Nt,At){if(w.isValidElement(Nt)){var Pt,$t,Zt=Nt.key,tn=(Pt=($t=Nt.props)===null||$t===void 0?void 0:$t.eventKey)!==null&&Pt!==void 0?Pt:Zt,dn=tn==null;dn&&(tn="tmp_key-".concat([].concat((0,ye.Z)(ht),[At]).join("-")));var fn={key:tn,eventKey:tn};return w.cloneElement(Nt,fn)}return Nt})}var se=_(68196),it={adjustX:1,adjustY:1},Ot={topLeft:{points:["bl","tl"],overflow:it},topRight:{points:["br","tr"],overflow:it},bottomLeft:{points:["tl","bl"],overflow:it},bottomRight:{points:["tr","br"],overflow:it},leftTop:{points:["tr","tl"],overflow:it},leftBottom:{points:["br","bl"],overflow:it},rightTop:{points:["tl","tr"],overflow:it},rightBottom:{points:["bl","br"],overflow:it}},Ut={topLeft:{points:["bl","tl"],overflow:it},topRight:{points:["br","tr"],overflow:it},bottomLeft:{points:["tl","bl"],overflow:it},bottomRight:{points:["tr","br"],overflow:it},rightTop:{points:["tr","tl"],overflow:it},rightBottom:{points:["br","bl"],overflow:it},leftTop:{points:["tl","tr"],overflow:it},leftBottom:{points:["bl","br"],overflow:it}},Ht=null;function Xt(rt,ht,Nt){if(ht)return ht;if(Nt)return Nt[rt]||Nt.other}var Vt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function hn(rt){var ht=rt.prefixCls,Nt=rt.visible,At=rt.children,Pt=rt.popup,$t=rt.popupStyle,Zt=rt.popupClassName,tn=rt.popupOffset,dn=rt.disabled,fn=rt.mode,wn=rt.onVisibleChange,cn=w.useContext(H),an=cn.getPopupContainer,mn=cn.rtl,Xn=cn.subMenuOpenDelay,Jn=cn.subMenuCloseDelay,on=cn.builtinPlacements,kn=cn.triggerSubMenuAction,rr=cn.forceSubMenuRender,Hn=cn.rootClassName,zn=cn.motion,or=cn.defaultMotions,In=w.useState(!1),Kn=(0,W.Z)(In,2),lr=Kn[0],Tt=Kn[1],Tn=mn?(0,Ee.Z)((0,Ee.Z)({},Ut),on):(0,Ee.Z)((0,Ee.Z)({},Ot),on),er=Vt[fn],mr=Xt(fn,zn,or),Cr=w.useRef(mr);fn!=="inline"&&(Cr.current=mr);var Er=(0,Ee.Z)((0,Ee.Z)({},Cr.current),{},{leavedClassName:"".concat(ht,"-hidden"),removeOnLeave:!1,motionAppear:!0}),xr=w.useRef();return w.useEffect(function(){return xr.current=(0,Ie.Z)(function(){Tt(Nt)}),function(){Ie.Z.cancel(xr.current)}},[Nt]),w.createElement(se.Z,{prefixCls:ht,popupClassName:J()("".concat(ht,"-popup"),(0,ge.Z)({},"".concat(ht,"-rtl"),mn),Zt,Hn),stretch:fn==="horizontal"?"minWidth":null,getPopupContainer:an,builtinPlacements:Tn,popupPlacement:er,popupVisible:lr,popup:Pt,popupStyle:$t,popupAlign:tn&&{offset:tn},action:dn?[]:[kn],mouseEnterDelay:Xn,mouseLeaveDelay:Jn,onPopupVisibleChange:wn,forceRender:rr,popupMotion:Er,fresh:!0},At)}var Dn=_(77900);function sn(rt){var ht=rt.id,Nt=rt.open,At=rt.keyPath,Pt=rt.children,$t="inline",Zt=w.useContext(H),tn=Zt.prefixCls,dn=Zt.forceSubMenuRender,fn=Zt.motion,wn=Zt.defaultMotions,cn=Zt.mode,an=w.useRef(!1);an.current=cn===$t;var mn=w.useState(!an.current),Xn=(0,W.Z)(mn,2),Jn=Xn[0],on=Xn[1],kn=an.current?Nt:!1;w.useEffect(function(){an.current&&on(!1)},[cn]);var rr=(0,Ee.Z)({},Xt($t,fn,wn));At.length>1&&(rr.motionAppear=!1);var Hn=rr.onVisibleChanged;return rr.onVisibleChanged=function(zn){return!an.current&&!zn&&on(!0),Hn==null?void 0:Hn(zn)},Jn?null:w.createElement(z,{mode:$t,locked:!an.current},w.createElement(Dn.default,(0,d.Z)({visible:kn},rr,{forceRender:dn,removeOnLeave:!1,leavedClassName:"".concat(tn,"-hidden")}),function(zn){var or=zn.className,In=zn.style;return w.createElement(ze,{id:ht,className:or,style:In},Pt)}))}var An=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Kt=["active"],kt=w.forwardRef(function(rt,ht){var Nt=rt.style,At=rt.className,Pt=rt.title,$t=rt.eventKey,Zt=rt.warnKey,tn=rt.disabled,dn=rt.internalPopupClose,fn=rt.children,wn=rt.itemIcon,cn=rt.expandIcon,an=rt.popupClassName,mn=rt.popupOffset,Xn=rt.popupStyle,Jn=rt.onClick,on=rt.onMouseEnter,kn=rt.onMouseLeave,rr=rt.onTitleClick,Hn=rt.onTitleMouseEnter,zn=rt.onTitleMouseLeave,or=(0,g.Z)(rt,An),In=re($t),Kn=w.useContext(H),lr=Kn.prefixCls,Tt=Kn.mode,Tn=Kn.openKeys,er=Kn.disabled,mr=Kn.overflowDisabled,Cr=Kn.activeKey,Er=Kn.selectedKeys,xr=Kn.itemIcon,Mn=Kn.expandIcon,Ln=Kn.onItemClick,yr=Kn.onOpenChange,cr=Kn.onActive,dr=w.useContext(K),xi=dr._internalRenderSubMenuItem,ei=w.useContext(Ne),Ar=ei.isSubPathKey,xn=Fe(),fr="".concat(lr,"-submenu"),pr=er||tn,Xr=w.useRef(),ai=w.useRef(),kr=wn!=null?wn:xr,Ur=cn!=null?cn:Mn,Rr=Tn.includes($t),hr=!mr&&Rr,hi=Ar(Er,$t),Gr=pt($t,pr,Hn,zn),ri=Gr.active,oi=(0,g.Z)(Gr,Kt),ti=w.useState(!1),nr=(0,W.Z)(ti,2),fi=nr[0],mi=nr[1],vi=function(Zr){pr||mi(Zr)},Wr=function(Zr){vi(!0),on==null||on({key:$t,domEvent:Zr})},Vn=function(Zr){vi(!1),kn==null||kn({key:$t,domEvent:Zr})},Oi=w.useMemo(function(){return ri||(Tt!=="inline"?fi||Ar([Cr],$t):!1)},[Tt,ri,Cr,fi,$t,Ar]),rn=be(xn.length),Vr=function(Zr){pr||(rr==null||rr({key:$t,domEvent:Zr}),Tt==="inline"&&yr($t,!Rr))},Ii=at(function(Pr){Jn==null||Jn(T(Pr)),Ln(Pr)}),pi=function(Zr){Tt!=="inline"&&yr($t,Zr)},Br=function(){cr($t)},li=In&&"".concat(In,"-popup"),Gn=w.useMemo(function(){return w.createElement(Je,{icon:Tt!=="horizontal"?Ur:void 0,props:(0,Ee.Z)((0,Ee.Z)({},rt),{},{isOpen:hr,isSubMenu:!0})},w.createElement("i",{className:"".concat(fr,"-arrow")}))},[Tt,Ur,rt,hr,fr]),Qr=w.createElement("div",(0,d.Z)({role:"menuitem",style:rn,className:"".concat(fr,"-title"),tabIndex:pr?null:-1,ref:Xr,title:typeof Pt=="string"?Pt:null,"data-menu-id":mr&&In?null:In,"aria-expanded":hr,"aria-haspopup":!0,"aria-controls":li,"aria-disabled":pr,onClick:Vr,onFocus:Br},oi),Pt,Gn),gi=w.useRef(Tt);if(Tt!=="inline"&&xn.length>1?gi.current="vertical":gi.current=Tt,!mr){var ni=gi.current;Qr=w.createElement(hn,{mode:ni,prefixCls:fr,visible:!dn&&hr&&Tt!=="inline",popupClassName:an,popupOffset:mn,popupStyle:Xn,popup:w.createElement(z,{mode:ni==="horizontal"?"vertical":ni},w.createElement(ze,{id:li,ref:ai},fn)),disabled:pr,onVisibleChange:pi},Qr)}var Dr=w.createElement(o.Z.Item,(0,d.Z)({ref:ht,role:"none"},or,{component:"li",style:Nt,className:J()(fr,"".concat(fr,"-").concat(Tt),At,(0,ge.Z)((0,ge.Z)((0,ge.Z)((0,ge.Z)({},"".concat(fr,"-open"),hr),"".concat(fr,"-active"),Oi),"".concat(fr,"-selected"),hi),"".concat(fr,"-disabled"),pr)),onMouseEnter:Wr,onMouseLeave:Vn}),Qr,!mr&&w.createElement(sn,{id:li,open:hr,keyPath:xn},fn));return xi&&(Dr=xi(Dr,rt,{selected:hi,active:Oi,open:hr,disabled:pr})),w.createElement(z,{onItemClick:Ii,mode:Tt==="horizontal"?"vertical":Tt,itemIcon:kr,expandIcon:Ur},Dr)}),te=w.forwardRef(function(rt,ht){var Nt=rt.eventKey,At=rt.children,Pt=Fe(Nt),$t=tt(At,Pt),Zt=ce();w.useEffect(function(){if(Zt)return Zt.registerPath(Nt,Pt),function(){Zt.unregisterPath(Nt,Pt)}},[Pt]);var tn;return Zt?tn=$t:tn=w.createElement(kt,(0,d.Z)({ref:ht},rt),$t),w.createElement(Oe.Provider,{value:Pt},tn)}),he=te,st=_(43749);function Rt(rt){var ht=rt.className,Nt=rt.style,At=w.useContext(H),Pt=At.prefixCls,$t=ce();return $t?null:w.createElement("li",{role:"separator",className:J()("".concat(Pt,"-item-divider"),ht),style:Nt})}var Ft=["className","title","eventKey","children"],Gt=w.forwardRef(function(rt,ht){var Nt=rt.className,At=rt.title,Pt=rt.eventKey,$t=rt.children,Zt=(0,g.Z)(rt,Ft),tn=w.useContext(H),dn=tn.prefixCls,fn="".concat(dn,"-item-group");return w.createElement("li",(0,d.Z)({ref:ht,role:"presentation"},Zt,{onClick:function(cn){return cn.stopPropagation()},className:J()(fn,Nt)}),w.createElement("div",{role:"presentation",className:"".concat(fn,"-title"),title:typeof At=="string"?At:void 0},At),w.createElement("ul",{role:"group",className:"".concat(fn,"-list")},$t))}),qt=w.forwardRef(function(rt,ht){var Nt=rt.eventKey,At=rt.children,Pt=Fe(Nt),$t=tt(At,Pt),Zt=ce();return Zt?$t:w.createElement(Gt,(0,d.Z)({ref:ht},(0,nt.Z)(rt,["warnKey"])),$t)}),Wt=qt,Qt=["label","children","key","type","extra"];function un(rt,ht,Nt){var At=ht.item,Pt=ht.group,$t=ht.submenu,Zt=ht.divider;return(rt||[]).map(function(tn,dn){if(tn&&(0,st.Z)(tn)==="object"){var fn=tn,wn=fn.label,cn=fn.children,an=fn.key,mn=fn.type,Xn=fn.extra,Jn=(0,g.Z)(fn,Qt),on=an!=null?an:"tmp-".concat(dn);return cn||mn==="group"?mn==="group"?w.createElement(Pt,(0,d.Z)({key:on},Jn,{title:wn}),un(cn,ht,Nt)):w.createElement($t,(0,d.Z)({key:on},Jn,{title:wn}),un(cn,ht,Nt)):mn==="divider"?w.createElement(Zt,(0,d.Z)({key:on},Jn)):w.createElement(At,(0,d.Z)({key:on},Jn,{extra:Xn}),wn,(!!Xn||Xn===0)&&w.createElement("span",{className:"".concat(Nt,"-item-extra")},Xn))}return null}).filter(function(tn){return tn})}function gn(rt,ht,Nt,At,Pt){var $t=rt,Zt=(0,Ee.Z)({divider:Rt,item:Xe,group:Wt,submenu:he},At);return ht&&($t=un(ht,Zt,Pt)),tt($t,Nt)}var Fn=["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"],Pn=[],bn=w.forwardRef(function(rt,ht){var Nt,At=rt,Pt=At.prefixCls,$t=Pt===void 0?"rc-menu":Pt,Zt=At.rootClassName,tn=At.style,dn=At.className,fn=At.tabIndex,wn=fn===void 0?0:fn,cn=At.items,an=At.children,mn=At.direction,Xn=At.id,Jn=At.mode,on=Jn===void 0?"vertical":Jn,kn=At.inlineCollapsed,rr=At.disabled,Hn=At.disabledOverflow,zn=At.subMenuOpenDelay,or=zn===void 0?.1:zn,In=At.subMenuCloseDelay,Kn=In===void 0?.1:In,lr=At.forceSubMenuRender,Tt=At.defaultOpenKeys,Tn=At.openKeys,er=At.activeKey,mr=At.defaultActiveFirst,Cr=At.selectable,Er=Cr===void 0?!0:Cr,xr=At.multiple,Mn=xr===void 0?!1:xr,Ln=At.defaultSelectedKeys,yr=At.selectedKeys,cr=At.onSelect,dr=At.onDeselect,xi=At.inlineIndent,ei=xi===void 0?24:xi,Ar=At.motion,xn=At.defaultMotions,fr=At.triggerSubMenuAction,pr=fr===void 0?"hover":fr,Xr=At.builtinPlacements,ai=At.itemIcon,kr=At.expandIcon,Ur=At.overflowedIndicator,Rr=Ur===void 0?"...":Ur,hr=At.overflowedIndicatorPopupClassName,hi=At.getPopupContainer,Gr=At.onClick,ri=At.onOpenChange,oi=At.onKeyDown,ti=At.openAnimation,nr=At.openTransitionName,fi=At._internalRenderMenuItem,mi=At._internalRenderSubMenuItem,vi=At._internalComponents,Wr=(0,g.Z)(At,Fn),Vn=w.useMemo(function(){return[gn(an,cn,Pn,vi,$t),gn(an,cn,Pn,{},$t)]},[an,cn,vi]),Oi=(0,W.Z)(Vn,2),rn=Oi[0],Vr=Oi[1],Ii=w.useState(!1),pi=(0,W.Z)(Ii,2),Br=pi[0],li=pi[1],Gn=w.useRef(),Qr=dt(Xn),gi=mn==="rtl",ni=(0,X.Z)(Tt,{value:Tn,postState:function(Tr){return Tr||Pn}}),Dr=(0,W.Z)(ni,2),Pr=Dr[0],Zr=Dr[1],ii=function(Tr){var Fr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Si(){Zr(Tr),ri==null||ri(Tr)}Fr?(0,A.flushSync)(Si):Si()},wi=w.useState(Pr),ui=(0,W.Z)(wi,2),zi=ui[0],Gi=ui[1],Mi=w.useRef(!1),_i=w.useMemo(function(){return(on==="inline"||on==="vertical")&&kn?["vertical",kn]:[on,!1]},[on,kn]),Cn=(0,W.Z)(_i,2),Zn=Cn[0],br=Cn[1],qn=Zn==="inline",sr=w.useState(Zn),Ei=(0,W.Z)(sr,2),Jr=Ei[0],Ri=Ei[1],gr=w.useState(br),tr=(0,W.Z)(gr,2),Lr=tr[0],Nr=tr[1];w.useEffect(function(){Ri(Zn),Nr(br),Mi.current&&(qn?Zr(zi):ii(Pn))},[Zn,br]);var qr=w.useState(0),zr=(0,W.Z)(qr,2),si=zr[0],yi=zr[1],ji=si>=rn.length-1||Jr!=="horizontal"||Hn;w.useEffect(function(){qn&&Gi(Pr)},[Pr]),w.useEffect(function(){return Mi.current=!0,function(){Mi.current=!1}},[]);var bi=qe(),_s=bi.registerPath,cs=bi.unregisterPath,js=bi.refreshOverflowKeys,ns=bi.isSubPathKey,Ts=bi.getKeyPath,Fi=bi.getKeys,aa=bi.getSubPathKeys,wa=w.useMemo(function(){return{registerPath:_s,unregisterPath:cs}},[_s,cs]),Hs=w.useMemo(function(){return{isSubPathKey:ns}},[ns]);w.useEffect(function(){js(ji?Pn:rn.slice(si+1).map(function(wr){return wr.key}))},[si,ji]);var oa=(0,X.Z)(er||mr&&((Nt=rn[0])===null||Nt===void 0?void 0:Nt.key),{value:er}),Cs=(0,W.Z)(oa,2),rs=Cs[0],Ks=Cs[1],Hi=at(function(wr){Ks(wr)}),Gs=at(function(){Ks(void 0)});(0,w.useImperativeHandle)(ht,function(){return{list:Gn.current,focus:function(Tr){var Fr,Si=Fi(),Ti=We(Si,Qr),bs=Ti.elements,xs=Ti.key2element,ss=Ti.element2key,Vs=Te(Gn.current,bs),Is=rs!=null?rs:Vs[0]?ss.get(Vs[0]):(Fr=rn.find(function(Ls){return!Ls.props.disabled}))===null||Fr===void 0?void 0:Fr.key,as=xs.get(Is);if(Is&&as){var Rs;as==null||(Rs=as.focus)===null||Rs===void 0||Rs.call(as,Tr)}}}});var la=(0,X.Z)(Ln||[],{value:yr,postState:function(Tr){return Array.isArray(Tr)?Tr:Tr==null?Pn:[Tr]}}),Li=(0,W.Z)(la,2),ds=Li[0],ys=Li[1],As=function(Tr){if(Er){var Fr=Tr.key,Si=ds.includes(Fr),Ti;Mn?Si?Ti=ds.filter(function(xs){return xs!==Fr}):Ti=[].concat((0,ye.Z)(ds),[Fr]):Ti=[Fr],ys(Ti);var bs=(0,Ee.Z)((0,Ee.Z)({},Tr),{},{selectedKeys:Ti});Si?dr==null||dr(bs):cr==null||cr(bs)}!Mn&&Pr.length&&Jr!=="inline"&&ii(Pn)},ua=at(function(wr){Gr==null||Gr(T(wr)),As(wr)}),Wi=at(function(wr,Tr){var Fr=Pr.filter(function(Ti){return Ti!==wr});if(Tr)Fr.push(wr);else if(Jr!=="inline"){var Si=aa(wr);Fr=Fr.filter(function(Ti){return!Si.has(Ti)})}(0,U.Z)(Pr,Fr,!0)||ii(Fr,!0)}),ca=function(Tr,Fr){var Si=Fr!=null?Fr:!Pr.includes(Tr);Wi(Tr,Si)},is=De(Jr,rs,gi,Qr,Gn,Fi,Ts,Ks,ca,oi);w.useEffect(function(){li(!0)},[]);var Ds=w.useMemo(function(){return{_internalRenderMenuItem:fi,_internalRenderSubMenuItem:mi}},[fi,mi]),Vi=Jr!=="horizontal"||Hn?rn:rn.map(function(wr,Tr){return w.createElement(z,{key:wr.key,overflowDisabled:Tr>si},wr)}),Ws=w.createElement(o.Z,(0,d.Z)({id:Xn,ref:Gn,prefixCls:"".concat($t,"-overflow"),component:"ul",itemComponent:Xe,className:J()($t,"".concat($t,"-root"),"".concat($t,"-").concat(Jr),dn,(0,ge.Z)((0,ge.Z)({},"".concat($t,"-inline-collapsed"),Lr),"".concat($t,"-rtl"),gi),Zt),dir:mn,style:tn,role:"menu",tabIndex:wn,data:Vi,renderRawItem:function(Tr){return Tr},renderRawRest:function(Tr){var Fr=Tr.length,Si=Fr?rn.slice(-Fr):null;return w.createElement(he,{eventKey:Be,title:Rr,disabled:ji,internalPopupClose:Fr===0,popupClassName:hr},Si)},maxCount:Jr!=="horizontal"||Hn?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Tr){yi(Tr)},onKeyDown:is},Wr));return w.createElement(K.Provider,{value:Ds},w.createElement(I.Provider,{value:Qr},w.createElement(z,{prefixCls:$t,rootClassName:Zt,mode:Jr,openKeys:Pr,rtl:gi,disabled:rr,motion:Br?Ar:null,defaultMotions:Br?xn:null,activeKey:rs,onActive:Hi,onInactive:Gs,selectedKeys:ds,inlineIndent:ei,subMenuOpenDelay:or,subMenuCloseDelay:Kn,forceSubMenuRender:lr,builtinPlacements:Xr,triggerSubMenuAction:pr,getPopupContainer:hi,itemIcon:ai,expandIcon:kr,onItemClick:ua,onOpenChange:Wi},w.createElement(Ne.Provider,{value:Hs},Ws),w.createElement("div",{style:{display:"none"},"aria-hidden":!0},w.createElement(we.Provider,{value:wa},Vr)))))}),On=bn,Sn=On;Sn.Item=Xe,Sn.SubMenu=he,Sn.ItemGroup=Wt,Sn.Divider=Rt;var Qn=Sn},83836:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return P}});var d=_(60499),ge=_(85899),Ee=_(72190),ye=_(42244),W=_(59301),g=_(92310),ne=_.n(g),J=_(29301),o=_(34280),X=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],U=void 0;function S(b,E){var N=b.prefixCls,ie=b.invalidate,Ie=b.item,Ze=b.renderItem,me=b.responsive,Ce=b.responsiveDisabled,Ke=b.registerSize,Qe=b.itemKey,Ge=b.className,wt=b.style,Ue=b.children,bt=b.display,Le=b.order,lt=b.component,Re=lt===void 0?"div":lt,Te=(0,ye.Z)(b,X),pe=me&&!bt;function We(ve){Ke(Qe,ve)}W.useEffect(function(){return function(){We(null)}},[]);var De=Ze&&Ie!==U?Ze(Ie,{index:Le}):Ue,Se;ie||(Se={opacity:pe?0:1,height:pe?0:U,overflowY:pe?"hidden":U,order:me?Le:U,pointerEvents:pe?"none":U,position:pe?"absolute":U});var k={};pe&&(k["aria-hidden"]=!0);var fe=W.createElement(Re,(0,d.Z)({className:ne()(!ie&&N,Ge),style:(0,ge.Z)((0,ge.Z)({},Se),wt)},k,Te,{ref:E}),De);return me&&(fe=W.createElement(J.Z,{onResize:function(Be){var qe=Be.offsetWidth;We(qe)},disabled:Ce},fe)),fe}var w=W.forwardRef(S);w.displayName="Item";var A=w,I=_(6089),q=_(4676),re=_(16089);function G(b){if(typeof MessageChannel=="undefined")(0,re.Z)(b);else{var E=new MessageChannel;E.port1.onmessage=function(){return b()},E.port2.postMessage(void 0)}}function D(){var b=W.useRef(null),E=function(ie){b.current||(b.current=[],G(function(){(0,q.unstable_batchedUpdates)(function(){b.current.forEach(function(Ie){Ie()}),b.current=null})})),b.current.push(ie)};return E}function H(b,E){var N=W.useState(E),ie=(0,Ee.Z)(N,2),Ie=ie[0],Ze=ie[1],me=(0,I.Z)(function(Ce){b(function(){Ze(Ce)})});return[Ie,me]}var $=W.createContext(null),z=["component"],de=["className"],we=["className"],ce=function(E,N){var ie=W.useContext($);if(!ie){var Ie=E.component,Ze=Ie===void 0?"div":Ie,me=(0,ye.Z)(E,z);return W.createElement(Ze,(0,d.Z)({},me,{ref:N}))}var Ce=ie.className,Ke=(0,ye.Z)(ie,de),Qe=E.className,Ge=(0,ye.Z)(E,we);return W.createElement($.Provider,{value:null},W.createElement(A,(0,d.Z)({ref:N,className:ne()(Ce,Qe)},Ke,Ge)))},Oe=W.forwardRef(ce);Oe.displayName="RawItem";var Fe=Oe,Ne=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],Ve="responsive",K="invalidate";function B(b){return"+ ".concat(b.length," ...")}function L(b,E){var N=b.prefixCls,ie=N===void 0?"rc-overflow":N,Ie=b.data,Ze=Ie===void 0?[]:Ie,me=b.renderItem,Ce=b.renderRawItem,Ke=b.itemKey,Qe=b.itemWidth,Ge=Qe===void 0?10:Qe,wt=b.ssr,Ue=b.style,bt=b.className,Le=b.maxCount,lt=b.renderRest,Re=b.renderRawRest,Te=b.prefix,pe=b.suffix,We=b.component,De=We===void 0?"div":We,Se=b.itemComponent,k=b.onVisibleChange,fe=(0,ye.Z)(b,Ne),ve=wt==="full",Be=D(),qe=H(Be,null),at=(0,Ee.Z)(qe,2),ct=at[0],mt=at[1],dt=ct||0,gt=H(Be,new Map),Lt=(0,Ee.Z)(gt,2),St=Lt[0],Ct=Lt[1],nt=H(Be,0),vt=(0,Ee.Z)(nt,2),pt=vt[0],be=vt[1],Je=H(Be,0),x=(0,Ee.Z)(Je,2),T=x[0],$e=x[1],j=H(Be,0),ae=(0,Ee.Z)(j,2),xt=ae[0],Ae=ae[1],Me=H(Be,0),Xe=(0,Ee.Z)(Me,2),ee=Xe[0],oe=Xe[1],xe=(0,W.useState)(null),ze=(0,Ee.Z)(xe,2),F=ze[0],tt=ze[1],se=(0,W.useState)(null),it=(0,Ee.Z)(se,2),Ot=it[0],Ut=it[1],Ht=W.useMemo(function(){return Ot===null&&ve?Number.MAX_SAFE_INTEGER:Ot||0},[Ot,ct]),Xt=(0,W.useState)(!1),Vt=(0,Ee.Z)(Xt,2),hn=Vt[0],Dn=Vt[1],sn="".concat(ie,"-item"),An=Math.max(pt,T),Kt=Le===Ve,kt=Ze.length&&Kt,te=Le===K,he=kt||typeof Le=="number"&&Ze.length>Le,st=(0,W.useMemo)(function(){var Pt=Ze;return kt?ct===null&&ve?Pt=Ze:Pt=Ze.slice(0,Math.min(Ze.length,dt/Ge)):typeof Le=="number"&&(Pt=Ze.slice(0,Le)),Pt},[Ze,Ge,ct,Le,kt]),Rt=(0,W.useMemo)(function(){return kt?Ze.slice(Ht+1):Ze.slice(st.length)},[Ze,st,kt,Ht]),Ft=(0,W.useCallback)(function(Pt,$t){var Zt;return typeof Ke=="function"?Ke(Pt):(Zt=Ke&&(Pt==null?void 0:Pt[Ke]))!==null&&Zt!==void 0?Zt:$t},[Ke]),Gt=(0,W.useCallback)(me||function(Pt){return Pt},[me]);function qt(Pt,$t,Zt){Ot===Pt&&($t===void 0||$t===F)||(Ut(Pt),Zt||(Dn(Pt<Ze.length-1),k==null||k(Pt)),$t!==void 0&&tt($t))}function Wt(Pt,$t){mt($t.clientWidth)}function Qt(Pt,$t){Ct(function(Zt){var tn=new Map(Zt);return $t===null?tn.delete(Pt):tn.set(Pt,$t),tn})}function un(Pt,$t){$e($t),be(T)}function gn(Pt,$t){Ae($t)}function Fn(Pt,$t){oe($t)}function Pn(Pt){return St.get(Ft(st[Pt],Pt))}(0,o.Z)(function(){if(dt&&typeof An=="number"&&st){var Pt=xt+ee,$t=st.length,Zt=$t-1;if(!$t){qt(0,null);return}for(var tn=0;tn<$t;tn+=1){var dn=Pn(tn);if(ve&&(dn=dn||0),dn===void 0){qt(tn-1,void 0,!0);break}if(Pt+=dn,Zt===0&&Pt<=dt||tn===Zt-1&&Pt+Pn(Zt)<=dt){qt(Zt,null);break}else if(Pt+An>dt){qt(tn-1,Pt-dn-ee+T);break}}pe&&Pn(0)+ee>dt&&tt(null)}},[dt,St,T,xt,ee,Ft,st]);var bn=hn&&!!Rt.length,On={};F!==null&&kt&&(On={position:"absolute",left:F,top:0});var Sn={prefixCls:sn,responsive:kt,component:Se,invalidate:te},Qn=Ce?function(Pt,$t){var Zt=Ft(Pt,$t);return W.createElement($.Provider,{key:Zt,value:(0,ge.Z)((0,ge.Z)({},Sn),{},{order:$t,item:Pt,itemKey:Zt,registerSize:Qt,display:$t<=Ht})},Ce(Pt,$t))}:function(Pt,$t){var Zt=Ft(Pt,$t);return W.createElement(A,(0,d.Z)({},Sn,{order:$t,key:Zt,item:Pt,renderItem:Gt,itemKey:Zt,registerSize:Qt,display:$t<=Ht}))},rt={order:bn?Ht:Number.MAX_SAFE_INTEGER,className:"".concat(sn,"-rest"),registerSize:un,display:bn},ht=lt||B,Nt=Re?W.createElement($.Provider,{value:(0,ge.Z)((0,ge.Z)({},Sn),rt)},Re(Rt)):W.createElement(A,(0,d.Z)({},Sn,rt),typeof ht=="function"?ht(Rt):ht),At=W.createElement(De,(0,d.Z)({className:ne()(!te&&ie,bt),style:Ue,ref:E},fe),Te&&W.createElement(A,(0,d.Z)({},Sn,{responsive:Kt,responsiveDisabled:!kt,order:-1,className:"".concat(sn,"-prefix"),registerSize:gn,display:!0}),Te),st.map(Qn),he?Nt:null,pe&&W.createElement(A,(0,d.Z)({},Sn,{responsive:Kt,responsiveDisabled:!kt,order:Ht,className:"".concat(sn,"-suffix"),registerSize:Fn,display:!0,style:On}),pe));return Kt?W.createElement(J.Z,{onResize:Wt,disabled:!kt},At):At}var Y=W.forwardRef(L);Y.displayName="Overflow",Y.Item=Fe,Y.RESPONSIVE=Ve,Y.INVALIDATE=K;var Q=Y,P=Q},29301:function(Jt,ot,_){"use strict";_.d(ot,{Z:function(){return K}});var d=_(60499),ge=_(59301),Ee=_(11592),ye=_(48736),W=_(85899),g=_(43749),ne=_(76846),J=_(8654),o=ge.createContext(null);function X(B){var L=B.children,Y=B.onBatchResize,Q=ge.useRef(0),P=ge.useRef([]),b=ge.useContext(o),E=ge.useCallback(function(N,ie,Ie){Q.current+=1;var Ze=Q.current;P.current.push({size:N,element:ie,data:Ie}),Promise.resolve().then(function(){Ze===Q.current&&(Y==null||Y(P.current),P.current=[])}),b==null||b(N,ie,Ie)},[Y,b]);return ge.createElement(o.Provider,{value:E},L)}var U=_(76374),S=new Map;function w(B){B.forEach(function(L){var Y,Q=L.target;(Y=S.get(Q))===null||Y===void 0||Y.forEach(function(P){return P(Q)})})}var A=new U.Z(w),I=null,q=null;function re(B,L){S.has(B)||(S.set(B,new Set),A.observe(B)),S.get(B).add(L)}function G(B,L){S.has(B)&&(S.get(B).delete(L),S.get(B).size||(A.unobserve(B),S.delete(B)))}var D=_(38705),H=_(17212),$=_(39153),z=_(55401),de=function(B){(0,$.Z)(Y,B);var L=(0,z.Z)(Y);function Y(){return(0,D.Z)(this,Y),L.apply(this,arguments)}return(0,H.Z)(Y,[{key:"render",value:function(){return this.props.children}}]),Y}(ge.Component);function we(B,L){var Y=B.children,Q=B.disabled,P=ge.useRef(null),b=ge.useRef(null),E=ge.useContext(o),N=typeof Y=="function",ie=N?Y(P):Y,Ie=ge.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Ze=!N&&ge.isValidElement(ie)&&(0,J.Yr)(ie),me=Ze?(0,J.C4)(ie):null,Ce=(0,J.x1)(me,P),Ke=function(){var Ue;return(0,ne.ZP)(P.current)||(P.current&&(0,g.Z)(P.current)==="object"?(0,ne.ZP)((Ue=P.current)===null||Ue===void 0?void 0:Ue.nativeElement):null)||(0,ne.ZP)(b.current)};ge.useImperativeHandle(L,function(){return Ke()});var Qe=ge.useRef(B);Qe.current=B;var Ge=ge.useCallback(function(wt){var Ue=Qe.current,bt=Ue.onResize,Le=Ue.data,lt=wt.getBoundingClientRect(),Re=lt.width,Te=lt.height,pe=wt.offsetWidth,We=wt.offsetHeight,De=Math.floor(Re),Se=Math.floor(Te);if(Ie.current.width!==De||Ie.current.height!==Se||Ie.current.offsetWidth!==pe||Ie.current.offsetHeight!==We){var k={width:De,height:Se,offsetWidth:pe,offsetHeight:We};Ie.current=k;var fe=pe===Math.round(Re)?Re:pe,ve=We===Math.round(Te)?Te:We,Be=(0,W.Z)((0,W.Z)({},k),{},{offsetWidth:fe,offsetHeight:ve});E==null||E(Be,wt,Le),bt&&Promise.resolve().then(function(){bt(Be,wt)})}},[]);return ge.useEffect(function(){var wt=Ke();return wt&&!Q&&re(wt,Ge),function(){return G(wt,Ge)}},[P.current,Q]),ge.createElement(de,{ref:b},Ze?ge.cloneElement(ie,{ref:Ce}):ie)}var ce=ge.forwardRef(we),Oe=ce,Fe="rc-observer-key";function Ne(B,L){var Y=B.children,Q=typeof Y=="function"?[Y]:(0,Ee.Z)(Y);return Q.map(function(P,b){var E=(P==null?void 0:P.key)||"".concat(Fe,"-").concat(b);return ge.createElement(Oe,(0,d.Z)({},B,{key:E,ref:b===0?L:void 0}),P)})}var Ve=ge.forwardRef(Ne);Ve.Collection=X;var K=Ve},22711:function(Jt,ot,_){"use strict";_.r(ot),_.d(ot,{ResizableTextArea:function(){return Ve},default:function(){return Y}});var d=_(60499),ge=_(18642),Ee=_(85899),ye=_(77654),W=_(72190),g=_(42244),ne=_(92310),J=_.n(ne),o=_(36901),X=_(66003),U=_(30292),S=_(18929),w=_(59301),A=_(43749),I=_(29301),q=_(34280),re=_(16089),G=`
|
|
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"],H={},$;function z(Q){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,b=Q.getAttribute("id")||Q.getAttribute("data-reactid")||Q.getAttribute("name");if(P&&H[b])return H[b];var E=window.getComputedStyle(Q),N=E.getPropertyValue("box-sizing")||E.getPropertyValue("-moz-box-sizing")||E.getPropertyValue("-webkit-box-sizing"),ie=parseFloat(E.getPropertyValue("padding-bottom"))+parseFloat(E.getPropertyValue("padding-top")),Ie=parseFloat(E.getPropertyValue("border-bottom-width"))+parseFloat(E.getPropertyValue("border-top-width")),Ze=D.map(function(Ce){return"".concat(Ce,":").concat(E.getPropertyValue(Ce))}).join(";"),me={sizingStyle:Ze,paddingSize:ie,borderSize:Ie,boxSizing:N};return P&&b&&(H[b]=me),me}function de(Q){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,E=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;$||($=document.createElement("textarea"),$.setAttribute("tab-index","-1"),$.setAttribute("aria-hidden","true"),$.setAttribute("name","hiddenTextarea"),document.body.appendChild($)),Q.getAttribute("wrap")?$.setAttribute("wrap",Q.getAttribute("wrap")):$.removeAttribute("wrap");var N=z(Q,P),ie=N.paddingSize,Ie=N.borderSize,Ze=N.boxSizing,me=N.sizingStyle;$.setAttribute("style","".concat(me,";").concat(G)),$.value=Q.value||Q.placeholder||"";var Ce=void 0,Ke=void 0,Qe,Ge=$.scrollHeight;if(Ze==="border-box"?Ge+=Ie:Ze==="content-box"&&(Ge-=ie),b!==null||E!==null){$.value=" ";var wt=$.scrollHeight-ie;b!==null&&(Ce=wt*b,Ze==="border-box"&&(Ce=Ce+ie+Ie),Ge=Math.max(Ce,Ge)),E!==null&&(Ke=wt*E,Ze==="border-box"&&(Ke=Ke+ie+Ie),Qe=Ge>Ke?"":"hidden",Ge=Math.min(Ke,Ge))}var Ue={height:Ge,overflowY:Qe,resize:"none"};return Ce&&(Ue.minHeight=Ce),Ke&&(Ue.maxHeight=Ke),Ue}var we=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ce=0,Oe=1,Fe=2,Ne=w.forwardRef(function(Q,P){var b=Q,E=b.prefixCls,N=b.defaultValue,ie=b.value,Ie=b.autoSize,Ze=b.onResize,me=b.className,Ce=b.style,Ke=b.disabled,Qe=b.onChange,Ge=b.onInternalAutoSize,wt=(0,g.Z)(b,we),Ue=(0,S.Z)(N,{value:ie,postState:function(Je){return Je!=null?Je:""}}),bt=(0,W.Z)(Ue,2),Le=bt[0],lt=bt[1],Re=function(Je){lt(Je.target.value),Qe==null||Qe(Je)},Te=w.useRef();w.useImperativeHandle(P,function(){return{textArea:Te.current}});var pe=w.useMemo(function(){return Ie&&(0,A.Z)(Ie)==="object"?[Ie.minRows,Ie.maxRows]:[]},[Ie]),We=(0,W.Z)(pe,2),De=We[0],Se=We[1],k=!!Ie,fe=function(){try{if(document.activeElement===Te.current){var Je=Te.current,x=Je.selectionStart,T=Je.selectionEnd,$e=Je.scrollTop;Te.current.setSelectionRange(x,T),Te.current.scrollTop=$e}}catch(j){}},ve=w.useState(Fe),Be=(0,W.Z)(ve,2),qe=Be[0],at=Be[1],ct=w.useState(),mt=(0,W.Z)(ct,2),dt=mt[0],gt=mt[1],Lt=function(){at(ce)};(0,q.Z)(function(){k&&Lt()},[ie,De,Se,k]),(0,q.Z)(function(){if(qe===ce)at(Oe);else if(qe===Oe){var be=de(Te.current,!1,De,Se);at(Fe),gt(be)}else fe()},[qe]);var St=w.useRef(),Ct=function(){re.Z.cancel(St.current)},nt=function(Je){qe===Fe&&(Ze==null||Ze(Je),Ie&&(Ct(),St.current=(0,re.Z)(function(){Lt()})))};w.useEffect(function(){return Ct},[]);var vt=k?dt:null,pt=(0,Ee.Z)((0,Ee.Z)({},Ce),vt);return(qe===ce||qe===Oe)&&(pt.overflowY="hidden",pt.overflowX="hidden"),w.createElement(I.Z,{onResize:nt,disabled:!(Ie||Ze)},w.createElement("textarea",(0,d.Z)({},wt,{ref:Te,style:pt,className:J()(E,me,(0,ge.Z)({},"".concat(E,"-disabled"),Ke)),disabled:Ke,value:Le,onChange:Re})))}),Ve=Ne,K=["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(Q,P){var b,E=Q.defaultValue,N=Q.value,ie=Q.onFocus,Ie=Q.onBlur,Ze=Q.onChange,me=Q.allowClear,Ce=Q.maxLength,Ke=Q.onCompositionStart,Qe=Q.onCompositionEnd,Ge=Q.suffix,wt=Q.prefixCls,Ue=wt===void 0?"rc-textarea":wt,bt=Q.showCount,Le=Q.count,lt=Q.className,Re=Q.style,Te=Q.disabled,pe=Q.hidden,We=Q.classNames,De=Q.styles,Se=Q.onResize,k=Q.onClear,fe=Q.onPressEnter,ve=Q.readOnly,Be=Q.autoSize,qe=Q.onKeyDown,at=(0,g.Z)(Q,K),ct=(0,S.Z)(E,{value:N,defaultValue:E}),mt=(0,W.Z)(ct,2),dt=mt[0],gt=mt[1],Lt=dt==null?"":String(dt),St=w.useState(!1),Ct=(0,W.Z)(St,2),nt=Ct[0],vt=Ct[1],pt=w.useRef(!1),be=w.useState(null),Je=(0,W.Z)(be,2),x=Je[0],T=Je[1],$e=(0,w.useRef)(null),j=(0,w.useRef)(null),ae=function(){var te;return(te=j.current)===null||te===void 0?void 0:te.textArea},xt=function(){ae().focus()};(0,w.useImperativeHandle)(P,function(){var kt;return{resizableTextArea:j.current,focus:xt,blur:function(){ae().blur()},nativeElement:((kt=$e.current)===null||kt===void 0?void 0:kt.nativeElement)||ae()}}),(0,w.useEffect)(function(){vt(function(kt){return!Te&&kt})},[Te]);var Ae=w.useState(null),Me=(0,W.Z)(Ae,2),Xe=Me[0],ee=Me[1];w.useEffect(function(){if(Xe){var kt;(kt=ae()).setSelectionRange.apply(kt,(0,ye.Z)(Xe))}},[Xe]);var oe=(0,X.Z)(Le,bt),xe=(b=oe.max)!==null&&b!==void 0?b:Ce,ze=Number(xe)>0,F=oe.strategy(Lt),tt=!!xe&&F>xe,se=function(te,he){var st=he;!pt.current&&oe.exceedFormatter&&oe.max&&oe.strategy(he)>oe.max&&(st=oe.exceedFormatter(he,{max:oe.max}),he!==st&&ee([ae().selectionStart||0,ae().selectionEnd||0])),gt(st),(0,U.rJ)(te.currentTarget,te,Ze,st)},it=function(te){pt.current=!0,Ke==null||Ke(te)},Ot=function(te){pt.current=!1,se(te,te.currentTarget.value),Qe==null||Qe(te)},Ut=function(te){se(te,te.target.value)},Ht=function(te){te.key==="Enter"&&fe&&fe(te),qe==null||qe(te)},Xt=function(te){vt(!0),ie==null||ie(te)},Vt=function(te){vt(!1),Ie==null||Ie(te)},hn=function(te){gt(""),xt(),(0,U.rJ)(ae(),te,Ze)},Dn=Ge,sn;oe.show&&(oe.showFormatter?sn=oe.showFormatter({value:Lt,count:F,maxLength:xe}):sn="".concat(F).concat(ze?" / ".concat(xe):""),Dn=w.createElement(w.Fragment,null,Dn,w.createElement("span",{className:J()("".concat(Ue,"-data-count"),We==null?void 0:We.count),style:De==null?void 0:De.count},sn)));var An=function(te){var he;Se==null||Se(te),(he=ae())!==null&&he!==void 0&&he.style.height&&T(!0)},Kt=!Be&&!bt&&!me;return w.createElement(o.BaseInput,{ref:$e,value:Lt,allowClear:me,handleReset:hn,suffix:Dn,prefixCls:Ue,classNames:(0,Ee.Z)((0,Ee.Z)({},We),{},{affixWrapper:J()(We==null?void 0:We.affixWrapper,(0,ge.Z)((0,ge.Z)({},"".concat(Ue,"-show-count"),bt),"".concat(Ue,"-textarea-allow-clear"),me))}),disabled:Te,focused:nt,className:J()(lt,tt&&"".concat(Ue,"-out-of-range")),style:(0,Ee.Z)((0,Ee.Z)({},Re),x&&!Kt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof sn=="string"?sn:void 0}},hidden:pe,readOnly:ve,onClear:k},w.createElement(Ve,(0,d.Z)({},at,{autoSize:Be,maxLength:Ce,onKeyDown:Ht,onChange:Ut,onFocus:Xt,onBlur:Vt,onCompositionStart:it,onCompositionEnd:Ot,className:J()(We==null?void 0:We.textarea),style:(0,Ee.Z)((0,Ee.Z)({},De==null?void 0:De.textarea),{},{resize:Re==null?void 0:Re.resize}),disabled:Te,prefixCls:Ue,onResize:An,ref:j,readOnly:ve})))}),L=B,Y=L},29125:function(Jt,ot,_){"use strict";_.d(ot,{G:function(){return ye},Z:function(){return G}});var d=_(92310),ge=_.n(d),Ee=_(59301);function ye(D){var H=D.children,$=D.prefixCls,z=D.id,de=D.overlayInnerStyle,we=D.bodyClassName,ce=D.className,Oe=D.style;return Ee.createElement("div",{className:ge()("".concat($,"-content"),ce),style:Oe},Ee.createElement("div",{className:ge()("".concat($,"-inner"),we),id:z,role:"tooltip",style:de},typeof H=="function"?H():H))}var W=_(60499),g=_(85899),ne=_(42244),J=_(68196),o={shiftX:64,adjustY:1},X={adjustX:1,shiftY:!0},U=[0,0],S={left:{points:["cr","cl"],overflow:X,offset:[-4,0],targetOffset:U},right:{points:["cl","cr"],overflow:X,offset:[4,0],targetOffset:U},top:{points:["bc","tc"],overflow:o,offset:[0,-4],targetOffset:U},bottom:{points:["tc","bc"],overflow:o,offset:[0,4],targetOffset:U},topLeft:{points:["bl","tl"],overflow:o,offset:[0,-4],targetOffset:U},leftTop:{points:["tr","tl"],overflow:X,offset:[-4,0],targetOffset:U},topRight:{points:["br","tr"],overflow:o,offset:[0,-4],targetOffset:U},rightTop:{points:["tl","tr"],overflow:X,offset:[4,0],targetOffset:U},bottomRight:{points:["tr","br"],overflow:o,offset:[0,4],targetOffset:U},rightBottom:{points:["bl","br"],overflow:X,offset:[4,0],targetOffset:U},bottomLeft:{points:["tl","bl"],overflow:o,offset:[0,4],targetOffset:U},leftBottom:{points:["br","bl"],overflow:X,offset:[-4,0],targetOffset:U}},w=null,A=_(80402),I=["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(H,$){var z=H.overlayClassName,de=H.trigger,we=de===void 0?["hover"]:de,ce=H.mouseEnterDelay,Oe=ce===void 0?0:ce,Fe=H.mouseLeaveDelay,Ne=Fe===void 0?.1:Fe,Ve=H.overlayStyle,K=H.prefixCls,B=K===void 0?"rc-tooltip":K,L=H.children,Y=H.onVisibleChange,Q=H.afterVisibleChange,P=H.transitionName,b=H.animation,E=H.motion,N=H.placement,ie=N===void 0?"right":N,Ie=H.align,Ze=Ie===void 0?{}:Ie,me=H.destroyTooltipOnHide,Ce=me===void 0?!1:me,Ke=H.defaultVisible,Qe=H.getTooltipContainer,Ge=H.overlayInnerStyle,wt=H.arrowContent,Ue=H.overlay,bt=H.id,Le=H.showArrow,lt=Le===void 0?!0:Le,Re=H.classNames,Te=H.styles,pe=(0,ne.Z)(H,I),We=(0,A.Z)(bt),De=(0,Ee.useRef)(null);(0,Ee.useImperativeHandle)($,function(){return De.current});var Se=(0,g.Z)({},pe);"visible"in H&&(Se.popupVisible=H.visible);var k=function(){return Ee.createElement(ye,{key:"content",prefixCls:B,id:We,bodyClassName:Re==null?void 0:Re.body,overlayInnerStyle:(0,g.Z)((0,g.Z)({},Ge),Te==null?void 0:Te.body)},Ue)},fe=function(){var Be=Ee.Children.only(L),qe=(Be==null?void 0:Be.props)||{},at=(0,g.Z)((0,g.Z)({},qe),{},{"aria-describedby":Ue?We:null});return Ee.cloneElement(L,at)};return Ee.createElement(J.Z,(0,W.Z)({popupClassName:ge()(z,Re==null?void 0:Re.root),prefixCls:B,popup:k,action:we,builtinPlacements:S,popupPlacement:ie,ref:De,popupAlign:Ze,getPopupContainer:Qe,onPopupVisibleChange:Y,afterPopupVisibleChange:Q,popupTransitionName:P,popupAnimation:b,popupMotion:E,defaultPopupVisible:Ke,autoDestroy:Ce,mouseLeaveDelay:Ne,popupStyle:(0,g.Z)((0,g.Z)({},Ve),Te==null?void 0:Te.root),mouseEnterDelay:Oe,arrow:lt},Se),fe())},re=(0,Ee.forwardRef)(q),G=re},49658:function(Jt,ot){"use strict";ot.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var _=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(_)||/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(_==null?void 0:_.substr(0,4))}},83145:function(Jt,ot,_){"use strict";Object.defineProperty(ot,"__esModule",{value:!0}),ot.CopyToClipboard=void 0;var d=Ee(_(59301)),ge=Ee(_(25769));function Ee(D){return D&&D.__esModule?D:{default:D}}function ye(D){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ye=function($){return typeof $}:ye=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},ye(D)}function W(D,H){var $=Object.keys(D);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(D);H&&(z=z.filter(function(de){return Object.getOwnPropertyDescriptor(D,de).enumerable})),$.push.apply($,z)}return $}function g(D){for(var H=1;H<arguments.length;H++){var $=arguments[H]!=null?arguments[H]:{};H%2?W($,!0).forEach(function(z){re(D,z,$[z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors($)):W($).forEach(function(z){Object.defineProperty(D,z,Object.getOwnPropertyDescriptor($,z))})}return D}function ne(D,H){if(D==null)return{};var $=J(D,H),z,de;if(Object.getOwnPropertySymbols){var we=Object.getOwnPropertySymbols(D);for(de=0;de<we.length;de++)z=we[de],!(H.indexOf(z)>=0)&&Object.prototype.propertyIsEnumerable.call(D,z)&&($[z]=D[z])}return $}function J(D,H){if(D==null)return{};var $={},z=Object.keys(D),de,we;for(we=0;we<z.length;we++)de=z[we],!(H.indexOf(de)>=0)&&($[de]=D[de]);return $}function o(D,H){if(!(D instanceof H))throw new TypeError("Cannot call a class as a function")}function X(D,H){for(var $=0;$<H.length;$++){var z=H[$];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(D,z.key,z)}}function U(D,H,$){return H&&X(D.prototype,H),$&&X(D,$),D}function S(D,H){return H&&(ye(H)==="object"||typeof H=="function")?H:A(D)}function w(D){return w=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},w(D)}function A(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function I(D,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(H&&H.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),H&&q(D,H)}function q(D,H){return q=Object.setPrototypeOf||function(z,de){return z.__proto__=de,z},q(D,H)}function re(D,H,$){return H in D?Object.defineProperty(D,H,{value:$,enumerable:!0,configurable:!0,writable:!0}):D[H]=$,D}var G=function(D){I(H,D);function H(){var $,z;o(this,H);for(var de=arguments.length,we=new Array(de),ce=0;ce<de;ce++)we[ce]=arguments[ce];return z=S(this,($=w(H)).call.apply($,[this].concat(we))),re(A(z),"onClick",function(Oe){var Fe=z.props,Ne=Fe.text,Ve=Fe.onCopy,K=Fe.children,B=Fe.options,L=d.default.Children.only(K),Y=(0,ge.default)(Ne,B);Ve&&Ve(Ne,Y),L&&L.props&&typeof L.props.onClick=="function"&&L.props.onClick(Oe)}),z}return U(H,[{key:"render",value:function(){var z=this.props,de=z.text,we=z.onCopy,ce=z.options,Oe=z.children,Fe=ne(z,["text","onCopy","options","children"]),Ne=d.default.Children.only(Oe);return d.default.cloneElement(Ne,g({},Fe,{onClick:this.onClick}))}}]),H}(d.default.PureComponent);ot.CopyToClipboard=G,re(G,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Jt,ot,_){"use strict";var d=_(83145),ge=d.CopyToClipboard;ge.CopyToClipboard=ge,Jt.exports=ge},51581:function(Jt,ot,_){"use strict";Object.defineProperty(ot,"__esModule",{value:!0});var d=function(){function S(w,A){for(var I=0;I<A.length;I++){var q=A[I];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(w,q.key,q)}}return function(w,A,I){return A&&S(w.prototype,A),I&&S(w,I),w}}(),ge=_(59301),Ee=g(ge),ye=_(12708),W=g(ye);function g(S){return S&&S.__esModule?S:{default:S}}function ne(S,w){var A={};for(var I in S)w.indexOf(I)>=0||Object.prototype.hasOwnProperty.call(S,I)&&(A[I]=S[I]);return A}function J(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function o(S,w){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:S}function X(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);S.prototype=Object.create(w&&w.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(S,w):S.__proto__=w)}var U=function(S){X(w,S);function w(A){J(this,w);var I=o(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,A));return I.scrollListener=I.scrollListener.bind(I),I.eventListenerOptions=I.eventListenerOptions.bind(I),I.mousewheelListener=I.mousewheelListener.bind(I),I}return d(w,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var I=this.getParentElement(this.scrollComponent);I.scrollTop=I.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var I=!1,q={get passive(){I=!0}};try{document.addEventListener("test",null,q),document.removeEventListener("test",null,q)}catch(re){}return I}},{key:"eventListenerOptions",value:function(){var I=this.props.useCapture;return this.isPassiveSupported()&&(I={useCapture:this.props.useCapture,passive:!0}),I}},{key:"setDefaultLoader",value:function(I){this.defaultLoader=I}},{key:"detachMousewheelListener",value:function(){var I=window;this.props.useWindow===!1&&(I=this.scrollComponent.parentNode),I.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var I=window;this.props.useWindow===!1&&(I=this.getParentElement(this.scrollComponent)),I.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),I.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(I){var q=this.props.getScrollParent&&this.props.getScrollParent();return q!=null?q:I&&I.parentNode}},{key:"filterProps",value:function(I){return I}},{key:"attachScrollListener",value:function(){var I=this.getParentElement(this.scrollComponent);if(!(!this.props.hasMore||!I)){var q=window;this.props.useWindow===!1&&(q=I),q.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),q.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),q.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(I){I.deltaY===1&&!this.isPassiveSupported()&&I.preventDefault()}},{key:"scrollListener",value:function(){var I=this.scrollComponent,q=window,re=this.getParentElement(I),G=void 0;if(this.props.useWindow){var D=document.documentElement||document.body.parentNode||document.body,H=q.pageYOffset!==void 0?q.pageYOffset:D.scrollTop;this.props.isReverse?G=H:G=this.calculateOffset(I,H)}else this.props.isReverse?G=re.scrollTop:G=I.scrollHeight-re.scrollTop-re.clientHeight;G<Number(this.props.threshold)&&I&&I.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=re.scrollHeight,this.beforeScrollTop=re.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(I,q){return I?this.calculateTopPosition(I)+(I.offsetHeight-q-window.innerHeight):0}},{key:"calculateTopPosition",value:function(I){return I?I.offsetTop+this.calculateTopPosition(I.offsetParent):0}},{key:"render",value:function(){var I=this,q=this.filterProps(this.props),re=q.children,G=q.element,D=q.hasMore,H=q.initialLoad,$=q.isReverse,z=q.loader,de=q.loadMore,we=q.pageStart,ce=q.ref,Oe=q.threshold,Fe=q.useCapture,Ne=q.useWindow,Ve=q.getScrollParent,K=ne(q,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);K.ref=function(L){I.scrollComponent=L,ce&&ce(L)};var B=[re];return D&&(z?$?B.unshift(z):B.push(z):this.defaultLoader&&($?B.unshift(this.defaultLoader):B.push(this.defaultLoader))),Ee.default.createElement(G,K,B)}}]),w}(ge.Component);U.propTypes={children:W.default.node.isRequired,element:W.default.node,hasMore:W.default.bool,initialLoad:W.default.bool,isReverse:W.default.bool,loader:W.default.node,loadMore:W.default.func.isRequired,pageStart:W.default.number,ref:W.default.func,getScrollParent:W.default.func,threshold:W.default.number,useCapture:W.default.bool,useWindow:W.default.bool},U.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},ot.default=U,Jt.exports=ot.default},26724:function(Jt,ot,_){Jt.exports=_(51581)},76374:function(Jt,ot,_){"use strict";var d=function(){if(typeof Map!="undefined")return Map;function K(B,L){var Y=-1;return B.some(function(Q,P){return Q[0]===L?(Y=P,!0):!1}),Y}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(L){var Y=K(this.__entries__,L),Q=this.__entries__[Y];return Q&&Q[1]},B.prototype.set=function(L,Y){var Q=K(this.__entries__,L);~Q?this.__entries__[Q][1]=Y:this.__entries__.push([L,Y])},B.prototype.delete=function(L){var Y=this.__entries__,Q=K(Y,L);~Q&&Y.splice(Q,1)},B.prototype.has=function(L){return!!~K(this.__entries__,L)},B.prototype.clear=function(){this.__entries__.splice(0)},B.prototype.forEach=function(L,Y){Y===void 0&&(Y=null);for(var Q=0,P=this.__entries__;Q<P.length;Q++){var b=P[Q];L.call(Y,b[1],b[0])}},B}()}(),ge=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Ee=function(){return typeof _.g!="undefined"&&_.g.Math===Math?_.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),ye=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Ee):function(K){return setTimeout(function(){return K(Date.now())},1e3/60)}}(),W=2;function g(K,B){var L=!1,Y=!1,Q=0;function P(){L&&(L=!1,K()),Y&&E()}function b(){ye(P)}function E(){var N=Date.now();if(L){if(N-Q<W)return;Y=!0}else L=!0,Y=!1,setTimeout(b,B);Q=N}return E}var ne=20,J=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",X=function(){function K(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=g(this.refresh.bind(this),ne)}return K.prototype.addObserver=function(B){~this.observers_.indexOf(B)||this.observers_.push(B),this.connected_||this.connect_()},K.prototype.removeObserver=function(B){var L=this.observers_,Y=L.indexOf(B);~Y&&L.splice(Y,1),!L.length&&this.connected_&&this.disconnect_()},K.prototype.refresh=function(){var B=this.updateObservers_();B&&this.refresh()},K.prototype.updateObservers_=function(){var B=this.observers_.filter(function(L){return L.gatherActive(),L.hasActive()});return B.forEach(function(L){return L.broadcastActive()}),B.length>0},K.prototype.connect_=function(){!ge||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)},K.prototype.disconnect_=function(){!ge||!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)},K.prototype.onTransitionEnd_=function(B){var L=B.propertyName,Y=L===void 0?"":L,Q=J.some(function(P){return!!~Y.indexOf(P)});Q&&this.refresh()},K.getInstance=function(){return this.instance_||(this.instance_=new K),this.instance_},K.instance_=null,K}(),U=function(K,B){for(var L=0,Y=Object.keys(B);L<Y.length;L++){var Q=Y[L];Object.defineProperty(K,Q,{value:B[Q],enumerable:!1,writable:!1,configurable:!0})}return K},S=function(K){var B=K&&K.ownerDocument&&K.ownerDocument.defaultView;return B||Ee},w=de(0,0,0,0);function A(K){return parseFloat(K)||0}function I(K){for(var B=[],L=1;L<arguments.length;L++)B[L-1]=arguments[L];return B.reduce(function(Y,Q){var P=K["border-"+Q+"-width"];return Y+A(P)},0)}function q(K){for(var B=["top","right","bottom","left"],L={},Y=0,Q=B;Y<Q.length;Y++){var P=Q[Y],b=K["padding-"+P];L[P]=A(b)}return L}function re(K){var B=K.getBBox();return de(0,0,B.width,B.height)}function G(K){var B=K.clientWidth,L=K.clientHeight;if(!B&&!L)return w;var Y=S(K).getComputedStyle(K),Q=q(Y),P=Q.left+Q.right,b=Q.top+Q.bottom,E=A(Y.width),N=A(Y.height);if(Y.boxSizing==="border-box"&&(Math.round(E+P)!==B&&(E-=I(Y,"left","right")+P),Math.round(N+b)!==L&&(N-=I(Y,"top","bottom")+b)),!H(K)){var ie=Math.round(E+P)-B,Ie=Math.round(N+b)-L;Math.abs(ie)!==1&&(E-=ie),Math.abs(Ie)!==1&&(N-=Ie)}return de(Q.left,Q.top,E,N)}var D=function(){return typeof SVGGraphicsElement!="undefined"?function(K){return K instanceof S(K).SVGGraphicsElement}:function(K){return K instanceof S(K).SVGElement&&typeof K.getBBox=="function"}}();function H(K){return K===S(K).document.documentElement}function $(K){return ge?D(K)?re(K):G(K):w}function z(K){var B=K.x,L=K.y,Y=K.width,Q=K.height,P=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,b=Object.create(P.prototype);return U(b,{x:B,y:L,width:Y,height:Q,top:L,right:B+Y,bottom:Q+L,left:B}),b}function de(K,B,L,Y){return{x:K,y:B,width:L,height:Y}}var we=function(){function K(B){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=de(0,0,0,0),this.target=B}return K.prototype.isActive=function(){var B=$(this.target);return this.contentRect_=B,B.width!==this.broadcastWidth||B.height!==this.broadcastHeight},K.prototype.broadcastRect=function(){var B=this.contentRect_;return this.broadcastWidth=B.width,this.broadcastHeight=B.height,B},K}(),ce=function(){function K(B,L){var Y=z(L);U(this,{target:B,contentRect:Y})}return K}(),Oe=function(){function K(B,L,Y){if(this.activeObservations_=[],this.observations_=new d,typeof B!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=B,this.controller_=L,this.callbackCtx_=Y}return K.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 L=this.observations_;L.has(B)||(L.set(B,new we(B)),this.controller_.addObserver(this),this.controller_.refresh())}},K.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 L=this.observations_;L.has(B)&&(L.delete(B),L.size||this.controller_.removeObserver(this))}},K.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},K.prototype.gatherActive=function(){var B=this;this.clearActive(),this.observations_.forEach(function(L){L.isActive()&&B.activeObservations_.push(L)})},K.prototype.broadcastActive=function(){if(this.hasActive()){var B=this.callbackCtx_,L=this.activeObservations_.map(function(Y){return new ce(Y.target,Y.broadcastRect())});this.callback_.call(B,L,B),this.clearActive()}},K.prototype.clearActive=function(){this.activeObservations_.splice(0)},K.prototype.hasActive=function(){return this.activeObservations_.length>0},K}(),Fe=typeof WeakMap!="undefined"?new WeakMap:new d,Ne=function(){function K(B){if(!(this instanceof K))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var L=X.getInstance(),Y=new Oe(B,L,this);Fe.set(this,Y)}return K}();["observe","unobserve","disconnect"].forEach(function(K){Ne.prototype[K]=function(){var B;return(B=Fe.get(this))[K].apply(B,arguments)}});var Ve=function(){return typeof Ee.ResizeObserver!="undefined"?Ee.ResizeObserver:Ne}();ot.Z=Ve},98040:function(Jt){Jt.exports=function(){var ot=document.getSelection();if(!ot.rangeCount)return function(){};for(var _=document.activeElement,d=[],ge=0;ge<ot.rangeCount;ge++)d.push(ot.getRangeAt(ge));switch(_.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":_.blur();break;default:_=null;break}return ot.removeAllRanges(),function(){ot.type==="Caret"&&ot.removeAllRanges(),ot.rangeCount||d.forEach(function(Ee){ot.addRange(Ee)}),_&&_.focus()}}},4977:function(Jt){"use strict";Jt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},16471:function(Jt,ot,_){"use strict";_.d(ot,{ZP:function(){return zs}});const d=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},ge=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=Ee},Ee=Number.MAX_SAFE_INTEGER||9007199254740991;let ye=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}({}),W=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 ne={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},J={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 X{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 U(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 A(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){U(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 I(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=I(a,"string");return typeof e=="symbol"?e:e+""}class re{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=G,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 G=function(){},D={trace:G,debug:G,log:G,warn:G,info:G,error:G};function H(){return S({},D)}function $(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):G}function z(a,e,t){return e[a]?e[a].bind(e):$(a,t)}const de=H();function we(a,e,t){const n=H();if(typeof console=="object"&&a===!0||typeof a=="object"){const r=["debug","log","info","warn","error"];r.forEach(i=>{n[i]=z(i,a,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.15`)}catch(i){return H()}r.forEach(i=>{de[i]=z(i,a)})}else S(de,n);return n}const ce=de;function Oe(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Fe(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function Ne(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 Ve(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 K(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 L(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Y={exports:{}},Q;function P(){return Q||(Q=1,function(a,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(h,c,p){if(p=p||{},h=h.trim(),c=c.trim(),!c){if(!p.alwaysNormalize)return h;var v=l.parseURL(h);if(!v)throw new Error("Error trying to parse base URL.");return v.path=l.normalizePath(v.path),l.buildURLFromParts(v)}var C=l.parseURL(c);if(!C)throw new Error("Error trying to parse relative URL.");if(C.scheme)return p.alwaysNormalize?(C.path=l.normalizePath(C.path),l.buildURLFromParts(C)):c;var O=l.parseURL(h);if(!O)throw new Error("Error trying to parse base URL.");if(!O.netLoc&&O.path&&O.path[0]!=="/"){var M=r.exec(O.path);O.netLoc=M[1],O.path=M[2]}O.netLoc&&!O.path&&(O.path="/");var ue={scheme:O.scheme,netLoc:C.netLoc,path:null,params:C.params,query:C.query,fragment:C.fragment};if(!C.netLoc&&(ue.netLoc=O.netLoc,C.path[0]!=="/"))if(!C.path)ue.path=O.path,C.params||(ue.params=O.params,C.query||(ue.query=O.query));else{var le=O.path,Pe=le.substring(0,le.lastIndexOf("/")+1)+C.path;ue.path=l.normalizePath(Pe)}return ue.path===null&&(ue.path=p.alwaysNormalize?l.normalizePath(C.path):C.path),l.buildURLFromParts(ue)},parseURL:function(h){var c=n.exec(h);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(h){for(h=h.split("").reverse().join("").replace(i,"");h.length!==(h=h.replace(s,"")).length;);return h.split("").reverse().join("")},buildURLFromParts:function(h){return h.scheme+h.netLoc+h.path+h.params+h.query+h.fragment}};a.exports=l})()}(Y)),Y.exports}var b=P();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 N={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class ie{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,Ke(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={[N.AUDIO]:null,[N.VIDEO]:null,[N.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=b.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[N.AUDIO]=null,e[N.VIDEO]=null,e[N.AUDIOVIDEO]=null}}function Ie(a){return a.sn!=="initSegment"}class Ze extends ie{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(d(e)&&d(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=d(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(!d(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return Ie(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,h=l[e];if(!h){l[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:s};return}h.startPTS=Math.min(h.startPTS,t),h.endPTS=Math.max(h.endPTS,n),h.startDTS=Math.min(h.startDTS,r),h.endDTS=Math.max(h.endDTS,i)}}class me extends ie{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 Ce(a,e){const t=Object.getPrototypeOf(a);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||Ce(t,e)}}function Ke(a,e){const t=Ce(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const Qe=Math.pow(2,32)-1,Ge=[].push,wt={video:1,audio:2,id3:3,text:4};function Ue(a){return String.fromCharCode.apply(null,a)}function bt(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function Le(a,e){const t=Re(a,e);return t<0?4294967296+t:t}function lt(a,e){let t=Le(a,e);return t*=Math.pow(2,32),t+=Le(a,e+4),t}function Re(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function Te(a){const e=a.byteLength;for(let t=0;t<e;){const n=Le(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 pe(a,e){const t=[];if(!e.length)return t;const n=a.byteLength;for(let r=0;r<n;){const i=Le(a,r),s=Ue(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 h=pe(a.subarray(r+8,l),e.slice(1));h.length&&Ge.apply(t,h)}r=l}return t}function We(a){const e=[],t=a[0];let n=8;const r=Le(a,n);n+=4;let i=0,s=0;t===0?(i=Le(a,n),s=Le(a,n+4),n+=8):(i=lt(a,n),s=lt(a,n+8),n+=16),n+=2;let l=a.length+s;const h=bt(a,n);n+=2;for(let c=0;c<h;c++){let p=n;const v=Le(a,p);p+=4;const C=v&2147483647;if((v&2147483648)>>>31===1)return ce.warn("SIDX has hierarchical references (not supported)"),null;const M=Le(a,p);p+=4,e.push({referenceSize:C,subsegmentDuration:M,info:{duration:M/r,start:l,end:l+C-1}}),l+=C,p+=4,n=p}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:h,references:e}}function De(a){const e=[],t=pe(a,["moov","trak"]);for(let r=0;r<t.length;r++){const i=t[r],s=pe(i,["tkhd"])[0];if(s){let l=s[0];const h=Le(s,l===0?12:20),c=pe(i,["mdia","mdhd"])[0];if(c){l=c[0];const p=Le(c,l===0?12:20),v=pe(i,["mdia","hdlr"])[0];if(v){const C=Ue(v.subarray(8,12)),O={soun:N.AUDIO,vide:N.VIDEO}[C],M=pe(i,["mdia","minf","stbl","stsd"])[0],ue=Se(M);O?(e[h]={timescale:p,type:O,stsd:ue},e[O]=A({timescale:p,id:h},ue)):e[h]={timescale:p,type:C,stsd:ue}}}}}return pe(a,["moov","mvex","trex"]).forEach(r=>{const i=Le(r,4),s=e[i];s&&(s.default={duration:Le(r,12),flags:Le(r,20)})}),e}function Se(a){const e=a.subarray(8),t=e.subarray(86),n=Ue(e.subarray(4,8));let r=n,i;const s=n==="enca"||n==="encv";if(s){const c=pe(e,[n])[0].subarray(n==="enca"?28:78);pe(c,["sinf"]).forEach(v=>{const C=pe(v,["schm"])[0];if(C){const O=Ue(C.subarray(4,8));if(O==="cbcs"||O==="cenc"){const M=pe(v,["frma"])[0];M&&(r=Ue(M))}}})}const l=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const h=pe(t,["avcC"])[0];h&&h.length>3&&(r+="."+Be(h[1])+Be(h[2])+Be(h[3]),i=k(l==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const h=pe(e,[n])[0],c=pe(h.subarray(28),["esds"])[0];if(c&&c.length>7){let p=4;if(c[p++]!==3)break;p=ve(c,p),p+=2;const v=c[p++];if(v&128&&(p+=2),v&64&&(p+=c[p++]),c[p++]!==4)break;p=ve(c,p);const C=c[p++];if(C===64)r+="."+Be(C);else break;if(p+=12,c[p++]!==5)break;p=ve(c,p);const O=c[p++];let M=(O&248)>>3;M===31&&(M+=1+((O&7)<<3)+((c[p]&224)>>5)),r+="."+M}break}case"hvc1":case"hev1":{const h=pe(t,["hvcC"])[0];if(h&&h.length>12){const c=h[1],p=["","A","B","C"][c>>6],v=c&31,C=Le(h,2),O=(c&32)>>5?"H":"L",M=h[12],ue=h.subarray(6,12);r+="."+p+v,r+="."+fe(C).toString(16).toUpperCase(),r+="."+O+M;let le="";for(let Pe=ue.length;Pe--;){const je=ue[Pe];(je||le)&&(le="."+je.toString(16).toUpperCase()+le)}r+=le}i=k(l=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=k(r,t)||r;break}case"vp09":{const h=pe(t,["vpcC"])[0];if(h&&h.length>6){const c=h[4],p=h[5],v=h[6]>>4&15;r+="."+qe(c)+"."+qe(p)+"."+qe(v)}break}case"av01":{const h=pe(t,["av1C"])[0];if(h&&h.length>2){const c=h[1]>>>5,p=h[1]&31,v=h[2]>>>7?"H":"M",C=(h[2]&64)>>6,O=(h[2]&32)>>5,M=c===2&&C?O?12:10:C?10:8,ue=(h[2]&16)>>4,le=(h[2]&8)>>3,Pe=(h[2]&4)>>2,je=h[2]&3;r+="."+c+"."+qe(p)+v+"."+qe(M)+"."+ue+"."+le+Pe+je+"."+qe(1)+"."+qe(1)+"."+qe(1)+"."+0,i=k("dav1",t)}break}}return{codec:r,encrypted:s,supplemental:i}}function k(a,e){const t=pe(e,["dvvC"]),n=t.length?t[0]:pe(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,i=n[2]<<5&32|n[3]>>3&31;return a+"."+qe(r)+"."+qe(i)}}function fe(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function ve(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function Be(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function qe(a){return(a<10?"0":"")+a}function at(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&mt(a,(n,r)=>{const i=n.subarray(8,24);i.some(s=>s!==0)||(ce.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${K(i)} -> ${K(t)}`),n.set(t,8))})}function ct(a){const e=[];return mt(a,t=>e.push(t.subarray(8,24))),e}function mt(a,e){pe(a,["moov","trak"]).forEach(n=>{const r=pe(n,["mdia","minf","stbl","stsd"])[0];if(!r)return;const i=r.subarray(8);let s=pe(i,["enca"]);const l=s.length>0;l||(s=pe(i,["encv"])),s.forEach(h=>{const c=l?h.subarray(28):h.subarray(78);pe(c,["sinf"]).forEach(v=>{const C=dt(v);C&&e(C,l)})})})}function dt(a){const e=pe(a,["schm"])[0];if(e){const t=Ue(e.subarray(4,8));if(t==="cbcs"||t==="cenc"){const n=pe(a,["schi","tenc"])[0];if(n)return n}}}function gt(a,e,t){const n={},r=pe(a,["moof","traf"]);for(let i=0;i<r.length;i++){const s=r[i],l=pe(s,["tfhd"])[0],h=Le(l,4),c=e[h];if(!c)continue;n[h]||(n[h]={start:NaN,duration:0,sampleCount:0,timescale:c.timescale,type:c.type});const p=n[h],v=pe(s,["tfdt"])[0];if(v){const Ye=v[0];let ut=Le(v,4);Ye===1&&(ut===Qe?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(ut*=Qe+1,ut+=Le(v,8))),d(ut)&&(!d(p.start)||ut<p.start)&&(p.start=ut)}const C=c.default,O=Le(l,0)|(C==null?void 0:C.flags);let M=(C==null?void 0:C.duration)||0;O&8&&(O&2?M=Le(l,12):M=Le(l,8));const ue=pe(s,["trun"]);let le=p.start||0,Pe=0,je=M;for(let Ye=0;Ye<ue.length;Ye++){const ut=ue[Ye],yt=Le(ut,4),zt=p.sampleCount;p.sampleCount+=yt;const Et=ut[3]&1,Bt=ut[3]&4,Mt=ut[2]&1,Dt=ut[2]&2,en=ut[2]&4,En=ut[2]&8;let Bn=8,Yn=yt;for(Et&&(Bn+=4),Bt&&yt&&(!(ut[Bn+1]&1)&&p.keyFrameIndex===void 0&&(p.keyFrameIndex=zt),Bn+=4,Mt?(je=Le(ut,Bn),Bn+=4):je=M,Dt&&(Bn+=4),En&&(Bn+=4),le+=je,Pe+=je,Yn--);Yn--;)Mt?(je=Le(ut,Bn),Bn+=4):je=M,Dt&&(Bn+=4),en&&(ut[Bn+1]&1||p.keyFrameIndex===void 0&&(p.keyFrameIndex=p.sampleCount-(Yn+1),p.keyFrameStart=le),Bn+=4),En&&(Bn+=4),le+=je,Pe+=je;!Pe&&M&&(Pe+=M*yt)}p.duration+=Pe}if(!Object.keys(n).some(i=>n[i].duration)){let i=1/0,s=0;const l=pe(a,["sidx"]);for(let h=0;h<l.length;h++){const c=We(l[h]);if(c!=null&&c.references){i=Math.min(i,c.earliestPresentationTime/c.timescale);const p=c.references.reduce((v,C)=>v+C.info.duration||0,0);s=Math.max(s,p+c.earliestPresentationTime/c.timescale)}}s&&d(s)&&Object.keys(n).forEach(h=>{n[h].duration||(n[h].duration=s*n[h].timescale-n[h].start)})}return n}function Lt(a){const e={valid:null,remainder:null},t=pe(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 St(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function Ct(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return pe(n,["moof"]).map(h=>{const c=h.byteOffset-8;pe(h,["traf"]).map(v=>{const C=pe(v,["tfdt"]).map(O=>{const M=O[0];let ue=Le(O,4);return M===1&&(ue*=Math.pow(2,32),ue+=Le(O,8)),ue/r})[0];return C!==void 0&&(a=C),pe(v,["tfhd"]).map(O=>{const M=Le(O,4),ue=Le(O,0)&16777215,le=(ue&1)!==0,Pe=(ue&2)!==0,je=(ue&8)!==0;let Ye=0;const ut=(ue&16)!==0;let yt=0;const zt=(ue&32)!==0;let Et=8;M===i&&(le&&(Et+=8),Pe&&(Et+=4),je&&(Ye=Le(O,Et),Et+=4),ut&&(yt=Le(O,Et),Et+=4),zt&&(Et+=4),e.type==="video"&&(s=nt(e.codec)),pe(v,["trun"]).map(Bt=>{const Mt=Bt[0],Dt=Le(Bt,0)&16777215,en=(Dt&1)!==0;let En=0;const Bn=(Dt&4)!==0,Yn=(Dt&256)!==0;let Nn=0;const pn=(Dt&512)!==0;let Un=0;const Rn=(Dt&1024)!==0,Wn=(Dt&2048)!==0;let ar=0;const _n=Le(Bt,4);let yn=8;en&&(En=Le(Bt,yn),yn+=4),Bn&&(yn+=4);let vr=En+c;for(let Mr=0;Mr<_n;Mr++){if(Yn?(Nn=Le(Bt,yn),yn+=4):Nn=Ye,pn?(Un=Le(Bt,yn),yn+=4):Un=yt,Rn&&(yn+=4),Wn&&(Mt===0?ar=Le(Bt,yn):ar=Re(Bt,yn),yn+=4),e.type===N.VIDEO){let _r=0;for(;_r<Un;){const Sr=Le(n,vr);if(vr+=4,vt(s,n[vr])){const Bi=n.subarray(vr,vr+Sr);pt(Bi,s?2:1,a+ar/r,t)}vr+=Sr,_r+=Sr+4}}a+=Nn/r}}))})})}),t}function nt(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function vt(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function pt(a,e,t,n){const r=be(a);let i=0;i+=e;let s=0,l=0,h=0;for(;i<r.length;){s=0;do{if(i>=r.length)break;h=r[i++],s+=h}while(h===255);l=0;do{if(i>=r.length)break;h=r[i++],l+=h}while(h===255);const c=r.length-i;let p=i;if(l<c)i+=l;else if(l>c){ce.error(`Malformed SEI payload. ${l} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(r[p++]===181){const C=bt(r,p);if(p+=2,C===49){const O=Le(r,p);if(p+=4,O===1195456820){const M=r[p++];if(M===3){const ue=r[p++],le=31&ue,Pe=64&ue,je=Pe?2+le*3:0,Ye=new Uint8Array(je);if(Pe){Ye[0]=ue;for(let ut=1;ut<je;ut++)Ye[ut]=r[p++]}n.push({type:M,payloadType:s,pts:t,bytes:Ye})}}}}}else if(s===5&&l>16){const v=[];for(let M=0;M<16;M++){const ue=r[p++].toString(16);v.push(ue.length==1?"0"+ue:ue),(M===3||M===5||M===7||M===9)&&v.push("-")}const C=l-16,O=new Uint8Array(C);for(let M=0;M<C;M++)O[M]=r[p++];n.push({payloadType:s,pts:t,uuid:v.join(""),userData:Ve(O),userDataBytes:O})}}}function be(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 Je(a){const e=a[0];let t="",n="",r=0,i=0,s=0,l=0,h=0,c=0;if(e===0){for(;Ue(a.subarray(c,c+1))!=="\0";)t+=Ue(a.subarray(c,c+1)),c+=1;for(t+=Ue(a.subarray(c,c+1)),c+=1;Ue(a.subarray(c,c+1))!=="\0";)n+=Ue(a.subarray(c,c+1)),c+=1;n+=Ue(a.subarray(c,c+1)),c+=1,r=Le(a,12),i=Le(a,16),l=Le(a,20),h=Le(a,24),c=28}else if(e===1){c+=4,r=Le(a,c),c+=4;const v=Le(a,c);c+=4;const C=Le(a,c);for(c+=4,s=bu(2,32)*v+C,ge(s)||(s=Number.MAX_SAFE_INTEGER,ce.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=Le(a,c),c+=4,h=Le(a,c),c+=4;Ue(a.subarray(c,c+1))!=="\0";)t+=Ue(a.subarray(c,c+1)),c+=1;for(t+=Ue(a.subarray(c,c+1)),c+=1;Ue(a.subarray(c,c+1))!=="\0";)n+=Ue(a.subarray(c,c+1)),c+=1;n+=Ue(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:h,payload:p}}function x(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 T(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),x([112,115,115,104],new Uint8Array([n,0,0,0]),a,i,r,s,t)}function $e(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=j(r);e.push(i),n+=i.size}}return e}function j(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=K(new Uint8Array(s,t+12,16));let h=null,c=null,p=0;if(i===0)p=28;else{const C=a.getUint32(28);if(!C||n<32+C*16)return{offset:t,size:e};h=[];for(let O=0;O<C;O++)h.push(new Uint8Array(s,t+32+O*16,16));p=32+C*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:h,data:c,offset:t,size:e})}const ae=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),xt={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Ae(a,e){const t=xt[e];return!!t&&!!t[a.slice(0,4)]}function Me(a,e,t=!0){return!a.split(",").some(n=>!Xe(n,e,t))}function Xe(a,e,t=!0){var n;const r=Oe(t);return(n=r==null?void 0:r.isTypeSupported(ee(a,e)))!=null?n:!1}function ee(a,e){return`${e}/mp4;codecs=${a}`}function oe(a){if(a){const e=a.substring(0,4);return xt.video[e]}return 2}function xe(a){const e=ae();return a.split(",").reduce((t,n)=>{const i=e&&nt(n)?9:xt.video[n];return i?(i*2+t)/(t?3:2):(xt.audio[n]+t)/(t?2:1)},0)}const ze={};function F(a,e=!0){if(ze[a])return ze[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(Xe(t[r],"audio",e))return ze[a]=t[r],t[r];if(t[r]==="mp3"&&(n=Oe(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const tt=/flac|opus|mp4a\.40\.34/i;function se(a,e=!0){return a.replace(tt,t=>F(t.toLowerCase(),e))}function it(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)Ae(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)&&(Ut(a,"audio")||Ut(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 Ut(a,e){return Ae(a,e)&&Xe(a,e)}function Ht(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 Xt(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 Vt(a){const e=Oe(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 hn(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const Dn={supported:!0,powerEfficient:!0,smooth:!0},sn={supported:!1,smooth:!1,powerEfficient:!1},An={supported:!0,configurations:[],decodingInfoResults:[Dn]};function Kt(a,e){return{supported:!1,configurations:e,decodingInfoResults:[sn],error:a}}function kt(a,e,t,n,r,i){const s=a.videoCodec,l=a.audioCodec?a.audioGroups:null,h=i==null?void 0:i.audioCodec,c=i==null?void 0:i.channels,p=c?parseInt(c):h?1/0:2;let v=null;if(l!=null&&l.length)try{l.length===1&&l[0]?v=e.groups[l[0]].channels:v=l.reduce((C,O)=>{if(O){const M=e.groups[O];if(!M)throw new Error(`Audio track group ${O} not found`);Object.keys(M.channels).forEach(ue=>{C[ue]=(C[ue]||0)+M.channels[ue]})}return C},{2:0})}catch(C){return!0}return s!==void 0&&(s.split(",").some(C=>nt(C))||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&&d(p)&&Object.keys(v).some(C=>parseInt(C)>p)}function te(a,e,t,n={}){const r=a.videoCodec;if(!r&&!a.audioCodec||!t)return Promise.resolve(An);const i=[],s=he(a),l=s.length,h=st(a,e,l>0),c=h.length;for(let p=l||1*c||1;p--;){const v={type:"media-source"};if(l&&(v.video=s[p%l]),c){v.audio=h[p%c];const C=v.audio.bitrate;v.video&&C&&(v.video.bitrate-=C)}i.push(v)}if(r){const p=navigator.userAgent;if(r.split(",").some(v=>nt(v))&&ae())return Promise.resolve(Kt(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${p})`),i))}return Promise.all(i.map(p=>{const v=Gt(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 he(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),n=Ft(a),r=a.width||640,i=a.height||480,s=a.frameRate||30,l=a.videoRange.toLowerCase();return t?t.map(h=>{const c={contentType:ee(Xt(h),"video"),width:r,height:i,bitrate:n,framerate:s};return l!=="sdr"&&(c.transferFunction=l),c}):[]}function st(a,e,t){var n;const r=(n=a.audioCodec)==null?void 0:n.split(","),i=Ft(a);return r&&a.audioGroups?a.audioGroups.reduce((s,l)=>{var h;const c=l?(h=e.groups[l])==null?void 0:h.tracks:null;return c?c.reduce((p,v)=>{if(v.groupId===l){const C=parseFloat(v.channels||"");r.forEach(O=>{const M={contentType:ee(O,"audio"),bitrate:t?Rt(O,i):i};C&&(M.channels=""+C),p.push(M)})}return p},s):s},[]):[]}function Rt(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 Ft(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function Gt(a){let e="";const{audio:t,video:n}=a;if(n){const r=hn(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=hn(t.contentType);e+=`${n?"_":""}${r}_c${t.channels}`}return e}const qt=["NONE","TYPE-0","TYPE-1",null];function Wt(a){return qt.indexOf(a)>-1}const Qt=["SDR","PQ","HLG"];function un(a){return!!a&&Qt.indexOf(a)>-1}var gn={No:"",Yes:"YES",v2:"v2"};function Fn(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?gn.v2:gn.Yes:gn.No}class Pn{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 bn{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 On(this._audioGroups,e)}hasSubtitleGroup(e){return On(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 On(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Sn(){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 Qn(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||Qt.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&Sn(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const rt=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}},ht=(a,e)=>JSON.stringify(a,rt(e));function Nt(a,e,t,n,r){const i=Object.keys(a),s=n==null?void 0:n.channels,l=n==null?void 0:n.audioCodec,h=r==null?void 0:r.videoCodec,c=s&&parseInt(s)===2;let p=!1,v=!1,C=1/0,O=1/0,M=1/0,ue=1/0,le=0,Pe=[];const{preferHDR:je,allowedVideoRanges:Ye}=Qn(e,r);for(let Bt=i.length;Bt--;){const Mt=a[i[Bt]];p||(p=Mt.channels[2]>0),C=Math.min(C,Mt.minHeight),O=Math.min(O,Mt.minFramerate),M=Math.min(M,Mt.minBitrate),Ye.filter(en=>Mt.videoRanges[en]>0).length>0&&(v=!0)}C=d(C)?C:0,O=d(O)?O:0;const ut=Math.max(1080,C),yt=Math.max(30,O);M=d(M)?M:t,t=Math.max(M,t),v||(e=void 0);const zt=i.length>1;return{codecSet:i.reduce((Bt,Mt)=>{const Dt=a[Mt];if(Mt===Bt)return Bt;if(Pe=v?Ye.filter(en=>Dt.videoRanges[en]>0):[],zt){if(Dt.minBitrate>t)return At(Mt,`min bitrate of ${Dt.minBitrate} > current estimate of ${t}`),Bt;if(!Dt.hasDefaultAudio)return At(Mt,"no renditions with default or auto-select sound found"),Bt;if(l&&Mt.indexOf(l.substring(0,4))%5!==0)return At(Mt,`audio codec preference "${l}" not found`),Bt;if(s&&!c){if(!Dt.channels[s])return At(Mt,`no renditions with ${s} channel sound found (channels options: ${Object.keys(Dt.channels)})`),Bt}else if((!l||c)&&p&&Dt.channels[2]===0)return At(Mt,"no renditions with stereo sound found"),Bt;if(Dt.minHeight>ut)return At(Mt,`min resolution of ${Dt.minHeight} > maximum of ${ut}`),Bt;if(Dt.minFramerate>yt)return At(Mt,`min framerate of ${Dt.minFramerate} > maximum of ${yt}`),Bt;if(!Pe.some(en=>Dt.videoRanges[en]>0))return At(Mt,`no variants with VIDEO-RANGE of ${ht(Pe)} found`),Bt;if(h&&Mt.indexOf(h.substring(0,4))%5!==0)return At(Mt,`video codec preference "${h}" not found`),Bt;if(Dt.maxScore<le)return At(Mt,`max score of ${Dt.maxScore} < selected max of ${le}`),Bt}return Bt&&(xe(Mt)>=xe(Bt)||Dt.fragmentError>a[Bt].fragmentError)?Bt:(ue=Dt.minIndex,le=Dt.maxScore,Mt)},void 0),videoRanges:Pe,preferHDR:je,minFramerate:O,minBitrate:M,minIndex:ue}}function At(a,e){ce.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function Pt(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 $t(a,e,t,n){return a.slice(t,n+1).reduce((r,i,s)=>{if(!i.codecSet)return r;const l=i.audioGroups;let h=r[i.codecSet];h||(r[i.codecSet]=h={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:s,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!l,fragmentError:0}),h.minBitrate=Math.min(h.minBitrate,i.bitrate);const c=Math.min(i.height,i.width);return h.minHeight=Math.min(h.minHeight,c),h.minFramerate=Math.min(h.minFramerate,i.frameRate),h.minIndex=Math.min(h.minIndex,s),h.maxScore=Math.max(h.maxScore,i.score),h.fragmentError+=i.fragmentError,h.videoRanges[i.videoRange]=(h.videoRanges[i.videoRange]||0)+1,l&&l.forEach(p=>{if(!p)return;const v=e.groups[p];v&&(h.hasDefaultAudio=h.hasDefaultAudio||e.hasDefaultAudio?v.hasDefault:v.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(v.channels).forEach(C=>{h.channels[C]=(h.channels[C]||0)+v.channels[C]}))}),r},{})}function Zt(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 tn(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(dn(a,r,t))return n}return-1}function dn(a,e,t){const{groupId:n,name:r,lang:i,assocLang:s,default:l}=a,h=a.forced;return(n===void 0||e.groupId===n)&&(r===void 0||e.name===r)&&(i===void 0||fn(i,e.lang))&&(i===void 0||e.assocLang===s)&&(l===void 0||e.default===l)&&(h===void 0||e.forced===h)&&(!("characteristics"in a)||wn(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function fn(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function wn(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function cn(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 an(a,e,t,n,r){const i=e[n],l=e.reduce((C,O,M)=>{const ue=O.uri;return(C[ue]||(C[ue]=[])).push(M),C},{})[i.uri];l.length>1&&(n=Math.max.apply(Math,l));const h=i.videoRange,c=i.frameRate,p=i.codecSet.substring(0,4),v=mn(e,n,C=>{if(C.videoRange!==h||C.frameRate!==c||C.codecSet.substring(0,4)!==p)return!1;const O=C.audioGroups,M=t.filter(ue=>!O||O.indexOf(ue.groupId)!==-1);return tn(a,M,r)>-1});return v>-1?v:mn(e,n,C=>{const O=C.audioGroups,M=t.filter(ue=>!O||O.indexOf(ue.groupId)!==-1);return tn(a,M,r)>-1})}function mn(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 Xn(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class Jn extends re{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:h}=s;if(!r||!h)return;const c=performance.now(),p=i?i.stats:r.stats,v=i?i.duration:r.duration,C=c-p.loading.start,O=s.minAutoLevel,M=r.level,ue=this._nextAutoLevel;if(p.aborted||p.loaded&&p.loaded===p.total||M<=O){this.clearTimer(),this._nextAutoLevel=-1;return}if(!l)return;const le=ue>-1&&ue!==M,Pe=!!t||le;if(!Pe&&(h.paused||!h.playbackRate||!h.readyState))return;const je=s.mainForwardBufferInfo;if(!Pe&&je===null)return;const Ye=this.bwEstimator.getEstimateTTFB(),ut=Math.abs(h.playbackRate);if(C<=Math.max(Ye,1e3*(v/(ut*2))))return;const yt=je?je.len/ut:0,zt=p.loading.first?p.loading.first-p.loading.start:-1,Et=p.loaded&&zt>-1,Bt=this.getBwEstimate(),Mt=s.levels,Dt=Mt[M],en=Math.max(p.loaded,Math.round(v*(r.bitrate||Dt.averageBitrate)/8));let En=Et?C-zt:C;En<1&&Et&&(En=Math.min(C,p.loaded*8/Bt));const Bn=Et?p.loaded*1e3/En:0,Yn=Ye/1e3,Nn=Bn?(en-p.loaded)/Bn:en*8/Bt+Yn;if(Nn<=yt)return;const pn=Bn?Bn*8:Bt,Un=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,Rn=this.hls.config.abrBandWidthUpFactor;let Wn=Number.POSITIVE_INFINITY,ar;for(ar=M-1;ar>O;ar--){const Mr=Mt[ar].maxBitrate,_r=!Mt[ar].details||Un;if(Wn=this.getTimeToLoadFrag(Yn,pn,v*Mr,_r),Wn<Math.min(yt,v+Yn))break}if(Wn>=Nn||Wn>v*10)return;Et?this.bwEstimator.sample(C-Math.min(Ye,zt),p.loaded):this.bwEstimator.sampleTTFB(C);const _n=Mt[ar].maxBitrate;this.getBwEstimate()*Rn>_n&&this.resetEstimator(_n);const yn=this.findBestLevel(_n,O,ar,0,yt,1,1);yn>-1&&(ar=yn),this.warn(`Fragment ${r.sn}${i?" part "+i.index:""} of level ${M} is loading too slowly;
|
|
Fragment duration: ${r.duration.toFixed(3)}
|
|
Time to underbuffer: ${yt.toFixed(3)} s
|
|
Estimated load time for current fragment: ${Nn.toFixed(3)} s
|
|
Estimated load time for down switch fragment: ${Wn.toFixed(3)} s
|
|
TTFB estimate: ${zt|0} ms
|
|
Current BW estimate: ${d(Bt)?Bt|0:"Unknown"} bps
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
Switching to level ${ar} @ ${_n|0} bps`),s.nextLoadLevel=s.nextAutoLevel=ar,this.clearTimer();const vr=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===ar&&ar>0){const Mr=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${ar>0?"and switching down":""}
|
|
Fragment duration: ${r.duration.toFixed(3)} s
|
|
Time to underbuffer: ${Mr.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,ar>O){let _r=this.findBestLevel(this.hls.levels[O].bitrate,O,ar,0,Mr,1,1);_r===-1&&(_r=O),this.hls.nextLoadLevel=this.hls.nextAutoLevel=_r,this.resetEstimator(this.hls.levels[_r].bitrate)}}};le||Nn>Wn*2?vr():this.timer=self.setInterval(vr,Wn*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 X(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 W.BUFFER_ADD_CODEC_ERROR:case W.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case W.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,h=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(h-Math.min(v,c),l.loaded)}else this.bwEstimator.sampleTTFB(h)}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;d(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===J.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,h=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:l,duration:h},s.realBitrate=Math.round(8*l/h)}if(t.bitrateTest){const i={stats: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!==J.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,h=this.getBwEstimate(),c=this.getStarvationDelay();let p=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(c){const le=this.findBestLevel(h,s,r,c,0,p,v);if(le>=0)return this.rebufferNotice=-1,le}let C=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const le=this.bitrateTestDelay;le&&(C=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-le,this.info(`bitrate test took ${Math.round(1e3*le)}ms, set first fragment max fetchDuration to ${Math.round(1e3*C)} ms`),p=v=1)}const O=this.findBestLevel(h,s,r,c,C,p,v);if(this.rebufferNotice!==O&&(this.rebufferNotice=O,this.info(`${c?"rebuffering expected":"buffer is empty"}, optimal quality level ${O}`)),O>-1)return O;const M=n.levels[s],ue=n.loadLevelObj;return ue&&(M==null?void 0:M.bitrate)<ue.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 h;const c=r+i,p=this.lastLoadedFragLevel,v=p===-1?this.hls.firstLevel:p,{fragCurrent:C,partCurrent:O}=this,{levels:M,allAudioTracks:ue,loadLevel:le,config:Pe}=this.hls;if(M.length===1)return 0;const je=M[v],Ye=!!((h=this.hls.latestLevelDetails)!=null&&h.live),ut=le===-1||p===-1;let yt,zt="SDR",Et=(je==null?void 0:je.frameRate)||0;const{audioPreference:Bt,videoPreference:Mt}=Pe,Dt=this.audioTracksByGroup||(this.audioTracksByGroup=Pt(ue));let en=-1;if(ut){if(this.firstSelection!==-1)return this.firstSelection;const pn=this.codecTiers||(this.codecTiers=$t(M,Dt,t,n)),Un=Nt(pn,zt,e,Bt,Mt),{codecSet:Rn,videoRanges:Wn,minFramerate:ar,minBitrate:_n,minIndex:yn,preferHDR:vr}=Un;en=yn,yt=Rn,zt=vr?Wn[Wn.length-1]:Wn[0],Et=ar,e=Math.max(e,_n),this.log(`picked start tier ${ht(Un)}`)}else yt=je==null?void 0:je.codecSet,zt=je==null?void 0:je.videoRange;const En=O?O.duration:C?C.duration:0,Bn=this.bwEstimator.getEstimateTTFB()/1e3,Yn=[];for(let pn=n;pn>=t;pn--){var Nn;const Un=M[pn],Rn=pn>v;if(!Un)continue;if(Pe.useMediaCapabilities&&!Un.supportedResult&&!Un.supportedPromise){const _r=navigator.mediaCapabilities;typeof(_r==null?void 0:_r.decodingInfo)=="function"&&kt(Un,Dt,zt,Et,e,Bt)?(Un.supportedPromise=te(Un,Dt,_r,this.supportedCache),Un.supportedPromise.then(Sr=>{if(!this.hls)return;Un.supportedResult=Sr;const Bi=this.hls.levels,Pi=Bi.indexOf(Un);Sr.error?this.warn(`MediaCapabilities decodingInfo error: "${Sr.error}" for level ${Pi} ${ht(Sr)}`):Sr.supported?Sr.decodingInfoResults.some(es=>es.smooth===!1||es.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${Pi} not smooth or powerEfficient: ${ht(Sr)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${Pi} ${ht(Sr)}`),Pi>-1&&Bi.length>1&&(this.log(`Removing unsupported level ${Pi}`),this.hls.removeLevel(Pi),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(Sr=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${Sr}`)})):Un.supportedResult=An}if((yt&&Un.codecSet!==yt||zt&&Un.videoRange!==zt||Rn&&Et>Un.frameRate||!Rn&&Et>0&&Et<Un.frameRate||(Nn=Un.supportedResult)!=null&&(Nn=Nn.decodingInfoResults)!=null&&Nn.some(_r=>_r.smooth===!1))&&(!ut||pn!==en)){Yn.push(pn);continue}const Wn=Un.details,ar=(O?Wn==null?void 0:Wn.partTarget:Wn==null?void 0:Wn.averagetargetduration)||En;let _n;Rn?_n=l*e:_n=s*e;const yn=En&&r>=En*2&&i===0?Un.averageBitrate:Un.maxBitrate,vr=this.getTimeToLoadFrag(Bn,_n,yn*ar,Wn===void 0);if(_n>=yn&&(pn===p||Un.loadError===0&&Un.fragmentError===0)&&(vr<=Bn||!d(vr)||Ye&&!this.bitrateTestDelay||vr<c)){const _r=this.forcedAutoLevel;return pn!==le&&(_r===-1||_r!==le)&&(Yn.length&&this.trace(`Skipped level(s) ${Yn.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${M[Yn[0]].codecs}" ${M[Yn[0]].videoRange}; not compatible with "${yt}" ${zt}`),this.info(`switch candidate:${v}->${pn} adjustedbw(${Math.round(_n)})-bitrate=${Math.round(_n-yn)} ttfb:${Bn.toFixed(1)} avgDuration:${ar.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${vr.toFixed(1)} firstSelection:${ut} codecSet:${Un.codecSet} videoRange:${Un.videoRange} hls.loadLevel:${le}`)),ut&&(this.firstSelection=pn),pn}}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 on={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 kn(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!d(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(or(e,t,s))return s}return null}function rr(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)&&zn(t,n,i)===0||Hn(i,a,Math.min(r,n))))return i;const s=on.search(e,zn.bind(null,t,n));return s&&(s!==a||!i)?s:i}function Hn(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 zn(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 or(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function In(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 on.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 Kn(a){switch(a.details){case W.FRAG_LOAD_TIMEOUT:case W.KEY_LOAD_TIMEOUT:case W.LEVEL_LOAD_TIMEOUT:case W.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function lr(a){return a.details.startsWith("key")}function Tt(a){return lr(a)&&!!a.frag&&!a.frag.decryptdata}function Tn(a,e){const t=Kn(e);return a.default[`${t?"timeout":"error"}Retry`]}function er(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function mr(a){return A(A({},a),{errorRetry:null,timeoutRetry:null})}function Cr(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(Er(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function Er(a){return xr(a)||!!a&&(a<400||a>499)}function xr(a){return a===0&&navigator.onLine===!1}var Mn={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Ln={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class yr extends re{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)===J.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 W.FRAG_LOAD_ERROR:case W.FRAG_LOAD_TIMEOUT:case W.KEY_LOAD_ERROR:case W.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case W.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=cr();return}case W.FRAG_GAP:case W.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=Mn.SendAlternateToPenaltyBox;return}case W.LEVEL_EMPTY_ERROR:case W.LEVEL_PARSING_ERROR:{var s;const h=t.parent===J.MAIN?t.level:r.loadLevel;t.details===W.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(s=s.levelDetails)!=null&&s.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,h):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,h))}return;case W.LEVEL_LOAD_ERROR:case W.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case W.AUDIO_TRACK_LOAD_ERROR:case W.AUDIO_TRACK_LOAD_TIMEOUT:case W.SUBTITLE_LOAD_ERROR:case W.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const h=r.loadLevelObj;if(h&&(i.type===ne.AUDIO_TRACK&&h.hasAudioGroup(i.groupId)||i.type===ne.SUBTITLE_TRACK&&h.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=Mn.SendAlternateToPenaltyBox,t.errorAction.flags=Ln.MoveAllAlternatesMatchingHost;return}}return;case W.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:Mn.SendAlternateToPenaltyBox,flags:Ln.MoveAllAlternatesMatchingHDCP};return;case W.KEY_SYSTEM_SESSION_UPDATE_FAILED:case W.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case W.KEY_SYSTEM_NO_SESSION:t.errorAction={action:Mn.SendAlternateToPenaltyBox,flags:Ln.MoveAllAlternatesMatchingKey};return;case W.BUFFER_ADD_CODEC_ERROR:case W.REMUX_ALLOC_ERROR:case W.BUFFER_APPEND_ERROR:if(!t.errorAction){var l;t.errorAction=this.getLevelSwitchAction(t,(l=t.level)!=null?l:r.loadLevel)}return;case W.INTERNAL_EXCEPTION:case W.BUFFER_APPENDING_ERROR:case W.BUFFER_FULL_ERROR:case W.LEVEL_SWITCH_ERROR:case W.BUFFER_STALLED_ERROR:case W.BUFFER_SEEK_OVER_HOLE:case W.BUFFER_NUDGE_ON_STALL:t.errorAction=cr();return}t.type===ye.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=cr())}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=Tn(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(Cr(r,i,Kn(e),e.response))return{action:Mn.RetryRequest,flags:Ln.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=Tn(lr(e)?s:i,e),h=t.levels.reduce((p,v)=>p+v.fragmentError,0);if(r&&(e.details!==W.FRAG_GAP&&r.fragmentError++,!Tt(e)&&Cr(l,h,Kn(e),e.response)))return{action:Mn.RetryRequest,flags:Ln.None,retryConfig:l,retryCount:h};const c=this.getLevelSwitchAction(e,n);return l&&(c.retryConfig=l,c.retryCount=h),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===W.BUFFER_APPEND_ERROR&&r.fragmentError++;let p=-1;const{levels:v,loadLevel:C,minAutoLevel:O,maxAutoLevel:M}=n;!n.autoLevelEnabled&&!n.config.preserveManualLevelOnError&&(n.loadLevel=-1);const ue=(i=e.frag)==null?void 0:i.type,Pe=(ue===J.AUDIO&&c===W.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===W.BUFFER_ADD_CODEC_ERROR||c===W.BUFFER_APPEND_ERROR))&&v.some(({audioCodec:zt})=>r.audioCodec!==zt),Ye=e.sourceBufferName==="video"&&(c===W.BUFFER_ADD_CODEC_ERROR||c===W.BUFFER_APPEND_ERROR)&&v.some(({codecSet:zt,audioCodec:Et})=>r.codecSet!==zt&&r.audioCodec===Et),{type:ut,groupId:yt}=(s=e.context)!=null?s:{};for(let zt=v.length;zt--;){const Et=(zt+C)%v.length;if(Et!==C&&Et>=O&&Et<=M&&v[Et].loadError===0){var l,h;const Bt=v[Et];if(c===W.FRAG_GAP&&ue===J.MAIN&&e.frag){const Mt=v[Et].details;if(Mt){const Dt=rr(e.frag,Mt.fragments,e.frag.start);if(Dt!=null&&Dt.gap)continue}}else{if(ut===ne.AUDIO_TRACK&&Bt.hasAudioGroup(yt)||ut===ne.SUBTITLE_TRACK&&Bt.hasSubtitleGroup(yt))continue;if(ue===J.AUDIO&&(l=r.audioGroups)!=null&&l.some(Mt=>Bt.hasAudioGroup(Mt))||ue===J.SUBTITLE&&(h=r.subtitleGroups)!=null&&h.some(Mt=>Bt.hasSubtitleGroup(Mt))||Pe&&r.audioCodec===Bt.audioCodec||Ye&&r.codecSet===Bt.codecSet||!Pe&&r.codecSet!==Bt.codecSet)continue}p=Et;break}}if(p>-1&&n.loadLevel!==p)return e.levelRetry=!0,this.playlistError=0,{action:Mn.SendAlternateToPenaltyBox,flags:Ln.None,nextAutoLevel:p}}return{action:Mn.SendAlternateToPenaltyBox,flags:Ln.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case Mn.DoNothing:break;case Mn.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==W.FRAG_GAP?t.fatal=!0:/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break;case Mn.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 Ln.None:this.switchLevel(e,i);break;case Ln.MoveAllAlternatesMatchingHDCP:{const h=this.getVariantLevelIndex(e.frag),c=t.levels[h],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=qt[qt.indexOf(p)-1],n.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case Ln.MoveAllAlternatesMatchingKey:{const h=e.decryptdata;if(h){const c=this.hls.levels,p=c.length;for(let C=p;C--;)if(this.variantHasKey(c[C],h)){var s,l;this.log(`Banned key found in level ${C} (${c[C].bitrate}bps) or audio group "${(s=c[C].audioGroups)==null?void 0:s.join(",")}" (${(l=e.frag)==null?void 0:l.type} fragment) ${K(h.keyId||[])}`),c[C].fragmentError++,c[C].loadError++,this.log(`Removing level ${C} with key error (${e.error})`),this.hls.removeLevel(C)}const v=e.frag;if(this.hls.levels.length<p)n.resolved=!0;else if(v&&v.type!==J.MAIN){const C=v.decryptdata;C&&!h.matches(C)&&(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===W.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=hn(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 cr(a){const e={action:Mn.DoNothing,flags:Ln.None};return a&&(e.resolved=!0),e}var dr={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class xi{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 h=l.body;if(h.start<=e&&e<=h.end)return h}}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 h=this.fragments[l];if(!h||s>=h.body.sn)return;if(!h.buffered&&(!h.loaded||i)){h.body.type===n&&this.removeFragment(h.body);return}const c=h.range[e];if(c){if(c.time.length===0){this.removeFragment(h.body);return}c.time.some(p=>{const v=!this.isTimeBuffered(p.startPTS,p.endPTS,t);return v&&this.removeFragment(h.body),v})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=Ar(n),i=this.fragments[r];if(!i||i.buffered&&n.gap)return;const s=!n.relurl;Object.keys(t).forEach(l=>{const h=n.elementaryStreams[l];if(!h)return;const c=t[l],p=s||h.partial===!0;i.range[l]=this.getBufferedTimes(n,e.part,p,c)}),i.loaded=null,Object.keys(i.range).length?(this.bufferedEnd(i,n),ei(i)||this.removeParts(n.sn-1,n.type)):this.removeFragment(i.body)}bufferedEnd(e,t){e.buffered=!0,(e.body.endList=t.endList||e.body.endList)&&(this.endListFragments[e.body.type]=e)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=xn(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=Ar(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,this.bufferedEnd(r,e))}getBufferedTimes(e,t,n,r){const i={time:[],partial:n},s=e.start,l=e.end,h=e.minEndPTS||l,c=e.maxStartPTS||s;for(let p=0;p<r.length;p++){const v=r.start(p)-this.bufferPadding,C=r.end(p)+this.bufferPadding;if(c>=v&&h<=C){i.time.push({startPTS:Math.max(s,r.start(p)),endPTS:Math.min(l,r.end(p))});break}else if(s<C&&l>v){const O=Math.max(s,r.start(p)),M=Math.min(l,r.end(p));M>O&&(i.partial=!0,i.time.push({startPTS:O,endPTS:M}))}else if(l<=v)break}return i}getPartialFragment(e){let t=null,n,r,i,s=0;const{bufferPadding:l,fragments:h}=this;return Object.keys(h).forEach(c=>{const p=h[c];p&&ei(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||ei(t))}getState(e){const t=Ar(e),n=this.fragments[t];return n?n.buffered?ei(n)?dr.PARTIAL:dr.OK:dr.APPENDING:dr.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=Ar(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 h=i[s];this.detectEvictedFragments(s,h,l,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Ar(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 h=l.body;h.type!==n||r&&!h.gap||h.start<t&&h.end>e&&(l.buffered||i)&&this.removeFragment(h)})}removeFragment(e){const t=Ar(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=xn(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 ei(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 Ar(a){return`${a.type}_${a.level}_${a.sn}`}function xn(a,e){return a.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var fr={cbc:0,ctr:1};class pr{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 fr.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case fr.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 Xr(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class ai{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),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],h=this.invSubMix,c=h[0],p=h[1],v=h[2],C=h[3],O=new Uint32Array(256);let M=0,ue=0,le=0;for(le=0;le<256;le++)le<128?O[le]=le<<1:O[le]=le<<1^283;for(le=0;le<256;le++){let Pe=ue^ue<<1^ue<<2^ue<<3^ue<<4;Pe=Pe>>>8^Pe&255^99,e[M]=Pe,t[Pe]=M;const je=O[M],Ye=O[je],ut=O[Ye];let yt=O[Pe]*257^Pe*16843008;r[M]=yt<<24|yt>>>8,i[M]=yt<<16|yt>>>16,s[M]=yt<<8|yt>>>24,l[M]=yt,yt=ut*16843009^Ye*65537^je*257^M*16843008,c[Pe]=yt<<24|yt>>>8,p[Pe]=yt<<16|yt>>>16,v[Pe]=yt<<8|yt>>>24,C[Pe]=yt,M?(M=je^O[O[O[ut^je]]],ue^=O[O[ue]]):M=ue=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,h;const c=this.keySchedule=new Uint32Array(s),p=this.invKeySchedule=new Uint32Array(s),v=this.sBox,C=this.rcon,O=this.invSubMix,M=O[0],ue=O[1],le=O[2],Pe=O[3];let je,Ye;for(l=0;l<s;l++){if(l<i){je=c[l]=t[l];continue}Ye=je,l%i===0?(Ye=Ye<<8|Ye>>>24,Ye=v[Ye>>>24]<<24|v[Ye>>>16&255]<<16|v[Ye>>>8&255]<<8|v[Ye&255],Ye^=C[l/i|0]<<24):i>6&&l%i===4&&(Ye=v[Ye>>>24]<<24|v[Ye>>>16&255]<<16|v[Ye>>>8&255]<<8|v[Ye&255]),c[l]=je=(c[l-i]^Ye)>>>0}for(h=0;h<s;h++)l=s-h,h&3?Ye=c[l]:Ye=c[l-4],h<4||l<=4?p[h]=Ye:p[h]=M[v[Ye>>>24]]^ue[v[Ye>>>16&255]]^le[v[Ye>>>8&255]]^Pe[v[Ye&255]],p[h]=p[h]>>>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,h=l[0],c=l[1],p=l[2],v=l[3],C=this.uint8ArrayToUint32Array_(n);let O=C[0],M=C[1],ue=C[2],le=C[3];const Pe=new Int32Array(e),je=new Int32Array(Pe.length);let Ye,ut,yt,zt,Et,Bt,Mt,Dt,en,En,Bn,Yn,Nn,pn;const Un=this.networkToHostOrderSwap;for(;t<Pe.length;){for(en=Un(Pe[t]),En=Un(Pe[t+1]),Bn=Un(Pe[t+2]),Yn=Un(Pe[t+3]),Et=en^i[0],Bt=Yn^i[1],Mt=Bn^i[2],Dt=En^i[3],Nn=4,pn=1;pn<r;pn++)Ye=h[Et>>>24]^c[Bt>>16&255]^p[Mt>>8&255]^v[Dt&255]^i[Nn],ut=h[Bt>>>24]^c[Mt>>16&255]^p[Dt>>8&255]^v[Et&255]^i[Nn+1],yt=h[Mt>>>24]^c[Dt>>16&255]^p[Et>>8&255]^v[Bt&255]^i[Nn+2],zt=h[Dt>>>24]^c[Et>>16&255]^p[Bt>>8&255]^v[Mt&255]^i[Nn+3],Et=Ye,Bt=ut,Mt=yt,Dt=zt,Nn=Nn+4;Ye=s[Et>>>24]<<24^s[Bt>>16&255]<<16^s[Mt>>8&255]<<8^s[Dt&255]^i[Nn],ut=s[Bt>>>24]<<24^s[Mt>>16&255]<<16^s[Dt>>8&255]<<8^s[Et&255]^i[Nn+1],yt=s[Mt>>>24]<<24^s[Dt>>16&255]<<16^s[Et>>8&255]<<8^s[Bt&255]^i[Nn+2],zt=s[Dt>>>24]<<24^s[Et>>16&255]<<16^s[Bt>>8&255]<<8^s[Mt&255]^i[Nn+3],je[t]=Un(Ye^O),je[t+1]=Un(zt^M),je[t+2]=Un(yt^ue),je[t+3]=Un(ut^le),O=en,M=En,ue=Bn,le=Yn,t=t+4}return je.buffer}}class kr{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=Ur(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function Ur(a){switch(a){case fr.cbc:return"AES-CBC";case fr.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const Rr=16;class hr{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?Xr(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 h=this.flush();h?i(h.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!==fr.cbc||t.byteLength!==16)return ce.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),l&&(e=St(l,e),this.remainderData=null);const h=this.getValidChunk(e);if(!h.length)return null;i&&(n=i);let c=this.softwareDecrypter;c||(c=this.softwareDecrypter=new ai),c.expandKey(t);const p=s;return this.currentResult=c.decrypt(h.buffer,0,n),this.currentIV=h.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 kr(this.subtle,t,r)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new pr(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(ce.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%Rr;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(ce.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const hi=Math.pow(2,17);class Gr{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 nr({type:ye.NETWORK_ERROR,details:W.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,h)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(M=>M[0]==="GAP")){h(oi(e));return}else e.gap=!1;const c=this.loader=i?new i(r):new s(r),p=ri(e);e.loader=c;const v=mr(r.fragLoadPolicy.default),C={loadPolicy:v,timeout:v.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:hi};e.stats=c.stats;const O={onSuccess:(M,ue,le,Pe)=>{this.resetLoader(e,c);let je=M.data;le.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(je.slice(0,16)),je=je.slice(16)),l({frag:e,part:null,payload:je,networkDetails:Pe})},onError:(M,ue,le,Pe)=>{this.resetLoader(e,c),h(new nr({type:ye.NETWORK_ERROR,details:W.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:A({url:n,data:void 0},M),error:new Error(`HTTP Error ${M.code} ${M.text}`),networkDetails:le,stats:Pe}))},onAbort:(M,ue,le)=>{this.resetLoader(e,c),h(new nr({type:ye.NETWORK_ERROR,details:W.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:le,stats:M}))},onTimeout:(M,ue,le)=>{this.resetLoader(e,c),h(new nr({type:ye.NETWORK_ERROR,details:W.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${C.timeout}ms`),networkDetails:le,stats:M}))}};t&&(O.onProgress=(M,ue,le,Pe)=>t({frag:e,part:null,payload:le,networkDetails:Pe})),c.load(p,C,O)})}loadPart(e,t,n){this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((l,h)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){h(oi(e,t));return}const c=this.loader=i?new i(r):new s(r),p=ri(e,t);e.loader=c;const v=mr(r.fragLoadPolicy.default),C={loadPolicy:v,timeout:v.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:hi};t.stats=c.stats,c.load(p,C,{onSuccess:(O,M,ue,le)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const Pe={frag:e,part:t,payload:O.data,networkDetails:le};n(Pe),l(Pe)},onError:(O,M,ue,le)=>{this.resetLoader(e,c),h(new nr({type:ye.NETWORK_ERROR,details:W.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:A({url:p.url,data:void 0},O),error:new Error(`HTTP Error ${O.code} ${O.text}`),networkDetails:ue,stats:le}))},onAbort:(O,M,ue)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),h(new nr({type:ye.NETWORK_ERROR,details:W.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:ue,stats:O}))},onTimeout:(O,M,ue)=>{this.resetLoader(e,c),h(new nr({type:ye.NETWORK_ERROR,details:W.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${C.timeout}ms`),networkDetails:ue,stats:O}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){const h=Math.round(e.duration/t.duration),c=Math.min(Math.round(n.loaded/i),h),v=(h-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 ri(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(d(r)&&d(i)){var s;let l=r,h=i;if(a.sn==="initSegment"&&ti((s=a.decryptdata)==null?void 0:s.method)){const c=i-r;c%16&&(h=i+(16-c%16)),r!==0&&(n.resetIV=!0,l=r-16)}n.rangeStart=l,n.rangeEnd=h}return n}function oi(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:ye.MEDIA_ERROR,details:W.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new nr(n)}function ti(a){return a==="AES-128"||a==="AES-256"}class nr extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class fi extends re{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 mi{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=vi(),this.buffering={audio:vi(),video:vi(),audiovideo:vi()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function vi(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Wr={length:0,start:()=>0,end:()=>0};class Vn{static isBuffered(e,t){if(e){const n=Vn.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=Vn.getBuffered(e);return Vn.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=Vn.bufferedRanges(e);if(r.length)return Vn.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 C=i[v-1].end;e[p].start-C<n?e[p].end>C&&(i[v-1].end=e[p].end):i.push(e[p])}else i.push(e[p])}else i=e;let s=0,l,h=t,c=t;for(let p=0;p<i.length;p++){const v=i[p].start,C=i[p].end;if(r===-1&&t>=v&&t<=C&&(r=p),t+n>=v&&t<C)h=v,c=C,s=c-t;else if(t+n<v){l=v;break}}return{len:s,start:h||0,end:c||0,nextStart:l,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||Wr}catch(t){return ce.log("failed to get media.buffered",t),Wr}}}const Oi=/\{\$([a-zA-Z0-9-_]+)\}/g;function rn(a){return Oi.test(a)}function Vr(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(Oi,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 Ii(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 pi(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 Br=/^(\d+)x(\d+)$/,li=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Gn{constructor(e,t){typeof e=="string"&&(e=Gn.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=Br.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(li.lastIndex=0;(n=li.exec(e))!==null;){const s=n[1].trim();let l=n[2];const h=l.indexOf(i)===0&&l.lastIndexOf(i)===l.length-1;let c=!1;if(h)l=l.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(h||c))l=Vr(t,l);else if(!c&&!h)switch(s){case"CLOSED-CAPTIONS":if(l==="NONE")break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":ce.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=l}return r}}const Qr="com.apple.hls.interstitial";function gi(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function ni(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class Dr{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]){ce.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=S(new Gn({}),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"]);d(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?(ce.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(d(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===Qr}get isValid(){return!!this.id&&!this._badValueForSameId&&d(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 Pr=10;class Zr{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?d(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Pr}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 ii(a,e){return a.length===e.length?!a.some((t,n)=>t!==e[n]):!1}function wi(a,e){return!a&&!e?!0:!a||!e?!1:ii(a,e)}function ui(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function zi(a){switch(a){case"AES-128":case"AES-256":return fr.cbc;case"AES-256-CTR":return fr.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function Gi(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function Mi(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function _i(a){const e=Mi(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Cn(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 Zn(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=Gi(s)):t=_i(s)}}return t}const br=typeof self!="undefined"?self:void 0;var qn={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},sr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Ei(a){switch(a){case sr.FAIRPLAY:return qn.FAIRPLAY;case sr.PLAYREADY:return qn.PLAYREADY;case sr.WIDEVINE:return qn.WIDEVINE;case sr.CLEARKEY:return qn.CLEARKEY}}function Jr(a){switch(a){case qn.FAIRPLAY:return sr.FAIRPLAY;case qn.PLAYREADY:return sr.PLAYREADY;case qn.WIDEVINE:return sr.WIDEVINE;case qn.CLEARKEY:return sr.CLEARKEY}}function Ri(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[qn.FAIRPLAY,qn.WIDEVINE,qn.PLAYREADY,qn.CLEARKEY].filter(r=>!!e[r]):[];return!n[qn.WIDEVINE]&&t&&n.push(qn.WIDEVINE),n}const gr=function(a){return br!=null&&(a=br.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function tr(a,e,t,n){let r;switch(a){case qn.FAIRPLAY:r=["cenc","sinf"];break;case qn.WIDEVINE:case qn.PLAYREADY:r=["cenc"];break;case qn.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return Lr(r,e,t,n)}function Lr(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 Nr(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function qr(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 h=Gi(l).subarray(0,16);return Cn(h),h}}return null}let zr={};class si{static clearKeyUriToKeyIdMap(){zr={}}static setKeyIdForUri(e,t){zr[e]=t}static addKeyIdForUri(e){const t=Object.keys(zr).length%Number.MAX_SAFE_INTEGER,n=new Uint8Array(16);return new DataView(n.buffer,12,4).setUint32(0,t),zr[e]=n,n}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&&!ui(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&&ii(e.keyFormatVersions,this.keyFormatVersions)&&wi(e.iv,this.iv)&&wi(e.keyId,this.keyId)}isSupported(){if(this.method){if(ui(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case sr.FAIRPLAY:case sr.WIDEVINE:case sr.PLAYREADY:case sr.CLEARKEY:return["SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e,t){if(!this.encrypted||!this.uri)return null;if(ui(this.method)){let i=this.iv;return i||(typeof e!="number"&&(ce.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0),i=bi(e)),new si(this.method,this.uri,"identity",this.keyFormatVersions,i)}if(this.keyId){const i=zr[this.uri];if(i&&!ii(this.keyId,i)&&si.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}const n=Zn(this.uri);if(n)switch(this.keyFormat){case sr.WIDEVINE:if(this.pssh=n,!this.keyId){const i=$e(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=ji(t));break;case sr.PLAYREADY:{const i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=T(i,null,n),this.keyId=qr(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=yi(t),i||(i=ji(t),i||(i=zr[this.uri])),i&&(this.keyId=i,si.setKeyIdForUri(this.uri,i))}return this}}function yi(a){const e=a==null?void 0:a[sr.WIDEVINE];return e?e.keyId:null}function ji(a){const e=a==null?void 0:a[sr.PLAYREADY];if(e){const t=Zn(e.uri);if(t)return qr(t)}return null}function bi(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const _s=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,cs=/#EXT-X-MEDIA:(.*)/g,js=/^#EXT(?:INF|-X-TARGETDURATION):/m,ns=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),Ts=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class Fi{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 b.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return js.test(e)}static parseMasterPlaylist(e,t){const n=rn(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];if(_s.lastIndex=0,!e.startsWith("#EXTM3U"))return r.playlistParsingError=new Error("no EXTM3U delimiter"),r;let s;for(;(s=_s.exec(e))!=null;)if(s[1]){var l;const c=new Gn(s[1],r),p=Vr(r,s[2]),v={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:Fi.resolve(p,t)},C=c.decimalResolution("RESOLUTION");C&&(v.width=C.width,v.height=C.height),Cs(c.CODECS,v);const O=c["SUPPLEMENTAL-CODECS"];O&&(v.supplemental={},Cs(O,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 Gn(p,r),C=v["DATA-ID"];C&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[C]=v);break}case"SESSION-KEY":{const v=Hs(p,t,r);v.encrypted&&v.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(v)):ce.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${p}"`);break}case"DEFINE":{{const v=new Gn(p,r);Ii(r,v,t)}break}case"CONTENT-STEERING":{const v=new Gn(p,r);r.contentSteering={uri:Fi.resolve(v["SERVER-URI"],t),pathwayId:v["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=oa(p);break}}}const h=i.length>0&&i.length<r.levels.length;return r.levels=h?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 h=0;for(cs.lastIndex=0;(r=cs.exec(e))!==null;){const c=new Gn(r[1],n),p=c.TYPE;if(p){const v=l[p],C=i[p]||[];i[p]=C;const O=c.LANGUAGE,M=c["ASSOC-LANGUAGE"],ue=c.CHANNELS,le=c.CHARACTERISTICS,Pe=c["INSTREAM-ID"],je={attrs:c,bitrate:0,id:h++,groupId:c["GROUP-ID"]||"",name:c.NAME||O||"",type:p,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:O,url:c.URI?Fi.resolve(c.URI,t):""};if(M&&(je.assocLang=M),ue&&(je.channels=ue),le&&(je.characteristics=le),Pe&&(je.instreamId=Pe),v!=null&&v.length){const Ye=Fi.findGroup(v,je.groupId)||v[0];rs(je,Ye,"audioCodec"),rs(je,Ye,"textCodec")}C.push(je)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var l;const h={url:t},c=new Zr(t),p=c.fragments,v=[];let C=null,O=0,M=0,ue=0,le=0,Pe=0,je=null,Ye=new Ze(r,h),ut,yt,zt,Et=-1,Bt=!1,Mt=null,Dt;if(ns.lastIndex=0,c.m3u8=e,c.hasVariableRefs=rn(e),((l=ns.exec(e))==null?void 0:l[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;(ut=ns.exec(e))!==null;){Bt&&(Bt=!1,Ye=new Ze(r,h),Ye.playlistOffset=ue,Ye.setStart(ue),Ye.sn=O,Ye.cc=le,Pe&&(Ye.bitrate=Pe),Ye.level=n,C&&(Ye.initSegment=C,C.rawProgramDateTime&&(Ye.rawProgramDateTime=C.rawProgramDateTime,C.rawProgramDateTime=null),Mt&&(Ye.setByteRange(Mt),Mt=null)));const Yn=ut[1];if(Yn){Ye.duration=parseFloat(Yn);const Nn=(" "+ut[2]).slice(1);Ye.title=Nn||null,Ye.tagList.push(Nn?["INF",Yn,Nn]:["INF",Yn])}else if(ut[3]){if(d(Ye.duration)){Ye.playlistOffset=ue,Ye.setStart(ue),zt&&la(Ye,zt,c),Ye.sn=O,Ye.level=n,Ye.cc=le,p.push(Ye);const Nn=(" "+ut[3]).slice(1);Ye.relurl=Vr(c,Nn),Hi(Ye,je,v),je=Ye,ue+=Ye.duration,O++,M=0,Bt=!0}}else{if(ut=ut[0].match(Ts),!ut){ce.warn("No matches on slow regex match for level playlist!");continue}for(yt=1;yt<ut.length&&ut[yt]===void 0;yt++);const Nn=(" "+ut[yt]).slice(1),pn=(" "+ut[yt+1]).slice(1),Un=ut[yt+2]?(" "+ut[yt+2]).slice(1):null;switch(Nn){case"BYTERANGE":je?Ye.setByteRange(pn,je):Ye.setByteRange(pn);break;case"PROGRAM-DATE-TIME":Ye.rawProgramDateTime=pn,Ye.tagList.push(["PROGRAM-DATE-TIME",pn]),Et===-1&&(Et=p.length);break;case"PLAYLIST-TYPE":c.type&&Li(c,Nn,ut),c.type=pn.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?Li(c,Nn,ut):p.length>0&&ds(c,Nn,ut),O=c.startSN=parseInt(pn);break;case"SKIP":{c.skippedSegments&&Li(c,Nn,ut);const Rn=new Gn(pn,c),Wn=Rn.decimalInteger("SKIPPED-SEGMENTS");if(d(Wn)){c.skippedSegments+=Wn;for(let _n=Wn;_n--;)p.push(null);O+=Wn}const ar=Rn.enumeratedString("RECENTLY-REMOVED-DATERANGES");ar&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(ar.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&Li(c,Nn,ut),c.targetduration=Math.max(parseInt(pn),1);break;case"VERSION":c.version!==null&&Li(c,Nn,ut),c.version=parseInt(pn);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||Li(c,Nn,ut),c.live=!1;break;case"#":(pn||Un)&&Ye.tagList.push(Un?[pn,Un]:[pn]);break;case"DISCONTINUITY":le++,Ye.tagList.push(["DIS"]);break;case"GAP":Ye.gap=!0,Ye.tagList.push([Nn]);break;case"BITRATE":Ye.tagList.push([Nn,pn]),Pe=parseInt(pn)*1e3,d(Pe)?Ye.bitrate=Pe:Pe=0;break;case"DATERANGE":{const Rn=new Gn(pn,c),Wn=new Dr(Rn,c.dateRanges[Rn.ID],c.dateRangeTagCount);c.dateRangeTagCount++,Wn.isValid||c.skippedSegments?c.dateRanges[Wn.id]=Wn:ce.warn(`Ignoring invalid DATERANGE tag: "${pn}"`),Ye.tagList.push(["EXT-X-DATERANGE",pn]);break}case"DEFINE":{{const Rn=new Gn(pn,c);"IMPORT"in Rn?pi(c,Rn,s):Ii(c,Rn,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?Li(c,Nn,ut):p.length>0&&ds(c,Nn,ut),c.startCC=le=parseInt(pn);break;case"KEY":{const Rn=Hs(pn,t,c);if(Rn.isSupported()){if(Rn.method==="NONE"){zt=void 0;break}zt||(zt={});const Wn=zt[Rn.keyFormat];Wn!=null&&Wn.matches(Rn)||(Wn&&(zt=S({},zt)),zt[Rn.keyFormat]=Rn)}else ce.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${pn}"`);break}case"START":c.startTimeOffset=oa(pn);break;case"MAP":{const Rn=new Gn(pn,c);if(Ye.duration){const Wn=new Ze(r,h);Gs(Wn,Rn,n,zt),C=Wn,Ye.initSegment=C,C.rawProgramDateTime&&!Ye.rawProgramDateTime&&(Ye.rawProgramDateTime=C.rawProgramDateTime)}else{const Wn=Ye.byteRangeEndOffset;if(Wn){const ar=Ye.byteRangeStartOffset;Mt=`${Wn-ar}@${ar}`}else Mt=null;Gs(Ye,Rn,n,zt),C=Ye,Bt=!0}C.cc=le;break}case"SERVER-CONTROL":{Dt&&Li(c,Nn,ut),Dt=new Gn(pn),c.canBlockReload=Dt.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=Dt.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&Dt.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=Dt.optionalFloat("PART-HOLD-BACK",0),c.holdBack=Dt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&Li(c,Nn,ut);const Rn=new Gn(pn);c.partTarget=Rn.decimalFloatingPoint("PART-TARGET");break}case"PART":{let Rn=c.partList;Rn||(Rn=c.partList=[]);const Wn=M>0?Rn[Rn.length-1]:void 0,ar=M++,_n=new Gn(pn,c),yn=new me(_n,Ye,h,ar,Wn);Rn.push(yn),Ye.duration+=yn.duration;break}case"PRELOAD-HINT":{const Rn=new Gn(pn,c);c.preloadHint=Rn;break}case"RENDITION-REPORT":{const Rn=new Gn(pn,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(Rn);break}default:ce.warn(`line parsed but not handled: ${ut}`);break}}}je&&!je.relurl?(p.pop(),ue-=je.duration,c.partList&&(c.fragmentHint=je)):c.partList&&(Hi(Ye,je,v),Ye.cc=le,c.fragmentHint=Ye,zt&&la(Ye,zt,c)),c.targetduration||(c.playlistParsingError=new Error("Missing Target Duration"));const en=p.length,En=p[0],Bn=p[en-1];if(ue+=c.skippedSegments*c.targetduration,ue>0&&en&&Bn){c.averagetargetduration=ue/en;const Yn=Bn.sn;c.endSN=Yn!=="initSegment"?Yn:0,c.live||(Bn.endList=!0),Et>0&&(Ks(p,Et),En&&v.unshift(En))}return c.fragmentHint&&(ue+=c.fragmentHint.duration),c.totalduration=ue,v.length&&c.dateRangeTagCount&&En&&aa(v,c),c.endCC=le,c}}function aa(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 h=e.dateRanges[i[l]],c=h.startDate.getTime();h.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){h.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 h=(((s=t[n+1])==null?void 0:s.start)||r)-i.start;if(e<=l+h*1e3){const c=t[n].sn-a.startSN;if(c<0)return-1;const p=a.fragments;if(p.length>t.length){const C=(t[n+1]||p[p.length-1]).sn-a.startSN;for(let O=C;O>c;O--){const M=p[O].programDateTime;if(e>=M&&e<M+p[O].duration*1e3)return O}}return c}}}return-1}function Hs(a,e,t){var n,r;const i=new Gn(a,t),s=(n=i.METHOD)!=null?n:"",l=i.URI,h=i.hexadecimalInteger("IV"),c=i.KEYFORMATVERSIONS,p=(r=i.KEYFORMAT)!=null?r:"identity";l&&i.IV&&!h&&ce.error(`Invalid IV: ${i.IV}`);const v=l?Fi.resolve(l,e):"",C=(c||"1").split("/").map(Number).filter(Number.isFinite);return new si(s,v,p,C,h,i.KEYID)}function oa(a){const t=new Gn(a).decimalFloatingPoint("TIME-OFFSET");return d(t)?t:null}function Cs(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>Ae(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 rs(a,e,t){const n=e[t];n&&(a[t]=n)}function Ks(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 Hi(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function Gs(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 la(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 Li(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function ds(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function ys(a,e){const t=e.startPTS;if(d(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 As(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 h=t,c=n;const p=e.startPTS,v=e.endPTS;if(d(p)){const Pe=Math.abs(p-t);a&&Pe>a.totalduration?s.warn(`media timestamps and playlist times differ by ${Pe}s for level ${e.level} ${a.url}`):d(e.deltaPTS)?e.deltaPTS=Math.max(Pe,e.deltaPTS):e.deltaPTS=Pe,h=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 C=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=h,e.startDTS=r,e.endPTS=n,e.minEndPTS=c,e.endDTS=i;const O=e.sn;if(!a||O<a.startSN||O>a.endSN)return 0;let M;const ue=O-a.startSN,le=a.fragments;for(le[ue]=e,M=ue;M>0;M--)ys(le[M],le[M-1]);for(M=ue;M<le.length-1;M++)ys(le[M],le[M+1]);return a.fragmentHint&&ys(le[le.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,C}function ua(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;is(a,e,(p,v,C,O)=>{if((!e.startCC||e.skippedSegments)&&v.cc!==p.cc){const M=p.cc-v.cc;for(let ue=C;ue<O.length;ue++)O[ue].cc+=M;e.endCC=O[O.length-1].cc}d(p.startPTS)&&d(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=Wi(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&&Hi(l[v],l[v-1],p);aa(p,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var h;const p=Tr(a,e.startSN-1);e.startCC=(h=p==null?void 0:p.cc)!=null?h:s[0].cc}ca(a.partList,e.partList,(p,v)=>{v.elementaryStreams=p.elementaryStreams,v.stats=p.stats}),i?As(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS,t):Vi(a,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const c=e.advancedDateTime;if(e.advanced&&c){const p=e.edge;e.driftStart||(e.driftStartTime=c,e.driftStart=p),e.driftEndTime=c,e.driftEnd=p}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function Wi(a,e,t){const{dateRanges:n,recentlyRemovedDateranges:r}=e,i=S({},a);r&&r.forEach(h=>{delete i[h]});const l=Object.keys(i).length;return l?(Object.keys(n).forEach(h=>{const c=i[h],p=new Dr(n[h].attr,c);p.isValid?(i[h]=p,c||(p.tagOrder+=l)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${ht(n[h].attr)}"`)}),i):n}function ca(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 is(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,h=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let c=r;c<=i;c++){const p=h[s+c];let v=l[c];if(n&&!v&&p&&(v=e.fragments[c]=p),p&&v){t(p,v,c,l);const C=p.relurl,O=v.relurl;if(C&&bs(C,O)){e.playlistParsingError=Ds(`media sequence mismatch ${v.sn}:`,a,e,p,v);return}else if(p.cc!==v.cc){e.playlistParsingError=Ds(`discontinuity sequence mismatch (${p.cc}!=${v.cc})`,a,e,p,v);return}}}}function Ds(a,e,t,n,r){return new Error(`${a} ${r.url}
|
|
Playlist starting @${e.startSN}
|
|
${e.m3u8}
|
|
|
|
Playlist starting @${t.startSN}
|
|
${t.m3u8}`)}function Vi(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;Ws(e,s)}function Ws(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 wr(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 Tr(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 Fr(a,e,t){return a?Si(a.partList,e,t):null}function Si(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 Ti(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 bs(a,e){return a!==e&&e?xs(a)!==xs(e):!1}function xs(a){return a.replace(/\?[^?]*$/,"")}function ss(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 Vs(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function Is(a,e){const t=a.start+e;a.startPTS=t,a.setStart(t),a.endPTS=t+a.duration}function as(a,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)Is(t[n],a);e.fragmentHint&&Is(e.fragmentHint,a),e.alignedSliding=!0}function Rs(a,e){a&&(Ls(e,a),e.alignedSliding||ks(e,a),!e.alignedSliding&&!e.skippedSegments&&Vi(a,e,!1))}function Ls(a,e){if(!Vs(e,a))return;const t=Math.min(e.endCC,a.endCC),n=ss(e.fragments,t),r=ss(a.fragments,t);if(!n||!r)return;ce.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=n.start-r.start;as(i,a)}function ks(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=ss(n,s),i=ss(t,s)),(!r||!i)&&(r=n[Math.floor(n.length/2)],i=ss(t,r.cc)||t[Math.floor(t.length/2)]);const l=r.programDateTime,h=i.programDateTime;if(!l||!h)return;const c=(h-l)/1e3-(i.start-r.start);as(c,a)}function Ci(a,e,t){ki(a,e,t),a.addEventListener(e,t)}function ki(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}},Yt={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class Zs extends fi{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=Yt.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:s,fragCurrent:l,media:h,mediaBuffer:c,state:p}=this,v=h?h.currentTime:0,C=Vn.bufferInfo(c||h,v,s.maxBufferHole),O=!C.len;if(this.log(`Media seeking to ${d(v)?v.toFixed(3):v}, state: ${p}, ${O?"out of":"in"} buffer`),this.state===Yt.ENDED)this.resetLoadingState();else if(l){const M=s.maxFragLookUpTolerance,ue=l.start-M,le=l.start+l.duration+M;if(O||le<C.start||ue>C.end){const Pe=v>le;(v<ue||Pe)&&(Pe&&l.loader&&(this.log(`Cancelling fragment load for seek (sn: ${l.sn})`),l.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(h){this.fragmentTracker.removeFragmentsInRange(v,1/0,this.playlistType,!0);const M=this.lastCurrentTime;if(v>M&&(this.lastCurrentTime=v),!this.loadingParts){const ue=Math.max(C.end,v),le=this.shouldLoadParts(this.getLevelDetails(),ue);le&&(this.log(`LL-Part loading ON after seeking to ${v.toFixed(2)} with buffer @${ue.toFixed(2)}`),this.loadingParts=le)}}this.hls.hasEnoughToStart||(this.log(`Setting ${O?"startPosition":"nextLoadPosition"} to ${v} for seek without enough to start`),this.nextLoadPosition=v,O&&(this.startPosition=v)),O&&this.state===Yt.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 Gr(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new hr(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===Yt.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=Yt.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=Vn.bufferedInfo(i,e.start,0));const s=e.nextStart;if(s&&s>r&&s<t.edge||this.media.currentTime<e.start)return!1;const h=t.partList;if(h!=null&&h.length){const p=h[h.length-1];return Vn.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;Ci(n,"seeking",this.onMediaSeeking),Ci(n,"ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===Yt.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),ki(r,"seeking",this.onMediaSeeking),ki(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=Yt.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===Yt.FRAG_LOADING||!this.fragCurrent&&s===Yt.PARSING)&&(this.fragmentTracker.removeFragment(l),this.state=Yt.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===Yt.STOPPED||this.state===Yt.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)===dr.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),l=Math.max(e.duration,s?s.len:this.config.maxBufferLength),h=this.backtrackFragment;((h?e.sn-h.sn:0)===1||this.reduceMaxBufferLength(l,e.duration))&&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)===dr.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&&ui(l.method)){const h=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),l.key.buffer,l.iv.buffer,zi(l.method)).catch(c=>{throw r.trigger(g.ERROR,{type:ye.MEDIA_ERROR,details:W.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:h,tdecrypt:p}}),n.payload=c,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===Yt.STOPPED||this.state===Yt.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!==Yt.STOPPED&&(this.state=Yt.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:ye.KEY_SYSTEM_ERROR,details:W.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(Vn.getBuffered(n)):"(detached)"})`),Ie(e)){var r;if(e.type!==J.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(l=>!!s[l])){this.state=Yt.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=Yt.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(h=>!h),l=new mi(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=Yt.KEY_LOADING,this.fragCurrent=e,l=this.keyLoader.load(e).then(C=>{if(!this.fragContextChanged(C.frag))return this.hls.trigger(g.KEY_LOADED,C),this.state===Yt.KEY_LOADING&&(this.state=Yt.IDLE),C}),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 h=this.fragPrevious;if(Ie(e)&&(!h||e.sn!==h.sn)){const C=this.shouldLoadParts(t.details,e.end);C!==this.loadingParts&&(this.log(`LL-Part loading ${C?"ON":"OFF"} loading sn ${h==null?void 0:h.sn}->${e.sn}`),this.loadingParts=C)}if(n=Math.max(e.start,n||0),this.loadingParts&&Ie(e)){const C=s.partList;if(C&&r){n>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const O=this.getNextPart(C,e,n);if(O>-1){const M=C[O];e=this.fragCurrent=M.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${M.index} (${O}/${C.length-1}) of ${this.fragInfo(e,!1,M)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=M.start+M.duration,this.state=Yt.FRAG_LOADING;let ue;return l?ue=l.then(le=>!le||this.fragContextChanged(le.frag)?null:this.doFragPartsLoad(e,M,t,r)).catch(le=>this.handleFragLoadError(le)):ue=this.doFragPartsLoad(e,M,t,r).catch(le=>this.handleFragLoadError(le)),this.hls.trigger(g.FRAG_LOADING,{frag:e,part:M,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):ue}else if(!e.url||this.loadedEndOfParts(C,n))return Promise.resolve(null)}}if(Ie(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(C=>C.loaded).map(C=>`[${C.start}-${C.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))}`),d(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Yt.FRAG_LOADING;const p=this.config.progressive&&e.type!==J.SUBTITLE;let v;return p&&l?v=l.then(C=>!C||this.fragContextChanged(C.frag)?null:this.fragmentLoader.load(e,r)).catch(C=>this.handleFragLoadError(C)):v=Promise.all([this.fragmentLoader.load(e,p?r:void 0),l]).then(([C])=>(!p&&r&&r(C),C)).catch(C=>this.handleFragLoadError(C)),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 h=[],c=(l=n.details)==null?void 0:l.partList,p=v=>{this.fragmentLoader.loadPart(e,v,r).then(C=>{h[v.index]=C;const O=C.part;this.hls.trigger(g.FRAG_LOADED,C);const M=Fr(n.details,e.sn,v.index+1)||Si(c,e.sn,v.index+1);if(M)p(M);else return i({frag:e,part:O,partsLoaded:h})}).catch(s)};p(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===W.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===ye.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:ye.OTHER_ERROR,details:W.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Yt.PARSING){!this.fragCurrent&&this.state!==Yt.STOPPED&&this.state!==Yt.ERROR&&(this.state=Yt.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===J.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],h=l.details,c=s>-1?Fr(h,i,s):null,p=c?c.fragment:Tr(h,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!==Yt.PARSING)return;const{data1:s,data2:l}=e;let h=s;if(l&&(h=St(s,l)),!h.length)return;const c=this.initPTS[t.cc],p=c?-c.baseTime/c.timescale:void 0,v={type:e.type,frag:t,part:n,chunkMeta:r,offset:p,parent:t.type,data:h};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(!Vn.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=Vn.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(!d(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=Vn.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 Vn.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=J.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 h=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),h=this.getInitialLiveFragment(t);const C=this.hls.startPosition,O=this.hls.liveSyncPosition,M=h?(C!==-1&&C>=s?C:O)||h.start:e;this.log(`Setting startPosition to ${M} to match start frag at live edge. mainStart: ${C} liveSyncPosition: ${O} frag.start: ${(c=h)==null?void 0:c.start}`),this.startPosition=this.nextLoadPosition=M}}else e<=s&&(h=n[0]);if(!h){const v=this.loadingParts?t.partEnd:t.fragmentEnd;h=this.getFragmentAtPosition(e,v,t)}let p=this.filterReplacedPrimary(h,t);if(!p&&h){const v=h.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===dr.OK||n===dr.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 h=s.sn;return this.loopSn!==h&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${h}`),this.loopSn=h),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(Ta(this.config)){var e;if((e=this.hls.interstitialsManager)==null||(e=e.playingItem)==null?void 0:e.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(Ta(this.config)&&e.type!==J.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,h=e.length;l<h;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=kn(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=In(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:h}=n,{maxFragLookUpTolerance:c}=r,p=n.partList,v=!!(this.loadingParts&&p!=null&&p.length&&h);v&&!this.bitrateTest&&p[p.length-1].fragment.sn===h.sn&&(s=s.concat(h),l=h.sn);let C;if(e<t){var O;const ue=e<this.lastCurrentTime||e>t-c||(O=this.media)!=null&&O.paused||!this.startFragRequested?0:c;C=rr(i,s,e,ue)}else C=s[s.length-1];if(C){const M=C.sn-n.startSN,ue=this.fragmentTracker.getState(C);if((ue===dr.OK||ue===dr.PARTIAL&&C.gap)&&(i=C),i&&C.sn===i.sn&&(!v||p[0].fragment.sn>C.sn||!n.live)&&C.level===i.level){const Pe=s[M+1];C.sn<l&&this.fragmentTracker.getState(Pe)!==dr.OK?C=Pe:C=null}}return C}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&&d(i);if(s||!l&&!i){Rs(n,e);const h=e.fragmentStart;return this.log(`Live playlist sliding: ${h.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${r}`),h}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let 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&&d(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&&Ie(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!==Yt.FRAG_LOADING_WAITING_RETRY)&&(this.state=Yt.IDLE)}onFragmentOrKeyLoadError(e,t){var n;if(t.chunkMeta&&!t.frag){const Pe=this.getCurrentContext(t.chunkMeta);Pe&&(t.frag=Pe.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===W.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const l=t.errorAction;if(!l){this.state=Yt.ERROR;return}const{action:h,flags:c,retryCount:p=0,retryConfig:v}=l,C=!!v,O=C&&h===Mn.RetryRequest,M=C&&!l.resolved&&c===Ln.MoveAllAlternatesMatchingHost,ue=(n=this.hls.latestLevelDetails)==null?void 0:n.live;if(!O&&M&&Ie(r)&&!r.endList&&ue&&!Tt(t))this.resetFragmentErrors(e),this.treatAsGap(r),l.resolved=!0;else if((O||M)&&p<v.maxNumRetry){var le;const Pe=xr((le=t.response)==null?void 0:le.code),je=er(v,p);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+je,this.state=Yt.FRAG_LOADING_WAITING_RETRY,l.resolved=!0,Pe){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 ${je}ms`)}else if(v)if(this.resetFragmentErrors(e),p<v.maxNumRetry)!s&&h!==Mn.RemoveAlternatePermanently&&(l.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${p})`);return}else h===Mn.SendAlternateToPenaltyBox?this.state=Yt.WAITING_LEVEL:this.state=Yt.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,n=t===1/0;(!t||e>=t||n&&!xr(0))&&(n&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=Yt.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===Yt.PARSING||this.state===Yt.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===J.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Yt.STOPPED&&(this.state=Yt.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=Vn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===Yt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Yt.STOPPED&&(this.state=Yt.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((h,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})`),h||!1;const C=r?0:As(i,e,p.startPTS,p.endPTS,p.startDTS,p.endDTS,this);return this.hls.trigger(g.LEVEL_PTS_UPDATED,{details:i,level:n,drift:C,type:c,frag:e,start:p.startPTS,end:p.endPTS}),!0}return h},!1)){var l;const h=((l=this.transmuxer)==null?void 0:l.error)===null;if((n.fragmentError===0||h&&(n.fragmentError<2||e.endList))&&this.treatAsGap(e,n),h){const c=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(c.message),this.hls.trigger(g.ERROR,{type:ye.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!1,error:c,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=Yt.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===J.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 Ta(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class Ca{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 hs={exports:{}},Ps;function Co(){return Ps||(Ps=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(h,c,p){this.fn=h,this.context=c,this.once=p||!1}function i(h,c,p,v,C){if(typeof p!="function")throw new TypeError("The listener must be a function");var O=new r(p,v||h,C),M=t?t+c:c;return h._events[M]?h._events[M].fn?h._events[M]=[h._events[M],O]:h._events[M].push(O):(h._events[M]=O,h._eventsCount++),h}function s(h,c){--h._eventsCount===0?h._events=new n:delete h._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 C=0,O=v.length,M=new Array(O);C<O;C++)M[C]=v[C].fn;return M},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,C,O,M){var ue=t?t+c:c;if(!this._events[ue])return!1;var le=this._events[ue],Pe=arguments.length,je,Ye;if(le.fn){switch(le.once&&this.removeListener(c,le.fn,void 0,!0),Pe){case 1:return le.fn.call(le.context),!0;case 2:return le.fn.call(le.context,p),!0;case 3:return le.fn.call(le.context,p,v),!0;case 4:return le.fn.call(le.context,p,v,C),!0;case 5:return le.fn.call(le.context,p,v,C,O),!0;case 6:return le.fn.call(le.context,p,v,C,O,M),!0}for(Ye=1,je=new Array(Pe-1);Ye<Pe;Ye++)je[Ye-1]=arguments[Ye];le.fn.apply(le.context,je)}else{var ut=le.length,yt;for(Ye=0;Ye<ut;Ye++)switch(le[Ye].once&&this.removeListener(c,le[Ye].fn,void 0,!0),Pe){case 1:le[Ye].fn.call(le[Ye].context);break;case 2:le[Ye].fn.call(le[Ye].context,p);break;case 3:le[Ye].fn.call(le[Ye].context,p,v);break;case 4:le[Ye].fn.call(le[Ye].context,p,v,C);break;default:if(!je)for(yt=1,je=new Array(Pe-1);yt<Pe;yt++)je[yt-1]=arguments[yt];le[Ye].fn.apply(le[Ye].context,je)}}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,C){var O=t?t+c:c;if(!this._events[O])return this;if(!p)return s(this,O),this;var M=this._events[O];if(M.fn)M.fn===p&&(!C||M.once)&&(!v||M.context===v)&&s(this,O);else{for(var ue=0,le=[],Pe=M.length;ue<Pe;ue++)(M[ue].fn!==p||C&&!M[ue].once||v&&M[ue].context!==v)&&le.push(M[ue]);le.length?this._events[O]=le.length===1?le[0]:le:s(this,O)}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}(hs)),hs.exports}var Ao=Co(),da=L(Ao);const Ys="1.6.15",Es={};function Ga(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Do(){const a=Es[Ys];if(a)return a.clientCount++,a;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),r={worker:new self.Worker(t),objectURL:t,clientCount:1};return Es[Ys]=r,r}function Wa(a){const e=Es[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 Es[a]=r,r}function Io(a){const e=Es[a||Ys];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete Es[a||Ys],r&&self.URL.revokeObjectURL(r),n.terminate()}}function Aa(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 Xs(a,e){return e+10<=a.length&&a[e]===73&&a[e+1]===68&&a[e+2]===51&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function Os(a,e){let t=0;return t=(a[e]&127)<<21,t|=(a[e+1]&127)<<14,t|=(a[e+2]&127)<<7,t|=a[e+3]&127,t}function Ms(a,e){const t=e;let n=0;for(;Xs(a,e);){n+=10;const r=Os(a,e+6);n+=r,Aa(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 O=new Error(`invalid ADTS sampling index:${s}`);a.emit(g.ERROR,g.ERROR,{type:ye.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!0,error:O,reason:O.message});return}const l=(i>>6&3)+1,h=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 C=[l<<3|(v&14)>>1,(v&1)<<7|h<<3];return ce.log(`manifest codec:${n}, parsed codec:${c}, channels:${h}, rate:${p} (ADTS object type:${l} sampling index:${s})`),{config:C,samplerate:p,channelCount:h,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 ha(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 fa(a,e){return e+1<a.length&&Da(a,e)}function Qs(a,e){return Ya(a,e)&&Da(a,e)&&ha(a,e)<=a.length-e}function Ia(a,e){if(fa(a,e)){const t=Za(a,e);if(e+t>=a.length)return!1;const n=ha(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||fa(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=ha(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 h;if(l){const{frameLength:v,headerLength:C}=l,O=C+v,M=Math.max(0,t+O-e.length);M?(h=new Uint8Array(O-C),h.set(e.subarray(t+C,e.length),0)):h=e.subarray(t+C,t+O);const ue={unit:h,pts:s};return M||a.samples.push(ue),{sample:ue,length:O,missing:M}}const c=e.length-t;return h=new Uint8Array(c),h.set(e.subarray(t,e.length),0),{sample:{unit:h,pts:s},length:c,missing:-1}}function La(a,e){return Xs(a,e)&&Os(a,e+6)+10<=a.length-e}function Lo(a){return a instanceof ArrayBuffer?a:a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer}function ka(a,e=0,t=1/0){return Ja(a,e,t,Uint8Array)}function Ja(a,e,t,n){const r=ko(a);let i=1;"BYTES_PER_ELEMENT"in n&&(i=n.BYTES_PER_ELEMENT);const s=qa(a)?a.byteOffset:0,l=(s+a.byteLength)/i,h=(s+e)/i,c=Math.floor(Math.max(0,Math.min(h,l))),p=Math.floor(Math.min(c+Math.max(t,0),l));return new n(r,c,p-c)}function ko(a){return a instanceof ArrayBuffer?a:a.buffer}function qa(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=Ve(ka(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const l=Ve(ka(a.data,3+n,s));let h;return r==="-->"?h=Ve(ka(a.data,4+n+s)):h=Lo(a.data.subarray(4+n+s)),e.mimeType=r,e.pictureType=i,e.description=l,e.data=h,e}function He(a){if(a.size<2)return;const e=Ve(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=Ve(a.data.subarray(t),!0);t+=n.length+1;const r=Ve(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=Ve(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=Ve(a.data.subarray(t),!0);t+=n.length+1;const r=Ve(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=Ve(a.data);return{key:a.type,info:"",data:e}}function Oa(a){return a.type==="PRIV"?He(a):a.type[0]==="W"?Pa(a):a.type==="APIC"?Po(a):eo(a)}function to(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=Os(a,4),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}}const Bs=10,no=10;function Ma(a){let e=0;const t=[];for(;Xs(a,e);){const n=Os(a,e+6);a[e+5]>>6&1&&(e+=Bs),e+=Bs;const r=e+n;for(;e+no<r;){const i=to(a.subarray(e)),s=Oa(i);s&&t.push(s),e+=i.size+Bs}Aa(a,e)&&(e+=Bs)}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 ma(a){const e=Ma(a);for(let t=0;t<e.length;t++){const n=e[t];if(ro(n))return io(n)}}let Ai=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 Qi(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class Js{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=St(this.cachedData,e),this.cachedData=null);let n=Ms(e,0),r=n?n.length:0,i;const s=this._audioTrack,l=this._id3Track,h=n?ma(n):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&d(h))&&(this.basePTS=so(h,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:Ai.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=Ms(e,r),l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Ai.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=St(this.cachedData,p):this.cachedData=p}}return{audioTrack:s,videoTrack:Qi(),id3Track:l,textTrack:Qi()}}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:Qi(),id3Track:this._id3Track,textTrack:Qi()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const so=(a,e,t)=>{if(d(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let pa=null;const Oo=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],ao=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Ba=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Mo=[0,1,1,4];function oo(a,e,t,n,r){if(t+24>e.length)return;const i=Bo(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,l=n+r*s,h={unit:e.subarray(t,t+i.frameLength),pts:l,dts:l};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(h),{sample:h,length:i.frameLength,missing:0}}}function Bo(a,e){const t=a[e+1]>>3&3,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,h=t===3?3-n:n===3?3:4,c=Oo[h*14+r-1]*1e3,v=ao[(t===3?0:t===2?1:2)*3+i],C=l===3?1:2,O=Ba[t][n],M=Mo[n],ue=O*8*M,le=Math.floor(O*c/v+s)*M;if(pa===null){const Ye=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);pa=Ye?parseInt(Ye[1]):0}return!!pa&&pa<=87&&n===2&&c>=224e3&&l===0&&(a[e+3]=a[e+3]|128),{sampleRate:v,channelCount:C,frameLength:le,samplesPerFrame:ue}}}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 f(a,e){return Z(a,e)&&4<=a.length-e}function m(a,e){if(e+1<a.length&&Z(a,e)){const n=Bo(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 Js{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=Ms(e,0);let r=(n==null?void 0:n.length)||0;if(m(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 Qs(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 R=(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),h=8-l;i[0]=4278190080>>>24+h<<h,r[0]=(s[0]&i[0])>>h,t=t?t<<l|r[0]:r[0],e+=1,n-=l}return t};class V extends Js{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=_e(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=Ms(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&ma(t)!==void 0&&R(e,n)<16}}function _e(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],h=e[t+4]&63,p=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][h*3+i]*2;if(t+p>e.length)return-1;const v=e[t+6]>>5;let C=0;v===2?C+=2:(v&1&&v!==1&&(C+=2),v&4&&(C+=2));const O=(e[t+6]<<8|e[t+7])>>12-C&1,ue=[2,1,2,3,3,4,4,5][v]+O,le=e[t+5]>>3,Pe=e[t+5]&7,je=new Uint8Array([i<<6|le<<1|Pe>>2,(Pe&3)<<6|v<<3|O<<2|h>>4,h<<4&224]),Ye=1536/l*9e4,ut=n+r*Ye,yt=e.subarray(t,t+p);return a.config=je,a.channelCount=ue,a.samplerate=l,a.samples.push({unit:yt,pts:ut}),p}class ke extends Js{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=Ms(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&ma(t)!==void 0&&R(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(m(e,n))return ce.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return f(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return oo(e,t,n,this.basePTS,this.frameIndex)}}const et=/\/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=Qi("video",1),s=this.audioTrack=Qi("audio",1),l=this.txtTrack=Qi("text",1);if(this.id3Track=Qi("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const h=De(e);if(h.video){const{id:c,timescale:p,codec:v,supplemental:C}=h.video;i.id=c,i.timescale=l.timescale=p,i.codec=v,i.supplemental=C}if(h.audio){const{id:c,timescale:p,codec:v}=h.audio;s.id=c,s.timescale=p,s.codec=v}l.id=wt.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return Te(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=St(this.remainderData,e));const l=Lt(n);this.remainderData=l.remainder,r.samples=l.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=Ct(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=Ct(e,t),{videoTrack:t,audioTrack:Qi(),id3Track:r,textTrack:Qi()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=pe(e.samples,["emsg"]);r&&r.forEach(i=>{const s=Je(i);if(et.test(s.schemeIdUri)){const l=It(s,t);let h=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;h<=.001&&(h=Number.POSITIVE_INFINITY);const c=s.payload;n.samples.push({data:c,len:c.byteLength,dts:l,pts:l,type:Ai.emsg,duration:h})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const l=It(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:l,pts:l,type:Ai.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 It(a,e){return d(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 hr(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,fr.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 h=new Uint8Array(l);r.set(h,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=be(i.data),l=this.getAvcEncryptedData(s);this.decryptBuffer(l.buffer).then(h=>{i.data=this.getAvcDecryptedUnit(s,h),this.decrypter.isSync()||this.decryptAvcSamples(e,t,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 nn{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 h=0,c,p,v,C=-1,O=0;for(i===-1&&(C=0,O=this.getNALuType(t,0),i=0,h=1);h<r;){if(c=t[h++],!i){i=c?0:1;continue}if(i===1){i=c?0:2;continue}if(!c)i=3;else if(c===1){if(p=h-i-1,C>=0){const M={data:t.subarray(C,p),type:O};l.push(M)}else{const M=this.getLastNalUnit(e.samples);M&&(s&&h<=4-s&&M.state&&(M.data=M.data.subarray(0,M.data.byteLength-s)),p>0&&(M.data=St(M.data,t.subarray(0,p)),M.state=0))}h<r?(v=this.getNALuType(t,h),C=h,O=v,i=0):i=-1}else i=0}if(C>=0&&i>=0){const M={data:t.subarray(C,r),type:O,state:i};l.push(M)}if(l.length===0){const M=this.getLastNalUnit(e.samples);M&&(M.data=St(M.data,t))}return e.naluState=i,l}}class ln{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&&ce.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 vn extends nn{parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,l,h=!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 ue=!1;l=!0;const le=c.data;if(h&&le.length>4){const Pe=this.readSliceType(le);(Pe===2||Pe===4||Pe===7||Pe===9)&&(ue=!0)}if(ue){var C;(C=s)!=null&&C.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=ue;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,pt(c.data,1,n.pts,t.samples);break}case 7:{var O,M;l=!0,h=!0;const ue=c.data,le=this.readSPS(ue);if(!e.sps||e.width!==le.width||e.height!==le.height||((O=e.pixelRatio)==null?void 0:O[0])!==le.pixelRatio[0]||((M=e.pixelRatio)==null?void 0:M[1])!==le.pixelRatio[1]){e.width=le.width,e.height=le.height,e.pixelRatio=le.pixelRatio,e.sps=[ue];const Pe=ue.subarray(1,4);let je="avc1.";for(let Ye=0;Ye<3;Ye++){let ut=Pe[Ye].toString(16);ut.length<2&&(ut="0"+ut),je+=ut}e.codec=je}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 ln(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 ln(e);let n=0,r=0,i=0,s=0,l,h,c;const p=t.readUByte.bind(t),v=t.readBits.bind(t),C=t.readUEG.bind(t),O=t.readBoolean.bind(t),M=t.skipBits.bind(t),ue=t.skipEG.bind(t),le=t.skipUEG.bind(t),Pe=this.skipScalingList.bind(this);p();const je=p();if(v(5),M(3),p(),le(),je===100||je===110||je===122||je===244||je===44||je===83||je===86||je===118||je===128){const Bt=C();if(Bt===3&&M(1),le(),le(),M(1),O())for(h=Bt!==3?8:12,c=0;c<h;c++)O()&&(c<6?Pe(16,t):Pe(64,t))}le();const Ye=C();if(Ye===0)C();else if(Ye===1)for(M(1),ue(),ue(),l=C(),c=0;c<l;c++)ue();le(),M(1);const ut=C(),yt=C(),zt=v(1);zt===0&&M(1),M(1),O()&&(n=C(),r=C(),i=C(),s=C());let Et=[1,1];if(O()&&O())switch(p()){case 1:Et=[1,1];break;case 2:Et=[12,11];break;case 3:Et=[10,11];break;case 4:Et=[16,11];break;case 5:Et=[40,33];break;case 6:Et=[24,11];break;case 7:Et=[20,11];break;case 8:Et=[32,11];break;case 9:Et=[80,33];break;case 10:Et=[18,11];break;case 11:Et=[15,11];break;case 12:Et=[64,33];break;case 13:Et=[160,99];break;case 14:Et=[4,3];break;case 15:Et=[3,2];break;case 16:Et=[2,1];break;case 255:{Et=[p()<<8|p(),p()<<8|p()];break}}return{width:Math.ceil((ut+1)*16-n*2-r*2),height:(2-zt)*(yt+1)*16-(zt?2:4)*(i+s),pixelRatio:Et}}}class $n extends nn{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,h=!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,h){var C;(C=s)!=null&&C.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,pt(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,h=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],c.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const O=this.readSPS(c.data);e.width=O.width,e.height=O.height,e.pixelRatio=O.pixelRatio,e.codec=O.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const M in O.params)e.params[M]=O.params[M]}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 O=this.readPPS(c.data);for(const M in O)e.params[M]=O[M]}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 ln(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 ln(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(),h=t.readUByte(),c=t.readUByte(),p=t.readUByte(),v=t.readUByte(),C=t.readUByte(),O=t.readUByte(),M=t.readUByte(),ue=t.readUByte(),le=t.readUByte(),Pe=t.readUByte(),je=[],Ye=[];for(let Ir=0;Ir<n;Ir++)je.push(t.readBoolean()),Ye.push(t.readBoolean());if(n>0)for(let Ir=n;Ir<8;Ir++)t.readBits(2);for(let Ir=0;Ir<n;Ir++)je[Ir]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),Ye[Ir]&&t.readUByte();t.readUEG();const ut=t.readUEG();ut==3&&t.skipBits(1);const yt=t.readUEG(),zt=t.readUEG(),Et=t.readBoolean();let Bt=0,Mt=0,Dt=0,en=0;Et&&(Bt+=t.readUEG(),Mt+=t.readUEG(),Dt+=t.readUEG(),en+=t.readUEG());const En=t.readUEG(),Bn=t.readUEG(),Yn=t.readUEG(),Nn=t.readBoolean();for(let Ir=Nn?0:n;Ir<=n;Ir++)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 Ni=0;Ni<4;Ni++)for(let ts=0;ts<(Ni===3?2:6);ts++)if(!t.readBoolean())t.readUEG();else{const us=Math.min(64,1<<4+(Ni<<1));Ni>1&&t.readEG();for(let Sa=0;Sa<us;Sa++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const Rn=t.readUEG();let Wn=0;for(let Ir=0;Ir<Rn;Ir++){let Ni=!1;if(Ir!==0&&(Ni=t.readBoolean()),Ni){Ir===Rn&&t.readUEG(),t.readBoolean(),t.readUEG();let ts=0;for(let ia=0;ia<=Wn;ia++){const us=t.readBoolean();let Sa=!1;us||(Sa=t.readBoolean()),(us||Sa)&&ts++}Wn=ts}else{const ts=t.readUEG(),ia=t.readUEG();Wn=ts+ia;for(let us=0;us<ts;us++)t.readUEG(),t.readBoolean();for(let us=0;us<ia;us++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const Ir=t.readUEG();for(let Ni=0;Ni<Ir;Ni++){for(let ts=0;ts<Yn+4;ts++)t.readBits(1);t.readBits(1)}}let _n=0,yn=1,vr=1,Mr=!0,_r=1,Sr=0;t.readBoolean(),t.readBoolean();let Bi=!1;if(t.readBoolean()){if(t.readBoolean()){const sa=t.readUByte(),pu=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],To=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];sa>0&&sa<16?(yn=pu[sa-1],vr=To[sa-1]):sa===255&&(yn=t.readBits(16),vr=t.readBits(16))}if(t.readBoolean()&&t.readBoolean(),t.readBoolean()&&(t.readBits(3),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.readUByte(),t.readUByte())),t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),Bi=t.readBoolean(),Bi&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(_r=t.readBits(32),Sr=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const To=t.readBoolean(),gu=t.readBoolean();let za=!1;(To||gu)&&(za=t.readBoolean(),za&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),za&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let vu=0;vu<=n;vu++){Mr=t.readBoolean();const K0=Mr||t.readBoolean();let _u=!1;K0?t.readEG():_u=t.readBoolean();const yu=_u?1:t.readUEG()+1;if(To)for(let ja=0;ja<yu;ja++)t.readUEG(),t.readUEG(),za&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(gu)for(let ja=0;ja<yu;ja++)t.readUEG(),t.readUEG(),za&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),_n=t.readUEG())}let es=yt,vs=zt;if(Et){let Ir=1,Ni=1;ut===1?Ir=Ni=2:ut==2&&(Ir=2),es=yt-Ir*Mt-Ir*Bt,vs=zt-Ni*en-Ni*Dt}const ra=r?["A","B","C"][r]:"",H0=l<<24|h<<16|c<<8|p;let hl=0;for(let Ir=0;Ir<32;Ir++)hl=(hl|(H0>>Ir&1)<<31-Ir)>>>0;let fl=hl.toString(16);return s===1&&fl==="2"&&(fl="6"),{codecString:`hvc1.${ra}${s}.${fl}.${i?"H":"L"}${Pe}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:r,general_profile_compatibility_flags:[l,h,c,p],general_constraint_indicator_flags:[v,C,O,M,ue,le],general_level_idc:Pe,bit_depth:En+8,bit_depth_luma_minus8:En,bit_depth_chroma_minus8:Bn,min_spatial_segmentation_idc:_n,chroma_format_idc:ut,frame_rate:{fixed:Mr,fps:Sr/_r}},width:es,height:vs,pixelRatio:[yn,vr]}}readPPS(e){const t=new ln(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 ir{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=ir.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 h=r;h<t;h+=jn)if(e[h]===71&&(t-h===jn||e[h+jn]===71)){if(l++,s===-1&&(s=h,s!==0&&(n=Math.min(s+jn*99,e.length-jn)+1)),i||(i=ur(e,h)===0),i&&l>1&&(s===0&&l>2||h+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:wt[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=ir.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=ir.createTrack("audio",r),this._id3Track=ir.createTrack("id3"),this._txtTrack=ir.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,h=this._id3Track,c=this._txtTrack;let p=s.pid,v=s.pesData,C=l.pid,O=h.pid,M=l.pesData,ue=h.pesData,le=null,Pe=this.pmtParsed,je=this._pmtId,Ye=e.length;if(this.remainderData&&(e=St(this.remainderData,e),Ye=e.length,this.remainderData=null),Ye<jn&&!r)return this.remainderData=e,{audioTrack:l,videoTrack:s,id3Track:h,textTrack:c};const ut=Math.max(0,ir.syncOffset(e));Ye-=(Ye-ut)%jn,Ye<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,Ye,e.buffer.byteLength-Ye));let yt=0;for(let Et=ut;Et<Ye;Et+=jn)if(e[Et]===71){const Bt=!!(e[Et+1]&64),Mt=ur(e,Et),Dt=(e[Et+3]&48)>>4;let en;if(Dt>1){if(en=Et+5+e[Et+4],en===Et+jn)continue}else en=Et+4;switch(Mt){case p:Bt&&(v&&(i=$r(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(en,Et+jn)),v.size+=Et+jn-en);break;case C:if(Bt){if(M&&(i=$r(M,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}M={data:[],size:0}}M&&(M.data.push(e.subarray(en,Et+jn)),M.size+=Et+jn-en);break;case O:Bt&&(ue&&(i=$r(ue,this.logger))&&this.parseID3PES(h,i),ue={data:[],size:0}),ue&&(ue.data.push(e.subarray(en,Et+jn)),ue.size+=Et+jn-en);break;case 0:Bt&&(en+=e[en]+1),je=this._pmtId=jr(e,en);break;case je:{Bt&&(en+=e[en]+1);const En=Or(e,en,this.typeSupported,n,this.observer,this.logger);p=En.videoPid,p>0&&(s.pid=p,s.segmentCodec=En.segmentVideoCodec),C=En.audioPid,C>0&&(l.pid=C,l.segmentCodec=En.segmentAudioCodec),O=En.id3Pid,O>0&&(h.pid=O),le!==null&&!Pe&&(this.logger.warn(`MPEG-TS PMT found at ${Et} after unknown PID '${le}'. Backtracking to sync byte @${ut} to parse all TS packets.`),le=null,Et=ut-188),Pe=this.pmtParsed=!0;break}case 17:case 8191:break;default:le=Mt;break}}else yt++;yt>0&&Hr(this.observer,new Error(`Found ${yt} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=v,l.pesData=M,h.pesData=ue;const zt={audioTrack:l,videoTrack:s,id3Track:h,textTrack:c};return r&&this.extractRemainingSamples(zt),zt}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,h=r.pesData;let c;if(s&&(c=$r(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=$r(l,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,c);break;case"mp3":this.parseMPEGPES(t,c);break;case"ac3":this.parseAC3PES(t,c);break}t.pesData=null}else l!=null&&l.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=l;h&&(c=$r(h,this.logger))?(this.parseID3PES(r,c),r.pesData=null):r.pesData=h}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 vn:e==="hevc"&&(this.videoParser=new $n))}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,C=r.sample.unit.byteLength;if(v===-1)i=St(r.sample.unit,i);else{const O=C-v;r.sample.unit.set(i.subarray(0,v),O),e.samples.push(r.sample),n=r.missing}}let s,l;for(s=n,l=i.length;s<l-1&&!fa(i,s);s++);if(s!==n){let v;const C=s<l-1;if(C?v=`AAC PES did not start with ADTS header,offset:${s}`:v="No ADTS header found in AAC PES",Hr(this.observer,new Error(v),C,this.logger),!C)return}Ra(e,this.observer,i,s,this.audioCodec);let h;if(t.pts!==void 0)h=t.pts;else if(r){const v=Xa(e.samplerate);h=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,h,c),s+=p.length,p.missing){this.aacOverFlow=p;break}else for(c++;s<l-1&&!fa(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 h=oo(e,n,s,l,i);if(h)s+=h.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,h;for(;l<i&&(h=_e(e,n,l,r,s++))>0;)l+=h}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=S({},t,{type:this._videoTrack?Ai.emsg:Ai.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function ur(a,e){return((a[e+1]&31)<<8)+a[e+2]}function jr(a,e){return(a[e+10]&31)<<8|a[e+11]}function Or(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],h=e+3+l-4,c=(a[e+10]&15)<<8|a[e+11];for(e+=12+c;e<h;){const p=ur(a,e),v=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){Kr("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){Kr("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){Kr("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 C=e+5,O=v;for(;O>2;){switch(a[C]){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 ue=a[C+1]+2;C+=ue,O-=ue}}break;case 194:case 135:return Hr(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 Hr(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(g.ERROR,g.ERROR,{type:ye.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function Kr(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function $r(a,e){let t=0,n,r,i,s,l;const h=a.data;if(!a||a.size===0)return null;for(;h[0].length<19&&h.length>1;)h[0]=St(h[0],h[1]),h.splice(1,1);if(n=h[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 C=new Uint8Array(a.size);for(let O=0,M=h.length;O<M;O++){n=h[O];let ue=n.byteLength;if(v)if(v>ue){v-=ue;continue}else n=n.subarray(v),ue-=v,v=0;C.set(n,t),t+=ue}return r&&(r-=i+3),{data:C,pts:s,dts:l,len:r}}return null}class Di{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 Yr=Math.pow(2,32)-1;class _t{static init(){_t.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 _t.types)_t.types.hasOwnProperty(e)&&(_t.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]);_t.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]);_t.STTS=_t.STSC=_t.STCO=i,_t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),_t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),_t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),_t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),l=new Uint8Array([97,118,99,49]),h=new Uint8Array([0,0,0,1]);_t.FTYP=_t.box(_t.types.ftyp,s,h,s,l),_t.DINF=_t.box(_t.types.dinf,_t.box(_t.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 _t.box(_t.types.hdlr,_t.HDLR_TYPES[e])}static mdat(e){return _t.box(_t.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(Yr+1)),r=Math.floor(t%(Yr+1));return _t.box(_t.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 _t.box(_t.types.mdia,_t.mdhd(e.timescale||0,e.duration||0),_t.hdlr(e.type),_t.minf(e))}static mfhd(e){return _t.box(_t.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"?_t.box(_t.types.minf,_t.box(_t.types.smhd,_t.SMHD),_t.DINF,_t.stbl(e)):_t.box(_t.types.minf,_t.box(_t.types.vmhd,_t.VMHD),_t.DINF,_t.stbl(e))}static moof(e,t,n){return _t.box(_t.types.moof,_t.mfhd(e),_t.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=_t.trak(e[t]);return _t.box.apply(null,[_t.types.moov,_t.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(_t.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=_t.trex(e[t]);return _t.box.apply(null,[_t.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(Yr+1)),r=Math.floor(t%(Yr+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 _t.box(_t.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 _t.box(_t.types.sdtp,n)}static stbl(e){return _t.box(_t.types.stbl,_t.stsd(e),_t.box(_t.types.stts,_t.STTS),_t.box(_t.types.stsc,_t.STSC),_t.box(_t.types.stsz,_t.STSZ),_t.box(_t.types.stco,_t.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=_t.box(_t.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),h=e.width,c=e.height,p=e.pixelRatio[0],v=e.pixelRatio[1];return _t.box(_t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,h>>8&255,h&255,c>>8&255,c&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l,_t.box(_t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),_t.box(_t.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 _t.box(_t.types.mp4a,_t.audioStsd(e),_t.box(_t.types.esds,_t.esds(e)))}static mp3(e){return _t.box(_t.types[".mp3"],_t.audioStsd(e))}static ac3(e){return _t.box(_t.types["ac-3"],_t.audioStsd(e),_t.box(_t.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return _t.box(_t.types.stsd,_t.STSD,_t.mp4a(e));if(t==="ac3"&&e.config)return _t.box(_t.types.stsd,_t.STSD,_t.ac3(e));if(t==="mp3"&&e.codec==="mp3")return _t.box(_t.types.stsd,_t.STSD,_t.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return _t.box(_t.types.stsd,_t.STSD,_t.avc1(e));if(t==="hevc"&&e.vps)return _t.box(_t.types.stsd,_t.STSD,_t.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/(Yr+1)),l=Math.floor(n%(Yr+1));return _t.box(_t.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=_t.sdtp(e),r=e.id,i=Math.floor(t/(Yr+1)),s=Math.floor(t%(Yr+1));return _t.box(_t.types.traf,_t.box(_t.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),_t.box(_t.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])),_t.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,_t.box(_t.types.trak,_t.tkhd(e),_t.mdia(e))}static trex(e){const t=e.id;return _t.box(_t.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,h,c,p,v,C;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++)h=n[l],c=h.duration,p=h.size,v=h.flags,C=h.cts,s.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,p>>>24&255,p>>>16&255,p>>>8&255,p&255,v.isLeading<<2|v.dependsOn,v.isDependedOn<<6|v.hasRedundancy<<4|v.paddingValue<<1|v.isNonSync,v.degradPrio&61440,v.degradPrio&15,C>>>24&255,C>>>16&255,C>>>8&255,C&255],12+16*l);return _t.box(_t.types.trun,s)}static initSegment(e){_t.types||_t.init();const t=_t.moov(e);return St(_t.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 M=0;M<n.length;M+=1){s+=3;for(let ue=0;ue<n[M].length;ue+=1)s+=2+n[M][ue].length}const l=new Uint8Array(s);l.set(i,0),s=i.length;const h=n.length-1;for(let M=0;M<n.length;M+=1){l.set(new Uint8Array([32+M|(M===h?128:0),0,n[M].length]),s),s+=3;for(let ue=0;ue<n[M].length;ue+=1)l.set(new Uint8Array([n[M][ue].length>>8,n[M][ue].length&255]),s),s+=2,l.set(n[M][ue],s),s+=n[M][ue].length}const c=_t.box(_t.types.hvcC,l),p=e.width,v=e.height,C=e.pixelRatio[0],O=e.pixelRatio[1];return _t.box(_t.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,_t.box(_t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),_t.box(_t.types.pasp,new Uint8Array([C>>24,C>>16&255,C>>8&255,C&255,O>>24,O>>16&255,O>>8&255,O&255])))}}_t.types=void 0,_t.HDLR_TYPES=void 0,_t.STTS=void 0,_t.STSC=void 0,_t.STCO=void 0,_t.STSZ=void 0,_t.VMHD=void 0,_t.SMHD=void 0,_t.STSD=void 0,_t.FTYP=void 0,_t.DINF=void 0;const $i=9e4;function Ji(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function Zi(a,e,t=1,n=!1){return Ji(a,e,1/t,n)}function ci(a,e=!1){return Ji(a,1e3,1/$i,e)}function fs(a,e=1){return Ji(a,$i,1/e)}function qi(a){const{baseTime:e,timescale:t,trackId:n}=a;return`${e/t} (${e}/${t}) trackId: ${n}`}const lo=10*1e3,No=1024,Ns=1152,Fs=1536;let Yi=null,$s=null;function qs(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 ga extends re{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,Yi===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Yi=s?parseInt(s[1]):0}if($s===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);$s=i?parseInt(i[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){const t=this._initPTS;(!t||!e||e.trackId!==t.trackId||e.baseTime!==t.baseTime||e.timescale!==t.timescale)&&this.log(`Reset initPTS: ${t&&qi(t)} > ${e&&qi(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,h=l-i;return h<-4294967296&&(t=!0,l=Ui(l,n),h=l-i),h>0?i:l},n);return t&&this.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,l,h){let c,p,v,C,O,M,ue=i,le=i;const Pe=e.pid>-1,je=t.pid>-1,Ye=t.samples.length,ut=e.samples.length>0,yt=l&&Ye>0||Ye>1;if((!Pe||ut)&&(!je||yt)||this.ISGenerated||l){if(this.ISGenerated){var Et,Bt,Mt,Dt;const Yn=this.videoTrackConfig;(Yn&&(t.width!==Yn.width||t.height!==Yn.height||((Et=t.pixelRatio)==null?void 0:Et[0])!==((Bt=Yn.pixelRatio)==null?void 0:Bt[0])||((Mt=t.pixelRatio)==null?void 0:Mt[1])!==((Dt=Yn.pixelRatio)==null?void 0:Dt[1]))||!Yn&&yt||this.nextAudioTs===null&&ut)&&this.resetInitSegment()}this.ISGenerated||(v=this.generateIS(e,t,i,s));const en=this.isVideoContiguous;let En=-1,Bn;if(yt&&(En=Fo(t.samples),!en&&this.config.forceKeyFrameOnDiscontinuity))if(M=!0,En>0){this.warn(`Dropped ${En} out of ${Ye} video samples due to a missing keyframe`);const Yn=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(En),t.dropped+=En,le+=(t.samples[0].pts-Yn)/t.inputTimeScale,Bn=le}else En===-1&&(this.warn(`No keyframe found out of ${Ye} video samples`),M=!1);if(this.ISGenerated){if(ut&&yt){const Yn=this.getVideoStartPts(t.samples),pn=(Ui(e.samples[0].pts,Yn)-Yn)/t.inputTimeScale;ue+=Math.max(0,pn),le+=Math.max(0,-pn)}if(ut){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),v=this.generateIS(e,t,i,s)),p=this.remuxAudio(e,ue,this.isAudioContiguous,s,je||yt||h===J.AUDIO?le:void 0),yt){const Yn=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,le,en,Yn)}}else yt&&(c=this.remuxVideo(t,le,en,0));c&&(c.firstKeyFrame=En,c.independent=En!==-1,c.firstKeyFramePTS=Bn)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(O=va(n,i,this._initPTS,this._initDTS)),r.samples.length&&(C=Na(r,i,this._initPTS))),{audio:p,video:c,initSegment:v,independent:M,text:C,id3:O}}computeInitPts(e,t,n,r){const i=Math.round(n*t);let s=Ui(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,h={},c=this._initPTS;let p=!c||r,v="audio/mp4",C,O,M,ue=-1;if(p&&(C=O=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}h.audio={id:"audio",container:v,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&l.mpeg?new Uint8Array(0):_t.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(ue=e.id,M=e.inputTimeScale,!c||M!==c.timescale?C=O=this.computeInitPts(i[0].pts,M,n,"audio"):p=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:_t.initSegment([t]),metadata:{width:t.width,height:t.height}},p)if(ue=t.id,M=t.inputTimeScale,!c||M!==c.timescale){const le=this.getVideoStartPts(s),Pe=Ui(s[0].dts,le),je=this.computeInitPts(Pe,M,n,"video"),Ye=this.computeInitPts(le,M,n,"video");O=Math.min(O,je),C=Math.min(C,Ye)}else p=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(h).length)return this.ISGenerated=!0,p?(c&&this.warn(`Timestamps at playlist time: ${r?"":"~"}${n} ${C/M} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${n} offset: ${C/M} (${C}/${M}) trackId: ${ue}`),this._initPTS={baseTime:C,timescale:M,trackId:ue},this._initDTS={baseTime:O,timescale:M,trackId:ue}):C=M=void 0,{tracks:h,initPTS:C,timescale:M,trackId:ue}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,l=[],h=s.length,c=this._initPTS,p=c.baseTime*i/c.timescale;let v=this.nextVideoTs,C=8,O=this.videoSampleDuration,M,ue,le=Number.POSITIVE_INFINITY,Pe=Number.NEGATIVE_INFINITY,je=!1;if(!n||v===null){const _n=p+t*i,yn=s[0].pts-Ui(s[0].dts,s[0].pts);Yi&&v!==null&&Math.abs(_n-yn-(v+p))<15e3?n=!0:v=_n-yn-p}const Ye=v+p;for(let _n=0;_n<h;_n++){const yn=s[_n];yn.pts=Ui(yn.pts,Ye),yn.dts=Ui(yn.dts,Ye),yn.dts<s[_n>0?_n-1:_n].dts&&(je=!0)}je&&s.sort(function(_n,yn){const vr=_n.dts-yn.dts,Mr=_n.pts-yn.pts;return vr||Mr}),M=s[0].dts,ue=s[s.length-1].dts;const ut=ue-M,yt=ut?Math.round(ut/(h-1)):O||e.inputTimeScale/30;if(n){const _n=M-Ye,yn=_n>yt,vr=_n<-1;if((yn||vr)&&(yn?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ci(_n,!0)} ms (${_n}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ci(-_n,!0)} ms (${_n}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!vr||Ye>=s[0].pts||Yi)){M=Ye;const Mr=s[0].pts-_n;if(yn)s[0].dts=M,s[0].pts=Mr;else{let _r=!0;for(let Sr=0;Sr<s.length&&!(s[Sr].dts>Mr&&_r);Sr++){const Bi=s[Sr].pts;if(s[Sr].dts-=_n,s[Sr].pts-=_n,Sr<s.length-1){const Pi=s[Sr+1].pts,es=s[Sr].pts,vs=Pi<=es,ra=Pi<=Bi;_r=vs==ra}}}this.log(`Video: Initial PTS/DTS adjusted: ${ci(Mr,!0)}/${ci(M,!0)}, delta: ${ci(_n,!0)} ms`)}}M=Math.max(0,M);let zt=0,Et=0,Bt=M;for(let _n=0;_n<h;_n++){const yn=s[_n],vr=yn.units,Mr=vr.length;let _r=0;for(let Sr=0;Sr<Mr;Sr++)_r+=vr[Sr].data.length;Et+=_r,zt+=Mr,yn.length=_r,yn.dts<Bt?(yn.dts=Bt,Bt+=yt/4|0||1):Bt=yn.dts,le=Math.min(yn.pts,le),Pe=Math.max(yn.pts,Pe)}ue=s[h-1].dts;const Mt=Et+4*zt+8;let Dt;try{Dt=new Uint8Array(Mt)}catch(_n){this.observer.emit(g.ERROR,g.ERROR,{type:ye.MUX_ERROR,details:W.REMUX_ALLOC_ERROR,fatal:!1,error:_n,bytes:Mt,reason:`fail allocating video mdat ${Mt}`});return}const en=new DataView(Dt.buffer);en.setUint32(0,Mt),Dt.set(_t.types.mdat,4);let En=!1,Bn=Number.POSITIVE_INFINITY,Yn=Number.POSITIVE_INFINITY,Nn=Number.NEGATIVE_INFINITY,pn=Number.NEGATIVE_INFINITY;for(let _n=0;_n<h;_n++){const yn=s[_n],vr=yn.units;let Mr=0;for(let Bi=0,Pi=vr.length;Bi<Pi;Bi++){const es=vr[Bi],vs=es.data,ra=es.data.byteLength;en.setUint32(C,ra),C+=4,Dt.set(vs,C),C+=ra,Mr+=4+ra}let _r;if(_n<h-1)O=s[_n+1].dts-yn.dts,_r=s[_n+1].pts-yn.pts;else{const Bi=this.config,Pi=_n>0?yn.dts-s[_n-1].dts:yt;if(_r=_n>0?yn.pts-s[_n-1].pts:yt,Bi.stretchShortVideoTrack&&this.nextAudioTs!==null){const es=Math.floor(Bi.maxBufferHole*i),vs=(r?le+r*i:this.nextAudioTs+p)-yn.pts;vs>es?(O=vs-Pi,O<0?O=Pi:En=!0,this.log(`It is approximately ${vs/90} ms to the next segment; using duration ${O/90} ms for the last video frame.`)):O=Pi}else O=Pi}const Sr=Math.round(yn.pts-yn.dts);Bn=Math.min(Bn,O),Nn=Math.max(Nn,O),Yn=Math.min(Yn,_r),pn=Math.max(pn,_r),l.push(qs(yn.key,O,Mr,Sr))}if(l.length){if(Yi){if(Yi<70){const _n=l[0].flags;_n.dependsOn=2,_n.isNonSync=0}}else if($s&&pn-Yn<Nn-Bn&&yt/Nn<.025&&l[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let _n=M;for(let yn=0,vr=l.length;yn<vr;yn++){const Mr=_n+l[yn].duration,_r=_n+l[yn].cts;if(yn<vr-1){const Sr=Mr+l[yn+1].cts;l[yn].duration=Sr-_r}else l[yn].duration=yn?l[yn-1].duration:yt;l[yn].cts=0,_n=Mr}}}O=En||!O?yt:O;const Un=ue+O;this.nextVideoTs=v=Un-p,this.videoSampleDuration=O,this.isVideoContiguous=!0;const ar={data1:_t.moof(e.sequenceNumber++,M,S(e,{samples:l})),data2:Dt,startPTS:(le-p)/i,endPTS:(Pe+O-p)/i,startDTS:(M-p)/i,endDTS:v/i,type:"video",hasAudio:!1,hasVideo:!0,nb:l.length,dropped:e.dropped};return e.samples=[],e.dropped=0,ar}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Ns;case"ac3":return Fs;default:return No}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,l=e.samplerate?e.samplerate:s,h=s/l,c=this.getSamplesPerFrame(e),p=c*h,v=this._initPTS,C=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,O=[],M=i!==void 0;let ue=e.samples,le=C?0:8,Pe=this.nextAudioTs||-1;const je=v.baseTime*s/v.timescale,Ye=je+t*s;if(this.isAudioContiguous=n=n||ue.length&&Pe>0&&(r&&Math.abs(Ye-(Pe+je))<9e3||Math.abs(Ui(ue[0].pts,Ye)-(Pe+je))<20*p),ue.forEach(function(pn){pn.pts=Ui(pn.pts,Ye)}),!n||Pe<0){const pn=ue.length;if(ue=ue.filter(Un=>Un.pts>=0),pn!==ue.length&&this.warn(`Removed ${ue.length-pn} of ${pn} samples (initPTS ${je} / ${s})`),!ue.length)return;i===0?Pe=0:r&&!M?Pe=Math.max(0,Ye-je):Pe=ue[0].pts-je}if(e.segmentCodec==="aac"){const pn=this.config.maxAudioFramesDrift;for(let Un=0,Rn=Pe+je;Un<ue.length;Un++){const Wn=ue[Un],ar=Wn.pts,_n=ar-Rn,yn=Math.abs(1e3*_n/s);if(_n<=-pn*p&&M)Un===0&&(this.warn(`Audio frame @ ${(ar/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*_n/s)} ms.`),this.nextAudioTs=Pe=ar-je,Rn=ar);else if(_n>=pn*p&&yn<lo&&M){let vr=Math.round(_n/p);for(Rn=ar-vr*p;Rn<0&&vr&&p;)vr--,Rn+=p;Un===0&&(this.nextAudioTs=Pe=Rn-je),this.warn(`Injecting ${vr} audio frames @ ${((Rn-je)/s).toFixed(3)}s due to ${Math.round(1e3*_n/s)} ms gap.`);for(let Mr=0;Mr<vr;Mr++){let _r=Di.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);_r||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),_r=Wn.unit.subarray()),ue.splice(Un,0,{unit:_r,pts:Rn}),Rn+=p,Un++}}Wn.pts=Rn,Rn+=p}}let ut=null,yt=null,zt,Et=0,Bt=ue.length;for(;Bt--;)Et+=ue[Bt].unit.byteLength;for(let pn=0,Un=ue.length;pn<Un;pn++){const Rn=ue[pn],Wn=Rn.unit;let ar=Rn.pts;if(yt!==null){const yn=O[pn-1];yn.duration=Math.round((ar-yt)/h)}else if(n&&e.segmentCodec==="aac"&&(ar=Pe+je),ut=ar,Et>0){Et+=le;try{zt=new Uint8Array(Et)}catch(yn){this.observer.emit(g.ERROR,g.ERROR,{type:ye.MUX_ERROR,details:W.REMUX_ALLOC_ERROR,fatal:!1,error:yn,bytes:Et,reason:`fail allocating audio mdat ${Et}`});return}C||(new DataView(zt.buffer).setUint32(0,Et),zt.set(_t.types.mdat,4))}else return;zt.set(Wn,le);const _n=Wn.byteLength;le+=_n,O.push(qs(!0,c,_n,0)),yt=ar}const Mt=O.length;if(!Mt)return;const Dt=O[O.length-1];Pe=yt-je,this.nextAudioTs=Pe+h*Dt.duration;const en=C?new Uint8Array(0):_t.moof(e.sequenceNumber++,ut/h,S({},e,{samples:O}));e.samples=[];const En=(ut-je)/s,Bn=this.nextAudioTs/s,Nn={data1:en,data2:zt,startPTS:En,endPTS:Bn,startDTS:En,endDTS:Bn,type:"audio",hasAudio:!0,hasVideo:!1,nb:Mt};return this.isAudioContiguous=!0,Nn}}function Ui(a,e){let t;if(e===null)return a;for(e<a?t=-8589934592:t=8589934592;Math.abs(a-e)>4294967296;)a+=t;return a}function Fo(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function va(a,e,t,n){const r=a.samples.length;if(!r)return;const i=a.inputTimeScale;for(let l=0;l<r;l++){const h=a.samples[l];h.pts=Ui(h.pts-t.baseTime*i/t.timescale,e*i)/i,h.dts=Ui(h.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function Na(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=Ui(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 re{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=De(e);if(t)at(e,t);else{const h=i||s;h!=null&&h.encrypted&&this.warn(`Init segment with encrypted track with has no key ("${h.codec}")!`)}i&&(n=ml(i,N.AUDIO,this)),s&&(r=ml(s,N.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,h;let{initPTS:c,lastEndTime:p}=this;const v={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};d(p)||(p=this.lastEndTime=i||0);const C=t.samples;if(!C.length)return v;const O={initPTS:void 0,timescale:void 0,trackId:void 0};let M=this.initData;if((l=M)!=null&&l.length||(this.generateInitSegment(C),M=this.initData),!((h=M)!=null&&h.length))return this.warn("Failed to generate initSegment."),v;this.emitInitSegment&&(O.tracks=this.initTracks,this.emitInitSegment=!1);const ue=gt(C,M,this),le=M.audio?ue[M.audio.id]:null,Pe=M.video?ue[M.video.id]:null,je=ea(Pe,1/0),Ye=ea(le,1/0),ut=ea(Pe,0,!0),yt=ea(le,0,!0);let zt=i,Et=0;const Bt=le&&(!Pe||!c&&Ye<je||c&&c.trackId===M.audio.id),Mt=Bt?le:Pe;if(Mt){const Rn=Mt.timescale,Wn=Mt.start-i*Rn,ar=Bt?M.audio.id:M.video.id;zt=Mt.start/Rn,Et=Bt?yt-Ye:ut-je,(s||!c)&&(_a(c,zt,i,Et)||Rn!==c.timescale)&&(c&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${Wn/Rn} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${zt-i} (${Wn}/${Rn}) trackId: ${ar}`),c=null,O.initPTS=Wn,O.timescale=Rn,O.trackId=ar)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);c?(O.initPTS=c.baseTime,O.timescale=c.timescale,O.trackId=c.trackId):((!O.timescale||O.trackId===void 0||O.initPTS===void 0)&&(this.warn("Could not set initPTS"),O.initPTS=zt,O.timescale=1,O.trackId=-1),this.initPTS=c={baseTime:O.initPTS,timescale:O.timescale,trackId:O.trackId});const Dt=zt-c.baseTime/c.timescale,en=Dt+Et;Et>0?this.lastEndTime=en:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const En=!!M.audio,Bn=!!M.video;let Yn="";En&&(Yn+="audio"),Bn&&(Yn+="video");const Nn=(M.audio?M.audio.encrypted:!1)||(M.video?M.video.encrypted:!1),pn={data1:C,startPTS:Dt,startDTS:Dt,endPTS:en,endDTS:en,type:Yn,hasAudio:En,hasVideo:Bn,nb:1,dropped:0,encrypted:Nn};v.audio=En&&!Bn?pn:void 0,v.video=Bn?pn:void 0;const Un=Pe==null?void 0:Pe.sampleCount;if(Un){const Rn=Pe.keyFrameIndex,Wn=Rn!==-1;pn.nb=Un,pn.dropped=Rn===0||this.isVideoContiguous?0:Wn?Rn:Un,pn.independent=Wn,pn.firstKeyFrame=Rn,Wn&&Pe.keyFrameStart&&(pn.firstKeyFramePTS=(Pe.keyFrameStart-c.baseTime)/c.timescale),this.isVideoContiguous||(v.independent=Wn),this.isVideoContiguous||(this.isVideoContiguous=Wn),pn.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${Rn}/${Un} dropped: ${pn.dropped} start: ${pn.firstKeyFramePTS||"NA"}`)}return v.initSegment=O,v.id3=va(n,i,c,c),r.samples.length&&(v.text=Na(r,i,c)),v}}function ea(a,e,t=!1){return(a==null?void 0:a.start)!==void 0?(a.start+(t?a.duration:0))/a.timescale:e}function _a(a,e,t,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===N.AUDIO?n==="ec-3"||n==="ac-3"||n==="alac"?n:n==="fLaC"||n==="Opus"?se(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 Ss;try{Ss=self.performance.now.bind(self.performance)}catch(a){Ss=Date.now}const co=[{demux:ft,remux:uo},{demux:ir,remux:ga},{demux:y,remux:ga},{demux:ke,remux:ga}];co.splice(2,0,{demux:V,remux:ga});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=Ss();let s=new Uint8Array(e);const{currentTransmuxState:l,transmuxConfig:h}=this;r&&(this.currentTransmuxState=r);const{contiguous:c,discontinuity:p,trackSwitch:v,accurateTimeOffset:C,timeOffset:O,initSegmentChange:M}=r||l,{audioCodec:ue,videoCodec:le,defaultInitPts:Pe,duration:je,initSegmentData:Ye}=h,ut=Su(s,t);if(ut&&ui(ut.method)){const Bt=this.getDecrypter(),Mt=zi(ut.method);if(Bt.isSync()){let Dt=Bt.softwareDecrypt(s,ut.key.buffer,ut.iv.buffer,Mt);if(n.part>-1){const En=Bt.flush();Dt=En&&En.buffer}if(!Dt)return i.executeEnd=Ss(),$o(n);s=new Uint8Array(Dt)}else return this.asyncResult=!0,this.decryptionPromise=Bt.webCryptoDecrypt(s,ut.key.buffer,ut.iv.buffer,Mt).then(Dt=>{const en=this.push(Dt,null,n);return this.decryptionPromise=null,en}),this.decryptionPromise}const yt=this.needsProbing(p,v);if(yt){const Bt=this.configureTransmuxer(s);if(Bt)return this.logger.warn(`[transmuxer] ${Bt.message}`),this.observer.emit(g.ERROR,g.ERROR,{type:ye.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,fatal:!1,error:Bt,reason:Bt.message}),i.executeEnd=Ss(),$o(n)}(p||v||M||yt)&&this.resetInitSegment(Ye,ue,le,je,t),(p||M||yt)&&this.resetInitialTimestamp(Pe),c||this.resetContiguity();const zt=this.transmux(s,ut,O,C,n);this.asyncResult=Fa(zt);const Et=this.currentTransmuxState;return Et.contiguous=!0,Et.discontinuity=!1,Et.trackSwitch=!1,i.executeEnd=Ss(),zt}flush(e){const t=e.transmuxing;t.executeStart=Ss();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:h,remuxer:c}=this;if(!h||!c){t.executeEnd=Ss();const v=[$o(e)];return this.asyncResult?Promise.resolve(v):v}const p=h.flush(l);return Fa(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:h,timeOffset:c}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===J.MAIN?"level":"track"} ${n.level}`);const p=this.remuxer.remux(r,i,s,l,c,h,!0,this.id);e.push({remuxResult:p,chunkMeta:n}),n.transmuxing.executeEnd=Ss()}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:h}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,l,h,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,C=co.length;v<C;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,h=this.remuxer,c=i.remux,p=i.demux;(!h||!(h 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 hr(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 Fa(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 Tu{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=h=>{const c=h.data,p=this.hls;if(!(!p||!(c!=null&&c.event)||c.instanceNo!==this.instanceNo))switch(c.event){case"init":{var v;const C=(v=this.workerContext)==null?void 0:v.objectURL;C&&self.URL.revokeObjectURL(C);break}case"transmuxComplete":{this.handleTransmuxComplete(c.data);break}case"flush":{this.onFlush(c.data);break}case"workerLog":{p.logger[c.data.logType]&&p.logger[c.data.logType](c.data.message);break}default:{c.data=c.data||{},c.data.frag=this.frag,c.data.part=this.part,c.data.id=this.id,p.trigger(c.event,c.data);break}}},this.onWorkerError=h=>{if(!this.hls)return;const c=new Error(`${h.message} (${h.filename}:${h.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(g.ERROR,{type:ye.OTHER_ERROR,details:W.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=(h,c)=>{c=c||{},c.frag=this.frag||void 0,h===g.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(h,c)};this.observer=new da,this.observer.on(g.FRAG_DECRYPTED,s),this.observer.on(g.ERROR,s);const l=Vt(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const h=this.hls.logger;if(i.workerPath||Ga()){try{i.workerPath?(h.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=Wa(i.workerPath)):(h.log(`injecting Web Worker for "${t}"`),this.workerContext=Do());const{worker:p}=this.workerContext;p.addEventListener("message",this.onWorkerMessage),p.addEventListener("error",this.onWorkerError),p.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:l,id:t,config:ht(i)})}catch(p){h.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=Vt(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:ht(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,h,c,p){var v,C;c.transmuxing.start=self.performance.now();const{instanceNo:O,transmuxer:M}=this,ue=s?s.start:i.start,le=i.decryptdata,Pe=this.frag,je=!(Pe&&i.cc===Pe.cc),Ye=!(Pe&&c.level===Pe.level),ut=Pe?c.sn-Pe.sn:-1,yt=this.part?c.part-this.part.index:-1,zt=ut===0&&c.id>1&&c.id===(Pe==null?void 0:Pe.stats.chunkCount),Et=!Ye&&(ut===1||ut===0&&(yt===1||zt&&yt<=0)),Bt=self.performance.now();(Ye||ut||i.stats.parsing.start===0)&&(i.stats.parsing.start=Bt),s&&(yt||!Et)&&(s.stats.parsing.start=Bt);const Mt=!(Pe&&((v=i.initSegment)==null?void 0:v.url)===((C=Pe.initSegment)==null?void 0:C.url)),Dt=new Tu(je,Et,h,Ye,ue,Mt);if(!Et||je||Mt){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${c.sn}${c.part>-1?" part: "+c.part:""} ${this.id===J.MAIN?"level":"track"}: ${c.level} id: ${c.id}
|
|
discontinuity: ${je}
|
|
trackSwitch: ${Ye}
|
|
contiguous: ${Et}
|
|
accurateTimeOffset: ${h}
|
|
timeOffset: ${ue}
|
|
initSegmentChange: ${Mt}`);const en=new wu(n,r,t,l,p);this.configureTransmuxer(en)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:O,cmd:"demux",data:e,decryptdata:le,chunkMeta:c,state:Dt},e instanceof ArrayBuffer?[e]:[]);else if(M){const en=M.push(e,le,c,Dt);Fa(en)?en.then(En=>{this.handleTransmuxComplete(En)}).catch(En=>{this.transmuxerError(En,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(en)}}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);Fa(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:ye.MEDIA_ERROR,details:W.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason: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 _l=100;class Cu extends Zs{constructor(e,t,n){super(e,t,n,"audio-stream-controller",J.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===J.MAIN){const l=t.cc,h=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===Yt.WAITING_INIT_PTS){const c=this.waitingData;(!c&&!this.loadingParts||c&&c.frag.cc!==l)&&this.syncWithAnchor(t,c==null?void 0:c.frag)}else!this.hls.hasEnoughToStart&&h&&h.cc!==l?(h.abortRequests(),this.syncWithAnchor(t,h)):this.state===Yt.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(),h=In(s,i,l);h&&(this.log(`Syncing with main frag at ${h.start} cc ${h.cc}`),this.startFragRequested=!1,this.nextLoadPosition=h.start,this.resetLoadingState(),this.state===Yt.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=Yt.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(_l),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=Yt.IDLE):this.state=Yt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case Yt.IDLE:this.doTickIdle();break;case Yt.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=Yt.WAITING_INIT_PTS}break}case Yt.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case Yt.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=Yt.FRAG_LOADING;const l=r.flush().buffer,h={frag:t,part:n,payload:l,networkDetails:null};this._handleFragmentLoadProgress(h),i&&super._handleFragmentLoadComplete(h)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=Yt.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],h=l.details;if(!h||this.waitForLive(l)||this.waitForCdnTuneIn(h)){this.state=Yt.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,N.AUDIO,J.AUDIO));const p=this.getFwdBufferInfo(c,J.AUDIO);if(p===null)return;if(!this.switchingTrack&&this._streamEnded(p,h)){t.trigger(g.BUFFER_EOS,{type:"audio"}),this.state=Yt.ENDED;return}const v=p.len,C=t.maxBufferLength,O=h.fragments,M=O[0].start,ue=this.getLoadPosition(),le=this.flushing?ue:p.end;if(this.switchingTrack&&r){const Ye=ue;h.PTSKnown&&Ye<M&&(p.end>M||p.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=M+.05)}if(v>=C&&!this.switchingTrack&&le<O[O.length-1].start)return;let Pe=this.getNextFragment(le,h);if(Pe&&this.isLoopLoading(Pe,le)&&(Pe=this.getNextFragmentLoopLoading(Pe,h,p,J.MAIN,C)),!Pe){this.bufferFlushed=!0;return}let je=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&je&&Ie(Pe)&&!Pe.endList&&(!h.live||!this.loadingParts&&le<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(je)===dr.OK&&(this.mainFragLoading=je=null),je&&Ie(je))){if(Pe.start>je.end){const ut=this.fragmentTracker.getFragAtPos(le,J.MAIN);ut&&ut.end>je.end&&(je=ut,this.mainFragLoading={frag:ut,targetBufferTime:null})}if(Pe.start>je.end)return}this.loadFragment(Pe,l,le)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new bn(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!==Yt.STOPPED&&(this.setInterval(_l),this.state=Yt.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:h}=t;if(!r){this.warn(`Audio tracks reset while loading track ${s} "${h.name}" of "${l}"`);return}const c=this.mainDetails;if(!c||i.endCC>c.endCC||c.expired){this.cachedTrackLoadedData=t,this.state!==Yt.STOPPED&&(this.state=Yt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${h.name}" of "${l}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const p=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 C;v=this.alignPlaylists(i,p.details,(C=this.levelLastLoaded)==null?void 0:C.details)}i.alignedSliding||(Ls(i,c),i.alignedSliding||ks(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===Yt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=Yt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{config:s,trackId:l,levels:h}=this;if(!h){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const c=h[l];if(!c){this.warn("Audio track is undefined on fragment load progress");return}const p=c.details;if(!p){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const v=s.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let C=this.transmuxer;C||(C=this.transmuxer=new vl(this.hls,J.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const O=this.initPTS[n.cc],M=(t=n.initSegment)==null?void 0:t.data;if(O!==void 0){const le=r?r.index:-1,Pe=le!==-1,je=new mi(n.level,n.sn,n.stats.chunkCount,i.byteLength,le,Pe);C.push(i,M,v,"",n,r,p.totalduration,!1,je,O)}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:ue}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new Ca,complete:!1};ue.push(new Uint8Array(i)),this.state!==Yt.STOPPED&&(this.state=Yt.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===J.MAIN&&Ie(t.frag)&&(this.mainFragLoading=t,this.state===Yt.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==J.AUDIO){!this.audioOnly&&n.type===J.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(Ie(n)){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(g.AUDIO_TRACK_SWITCHED,A({},i)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=Yt.ERROR;return}switch(t.details){case W.FRAG_GAP:case W.FRAG_PARSING_ERROR:case W.FRAG_DECRYPT_ERROR:case W.FRAG_LOAD_ERROR:case W.FRAG_LOAD_TIMEOUT:case W.KEY_LOAD_ERROR:case W.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(J.AUDIO,t);break;case W.AUDIO_TRACK_LOAD_ERROR:case W.AUDIO_TRACK_LOAD_TIMEOUT:case W.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Yt.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===ne.AUDIO_TRACK&&(this.state=Yt.IDLE);break;case W.BUFFER_ADD_CODEC_ERROR:case W.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case W.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case W.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==N.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==N.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Yt.ENDED&&(this.state=Yt.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,J.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:h,part:c,level:p}=l,{details:v}=p,{audio:C,text:O,id3:M,initSegment:ue}=i;if(this.fragContextChanged(h)||!v){this.fragmentTracker.removeFragment(h);return}if(this.state=Yt.PARSING,this.switchingTrack&&C&&this.completeAudioSwitch(this.switchingTrack),ue!=null&&ue.tracks){const le=h.initSegment||h;if(this.unhandledEncryptionError(ue,h))return;this._bufferInitSegment(p,ue.tracks,le,s),r.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:le,id:n,tracks:ue.tracks})}if(C){const{startPTS:le,endPTS:Pe,startDTS:je,endDTS:Ye}=C;c&&(c.elementaryStreams[N.AUDIO]={startPTS:le,endPTS:Pe,startDTS:je,endDTS:Ye}),h.setElementaryStreamInfo(N.AUDIO,le,Pe,je,Ye),this.bufferFragmentData(C,h,c,s)}if(M!=null&&(t=M.samples)!=null&&t.length){const le=S({id:n,frag:h,details:v},M);r.trigger(g.FRAG_PARSING_METADATA,le)}if(O){const le=S({id:n,frag:h,details:v},O);r.trigger(g.FRAG_PARSING_USERDATA,le)}}_bufferInitSegment(e,t,n,r){if(this.state!==Yt.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=J.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 h={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:l};this.hls.trigger(g.BUFFER_APPENDING,h)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===dr.NOT_LOADED||r===dr.PARTIAL){var i;if(!Ie(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=Yt.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&ks(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;dn({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l},e,cn)||(Xn(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,A({},e))}}class Uo extends re{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 h;try{h=new self.URL(l.URI,t.url).href}catch(c){this.warn(`Could not construct new URL for Rendition Report: ${c}`),h=l.URI||""}if(h===e){i=s;break}else h===e.substring(0,h.length)&&(i=s)}if(i!==-1){const s=r[i],l=parseInt(s["LAST-MSN"])||t.lastPartSn;let h=parseInt(s["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){const p=Math.min(t.age-t.partTarget,t.targetduration);h>=0&&p>t.partTarget&&(h+=1)}const c=n&&Fn(n);return new Pn(l,h>=0?h:void 0,c)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(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 h=this.hls.config.timelineOffset;if(h!==r.appliedTimelineOffset){const p=Math.max(h||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){ua(n,r,this);const je=r.playlistParsingError;if(je){this.warn(je);const Ye=this.hls;if(!Ye.config.ignorePlaylistParsingErrors){var c;const{networkDetails:ut}=t;Ye.trigger(g.ERROR,{type:ye.NETWORK_ERROR,details:W.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:je,reason:je.message,level:t.level||void 0,parent:(c=r.fragments[0])==null?void 0:c.type,networkDetails:ut,stats:i});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=i.loading.start);const v=this.hls.mainForwardBufferInfo,C=v?v.end-v.len:0,O=(r.edge-C)*1e3,M=wr(r,O);if(r.requestScheduled+M<s?r.requestScheduled=s:r.requestScheduled+=M,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let ue,le,Pe;if(r.canBlockReload&&r.endSN&&r.advanced){const je=this.hls.config.lowLatencyMode,Ye=r.lastPartSn,ut=r.endSN,yt=r.lastPartIndex,zt=yt!==-1,Et=Ye===ut;zt?Et?(le=ut+1,Pe=je?0:yt):(le=Ye,Pe=je?yt+1:r.maxPartIndex):le=ut+1;const Bt=r.age,Mt=Bt+r.ageHeader;let Dt=Math.min(Mt-r.partTarget,r.targetduration*1.5);if(Dt>0){if(Mt>r.targetduration*3)this.log(`Playlist last advanced ${Bt.toFixed(2)}s ago. Omitting segment and part directives.`),le=void 0,Pe=void 0;else if(n!=null&&n.tuneInGoal&&Mt-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${Dt} with playlist age: ${r.age}`),Dt=0;else{const en=Math.floor(Dt/r.targetduration);if(le+=en,Pe!==void 0){const En=Math.round(Dt%r.targetduration/r.partTarget);Pe+=En}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${Bt.toFixed(2)}s goal: ${Dt} skip sn ${en} to part ${Pe}`)}r.tuneInGoal=Dt}if(ue=this.getDeliveryDirectives(r,t.deliveryDirectives,le,Pe),je||!Et){r.requestScheduled=s,this.loadingPlaylist(p,ue);return}}else(r.canBlockReload||r.canSkipUntil)&&(ue=this.getDeliveryDirectives(r,t.deliveryDirectives,le,Pe));ue&&le!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max(M-l*2,M/2)),this.scheduleLoading(p,ue,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=Fn(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=gn.No),new Pn(n,r,i)}checkRetry(e){const t=e.details,n=Kn(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:l}=r||{},h=!!r&&!!l&&(i===Mn.RetryRequest||!r.resolved&&i===Mn.SendAlternateToPenaltyBox);if(h){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=er(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 h}}function yl(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!$a(a[t].attrs,e[t].attrs))return!1;return!0}function $a(a,e,t){const 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 Au extends Uo{constructor(e){super(e,"audio-track-controller"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(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(C=>!n||n.indexOf(C.groupId)!==-1);if(l.length)this.selectDefaultTrack&&!l.some(C=>C.default)&&(this.selectDefaultTrack=!1),l.forEach((C,O)=>{C.id=O});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=l;const h=this.hls.config.audioPreference;if(!i&&h){const C=tn(h,l,cn);if(C>-1)i=l[C];else{const O=tn(h,this.tracks);i=this.tracks[O]}}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 C=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(C.message),this.hls.trigger(g.ERROR,{type:ye.MEDIA_ERROR,details:W.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:C})}}}onError(e,t){t.fatal||!t.context||t.context.type===ne.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&&dn(e,r,cn))return r;const i=tn(e,this.tracksInGroup,cn);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=an(e,t.levels,n,s,cn);if(l===-1)return null;t.nextLoadLevel=l}if(e.channels||e.audioCodec){const s=tn(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,A({},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||dn(e,r,cn)))return n}if(e){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:h}=e;for(let c=0;c<t.length;c++){const p=t[c];if(dn({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:h},p,cn))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)&&Xn(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 re{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=Fe(Oe(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=Oe(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 h=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||h&&s instanceof h,El(n),Lu(n,l),n.load()}catch(h){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: ${ht(n,(h,c)=>h==="initSegment"?void 0:c)};
|
|
transfer tracks: ${ht(r,(h,c)=>h==="initSegment"?void 0:c)}}`),!Ne(r,n)){t.mediaSource=null,t.tracks=void 0;const h=e.currentTime,c=this.details,p=Math.max(h,(c==null?void 0:c.fragments[0].start)||0);if(p-h>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${h} -> ${p}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${p} currentTime: ${h}`),this.onMediaDetaching(g.MEDIA_DETACHING,{}),this.onMediaAttaching(g.MEDIA_ATTACHING,t),e.currentTime=p;return}this.transferData=void 0,i.forEach(h=>{const c=h,p=r[c];if(p){const v=p.buffer;if(v){const C=this.fragmentTracker,O=p.id;if(C.hasFragments(O)||C.hasParts(O)){const le=Vn.getBuffered(v);C.detectEvictedFragments(c,le,O,null,!0)}const M=jo(c),ue=[c,v];this.sourceBuffers[M]=ue,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 h=i.sourceBuffers;for(let c=h.length;c--;)l&&h[c].abort(),i.removeSourceBuffer(h[c]);l&&i.endOfStream()}catch(h){this.warn(`onMediaDetaching: ${h.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(i.removeEventListener("startstreaming",this._onStartStreaming),i.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}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(h=>!r[h]);if(s||l){this.warn(`Unsupported transition between "${Object.keys(r)}" and "${i}" SourceBuffers`);return}i.forEach(h=>{var c,p;const v=t[h],{id:C,codec:O,levelCodec:M,container:ue,metadata:le,supplemental:Pe}=v;let je=r[h];const Ye=(c=this.transferData)==null||(c=c.tracks)==null?void 0:c[h],ut=Ye!=null&&Ye.buffer?Ye:je,yt=(ut==null?void 0:ut.pendingCodec)||(ut==null?void 0:ut.codec),zt=ut==null?void 0:ut.levelCodec;je||(je=r[h]={buffer:void 0,listeners:[],codec:O,supplemental:Pe,container:ue,levelCodec:M,metadata:le,id:C});const Et=Ot(yt,zt),Bt=Et==null?void 0:Et.replace(bl,"$1");let Mt=Ot(O,M);const Dt=(p=Mt)==null?void 0:p.replace(bl,"$1");Mt&&Et&&Bt!==Dt&&(h.slice(0,5)==="audio"&&(Mt=se(Mt,this.appendSource)),this.log(`switching codec ${yt} to ${Mt}`),Mt!==(je.pendingCodec||je.codec)&&(je.pendingCodec=Mt),je.container=ue,this.appendChangeType(h,ue,Mt))}),(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,J.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var l;const h=this.tracks.video;(this.lastVideoAppendEnd>r||h!=null&&h.buffer&&Vn.isBuffered(h.buffer,r)||((l=this.fragmentTracker.getAppendedFrag(r,J.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:h,chunkMeta:c,offset:p}=t,v=c.buffering[i],{sn:C,cc:O}=l,M=self.performance.now();v.start=M;const ue=l.stats.buffering,le=h?h.stats.buffering:null;ue.start===0&&(ue.start=M),le&&le.start===0&&(le.start=M);const Pe=n.audio;let je=!1;i==="audio"&&(Pe==null?void 0:Pe.container)==="audio/mpeg"&&(je=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const Ye=n.video,ut=Ye==null?void 0:Ye.buffer;if(ut&&C!=="initSegment"){const Et=h||l,Bt=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(Ye.ending||Ye.ended)){const Dt=Et.start+Et.duration*.05,en=ut.buffered,En=this.currentOp("video");!en.length&&!En?this.blockAudio(Et):!En&&!Vn.isBuffered(ut,Dt)&&this.lastVideoAppendEnd<Dt&&this.blockAudio(Et)}else if(i==="video"){const Mt=Et.end;if(Bt){const Dt=Bt.frag.start;(Mt>Dt||Mt<this.lastVideoAppendEnd||Vn.isBuffered(ut,Dt))&&this.unblockAudio()}this.lastVideoAppendEnd=Mt}}const yt=(h||l).start,zt={label:`append-${i}`,execute:()=>{var Et;v.executeStart=self.performance.now();const Bt=(Et=this.tracks[i])==null?void 0:Et.buffer;Bt&&(je?this.updateTimestampOffset(Bt,yt,.1,i,C,O):p!==void 0&&d(p)&&this.updateTimestampOffset(Bt,p,1e-6,i,C,O)),this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const Et=self.performance.now();v.executeEnd=v.end=Et,ue.first===0&&(ue.first=Et),le&&le.first===0&&(le.first=Et);const Bt={};this.sourceBuffers.forEach(([Mt,Dt])=>{Mt&&(Bt[Mt]=Vn.getBuffered(Dt))}),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:h,chunkMeta:c,parent:l.type,timeRanges:Bt})},onError:Et=>{var Bt;const Mt={type:ye.MEDIA_ERROR,parent:l.type,details:W.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:l,part:h,chunkMeta:c,error:Et,err:Et,fatal:!1},Dt=(Bt=this.media)==null?void 0:Bt.error;if(Et.code===DOMException.QUOTA_EXCEEDED_ERR||Et.name=="QuotaExceededError"||"quota"in Et)Mt.details=W.BUFFER_FULL_ERROR;else if(Et.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!Dt)Mt.errorAction=cr(!0);else if(Et.name===xl&&this.sourceBufferCount===0)Mt.errorAction=cr(!0);else{const en=++this.appendErrors[i];this.warn(`Failed ${en}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${Dt||"no media error"})`),(en>=this.hls.config.appendErrorMaxRetry||Dt)&&(Mt.fatal=!0)}this.hls.trigger(g.ERROR,Mt)}};this.log(`queuing "${i}" append sn: ${C}${h?" p: "+h.index:""} of ${l.type===J.MAIN?"level":"track"} ${l.level} cc: ${O}`),this.append(zt,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[N.AUDIOVIDEO]?i.push("audiovideo"):(s[N.AUDIO]&&i.push("audio"),s[N.VIDEO]&&i.push("video"));const l=()=>{const h=self.performance.now();n.stats.buffering.end=h,r&&(r.stats.buffering.end=h);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(h=>{this.warn(`Fragment buffered callback ${h}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{if(e){const t=this.tracks[e];if(t)return!t.ended||t.ending}return!1})}onBufferEos(e,t){var 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===W.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;d(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(d(l)&&l>=0){const c=Math.max(l,s),p=Math.floor(i/s)*s-c;this.flushBackBuffer(i,s,p)}const h=r.frontBufferFlushThreshold;if(d(h)&&h>0){const c=Math.max(r.maxBufferLength,h),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=Vn.getBuffered(i);if(l.length>0&&n>l.start(0)){var s;this.hls.trigger(g.BACK_BUFFER_REACHED,{bufferEnd:n});const h=this.tracks[r];if((s=this.details)!=null&&s.live)this.hls.trigger(g.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(h!=null&&h.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=Vn.getBuffered(i),l=s.length;if(l<2)return;const h=s.start(l-1),c=s.end(l-1);if(n>h||e>=h&&e<=c)return;this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:h,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 d(i)?{duration:i}:null;const s=this.media.duration,l=d(n.duration)?n.duration:0;return r>l&&r>s||!d(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(d(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}) ${ht(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:ye.MEDIA_ERROR,details:W.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 h=this.getTrackCodec(l,s),c=`${l.container};codecs=${h}`;l.codec=h,this.log(`creating sourceBuffer(${c})${this.currentOp(s)?" Queued":""} ${ht(l)}`);try{const p=n.addSourceBuffer(c),v=jo(s),C=[s,p];t[v]=C,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:ye.MEDIA_ERROR,details:W.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")&&Me(n,"video")&&(r=it(r,n));const i=Ot(r,e.levelCodec);return i?t.slice(0,5)==="audio"?se(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:ye.MEDIA_ERROR,details:W.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 h=d(r.duration)?r.duration:1/0,c=d(i.duration)?i.duration:1/0,p=Math.max(0,t),v=Math.min(n,h,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&&d(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,h)=>h?l.width!==h.width||l.height!==h.height:!0;let i=e.length-1;const s=Math.max(t,n);for(let l=0;l<e.length;l+=1){const h=e[l];if((h.width>=s||h.height>=s)&&r(h,e[l+1])){i=l;break}}return i}}const Ki={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},ku={HLS:"h"};class ms{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof ms?n:new ms(n))),this.value=e,this.params=t}}const Pu="Dict";function Ou(a){return Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":typeof a=="object"?JSON.stringify(a):String(a)}function Mu(a,e,t,n){return new Error(`failed to ${a} "${Ou(e)}" as ${t}`,{cause:n})}function ps(a,e,t){return Mu("serialize",a,e,t)}class Sl{constructor(e){this.description=e}}const wl="Bare Item",Bu="Boolean";function Nu(a){if(typeof a!="boolean")throw ps(a,Bu);return a?"?1":"?0"}function Fu(a){return btoa(String.fromCharCode(...a))}const $u="Byte Sequence";function Uu(a){if(ArrayBuffer.isView(a)===!1)throw ps(a,$u);return`:${Fu(a)}:`}const zu="Integer";function ju(a){return a<-999999999999999||999999999999999<a}function Tl(a){if(ju(a))throw ps(a,zu);return a.toString()}function Hu(a){return`@${Tl(a.getTime()/1e3)}`}function Cl(a,e){if(a<0)return-Cl(-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=Cl(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw ps(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 ps(a,Wu);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Yu(a){return a.description||a.toString().slice(7,-1)}const Xu="Token";function Al(a){const e=Yu(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw ps(e,Xu);return e}function Ko(a){switch(typeof a){case"number":if(!d(a))throw ps(a,wl);return Number.isInteger(a)?Tl(a):Gu(a);case"string":return Zu(a);case"symbol":return Al(a);case"boolean":return Nu(a);case"object":if(a instanceof Date)return Hu(a);if(a instanceof Uint8Array)return Uu(a);if(a instanceof Sl)return Al(a);default:throw ps(a,wl)}}const Qu="Key";function Go(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw ps(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 ms?`${Ko(a.value)}${Wo(a.params)}`:Ko(a)}function Ju(a){return`(${a.value.map(Dl).join(" ")})${Wo(a.params)}`}function qu(a,e={whitespace:!0}){if(typeof a!="object"||a==null)throw ps(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 ms||(i=new ms(i));let s=Go(r);return i.value===!0?s+=Wo(i.params):(s+="=",Array.isArray(i.value)?s+=Ju(i):s+=Dl(i)),s}).join(`,${n}`)}function Il(a,e){return qu(a,e)}const gs="CMCD-Object",di="CMCD-Request",ta="CMCD-Session",Us="CMCD-Status",ec={br:gs,ab:gs,d:gs,ot:gs,tb:gs,tpb:gs,lb:gs,tab:gs,lab:gs,url:gs,pb:di,bl:di,tbl:di,dl:di,ltc:di,mtp:di,nor:di,nrr:di,rc:di,sn:di,sta:di,su:di,ttfb:di,ttfbb:di,ttlb:di,cmsdd:di,cmsds:di,smrt:di,df:di,cs:di,ts:di,cid:ta,pr:ta,sf:ta,sid:ta,st:ta,v:ta,msd:ta,bs:Us,bsd:Us,cdn:Us,rtp:Us,bg:Us,pt:Us,ec:Us,e:Us},tc={REQUEST:di};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 h=ec[s]||r[s]||tc.REQUEST,c=(l=i[h])!==null&&l!==void 0?l:i[h]={};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"?d(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 ms&&typeof a.value=="string"?new ms(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 ms&&typeof a.value=="string"?t=new ms([a]):typeof a=="string"&&(t=[a])),Vo(t,e)},rtp:fo,tb:ho},Ll="request",kl="response",Zo=["ab","bg","bl","br","bs","bsd","cdn","cid","cs","df","ec","lab","lb","ltc","msd","mtp","pb","pr","pt","sf","sid","sn","st","sta","tab","tb","tbl","tpb","ts","v"],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={[kl]:fc,[Rl]:cc,[Ll]:dc};function Ol(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 h=r===kl||r===Rl;h&&!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 C=a[v];const O=c[v];if(typeof O=="function"&&(C=O(C,p)),v==="v"){if(n===1)return;C=n}v=="pr"&&C===1||(h&&v==="ts"&&!d(C)&&(C=Date.now()),sc(C)&&(ic(v)&&typeof C=="string"&&(C=new Sl(C)),t[v]=C))}),t}function vc(a,e={}){const t={};if(!a)return t;const n=Ol(a,e),r=rc(n,e==null?void 0:e.customHeaderMap);return Object.entries(r).reduce((i,[s,l])=>{const h=Il(l,{whitespace:!1});return h&&(i[s]=h),i},t)}function _c(a,e,t){return S(a,vc(e,t))}const yc="CMCD";function bc(a,e={}){return a?Il(Ol(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`${yc}=${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:Ki.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],h=this.getObjectType(i),c={d:(s||i).duration*1e3,ot:h};(h===Ki.VIDEO||h===Ki.AUDIO||h==Ki.MUXED)&&(c.br=l.bitrate/1e3,c.tb=this.getTopBandwidth(h)/1e3,c.bl=this.getBufferLength(h));const p=s?this.getNextPart(s):this.getNextFrag(i);p!=null&&p.url&&p.url!==i.url&&(c.nor=p.url),this.apply(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:ku.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){S(t,this.createData());const n=t.ot===Ki.INIT||t.ot===Ki.VIDEO||t.ot===Ki.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={}),_c(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 h=i[l];if(h.index===n&&h.fragment.sn===s)return i[l+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Ki.TIMED_TEXT;if(e.sn==="initSegment")return Ki.INIT;if(t==="audio")return Ki.AUDIO;if(t==="main")return this.hls.audioTracks.length?Ki.VIDEO:Ki.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===Ki.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===Ki.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:Vn.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 Tc=3e5;class Cc extends re{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)===Mn.SendAlternateToPenaltyBox&&n.flags===Ln.MoveAllAlternatesMatchingHost){const r=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:l,pathwayId:h,type:c}=t.context;l&&r?s=this.getPathwayForGroupId(l,c,s):h&&(s=h)}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===W.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: ${ht(i)} penalized: ${ht(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]>Tc&&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,h=this.hls.levels[l];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,Ti(t),this.hls.trigger(g.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[l];h&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==h.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==h.bitrate&&this.log(`Unstable Pathways change from bitrate ${h.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=l);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let i=0;i<r.length;i++)if(t===ne.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===ne.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":h}=i;if(t.some(p=>p.pathwayId===s))return;const c=this.getLevelsForPathway(l).map(p=>{const v=new Gn(p.attrs);v["PATHWAY-ID"]=s;const C=v.AUDIO&&`${v.AUDIO}_clone_${s}`,O=v.SUBTITLES&&`${v.SUBTITLES}_clone_${s}`;C&&(n[v.AUDIO]=C,v.AUDIO=C),O&&(r[v.SUBTITLES]=O,v.SUBTITLES=O);const M=Nl(p.uri,v["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",h),ue=new bn({attrs:v,audioCodec:p.audioCodec,bitrate:p.bitrate,height:p.height,name:p.name,url:M,videoCodec:p.videoCodec,width:p.width});if(p.audioGroups)for(let le=1;le<p.audioGroups.length;le++)ue.addGroupId("audio",`${p.audioGroups[le]}_clone_${s}`);if(p.subtitleGroups)for(let le=1;le<p.subtitleGroups.length;le++)ue.addGroupId("text",`${p.subtitleGroups[le]}_clone_${s}`);return ue});t.push(...c),Bl(this.audioTracks,n,h,s),Bl(this.subtitleTracks,r,h,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||{},h={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:(p,v,C,O)=>{this.log(`Loaded steering manifest: "${r}"`);const M=p.data;if((M==null?void 0:M.VERSION)!==1){this.log(`Steering VERSION ${M.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=M.TTL;const{"RELOAD-URI":ue,"PATHWAY-CLONES":le,"PATHWAY-PRIORITY":Pe}=M;if(ue)try{this.uri=new self.URL(ue,r).href}catch(Ye){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${ue}`);return}this.scheduleRefresh(this.uri||C.url),le&&this.clonePathways(le);const je={steeringManifest:M,url:r.toString()};this.hls.trigger(g.STEERING_MANIFEST_LOADED,je),Pe&&this.updatePathwayPriority(Pe)},onError:(p,v,C,O)=>{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 M=this.timeToLoad*1e3;if(p.code===429){const ue=this.loader;if(typeof(ue==null?void 0:ue.getResponseHeader)=="function"){const le=ue.getResponseHeader("Retry-After");le&&(M=parseFloat(le)*1e3)}this.log(`Steering manifest ${v.url} rate limited`);return}this.scheduleRefresh(this.uri||v.url,M)},onTimeout:(p,v,C)=>{this.log(`Timeout loading steering manifest (${v.url})`),this.scheduleRefresh(this.uri||v.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,h,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 Bl(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 Gn(l.attrs),l.url=l.attrs.URI=Nl(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 Nl(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 h=new self.URL(a);return r&&!l&&(h.host=r),i&&Object.keys(i).sort().forEach(c=>{c&&h.searchParams.set(c,i[c])}),h.href}class ya extends re{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.mediaResolved=void 0,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.mediaKeys=null,this.setMediaKeysQueue=ya.CDMCleanupPromise?[ya.CDMCleanupPromise]:[],this.bannedKeyIds={},this.onMediaEncrypted=t=>{const{initDataType: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=Ri(this.config));const l=s.map(Jr).filter(h=>!!h);this.keyFormatPromise=this.getKeyFormatPromise(l)}this.keyFormatPromise.then(s=>{const l=Ei(s);if(n!=="sinf"||l!==qn.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${n}" for selected key-system ${l}`);return}let h;try{const O=Ue(new Uint8Array(r)),M=Gi(JSON.parse(O).sinf),ue=dt(M);if(!ue)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");h=new Uint8Array(ue.subarray(8,24))}catch(O){this.warn(`${i} Failed to parse sinf: ${O}`);return}const c=K(h),{keyIdToKeySessionPromise:p,mediaKeySessions:v}=this;let C=p[c];for(let O=0;O<v.length;O++){const M=v[O],ue=M.decryptdata;if(!ue.keyId)continue;const le=K(ue.keyId);if(ii(h,ue.keyId)||ue.uri.replace(/-/g,"").indexOf(c)!==-1){if(C=p[le],!C)continue;if(ue.pssh)break;delete p[le],ue.pssh=new Uint8Array(r),ue.keyId=h,C=p[c]=C.then(()=>this.generateRequestWithPreferredKeySession(M,n,r,"encrypted-event-key-match")),C.catch(Pe=>this.handleError(Pe));break}}C||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===qn.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,h)=>!!s&&h.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 h=c=>{const p=c.shift();this.getMediaKeysPromise(p,r,i).then(v=>s({keySystem:p,mediaKeys:v})).catch(v=>{c.length?h(c):v instanceof Xi?l(v):l(new Xi({type:ye.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_ACCESS,error:v,fatal:!0},v.message))})};h(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return gr===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=tr(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: ${ht(i)}`),l=this.requestMediaKeySystemAccess(e,i);const h=s=this.keySystemAccessPromises[e]={keySystemAccess:l};return l.catch(c=>{this.log(`Failed to obtain access to key-system "${e}": ${c}`)}),l.then(c=>{this.log(`Access for key-system "${c.keySystem}" obtained`);const p=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const v=h.mediaKeys=c.createMediaKeys().then(C=>(this.log(`Media-keys created for "${e}"`),h.hasMediaKeys=!0,p.then(O=>O?this.setMediaKeysServerCertificate(C,e,O):C)));return v.catch(C=>{this.error(`Failed to create media-keys for "${e}"}: ${C}`)}),v})}return l.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${K(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 ${K(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})=>Jr(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=Jr(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=Ri(this.config),n=e.map(Ei).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=Ac(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=Fl(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:h,mediaKeys:c})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(h,c).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:h,mediaKeys:c,decryptdata:t}))))).then(h=>{const c="cenc",p=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(h,c,p,"playlist-key")});return l.catch(h=>this.handleError(h,e.frag)),this.keyIdToKeySessionPromise[n]=l,l}return s.catch(l=>{if(l instanceof Xi){const h=A({},l.data);this.getKeyStatus(t)==="internal-error"&&(h.decryptdata=t);const c=new Xi(h,l.message);this.handleError(c,e.frag)}}),s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e,t){if(this.hls)if(e instanceof Xi){t&&(e.data.frag=t);const n=e.data.decryptdata;this.error(`${e.message}${n?` (${K(n.keyId||[])})`:""}`),this.hls.trigger(g.ERROR,e.data)}else this.error(e.message),this.hls.trigger(g.ERROR,{type:ye.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}getKeySystemForKeyPromise(e){const t=po(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=Ei(e.keyFormat),i=r?[r]:Ri(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=Ri(this.config)),e.length===0)throw new Xi({type:ye.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${ht({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 M=s.call(this.hls,t,n,e);if(!M)throw new Error("Invalid response from configured generateRequest filter");t=M.initDataType,n=M.initData?M.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(M){if(this.warn(M.message),this.hls&&this.hls.config.debug)throw M}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const l=po(e.decryptdata),h=e.decryptdata.uri;this.log(`Generating key-session request for "${r}" keyId: ${l} URI: ${h} (init data type: ${t} length: ${n.byteLength})`);const c=new da,p=e._onmessage=M=>{const ue=e.mediaKeysSession;if(!ue){c.emit("error",new Error("invalid state"));return}const{messageType:le,message:Pe}=M;this.log(`"${le}" message event for session "${ue.sessionId}" message size: ${Pe.byteLength}`),le==="license-request"||le==="license-renewal"?this.renewLicense(e,Pe).catch(je=>{c.eventNames().length?c.emit("error",je):this.handleError(je)}):le==="license-release"?e.keySystem===qn.FAIRPLAY&&this.updateKeySession(e,Mi("acknowledged")).then(()=>this.removeSession(e)).catch(je=>this.handleError(je)):this.warn(`unhandled media key message type "${le}"`)},v=(M,ue)=>{ue.keyStatus=M;let le;M.startsWith("usable")?c.emit("resolved"):M==="internal-error"||M==="output-restricted"||M==="output-downscaled"?le=Fl(M,ue.decryptdata):M==="expired"?le=new Error(`key expired (keyId: ${l})`):M==="released"?le=new Error("key released"):M==="status-pending"||this.warn(`unhandled key status change "${M}" (keyId: ${l})`),le&&(c.eventNames().length?c.emit("error",le):this.handleError(le))},C=e._onkeystatuseschange=M=>{if(!e.mediaKeysSession){c.emit("error",new Error("invalid state"));return}const le=this.getKeyStatuses(e);if(!Object.keys(le).some(ut=>le[ut]!=="status-pending"))return;if(le[l]==="expired"){this.log(`Expired key ${ht(le)} in key-session "${e.mediaKeysSession.sessionId}"`),this.renewKeySession(e);return}let je=le[l];if(je)v(je,e);else{var Ye;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(Ye=e.keyStatusTimeouts)[l]||(Ye[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`),je="internal-error",v(je,e)},1e3)),this.log(`No status for keyId ${l} (${ht(le)}).`)}};Ci(e.mediaKeysSession,"message",p),Ci(e.mediaKeysSession,"keystatuseschange",C);const O=new Promise((M,ue)=>{c.on("error",ue),c.on("resolved",M)});return e.mediaKeysSession.generateRequest(t,n).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${l} URI: ${h}`)}).catch(M=>{throw new Xi({type:ye.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_NO_SESSION,error:M,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${M}`)}).then(()=>O).catch(M=>(c.removeAllListeners(),this.removeSession(e).then(()=>{throw M}))).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);if(e.keySystem===qn.PLAYREADY&&i.length===16){const l=K(i);t[l]=n,Cn(i)}const s=K(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 h={responseType:"arraybuffer",url:i},c=t.certLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},v={onSuccess:(C,O,M,ue)=>{s(C.data)},onError:(C,O,M,ue)=>{l(new Xi({type:ye.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:M,response:A({url:h.url,data:void 0},C)},`"${e}" certificate request failed (${i}). Status: ${C.code} (${C.text})`))},onTimeout:(C,O,M)=>{l(new Xi({type:ye.KEY_SYSTEM_ERROR,details:W.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:M,response:{url:h.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(C,O,M)=>{l(new Error("aborted"))}};r.load(h,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 Xi({type:ye.KEY_SYSTEM_ERROR,details:W.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 Xi({type:ye.KEY_SYSTEM_ERROR,details:W.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,C=i.length;v<C;v++){var s,l;p=i[v];const O=(s=p.querySelector("name"))==null?void 0:s.textContent,M=(l=p.querySelector("value"))==null?void 0:l.textContent;O&&M&&e.setRequestHeader(O,M)}}const h=r.querySelector("Challenge"),c=h==null?void 0:h.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return Mi(atob(c))}setupLicenseXHR(e,t,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 h=l.response;this.log(`License received ${h instanceof ArrayBuffer?h.byteLength:h}`);const c=this.config.licenseResponseCallback;if(c)try{h=c.call(this.hls,l,s,e)}catch(p){this.error(p)}r(h)}else{const h=n.errorRetry,c=h?h.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||l.status>=400&&l.status<500)i(new Xi({type:ye.KEY_SYSTEM_ERROR,details:W.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:h,licenseChallenge:c})=>{e.keySystem==qn.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(h,c)),h.send(c)}).catch(i)})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,Ci(n,"encrypted",this.onMediaEncrypted),Ci(n,"waitingforkey",this.onWaitingForKey);const r=this.mediaResolved;r?r():this.mediaKeys=n.mediaKeys}onMediaDetached(){const e=this.media;e&&(ki(e,"encrypted",this.onMediaEncrypted),ki(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},this.bannedKeyIds={};const t=this.mediaResolved;if(t&&t(),!this.mediaKeys&&!this.mediaKeySessions.length)return;const n=this.media,r=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,si.clearKeyUriToKeyIdMap();const i=r.length;ya.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:ye.OTHER_ERROR,details:W.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:ye.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${s}`)})}).then(()=>{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: ${K((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(Nr(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:ye.OTHER_ERROR,details:W.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:ye.OTHER_ERROR,details:W.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${c}`)})})}return Promise.resolve()}}ya.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 K(a.keyId)}function Ac(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 Xi 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 Fl(a,e){const t=a==="output-restricted",n=t?W.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:W.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new Xi({type:ye.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,h=1e3*s/i,c=this.hls;if(c.trigger(g.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),h>0&&s>c.config.fpsDroppedMonitoringThreshold*l){let p=c.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+p),p>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=p)&&(p=p-1,c.trigger(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){ce.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){ce.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function ba(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=>{ba(s)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id: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=tn(l,s);if(p>-1)i=s[p];else{const v=tn(l,this.tracks);i=this.tracks[v]}}let h=this.findTrackId(i);h===-1&&i&&(h=this.findTrackId(null));const c={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(g.SUBTITLE_TRACKS_UPDATED,c),h!==-1&&this.trackId===-1&&this.setSubtitleTrack(h)}}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||dn(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===ne.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&&dn(e,n))return n;const r=tn(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=tn(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||!d(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:h,type:c,url:p}=r;this.hls.trigger(g.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:h,type:c,url:p});const v=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(v)}}function kc(){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 xa=.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 Oc{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=d(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)<xa))}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))<xa)?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 Ea(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class Bc{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:h})=>{this.removeMediaListeners(),this.mediaAttached=h,this.interstitial.playoutLimit&&(h.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=Vn.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=Vn.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: ${Ea(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const jl=.033;class Nc extends re{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),h=i?i.filter(c=>!l.includes(c.identifier)):[];s.length&&s.sort((c,p)=>{const v=c.cue.pre,C=c.cue.post,O=p.cue.pre,M=p.cue.post;if(v&&!O)return-1;if(O&&!v||C&&!M)return 1;if(M&&!C)return-1;if(!v&&!O&&!C&&!M){const ue=c.startTime,le=p.startTime;if(ue!==le)return ue-le}return c.dateRange.tagOrder-p.dateRange.tagOrder}),this.events=s,h.forEach(c=>{this.removeEvent(c)}),this.updateSchedule(e,h)}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((h,c)=>Math.abs(h.playout.start-i[c].playout.start)>.005||Math.abs(h.playout.end-i[c].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,i))}}parseDateRanges(e,t,n){const r=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const l=i[s],h=e[l];if(h.isInterstitial){let c=this.eventMap[l];c?c.setDateRange(h):(c=new Oc(h,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(h=>!h.error&&!(h.cue.once&&h.hasPlayed)),e.length){this.resolveOffsets(e,t);let h=0,c=0;if(e.forEach((p,v)=>{const C=p.cue.pre,O=p.cue.post,M=e[v-1]||null,ue=p.appendInPlace,le=O?i:p.startOffset,Pe=p.duration,je=p.timelineOccupancy===vo.Range?Pe:0,Ye=p.resumptionOffset,ut=(M==null?void 0:M.startTime)===le,yt=le+p.cumulativeDuration;let zt=ue?yt+Pe:le+Ye;if(C||!O&&le<=0){const Bt=c;c+=je,p.timelineStart=yt;const Mt=s;s+=Pe,n.push({event:p,start:yt,end:zt,playout:{start:Mt,end:s},integrated:{start:Bt,end:c}})}else if(le<=i){if(!ut){const Dt=le-h;if(Dt>jl){const en=h,En=c;c+=Dt;const Bn=s;s+=Dt;const Yn={previousEvent:e[v-1]||null,nextEvent:p,start:en,end:en+Dt,playout:{start:Bn,end:s},integrated:{start:En,end:c}};n.push(Yn)}else Dt>0&&M&&(M.cumulativeDuration+=Dt,n[n.length-1].end=le)}O&&(zt=yt),p.timelineStart=yt;const Bt=c;c+=je;const Mt=s;s+=Pe,n.push({event:p,start:yt,end:zt,playout:{start:Mt,end:s},integrated:{start:Bt,end:c}})}else return;const Et=p.resumeTime;O||Et>i?h=i:h=Et}),h<i){var l;const p=h,v=c,C=i-h;c+=C;const O=s;s+=C,n.push({previousEvent:((l=n[n.length-1])==null?void 0:l.event)||null,nextEvent:null,start:h,end:p+C,playout:{start:O,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,h)=>{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=rr(null,n.fragments,l.startOffset+l.resumptionOffset,0,0)||void 0),l.appendInPlace&&!l.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(l,t)||(l.appendInPlace=!1)),!l.appendInPlace&&h+1<e.length&&e[h+1].startTime-e[h].resumeTime<jl&&(e[h+1].appendInPlace=!1,e[h+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${l}`));const O=d(l.resumeOffset)?l.resumeOffset:l.duration;i+=O})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>xa?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):!Object.keys(t).some(s=>{const l=t[s].details,h=l.edge;if(n>=h)return this.log(`"${e.identifier}" resumption ${n} past ${s} playlist end ${h}`),!1;const c=rr(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)<xa+p||Math.abs(c.end-n)<xa+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],h=t+n;l.startOffset=n,l.timelineStart=h,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 os(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class Fc{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(C){const O=this.assignAssetListError(e,W.ASSET_LIST_LOAD_ERROR,C,n);this.hls.trigger(g.ERROR,O);return}t&&r.protocol!=="data:"&&r.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,l=new s(i),h={responseType:"json",url:r.href},c=i.interstitialAssetListLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},v={onSuccess:(C,O,M,ue)=>{const le=C.data,Pe=le==null?void 0:le.ASSETS;if(!Array.isArray(Pe)){const je=this.assignAssetListError(e,W.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),M.url,O,ue);this.hls.trigger(g.ERROR,je);return}e.assetListResponse=le,this.hls.trigger(g.ASSET_LIST_LOADED,{event:e,assetListResponse:le,networkDetails:ue})},onError:(C,O,M,ue)=>{const le=this.assignAssetListError(e,W.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${C.code} ${C.text} (${O.url})`),O.url,ue,M);this.hls.trigger(g.ERROR,le)},onTimeout:(C,O,M)=>{const ue=this.assignAssetListError(e,W.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${O.url})`),O.url,C,M);this.hls.trigger(g.ERROR,ue)}};return l.load(h,p,v),this.hls.trigger(g.ASSET_LIST_LOADING,{event:e}),l}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:ye.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 _o(a,e){return`[${a}] Advancing timeline position to ${e}`}class $c extends re{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 h;const O=this.findItemIndex(l);let M=this.schedule.findItemIndexAtTime(n);if(M===-1&&(M=O+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${n} (resolving from ${O} to ${M})`)),!this.isInterstitial(l)&&(h=this.media)!=null&&h.paused&&(this.shouldPlay=!1),!s&&M>O){const ue=this.schedule.findJumpRestrictedIndex(O+1,M);if(ue>O){this.setSchedulePosition(ue);return}}this.setSchedulePosition(M);return}const c=this.playingAsset;if(!c){if(this.playingLastItem&&this.isInterstitial(l)){const O=l.event.assetList[0];O&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,O))}return}const p=c.timelineStart,v=c.duration||0;if(s&&n<p||n>=p+v){var C;(C=l.event)!=null&&C.appendInPlace&&(this.clearAssetPlayers(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||[],h=i.items||[],c=i.durations,p=n.map(ue=>ue.identifier),v=!!(l.length||p.length);(v||r)&&this.log(`INTERSTITIALS_UPDATED (${l.length}): ${l}
|
|
Schedule: ${h.map(ue=>os(ue))} pos: ${this.timelinePos}`),p.length&&this.log(`Removed events ${p}`);let C=null,O=null;s&&(C=this.updateItem(s,this.timelinePos),this.itemsMatch(s,C)?this.playingItem=C:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const M=this.bufferingItem;if(M&&(O=this.updateItem(M,this.bufferedPos),this.itemsMatch(M,O)?this.bufferingItem=O:M.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(M.event,null))),n.forEach(ue=>{ue.assetList.forEach(le=>{this.clearAssetPlayer(le.identifier,null)})}),this.playerQueue.forEach(ue=>{if(ue.interstitial.appendInPlace){const le=ue.assetItem.timelineStart,Pe=ue.timelineOffset-le;if(Pe)try{ue.timelineOffset=le}catch(je){Math.abs(Pe)>xa&&this.warn(`${je} ("${ue.assetId}" ${ue.timelineOffset}->${le})`)}}}),v||r){if(this.hls.trigger(g.INTERSTITIALS_UPDATED,{events:l.slice(0),schedule:h.slice(0),durations:c,removedIds:p}),this.isInterstitial(s)&&p.includes(s.event.identifier)){this.warn(`Interstitial "${s.event.identifier}" removed while playing`),this.primaryFallback(s.event);return}s&&this.trimInPlace(C,s),M&&O!==C&&this.trimInPlace(O,M),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Fc(e),this.schedule=new Nc(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){ki(e,"play",this.onPlay),ki(e,"pause",this.onPause),ki(e,"seeking",this.onSeeking),ki(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;Ci(n,"seeking",this.onSeeking),Ci(n,"timeupdate",this.onTimeupdate),Ci(n,"play",this.onPlay),Ci(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,C,O,M,ue)=>{if(v){let le=v[C].start;const Pe=v.event;if(Pe){if(C==="playout"||Pe.timelineOccupancy!==vo.Point){const je=n(O);(je==null?void 0:je.interstitial)===Pe&&(le+=je.assetItem.startOffset+je[ue])}}else{const je=M==="bufferedPos"?s():e[M];le+=je-v.start}return le}return 0},i=(v,C)=>{var O;if(v!==0&&C!=="primary"&&(O=e.schedule)!=null&&O.length){var M;const ue=e.schedule.findItemIndexAtTime(v),le=(M=e.schedule.items)==null?void 0:M[ue];if(le){const Pe=le[C].start-le.start;return v+Pe}}return v},s=()=>{const v=e.bufferedPos;return v===Number.MAX_VALUE?l("primary"):Math.max(v,0)},l=v=>{var C,O;return(C=e.primaryDetails)!=null&&C.live?e.primaryDetails.edge:((O=e.schedule)==null?void 0:O.durations[v])||0},h=(v,C)=>{var O,M;const ue=e.effectivePlayingItem;if(ue!=null&&(O=ue.event)!=null&&O.restrictions.skip||!e.schedule)return;e.log(`seek to ${v} "${C}"`);const le=e.effectivePlayingItem,Pe=e.schedule.findItemIndexAtTime(v,C),je=(M=e.schedule.items)==null?void 0:M[Pe],Ye=e.getBufferingPlayer(),ut=Ye==null?void 0:Ye.interstitial,yt=ut==null?void 0:ut.appendInPlace,zt=le&&e.itemsMatch(le,je);if(le&&(yt||zt)){const Et=n(e.playingAsset),Bt=(Et==null?void 0:Et.media)||e.primaryMedia;if(Bt){const Mt=C==="primary"?Bt.currentTime:r(le,C,e.playingAsset,"timelinePos","currentTime"),Dt=v-Mt,en=(yt?Mt:Bt.currentTime)+Dt;if(en>=0&&(!Et||yt||en<=Et.duration)){Bt.currentTime=en;return}}}if(je){let Et=v;if(C!=="primary"){const Mt=je[C].start,Dt=v-Mt;Et=je.start+Dt}const Bt=!e.isInterstitial(je);if((!e.isInterstitial(le)||le.event.appendInPlace)&&(Bt||je.event.appendInPlace)){const Mt=e.media||(yt?Ye==null?void 0:Ye.media:null);Mt&&(Mt.currentTime=Et)}else if(le){const Mt=e.findItemIndex(le);if(Pe>Mt){const en=e.schedule.findJumpRestrictedIndex(Mt+1,Pe);if(en>Mt){e.setSchedulePosition(en);return}}let Dt=0;if(Bt)e.timelinePos=Et,e.checkBuffer();else{const en=je.event.assetList,En=v-(je[C]||je).start;for(let Bn=en.length;Bn--;){const Yn=en[Bn];if(Yn.duration&&En>=Yn.startOffset&&En<Yn.startOffset+Yn.duration){Dt=Bn;break}}}e.setSchedulePosition(Pe,Dt)}}},c=()=>{const v=e.effectivePlayingItem;if(e.isInterstitial(v))return v;const C=t();return e.isInterstitial(C)?C:null},p={get bufferedEnd(){const v=t(),C=e.bufferingItem;if(C&&C===v){var O;return r(C,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-C.playout.start||((O=e.bufferingAsset)==null?void 0:O.startOffset)||0}return 0},get currentTime(){const v=c(),C=e.effectivePlayingItem;return C&&C===v?r(C,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-C.playout.start:0},set currentTime(v){const C=c(),O=e.effectivePlayingItem;O&&O===C&&h(v+O.playout.start,"playout")},get duration(){const v=c();return v?v.playout.end-v.playout.start:0},get assetPlayers(){var v;const C=(v=c())==null?void 0:v.event.assetList;return C?C.map(O=>e.getAssetPlayer(O.identifier)):[]},get playingIndex(){var v;const C=(v=c())==null?void 0:v.event;return C&&e.effectivePlayingAsset?C.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){h(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){h(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,C=v==null?void 0:v.event;if(C&&!C.restrictions.skip){const O=e.findItemIndex(v);if(C.appendInPlace){const M=v.playout.start+v.event.duration;h(M+.001,"playout")}else e.advanceAfterAssetEnded(C,O,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||!d(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} ${ht(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,h=l&&e.interstitial.appendInPlace,c=(n=this.detachedData)==null?void 0:n.mediaSource;let p;if(s.media)h&&(i=s.transferMedia(),this.detachedData=i),p="Primary";else if(c){const M=this.getBufferingPlayer();M?(i=M.transferMedia(),p=`${M}`):p="detached MediaSource"}else p="detached media";if(!i){if(c)i=this.detachedData,this.log(`using detachedData: MediaSource ${ht(i)}`);else if(!this.detachedData||s.media===t){const M=this.playerQueue;M.length>1&&M.forEach(ue=>{if(l&&ue.interstitial.appendInPlace!==h){const le=ue.interstitial;this.clearInterstitial(ue.interstitial,null),le.appendInPlace=!1,le.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${le}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const v=i&&"mediaSource"in i&&((r=i.mediaSource)==null?void 0:r.readyState)!=="closed",C=v&&i?i:t;this.log(`${v?"transfering MediaSource":"attaching media"} to ${l?e:"Primary"} from ${p} (media.currentTime: ${t.currentTime})`);const O=this.schedule;if(C===i&&O){const M=l&&e.assetId===O.assetIdAtEnd;C.overrides={duration:O.duration,endOfStream:!l||M,cueRemoval:!l}}e.attachMedia(C)}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(_o("checkStart",i)),this.timelinePos=i,t.length&&t[0].cue.pre){const s=e.findEventIndex(t[0].identifier);this.setSchedulePosition(s)}else if(i>=0||!this.primaryLive){const s=this.timelinePos=i>0?i:0,l=e.findItemIndexAtTime(s);this.setSchedulePosition(l)}}else if(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 h=e.resumeTime;this.timelinePos<h&&(this.log(_o("advanceAfterAssetEnded",h)),this.timelinePos=h,e.appendInPlace&&this.advanceInPlace(h),this.checkBuffer(this.bufferedPos<h)),this.setSchedulePosition(s)}}}else{if(e.appendInPlace){const i=e.assetList[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&&os(i)}) pos: ${this.timelinePos}`);const s=this.waitingItem||this.playingItem,l=this.playingLastItem;if(this.isInterstitial(s)){const p=s.event,v=this.playingAsset,C=v==null?void 0:v.identifier,O=C?this.getAssetPlayer(C):null;if(O&&C&&(!this.eventItemsMatch(s,i)||t!==void 0&&C!==p.assetList[t].identifier)){var h;const M=p.findAssetIndex(v);if(this.log(`INTERSTITIAL_ASSET_ENDED ${M+1}/${p.assetList.length} ${Ea(v)}`),this.endedAsset=v,this.playingAsset=null,this.hls.trigger(g.INTERSTITIAL_ASSET_ENDED,{asset:v,assetListIndex:M,event:p,schedule:r.slice(0),scheduleIndex:e,player:O}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(p,this.findItemIndex(this.playingItem),M);return}this.retreiveMediaSource(C,i),O.media&&!((h=this.detachedData)!=null&&h.mediaSource)&&O.detachMedia()}if(!this.eventItemsMatch(s,i)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${p} ${os(s)}`),p.hasPlayed=!0,this.hls.trigger(g.INTERSTITIAL_ENDED,{event:p,schedule:r.slice(0),scheduleIndex:e}),p.cue.once)){var c;this.updateSchedule();const M=(c=this.schedule)==null?void 0:c.items;if(i&&M){const ue=this.findItemIndex(i);this.advanceSchedule(ue,M,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,h=this.primaryMedia,c=this.playerQueue;if(c.length&&c.forEach(p=>{const v=p.interstitial,C=s.findEventIndex(v.identifier);(C<e||C>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 M=Qo(p,n-1);if(p.isAssetPastPlayoutLimit(M)||p.appendInPlace&&this.timelinePos===l.end){this.advanceAfterAssetEnded(p,e,n);return}n=M}const v=this.waitingItem;this.assetsBuffered(l,h)||this.setBufferingItem(l);let C=this.preloadAssets(p,n);if(this.eventItemsMatch(l,v||r)||(this.waitingItem=l,this.log(`INTERSTITIAL_STARTED ${os(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),!h){this.log(`Waiting for attachMedia to start Interstitial ${p}`);return}this.waitingItem=this.endedItem=null,this.playingItem=l;const O=p.assetList[n];if(!O){this.advanceAfterAssetEnded(p,e,n||0);return}if(C||(C=this.getAssetPlayer(O.identifier)),C===null||C.destroyed){const M=p.assetList.length;this.warn(`asset ${n+1}/${M} player destroyed ${p}`),C=this.createAssetPlayer(p,O,n),C.loadSource()}if(!this.eventItemsMatch(l,this.bufferingItem)&&p.appendInPlace&&this.isAssetBuffered(O))return;this.startAssetPlayer(C,n,t,e,h),this.shouldPlay&&Hl(C.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 ${os(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let l=this.timelinePos;(l<e.start||l>=e.end)&&(l=this.getPrimaryResumption(e,t),this.log(_o("resumePrimary",l)),this.timelinePos=l),this.attachPrimary(l,e)}if(!n)return;const s=(i=this.schedule)==null?void 0:i.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${os(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:Vn.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(_o("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=A(A({},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=A(A({},this.altSelection),{},{audio:n});return}const i=A(A({},r),{},{audio:n});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=A(A({},this.altSelection),{},{subtitles:n});return}const i=A(A({},r),{},{subtitles:n});this.mediaSelection=i}onAudioTrackSwitching(e,t){const n=Zt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setAudioOption(t)||r.setAudioOption(n)))}onSubtitleTrackSwitch(e,t){const n=Zt(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=Vn.bufferInfo(this.primaryMedia,n,0);(r.end>n||(r.nextStart||0)>n)&&(this.log(`trim buffered interstitial ${os(e)} (was ${os(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=Vn.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 h=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var c;const p=this.findItemIndex(i),v=Math.min(p+1,t.length-1),C=t[v];if((h===-1&&i&&e>=i.end||(c=C.event)!=null&&c.appendInPlace&&e+.01>=C.start)&&(h=v),this.isInterstitial(i)){const O=i.event;if(v-l>1&&O.appendInPlace===!1||O.assetList.length===0&&O.assetListLoader)return}if(this.bufferedPos=e,h>p&&h>l)this.bufferedToItem(C);else{const O=this.primaryDetails;this.primaryLive&&O&&e>O.edge-O.targetduration&&C.start<O.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(C)&&this.preloadAssets(C.event,0)}}else n&&s&&!this.itemsMatch(s,i)&&(h===l?this.bufferedToItem(s):h===l+1&&this.bufferedToItem(t[h]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(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 h=l?l.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${os(e)}`+(t?` (${h.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const c=n.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((p,v)=>{const C=this.getAssetPlayer(p.identifier);C&&(v===c&&C.loadSource(),C.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 h=e.timelineStart;if(e.appendInPlace){var l;const C=this.playingItem;!this.isInterstitial(C)&&(C==null||(l=C.nextEvent)==null?void 0:l.identifier)===e.identifier&&this.flushFrontBuffer(h+.25)}let c,p=0;if(!this.playingItem&&this.primaryLive&&(p=this.hls.startPosition,p===-1&&(p=this.hls.liveSyncPosition||0)),p&&!(e.cue.pre||e.cue.post)){const C=p-h;C>0&&(c=Math.round(C*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,h,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 h=e.assetList[t];if(h){const c=this.getAssetPlayer(h.identifier);return c&&c.loadSource(),c}}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(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 h=r.audioTracks[r.audioTrack],c=r.subtitleTracks[r.subtitleTrack];let p=0;if(this.primaryLive||e.appendInPlace){const ut=this.timelinePos-t.timelineStart;if(ut>1){const yt=t.duration;yt&&ut<yt&&(p=ut)}}const v=t.identifier,C=A(A({},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:h||i.audioPreference,subtitlePreference:c||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(C.timelineOffset=t.timelineStart));const O=C.cmcd;O!=null&&O.sessionId&&O.contentId&&(C.cmcd=S({},O,{contentId:Ua(t.uri)})),this.getAssetPlayer(v)&&this.warn(`Duplicate date range identifier ${e} and asset ${v}`);const M=new Bc(this.HlsPlayerClass,C,e,t);this.playerQueue.push(M),e.assetList[n]=t;let ue=!0;const le=ut=>{if(ut.live){var yt;const Bt=new Error(`Interstitials MUST be VOD assets ${e}`),Mt={fatal:!0,type:ye.OTHER_ERROR,details:W.INTERSTITIAL_ASSET_ITEM_ERROR,error:Bt},Dt=((yt=this.schedule)==null?void 0:yt.findEventIndex(e.identifier))||-1;this.handleAssetItemError(Mt,e,Dt,n,Bt.message);return}const zt=ut.edge-ut.fragmentStart,Et=t.duration;(ue||Et===null||zt>Et)&&(ue=!1,this.log(`Interstitial asset "${v}" duration change ${Et} > ${zt}`),t.duration=zt,this.updateSchedule())};M.on(g.LEVEL_UPDATED,(ut,{details:yt})=>le(yt)),M.on(g.LEVEL_PTS_UPDATED,(ut,{details:yt})=>le(yt)),M.on(g.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const Pe=(ut,yt)=>{const zt=this.getAssetPlayer(v);if(zt&&yt.tracks){zt.off(g.BUFFER_CODECS,Pe),zt.tracks=yt.tracks;const Et=this.primaryMedia;this.bufferingAsset===zt.assetItem&&Et&&!zt.media&&this.bufferAssetPlayer(zt,Et)}};M.on(g.BUFFER_CODECS,Pe);const je=()=>{var ut;const yt=this.getAssetPlayer(v);if(this.log(`buffered to end of asset ${yt}`),!yt||!this.schedule)return;const zt=this.schedule.findEventIndex(e.identifier),Et=(ut=this.schedule.items)==null?void 0:ut[zt];this.isInterstitial(Et)&&this.advanceAssetBuffering(Et,t)};M.on(g.BUFFERED_TO_END,je);const Ye=ut=>()=>{if(!this.getAssetPlayer(v)||!this.schedule)return;this.shouldPlay=!0;const zt=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,zt,ut)};return M.once(g.MEDIA_ENDED,Ye(n)),M.once(g.PLAYOUT_LIMIT_REACHED,Ye(1/0)),M.on(g.ERROR,(ut,yt)=>{if(!this.schedule)return;const zt=this.getAssetPlayer(v);if(yt.details===W.BUFFER_STALLED_ERROR){if(zt!=null&&zt.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}`)}),M.on(g.DESTROYING,()=>{if(!this.getAssetPlayer(v)||!this.schedule)return;const yt=new Error(`Asset player destroyed unexpectedly ${v}`),zt={fatal:!0,type:ye.OTHER_ERROR,details:W.INTERSTITIAL_ASSET_ITEM_ERROR,error:yt};this.handleAssetItemError(zt,e,this.schedule.findEventIndex(e.identifier),n,yt.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${Ea(t)}`),this.hls.trigger(g.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:M}),M}clearInterstitial(e,t){this.clearAssetPlayers(e,t),e.reset()}clearAssetPlayers(e,t){e.assetList.forEach(n=>{this.clearAssetPlayer(n.identifier,t)})}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&&os(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:h}=e,c=s.assetList.length,p=this.playingAsset;this.endedAsset=null,this.playingAsset=l,(!p||p.identifier!==h)&&(p&&(this.clearAssetPlayer(p.identifier,n[r]),delete p.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${c} ${Ea(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),h=(n=this.schedule.items)==null?void 0:n[l];if(!h)return;e.loadSource(),this.setBufferingItem(h),this.bufferingAsset=s;const c=this.getBufferingPlayer();if(c===e)return;const p=i.appendInPlace;if(p&&(c==null?void 0:c.interstitial.appendInPlace)===!1)return;const 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&&!Ne(v,e.tracks)){const C=new Error(`Asset ${Ea(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(v)}')`),O={fatal:!0,type:ye.OTHER_ERROR,details:W.INTERSTITIAL_ASSET_ITEM_ERROR,error:C},M=i.findAssetIndex(s);this.handleAssetItemError(O,i,l,M,C.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 h=l.currentTime||r-s.timelineStart,c=l.duration-h;if(this.warn(`Stalled at ${h} of ${h+c} in ${l} ${e} (media.currentTime: ${r})`),h&&(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===W.BUFFER_STALLED_ERROR)return;const s=t.assetList[r]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&Ea(s)} ${e.error}`),!this.schedule)return;const l=(s==null?void 0:s.identifier)||"",h=this.getAssetPlayerQueueIndex(l),c=this.playerQueue[h]||null,p=this.schedule.items,v=S({},e,{fatal:!1,errorAction:cr(!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 C=this.playingAsset,O=this.bufferingAsset,M=new Error(i);if(s&&(this.clearAssetPlayer(l,null),s.error=M),!t.assetList.some(ue=>!ue.error))t.error=M;else for(let ue=r;ue<t.assetList.length;ue++)this.resetAssetPlayer(t.assetList[ue].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):C&&C.identifier===l?this.advanceAfterAssetEnded(t,n,r):O&&O.identifier===l&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,O)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;let r=this.timelinePos;if(n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${r} playing: ${os(n)} error: ${e.error}`),r===-1&&(r=this.hls.startPosition);const s=this.updateItem(n,r);this.itemsMatch(n,s)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t))}else if(r===-1){this.checkStart();return}if(!this.schedule)return;const i=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(i)}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 h=i.timelineStart,c=i.duration;let p=0;l.forEach((ue,le)=>{const Pe=parseFloat(ue.DURATION);this.createAsset(i,le,p,h+p,Pe,ue.URI),p+=Pe}),i.duration=p,this.log(`Loaded asset-list with duration: ${p} (was: ${c}) ${i}`);const v=this.waitingItem,C=(v==null?void 0:v.event.identifier)===s;this.updateSchedule();const O=(r=this.bufferingItem)==null?void 0:r.event;if(C){var M;const ue=this.schedule.findEventIndex(s),le=(M=this.schedule.items)==null?void 0:M[ue];if(le){if(!this.playingItem&&this.timelinePos>le.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==ue){i.error=new Error(`Interstitial ${l.length?"no longer within playback range":"asset-list is empty"} ${this.timelinePos} ${i}`),this.log(i.error.message),this.updateSchedule(!0),this.primaryFallback(i);return}this.setBufferingItem(le)}this.setSchedulePosition(ue)}else if((O==null?void 0:O.identifier)===s){const ue=i.assetList[0];if(ue){const le=this.getAssetPlayer(ue.identifier);if(O.appendInPlace){const Pe=this.primaryMedia;le&&Pe&&this.bufferAssetPlayer(le,Pe)}else le&&le.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case W.ASSET_LIST_PARSING_ERROR:case W.ASSET_LIST_LOAD_ERROR:case W.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&(this.updateSchedule(!0),this.primaryFallback(n));break}case W.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 Zs{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",J.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=Yt.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)||(Ie(n)&&(this.fragPrevious=n),this.state=Yt.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 h=n.start+n.duration;s?s.end=h:(s={start:l,end:h},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,J.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===J.SUBTITLE&&(t.details===W.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Yt.STOPPED&&(this.state=Yt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&yl(this.levels,t)){this.levels=t.map(n=>new bn(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new bn(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,J.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!==Yt.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 h=i[l];if(l>=i.length||!h)return;this.log(`Subtitle track ${l} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let c=0;if(s.live||(n=h.details)!=null&&n.live){if(s.deltaUpdateFailed)return;const v=this.mainDetails;if(!v){this.startFragRequested=!1;return}const C=v.fragments[0];if(!h.details)s.hasProgramDateTime&&v.hasProgramDateTime?(ks(s,v),c=s.fragmentStart):C&&(c=C.start,Ws(s,c));else{var p;c=this.alignPlaylists(s,h.details,(p=this.levelLastLoaded)==null?void 0:p.details),c===0&&C&&(c=C.start,Ws(s,c))}v&&!this.startFragRequested&&this.setStartPosition(v,c)}h.details=s,this.levelLastLoaded=h,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===Yt.IDLE&&(rr(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,r=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&r!=null&&r.key&&r.iv&&ui(r.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,zi(r.method)).catch(l=>{throw i.trigger(g.ERROR,{type:ye.MEDIA_ERROR,details:W.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:t}),l}).then(l=>{const h=performance.now();i.trigger(g.FRAG_DECRYPTED,{frag:t,payload:l,stats:{tstart:s,tdecrypt:h}})}).catch(l=>{this.warn(`${l.name}: ${l.message}`),this.state=Yt.IDLE})}}doTick(){if(!this.media){this.state=Yt.IDLE;return}if(this.state===Yt.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=Vn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:l,len:h}=s,c=n.details,p=this.hls.maxBufferLength+c.levelTargetDuration;if(h>p)return;const v=c.fragments,C=v.length,O=c.edge;let M=null;const ue=this.fragPrevious;if(l<O){const je=r.maxFragLookUpTolerance,Ye=l>O-je?0:je;M=rr(ue,v,Math.max(v[0].start,l),Ye),!M&&ue&&ue.start<v[0].start&&(M=v[0])}else M=v[C-1];if(M=this.filterReplacedPrimary(M,n.details),!M)return;const le=M.sn-c.startSN,Pe=v[le-1];if(Pe&&Pe.cc===M.cc&&this.fragmentTracker.getState(Pe)===dr.NOT_LOADED&&(M=Pe),this.fragmentTracker.getState(M)===dr.NOT_LOADED){const je=this.mapToInitFragWhenRequired(M);je&&this.loadFragment(je,n,l)}}}loadFragment(e,t,n){Ie(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),ls=15,ws=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;ce.log(`${this.time} [${e}] ${n}`)}}}const na=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<ws;t++)this.chars.push(new Yc);this.logger=e}equals(e){for(let t=0;t<ws;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<ws;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<ws;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>ws&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=ws)}moveCursor(e){const t=this.pos+e;if(e>1)for(let 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>=ws){this.logger.log(0,()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1)}clearFromPos(e){let t;for(t=e;t<ws;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let n=0;n<ws;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 Jo{constructor(e){this.rows=[],this.currRow=ls-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<ls;t++)this.rows.push(new Xc(e));this.logger=e}reset(){for(let e=0;e<ls;e++)this.rows[e].clear();this.currRow=ls-1}equals(e){let t=!0;for(let n=0;n<ls;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<ls;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<ls;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+ht(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<ls;l++)this.rows[l].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const l=s.rows[i].cueStartTime,h=this.logger.time;if(l!==null&&h!==null&&l<h)for(let c=0;c<this.nrRollUpRows;c++)this.rows[t-this.nrRollUpRows+c+1].copy(s.rows[i+c])}}this.currRow=t;const 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 = "+ht(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<ls;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 Jo(n),this.nonDisplayedMemory=new Jo(n),this.lastOutputScreen=new Jo(n),this.currRollUpRow=this.displayedMemory.rows[ls-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[ls-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let 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: "+ht(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=Jc(),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,()=>"["+na([t[n],t[n+1]])+"] -> ("+na([r,i])+")");const h=this.cmdHistory;if(r>=16&&r<=31){if(Qc(r,i,h)){yo(null,null,h),this.logger.log(3,()=>"Repeated command ("+na([r,i])+") is dropped");continue}yo(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 yo(null,null,h);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 "+na([r,i])+" orig: "+na([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 ("+na([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 = "+na(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()}yo(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 yo(a,e,t){t.a=a,t.b=e}function Qc(a,e,t){return t.a===a&&t.b===e}function Jc(){return{a:null,b:null}}var qo=function(){if(br!=null&&br.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(l,h){if(typeof h!="string"||!Array.isArray(l))return!1;const c=h.toLowerCase();return~l.indexOf(c)?c:!1}function n(l){return t(a,l)}function r(l){return t(e,l)}function i(l,...h){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,h,c){const p=this,v={enumerable:!0};p.hasBeenReset=!1;let C="",O=!1,M=l,ue=h,le=c,Pe=null,je="",Ye=!0,ut="auto",yt="start",zt=50,Et="middle",Bt=50,Mt="middle";Object.defineProperty(p,"id",i({},v,{get:function(){return C},set:function(Dt){C=""+Dt}})),Object.defineProperty(p,"pauseOnExit",i({},v,{get:function(){return O},set:function(Dt){O=!!Dt}})),Object.defineProperty(p,"startTime",i({},v,{get:function(){return M},set:function(Dt){if(typeof Dt!="number")throw new TypeError("Start time must be set to a number.");M=Dt,this.hasBeenReset=!0}})),Object.defineProperty(p,"endTime",i({},v,{get:function(){return ue},set:function(Dt){if(typeof Dt!="number")throw new TypeError("End time must be set to a number.");ue=Dt,this.hasBeenReset=!0}})),Object.defineProperty(p,"text",i({},v,{get:function(){return le},set:function(Dt){le=""+Dt,this.hasBeenReset=!0}})),Object.defineProperty(p,"region",i({},v,{get:function(){return Pe},set:function(Dt){Pe=Dt,this.hasBeenReset=!0}})),Object.defineProperty(p,"vertical",i({},v,{get:function(){return je},set:function(Dt){const en=n(Dt);if(en===!1)throw new SyntaxError("An invalid or illegal string was specified.");je=en,this.hasBeenReset=!0}})),Object.defineProperty(p,"snapToLines",i({},v,{get:function(){return Ye},set:function(Dt){Ye=!!Dt,this.hasBeenReset=!0}})),Object.defineProperty(p,"line",i({},v,{get:function(){return ut},set:function(Dt){if(typeof Dt!="number"&&Dt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");ut=Dt,this.hasBeenReset=!0}})),Object.defineProperty(p,"lineAlign",i({},v,{get:function(){return yt},set:function(Dt){const en=r(Dt);if(!en)throw new SyntaxError("An invalid or illegal string was specified.");yt=en,this.hasBeenReset=!0}})),Object.defineProperty(p,"position",i({},v,{get:function(){return zt},set:function(Dt){if(Dt<0||Dt>100)throw new Error("Position must be between 0 and 100.");zt=Dt,this.hasBeenReset=!0}})),Object.defineProperty(p,"positionAlign",i({},v,{get:function(){return Et},set:function(Dt){const en=r(Dt);if(!en)throw new SyntaxError("An invalid or illegal string was specified.");Et=en,this.hasBeenReset=!0}})),Object.defineProperty(p,"size",i({},v,{get:function(){return Bt},set:function(Dt){if(Dt<0||Dt>100)throw new Error("Size must be between 0 and 100.");Bt=Dt,this.hasBeenReset=!0}})),Object.defineProperty(p,"align",i({},v,{get:function(){return Mt},set:function(Dt){const en=r(Dt);if(!en)throw new SyntaxError("An invalid or illegal string was specified.");Mt=en,this.hasBeenReset=!0}})),p.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class qc{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],h=s[1];e(l,h)}}const el=new qo(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,h){const c=new e0;Xl(l,function(C,O){let M;switch(C){case"region":for(let ue=t.length-1;ue>=0;ue--)if(t[ue].id===O){c.set(C,t[ue].region);break}break;case"vertical":c.alt(C,O,["rl","lr"]);break;case"line":M=O.split(","),c.integer(C,M[0]),c.percent(C,M[0])&&c.set("snapToLines",!1),c.alt(C,M[0],["auto"]),M.length===2&&c.alt("lineAlign",M[1],["start",bo,"end"]);break;case"position":M=O.split(","),c.percent(C,M[0]),M.length===2&&c.alt("positionAlign",M[1],["start",bo,"end","line-left","line-right","auto"]);break;case"size":c.percent(C,O);break;case"align":c.alt(C,O,["start",bo,"end","left","right"]);break}},/:/,/\s/),h.region=c.get("region",null),h.vertical=c.get("vertical","");let p=c.get("line","auto");p==="auto"&&el.line===-1&&(p=-1),h.line=p,h.lineAlign=c.get("lineAlign","start"),h.snapToLines=c.get("snapToLines",!0),h.size=c.get("size",100),h.align=c.get("align",bo);let v=c.get("position","auto");v==="auto"&&el.position===50&&(v=h.align==="start"||h.align==="left"?0:h.align==="end"||h.align==="right"?100:50),h.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 qc,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 qo(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(!d(t)||!d(n)||!d(r)||!d(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,h=Ve(new Uint8Array(a)).trim().replace(r0,`
|
|
`).split(`
|
|
`),c=[],p=e?fs(e.baseTime,e.timescale):0;let v="00:00.000",C=0,O=0,M,ue=!0;l.oncue=function(le){const Pe=t[n];let je=t.ccOffset;const Ye=(C-p)/9e4;if(Pe!=null&&Pe.new&&(O!==void 0?je=t.ccOffset=Pe.start:s0(t,n,Ye)),Ye){if(!e){M=new Error("Missing initPTS for VTT MPEGTS");return}je=Ye-t.presentationOffset}const ut=le.endTime-le.startTime,yt=Ui((le.startTime+je-O)*9e4,r*9e4)/9e4;le.startTime=Math.max(yt,0),le.endTime=Math.max(yt+ut,0);const zt=le.text.trim();le.text=decodeURIComponent(encodeURIComponent(zt)),le.id||(le.id=nl(le.startTime,le.endTime,zt)),le.endTime>0&&c.push(le)},l.onparsingerror=function(le){M=le},l.onflush=function(){if(M){s(M);return}i(c)},h.forEach(le=>{if(ue)if(tl(le,"X-TIMESTAMP-MAP=")){ue=!1,le.slice(16).split(",").forEach(Pe=>{tl(Pe,"LOCAL:")?v=Pe.slice(6):tl(Pe,"MPEGTS:")&&(C=parseInt(Pe.slice(7)))});try{O=i0(v)/1e3}catch(Pe){M=Pe}return}else le===""&&(ue=!1);l.parse(le+`
|
|
`)}),l.flush()}const rl="stpp.ttml.im1t",Jl=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ql=/^(\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=pe(new Uint8Array(a),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const i=r.map(l=>Ve(l)),s=Zi(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,C)=>(v[C]=r.getAttribute(`ttp:${C}`)||i[C],v),{}),l=r.getAttribute("xml:space")!=="preserve",h=tu(il(r,"styling","style")),c=tu(il(r,"layout","region")),p=il(r,"body","[begin]");return[].map.call(p,v=>{const C=nu(v,l);if(!C||!v.hasAttribute("begin"))return null;const O=al(v.getAttribute("begin"),s),M=al(v.getAttribute("dur"),s);let ue=al(v.getAttribute("end"),s);if(O===null)throw ru(v);if(ue===null){if(M===null)throw ru(v);ue=O+M}const le=new qo(O-e,ue-e,C);le.id=nl(le.startTime,le.endTime,le.text);const Pe=c[v.getAttribute("region")],je=h[v.getAttribute("style")],Ye=u0(Pe,je,h),{textAlign:ut}=Ye;if(ut){const yt=o0[ut];yt&&(le.lineAlign=yt),le.align=ut}return S(le,Ye),le}).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,h)=>{const c=sl(e,n,h)||sl(a,n,h)||sl(r,n,h);return c&&(l[h]=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&&(Jl.test(a)?t=c0(a,e):ql.test(a)&&(t=d0(a,e))),t}function c0(a,e){const t=Jl.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=ql.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 h=i[l],c=f0(h[0],h[1],t,n);if(c>=0&&(h[0]=Math.min(h[0],t),h[1]=Math.max(h[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===J.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:i,trackId:s}),l.length&&(this.unparsedVttFrags=[],l.forEach(h=>{this.initPTS[h.frag.cc]?this.onFragLoaded(g.FRAG_LOADED,h):this.hls.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:h.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,ba(n[e]),$l(n[e],r);else{const h=this.createTextTrack("captions",i,s);h&&(h[e]=!0,n[e]=h)}}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=>{ba(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++)ba(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(yl(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((h,c)=>{let p;if(l){let v=null;for(let C=0;C<l.length;C++)if(l[C]&&su(l[C],h)){v=l[C],l[C]=null;break}v&&(p=v)}if(p)ba(p);else{const v=iu(h);p=this.createTextTrack(v,h.name,h.lang),p&&(p.mode="disabled")}p&&this.textTracks.push(p)}),l!=null&&l.length){const h=l.filter(c=>c!==null).map(c=>c.label);h.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${h.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(l=>({label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}));this.hls.trigger(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===J.MAIN){var n,r;const{cea608Parser1:i,cea608Parser2:s,lastSn:l}=this,{cc:h,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||h!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=h,this.lastSn=c,this.lastPartIndex=p}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===J.SUBTITLE)if(r.byteLength){const i=n.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const l=this.tracks[n.level],h=this.vttCCs;h[n.cc]||(h[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 h=this.hls,c=(t=n.initSegment)!=null&&t.data?St(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),h.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),h.logger.log(`Failed to parse VTT cue: ${p}`),!(v&&l>n.cc)&&h.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===J.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===J.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(h=>Yo(l[h],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(h=>Yo(l[h],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++],h=127&e[r++];if(l===0&&h===0)continue;if((4&s)!==0){const p=3&s;(p===0||p===1)&&(t[p].push(l),t[p].push(h))}}return t}}function iu(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function su(a,e){return!!a&&a.kind===iu(e)&&zo(e,a)}function 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,h,c;const p=self.VTTCue||self.TextTrackCue;for(let C=0;C<n.rows.length;C++)if(i=n.rows[C],l=!0,h=0,c="",!i.isEmpty()){var v;for(let ue=0;ue<i.chars.length;ue++)m0.test(i.chars[ue].uchar)&&l?h++:(c+=i.chars[ue].uchar,l=!1);i.cueStartTime=e,e===t&&(t+=1e-4),h>=16?h--:h++;const O=Ql(c.trim()),M=nl(e,t,O);a!=null&&(v=a.cues)!=null&&v.getCueById(M)||(s=new p(e,t,O),s.id=M,s.line=C+1,s.align="left",s.position=10+Math.min(80,Math.floor(h*8/32)*10),r.push(s))}return a&&r.length&&(r.sort((C,O)=>C.line==="auto"||O.line==="auto"?0:C.line>8&&O.line>8?O.line-C.line:C.line-O.line),r.forEach(C=>Ul(a,C))),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=_0(e,this.controller.signal),s=e.responseType==="arraybuffer",l=s?"byteLength":"length",{maxTimeToFirstByteMs:h,maxLoadTimeMs:c}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=h&&d(h)?h:c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(Fa(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(v=>{var C;this.response=this.loader=v;const O=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-(O-r.loading.start)),!v.ok){const{status:ue,statusText:le}=v;throw new E0(le||"fetch, bad network response",ue,v)}r.loading.first=O,r.total=b0(v.headers)||r.total;const M=(C=this.callbacks)==null?void 0:C.onProgress;return M&&d(t.highWaterMark)?this.loadProgressively(v,r,e,t.highWaterMark,M):s?v.arrayBuffer():e.responseType==="json"?v.json():v.text()}).then(v=>{var C,O;const M=this.response;if(!M)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const ue=v[l];ue&&(r.loaded=r.total=ue);const le={url:M.url,data:v,code:M.status},Pe=(C=this.callbacks)==null?void 0:C.onProgress;Pe&&!d(t.highWaterMark)&&Pe(r,e,v,M),(O=this.callbacks)==null||O.onSuccess(le,r,e,M)}).catch(v=>{var C;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const O=v&&v.code||0,M=v?v.message:null;(C=this.callbacks)==null||C.onError({code:O,text:M},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 Ca,l=e.body.getReader(),h=()=>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),h()}).catch(()=>Promise.reject());return h()}}function _0(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 y0(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=y0(e);if(d(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&&d(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 M=p!=null?p:t.response;if(M!=null){var s,l;n.loading.end=Math.max(self.performance.now(),n.loading.first);const ue=t.responseType==="arraybuffer"?M.byteLength:M.length;n.loaded=n.total=ue,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const le=(s=this.callbacks)==null?void 0:s.onProgress;le&&le(n,e,M,t);const Pe={url:t.responseURL,data:M,code:c};(l=this.callbacks)==null||l.onSuccess(Pe,n,e,t);return}}const v=i.loadPolicy.errorRetry,C=n.retry,O={url:e.url,data:void 0,code:c};if(Cr(v,C,!1,O))this.retry(v);else{var h;ce.error(`${c} while loading ${e.url}`),(h=this.callbacks)==null||h.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(Cr(e,t,!0))this.retry(e);else{var n;ce.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=er(e,n.retry),n.retry++,ce.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},T0=A(A({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:Jn,bufferController:Ru,capLevelController:Ho,errorController:yr,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:gr,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},C0()),{},{subtitleStreamController:Uc,subtitleTrackController:Lc,timelineController:h0,audioStreamController:Cu,audioTrackController:Au,emeController:ya,cmcdController:wc,contentSteeringController:Cc,interstitialsController:$c});function C0(){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 A0(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`,h=e[l]===void 0,c=[];i.forEach(p=>{const v=`${s}Loading${p}`,C=e[v];if(C!==void 0&&h){c.push(v);const O=n[l].default;switch(e[l]={default:O},p){case"TimeOut":O.maxLoadTimeMs=C,O.maxTimeToFirstByteMs=C;break;case"MaxRetry":O.errorRetry.maxNumRetry=C,O.timeoutRetry.maxNumRetry=C;break;case"RetryDelay":O.errorRetry.retryDelayMs=C,O.timeoutRetry.retryDelayMs=C;break;case"MaxRetryTimeout":O.errorRetry.maxRetryDelayMs=C,O.timeoutRetry.maxRetryDelayMs=C;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${l}": ${ht(e[l])}`)}),A(A({},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 k0 extends fi{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;Ci(n,"playing",this.onMediaPlaying),Ci(n,"waiting",this.onMediaWaiting),Ci(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(ki(n,"playing",this.onMediaPlaying),ki(n,"waiting",this.onMediaWaiting),ki(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,h=this.seeking&&!l,c=!this.seeking&&l,p=s.paused&&!l||s.ended||s.playbackRate===0;if(this.seeking=l,e!==t){t&&(this.ended=0),this.moved=!0,l||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!p&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(c||h){h&&this.stallResolved(e);return}if(p){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(g.MEDIA_ENDED,{stalled:!1}));return}if(!Vn.getBuffered(s).length){this.nudgeRetry=0;return}const v=Vn.bufferInfo(s,e,0),C=v.nextStart||0,O=this.fragmentTracker;if(l&&O&&this.hls){const zt=uu(this.hls.inFlightFragments,e),Et=v.len>Eo,Bt=!C||zt||C-e>Eo&&!O.getPartialFragment(e);if(Et||Bt)return;this.moved=!1}const M=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&O){if(!(v.len>0)&&!C)return;const Et=Math.max(C,v.start||0)-e,Mt=!!(M!=null&&M.live)?M.targetduration*2:Eo,Dt=So(e,O);if(Et>0&&(Et<=Mt||Dt)){s.paused||this._trySkipBufferHole(Dt);return}}const ue=i.detectStallWithCurrentTimeMs,le=self.performance.now(),Pe=this.waiting;let je=this.stalled;if(je===null)if(Pe>0&&le-Pe<ue)je=this.stalled=Pe;else{this.stalled=le;return}const Ye=le-je;if(!l&&(Ye>=ue||Pe)&&this.hls){var ut;if(((ut=this.mediaSource)==null?void 0:ut.readyState)==="ended"&&!(M!=null&&M.live)&&Math.abs(e-((M==null?void 0:M.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=Vn.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(yt,Ye,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=Vn.bufferedInfo(Vn.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=Vn.timeRangesToArray(r),l=Vn.bufferedInfo(s,t,0).bufferedIndex;if(l>-1&&l<s.length-1){const h=Vn.bufferedInfo(s,e,0).bufferedIndex,c=s[l].end,p=s[l+1].start;if((h===-1||h>l)&&p-c<1&&e-c<2){const v=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${p} buffered index: ${h}`);this.warn(v.message),this.media.currentTime+=1e-6;let C=So(e,this.fragmentTracker);C&&"fragment"in C?C=C.fragment:C||(C=void 0);const O=Vn.bufferInfo(this.media,e,0);this.hls.trigger(g.ERROR,{type:ye.MEDIA_ERROR,details:W.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:v,reason:v.message,frag:C,buffer:O.len,bufferInfo:O})}}}}}_tryFixBufferStall(e,t,n){var r,i;const{fragmentTracker:s,media:l}=this,h=(r=this.hls)==null?void 0:r.config;if(!l||!s||!h)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,C=this.adjacentTraversal(e,n);(v&&v.length>1&&e.len>h.maxBufferHole||e.nextStart&&(e.nextStart-n<h.maxBufferHole||C))&&(t>h.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,J.MAIN),s=n.getFragAtPos(r,J.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 (${ht(e)})`);this.warn(s.message),t.trigger(g.ERROR,{type:ye.MEDIA_ERROR,details:W.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=Vn.bufferInfo(r,s,0),h=s<l.start?l.start:l.nextStart;if(h&&this.hls){const p=l.len<=i.maxBufferHole,v=l.len>0&&l.len<1&&r.readyState<3,C=h-s;if(C>0&&(p||v)){if(C>i.maxBufferHole){let M=!1;if(s===0){const ue=n.getAppendedFrag(0,J.MAIN);ue&&h<ue.end&&(M=!0)}if(!M&&e){var c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||uu(this.hls.inFlightFragments,h))return 0;let le=!1,Pe=e.end;for(;Pe<h;){const je=So(Pe,n);if(je)Pe+=je.duration;else{le=!0;break}}if(le)return 0}}const O=Math.max(h+R0,s+I0);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${O}`),this.moved=!0,r.currentTime=O,!(e!=null&&e.gap)){const M=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${O}`),ue={type:ye.MEDIA_ERROR,details:W.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:M,reason:M.message,buffer:l.len,bufferInfo:l};e&&("fragment"in e?ue.part=e:ue.frag=e),this.hls.trigger(g.ERROR,ue)}return O}}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,h=new Error(`Nudging 'currentTime' from ${s} to ${l}`);this.warn(h.message),n.currentTime=l,t.trigger(g.ERROR,{type:ye.MEDIA_ERROR,details:W.BUFFER_NUDGE_ON_STALL,error:h,fatal:!1,buffer:e.len,bufferInfo:e})}else{const l=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(l.message),t.trigger(g.ERROR,{type:ye.MEDIA_ERROR,details:W.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 Yt.IDLE:case Yt.STOPPED:case Yt.ENDED:case Yt.ERROR:return null}return a.frag}function So(a,e){return e.getAppendedFrag(a,J.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,ht(r?A({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 O0{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&&ba(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const 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 h=i[l].type;if(h===Ai.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 O=0;O<c.length;O++){const M=c[O];if(!ro(M)){this.updateId3CueEnds(p,h);const ue=ul(s,p,v,M,h);ue&&this.id3Track.addCue(ue)}}}}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:h}}=s;if(i&&(l||h)){let c;r==="audio"?c=p=>p.type===Ai.audioId3&&h:r==="video"?c=p=>p.type===Ai.emsg&&l:c=p=>p.type===Ai.audioId3&&h||p.type===Ai.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:ue,fragmentEnd:le}=e;let Pe=this.assetCue;Pe?(Pe.startTime=ue,Pe.endTime=le):l&&(Pe=this.assetCue=ul(l,ue,le,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),Pe&&(Pe.id=n,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(Pe),Pe.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:h}=this,{dateRanges:c}=e,p=Object.keys(c);let v=this.dateRangeCuesAppended;if(h&&t){var C;if((C=h.cues)!=null&&C.length){const ue=Object.keys(v).filter(le=>!p.includes(le));for(let le=ue.length;le--;){var O;const Pe=ue[le],je=(O=v[Pe])==null?void 0:O.cues;delete v[Pe],je&&Object.keys(je).forEach(Ye=>{const ut=je[Ye];if(ut){ut.removeEventListener("enter",this.onEventCueEnter);try{h.removeCue(ut)}catch(yt){}}})}}else v=this.dateRangeCuesAppended={}}const M=e.fragments[e.fragments.length-1];if(!(p.length===0||!d(M==null?void 0:M.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let ue=0;ue<p.length;ue++){const le=p[ue],Pe=c[le],je=Pe.startTime,Ye=v[le],ut=(Ye==null?void 0:Ye.cues)||{};let yt=(Ye==null?void 0:Ye.durationKnown)||!1,zt=wo;const{duration:Et,endDate:Bt}=Pe;if(Bt&&Et!==null)zt=je+Et,yt=!0;else if(Pe.endOnNext&&!yt){const Dt=p.reduce((en,En)=>{if(En!==Pe.id){const Bn=c[En];if(Bn.class===Pe.class&&Bn.startDate>Pe.startDate&&(!en||Pe.startDate<en.startDate))return Bn}return en},null);Dt&&(zt=Dt.startTime,yt=!0)}const Mt=Object.keys(Pe.attr);for(let Dt=0;Dt<Mt.length;Dt++){const en=Mt[Dt];if(!gi(en))continue;const En=ut[en];if(En)yt&&!(Ye!=null&&Ye.durationKnown)?En.endTime=zt:Math.abs(En.startTime-je)>.01&&(En.startTime=je,En.endTime=zt);else if(l){let Bn=Pe.attr[en];ni(en)&&(Bn=B(Bn));const Nn=ul(l,je,zt,{key:en,data:Bn},Ai.dateRange);Nn&&(Nn.id=le,this.id3Track.addCue(Nn),ut[en]=Nn,s&&(en==="X-ASSET-LIST"||en==="X-ASSET-URL")&&Nn.addEventListener("enter",this.onEventCueEnter))}}v[le]={cues:ut,dateRange:Pe,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 h=r-l,c=Math.min(this.maxLatency,l+n.targetduration);if(h<c&&h>.05&&this.forwardBufferLength>1){const v=Math.min(2,Math.max(1,s)),C=Math.round(2/(1+Math.exp(-.75*h-this.edgeStalled))*20)/20,O=Math.min(v,Math.max(1,C));this.changeMediaPlaybackRate(t,O)}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,h=this.hls.userConfig;let c=l&&n||t;(this._targetLatencyUpdated||h.liveSyncDuration||h.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===W.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 B0 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,h=!1,c=!1;t.levels.forEach(p=>{const v=p.attrs;let{audioCodec:C,videoCodec:O}=p;C&&(p.audioCodec=C=se(C,n)||void 0),O&&(O=p.videoCodec=Ht(O));const{width:M,height:ue,unknownCodecs:le}=p,Pe=(le==null?void 0:le.length)||0;if(l||(l=!!(M&&ue)),h||(h=!!O),c||(c=!!C),Pe||C&&!this.isAudioSupported(C)||O&&!this.isVideoSupported(O)){this.log(`Some or all CODECS not supported "${v.CODECS}"`);return}const{CODECS:je,"FRAME-RATE":Ye,"HDCP-LEVEL":ut,"PATHWAY-ID":yt,RESOLUTION:zt,"VIDEO-RANGE":Et}=v,Mt=`${`${yt||"."}-`}${p.bitrate}-${zt}-${Ye}-${je}-${Et}-${ut}`;if(i[Mt])if(i[Mt].uri!==p.url&&!p.attrs["PATHWAY-ID"]){const Dt=s[Mt]+=1;p.attrs["PATHWAY-ID"]=new Array(Dt+1).join(".");const en=this.createLevel(p);i[Mt]=en,r.push(en)}else i[Mt].addGroupId("audio",v.AUDIO),i[Mt].addGroupId("text",v.SUBTITLES);else{const Dt=this.createLevel(p);i[Mt]=Dt,s[Mt]=1,r.push(Dt)}}),this.filterAndSortMediaOptions(r,t,l,h,c)}createLevel(e){const t=new bn(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=Kt(r,[])}return t}isAudioSupported(e){return Me(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Me(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){var s;let l=[],h=[],c=e;const p=((s=t.stats)==null?void 0:s.parsing)||{};if((n||r)&&i&&(c=c.filter(({videoCodec:je,videoRange:Ye,width:ut,height:yt})=>(!!je||!!(ut&&yt))&&un(Ye))),c.length===0){Promise.resolve().then(()=>{if(this.hls){let je="no level with compatible codecs found in manifest",Ye=je;t.levels.length&&(Ye=`one or more CODECS in variant not supported: ${ht(t.levels.map(yt=>yt.attrs.CODECS).filter((yt,zt,Et)=>Et.indexOf(yt)===zt))}`,this.warn(Ye),je+=` (${Ye})`);const ut=new Error(je);this.hls.trigger(g.ERROR,{type:ye.MEDIA_ERROR,details:W.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:ut,reason:Ye})}}),p.end=performance.now();return}t.audioTracks&&(l=t.audioTracks.filter(je=>!je.audioCodec||this.isAudioSupported(je.audioCodec)),du(l)),t.subtitles&&(h=t.subtitles,du(h));const v=c.slice(0);c.sort((je,Ye)=>{if(je.attrs["HDCP-LEVEL"]!==Ye.attrs["HDCP-LEVEL"])return(je.attrs["HDCP-LEVEL"]||"")>(Ye.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&je.height!==Ye.height)return je.height-Ye.height;if(je.frameRate!==Ye.frameRate)return je.frameRate-Ye.frameRate;if(je.videoRange!==Ye.videoRange)return Qt.indexOf(je.videoRange)-Qt.indexOf(Ye.videoRange);if(je.videoCodec!==Ye.videoCodec){const ut=oe(je.videoCodec),yt=oe(Ye.videoCodec);if(ut!==yt)return yt-ut}if(je.uri===Ye.uri&&je.codecSet!==Ye.codecSet){const ut=xe(je.codecSet),yt=xe(Ye.codecSet);if(ut!==yt)return yt-ut}return je.averageBitrate!==Ye.averageBitrate?je.averageBitrate-Ye.averageBitrate:0});let C=v[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==v.length)){for(let je=0;je<v.length;je++)if(v[je].pathwayId===c[0].pathwayId){C=v[je];break}}this._levels=c;for(let je=0;je<c.length;je++)if(c[je]===C){var O;this._firstLevel=je;const Ye=C.bitrate,ut=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${c.length} level(s) found, first bitrate: ${Ye}`),((O=this.hls.userConfig)==null?void 0:O.abrEwmaDefaultEstimate)===void 0){const yt=Math.min(Ye,this.hls.config.abrEwmaDefaultEstimateMax);yt>ut&&ut===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=yt)}break}const M=i&&!r,ue=this.hls.config,le=!!(ue.audioStreamController&&ue.audioTrackController),Pe={levels:c,audioTracks:l,subtitleTracks:h,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:le&&!M&&l.some(je=>!!je.url)};p.end=performance.now(),this.hls.trigger(g.MANIFEST_PARSED,Pe)}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:ye.OTHER_ERROR,details:W.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 h={level:e,attrs:s.attrs,details:s.details,bitrate:s.bitrate,averageBitrate:s.averageBitrate,maxBitrate:s.maxBitrate,realBitrate:s.realBitrate,width:s.width,height:s.height,codecSet:s.codecSet,audioCodec:s.audioCodec,videoCodec:s.videoCodec,audioGroups:s.audioGroups,subtitleGroups:s.subtitleGroups,loaded:s.loaded,loadError:s.loadError,fragmentError:s.fragmentError,name:s.name,id:s.id,uri:s.uri,url:s.url,urlId:0,audioGroupIds:s.audioGroupIds,textGroupIds:s.textGroupIds};this.hls.trigger(g.LEVEL_SWITCHING,h);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===ne.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===J.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 h=s.details;h===t.details&&h.advanced&&(h=void 0),this.playlistLoaded(r,t,h)}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));Ti(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(!Oe())return!1;const e=hu();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function N0(){if(!fu())return!1;const a=Oe();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(ee(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(ee(e,"audio"))))}function F0(){var a;const e=hu();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const $0=100;class U0 extends Zs{constructor(e,t,n){super(e,t,n,"stream-controller",J.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||!d(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(r,i,J.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=Yt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Yt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Yt.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=Yt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Yt.IDLE;break}break}case Yt.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===Yt.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 h=this.getLevelDetails();if(h&&this._streamEnded(l,h)){const ue={};this.altAudio===2&&(ue.type="video"),this.hls.trigger(g.BUFFER_EOS,ue),this.state=Yt.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===Yt.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=Yt.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 C=this.backtrackFragment?this.backtrackFragment.start:l.end;let O=this.getNextFragment(C,c);if(this.couldBacktrack&&!this.fragPrevious&&O&&Ie(O)&&this.fragmentTracker.getState(O)!==dr.OK){var M;const le=((M=this.backtrackFragment)!=null?M:O).sn-c.startSN,Pe=c.fragments[le-1];Pe&&O.cc===Pe.cc&&(O=Pe,this.fragmentTracker.removeFragment(Pe))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(O&&this.isLoopLoading(O,C)){if(!O.gap){const le=this.audioOnly&&!this.altAudio?N.AUDIO:N.VIDEO,Pe=(le===N.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Pe&&this.afterBufferFlushed(Pe,le,J.MAIN)}O=this.getNextFragmentLoopLoading(O,c,l,J.MAIN,v)}O&&(O.initSegment&&!O.initSegment.data&&!this.bitrateTest&&(O=O.initSegment),this.loadFragment(O,s,C))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===dr.NOT_LOADED||r===dr.PARTIAL?Ie(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,J.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,h=e[l],c=this.fragLastKbps;c&&this.fragCurrent?n=this.fragCurrent.duration*h.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 h=l.maxStartPTS?l.maxStartPTS:l.start,c=l.duration,p=Math.max(s.end,h+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*(this.couldBacktrack?.5:.125)),c*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(p,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Yt.KEY_LOADING:case Yt.FRAG_LOADING:case Yt.FRAG_LOADING_WAITING_RETRY:case Yt.PARSING:case Yt.PARSED:this.state=Yt.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;Ci(n,"playing",this.onMediaPlaying),Ci(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(ki(n,"playing",this.onMediaPlaying),ki(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&&!F0(),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!==Yt.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=Yt.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:i}=this,s=t.level,l=t.details,h=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:${h}`);const c=t.levelInfo,p=this.fragCurrent;p&&(this.state===Yt.FRAG_LOADING||this.state===Yt.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 C;if(this.checkLiveUpdate(l),l.deltaUpdateFailed)return;v=this.alignPlaylists(l,c.details,(C=this.levelLastLoaded)==null?void 0:C.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===Yt.WAITING_LEVEL){if(this.waitForCdnTuneIn(l))return;this.state=Yt.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,h=i>=s-t.maxFragLookUpTolerance&&i<=l;if(r!==null&&n.duration>r&&(i<r||!h)){const p=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!h&&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=Vn.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:O}=Vn.bufferedInfo(v.buffered,i,0);O&&(n.currentTime=O)}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 h=l.details;if(!h){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=h.PTSKnown||!h.live,v=(t=n.initSegment)==null?void 0:t.data,C=this._getAudioCodec(l),O=this.transmuxer=this.transmuxer||new vl(this.hls,J.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),M=r?r.index:-1,ue=M!==-1,le=new mi(n.level,n.sn,n.stats.chunkCount,i.byteLength,M,ue),Pe=this.initPTS[n.cc];O.push(i,v,C,c,n,r,h.totalduration,p,le,Pe)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio!==0;if(Xn(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.altAudio=0,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=Xn(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 h=n[l];if(h.id==="main"){if(i=l,r=h,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===J.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===Yt.PARSED&&(this.state=Yt.IDLE);return}const l=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*l.total/(l.buffering.end-l.loading.first)),Ie(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&Vn.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=Yt.ERROR;return}switch(t.details){case W.FRAG_GAP:case W.FRAG_PARSING_ERROR:case W.FRAG_DECRYPT_ERROR:case W.FRAG_LOAD_ERROR:case W.FRAG_LOAD_TIMEOUT:case W.KEY_LOAD_ERROR:case W.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(J.MAIN,t);break;case W.LEVEL_LOAD_ERROR:case W.LEVEL_LOAD_TIMEOUT:case W.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Yt.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===ne.LEVEL&&(this.state=Yt.IDLE);break;case W.BUFFER_ADD_CODEC_ERROR:case W.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case W.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 W.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=Yt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==N.AUDIO||!this.altAudio){const n=(t===N.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,J.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=Vn.getBuffered(e),l=s.length?s.start(0):0,h=l-n,c=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||h>0&&(h<c||this.loadingParts&&h<2*((i==null?void 0:i.partTarget)||0)))&&(this.log(`adjusting start position by ${h} to match buffer start`),n+=h,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=Yt.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===Yt.STOPPED||this.state===Yt.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:h,level:c}=s,{video:p,text:v,id3:C,initSegment:O}=r,{details:M}=c,ue=this.altAudio?void 0:r.audio;if(this.fragContextChanged(l)){this.fragmentTracker.removeFragment(l);return}if(this.state=Yt.PARSING,O){const le=O.tracks;if(le){const ut=l.initSegment||l;if(this.unhandledEncryptionError(O,l))return;this._bufferInitSegment(c,le,ut,i),n.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:ut,id:t,tracks:le})}const Pe=O.initPTS,je=O.timescale,Ye=this.initPTS[l.cc];if(d(Pe)&&(!Ye||Ye.baseTime!==Pe||Ye.timescale!==je)){const ut=O.trackId;this.initPTS[l.cc]={baseTime:Pe,timescale:je,trackId:ut},n.trigger(g.INIT_PTS_FOUND,{frag:l,id:t,initPTS:Pe,timescale:je,trackId:ut})}}if(p&&M){ue&&p.type==="audiovideo"&&this.logMuxedErr(l);const le=M.fragments[l.sn-1-M.startSN],Pe=l.sn===M.startSN,je=!le||l.cc>le.cc;if(r.independent!==!1){const{startPTS:Ye,endPTS:ut,startDTS:yt,endDTS:zt}=p;if(h)h.elementaryStreams[p.type]={startPTS:Ye,endPTS:ut,startDTS:yt,endDTS:zt};else if(p.firstKeyFrame&&p.independent&&i.id===1&&!je&&(this.couldBacktrack=!0),p.dropped&&p.independent){const Et=this.getMainFwdBufferInfo(),Bt=(Et?Et.end:this.getLoadPosition())+this.config.maxBufferHole,Mt=p.firstKeyFramePTS?p.firstKeyFramePTS:Ye;if(!Pe&&Bt<Mt-this.config.maxBufferHole&&!je){this.backtrack(l);return}else je&&(l.gap=!0);l.setElementaryStreamInfo(p.type,l.start,ut,l.start,zt,!0)}else Pe&&Ye-(M.appliedTimelineOffset||0)>Eo&&(l.gap=!0);l.setElementaryStreamInfo(p.type,Ye,ut,yt,zt),this.backtrackFragment&&(this.backtrackFragment=l),this.bufferFragmentData(p,l,h,i,Pe||je)}else if(Pe||je)l.gap=!0;else{this.backtrack(l);return}}if(ue){const{startPTS:le,endPTS:Pe,startDTS:je,endDTS:Ye}=ue;h&&(h.elementaryStreams[N.AUDIO]={startPTS:le,endPTS:Pe,startDTS:je,endDTS:Ye}),l.setElementaryStreamInfo(N.AUDIO,le,Pe,je,Ye),this.bufferFragmentData(ue,l,h,i)}if(M&&C!=null&&C.samples.length){const le={id:t,frag:l,details:M,samples:C.samples};n.trigger(g.FRAG_PARSING_METADATA,le)}if(M&&v){const le={id:t,frag:l,details:M,samples:v.samples};n.trigger(g.FRAG_PARSING_USERDATA,le)}}logMuxedErr(e){this.warn(`${Ie(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==Yt.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 C=i.metadata;C&&"channelCount"in C&&(C.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=J.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=J.MAIN;const c=s.codec;if((c==null?void 0:c.length)===4)switch(c){case"hvc1":case"hev1":s.codec="hvc1.1.6.L120.90";break;case"av01":s.codec="av01.0.04M.08";break;case"avc1":s.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${c}]${s.codec!==c?" parsed-corrected="+s.codec:""}${s.supplemental?" supplemental="+s.supplemental:""}`),delete t.audiovideo}l&&(this.log(`Init audiovideo buffer, container:${l.container}, codecs[level/parsed]=[${e.codecs}/${l.codec}]`),delete t.video,delete t.audio);const h=Object.keys(t);if(h.length){if(this.hls.trigger(g.BUFFER_CODECS,t),!this.hls)return;h.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,J.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=Yt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(Vn.isBuffered(e,n)?t=this.getAppendedFrag(n):Vn.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 d(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(d(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?rr(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 re{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=W.KEY_LOAD_ERROR,n,r,i){return new nr({type:ye.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&&(!Ie(e)||!Ie(s)||e.sn<s.sn)||!n&&r==i-1)return this.emeController.selectKeySystemFormat(s).then(l=>{if(!this.emeController)return;s.setKeyFormat(l);const h=Ei(l);if(h)return this.emeController.getKeySystemAccess([h])})}if(this.config.requireKeySystemAccessOnStart){const r=Ri(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,W.KEY_LOAD_ERROR,c))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,W.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const l=cl(i);let h=this.keyIdToKeyInfo[l];if((n=h)!=null&&n.decryptdata.key)return i.key=h.decryptdata.key,Promise.resolve({frag:e,keyInfo:h});if(this.emeController&&(r=h)!=null&&r.keyLoadPromise)switch(this.emeController.getKeyStatus(h.decryptdata)){case"usable":case"usable-in-future":return h.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: "+K(i.keyId):""} URI: ${i.uri} from ${e.type} ${e.level}`),h=this.keyIdToKeyInfo[l]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(h,e):this.loadKeyEME(h,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(h,e);default:return Promise.reject(this.createKeyLoadError(e,W.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=ct(t.initSegment.data);if(s.length){let l=s[0];l.some(h=>h!==0)?(this.log(`Using keyId found in init segment ${K(l)}`),si.setKeyIdForUri(e.decryptdata.uri,l)):(l=si.addKeyIdForUri(e.decryptdata.uri),this.log(`Generating keyId to patch media ${K(l)}`)),e.decryptdata.keyId=l}}if(!e.decryptdata.keyId&&!Ie(t))return Promise.resolve(n);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 h={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:(C,O,M,ue)=>{const{frag:le,keyInfo:Pe}=M,je=cl(Pe.decryptdata);if(!le.decryptdata||Pe!==this.keyIdToKeyInfo[je])return l(this.createKeyLoadError(le,W.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),ue));Pe.decryptdata.key=le.decryptdata.key=new Uint8Array(C.data),le.keyLoader=null,Pe.loader=null,s({frag:le,keyInfo:Pe})},onError:(C,O,M,ue)=>{this.resetLoader(O),l(this.createKeyLoadError(t,W.KEY_LOAD_ERROR,new Error(`HTTP Error ${C.code} loading key ${C.text}`),M,A({url:h.url,data:void 0},C)))},onTimeout:(C,O,M)=>{this.resetLoader(O),l(this.createKeyLoadError(t,W.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),M))},onAbort:(C,O,M)=>{this.resetLoader(O),l(this.createKeyLoadError(t,W.INTERNAL_ABORTED,new Error("key loading aborted"),M))}};i.load(h,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!==sr.FAIRPLAY){const e=a.keyId;if(e)return K(e)}return a.uri}function mu(a){const{type:e}=a;switch(e){case ne.AUDIO_TRACK:return J.AUDIO;case ne.SUBTITLE_TRACK:return J.SUBTITLE;default:return J.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:ne.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:i,url:s,deliveryDirectives:l,levelInfo:h}=t;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:ne.LEVEL,url:s,deliveryDirectives:l,levelOrTrack:h})}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:ne.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:ne.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onLevelsUpdated(e,t){const n=this.loaders[ne.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[ne.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===ne.MANIFEST?i=n.manifestLoadPolicy.default:i=S({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),d((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===ne.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===ne.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===ne.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const p=c.partTarget,v=c.targetduration;if(p&&v){const C=Math.max(p*3,v*.8)*1e3;i=S({},i,{maxTimeToFirstByteMs:Math.min(C,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(C,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},l={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},h={onSuccess:(c,p,v,C)=>{const O=this.getInternalLoader(v);this.resetInternalLoader(v.type);const M=c.data;p.parsing.start=performance.now(),Fi.isMediaPlaylist(M)||v.type!==ne.MANIFEST?this.handleTrackOrLevelPlaylist(c,p,v,C||null,O):this.handleMasterPlaylist(c,p,v,C)},onError:(c,p,v,C)=>{this.handleNetworkError(p,v,!1,c,C)},onTimeout:(c,p,v)=>{this.handleNetworkError(p,v,!0,void 0,c)}};r.load(e,l,h)}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),h=Fi.parseMasterPlaylist(s,l);if(h.playlistParsingError){t.parsing.end=performance.now(),this.handleManifestParsingError(e,n,h.playlistParsingError,r,t);return}const{contentSteering:c,levels:p,sessionData:v,sessionKeys:C,startTimeOffset:O,variableList:M}=h;this.variableList=M,p.forEach(je=>{const{unknownCodecs:Ye}=je;if(Ye){const{preferManagedMediaSource:ut}=this.hls.config;let{audioCodec:yt,videoCodec:zt}=je;for(let Et=Ye.length;Et--;){const Bt=Ye[Et];Me(Bt,"audio",ut)?(je.audioCodec=yt=yt?`${yt},${Bt}`:Bt,xt.audio[yt.substring(0,4)]=2,Ye.splice(Et,1)):Me(Bt,"video",ut)&&(je.videoCodec=zt=zt?`${zt},${Bt}`:Bt,xt.video[zt.substring(0,4)]=2,Ye.splice(Et,1))}}});const{AUDIO:ue=[],SUBTITLES:le,"CLOSED-CAPTIONS":Pe}=Fi.parseMasterPlaylistMedia(s,l,h);ue.length&&!ue.some(Ye=>!Ye.url)&&p[0].audioCodec&&!p[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),ue.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Gn({}),bitrate:0,url:""})),i.trigger(g.MANIFEST_LOADED,{levels:p,audioTracks:ue,subtitles:le,captions:Pe,contentSteering:c,url:l,stats:t,networkDetails:r,sessionData:v,sessionKeys:C,startTimeOffset:O,variableList:M})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:l,level:h,type:c}=n,p=dl(e,n),v=d(h)?h:d(l)?l:0,C=mu(n),O=Fi.parseLevelPlaylist(e.data,p,v,C,0,this.variableList);if(c===ne.MANIFEST){const M={attrs:new Gn({}),bitrate:0,details:O,name:"",url:p};O.requestScheduled=t.loading.start+wr(O,0),s.trigger(g.MANIFEST_LOADED,{levels:[M],audioTracks:[],url:p,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=O,this.handlePlaylistLoaded(O,e,t,n,r,i)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(g.ERROR,{type:ye.NETWORK_ERROR,details:W.MANIFEST_PARSING_ERROR,fatal:t.type===ne.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===ne.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===ne.AUDIO_TRACK||e.type===ne.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let h=W.UNKNOWN,c=!1;const p=this.getInternalLoader(e);switch(e.type){case ne.MANIFEST:h=n?W.MANIFEST_LOAD_TIMEOUT:W.MANIFEST_LOAD_ERROR,c=!0;break;case ne.LEVEL:h=n?W.LEVEL_LOAD_TIMEOUT:W.LEVEL_LOAD_ERROR,c=!1;break;case ne.AUDIO_TRACK:h=n?W.AUDIO_TRACK_LOAD_TIMEOUT:W.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case ne.SUBTITLE_TRACK:h=n?W.SUBTITLE_TRACK_LOAD_TIMEOUT:W.SUBTITLE_LOAD_ERROR,c=!1;break}p&&this.resetInternalLoader(e.type);const v={type:ye.NETWORK_ERROR,details:h,fatal:c,url:e.url,loader:p,context:e,error:l,networkDetails:t,stats:i};if(r){const C=(t==null?void 0:t.url)||e.url;v.response=A({url:C,data:void 0},r)}this.hls.trigger(g.ERROR,v)}handlePlaylistLoaded(e,t,n,r,i,s){const l=this.hls,{type:h,level:c,levelOrTrack:p,id:v,groupId:C,deliveryDirectives:O}=r,M=dl(t,r),ue=mu(r);let le=typeof r.level=="number"&&ue===J.MAIN?c:void 0;const Pe=e.playlistParsingError;if(Pe){if(this.hls.logger.warn(`${Pe} ${e.url}`),!l.config.ignorePlaylistParsingErrors){l.trigger(g.ERROR,{type:ye.NETWORK_ERROR,details:W.LEVEL_PARSING_ERROR,fatal:!1,url:M,error:Pe,reason:Pe.message,response:t,context:r,level:le,parent:ue,networkDetails:i,stats:n});return}e.playlistParsingError=null}if(!e.fragments.length){const je=e.playlistParsingError=new Error("No Segments found in Playlist");l.trigger(g.ERROR,{type:ye.NETWORK_ERROR,details:W.LEVEL_EMPTY_ERROR,fatal:!1,url:M,error:je,reason:je.message,response:t,context:r,level:le,parent:ue,networkDetails:i,stats:n});return}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),h){case ne.MANIFEST:case ne.LEVEL:if(le){if(!p)le=0;else if(p!==l.levels[le]){const je=l.levels.indexOf(p);je>-1&&(le=je)}}l.trigger(g.LEVEL_LOADED,{details:e,levelInfo:p||l.levels[0],level:le||0,id:v||0,stats:n,networkDetails:i,deliveryDirectives:O,withoutMultiVariant:h===ne.MANIFEST});break;case ne.AUDIO_TRACK:l.trigger(g.AUDIO_TRACK_LOADED,{details:e,track:p,id:v||0,groupId:C||"",stats:n,networkDetails:i,deliveryDirectives:O});break;case ne.SUBTITLE_TRACK:l.trigger(g.SUBTITLE_TRACK_LOADED,{details:e,track:p,id:v||0,groupId:C||"",stats:n,networkDetails:i,deliveryDirectives:O});break}}}class zs{static get version(){return Ys}static isMSESupported(){return fu()}static isSupported(){return N0()}static getMediaSource(){return Oe()}static get Events(){return g}static get MetadataSchema(){return Ai}static get ErrorTypes(){return ye}static get ErrorDetails(){return W}static get DefaultConfig(){return zs.defaultConfig?zs.defaultConfig:T0}static set DefaultConfig(e){zs.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new da,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;const t=this.logger=we(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=A0(zs.DefaultConfig,e,t);this.userConfig=e,n.progressive&&D0(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:l,fpsController:h}=n,c=new l(this),p=this.abrController=new r(this),v=new xi(this),C=n.interstitialsController,O=C?this.interstitialsController=new C(this,zs):null,M=this.bufferController=new i(this,v),ue=this.capLevelController=new s(this),le=new h(this),Pe=new j0(this),je=n.contentSteeringController,Ye=je?new je(this):null,ut=this.levelController=new B0(this,Ye),yt=new O0(this),zt=new z0(this.config,this.logger),Et=this.streamController=new U0(this,v,zt),Bt=this.gapController=new k0(this,v);ue.setStreamController(Et),le.setStreamController(Et);const Mt=[Pe,ut,Et];O&&Mt.splice(1,0,O),Ye&&Mt.splice(1,0,Ye),this.networkControllers=Mt;const Dt=[p,M,Bt,ue,le,yt,v];this.audioTrackController=this.createController(n.audioTrackController,Mt);const en=n.audioStreamController;en&&Mt.push(this.audioStreamController=new en(this,v,zt)),this.subtitleTrackController=this.createController(n.subtitleTrackController,Mt);const En=n.subtitleStreamController;En&&Mt.push(this.subtititleStreamController=new En(this,v,zt)),this.createController(n.timelineController,Dt),zt.emeController=this.emeController=this.createController(n.emeController,Dt),this.cmcdController=this.createController(n.cmcdController,Dt),this.latencyController=this.createController(M0,Dt),this.coreComponents=Dt,Mt.push(c);const Bn=c.onErrorOut;typeof Bn=="function"&&this.on(g.ERROR,Bn,c),this.on(g.MANIFEST_LOADED,Pe.onManifestLoaded,Pe)}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:ye.OTHER_ERROR,details:W.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:ye.OTHER_ERROR,details:W.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=b.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={[J.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[J.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[J.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=kc()),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=Pt(t);return te(e,n,navigator.mediaCapabilities)}}zs.defaultConfig=void 0}}]);
|
|
}()); |