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

1270 lines
1.4 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

!(function(){var Yo=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[9716],{70557:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return y}});var H=_(96663),I=_(59301),V={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"},P=V,F=_(7657),R=function(v,f){return I.createElement(F.Z,(0,H.Z)({},v,{ref:f,icon:P}))},B=I.forwardRef(R),y=B},84105:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return y}});var H=_(96663),I=_(59301),V={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"},P=V,F=_(7657),R=function(v,f){return I.createElement(F.Z,(0,H.Z)({},v,{ref:f,icon:P}))},B=I.forwardRef(R),y=B},73331:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return y}});var H=_(96663),I=_(59301),V={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"},P=V,F=_(7657),R=function(v,f){return I.createElement(F.Z,(0,H.Z)({},v,{ref:f,icon:P}))},B=I.forwardRef(R),y=B},15277:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return y}});var H=_(96663),I=_(59301),V={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"},P=V,F=_(7657),R=function(v,f){return I.createElement(F.Z,(0,H.Z)({},v,{ref:f,icon:P}))},B=I.forwardRef(R),y=B},47472:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return y}});var H=_(96663),I=_(59301),V={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"},P=V,F=_(7657),R=function(v,f){return I.createElement(F.Z,(0,H.Z)({},v,{ref:f,icon:P}))},B=I.forwardRef(R),y=B},87395:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return y}});var H=_(96663),I=_(59301),V={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},P=V,F=_(7657),R=function(v,f){return I.createElement(F.Z,(0,H.Z)({},v,{ref:f,icon:P}))},B=I.forwardRef(R),y=B},35593:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return Ft}});var H=_(44127),I=_(72071),V=_(6620),P=_(43403),F=_(92310),R=_.n(F),B=_(29301),y=_(76846),i=_(96452),v=_(6089),f=_(80402),h=_(34280),n=_(49658),o=_(59301),u=_(96663),S=_(77900),O=_(8654);function T(Ie){var Ze=Ie.prefixCls,Fe=Ie.align,it=Ie.arrow,nt=Ie.arrowPos,ue=it||{},ye=ue.className,Te=ue.content,Ae=nt.x,Me=Ae===void 0?0:Ae,ze=nt.y,qe=ze===void 0?0:ze,rt=o.useRef();if(!Fe||!Fe.points)return null;var Xe={position:"absolute"};if(Fe.autoArrow!==!1){var He=Fe.points[0],lt=Fe.points[1],gt=He[0],ft=He[1],_t=lt[0],wt=lt[1];gt===_t||!["t","b"].includes(gt)?Xe.top=qe:gt==="t"?Xe.top=0:Xe.bottom=0,ft===wt||!["l","r"].includes(ft)?Xe.left=Me:ft==="l"?Xe.left=0:Xe.right=0}return o.createElement("div",{ref:rt,className:R()("".concat(Ze,"-arrow"),ye),style:Xe},Te)}function E(Ie){var Ze=Ie.prefixCls,Fe=Ie.open,it=Ie.zIndex,nt=Ie.mask,ue=Ie.motion;return nt?o.createElement(S.default,(0,u.Z)({},ue,{motionAppear:!0,visible:Fe,removeOnLeave:!0}),function(ye){var Te=ye.className;return o.createElement("div",{style:{zIndex:it},className:R()("".concat(Ze,"-mask"),Te)})}):null}var C=o.memo(function(Ie){var Ze=Ie.children;return Ze},function(Ie,Ze){return Ze.cache}),j=C,x=o.forwardRef(function(Ie,Ze){var Fe=Ie.popup,it=Ie.className,nt=Ie.prefixCls,ue=Ie.style,ye=Ie.target,Te=Ie.onVisibleChanged,Ae=Ie.open,Me=Ie.keepDom,ze=Ie.fresh,qe=Ie.onClick,rt=Ie.mask,Xe=Ie.arrow,He=Ie.arrowPos,lt=Ie.align,gt=Ie.motion,ft=Ie.maskMotion,_t=Ie.forceRender,wt=Ie.getPopupContainer,mt=Ie.autoDestroy,kt=Ie.portal,bt=Ie.zIndex,$=Ie.onMouseEnter,G=Ie.onMouseLeave,Qe=Ie.onPointerEnter,ae=Ie.ready,be=Ie.offsetX,Kt=Ie.offsetY,Ee=Ie.offsetR,Pe=Ie.offsetB,Ne=Ie.onAlign,ce=Ie.onPrepare,de=Ie.stretch,we=Ie.targetWidth,Le=Ie.targetHeight,ne=typeof Fe=="function"?Fe():Fe,dt=Ae||Me,Se=(wt==null?void 0:wt.length)>0,Dt=o.useState(!wt||!Se),Pt=(0,I.Z)(Dt,2),Ht=Pt[0],sr=Pt[1];if((0,h.Z)(function(){!Ht&&Se&&ye&&sr(!0)},[Ht,Se,ye]),!Ht)return null;var St="auto",Et={left:"-1000vw",top:"-1000vh",right:St,bottom:St};if(ae||!Ae){var ur,Rr=lt.points,$r=lt.dynamicInset||((ur=lt._experimental)===null||ur===void 0?void 0:ur.dynamicInset),zr=$r&&Rr[0][1]==="r",Rt=$r&&Rr[0][0]==="b";zr?(Et.right=Ee,Et.left=St):(Et.left=be,Et.right=St),Rt?(Et.bottom=Pe,Et.top=St):(Et.top=Kt,Et.bottom=St)}var Zt={};return de&&(de.includes("height")&&Le?Zt.height=Le:de.includes("minHeight")&&Le&&(Zt.minHeight=Le),de.includes("width")&&we?Zt.width=we:de.includes("minWidth")&&we&&(Zt.minWidth=we)),Ae||(Zt.pointerEvents="none"),o.createElement(kt,{open:_t||dt,getContainer:wt&&function(){return wt(ye)},autoDestroy:mt},o.createElement(E,{prefixCls:nt,open:Ae,zIndex:bt,mask:rt,motion:ft}),o.createElement(B.Z,{onResize:Ne,disabled:!Ae},function(_r){return o.createElement(S.default,(0,u.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:_t,leavedClassName:"".concat(nt,"-hidden")},gt,{onAppearPrepare:ce,onEnterPrepare:ce,visible:Ae,onVisibleChanged:function(Or){var ti;gt==null||(ti=gt.onVisibleChanged)===null||ti===void 0||ti.call(gt,Or),Te(Or)}}),function(jr,Or){var ti=jr.className,cr=jr.style,xi=R()(nt,ti,it);return o.createElement("div",{ref:(0,O.sQ)(_r,Ze,Or),className:xi,style:(0,H.Z)((0,H.Z)((0,H.Z)((0,H.Z)({"--arrow-x":"".concat(He.x||0,"px"),"--arrow-y":"".concat(He.y||0,"px")},Et),Zt),cr),{},{boxSizing:"border-box",zIndex:bt},ue),onMouseEnter:$,onMouseLeave:G,onPointerEnter:Qe,onClick:qe},Xe&&o.createElement(T,{prefixCls:nt,arrow:Xe,arrowPos:He,align:lt}),o.createElement(j,{cache:!Ae&&!ze},ne))})}))}),L=x,N=o.forwardRef(function(Ie,Ze){var Fe=Ie.children,it=Ie.getTriggerDOMNode,nt=(0,O.Yr)(Fe),ue=o.useCallback(function(Te){(0,O.mH)(Ze,it?it(Te):Te)},[it]),ye=(0,O.x1)(ue,Fe.ref);return nt?o.cloneElement(Fe,{ref:ye}):Fe}),z=N,te=o.createContext(null),J=te;function ge(Ie){return Ie?Array.isArray(Ie)?Ie:[Ie]:[]}function _e(Ie,Ze,Fe,it){return o.useMemo(function(){var nt=ge(Fe!=null?Fe:Ze),ue=ge(it!=null?it:Ze),ye=new Set(nt),Te=new Set(ue);return Ie&&(ye.has("hover")&&(ye.delete("hover"),ye.add("click")),Te.has("hover")&&(Te.delete("hover"),Te.add("click"))),[ye,Te]},[Ie,Ze,Fe,it])}var se=_(29194);function Y(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Fe=arguments.length>2?arguments[2]:void 0;return Fe?Ie[0]===Ze[0]:Ie[0]===Ze[0]&&Ie[1]===Ze[1]}function ie(Ie,Ze,Fe,it){for(var nt=Fe.points,ue=Object.keys(Ie),ye=0;ye<ue.length;ye+=1){var Te,Ae=ue[ye];if(Y((Te=Ie[Ae])===null||Te===void 0?void 0:Te.points,nt,it))return"".concat(Ze,"-placement-").concat(Ae)}return""}function U(Ie,Ze,Fe,it){return Ze||(Fe?{motionName:"".concat(Ie,"-").concat(Fe)}:it?{motionName:it}:null)}function Z(Ie){return Ie.ownerDocument.defaultView}function K(Ie){for(var Ze=[],Fe=Ie==null?void 0:Ie.parentElement,it=["hidden","scroll","clip","auto"];Fe;){var nt=Z(Fe).getComputedStyle(Fe),ue=nt.overflowX,ye=nt.overflowY,Te=nt.overflow;[ue,ye,Te].some(function(Ae){return it.includes(Ae)})&&Ze.push(Fe),Fe=Fe.parentElement}return Ze}function k(Ie){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Ie)?Ze:Ie}function D(Ie){return k(parseFloat(Ie),0)}function re(Ie,Ze){var Fe=(0,H.Z)({},Ie);return(Ze||[]).forEach(function(it){if(!(it instanceof HTMLBodyElement||it instanceof HTMLHtmlElement)){var nt=Z(it).getComputedStyle(it),ue=nt.overflow,ye=nt.overflowClipMargin,Te=nt.borderTopWidth,Ae=nt.borderBottomWidth,Me=nt.borderLeftWidth,ze=nt.borderRightWidth,qe=it.getBoundingClientRect(),rt=it.offsetHeight,Xe=it.clientHeight,He=it.offsetWidth,lt=it.clientWidth,gt=D(Te),ft=D(Ae),_t=D(Me),wt=D(ze),mt=k(Math.round(qe.width/He*1e3)/1e3),kt=k(Math.round(qe.height/rt*1e3)/1e3),bt=(He-lt-_t-wt)*mt,$=(rt-Xe-gt-ft)*kt,G=gt*kt,Qe=ft*kt,ae=_t*mt,be=wt*mt,Kt=0,Ee=0;if(ue==="clip"){var Pe=D(ye);Kt=Pe*mt,Ee=Pe*kt}var Ne=qe.x+ae-Kt,ce=qe.y+G-Ee,de=Ne+qe.width+2*Kt-ae-be-bt,we=ce+qe.height+2*Ee-G-Qe-$;Fe.left=Math.max(Fe.left,Ne),Fe.top=Math.max(Fe.top,ce),Fe.right=Math.min(Fe.right,de),Fe.bottom=Math.min(Fe.bottom,we)}}),Fe}function pe(Ie){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Fe="".concat(Ze),it=Fe.match(/^(.*)\%$/);return it?Ie*(parseFloat(it[1])/100):parseFloat(Fe)}function Oe(Ie,Ze){var Fe=Ze||[],it=(0,I.Z)(Fe,2),nt=it[0],ue=it[1];return[pe(Ie.width,nt),pe(Ie.height,ue)]}function $e(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Ie[0],Ie[1]]}function Ge(Ie,Ze){var Fe=Ze[0],it=Ze[1],nt,ue;return Fe==="t"?ue=Ie.y:Fe==="b"?ue=Ie.y+Ie.height:ue=Ie.y+Ie.height/2,it==="l"?nt=Ie.x:it==="r"?nt=Ie.x+Ie.width:nt=Ie.x+Ie.width/2,{x:nt,y:ue}}function ke(Ie,Ze){var Fe={t:"b",b:"t",l:"r",r:"l"};return Ie.map(function(it,nt){return nt===Ze?Fe[it]||"c":it}).join("")}function et(Ie,Ze,Fe,it,nt,ue,ye){var Te=o.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:nt[it]||{}}),Ae=(0,I.Z)(Te,2),Me=Ae[0],ze=Ae[1],qe=o.useRef(0),rt=o.useMemo(function(){return Ze?K(Ze):[]},[Ze]),Xe=o.useRef({}),He=function(){Xe.current={}};Ie||He();var lt=(0,v.Z)(function(){if(Ze&&Fe&&Ie){let ei=function(Oi,Ui){var tn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xi,zi=ne.x+Oi,Pn=ne.y+Ui,Mn=zi+ur,Wn=Pn+Et,wn=Math.max(zi,tn.left),es=Math.max(Pn,tn.top),Fn=Math.min(Mn,tn.right),ts=Math.min(Wn,tn.bottom);return Math.max(0,(Fn-wn)*(ts-es))},xr=function(){Xt=ne.y+vr,Mr=Xt+Et,Wi=ne.x+pr,on=Wi+ur};var _t,wt,mt=Ze,kt=mt.ownerDocument,bt=Z(mt),$=bt.getComputedStyle(mt),G=$.width,Qe=$.height,ae=$.position,be=mt.style.left,Kt=mt.style.top,Ee=mt.style.right,Pe=mt.style.bottom,Ne=mt.style.overflow,ce=(0,H.Z)((0,H.Z)({},nt[it]),ue),de=kt.createElement("div");(_t=mt.parentElement)===null||_t===void 0||_t.appendChild(de),de.style.left="".concat(mt.offsetLeft,"px"),de.style.top="".concat(mt.offsetTop,"px"),de.style.position=ae,de.style.height="".concat(mt.offsetHeight,"px"),de.style.width="".concat(mt.offsetWidth,"px"),mt.style.left="0",mt.style.top="0",mt.style.right="auto",mt.style.bottom="auto",mt.style.overflow="hidden";var we;if(Array.isArray(Fe))we={x:Fe[0],y:Fe[1],width:0,height:0};else{var Le=Fe.getBoundingClientRect();we={x:Le.x,y:Le.y,width:Le.width,height:Le.height}}var ne=mt.getBoundingClientRect(),dt=kt.documentElement,Se=dt.clientWidth,Dt=dt.clientHeight,Pt=dt.scrollWidth,Ht=dt.scrollHeight,sr=dt.scrollTop,St=dt.scrollLeft,Et=ne.height,ur=ne.width,Rr=we.height,$r=we.width,zr={left:0,top:0,right:Se,bottom:Dt},Rt={left:-St,top:-sr,right:Pt-St,bottom:Ht-sr},Zt=ce.htmlRegion,_r="visible",jr="visibleFirst";Zt!=="scroll"&&Zt!==jr&&(Zt=_r);var Or=Zt===jr,ti=re(Rt,rt),cr=re(zr,rt),xi=Zt===_r?cr:ti,ri=Or?cr:xi;mt.style.left="auto",mt.style.top="auto",mt.style.right="0",mt.style.bottom="0";var zt=mt.getBoundingClientRect();mt.style.left=be,mt.style.top=Kt,mt.style.right=Ee,mt.style.bottom=Pe,mt.style.overflow=Ne,(wt=mt.parentElement)===null||wt===void 0||wt.removeChild(de);var Tt=k(Math.round(ur/parseFloat(G)*1e3)/1e3),Qt=k(Math.round(Et/parseFloat(Qe)*1e3)/1e3);if(Tt===0||Qt===0||(0,y.Sh)(Fe)&&!(0,se.Z)(Fe))return;var Sr=ce.offset,yr=ce.targetOffset,Kr=Oe(ne,Sr),Mi=(0,I.Z)(Kr,2),Vr=Mi[0],Cr=Mi[1],Pr=Oe(we,yr),dr=(0,I.Z)(Pr,2),ii=dr[0],hi=dr[1];we.x-=ii,we.y-=hi;var Wr=ce.points||[],rr=(0,I.Z)(Wr,2),hr=rr[0],Ar=rr[1],Lr=$e(Ar),wr=$e(hr),si=Ge(we,Lr),yn=Ge(ne,wr),Li=(0,H.Z)({},ce),pr=si.x-yn.x+Vr,vr=si.y-yn.y+Cr,Fi=ei(pr,vr),Jr=ei(pr,vr,cr),ji=Ge(we,["t","l"]),bn=Ge(ne,["t","l"]),Rn=Ge(we,["b","r"]),xn=Ge(ne,["b","r"]),fi=ce.overflow||{},an=fi.adjustX,Sn=fi.adjustY,Ji=fi.shiftX,lr=fi.shiftY,Ue=function(Ui){return typeof Ui=="boolean"?Ui:Ui>=0},Xt,Mr,Wi,on;xr();var ln=Ue(Sn),Si=wr[0]===Lr[0];if(ln&&wr[0]==="t"&&(Mr>ri.bottom||Xe.current.bt)){var br=vr;Si?br-=Et-Rr:br=ji.y-xn.y-Cr;var wi=ei(pr,br),ki=ei(pr,br,cr);wi>Fi||wi===Fi&&(!Or||ki>=Jr)?(Xe.current.bt=!0,vr=br,Cr=-Cr,Li.points=[ke(wr,0),ke(Lr,0)]):Xe.current.bt=!1}if(ln&&wr[0]==="b"&&(Xt<ri.top||Xe.current.tb)){var qr=vr;Si?qr+=Et-Rr:qr=Rn.y-bn.y-Cr;var di=ei(pr,qr),Hn=ei(pr,qr,cr);di>Fi||di===Fi&&(!Or||Hn>=Jr)?(Xe.current.tb=!0,vr=qr,Cr=-Cr,Li.points=[ke(wr,0),ke(Lr,0)]):Xe.current.tb=!1}var Gi=Ue(an),Qi=wr[1]===Lr[1];if(Gi&&wr[1]==="l"&&(on>ri.right||Xe.current.rl)){var Nt=pr;Qi?Nt-=ur-$r:Nt=ji.x-xn.x-Vr;var Ai=ei(Nt,vr),Qr=ei(Nt,vr,cr);Ai>Fi||Ai===Fi&&(!Or||Qr>=Jr)?(Xe.current.rl=!0,pr=Nt,Vr=-Vr,Li.points=[ke(wr,1),ke(Lr,1)]):Xe.current.rl=!1}if(Gi&&wr[1]==="r"&&(Wi<ri.left||Xe.current.lr)){var pi=pr;Qi?pi+=ur-$r:pi=Rn.x-bn.x-Vr;var $n=ei(pi,vr),en=ei(pi,vr,cr);$n>Fi||$n===Fi&&(!Or||en>=Jr)?(Xe.current.lr=!0,pr=pi,Vr=-Vr,Li.points=[ke(wr,1),ke(Lr,1)]):Xe.current.lr=!1}xr();var Ki=Ji===!0?0:Ji;typeof Ki=="number"&&(Wi<cr.left&&(pr-=Wi-cr.left-Vr,we.x+$r<cr.left+Ki&&(pr+=we.x-cr.left+$r-Ki)),on>cr.right&&(pr-=on-cr.right-Vr,we.x>cr.right-Ki&&(pr+=we.x-cr.right+Ki)));var Bi=lr===!0?0:lr;typeof Bi=="number"&&(Xt<cr.top&&(vr-=Xt-cr.top-Cr,we.y+Rr<cr.top+Bi&&(vr+=we.y-cr.top+Rr-Bi)),Mr>cr.bottom&&(vr-=Mr-cr.bottom-Cr,we.y>cr.bottom-Bi&&(vr+=we.y-cr.bottom+Bi)));var Yr=ne.x+pr,Ni=Yr+ur,Ii=ne.y+vr,Ln=Ii+Et,mi=we.x,Ei=mi+$r,fr=we.y,un=fr+Rr,kn=Math.max(Yr,mi),In=Math.min(Ni,Ei),gi=(kn+In)/2,cn=gi-Yr,jn=Math.max(Ii,fr),yt=Math.min(Ln,un),_i=(jn+yt)/2,On=_i-Ii;ye==null||ye(Ze,Li);var hn=zt.right-ne.x-(pr+ne.width),ui=zt.bottom-ne.y-(vr+ne.height);ze({ready:!0,offsetX:pr/Tt,offsetY:vr/Qt,offsetR:hn/Tt,offsetB:ui/Qt,arrowX:cn/Tt,arrowY:On/Qt,scaleX:Tt,scaleY:Qt,align:Li})}}),gt=function(){qe.current+=1;var wt=qe.current;Promise.resolve().then(function(){qe.current===wt&&lt()})},ft=function(){ze(function(wt){return(0,H.Z)((0,H.Z)({},wt),{},{ready:!1})})};return(0,h.Z)(ft,[it]),(0,h.Z)(function(){Ie||ft()},[Ie]),[Me.ready,Me.offsetX,Me.offsetY,Me.offsetR,Me.offsetB,Me.arrowX,Me.arrowY,Me.scaleX,Me.scaleY,Me.align,gt]}var Ke=_(19127);function tt(Ie,Ze,Fe,it,nt){(0,h.Z)(function(){if(Ie&&Ze&&Fe){let qe=function(){it(),nt()};var ue=Ze,ye=Fe,Te=K(ue),Ae=K(ye),Me=Z(ye),ze=new Set([Me].concat((0,Ke.Z)(Te),(0,Ke.Z)(Ae)));return ze.forEach(function(rt){rt.addEventListener("scroll",qe,{passive:!0})}),Me.addEventListener("resize",qe,{passive:!0}),it(),function(){ze.forEach(function(rt){rt.removeEventListener("scroll",qe),Me.removeEventListener("resize",qe)})}}},[Ie,Ze,Fe])}var It=_(48736),Yt=_(16089);function qt(Ie,Ze,Fe,it,nt,ue,ye,Te){var Ae=o.useRef(Ie),Me=o.useRef(!1);Ae.current!==Ie&&(Me.current=!0,Ae.current=Ie),o.useEffect(function(){var ze=(0,Yt.Z)(function(){Me.current=!1});return function(){Yt.Z.cancel(ze)}},[Ie]),o.useEffect(function(){if(Ze&&it&&(!nt||ue)){var ze=function(){var ae=!1,be=function(Pe){var Ne=Pe.target;ae=ye(Ne)},Kt=function(Pe){var Ne=Pe.target;!Me.current&&Ae.current&&!ae&&!ye(Ne)&&Te(!1)};return[be,Kt]},qe=ze(),rt=(0,I.Z)(qe,2),Xe=rt[0],He=rt[1],lt=ze(),gt=(0,I.Z)(lt,2),ft=gt[0],_t=gt[1],wt=Z(it);wt.addEventListener("mousedown",Xe,!0),wt.addEventListener("click",He,!0),wt.addEventListener("contextmenu",He,!0);var mt=(0,i.A)(Fe);if(mt&&(mt.addEventListener("mousedown",ft,!0),mt.addEventListener("click",_t,!0),mt.addEventListener("contextmenu",_t,!0)),0)var kt,bt,$,G;return function(){wt.removeEventListener("mousedown",Xe,!0),wt.removeEventListener("click",He,!0),wt.removeEventListener("contextmenu",He,!0),mt&&(mt.removeEventListener("mousedown",ft,!0),mt.removeEventListener("click",_t,!0),mt.removeEventListener("contextmenu",_t,!0))}}},[Ze,Fe,it,nt,ue])}var Ot=["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 Ut(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:P.Z,Ze=o.forwardRef(function(Fe,it){var nt=Fe.prefixCls,ue=nt===void 0?"rc-trigger-popup":nt,ye=Fe.children,Te=Fe.action,Ae=Te===void 0?"hover":Te,Me=Fe.showAction,ze=Fe.hideAction,qe=Fe.popupVisible,rt=Fe.defaultPopupVisible,Xe=Fe.onPopupVisibleChange,He=Fe.afterPopupVisibleChange,lt=Fe.mouseEnterDelay,gt=Fe.mouseLeaveDelay,ft=gt===void 0?.1:gt,_t=Fe.focusDelay,wt=Fe.blurDelay,mt=Fe.mask,kt=Fe.maskClosable,bt=kt===void 0?!0:kt,$=Fe.getPopupContainer,G=Fe.forceRender,Qe=Fe.autoDestroy,ae=Fe.destroyPopupOnHide,be=Fe.popup,Kt=Fe.popupClassName,Ee=Fe.popupStyle,Pe=Fe.popupPlacement,Ne=Fe.builtinPlacements,ce=Ne===void 0?{}:Ne,de=Fe.popupAlign,we=Fe.zIndex,Le=Fe.stretch,ne=Fe.getPopupClassNameFromAlign,dt=Fe.fresh,Se=Fe.alignPoint,Dt=Fe.onPopupClick,Pt=Fe.onPopupAlign,Ht=Fe.arrow,sr=Fe.popupMotion,St=Fe.maskMotion,Et=Fe.popupTransitionName,ur=Fe.popupAnimation,Rr=Fe.maskTransitionName,$r=Fe.maskAnimation,zr=Fe.className,Rt=Fe.getTriggerDOMNode,Zt=(0,V.Z)(Fe,Ot),_r=Qe||ae||!1,jr=o.useState(!1),Or=(0,I.Z)(jr,2),ti=Or[0],cr=Or[1];(0,h.Z)(function(){cr((0,n.Z)())},[]);var xi=o.useRef({}),ri=o.useContext(J),zt=o.useMemo(function(){return{registerSubPopup:function(Mt,mr){xi.current[Mt]=mr,ri==null||ri.registerSubPopup(Mt,mr)}}},[ri]),Tt=(0,f.Z)(),Qt=o.useState(null),Sr=(0,I.Z)(Qt,2),yr=Sr[0],Kr=Sr[1],Mi=(0,v.Z)(function(Gt){(0,y.Sh)(Gt)&&yr!==Gt&&Kr(Gt),ri==null||ri.registerSubPopup(Tt,Gt)}),Vr=o.useState(null),Cr=(0,I.Z)(Vr,2),Pr=Cr[0],dr=Cr[1],ii=o.useRef(null),hi=(0,v.Z)(function(Gt){(0,y.Sh)(Gt)&&Pr!==Gt&&(dr(Gt),ii.current=Gt)}),Wr=o.Children.only(ye),rr=(Wr==null?void 0:Wr.props)||{},hr={},Ar=(0,v.Z)(function(Gt){var Mt,mr,Zr=Pr;return(Zr==null?void 0:Zr.contains(Gt))||((Mt=(0,i.A)(Zr))===null||Mt===void 0?void 0:Mt.host)===Gt||Gt===Zr||(yr==null?void 0:yr.contains(Gt))||((mr=(0,i.A)(yr))===null||mr===void 0?void 0:mr.host)===Gt||Gt===yr||Object.values(xi.current).some(function(Nr){return(Nr==null?void 0:Nr.contains(Gt))||Gt===Nr})}),Lr=U(ue,sr,ur,Et),wr=U(ue,St,$r,Rr),si=o.useState(rt||!1),yn=(0,I.Z)(si,2),Li=yn[0],pr=yn[1],vr=qe!=null?qe:Li,Fi=(0,v.Z)(function(Gt){qe===void 0&&pr(Gt)});(0,h.Z)(function(){pr(qe||!1)},[qe]);var Jr=o.useRef(vr);Jr.current=vr;var ji=o.useRef([]);ji.current=[];var bn=(0,v.Z)(function(Gt){var Mt;Fi(Gt),((Mt=ji.current[ji.current.length-1])!==null&&Mt!==void 0?Mt:vr)!==Gt&&(ji.current.push(Gt),Xe==null||Xe(Gt))}),Rn=o.useRef(),xn=function(){clearTimeout(Rn.current)},fi=function(Mt){var mr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;xn(),mr===0?bn(Mt):Rn.current=setTimeout(function(){bn(Mt)},mr*1e3)};o.useEffect(function(){return xn},[]);var an=o.useState(!1),Sn=(0,I.Z)(an,2),Ji=Sn[0],lr=Sn[1];(0,h.Z)(function(Gt){(!Gt||vr)&&lr(!0)},[vr]);var Ue=o.useState(null),Xt=(0,I.Z)(Ue,2),Mr=Xt[0],Wi=Xt[1],on=o.useState([0,0]),ln=(0,I.Z)(on,2),Si=ln[0],br=ln[1],wi=function(Mt){br([Mt.clientX,Mt.clientY])},ki=et(vr,yr,Se?Si:Pr,Pe,ce,de,Pt),qr=(0,I.Z)(ki,11),di=qr[0],Hn=qr[1],Gi=qr[2],Qi=qr[3],Nt=qr[4],Ai=qr[5],Qr=qr[6],pi=qr[7],$n=qr[8],en=qr[9],Ki=qr[10],Bi=_e(ti,Ae,Me,ze),Yr=(0,I.Z)(Bi,2),Ni=Yr[0],Ii=Yr[1],Ln=Ni.has("click"),mi=Ii.has("click")||Ii.has("contextMenu"),Ei=(0,v.Z)(function(){Ji||Ki()}),fr=function(){Jr.current&&Se&&mi&&fi(!1)};tt(vr,Pr,yr,Ei,fr),(0,h.Z)(function(){Ei()},[Si,Pe]),(0,h.Z)(function(){vr&&!(ce!=null&&ce[Pe])&&Ei()},[JSON.stringify(de)]);var un=o.useMemo(function(){var Gt=ie(ce,ue,en,Se);return R()(Gt,ne==null?void 0:ne(en))},[en,ne,ce,ue,Se]);o.useImperativeHandle(it,function(){return{nativeElement:ii.current,forceAlign:Ei}});var kn=o.useState(0),In=(0,I.Z)(kn,2),gi=In[0],cn=In[1],jn=o.useState(0),yt=(0,I.Z)(jn,2),_i=yt[0],On=yt[1],hn=function(){if(Le&&Pr){var Mt=Pr.getBoundingClientRect();cn(Mt.width),On(Mt.height)}},ui=function(){hn(),Ei()},ei=function(Mt){lr(!1),Ki(),He==null||He(Mt)},xr=function(){return new Promise(function(Mt){hn(),Wi(function(){return Mt})})};(0,h.Z)(function(){Mr&&(Ki(),Mr(),Wi(null))},[Mr]);function Oi(Gt,Mt,mr,Zr){hr[Gt]=function(Nr){var Ti;Zr==null||Zr(Nr),fi(Mt,mr);for(var Gn=arguments.length,Kn=new Array(Gn>1?Gn-1:0),Vi=1;Vi<Gn;Vi++)Kn[Vi-1]=arguments[Vi];(Ti=rr[Gt])===null||Ti===void 0||Ti.call.apply(Ti,[rr,Nr].concat(Kn))}}(Ln||mi)&&(hr.onClick=function(Gt){var Mt;Jr.current&&mi?fi(!1):!Jr.current&&Ln&&(wi(Gt),fi(!0));for(var mr=arguments.length,Zr=new Array(mr>1?mr-1:0),Nr=1;Nr<mr;Nr++)Zr[Nr-1]=arguments[Nr];(Mt=rr.onClick)===null||Mt===void 0||Mt.call.apply(Mt,[rr,Gt].concat(Zr))}),qt(vr,mi,Pr,yr,mt,bt,Ar,fi);var Ui=Ni.has("hover"),tn=Ii.has("hover"),zi,Pn;Ui&&(Oi("onMouseEnter",!0,lt,function(Gt){wi(Gt)}),Oi("onPointerEnter",!0,lt,function(Gt){wi(Gt)}),zi=function(Mt){(vr||Ji)&&yr!==null&&yr!==void 0&&yr.contains(Mt.target)&&fi(!0,lt)},Se&&(hr.onMouseMove=function(Gt){var Mt;(Mt=rr.onMouseMove)===null||Mt===void 0||Mt.call(rr,Gt)})),tn&&(Oi("onMouseLeave",!1,ft),Oi("onPointerLeave",!1,ft),Pn=function(){fi(!1,ft)}),Ni.has("focus")&&Oi("onFocus",!0,_t),Ii.has("focus")&&Oi("onBlur",!1,wt),Ni.has("contextMenu")&&(hr.onContextMenu=function(Gt){var Mt;Jr.current&&Ii.has("contextMenu")?fi(!1):(wi(Gt),fi(!0)),Gt.preventDefault();for(var mr=arguments.length,Zr=new Array(mr>1?mr-1:0),Nr=1;Nr<mr;Nr++)Zr[Nr-1]=arguments[Nr];(Mt=rr.onContextMenu)===null||Mt===void 0||Mt.call.apply(Mt,[rr,Gt].concat(Zr))}),zr&&(hr.className=R()(rr.className,zr));var Mn=(0,H.Z)((0,H.Z)({},rr),hr),Wn={},wn=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];wn.forEach(function(Gt){Zt[Gt]&&(Wn[Gt]=function(){for(var Mt,mr=arguments.length,Zr=new Array(mr),Nr=0;Nr<mr;Nr++)Zr[Nr]=arguments[Nr];(Mt=Mn[Gt])===null||Mt===void 0||Mt.call.apply(Mt,[Mn].concat(Zr)),Zt[Gt].apply(Zt,Zr)})});var es=o.cloneElement(Wr,(0,H.Z)((0,H.Z)({},Mn),Wn)),Fn={x:Ai,y:Qr},ts=Ht?(0,H.Z)({},Ht!==!0?Ht:{}):null;return o.createElement(o.Fragment,null,o.createElement(B.Z,{disabled:!vr,ref:hi,onResize:ui},o.createElement(z,{getTriggerDOMNode:Rt},es)),o.createElement(J.Provider,{value:zt},o.createElement(L,{portal:Ie,ref:Mi,prefixCls:ue,popup:be,className:R()(Kt,un),style:Ee,target:Pr,onMouseEnter:zi,onMouseLeave:Pn,onPointerEnter:zi,zIndex:we,open:vr,keepDom:Ji,fresh:dt,onClick:Dt,mask:mt,motion:Lr,maskMotion:wr,onVisibleChanged:ei,onPrepare:xr,forceRender:G,autoDestroy:_r,getPopupContainer:$,align:en,arrow:ts,arrowPos:Fn,ready:di,offsetX:Hn,offsetY:Gi,offsetR:Qi,offsetB:Nt,onAlign:Ei,stretch:Le,targetWidth:gi/pi,targetHeight:_i/$n})))});return Ze}var Ft=Ut(P.Z)},50304:function(){"use strict"},23257:function(xt,Re){"use strict";Re.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},8797:function(xt,Re,_){"use strict";var H=_(59301),I=_(93314),V=_(3113),P=Object.defineProperty,F=Object.defineProperties,R=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,v=(o,u,S)=>u in o?P(o,u,{enumerable:!0,configurable:!0,writable:!0,value:S}):o[u]=S,f=(o,u)=>{for(var S in u||(u={}))y.call(u,S)&&v(o,S,u[S]);if(B)for(var S of B(u))i.call(u,S)&&v(o,S,u[S]);return o},h=(o,u)=>F(o,R(u));const n=({img:o,buttonProps:u={},styles:S={},customText:O,ButtonText:T,ButtonClick:E,Buttonclass:C,ButtonTwo:j,imgStyles:x,loading:L=!1})=>H.createElement("section",{className:"tc animated fadeIn",style:f(f({},{color:"#999",margin:"100px auto",visibility:L?"hidden":"visible"}),S)},H.createElement("img",{src:o||I,style:h(f({},x),{pointerEvents:"none",userSelect:"none"})}),H.createElement("p",{className:"mt20 font14"},O||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),T&&H.createElement(V.ZP,f({className:C,onClick:E},u),T),j&&j);Re.Z=n},23210:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return C}});var H=_(59301),I={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},V=_(3113),P=_(70557),F=_(23954),R=_(6848),B=_(955),y=_(94941),i=_(8797),v=_(3294),f=_(19381),h=_(59301),n=Object.defineProperty,o=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,O=(j,x,L)=>x in j?n(j,x,{enumerable:!0,configurable:!0,writable:!0,value:L}):j[x]=L,T=(j,x)=>{for(var L in x||(x={}))u.call(x,L)&&O(j,L,x[L]);if(o)for(var L of o(x))S.call(x,L)&&O(j,L,x[L]);return j},E=(j,x,L)=>new Promise((N,z)=>{var te=_e=>{try{ge(L.next(_e))}catch(se){z(se)}},J=_e=>{try{ge(L.throw(_e))}catch(se){z(se)}},ge=_e=>_e.done?N(_e.value):Promise.resolve(_e.value).then(te,J);ge((L=L.apply(j,x)).next())}),C=({editOffice:j="view",data:x,theme:L,type:N,filename:z,monacoEditor:te,className:J,style:ge,close:_e,onClose:se,hasMask:Y,disabledDownload:ie,onImgDimensions:U,showNodata:Z,recordInfo:K})=>{const[k,D]=(0,H.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[re,pe]=(0,H.useState)(""),[Oe,$e]=(0,H.useState)(),Ge=window.ENV==="build"?"/react/build":"",ke=location.host.startsWith("localhost")?v.Z.PROXY_SERVER:v.Z.API_SERVER,Ke=10*(1024*1024),tt=(0,H.useRef)();x!=null&&x.startsWith("/api")&&N!=="txt"&&(x=v.Z.API_SERVER+x);const It=Ut=>Ut.substring(Ut.lastIndexOf("/")+1).split(".").pop();z&&te&&(te.filename=z),(0,H.useEffect)(()=>{var Ut,Ft;const Ie=(Ft=(Ut=document.cookie)==null?void 0:Ut.replace(/\s/g,""))==null?void 0:Ft.split(";");Ie==null||Ie.map(Ze=>{let Fe=Ze.split("=");Fe[0]==="_educoder_session"&&pe(Fe[1])})},[]),(0,H.useEffect)(()=>{N==="office"&&(x.indexOf("bigfilescdn.")>-1||x.indexOf("bigfiles1")>-1?$e({url:x,fileType:It(x),model:x.indexOf("model=edit")?"edit":"view"}):Yt())},[N,x]);const Yt=()=>E(void 0,null,function*(){console.log("data:",x);let Ut=x;x.startsWith("http")||(Ut=location.origin+Ut);let Ft=new URL(Ut).pathname.split("/").pop();const Ie=yield(0,y.gJ)({attachment_id:Ft});Ie.url=ke+Ie.url,$e(Ie)}),qt=()=>{if(x.startsWith("http")||x.startsWith("blob:")){Ot();return}(0,B.Sv)(z||"educoder",x,z)},Ot=()=>{K&&(0,f.fc)({id:K==null?void 0:K.id,watch_type:1,course_id:K==null?void 0:K.course_id}),(0,B.Nd)(z||"educoder",decodeURIComponent(x))};return h.createElement("div",{style:T({},ge||{}),className:`${Y&&I.bgBlack} ${N?I.wrp:"hide"}`},_e&&h.createElement("div",{className:I.close,ref:tt},!!U&&h.createElement(R.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>tt.current},h.createElement("span",{onClick:()=>{se(),U()}},h.createElement("i",{className:"icon-yulanpizhu"}))),!ie&&h.createElement(R.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>tt.current},h.createElement("span",{onClick:Ot},h.createElement("i",{className:"icon-quxiaozhiding"}))),h.createElement(R.Z,{title:"\u5173\u95ED",getPopupContainer:()=>tt.current},h.createElement("span",{className:"",onClick:se},h.createElement("i",{className:"icon-guanbi1"})))),h.createElement("div",{className:`${I[J]} ${J} ${I.monaco} ${N==="txt"?"show":"hide"}`},N==="txt"&&h.createElement(h.Fragment,null,h.createElement(F.ZP,T({},te)))),N==="audio"&&h.createElement("audio",{src:`${(x==null?void 0:x.indexOf("http://"))>-1||(x==null?void 0:x.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${x}`,autoPlay:!0}),N==="video"&&h.createElement(h.Fragment,null,(x==null?void 0:x.indexOf("http"))>-1?h.createElement("video",{controls:!0,src:`${x}`,autoPlay:!0}):h.createElement("video",{controls:!0,src:`data:video/mp4;base64,${x}`,autoPlay:!0})),N==="office"&&Oe&&h.createElement("iframe",{src:`${Ge}/office.html?key=${Oe.key}&url=${btoa(Oe.url)}&callbackUrl=${ke+(Oe.callbackUrl||"")}&fileType=${Oe.fileType}&title=${Oe.title||""}&model=${j}&officeServer=${v.Z.ONLYOFFICE}&disabledDownload=${!!ie}`}),N==="html"&&h.createElement("iframe",{src:x+"&disposition=inline"}),N==="pdf"&&h.createElement("iframe",{src:`${Ge}/js/pdfview/index.html?filename=${z||"educoder.pdf"}&url=${encodeURIComponent(x)}&disabledDownload=${!!ie}`}),N==="image"&&h.createElement("img",{src:`${(x==null?void 0:x.indexOf("http://"))>-1||(x==null?void 0:x.indexOf("https://"))>-1?"":"data:image/png;base64,"}${x}`}),(N==="other"||N==="download")&&h.createElement(h.Fragment,null,Z?h.createElement(i.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:h.createElement(V.ZP,{icon:h.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:qt,disabled:ie},"\u4E0B\u8F7D")}):h.createElement(V.ZP,{type:"primary",size:"middle",onClick:qt,disabled:ie},h.createElement(P.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(xt,Re,_){"use strict";_.d(Re,{z:function(){return N},Z:function(){return z}});var H=_(59301),I=_(50304),V=_(24768),P=_(64018),F=_(40846),R=_(3294),B=_(955),y=_(15342),i=_(1012),v=_(23210),f=_(59301),n=({html:te})=>{const J=(0,H.useRef)(null),ge=(0,H.useRef)(null),_e=`.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 36px !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,H.useEffect)(()=>{const se=J.current.attachShadow({mode:"open"});ge.current=document.createElement("div"),ge.current.className="markdown-body",ge.current.innerHTML=te,se.appendChild(ge.current);const Y=document.createElement("style");return Y.textContent=_e,se.appendChild(Y),()=>{se.innerHTML=""}},[]),(0,H.useEffect)(()=>{ge.current&&(ge.current.innerHTML=te)},[te]),f.createElement("div",{ref:J})},o=Object.defineProperty,u=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,T=(te,J,ge)=>J in te?o(te,J,{enumerable:!0,configurable:!0,writable:!0,value:ge}):te[J]=ge,E=(te,J)=>{for(var ge in J||(J={}))S.call(J,ge)&&T(te,ge,J[ge]);if(u)for(var ge of u(J))O.call(J,ge)&&T(te,ge,J[ge]);return te};const C="@\u2581\u2581@",j="@\u2581@",x=/<pre[^>]*>/g;function L(te){let J=document.createElement("div");return J.innerHTML=te,J.childNodes.length===0?"":J.childNodes[0].nodeValue}const N=(te,J)=>{te=te||"";const ge=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,_e=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,se=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Y=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return J?te.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ge,(ie,U,Z,K,k,D,re)=>{const pe=U||K||D,Oe=Z||k||re||"?";return R.Z.API_SERVER+"/api/attachments/"+pe+Oe+"&t="+(0,B.Jn)(pe,Date.now())+(ie.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(te=te.replace(Y,(ie,U,Z,K,k,D,re)=>{const pe=U||K||D,Oe=Z||k||re||"?";return R.Z.API_SERVER+"/attachments/download/"+pe+Oe+"&t="+(0,B.Jn)(pe,Date.now())+(ie.indexOf(")")>-1?")":"&")}).replace(ge,(ie,U,Z,K,k,D,re)=>{const pe=U||K||D,Oe=Z||k||re||"?";return R.Z.API_SERVER+"/api/attachments/"+pe+Oe+"&t="+(0,B.Jn)(pe,Date.now())+(ie.indexOf(")")>-1?")":"&")}).replace(_e,(ie,U,Z,K,k)=>{const D=U||K,re=Z||k||"";return'"'+R.Z.API_SERVER+"/api/attachments/"+D+re+D+re+"&t="+(0,B.Jn)(D,Date.now())}).replace(se,(ie,U,Z,K,k)=>{const D=U||K,re=Z||k||"";return"("+R.Z.API_SERVER+"/files/uploads/"+D+re+D+re+"&t="+(0,B.Jn)(D,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,`
`),te)};var z=({value:te="",className:J,showTextOnly:ge,showLines:_e,style:se={},stylesPrev:Y={},highlightKeywords:ie,showProgramFill:U,isProgramFill:Z,disabledFill:K=!1,programFillValue:k,onFillChange:D=Oe=>{},onFillBlur:re=()=>{},onFillFocus:pe=()=>{}})=>{let Oe=String(te);const[$e,Ge]=(0,H.useState)(""),[ke,et]=(0,H.useState)("office"),[Ke,tt]=(0,H.useState)([]),It=(0,H.useRef)("a"+(0,i.Z)()),Yt={},qt=(Ae,Me,ze)=>{const qe=document.createElement(Ae===j?"input":"textarea");qe.style.width="100%",qe.style.height=Ae===j?"40px":"151px",qe.rows=5,qe.spellcheck=!1,qe.name="edu-program-fill",qe.placeholder="\u8BF7\u8F93\u5165",qe.dataset.id=Me;const rt=Object.keys(Yt).length;return Yt[rt]=qe,`<span class="edu-program-fill-wrap ${Ae===j?"":"show"}" style="width:${Ae===j?"400px":"100%"}" title=${ze||""}><span>${qe.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ot(Ae){return Ae=Ae.replace(/!\[.*?\]\(.*?\)/g,""),Ae=Ae.replace(/\[.*?\]\(.*?\)/g,""),Ae=Ae.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ae=Ae.replace(/<embed.*?>/g,""),Ae=Ae.replace(/<img.*?>/g,""),Ae=Ae.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ae=Ae.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ae=Ae.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ae=Ae.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ae}const Ut=Ae=>Ae.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Me,ze){let qe=ze.replace(/(\n|\r)/g,"").split("}"),rt=[];return qe.map(Xe=>{Xe!=""&&rt.push(`.${It.current} ${Xe}`)}),`<style>${rt.join("}")}</style>`}),Ft=(0,H.useMemo)(()=>{try{const qe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,rt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Xe=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,He=/\(\/attachments\/download\//g;Oe=Oe.replace(He,"("+R.Z.API_SERVER+"/attachments/download/").replace(qe,"("+R.Z.API_SERVER+"/api/attachments/").replace(rt,'"'+R.Z.API_SERVER+"/api/attachments/").replace(Xe,'"'+R.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,`
`)}catch(qe){}if(U){let qe=-1;return Oe=Oe.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(rt,Xe,He){var lt;return++qe,qt(rt,qe,(lt=k==null?void 0:k[qe])==null?void 0:lt.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Ut(Oe||"")}</pre>`}let Ae=Ut(Oe);Ae=(0,V.ZP)(Ae);const Me=(0,V.ez)();Oe.match(/\[TOC\]/)&&(Ae=Ae.replace("<p>[TOC]</p>",(0,V.Qv)()),(0,V.Iy)()),Ae=Ae.replace(/(__special_katext_id_\d+__)/g,(qe,rt)=>{const{type:Xe,expression:He}=Me[rt];return(0,y.renderToString)(L(He)||"",{displayMode:Xe==="block",throwOnError:!1,output:"html"})}),Ae=Ae.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,V.AL)();const ze=document.createElement("div");if(ze.innerHTML=Ae,ge)return ze.innerText;if(ie){const qe=ie.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return it(ze,qe),ze.innerHTML}return setTimeout(()=>ye(),500),ze.innerHTML},[Oe,ie]);(0,H.useEffect)(()=>{nt.current&&nt.current.querySelectorAll(["input","textarea"]).forEach(Me=>{Me.oninput=Ie,Me.onblur=Ze,Me.onfocus=Fe})},[Ke]),(0,H.useEffect)(()=>{var Ae,Me,ze,qe,rt;if(k!=null&&k.length)try{const Xe=nt.current.querySelectorAll(".edu-program-fill-score"),He=nt.current.querySelectorAll('[name="edu-program-fill"]');for(const[lt,gt]of He.entries())gt.value=((Ae=k==null?void 0:k[lt])==null?void 0:Ae.value)||"",((Me=k==null?void 0:k[lt])==null?void 0:Me.type)==="warning"?gt.className="program-fill-warning":((ze=k==null?void 0:k[lt])==null?void 0:ze.type)==="success"?gt.className="program-fill-success":gt.className="";for(const[lt,gt]of Xe.entries())gt.innerHTML=(qe=k==null?void 0:k[lt])!=null&&qe.score?`${(rt=k==null?void 0:k[lt])==null?void 0:rt.score}\u5206`:"";tt(k)}catch(Xe){console.log(Xe,"error")}},[k]);const Ie=Ae=>{Ke[Ae.target.dataset.id]=Ke[Ae.target.dataset.id]||{},Ke[Ae.target.dataset.id].value=Ae.target.value,tt([...Ke]),D(Ke,Ae.target.dataset.id)},Ze=Ae=>{Ke[Ae.target.dataset.id]=Ke[Ae.target.dataset.id]||{},Ke[Ae.target.dataset.id].value=Ae.target.value,tt([...Ke]),re(Ke,Ae.target.dataset.id)},Fe=Ae=>{Ke[Ae.target.dataset.id]=Ke[Ae.target.dataset.id]||{},Ke[Ae.target.dataset.id].value=Ae.target.value,tt([...Ke]),pe(Ke,Ae.target.dataset.id)};function it(Ae,Me){return Ae.childNodes.forEach(ze=>{var qe;if(ze.childNodes.length>0)it(ze,Me);else if(ze.nodeName!=="IMG")if(ze.innerHTML)ze.innerHTML=(qe=ze.innerHTML)==null?void 0:qe.replace(new RegExp(Me,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const rt=document.createElement("span");rt.innerHTML=ze.textContent.replace(new RegExp(Me,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ze.replaceWith(rt)}})}const nt=(0,H.useRef)();V.jb.WebkitLineClamp=_e,_e&&(se=E(E({},se),V.jb));function ue(Ae){let Me=Ae.target;if(Me.tagName.toUpperCase()==="A"){let ze=Me.getAttribute("href");if(ze.indexOf("office")>-1)Ae.preventDefault(),Ge(ze),et("office");else if(ze.indexOf("application/pdf")>-1)Ae.preventDefault(),Ge(ze),et("pdf");else if(ze.indexOf("text/html")>-1)Ae.preventDefault(),Ge(ze),et("html");else if(ze.startsWith("#")){Ae.preventDefault();let qe=document.getElementById(ze.replace("#",""));qe&&qe.scrollIntoView(!0)}}}const ye=()=>{var Ae;const Me=(Ae=nt.current)==null?void 0:Ae.querySelectorAll("video");Me==null||Me.forEach(ze=>{if(ze.oncontextmenu=()=>!1,ze.src.indexOf(".m3u8")>-1&&!ze.canPlayType("application/vnd.apple.mpegurl")){if(F.ZP.isSupported()){var qe=new F.ZP;qe.loadSource(ze.src),qe.attachMedia(ze)}}})};(0,H.useEffect)(()=>{if(nt.current&&Ft&&Ft.match(x)&&window.PR.prettyPrint(),nt.current)return nt.current.addEventListener("click",ue),()=>{var Ae;(Ae=nt.current)==null||Ae.removeEventListener("click",ue),(0,V.AL)(),(0,V.Iy)()}},[Ft,nt.current,ue]),(0,H.useEffect)(()=>{var Ae;const Me=ze=>{ze.preventDefault(),ze.clipboardData.setData("text",window.getSelection().toString())};return(Ae=nt.current)==null||Ae.addEventListener("copy",Me),()=>{var ze;(ze=nt.current)==null||ze.removeEventListener("copy",Me)}},[nt.current]);const Te=Ae=>/<style[\s\S]*?>/i.test(Ae||"");return H.createElement(H.Fragment,null,ge&&H.createElement("div",{ref:nt},Ft),!ge&&!Te(Ft)&&H.createElement("div",{ref:nt,style:E({},se),className:`${J||""} ${K?"disabled-fill":""} markdown-body ${It.current}`,dangerouslySetInnerHTML:{__html:Ft}}),!ge&&Te(Ft)&&H.createElement(n,{html:Ft}),H.createElement(v.Z,{close:!0,data:$e,type:$e!=null&&$e.length?ke:"",style:E({},Y),onClose:()=>Ge("")}))}},33538:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return P}});var H=_(89070),I={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},V=_(59301),P=({message:F,className:R,children:B,style:y={}})=>V.createElement("div",{className:`custom-spinner ${I.idsRingWrapper} ${R}`},V.createElement("div",{className:I.ldsRing},V.createElement("div",null),V.createElement("div",null),V.createElement("div",null),V.createElement("div",null)),F?V.createElement("p",{style:y},F):null,B,V.createElement(H.Outlet,null))},13787:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return R}});var H=_(59301),I={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},V=_(92310),P=_.n(V),R=({className:B,style:y={},leftNode:i,leftTitle:v="\u81EA\u6D4B\u8F93\u5165",rightNode:f,rightTitle:h="\u8FD0\u884C\u7ED3\u679C"})=>H.createElement("div",{className:P()(I.result,B),style:y},H.createElement("div",{className:I.left},H.createElement("div",{className:I.title},H.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),H.createElement("span",null,v)),H.createElement("div",{className:I.leftNode},i)),H.createElement("div",{className:I.right},H.createElement("div",{className:I.title},H.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),H.createElement("span",null,h)),H.createElement("div",{className:I.rightNode},f)))},23954:function(xt,Re,_){"use strict";_.d(Re,{SV:function(){return nt},ZP:function(){return it}});var H=_(59301),I=_(76374);const V={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"]},P={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"]},F={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(`
`)}]},R={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(`
`)}]},B={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 y=_(53184),i=_.n(y),v=Object.defineProperty,f=Object.defineProperties,h=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,S=(ue,ye,Te)=>ye in ue?v(ue,ye,{enumerable:!0,configurable:!0,writable:!0,value:Te}):ue[ye]=Te,O=(ue,ye)=>{for(var Te in ye||(ye={}))o.call(ye,Te)&&S(ue,Te,ye[Te]);if(n)for(var Te of n(ye))u.call(ye,Te)&&S(ue,Te,ye[Te]);return ue},T=(ue,ye)=>f(ue,h(ye)),E=(ue,ye,Te)=>new Promise((Ae,Me)=>{var ze=Xe=>{try{rt(Te.next(Xe))}catch(He){Me(He)}},qe=Xe=>{try{rt(Te.throw(Xe))}catch(He){Me(He)}},rt=Xe=>Xe.done?Ae(Xe.value):Promise.resolve(Xe.value).then(ze,qe);rt((Te=Te.apply(ue,ye)).next())});const C={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"]}},j=(ue,ye)=>ye.map(Te=>({label:Te,kind:ue.languages.CompletionItemKind.Keyword,insertText:Te})),x=ue=>Object.keys(C.tables).map(ye=>({label:ye,kind:ue.languages.CompletionItemKind.Variable,insertText:ye})),L=(ue,ye)=>{const Te=C.tables[ue];return Te?Te.map(Ae=>({label:Ae,kind:ye.languages.CompletionItemKind.Field,insertText:Ae})):[]};function N(ue,ye,Te,Ae,Me){let ze=ye.getWordUntilPosition(Te),qe={startLineNumber:Te.lineNumber,endLineNumber:Te.lineNumber,startColumn:ze.startColumn,endColumn:ze.endColumn},rt=Ae.map(Xe=>({label:Xe,kind:ue.languages.CompletionItemKind.Keyword,insertText:Xe,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qe}));return Me.map(Xe=>{rt.push(T(O({},Xe),{range:qe}))}),rt}var z=ue=>{C.languages.map(Me=>(ue.languages.registerDocumentFormattingEditProvider(Me,{provideDocumentFormattingEdits(ze,qe,rt){return E(this,null,function*(){const Xe=i()(ze.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:ze.getFullModelRange(),text:Xe}]})}}),Me));const ye=F.quickKey.map(Me=>({label:Me.label,kind:ue.languages.CompletionItemKind.Method,insertText:Me.content,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Te=R.quickKey.map(Me=>({label:Me.label,kind:ue.languages.CompletionItemKind.Method,insertText:Me.content,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ae=P.quickKey.map(Me=>({label:Me.label,kind:ue.languages.CompletionItemKind.Method,insertText:Me.content,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet}));ue.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Me,ze){var qe=Me.getWordUntilPosition(ze),rt={startLineNumber:ze.lineNumber,endLineNumber:ze.lineNumber,startColumn:qe.startColumn,endColumn:qe.endColumn},Xe=Me.getLineContent(ze.lineNumber).substring(qe.startColumn-2,qe.endColumn);return{suggestions:[...F.keywords.map(He=>({label:He,kind:ue.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rt})),...F.quickKey.map(He=>({label:He.label,kind:ue.languages.CompletionItemKind.Function,documentation:He.content,insertText:Xe.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rt}))]}}}),ue.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Me,ze){var qe=Me.getWordUntilPosition(ze),rt={startLineNumber:ze.lineNumber,endLineNumber:ze.lineNumber,startColumn:qe.startColumn,endColumn:qe.endColumn};return{suggestions:[...V.keywords.map(Xe=>({label:Xe,kind:ue.languages.CompletionItemKind.Function,documentation:Xe,insertText:Xe,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rt}))]}}}),ue.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Me,ze){var qe=Me.getWordUntilPosition(ze),rt={startLineNumber:ze.lineNumber,endLineNumber:ze.lineNumber,startColumn:qe.startColumn,endColumn:qe.endColumn},Xe=Me.getLineContent(ze.lineNumber).substring(qe.startColumn-2,qe.endColumn);return{suggestions:[...P.keywords.map(He=>({label:He,kind:ue.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rt})),...P.quickKey.map(He=>({label:He.label,kind:ue.languages.CompletionItemKind.Function,documentation:He.content,insertText:Xe.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rt}))]}}}),ue.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Me,ze){var qe=Me.getWordUntilPosition(ze),rt={startLineNumber:ze.lineNumber,endLineNumber:ze.lineNumber,startColumn:qe.startColumn,endColumn:qe.endColumn},Xe=Me.getLineContent(ze.lineNumber).substring(qe.startColumn-2,qe.endColumn);return{suggestions:[...B.keywords.map(He=>({label:He,kind:ue.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rt})),...B.quickKey.map(He=>({label:He.label,kind:ue.languages.CompletionItemKind.Function,documentation:He.content,insertText:Xe.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rt}))]}}}),ue.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Me,ze){var qe=Me.getWordUntilPosition(ze),rt={startLineNumber:ze.lineNumber,endLineNumber:ze.lineNumber,startColumn:qe.startColumn,endColumn:qe.endColumn},Xe=Me.getLineContent(ze.lineNumber).substring(qe.startColumn-2,qe.endColumn);return{suggestions:[...R.keywords.map(He=>({label:He,kind:ue.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rt})),...R.quickKey.map(He=>({label:He.label,kind:ue.languages.CompletionItemKind.Function,documentation:He.content,insertText:Xe.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rt}))]}}})};const te="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var J=Object.defineProperty,ge=(ue,ye,Te)=>ye in ue?J(ue,ye,{enumerable:!0,configurable:!0,writable:!0,value:Te}):ue[ye]=Te,_e=(ue,ye,Te)=>ge(ue,typeof ye!="symbol"?ye+"":ye,Te);const se=class Zo{constructor(ye,Te,Ae){this.placeholder=ye,this.editor=Te,this.monaco=Ae,Te.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Zo.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)}};_e(se,"ID","editor.widget.placeholderHint");var ie=se,U=_(96236),Z=_(8591),K=_(6848),k=_(89392),D=_(34604),re=_(56102),pe=Object.defineProperty,Oe=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,Ke=(ue,ye,Te)=>ye in ue?pe(ue,ye,{enumerable:!0,configurable:!0,writable:!0,value:Te}):ue[ye]=Te,tt=(ue,ye)=>{for(var Te in ye||(ye={}))ke.call(ye,Te)&&Ke(ue,Te,ye[Te]);if(Ge)for(var Te of Ge(ye))et.call(ye,Te)&&Ke(ue,Te,ye[Te]);return ue},It=(ue,ye)=>Oe(ue,$e(ye)),Yt=(ue,ye)=>{var Te={};for(var Ae in ue)ke.call(ue,Ae)&&ye.indexOf(Ae)<0&&(Te[Ae]=ue[Ae]);if(ue!=null&&Ge)for(var Ae of Ge(ue))ye.indexOf(Ae)<0&&et.call(ue,Ae)&&(Te[Ae]=ue[Ae]);return Te},qt=(ue,ye,Te)=>new Promise((Ae,Me)=>{var ze=Xe=>{try{rt(Te.next(Xe))}catch(He){Me(He)}},qe=Xe=>{try{rt(Te.throw(Xe))}catch(He){Me(He)}},rt=Xe=>Xe.done?Ae(Xe.value):Promise.resolve(Xe.value).then(ze,qe);rt((Te=Te.apply(ue,ye)).next())});function Ot(ue){return/^\d+$/.test(ue)?`${ue}px`:ue}function Ut(){}let Ft=!1;const Ie={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Ze(ue=[]){let ye=ue;if(Array.isArray(ue)){for(let Te=0;Te<ue.length;Te++){let Ae=Ie[ue[Te]];if(Ae)return Ae}return ye[0]}return Ie[ye]||ye}let Fe=null;var it=ue=>{var ye=ue,{width:Te="100%",height:Ae="100%",value:Me,language:ze="javascript",style:qe={},options:rt={},overrideServices:Xe={},theme:He="vs-dark",onEditBlur:lt,isCopy:gt=!1,onSave:ft,autoHeight:_t=!1,forbidCopy:wt=!1,onChange:mt=Ut,editorDidMount:kt=Ut,onFocus:bt=Ut,onBreakPoint:$=Ut,breakPointValue:G=[],filename:Qe="educoder.txt",errorLine:ae,errorContent:be="",highlightLine:Kt,openBreakPoint:Ee=!1,placeholder:Pe=""}=ye,Ne=Yt(ye,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder"]);const ce=(0,H.useRef)(),de=(0,H.useRef)({}),we=(0,H.useRef)(),Le=(0,H.useRef)(),ne=(0,H.useRef)([]),dt=(0,H.useRef)(!1),Se=(0,H.useRef)(),Dt=(0,H.useRef)(),Pt=(0,H.useRef)(!1),[Ht,sr]=(0,H.useState)(!1);function St(){let zt;return ce.current&&(zt=new I.Z(Tt=>{for(let Qt of Tt)(Qt.target.offsetHeight>0||Qt.target.offsetWidth>0)&&de.current.instance.layout()}),zt.observe(ce.current)),zt}function Et(){Z.ZP.warning({content:decodeURIComponent(te),key:"monaco-editor-tip"})}const ur=()=>{let zt=de.current.instance;if(Me!=null&&zt&&Ht){const Tt=zt.getModel();Tt&&Me!==Tt.getValue()&&(Ft=!0,Tt.setValue(Me),zt.layout(),Ft=!1)}};(0,H.useEffect)(()=>{const zt=D.Z.subscribe("formatDocument",Tt=>{var Qt;let Sr=de.current.instance;(Qt=Sr==null?void 0:Sr.getAction)==null||Qt.call(Sr,"editor.action.formatDocument").run()});return window.updateMonacoValue=Tt=>{mt(Tt)},zt},[]),(0,H.useEffect)(()=>{var zt;let Tt=de.current.instance;Le.current&&clearTimeout(Le.current),Le.current=setTimeout(()=>{ur()},500),Me&&(Me!=null&&Me.length)&&((zt=Tt==null?void 0:Tt.updateOptions)==null||zt.call(Tt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Me.split(/\r\n|\r|\n/g).length))+3,5)}))},[Me,Ht,de.current]),(0,H.useEffect)(()=>{if(ae&&de.current&&de.current.instance){let Tt=de.current.instance;Tt.changeViewZones(function(Qt){var Sr=document.createElement("div");Sr.style.padding="10px 20px",Sr.style.width="calc(100% - 20px)",Sr.className="my-error-line-wrp",Sr.innerHTML=be,Qt.addZone({afterLineNumber:ae||11,heightInLines:3,domNode:Sr})});var zt={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}};Tt.addOverlayWidget(zt),Tt.revealPositionInCenter({lineNumber:20,column:1})}},[ae,de.current,Ht]);const Rr=(zt="",Tt)=>{if(!zt||zt.trim()==="")return!0;const Sr=de.current.instance.getModel().getLineTokens(Tt);let yr=!1;for(let Kr=0;Kr<2;Kr++)Sr.getStandardTokenType(Kr)===1&&(yr=!0);return yr};(0,H.useEffect)(()=>{var zt;const Tt=(zt=de.current)==null?void 0:zt.instance;if(Tt&&Ht&&wt){const Qt=Tt.onDidBlurEditorWidget(()=>{Pt.current=!1}),Sr=Tt.onDidFocusEditorText(()=>{Pt.current=!0});return()=>{Qt.dispose(),Sr.dispose()}}},[de.current,Ht,wt]),(0,H.useEffect)(()=>{var zt;if((zt=de.current)!=null&&zt.instance&&Ht&&Ee){let Tt=de.current.instance,Qt=Tt.getModel();if(!Qt)return;(()=>{var rr;let hr=[],Ar=[];const Lr=Qt.getAllDecorations();for(let si of Lr)si.options.className==="highlighted-line"&&(hr.push((rr=si==null?void 0:si.range)==null?void 0:rr.startLineNumber),Ar.push(si==null?void 0:si.id));if(Kt===hr[0])return;Qt.deltaDecorations(Ar,[]);const wr=Qt.getLineCount();Kt&&Kt<=wr&&(Tt.deltaDecorations([],[{range:new Fe.Range(Kt,1,Kt,Qt.getLineMaxColumn(Kt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Tt.revealLineInCenter(Kt))})();const yr=(rr=!1)=>{var hr;let Ar=[],Lr=[];const wr=Qt.getAllDecorations();for(let si of wr)si.options.linesDecorationsClassName==="breakpoints-select"&&(Ar.push((hr=si==null?void 0:si.range)==null?void 0:hr.startLineNumber),Lr.push(si==null?void 0:si.id));if(rr)return{lines:Ar,ids:Lr};$(Ar)},Kr=rr=>qt(void 0,null,function*(){let hr={range:new Fe.Range(rr,1,rr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Qt.deltaDecorations([],[hr]),yr()}),Mi=rr=>qt(void 0,null,function*(){let hr=[];const Ar=Tt.getLineDecorations(rr);for(let Lr of Ar)Lr.options.linesDecorationsClassName==="breakpoints-select"&&hr.push(Lr.id);yield Qt.deltaDecorations(hr,[]),yr()}),Vr=rr=>{let hr=Tt.getLineDecorations(rr);for(let Ar of hr)if(Ar.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,k.isEqual)(G,yr(!0).lines)){Qt.deltaDecorations(yr(!0).ids,[]);const rr=G.map(hr=>({range:new Fe.Range(hr,1,hr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Qt.deltaDecorations([],rr)}const Cr=Tt.onDidChangeModelContent(rr=>{let hr=Tt.getPosition();if(hr){let Ar=hr.lineNumber;clearTimeout(Dt.current),Dt.current=setTimeout(()=>{Rr(Qt.getLineContent(Ar),Ar)?Mi(Ar):Vr(Ar)?(Mi(Ar),Kr(Ar)):yr()},100)}}),Pr=Tt.onMouseDown(rr=>{var hr,Ar,Lr;if(rr.target.detail&&((Lr=(Ar=(hr=rr.target)==null?void 0:hr.element)==null?void 0:Ar.className)!=null&&Lr.includes("line-numbers"))){let wr=rr.target.position.lineNumber;if(Rr(Qt.getLineContent(wr),wr))return;Vr(wr)?Mi(wr):Kr(wr)}}),dr=rr=>{let hr={range:new Fe.Range(rr,1,rr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};ne.current=Tt.deltaDecorations(ne.current,[hr])},ii=()=>{ne.current=Tt.deltaDecorations(ne.current,[])},hi=Tt.onMouseMove(rr=>{var hr,Ar,Lr;if(ii(),rr.target.detail&&((Lr=(Ar=(hr=rr.target)==null?void 0:hr.element)==null?void 0:Ar.className)!=null&&Lr.includes("line-numbers"))){let wr=rr.target.position.lineNumber;if(Rr(Qt.getLineContent(wr),wr))return;dr(wr)}}),Wr=Tt.onMouseLeave(()=>{ii()});return()=>{Cr.dispose(),Pr.dispose(),hi.dispose(),Wr.dispose()}}},[de.current,Ht,G,Kt,Ee,ze]),(0,H.useEffect)(()=>{var zt;(zt=de.current)!=null&&zt.instance&&Ee&&de.current.instance.setPosition({lineNumber:0,column:0})},[Kt]);function $r(){let zt=de.current.instance;if(zt){const Tt=zt.getSelection(),Qt=de.current.pastePos||{},Sr=new Fe.Range(Qt.startLineNumber||Tt.endLineNumber,Qt.startColumn||Tt.endColumn,Qt.endLineNumber||Tt.endLineNumber,Qt.endColumn||Tt.endColumn);setTimeout(()=>{zt.executeEdits("",[{range:Sr,text:""}])},300)}}function zr(zt){(window.navigator.platform.match("Mac")?zt.metaKey:zt.ctrlKey)&&zt.keyCode==83&&(zt.preventDefault(),ft())}const Rt=()=>{if(_t&&de.current.instance){const zt=de.current.instance.getContentHeight();xi(zt<Ae?Ae:zt)}else xi(Ae)};function Zt(zt){var Tt=document.createEvent("MouseEvents");Tt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),zt.dispatchEvent(Tt)}const _r=zt=>{if(!Pt.current)return;const{keyCode:Tt,ctrlKey:Qt,metaKey:Sr,target:yr,type:Kr}=zt;return(Kr==="paste"||(Tt===67||Tt===86)&&(Sr||Qt))&&yr.nodeName==="TEXTAREA"&&(Et(),zt.preventDefault()),!1};function jr(zt,Tt){var Qt=window.URL||window.webkitURL||window,Sr=new Blob([Tt]),yr=document.createElementNS("http://www.w3.org/1999/xhtml","a");yr.href=Qt.createObjectURL(Sr),yr.download=zt,Zt(yr)}(0,H.useEffect)(()=>{Rt()},[Rt]),(0,H.useEffect)(()=>{ce.current&&!Ht&&Promise.all([_.e(8909),_.e(3267)]).then(_.bind(_,71448)).then(zt=>{try{Fe=zt,de.current.instance=Fe.editor.create(ce.current,{value:Me,language:Ze(ze),theme:He,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Xe);const Tt=de.current.instance;let yr=[...U.BH._menuItems].find(Cr=>Cr[0]._debugName=="EditorContext")[1],Kr=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Mi=(Cr,Pr)=>{var dr,ii;let hi=Cr._first;do Pr.includes((ii=(dr=hi.element)==null?void 0:dr.command)==null?void 0:ii.id)&&Cr._remove(hi);while(hi=hi.next)};if(kt(Tt,Fe),setTimeout(()=>{Rt(),de.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{jr(Qe||"educoder.txt",Tt.getValue())}})},500),de.current.subscription=Tt.onDidChangeModelContent(Cr=>{dt.current?clearTimeout(Se.current):(Rt(),mt(Tt.getValue(),Cr)),Se.current=setTimeout(()=>{dt.current=!1},500)}),window.Monaco||z(Fe,Ze(ze)),wt&&(Mi(yr,Kr),ce.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",_r),window.removeEventListener("paste",_r),window.addEventListener("keydown",_r),window.addEventListener("paste",_r)),window.Monaco=Fe,lt&&Tt.onDidBlurEditorWidget(()=>{lt(Tt.getValue())}),bt&&Tt.onDidFocusEditorText(()=>{bt(Tt.getValue())}),wt)try{Tt.onDidPaste(Cr=>{const Pr=Tt.getSelection(),dr=de.current.pastePos||{},ii=new Fe.Range(dr.startLineNumber||Pr.endLineNumber,dr.startColumn||Pr.endColumn,dr.endLineNumber||Pr.endLineNumber,dr.endColumn||Pr.endColumn);Tt.executeEdits("",[{range:Cr.range,text:""}])})}catch(Cr){}let Vr=St();return Pe&&typeof Pe=="string"&&new ie(Pe,Tt,Fe),sr(!0),()=>{const Cr=de.current.instance;Cr.dispose();const Pr=Cr.getModel();Pr&&Pr.dispose(),de.current.subscription&&de.current.subscription.dispose(),Vr.unobserve(ce.current)}}catch(Tt){}})},[]),(0,H.useEffect)(()=>{if(de.current.instance&&Ht)return document.addEventListener("keydown",zr,!1),()=>{document.removeEventListener("keydown",zr)}},[ft,Ht]),(0,H.useEffect)(()=>{let zt=de.current.instance;if(zt&&Ht){let Tt=Ze(ze);Fe.editor.setModelLanguage(zt.getModel(),Tt)}},[ze,Ht]),(0,H.useEffect)(()=>{de.current.instance&&Ht&&Fe.editor.setTheme(He)},[He,Ht]),(0,H.useEffect)(()=>{let zt=de.current.instance;we.current=rt,zt&&Ht&&(zt.updateOptions(tt({},rt)),setTimeout(()=>{zt.getModel().updateOptions(tt({},rt))},200))},[JSON.stringify(rt),Ht]),(0,H.useEffect)(()=>{let zt=de.current.instance;zt&&Ht&&zt.layout()},[Te,Ae,Ht]);const[Or,ti]=(0,H.useState)(Ot(Te)),[cr,xi]=(0,H.useState)(Ot(Ae)),ri=It(tt({},qe),{width:Or,height:cr,position:"relative"});return H.createElement("div",{className:"my-monaco-editor",ref:ce,style:ri},gt&&H.createElement(re.CopyToClipboard,{text:Me,onCopy:()=>Z.ZP.success("\u590D\u5236\u6210\u529F")},H.createElement(K.Z,{title:"\u590D\u5236\u4EE3\u7801"},H.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},H.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function nt({width:ue="100%",height:ye="100%",original:Te,modified:Ae,language:Me,options:ze={}}){const qe=(0,H.useRef)(),[rt,Xe]=(0,H.useState)(null);function He(_t){let wt;return qe.current&&(wt=new I.Z(mt=>{for(let kt of mt)(kt.target.offsetHeight>0||kt.target.offsetWidth>0)&&_t.layout()}),wt.observe(qe.current)),wt}(0,H.useEffect)(()=>(qe.current&&Promise.all([_.e(8909),_.e(9404)]).then(_.bind(_,2550)).then(_t=>{Fe=_t;const wt=Fe.editor.createDiffEditor(qe.current,It(tt({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},ze),{wordWrap:!0}));Xe(wt);let mt=He(wt);return()=>{wt.dispose();const kt=wt.getModel();kt&&kt.dispose(),mt.unobserve(qe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,H.useEffect)(()=>{rt&&rt.setModel({original:Fe.editor.createModel(Te,Me),modified:Fe.editor.createModel(Ae,Me)})},[Te,Ae,Me,rt]);const lt=Ot(ue),gt=Ot(ye),ft={width:lt,height:gt};return H.createElement("div",{className:"my-diff-editor",ref:qe,style:ft})}},45710:function(xt,Re,_){"use strict";_.r(Re),_.d(Re,{default:function(){return n}});var H=_(59301),I=_(23257),V=_(3294),P=_(89070),F=_(71418),R=_(49802),B=_(25555),y=_(23954),i=_(24334),v=_(61186),f=_.n(v),h=(o,u,S)=>new Promise((O,T)=>{var E=x=>{try{j(S.next(x))}catch(L){T(L)}},C=x=>{try{j(S.throw(x))}catch(L){T(L)}},j=x=>x.done?O(x.value):Promise.resolve(x.value).then(E,C);j((S=S.apply(o,u)).next())}),n=()=>{const{submitId:o,id:u}=(0,P.useParams)(),[S,O]=(0,H.useState)(void 0);console.log((0,P.useLocation)(),33);const T=(0,P.useLocation)();function E(){var re;P.history.push(`/problems/${u}/oj/${(re=T==null?void 0:T.query)==null?void 0:re.backId}?tab=1`)}(0,H.useEffect)(()=>((0,P.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,P.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,P.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,P.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,H.useEffect)(()=>{document.title="\u5728\u7EBF\u5237\u9898"}),(0,H.useEffect)(()=>{o&&function(){return h(this,null,function*(){const pe=yield(0,R.X6)(o);O(pe.data)})}()},[o]);const{status:C,created_at:j,code:x,name:L,language:N,pass_sets_count:z,set_count:te,error_msg:J,output:ge,input:_e,expected_output:se,execute_memory:Y,user:ie,execute_time:U,input_file_url:Z,output_file_url:K,is_file:k,expected_output_file_url:D}=S||{};return H.createElement(F.Z,{spinning:!S,delay:500},H.createElement("div",{className:"record-detail-info"},S?H.createElement(H.Fragment,null,H.createElement("header",{className:I.Z.header},H.createElement("div",null,H.createElement("img",{src:`${V.Z.IMG_SERVER}/images/${ie.image_url}`,alt:"user",width:30}),H.createElement("span",null,ie.name)),H.createElement("h2",null," ",L," "),H.createElement("button",{className:"ant-btn",onClick:E,style:{border:"1px solid #bacffe",color:"#3061d0"}},"\u8FD4\u56DE\u8BE5\u9898")),H.createElement("div",{className:"record-detail-body"},H.createElement("h2",null," \u63D0\u4EA4\u8BB0\u5F55 "),H.createElement("ul",{className:"record-info"},H.createElement("li",null," \u72B6\u6001\uFF1A",H.createElement("span",{className:C===0?"c-green":"c-red"},B.Im[C])," "),H.createElement("li",null," \u63D0\u4EA4\u65F6\u95F4\uFF1A",H.createElement("span",null,f()(j).format("YYYY-MM-DD HH:mm:ss"))," "),H.createElement("li",null," \u8BED\u8A00\uFF1A",H.createElement("span",null,N)," "),H.createElement("li",null," \u6267\u884C\u7528\u65F6\uFF1A",H.createElement("span",null,U*1e3,"ms")," "),H.createElement("li",null," ",`${z} / ${te} \u4E2A\u901A\u8FC7\u7684\u6D4B\u8BD5\u7528\u4F8B`," ")),(0,B.gZ)({status:C,error_msg:J,execute_time:U,output:ge,input:_e,expected_output:se,input_file_url:Z,output_file_url:K,is_file:k,expected_output_file_url:D}),H.createElement("h2",null," \u63D0\u4EA4\u7684\u5185\u5BB9 "),H.createElement(y.ZP,{height:"200px",width:"100%",language:N==null?void 0:N.toLocaleLowerCase(),value:i.Base64.decode(x),options:{readOnly:!0}}))):null))}},25555:function(xt,Re,_){"use strict";_.d(Re,{Im:function(){return J},ZP:function(){return U},gZ:function(){return Y}});var H=_(59301),I=_(92832),V=_(3113),P=_(84105),F=_(87395),R=_(35106),B=_(24334),y=_(33538),i=_(85149),v=_(955),f=_(13787),h=_(34376),n=_(92310),o=_.n(n),u=_(59301),S=Object.defineProperty,O=Object.defineProperties,T=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,x=(Z,K,k)=>K in Z?S(Z,K,{enumerable:!0,configurable:!0,writable:!0,value:k}):Z[K]=k,L=(Z,K)=>{for(var k in K||(K={}))C.call(K,k)&&x(Z,k,K[k]);if(E)for(var k of E(K))j.call(K,k)&&x(Z,k,K[k]);return Z},N=(Z,K)=>O(Z,T(K));const{TextArea:z}=I.default,te={visible:!1,tabIndex:"0"},J={[R.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[R.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[R.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var ge=(Z=>(Z[Z.SET_VISIBLE=0]="SET_VISIBLE",Z[Z.SET_TABINDEX=1]="SET_TABINDEX",Z))(ge||{});function _e(Z,K){switch(K.type){case 0:return N(L({},Z),{visible:K.payload});case 1:return N(L({},Z),{tabIndex:K.payload});default:throw new Error}}function se({value:Z,className:K}){const[k,D]=(0,H.useState)(!1),re=(0,H.useRef)(),pe=(0,H.useRef)();return(0,H.useEffect)(()=>{k&&(pe.current.reset(),pe.current.write((0,v.pp)(Z||"")))},[Z,k]),(0,H.useEffect)(()=>{var Oe,$e,Ge,ke;if(re.current){pe.current=new h.Terminal({fontSize:14,disableStdin:!0}),pe.current.open(re.current);const et=re.current.offsetWidth-14,Ke=((ke=(Ge=($e=(Oe=pe.current)==null?void 0:Oe._core)==null?void 0:$e._renderService)==null?void 0:Ge.dimensions)==null?void 0:ke.actualCellWidth)||9.5,tt=Math.ceil(et/Ke);pe.current.resize(tt,8),D(!0)}},[]),u.createElement("div",{ref:re,className:o()("XtermText-valueRef",K)})}function Y(Z){const{status:K,error_msg:k,output:D,input:re,expected_output:pe,is_file:Oe,input_file_url:$e,output_file_url:Ge,expected_output_file_url:ke}=Z;let et=null;const Ke={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(K){case R.h.NOMATCH:et=u.createElement(u.Fragment,null,u.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!Oe&&u.createElement(se,{className:"mb10",value:re}),Oe&&u.createElement("div",{style:Ke},u.createElement("a",{onClick:()=>(0,v.LR)($e,re)},re)),u.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!Oe&&u.createElement(se,{className:"mb10",value:D&&B.Base64.decode(D)||""}),Oe&&u.createElement("div",{style:Ke},u.createElement("a",{onClick:()=>(0,v.LR)(Ge,D)},D)),u.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!Oe&&u.createElement(se,{className:"mb10",value:pe&&B.Base64.decode(pe)||""}),Oe&&u.createElement("div",{style:Ke},u.createElement("a",{onClick:()=>(0,v.LR)(ke,pe)},pe)));break;case R.h.EXECUTEFAILURE:et=u.createElement(u.Fragment,null,u.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!Oe&&u.createElement(i.Z,{value:re,style:Ke}),Oe&&u.createElement("div",{style:Ke},u.createElement("a",{onClick:()=>(0,v.LR)($e,re)},re)),u.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),u.createElement("pre",{className:"error"},B.Base64.decode(k)));break;case R.h.COMPILEFAILURE:et=u.createElement(u.Fragment,null,u.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!Oe&&u.createElement(i.Z,{value:re,style:Ke}),Oe&&u.createElement("div",{style:Ke},u.createElement("a",{onClick:()=>(0,v.LR)($e,re)},re)),u.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),u.createElement("pre",{className:"error"},B.Base64.decode(k)));break;case R.h.PODFAILURE:et=u.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case R.h.TIMEOUT:et=u.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return u.createElement(u.Fragment,null," ",et," ")}function ie(Z){const{status:K,error_msg:k,execute_time:D,output:re,input:pe,expected_output:Oe,is_file:$e,input_file_url:Ge,output_file_url:ke,expected_output_file_url:et}=Z;let Ke=null;switch(K){case R.h.OK:Ke=u.createElement(u.Fragment,null,u.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",D,"\u79D2"),u.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),u.createElement("pre",null,B.Base64.decode(re)));break;case R.h.NOMATCH:Ke=u.createElement(u.Fragment,null,u.createElement("p",null,"\u8F93\u5165\uFF1A",u.createElement("pre",null,pe)),u.createElement("p",null,"\u8F93\u51FA\uFF1A",re&&B.Base64.decode(re)),u.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",Oe&&B.Base64.decode(Oe)));break;case R.h.EXECUTEFAILURE:Ke=u.createElement(u.Fragment,null,u.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",u.createElement("pre",null,pe)),u.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),u.createElement("pre",{className:"error"},B.Base64.decode(k)));break;case R.h.COMPILEFAILURE:Ke=u.createElement(u.Fragment,null,u.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",u.createElement("pre",null,pe)),u.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),u.createElement("pre",{className:"error"},B.Base64.decode(k)));break;case R.h.PODFAILURE:Ke=u.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case R.h.TIMEOUT:Ke=u.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return u.createElement(u.Fragment,null," ",Ke," ")}var U=({id:Z,is_file:K,input:k,debuging:D,submitting:re,executingMessage:pe,debugResult:Oe,onChangeInput:$e,onDebugCode:Ge,onSubmitCode:ke})=>{const[et,Ke]=(0,H.useReducer)(_e,te),{visible:tt,tabIndex:It}=et;(0,H.useEffect)(()=>{Ke({type:0,payload:!1})},[Z]);function Yt(Ft){let Ie=Ft.target.id;Ke({type:1,payload:Ie})}function qt(){Ke({type:0,payload:!tt})}const Ot=(0,H.useMemo)(()=>{if(Oe){const{status:Ft}=Oe;return u.createElement(u.Fragment,null,ie(Oe))}return null},[Oe]);function Ut(){Ke({type:0,payload:!0}),Ke({type:1,payload:"1"}),Ge()}return u.createElement("div",{className:"test-case-panel"},u.createElement("div",{className:`test-case-panel-body ${tt?"active":""}`},u.createElement("ul",{className:"s-navs"},u.createElement("li",null,u.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),u.createElement(f.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:u.createElement(z,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:K?"":k,onChange:$e}),rightNode:D?u.createElement(y.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):Oe?Ot:u.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),u.createElement("a",{className:`btn-collapse ${tt?"up":""}`,onClick:qt},tt?u.createElement(P.Z,null):u.createElement(F.Z,null)),u.createElement("footer",{className:"footer"},u.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),u.createElement("div",{className:"flex-container"},u.createElement(V.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),u.createElement(V.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),u.createElement(V.ZP,{className:"btn-green",type:"ghost",loading:D,onClick:Ut},"\u8C03\u8BD5\u4EE3\u7801"),u.createElement(V.ZP,{type:"primary",className:"custom-ant-disabled",loading:re,disabled:re,onClick:()=>{Ke({type:0,payload:!1}),ke()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},35106:function(xt,Re,_){"use strict";_.d(Re,{h:function(){return H}});var H=(I=>(I[I.NOMATCH=-1]="NOMATCH",I[I.OK=0]="OK",I[I.TIMEOUT=2]="TIMEOUT",I[I.PODFAILURE=3]="PODFAILURE",I[I.COMPILEFAILURE=4]="COMPILEFAILURE",I[I.EXECUTEFAILURE=5]="EXECUTEFAILURE",I[I.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",I))(H||{})},49802:function(xt,Re,_){"use strict";_.d(Re,{H7:function(){return i},KC:function(){return o},M3:function(){return T},MK:function(){return y},MU:function(){return P},Rg:function(){return j},WH:function(){return u},X6:function(){return R},bM:function(){return V},bx:function(){return S},dd:function(){return h},de:function(){return L},fi:function(){return v},fu:function(){return I},gu:function(){return O},n4:function(){return f},qe:function(){return C},rL:function(){return x},rX:function(){return B},uc:function(){return N},vl:function(){return n},wO:function(){return E},zO:function(){return F}});var H=_(99064);function I(z){return(0,H.U2)(`mypractices/${z}.json`,{hidePopLogin:!0})}function V(z,te){return(0,H.v_)(`mypractices/${z}/code_submit.json`,te)}function P(z,te){return(0,H.v_)(`mypractices/${z}/code_debug.json`,te)}function F(z,te){return te.language&&(te.language=encodeURIComponent(te.language)),(0,H.U2)(`mypractices/${z}/submit_records.json`,te)}function R(z){return(0,H.U2)("mypractices/record_detail.json",{id:z})}function B(z,te){return(0,H.U2)(`mypractices/${z}/result.json`,{mode:te})}function y(z,te){return(0,H.v_)(`mypractices/${z}/add_notes.json`,te)}function i(z,te){return(0,H.v_)(`mypractices/${z}/restore_initial_code.json`,te)}function v(z,te){return(0,H.v_)(`mypractices/${z}/sync_code.json`,te)}function f(z,te){return(0,H.v_)(`mypractices/${z}/update_code.json`,te)}function h(z){return(0,H.v_)(`mypractices/${z}/initial_codes.json`)}function n(z,te){return(0,H.v_)(`discusses/${z}/plus.json`,te)}function o(z){return(0,H.U2)("practices/practices_list.json",z)}function u(z,te){return(0,H.U2)(`practices/${z}/question_solution_articles`,te)}function S(z,te){return(0,H.v_)(`practices/${z}/question_solution_articles`,te)}function O(z,te){return(0,H.gz)(`practices/${z}/question_solution_articles/${te==null?void 0:te.active}`,te)}function T(z,te){return(0,H.U2)(`practices/${z}/question_solution_articles/${te==null?void 0:te.active}/edit`,te)}function E(z,te){return(0,H.U2)(`practices/${z}/question_solution_articles/${te==null?void 0:te.active}`,te)}function C(z,te){return(0,H.v_)(`practices/${z}/question_solution_articles/${te==null?void 0:te.active}/set_authority_or_excellent`,te)}function j(z,te){return(0,H.v_)(`practices/${z}/question_solution_articles/${te==null?void 0:te.active}/praise_or_treads`,te)}function x(z,te){return(0,H.v_)(`practices/${z}/question_solution_articles/${te==null?void 0:te.active}/hide`)}function L(z,te){return(0,H.IV)(`practices/${z}/question_solution_articles/${te==null?void 0:te.active}`,te)}function N(z,te){return(0,H.v_)(`mypractices/${z}/update_practice_time_sum`,te)}},24768:function(xt,Re,_){"use strict";_.d(Re,{AL:function(){return j},Iy:function(){return f},Qv:function(){return o},ez:function(){return C},jb:function(){return h}});var H=_(32834),I=_.n(H),V=_(11690),P=_.n(V);let F=1;function R(te,J){const ge=te.match(/^(\s+)(?:```)/);if(ge===null)return J;const _e=ge[1];return J.split(`
`).map(se=>{const Y=se.match(/^\s+/);if(Y===null)return se;const[ie]=Y;return ie.length>=_e.length?se.slice(_e.length):se}).join(`
`)}let B=[],y=["<ul>"];const i=new(I()).Renderer,v=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function f(){B.length=0,y=["<ul>"]}const h={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function n(te,J,ge,_e){if(J>=te.length||te[J].level<=ge)return J;var se=te[J];_e.push("<li><a href='#"+F+se.anchor+"'>"+se.text+"</a>"),J++;var Y=[];return J=n(te,J,se.level,Y),Y.length>0&&(_e.push("<ul>"),Y.forEach(function(ie){_e.push(ie)}),_e.push("</ul>")),_e.push("</li>"),J=n(te,J,ge,_e),J}function o(){return n(B,0,0,y),y.push("</ul>"),y.join("")}const u={heading(te){const J=v.exec(te);if(F+=1,J)return{type:"heading",raw:J[0],depth:J[1].length,text:J[2]}},fences(te){const J=this.rules.block.fences.exec(te);if(J){const ge=J[0];let _e=R(ge,J[3]||"");const se=J[2]?J[2].trim():J[2];if(["latex","katex","math"].indexOf(se)>=0){const Y=T(),ie=_e;_e=Y,E[Y]={type:"block",expression:ie}}return{type:"code",raw:ge,lang:se,text:_e}}}},S=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let O=0;const T=()=>`__special_katext_id_${O++}__`;let E={};function C(){return E}function j(){O=0,E={}}function x(te){return te=te.replace(S,(J,ge)=>{const _e=T();return E[_e]={type:"inline",expression:ge},_e}),te}const L=i.listitem;i.listitem=function(te){return L(x(te))};const N=i.paragraph;i.paragraph=function(te){return N(x(te))};const z=i.tablecell;i.tablecell=function(te,J){return z(x(te),J)},i.code=function(te,J,ge){const _e=(J||"").match(/\S*/)[0];return _e?["latex","katex","math"].indexOf(_e)>=0?`<p class='editormd-tex'>${te}</p>`:`<pre class="prettyprint linenums"><code class="language-${J}">${ge?te:(0,V.escape)(te,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(ge?te:(0,V.escape)(te,!0))+"</code></pre>"},i.heading=function(te,J,ge){let _e=this.options.headerPrefix+ge.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return B.push({anchor:_e,level:J,text:te}),"<h"+J+' id="'+F+_e+'">'+te+"</h"+J+">"},I().setOptions({silent:!0,gfm:!0,pedantic:!1}),I().use({tokenizer:u,renderer:i}),Re.ZP=I()},36785:function(xt,Re,_){"use strict";_.d(Re,{o2:function(){return F},yT:function(){return R}});var H=_(19127),I=_(33166);const V=I.i.map(B=>`${B}-inverse`),P=["success","processing","error","default","warning"];function F(B){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,H.Z)(V),(0,H.Z)(I.i)).includes(B):I.i.includes(B)}function R(B){return P.includes(B)}},79676:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return R}});var H=_(19447);function I(B,y,i,v){if(v===!1)return{adjustX:!1,adjustY:!1};const f=v&&typeof v=="object"?v:{},h={};switch(B){case"top":case"bottom":h.shiftX=y.dropdownArrowOffset*2+i;break;case"left":case"right":h.shiftY=y.dropdownArrowOffsetVertical*2+i;break}const n=Object.assign(Object.assign({},h),f);return n.shiftX||(n.adjustX=!0),n.shiftY||(n.adjustY=!0),n}const V={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"]}},P={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"]}},F=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function R(B){const{arrowWidth:y,autoAdjustOverflow:i,arrowPointAtCenter:v,offset:f,borderRadius:h,visibleFirst:n}=B,o=y/2,u={};return Object.keys(V).forEach(S=>{const O=v&&P[S]||V[S],T=Object.assign(Object.assign({},O),{offset:[0,0]});switch(u[S]=T,F.has(S)&&(T.autoArrow=!1),S){case"top":case"topLeft":case"topRight":T.offset[1]=-o-f;break;case"bottom":case"bottomLeft":case"bottomRight":T.offset[1]=o+f;break;case"left":case"leftTop":case"leftBottom":T.offset[0]=-o-f;break;case"right":case"rightTop":case"rightBottom":T.offset[0]=o+f;break}const E=(0,H.fS)({contentRadius:h,limitVerticalRadius:!0});if(v)switch(S){case"topLeft":case"bottomLeft":T.offset[0]=-E.dropdownArrowOffset-o;break;case"topRight":case"bottomRight":T.offset[0]=E.dropdownArrowOffset+o;break;case"leftTop":case"rightTop":T.offset[1]=-E.dropdownArrowOffset-o;break;case"leftBottom":case"rightBottom":T.offset[1]=E.dropdownArrowOffset+o;break}T.overflow=I(S,E,y,i),n&&(T.htmlRegion="visibleFirst")}),u}},19080:function(xt,Re,_){"use strict";_.d(Re,{F:function(){return F},Z:function(){return P}});var H=_(92310),I=_.n(H);const V=null;function P(R,B,y){return I()({[`${R}-status-success`]:B==="success",[`${R}-status-warning`]:B==="warning",[`${R}-status-error`]:B==="error",[`${R}-status-validating`]:B==="validating",[`${R}-has-feedback`]:y})}const F=(R,B)=>B||R},9432:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return E},n:function(){return O}});var H=_(19248),I=_(92310),V=_.n(I),P=_(93681),F=_(8654),R=_(59301),B=_(19080),y=_(36355),i=_(1684),v=_(19716),f=_(32441),h=_(33234),n=_(59412),o=_(9937);function u(C){return!!(C.prefix||C.suffix||C.allowClear)}var S=function(C,j){var x={};for(var L in C)Object.prototype.hasOwnProperty.call(C,L)&&j.indexOf(L)<0&&(x[L]=C[L]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function")for(var N=0,L=Object.getOwnPropertySymbols(C);N<L.length;N++)j.indexOf(L[N])<0&&Object.prototype.propertyIsEnumerable.call(C,L[N])&&(x[L[N]]=C[L[N]]);return x};function O(C,j){if(!C)return;C.focus(j);const{cursor:x}=j||{};if(x){const L=C.value.length;switch(x){case"start":C.setSelectionRange(0,0);break;case"end":C.setSelectionRange(L,L);break;default:C.setSelectionRange(0,L);break}}}var E=(0,R.forwardRef)((C,j)=>{var x;const{prefixCls:L,bordered:N=!0,status:z,size:te,disabled:J,onBlur:ge,onFocus:_e,suffix:se,allowClear:Y,addonAfter:ie,addonBefore:U,className:Z,style:K,styles:k,rootClassName:D,onChange:re,classNames:pe}=C,Oe=S(C,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:$e,direction:Ge,input:ke}=R.useContext(y.E_),et=$e("input",L),Ke=(0,R.useRef)(null),[tt,It]=(0,o.ZP)(et),{compactSize:Yt,compactItemClassnames:qt}=(0,h.ri)(et,Ge),Ot=(0,v.Z)(rt=>{var Xe;return(Xe=te!=null?te:Yt)!==null&&Xe!==void 0?Xe:rt}),Ut=R.useContext(i.Z),Ft=J!=null?J:Ut,{status:Ie,hasFeedback:Ze,feedbackIcon:Fe}=(0,R.useContext)(f.aM),it=(0,B.F)(Ie,z),nt=u(C)||!!Ze,ue=(0,R.useRef)(nt);(0,R.useEffect)(()=>{var rt;nt&&ue.current,ue.current=nt},[nt]);const ye=(0,n.Z)(Ke,!0),Te=rt=>{ye(),ge==null||ge(rt)},Ae=rt=>{ye(),_e==null||_e(rt)},Me=rt=>{ye(),re==null||re(rt)},ze=(Ze||se)&&R.createElement(R.Fragment,null,se,Ze&&Fe);let qe;return typeof Y=="object"&&(Y!=null&&Y.clearIcon)?qe=Y:Y&&(qe={clearIcon:R.createElement(H.Z,null)}),tt(R.createElement(P.default,Object.assign({ref:(0,F.sQ)(j,Ke),prefixCls:et,autoComplete:ke==null?void 0:ke.autoComplete},Oe,{disabled:Ft,onBlur:Te,onFocus:Ae,style:Object.assign(Object.assign({},ke==null?void 0:ke.style),K),styles:Object.assign(Object.assign({},ke==null?void 0:ke.styles),k),suffix:ze,allowClear:qe,className:V()(Z,D,qt,ke==null?void 0:ke.className),onChange:Me,addonAfter:ie&&R.createElement(h.BR,null,R.createElement(f.Ux,{override:!0,status:!0},ie)),addonBefore:U&&R.createElement(h.BR,null,R.createElement(f.Ux,{override:!0,status:!0},U)),classNames:Object.assign(Object.assign(Object.assign({},pe),ke==null?void 0:ke.classNames),{input:V()({[`${et}-sm`]:Ot==="small",[`${et}-lg`]:Ot==="large",[`${et}-rtl`]:Ge==="rtl",[`${et}-borderless`]:!N},!nt&&(0,B.Z)(et,it),pe==null?void 0:pe.input,(x=ke==null?void 0:ke.classNames)===null||x===void 0?void 0:x.input,It)}),classes:{affixWrapper:V()({[`${et}-affix-wrapper-sm`]:Ot==="small",[`${et}-affix-wrapper-lg`]:Ot==="large",[`${et}-affix-wrapper-rtl`]:Ge==="rtl",[`${et}-affix-wrapper-borderless`]:!N},(0,B.Z)(`${et}-affix-wrapper`,it,Ze),It),wrapper:V()({[`${et}-group-rtl`]:Ge==="rtl"},It),group:V()({[`${et}-group-wrapper-sm`]:Ot==="small",[`${et}-group-wrapper-lg`]:Ot==="large",[`${et}-group-wrapper-rtl`]:Ge==="rtl",[`${et}-group-wrapper-disabled`]:Ft},(0,B.Z)(`${et}-group-wrapper`,it,Ze),It)}})))})},1643:function(xt,Re,_){"use strict";var H=_(19248),I=_(92310),V=_.n(I),P=_(9296),F=_(59301),R=_(19080),B=_(36355),y=_(1684),i=_(19716),v=_(32441),f=_(9432),h=_(9937),n=function(u,S){var O={};for(var T in u)Object.prototype.hasOwnProperty.call(u,T)&&S.indexOf(T)<0&&(O[T]=u[T]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,T=Object.getOwnPropertySymbols(u);E<T.length;E++)S.indexOf(T[E])<0&&Object.prototype.propertyIsEnumerable.call(u,T[E])&&(O[T[E]]=u[T[E]]);return O};const o=(0,F.forwardRef)((u,S)=>{const{prefixCls:O,bordered:T=!0,size:E,disabled:C,status:j,allowClear:x,showCount:L,classNames:N,rootClassName:z,className:te}=u,J=n(u,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:ge,direction:_e}=F.useContext(B.E_),se=(0,i.Z)(E),Y=F.useContext(y.Z),ie=C!=null?C:Y,{status:U,hasFeedback:Z,feedbackIcon:K}=F.useContext(v.aM),k=(0,R.F)(U,j),D=F.useRef(null);F.useImperativeHandle(S,()=>{var Ge;return{resizableTextArea:(Ge=D.current)===null||Ge===void 0?void 0:Ge.resizableTextArea,focus:ke=>{var et,Ke;(0,f.n)((Ke=(et=D.current)===null||et===void 0?void 0:et.resizableTextArea)===null||Ke===void 0?void 0:Ke.textArea,ke)},blur:()=>{var ke;return(ke=D.current)===null||ke===void 0?void 0:ke.blur()}}});const re=ge("input",O);let pe;typeof x=="object"&&(x!=null&&x.clearIcon)?pe=x:x&&(pe={clearIcon:F.createElement(H.Z,null)});const[Oe,$e]=(0,h.ZP)(re);return Oe(F.createElement(P.default,Object.assign({},J,{disabled:ie,allowClear:pe,className:V()(te,z),classes:{affixWrapper:V()(`${re}-textarea-affix-wrapper`,{[`${re}-affix-wrapper-rtl`]:_e==="rtl",[`${re}-affix-wrapper-borderless`]:!T,[`${re}-affix-wrapper-sm`]:se==="small",[`${re}-affix-wrapper-lg`]:se==="large",[`${re}-textarea-show-count`]:L},(0,R.Z)(`${re}-affix-wrapper`,k),$e)},classNames:Object.assign(Object.assign({},N),{textarea:V()({[`${re}-borderless`]:!T,[`${re}-sm`]:se==="small",[`${re}-lg`]:se==="large"},(0,R.Z)(re,k),$e,N==null?void 0:N.textarea)}),prefixCls:re,suffix:Z&&F.createElement("span",{className:`${re}-textarea-suffix`},K),showCount:L,ref:D})))});Re.Z=o},59412:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return I}});var H=_(59301);function I(V,P){const F=(0,H.useRef)([]),R=()=>{F.current.push(setTimeout(()=>{var B,y,i,v;!((B=V.current)===null||B===void 0)&&B.input&&((y=V.current)===null||y===void 0?void 0:y.input.getAttribute("type"))==="password"&&(!((i=V.current)===null||i===void 0)&&i.input.hasAttribute("value"))&&((v=V.current)===null||v===void 0||v.input.removeAttribute("value"))}))};return(0,H.useEffect)(()=>(P&&R(),()=>F.current.forEach(B=>{B&&clearTimeout(B)})),[]),R}},92832:function(xt,Re,_){"use strict";_.d(Re,{default:function(){return se}});var H=_(92310),I=_.n(H),V=_(59301),P=_(36355),F=_(32441),R=_(9937),y=Y=>{const{getPrefixCls:ie,direction:U}=(0,V.useContext)(P.E_),{prefixCls:Z,className:K}=Y,k=ie("input-group",Z),D=ie("input"),[re,pe]=(0,R.ZP)(D),Oe=I()(k,{[`${k}-lg`]:Y.size==="large",[`${k}-sm`]:Y.size==="small",[`${k}-compact`]:Y.compact,[`${k}-rtl`]:U==="rtl"},pe,K),$e=(0,V.useContext)(F.aM),Ge=(0,V.useMemo)(()=>Object.assign(Object.assign({},$e),{isFormItemInput:!1}),[$e]);return re(V.createElement("span",{className:Oe,style:Y.style,onMouseEnter:Y.onMouseEnter,onMouseLeave:Y.onMouseLeave,onFocus:Y.onFocus,onBlur:Y.onBlur},V.createElement(F.aM.Provider,{value:Ge},Y.children)))},i=_(9432),v=_(73331),f=_(15277),h=_(2738),n=_(8654),o=_(59412),u=function(Y,ie){var U={};for(var Z in Y)Object.prototype.hasOwnProperty.call(Y,Z)&&ie.indexOf(Z)<0&&(U[Z]=Y[Z]);if(Y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,Z=Object.getOwnPropertySymbols(Y);K<Z.length;K++)ie.indexOf(Z[K])<0&&Object.prototype.propertyIsEnumerable.call(Y,Z[K])&&(U[Z[K]]=Y[Z[K]]);return U};const S=Y=>Y?V.createElement(f.Z,null):V.createElement(v.Z,null),O={click:"onClick",hover:"onMouseOver"};var E=V.forwardRef((Y,ie)=>{const{visibilityToggle:U=!0}=Y,Z=typeof U=="object"&&U.visible!==void 0,[K,k]=(0,V.useState)(()=>Z?U.visible:!1),D=(0,V.useRef)(null);V.useEffect(()=>{Z&&k(U.visible)},[Z,U]);const re=(0,o.Z)(D),pe=()=>{const{disabled:Ft}=Y;Ft||(K&&re(),k(Ie=>{var Ze;const Fe=!Ie;return typeof U=="object"&&((Ze=U.onVisibleChange)===null||Ze===void 0||Ze.call(U,Fe)),Fe}))},Oe=Ft=>{const{action:Ie="click",iconRender:Ze=S}=Y,Fe=O[Ie]||"",it=Ze(K),nt={[Fe]:pe,className:`${Ft}-icon`,key:"passwordIcon",onMouseDown:ue=>{ue.preventDefault()},onMouseUp:ue=>{ue.preventDefault()}};return V.cloneElement(V.isValidElement(it)?it:V.createElement("span",null,it),nt)},{className:$e,prefixCls:Ge,inputPrefixCls:ke,size:et}=Y,Ke=u(Y,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:tt}=V.useContext(P.E_),It=tt("input",ke),Yt=tt("input-password",Ge),qt=U&&Oe(Yt),Ot=I()(Yt,$e,{[`${Yt}-${et}`]:!!et}),Ut=Object.assign(Object.assign({},(0,h.Z)(Ke,["suffix","iconRender","visibilityToggle"])),{type:K?"text":"password",className:Ot,prefixCls:It,suffix:qt});return et&&(Ut.size=et),V.createElement(i.Z,Object.assign({ref:(0,n.sQ)(ie,D)},Ut))}),C=_(47472),j=_(92343),x=_(3113),L=_(19716),N=_(33234),z=function(Y,ie){var U={};for(var Z in Y)Object.prototype.hasOwnProperty.call(Y,Z)&&ie.indexOf(Z)<0&&(U[Z]=Y[Z]);if(Y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,Z=Object.getOwnPropertySymbols(Y);K<Z.length;K++)ie.indexOf(Z[K])<0&&Object.prototype.propertyIsEnumerable.call(Y,Z[K])&&(U[Z[K]]=Y[Z[K]]);return U},J=V.forwardRef((Y,ie)=>{const{prefixCls:U,inputPrefixCls:Z,className:K,size:k,suffix:D,enterButton:re=!1,addonAfter:pe,loading:Oe,disabled:$e,onSearch:Ge,onChange:ke,onCompositionStart:et,onCompositionEnd:Ke}=Y,tt=z(Y,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:It,direction:Yt}=V.useContext(P.E_),qt=V.useRef(!1),Ot=It("input-search",U),Ut=It("input",Z),{compactSize:Ft}=(0,N.ri)(Ot,Yt),Ie=(0,L.Z)(He=>{var lt;return(lt=k!=null?k:Ft)!==null&&lt!==void 0?lt:He}),Ze=V.useRef(null),Fe=He=>{He&&He.target&&He.type==="click"&&Ge&&Ge(He.target.value,He,{source:"clear"}),ke&&ke(He)},it=He=>{var lt;document.activeElement===((lt=Ze.current)===null||lt===void 0?void 0:lt.input)&&He.preventDefault()},nt=He=>{var lt,gt;Ge&&Ge((gt=(lt=Ze.current)===null||lt===void 0?void 0:lt.input)===null||gt===void 0?void 0:gt.value,He,{source:"input"})},ue=He=>{qt.current||Oe||nt(He)},ye=typeof re=="boolean"?V.createElement(C.Z,null):null,Te=`${Ot}-button`;let Ae;const Me=re||{},ze=Me.type&&Me.type.__ANT_BUTTON===!0;ze||Me.type==="button"?Ae=(0,j.Tm)(Me,Object.assign({onMouseDown:it,onClick:He=>{var lt,gt;(gt=(lt=Me==null?void 0:Me.props)===null||lt===void 0?void 0:lt.onClick)===null||gt===void 0||gt.call(lt,He),nt(He)},key:"enterButton"},ze?{className:Te,size:Ie}:{})):Ae=V.createElement(x.ZP,{className:Te,type:re?"primary":void 0,size:Ie,disabled:$e,key:"enterButton",onMouseDown:it,onClick:nt,loading:Oe,icon:ye},re),pe&&(Ae=[Ae,(0,j.Tm)(pe,{key:"addonAfter"})]);const qe=I()(Ot,{[`${Ot}-rtl`]:Yt==="rtl",[`${Ot}-${Ie}`]:!!Ie,[`${Ot}-with-button`]:!!re},K),rt=He=>{qt.current=!0,et==null||et(He)},Xe=He=>{qt.current=!1,Ke==null||Ke(He)};return V.createElement(i.Z,Object.assign({ref:(0,n.sQ)(Ze,ie),onPressEnter:ue},tt,{size:Ie,onCompositionStart:rt,onCompositionEnd:Xe,prefixCls:Ut,addonAfter:Ae,suffix:D,onChange:Fe,className:qe,disabled:$e}))}),ge=_(1643);const _e=i.Z;_e.Group=y,_e.Search=J,_e.TextArea=ge.Z,_e.Password=E;var se=_e},9937:function(xt,Re,_){"use strict";_.d(Re,{M1:function(){return B},TM:function(){return j},Xy:function(){return y},bi:function(){return f},e5:function(){return C},ik:function(){return h},nz:function(){return F},pU:function(){return R},s7:function(){return n},x0:function(){return v}});var H=_(17313),I=_(74207),V=_(37613),P=_(83116);const F=x=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:x,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),R=x=>({borderColor:x.hoverBorderColor}),B=x=>({borderColor:x.activeBorderColor,boxShadow:x.activeShadow,outline:0}),y=x=>({color:x.colorTextDisabled,backgroundColor:x.colorBgContainerDisabled,borderColor:x.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},R((0,V.TS)(x,{hoverBorderColor:x.colorBorder})))}),i=x=>{const{paddingBlockLG:L,fontSizeLG:N,lineHeightLG:z,borderRadiusLG:te,paddingInlineLG:J}=x;return{padding:`${L}px ${J}px`,fontSize:N,lineHeight:z,borderRadius:te}},v=x=>({padding:`${x.paddingBlockSM}px ${x.paddingInlineSM}px`,borderRadius:x.borderRadiusSM}),f=(x,L)=>{const{componentCls:N,colorError:z,colorWarning:te,errorActiveShadow:J,warningActiveShadow:ge,colorErrorBorderHover:_e,colorWarningBorderHover:se}=x;return{[`&-status-error:not(${L}-disabled):not(${L}-borderless)${L}`]:{borderColor:z,"&:hover":{borderColor:_e},"&:focus, &-focused":Object.assign({},B((0,V.TS)(x,{activeBorderColor:z,activeShadow:J}))),[`${N}-prefix, ${N}-suffix`]:{color:z}},[`&-status-warning:not(${L}-disabled):not(${L}-borderless)${L}`]:{borderColor:te,"&:hover":{borderColor:se},"&:focus, &-focused":Object.assign({},B((0,V.TS)(x,{activeBorderColor:te,activeShadow:ge}))),[`${N}-prefix, ${N}-suffix`]:{color:te}}}},h=x=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${x.paddingBlock}px ${x.paddingInline}px`,color:x.colorText,fontSize:x.fontSize,lineHeight:x.lineHeight,backgroundColor:x.colorBgContainer,backgroundImage:"none",borderWidth:x.lineWidth,borderStyle:x.lineType,borderColor:x.colorBorder,borderRadius:x.borderRadius,transition:`all ${x.motionDurationMid}`},F(x.colorTextPlaceholder)),{"&:hover":Object.assign({},R(x)),"&:focus, &-focused":Object.assign({},B(x)),"&-disabled, &[disabled]":Object.assign({},y(x)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:x.controlHeight,lineHeight:x.lineHeight,verticalAlign:"bottom",transition:`all ${x.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},i(x)),"&-sm":Object.assign({},v(x)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),n=x=>{const{componentCls:L,antCls:N}=x;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:x.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${L}, &-lg > ${L}-group-addon`]:Object.assign({},i(x)),[`&-sm ${L}, &-sm > ${L}-group-addon`]:Object.assign({},v(x)),[`&-lg ${N}-select-single ${N}-select-selector`]:{height:x.controlHeightLG},[`&-sm ${N}-select-single ${N}-select-selector`]:{height:x.controlHeightSM},[`> ${L}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${L}-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 ${x.paddingInline}px`,color:x.colorText,fontWeight:"normal",fontSize:x.fontSize,textAlign:"center",backgroundColor:x.colorFillAlter,border:`${x.lineWidth}px ${x.lineType} ${x.colorBorder}`,borderRadius:x.borderRadius,transition:`all ${x.motionDurationSlow}`,lineHeight:1,[`${N}-select`]:{margin:`-${x.paddingBlock+1}px -${x.paddingInline}px`,[`&${N}-select-single:not(${N}-select-customize-input)`]:{[`${N}-select-selector`]:{backgroundColor:"inherit",border:`${x.lineWidth}px ${x.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${N}-select-selector`]:{color:x.colorPrimary}}},[`${N}-cascader-picker`]:{margin:`-9px -${x.paddingInline}px`,backgroundColor:"transparent",[`${N}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${L}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${L}-search-with-button &`]:{zIndex:0}}},[`> ${L}:first-child, ${L}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${N}-select ${N}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${L}-affix-wrapper`]:{[`&:not(:first-child) ${L}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${L}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${L}:last-child, ${L}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${N}-select ${N}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${L}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${L}-search &`]:{borderStartStartRadius:x.borderRadius,borderEndStartRadius:x.borderRadius}},[`&:not(:first-child), ${L}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${L}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,H.dF)()),{[`${L}-group-addon, ${L}-group-wrap, > ${L}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:x.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${L}-affix-wrapper,
& > ${L}-number-affix-wrapper,
& > ${N}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-x.lineWidth,borderInlineEndWidth:x.lineWidth},[`${L}`]:{float:"none"},[`& > ${N}-select > ${N}-select-selector,
& > ${N}-select-auto-complete ${L},
& > ${N}-cascader-picker ${L},
& > ${L}-group-wrapper ${L}`]:{borderInlineEndWidth:x.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${N}-select-focused`]:{zIndex:1},[`& > ${N}-select > ${N}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${N}-select:first-child > ${N}-select-selector,
& > ${N}-select-auto-complete:first-child ${L},
& > ${N}-cascader-picker:first-child ${L}`]:{borderStartStartRadius:x.borderRadius,borderEndStartRadius:x.borderRadius},[`& > *:last-child,
& > ${N}-select:last-child > ${N}-select-selector,
& > ${N}-cascader-picker:last-child ${L},
& > ${N}-cascader-picker-focused:last-child ${L}`]:{borderInlineEndWidth:x.lineWidth,borderStartEndRadius:x.borderRadius,borderEndEndRadius:x.borderRadius},[`& > ${N}-select-auto-complete ${L}`]:{verticalAlign:"top"},[`${L}-group-wrapper + ${L}-group-wrapper`]:{marginInlineStart:-x.lineWidth,[`${L}-affix-wrapper`]:{borderRadius:0}},[`${L}-group-wrapper:not(:last-child)`]:{[`&${L}-search > ${L}-group`]:{[`& > ${L}-group-addon > ${L}-search-button`]:{borderRadius:0},[`& > ${L}`]:{borderStartStartRadius:x.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:x.borderRadius}}}})}},o=x=>{const{componentCls:L,controlHeightSM:N,lineWidth:z}=x,J=(N-z*2-16)/2;return{[L]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,H.Wf)(x)),h(x)),f(x,L)),{'&[type="color"]':{height:x.controlHeight,[`&${L}-lg`]:{height:x.controlHeightLG},[`&${L}-sm`]:{height:N,paddingTop:J,paddingBottom:J}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},u=x=>{const{componentCls:L}=x;return{[`${L}-clear-icon`]:{margin:0,color:x.colorTextQuaternary,fontSize:x.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${x.motionDurationSlow}`,"&:hover":{color:x.colorTextTertiary},"&:active":{color:x.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${x.inputAffixPadding}px`}}}},S=x=>{const{componentCls:L,inputAffixPadding:N,colorTextDescription:z,motionDurationSlow:te,colorIcon:J,colorIconHover:ge,iconCls:_e}=x;return{[`${L}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},h(x)),{display:"inline-flex",[`&:not(${L}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},R(x)),{zIndex:1,[`${L}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${L}[disabled]`]:{background:"transparent"}},[`> input${L}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${L}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:x.paddingXS}},"&-show-count-suffix":{color:z},"&-show-count-has-suffix":{marginInlineEnd:x.paddingXXS},"&-prefix":{marginInlineEnd:N},"&-suffix":{marginInlineStart:N}}}),u(x)),{[`${_e}${L}-password-icon`]:{color:J,cursor:"pointer",transition:`all ${te}`,"&:hover":{color:ge}}}),f(x,`${L}-affix-wrapper`))}},O=x=>{const{componentCls:L,colorError:N,colorWarning:z,borderRadiusLG:te,borderRadiusSM:J}=x;return{[`${L}-group`]:Object.assign(Object.assign(Object.assign({},(0,H.Wf)(x)),n(x)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${L}-group-addon`]:{borderRadius:te,fontSize:x.fontSizeLG}},"&-sm":{[`${L}-group-addon`]:{borderRadius:J}},"&-status-error":{[`${L}-group-addon`]:{color:N,borderColor:N}},"&-status-warning":{[`${L}-group-addon`]:{color:z,borderColor:z}},"&-disabled":{[`${L}-group-addon`]:Object.assign({},y(x))},[`&:not(${L}-compact-first-item):not(${L}-compact-last-item)${L}-compact-item`]:{[`${L}, ${L}-group-addon`]:{borderRadius:0}},[`&:not(${L}-compact-last-item)${L}-compact-first-item`]:{[`${L}, ${L}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${L}-compact-first-item)${L}-compact-last-item`]:{[`${L}, ${L}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},T=x=>{const{componentCls:L,antCls:N}=x,z=`${L}-search`;return{[z]:{[`${L}`]:{"&:hover, &:focus":{borderColor:x.colorPrimaryHover,[`+ ${L}-group-addon ${z}-button:not(${N}-btn-primary)`]:{borderInlineStartColor:x.colorPrimaryHover}}},[`${L}-affix-wrapper`]:{borderRadius:0},[`${L}-lg`]:{lineHeight:x.lineHeightLG-2e-4},[`> ${L}-group`]:{[`> ${L}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${z}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:x.borderRadius,borderEndEndRadius:x.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${z}-button:not(${N}-btn-primary)`]:{color:x.colorTextDescription,"&:hover":{color:x.colorPrimaryHover},"&:active":{color:x.colorPrimaryActive},[`&${N}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${z}-button`]:{height:x.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${z}-button`]:{height:x.controlHeightLG},[`&-small ${z}-button`]:{height:x.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${L}-compact-item`]:{[`&:not(${L}-compact-last-item)`]:{[`${L}-group-addon`]:{[`${L}-search-button`]:{marginInlineEnd:-x.lineWidth,borderRadius:0}}},[`&:not(${L}-compact-first-item)`]:{[`${L},${L}-affix-wrapper`]:{borderRadius:0}},[`> ${L}-group-addon ${L}-search-button,
> ${L},
${L}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${L}-affix-wrapper-focused`]:{zIndex:2}}}}},E=x=>{const{componentCls:L,paddingLG:N}=x,z=`${L}-textarea`;return{[z]:{position:"relative","&-show-count":{[`> ${L}`]:{height:"100%"},[`${L}-data-count`]:{position:"absolute",bottom:-x.fontSize*x.lineHeight,insetInlineEnd:0,color:x.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${L}`]:{paddingInlineEnd:N}},[`&-affix-wrapper${z}-has-feedback`]:{[`${L}`]:{paddingInlineEnd:N}},[`&-affix-wrapper${L}-affix-wrapper`]:{padding:0,[`> textarea${L}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${L}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${L}-clear-icon`]:{position:"absolute",insetInlineEnd:x.paddingXS,insetBlockStart:x.paddingXS},[`${z}-suffix`]:{position:"absolute",top:0,insetInlineEnd:x.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function C(x){return(0,V.TS)(x,{inputAffixPadding:x.paddingXXS})}const j=x=>{const{controlHeight:L,fontSize:N,lineHeight:z,lineWidth:te,controlHeightSM:J,controlHeightLG:ge,fontSizeLG:_e,lineHeightLG:se,paddingSM:Y,controlPaddingHorizontalSM:ie,controlPaddingHorizontal:U,colorFillAlter:Z,colorPrimaryHover:K,controlOutlineWidth:k,controlOutline:D,colorErrorOutline:re,colorWarningOutline:pe}=x;return{paddingBlock:Math.max(Math.round((L-N*z)/2*10)/10-te,3),paddingBlockSM:Math.max(Math.round((J-N*z)/2*10)/10-te,0),paddingBlockLG:Math.ceil((ge-_e*se)/2*10)/10-te,paddingInline:Y-te,paddingInlineSM:ie-te,paddingInlineLG:U-te,addonBg:Z,activeBorderColor:K,hoverBorderColor:K,activeShadow:`0 0 0 ${k}px ${D}`,errorActiveShadow:`0 0 0 ${k}px ${re}`,warningActiveShadow:`0 0 0 ${k}px ${pe}`}};Re.ZP=(0,P.Z)("Input",x=>{const L=(0,V.TS)(x,C(x));return[o(L),E(L),S(L),O(L),T(L),(0,I.c)(L)]},j)},19447:function(xt,Re,_){"use strict";_.d(Re,{ZP:function(){return F},fS:function(){return V},qN:function(){return I}});var H=_(47585);const I=8;function V(R){const B=I,{contentRadius:y,limitVerticalRadius:i}=R,v=y>12?y+2:12;return{dropdownArrowOffset:v,dropdownArrowOffsetVertical:i?B:v}}function P(R,B){return R?B:{}}function F(R,B){const{componentCls:y,sizePopupArrow:i,borderRadiusXS:v,borderRadiusOuter:f,boxShadowPopoverArrow:h}=R,{colorBg:n,contentRadius:o=R.borderRadiusLG,limitVerticalRadius:u,arrowDistance:S=0,arrowPlacement:O={left:!0,right:!0,top:!0,bottom:!0}}=B,{dropdownArrowOffsetVertical:T,dropdownArrowOffset:E}=V({contentRadius:o,limitVerticalRadius:u});return{[y]:Object.assign(Object.assign(Object.assign(Object.assign({[`${y}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,H.r)(i,v,f,n,h)),{"&:before":{background:n}})]},P(!!O.top,{[[`&-placement-top ${y}-arrow`,`&-placement-topLeft ${y}-arrow`,`&-placement-topRight ${y}-arrow`].join(",")]:{bottom:S,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${y}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${y}-arrow`]:{left:{_skip_check_:!0,value:E}},[`&-placement-topRight ${y}-arrow`]:{right:{_skip_check_:!0,value:E}}})),P(!!O.bottom,{[[`&-placement-bottom ${y}-arrow`,`&-placement-bottomLeft ${y}-arrow`,`&-placement-bottomRight ${y}-arrow`].join(",")]:{top:S,transform:"translateY(-100%)"},[`&-placement-bottom ${y}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${y}-arrow`]:{left:{_skip_check_:!0,value:E}},[`&-placement-bottomRight ${y}-arrow`]:{right:{_skip_check_:!0,value:E}}})),P(!!O.left,{[[`&-placement-left ${y}-arrow`,`&-placement-leftTop ${y}-arrow`,`&-placement-leftBottom ${y}-arrow`].join(",")]:{right:{_skip_check_:!0,value:S},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${y}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${y}-arrow`]:{top:T},[`&-placement-leftBottom ${y}-arrow`]:{bottom:T}})),P(!!O.right,{[[`&-placement-right ${y}-arrow`,`&-placement-rightTop ${y}-arrow`,`&-placement-rightBottom ${y}-arrow`].join(",")]:{left:{_skip_check_:!0,value:S},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${y}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${y}-arrow`]:{top:T},[`&-placement-rightBottom ${y}-arrow`]:{bottom:T}}))}}},47585:function(xt,Re,_){"use strict";_.d(Re,{r:function(){return H}});const H=(I,V,P,F,R)=>{const B=I/2,y=0,i=B,v=P*1/Math.sqrt(2),f=B-P*(1-1/Math.sqrt(2)),h=B-V*(1/Math.sqrt(2)),n=P*(Math.sqrt(2)-1)+V*(1/Math.sqrt(2)),o=2*B-h,u=n,S=2*B-v,O=f,T=2*B-y,E=i,C=B*Math.sqrt(2)+P*(Math.sqrt(2)-2),j=P*(Math.sqrt(2)-1);return{pointerEvents:"none",width:I,height:I,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:I,height:I/2,background:F,clipPath:{_multi_value_:!0,value:[`polygon(${j}px 100%, 50% ${j}px, ${2*B-j}px 100%, ${j}px 100%)`,`path('M ${y} ${i} A ${P} ${P} 0 0 0 ${v} ${f} L ${h} ${n} A ${V} ${V} 0 0 1 ${o} ${u} L ${S} ${O} A ${P} ${P} 0 0 0 ${T} ${E} Z')`]},content:'""'},"&::after":{content:'""',position:"absolute",width:C,height:C,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${V}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:R,zIndex:0,background:"transparent"}}}},33166:function(xt,Re,_){"use strict";_.d(Re,{i:function(){return H}});const H=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"]},45157:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return I}});var H=_(33166);function I(V,P){return H.i.reduce((F,R)=>{const B=V[`${R}1`],y=V[`${R}3`],i=V[`${R}6`],v=V[`${R}7`];return Object.assign(Object.assign({},F),P(R,{lightColor:B,lightBorderColor:y,darkColor:i,textColor:v}))},{})}},6848:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return ge}});var H=_(59301),I=_(92310),V=_.n(I),P=_(55477),F=_(18929),R=_(62892),B=_(79676),y=_(92343),i=_(36355),v=_(33234),f=_(88088),h=_(17313),n=_(29878),o=_(19447),u=_(45157),S=_(37613),O=_(83116);const T=_e=>{const{componentCls:se,tooltipMaxWidth:Y,tooltipColor:ie,tooltipBg:U,tooltipBorderRadius:Z,zIndexPopup:K,controlHeight:k,boxShadowSecondary:D,paddingSM:re,paddingXS:pe,tooltipRadiusOuter:Oe}=_e;return[{[se]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,h.Wf)(_e)),{position:"absolute",zIndex:K,display:"block",width:"max-content",maxWidth:Y,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":U,[`${se}-inner`]:{minWidth:k,minHeight:k,padding:`${re/2}px ${pe}px`,color:ie,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:U,borderRadius:Z,boxShadow:D,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${se}-inner`]:{borderRadius:Math.min(Z,o.qN)}},[`${se}-content`]:{position:"relative"}}),(0,u.Z)(_e,($e,Ge)=>{let{darkColor:ke}=Ge;return{[`&${se}-${$e}`]:{[`${se}-inner`]:{backgroundColor:ke},[`${se}-arrow`]:{"--antd-arrow-background-color":ke}}}})),{"&-rtl":{direction:"rtl"}})},(0,o.ZP)((0,S.TS)(_e,{borderRadiusOuter:Oe}),{colorBg:"var(--antd-arrow-background-color)",contentRadius:Z,limitVerticalRadius:!0}),{[`${se}-pure`]:{position:"relative",maxWidth:"none",margin:_e.sizePopupArrow}}]};var E=(_e,se)=>(0,O.Z)("Tooltip",ie=>{if(se===!1)return[];const{borderRadius:U,colorTextLightSolid:Z,colorBgDefault:K,borderRadiusOuter:k}=ie,D=(0,S.TS)(ie,{tooltipMaxWidth:250,tooltipColor:Z,tooltipBorderRadius:U,tooltipBg:K,tooltipRadiusOuter:k>4?4:k});return[T(D),(0,n._y)(ie,"zoom-big-fast")]},ie=>{let{zIndexPopupBase:U,colorBgSpotlight:Z}=ie;return{zIndexPopup:U+70,colorBgDefault:Z}},{resetStyle:!1})(_e),C=_(36785);function j(_e,se){const Y=(0,C.o2)(se),ie=V()({[`${_e}-${se}`]:se&&Y}),U={},Z={};return se&&!Y&&(U.background=se,Z["--antd-arrow-background-color"]=se),{className:ie,overlayStyle:U,arrowStyle:Z}}var L=_e=>{const{prefixCls:se,className:Y,placement:ie="top",title:U,color:Z,overlayInnerStyle:K}=_e,{getPrefixCls:k}=H.useContext(i.E_),D=k("tooltip",se),[re,pe]=E(D,!0),Oe=j(D,Z),$e=Oe.arrowStyle,Ge=Object.assign(Object.assign({},K),Oe.overlayStyle),ke=V()(pe,D,`${D}-pure`,`${D}-placement-${ie}`,Y,Oe.className);return re(H.createElement("div",{className:ke,style:$e},H.createElement("div",{className:`${D}-arrow`}),H.createElement(P.G,Object.assign({},_e,{className:pe,prefixCls:D,overlayInnerStyle:Ge}),U)))},N=function(_e,se){var Y={};for(var ie in _e)Object.prototype.hasOwnProperty.call(_e,ie)&&se.indexOf(ie)<0&&(Y[ie]=_e[ie]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var U=0,ie=Object.getOwnPropertySymbols(_e);U<ie.length;U++)se.indexOf(ie[U])<0&&Object.prototype.propertyIsEnumerable.call(_e,ie[U])&&(Y[ie[U]]=_e[ie[U]]);return Y};const z=(_e,se)=>{const Y={},ie=Object.assign({},_e);return se.forEach(U=>{_e&&U in _e&&(Y[U]=_e[U],delete ie[U])}),{picked:Y,omitted:ie}};function te(_e,se){const Y=_e.type;if((Y.__ANT_BUTTON===!0||_e.type==="button")&&_e.props.disabled||Y.__ANT_SWITCH===!0&&(_e.props.disabled||_e.props.loading)||Y.__ANT_RADIO===!0&&_e.props.disabled){const{picked:ie,omitted:U}=z(_e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),Z=Object.assign(Object.assign({display:"inline-block"},ie),{cursor:"not-allowed",width:_e.props.block?"100%":void 0}),K=Object.assign(Object.assign({},U),{pointerEvents:"none"}),k=(0,y.Tm)(_e,{style:K,className:null});return H.createElement("span",{style:Z,className:V()(_e.props.className,`${se}-disabled-compatible-wrapper`)},k)}return _e}const J=H.forwardRef((_e,se)=>{var Y,ie;const{prefixCls:U,openClassName:Z,getTooltipContainer:K,overlayClassName:k,color:D,overlayInnerStyle:re,children:pe,afterOpenChange:Oe,afterVisibleChange:$e,destroyTooltipOnHide:Ge,arrow:ke=!0,title:et,overlay:Ke,builtinPlacements:tt,arrowPointAtCenter:It=!1,autoAdjustOverflow:Yt=!0}=_e,qt=!!ke,[,Ot]=(0,f.Z)(),{getPopupContainer:Ut,getPrefixCls:Ft,direction:Ie}=H.useContext(i.E_),Ze=H.useRef(null),Fe=()=>{var Pe;(Pe=Ze.current)===null||Pe===void 0||Pe.forceAlign()};H.useImperativeHandle(se,()=>({forceAlign:Fe,forcePopupAlign:()=>{Fe()}}));const[it,nt]=(0,F.Z)(!1,{value:(Y=_e.open)!==null&&Y!==void 0?Y:_e.visible,defaultValue:(ie=_e.defaultOpen)!==null&&ie!==void 0?ie:_e.defaultVisible}),ue=!et&&!Ke&&et!==0,ye=Pe=>{var Ne,ce;nt(ue?!1:Pe),ue||((Ne=_e.onOpenChange)===null||Ne===void 0||Ne.call(_e,Pe),(ce=_e.onVisibleChange)===null||ce===void 0||ce.call(_e,Pe))},Te=H.useMemo(()=>{var Pe,Ne;let ce=It;return typeof ke=="object"&&(ce=(Ne=(Pe=ke.pointAtCenter)!==null&&Pe!==void 0?Pe:ke.arrowPointAtCenter)!==null&&Ne!==void 0?Ne:It),tt||(0,B.Z)({arrowPointAtCenter:ce,autoAdjustOverflow:Yt,arrowWidth:qt?Ot.sizePopupArrow:0,borderRadius:Ot.borderRadius,offset:Ot.marginXXS,visibleFirst:!0})},[It,ke,tt,Ot]),Ae=H.useMemo(()=>et===0?et:Ke||et||"",[Ke,et]),Me=H.createElement(v.BR,null,typeof Ae=="function"?Ae():Ae),{getPopupContainer:ze,placement:qe="top",mouseEnterDelay:rt=.1,mouseLeaveDelay:Xe=.1,overlayStyle:He,rootClassName:lt}=_e,gt=N(_e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),ft=Ft("tooltip",U),_t=Ft(),wt=_e["data-popover-inject"];let mt=it;!("open"in _e)&&!("visible"in _e)&&ue&&(mt=!1);const kt=te((0,y.l$)(pe)&&!(0,y.M2)(pe)?pe:H.createElement("span",null,pe),ft),bt=kt.props,$=!bt.className||typeof bt.className=="string"?V()(bt.className,Z||`${ft}-open`):bt.className,[G,Qe]=E(ft,!wt),ae=j(ft,D),be=ae.arrowStyle,Kt=Object.assign(Object.assign({},re),ae.overlayStyle),Ee=V()(k,{[`${ft}-rtl`]:Ie==="rtl"},ae.className,lt,Qe);return G(H.createElement(P.Z,Object.assign({},gt,{showArrow:qt,placement:qe,mouseEnterDelay:rt,mouseLeaveDelay:Xe,prefixCls:ft,overlayClassName:Ee,overlayStyle:Object.assign(Object.assign({},be),He),getTooltipContainer:ze||K||Ut,ref:Ze,builtinPlacements:Te,overlay:Me,visible:mt,onVisibleChange:ye,afterVisibleChange:Oe!=null?Oe:$e,overlayInnerStyle:Kt,arrowContent:H.createElement("span",{className:`${ft}-arrow-content`}),motion:{motionName:(0,R.m)(_t,"zoom-big-fast",_e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!Ge}),mt?(0,y.Tm)(kt,{className:$}):kt))});J._InternalPanelDoNotUseOrYouWillBeFired=L;var ge=J},64018:function(){var xt,Re,_,H=!1,I,V;window.PR_SHOULD_USE_CONTINUATION=!0;var P,F;(function(){var R=window,B=["break,continue,do,else,for,if,return,while"],y=[B,"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"],i=[y,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],v=[i,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],f=[i,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],h=[i,"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"],n="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",o=[i,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],u="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",S=[B,"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"],O=[B,"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"],T=[B,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[v,h,f,o,u,S,O,T],C=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,j="str",x="kwd",L="com",N="typ",z="lit",te="pun",J="pln",ge="tag",_e="dec",se="src",Y="atn",ie="atv",U="nocode",Z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function K(Ie){for(var Ze=0,Fe=!1,it=!1,nt=0,ue=Ie.length;nt<ue;++nt){var ye=Ie[nt];if(ye.ignoreCase)it=!0;else if(/[a-z]/i.test(ye.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Fe=!0,it=!1;break}}var Te={b:8,t:9,n:10,v:11,f:12,r:13};function Ae(Xe){var He=Xe.charCodeAt(0);if(He!==92)return He;var lt=Xe.charAt(1);return He=Te[lt],He||("0"<=lt&&lt<="7"?parseInt(Xe.substring(1),8):lt==="u"||lt==="x"?parseInt(Xe.substring(2),16):Xe.charCodeAt(1))}function Me(Xe){if(Xe<32)return(Xe<16?"\\x0":"\\x")+Xe.toString(16);var He=String.fromCharCode(Xe);return He==="\\"||He==="-"||He==="]"||He==="^"?"\\"+He:He}function ze(Xe){var He=Xe.substring(1,Xe.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=[],gt=He[0]==="^",ft=["["];gt&&ft.push("^");for(var _t=gt?1:0,wt=He.length;_t<wt;++_t){var mt=He[_t];if(/\\[bdsw]/i.test(mt))ft.push(mt);else{var kt=Ae(mt),bt;_t+2<wt&&He[_t+1]==="-"?(bt=Ae(He[_t+2]),_t+=2):bt=kt,lt.push([kt,bt]),bt<65||kt>122||(bt<65||kt>90||lt.push([Math.max(65,kt)|32,Math.min(bt,90)|32]),bt<97||kt>122||lt.push([Math.max(97,kt)&-33,Math.min(bt,122)&-33]))}}lt.sort(function(ae,be){return ae[0]-be[0]||be[1]-ae[1]});for(var $=[],G=[],_t=0;_t<lt.length;++_t){var Qe=lt[_t];Qe[0]<=G[1]+1?G[1]=Math.max(G[1],Qe[1]):$.push(G=Qe)}for(var _t=0;_t<$.length;++_t){var Qe=$[_t];ft.push(Me(Qe[0])),Qe[1]>Qe[0]&&(Qe[1]+1>Qe[0]&&ft.push("-"),ft.push(Me(Qe[1])))}return ft.push("]"),ft.join("")}function qe(Xe){for(var He=Xe.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=He.length,gt=[],ft=0,_t=0;ft<lt;++ft){var wt=He[ft];if(wt==="(")++_t;else if(wt.charAt(0)==="\\"){var mt=+wt.substring(1);mt&&(mt<=_t?gt[mt]=-1:He[ft]=Me(mt))}}for(var ft=1;ft<gt.length;++ft)gt[ft]===-1&&(gt[ft]=++Ze);for(var ft=0,_t=0;ft<lt;++ft){var wt=He[ft];if(wt==="(")++_t,gt[_t]||(He[ft]="(?:");else if(wt.charAt(0)==="\\"){var mt=+wt.substring(1);mt&&mt<=_t&&(He[ft]="\\"+gt[mt])}}for(var ft=0;ft<lt;++ft)He[ft]==="^"&&He[ft+1]!=="^"&&(He[ft]="");if(Xe.ignoreCase&&Fe)for(var ft=0;ft<lt;++ft){var wt=He[ft],kt=wt.charAt(0);wt.length>=2&&kt==="["?He[ft]=ze(wt):kt!=="\\"&&(He[ft]=wt.replace(/[a-zA-Z]/g,function(G){var Qe=G.charCodeAt(0);return"["+String.fromCharCode(Qe&-33,Qe|32)+"]"}))}return He.join("")}for(var rt=[],nt=0,ue=Ie.length;nt<ue;++nt){var ye=Ie[nt];if(ye.global||ye.multiline)throw new Error(""+ye);rt.push("(?:"+qe(ye)+")")}return new RegExp(rt.join("|"),it?"gi":"g")}function k(Ie,Ze){var Fe=/(?:^|\s)nocode(?:\s|$)/,it=[],nt=0,ue=[],ye=0;function Te(Ae){var Me=Ae.nodeType;if(Me==1){if(Fe.test(Ae.className))return;for(var ze=Ae.firstChild;ze;ze=ze.nextSibling)Te(ze);var qe=Ae.nodeName.toLowerCase();(qe==="br"||qe==="li")&&(it[ye]=`
`,ue[ye<<1]=nt++,ue[ye++<<1|1]=Ae)}else if(Me==3||Me==4){var rt=Ae.nodeValue;rt.length&&(Ze?rt=rt.replace(/\r\n?/g,`
`):rt=rt.replace(/[ \t\r\n]+/g," "),it[ye]=rt,ue[ye<<1]=nt,nt+=rt.length,ue[ye++<<1|1]=Ae)}}return Te(Ie),{sourceCode:it.join("").replace(/\n$/,""),spans:ue}}function D(Ie,Ze,Fe,it,nt){if(Fe){var ue={sourceNode:Ie,pre:1,langExtension:null,numberLines:null,sourceCode:Fe,spans:null,basePos:Ze,decorations:null};it(ue),nt.push.apply(nt,ue.decorations)}}var re=/\S/;function pe(Ie){for(var Ze=void 0,Fe=Ie.firstChild;Fe;Fe=Fe.nextSibling){var it=Fe.nodeType;Ze=it===1?Ze?Ie:Fe:it===3&&re.test(Fe.nodeValue)?Ie:Ze}return Ze===Ie?void 0:Ze}function Oe(Ie,Ze){var Fe={},it;(function(){for(var ye=Ie.concat(Ze),Te=[],Ae={},Me=0,ze=ye.length;Me<ze;++Me){var qe=ye[Me],rt=qe[3];if(rt)for(var Xe=rt.length;--Xe>=0;)Fe[rt.charAt(Xe)]=qe;var He=qe[1],lt=""+He;Ae.hasOwnProperty(lt)||(Te.push(He),Ae[lt]=null)}Te.push(/[\0-\uffff]/),it=K(Te)})();var nt=Ze.length,ue=function(ye){for(var Te=ye.sourceCode,Ae=ye.basePos,Me=ye.sourceNode,ze=[Ae,J],qe=0,rt=Te.match(it)||[],Xe={},He=0,lt=rt.length;He<lt;++He){var gt=rt[He],ft=Xe[gt],_t=void 0,wt;if(typeof ft=="string")wt=!1;else{var mt=Fe[gt.charAt(0)];if(mt)_t=gt.match(mt[1]),ft=mt[0];else{for(var kt=0;kt<nt;++kt)if(mt=Ze[kt],_t=gt.match(mt[1]),_t){ft=mt[0];break}_t||(ft=J)}wt=ft.length>=5&&ft.substring(0,5)==="lang-",wt&&!(_t&&typeof _t[1]=="string")&&(wt=!1,ft=se),wt||(Xe[gt]=ft)}var bt=qe;if(qe+=gt.length,!wt)ze.push(Ae+bt,ft);else{var $=_t[1],G=gt.indexOf($),Qe=G+$.length;_t[2]&&(Qe=gt.length-_t[2].length,G=Qe-$.length);var ae=ft.substring(5);D(Me,Ae+bt,gt.substring(0,G),ue,ze),D(Me,Ae+bt+G,$,It(ae,$),ze),D(Me,Ae+bt+Qe,gt.substring(Qe),ue,ze)}}ye.decorations=ze};return ue}function $e(Ie){var Ze=[],Fe=[];Ie.tripleQuotedStrings?Ze.push([j,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ie.multiLineStrings?Ze.push([j,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ze.push([j,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ie.verbatimStrings&&Fe.push([j,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var it=Ie.hashComments;it&&(Ie.cStyleComments?(it>1?Ze.push([L,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ze.push([L,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Fe.push([j,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ze.push([L,/^#[^\r\n]*/,null,"#"])),Ie.cStyleComments&&(Fe.push([L,/^\/\/[^\r\n]*/,null]),Fe.push([L,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var nt=Ie.regexLiterals;if(nt){var ue=nt>1?"":`
\r`,ye=ue?".":"[\\S\\s]",Te="/(?=[^/*"+ue+"])(?:[^/\\x5B\\x5C"+ue+"]|\\x5C"+ye+"|\\x5B(?:[^\\x5C\\x5D"+ue+"]|\\x5C"+ye+")*(?:\\x5D|$))+/";Fe.push(["lang-regex",RegExp("^"+Z+"("+Te+")")])}var Ae=Ie.types;Ae&&Fe.push([N,Ae]);var Me=(""+Ie.keywords).replace(/^ | $/g,"");Me.length&&Fe.push([x,new RegExp("^(?:"+Me.replace(/[\s,]+/g,"|")+")\\b"),null]),Ze.push([J,/^\s+/,null,` \r
\xA0`]);var ze="^.[^\\s\\w.$@'\"`/\\\\]*";return Ie.regexLiterals&&(ze+="(?!s*/)"),Fe.push([z,/^@[a-z_$][a-z_$@0-9]*/i,null],[N,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[J,/^[a-z_$][a-z_$@0-9]*/i,null],[z,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[J,/^\\[\s\S]?/,null],[te,new RegExp(ze),null]),Oe(Ze,Fe)}var Ge=$e({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ke(Ie,Ze,Fe){for(var it=/(?:^|\s)nocode(?:\s|$)/,nt=/\r\n?|\n/,ue=Ie.ownerDocument,ye=ue.createElement("li");Ie.firstChild;)ye.appendChild(Ie.firstChild);var Te=[ye];function Ae(He){var lt=He.nodeType;if(lt==1&&!it.test(He.className))if(He.nodeName==="br")Me(He),He.parentNode&&He.parentNode.removeChild(He);else for(var gt=He.firstChild;gt;gt=gt.nextSibling)Ae(gt);else if((lt==3||lt==4)&&Fe){var ft=He.nodeValue,_t=ft.match(nt);if(_t){var wt=ft.substring(0,_t.index);He.nodeValue=wt;var mt=ft.substring(_t.index+_t[0].length);if(mt){var kt=He.parentNode;kt.insertBefore(ue.createTextNode(mt),He.nextSibling)}Me(He),wt||He.parentNode.removeChild(He)}}}function Me(He){for(;!He.nextSibling;)if(He=He.parentNode,!He)return;function lt(_t,wt){var mt=wt?_t.cloneNode(!1):_t,kt=_t.parentNode;if(kt){var bt=lt(kt,1),$=_t.nextSibling;bt.appendChild(mt);for(var G=$;G;G=$)$=G.nextSibling,bt.appendChild(G)}return mt}for(var gt=lt(He.nextSibling,0),ft;(ft=gt.parentNode)&&ft.nodeType===1;)gt=ft;Te.push(gt)}for(var ze=0;ze<Te.length;++ze)Ae(Te[ze]);Ze===(Ze|0)&&Te[0].setAttribute("value",Ze);var qe=ue.createElement("ol");qe.className="linenums";for(var rt=Math.max(0,Ze-1|0)||0,ze=0,Xe=Te.length;ze<Xe;++ze)ye=Te[ze],ye.className="L"+(ze+rt)%10,ye.firstChild||ye.appendChild(ue.createTextNode("\xA0")),qe.appendChild(ye);Ie.appendChild(qe)}function et(Ie){var Ze=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ze=Ze&&+Ze[1]<=8;var Fe=/\n/g,it=Ie.sourceCode,nt=it.length,ue=0,ye=Ie.spans,Te=ye.length,Ae=0,Me=Ie.decorations,ze=Me.length,qe=0;Me[ze]=nt;var rt,Xe;for(Xe=rt=0;Xe<ze;)Me[Xe]!==Me[Xe+2]?(Me[rt++]=Me[Xe++],Me[rt++]=Me[Xe++]):Xe+=2;for(ze=rt,Xe=rt=0;Xe<ze;){for(var He=Me[Xe],lt=Me[Xe+1],gt=Xe+2;gt+2<=ze&&Me[gt+1]===lt;)gt+=2;Me[rt++]=He,Me[rt++]=lt,Xe=gt}ze=Me.length=rt;var ft=Ie.sourceNode,_t="";ft&&(_t=ft.style.display,ft.style.display="none");try{for(var wt=null;Ae<Te;){var mt=ye[Ae],kt=ye[Ae+2]||nt,bt=Me[qe+2]||nt,gt=Math.min(kt,bt),$=ye[Ae+1],G;if($.nodeType!==1&&(G=it.substring(ue,gt))){Ze&&(G=G.replace(Fe,"\r")),$.nodeValue=G;var Qe=$.ownerDocument,ae=Qe.createElement("span");ae.className=Me[qe+1];var be=$.parentNode;be.replaceChild(ae,$),ae.appendChild($),ue<kt&&(ye[Ae+1]=$=Qe.createTextNode(it.substring(gt,kt)),be.insertBefore($,ae.nextSibling))}ue=gt,ue>=kt&&(Ae+=2),ue>=bt&&(qe+=2)}}finally{ft&&(ft.style.display=_t)}}var Ke={};function tt(Ie,Ze){for(var Fe=Ze.length;--Fe>=0;){var it=Ze[Fe];Ke.hasOwnProperty(it)?R.console&&console.warn("cannot override language handler %s",it):Ke[it]=Ie}}function It(Ie,Ze){return Ie&&Ke.hasOwnProperty(Ie)||(Ie=/^\s*</.test(Ze)?"default-markup":"default-code"),Ke[Ie]}tt(Ge,["default-code"]),tt(Oe([],[[J,/^[^<?]+/],[_e,/^<!\w[^>]*(?:>|$)/],[L,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[te,/^(?:<[%?]|[%?]>)/],["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"]),tt(Oe([[J,/^[\s]+/,null,` \r
`],[ie,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ge,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[Y,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[te,/^[=<>\/]+/],["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"]),tt(Oe([],[[ie,/^[\s\S]+/]]),["uq.val"]),tt($e({keywords:v,hashComments:!0,cStyleComments:!0,types:C}),["c","cc","cpp","cxx","cyc","m"]),tt($e({keywords:"null,true,false"}),["json"]),tt($e({keywords:h,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:C}),["cs"]),tt($e({keywords:f,cStyleComments:!0}),["java"]),tt($e({keywords:T,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),tt($e({keywords:S,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),tt($e({keywords:u,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),tt($e({keywords:O,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),tt($e({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),tt($e({keywords:n,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),tt(Oe([],[[j,/^[\s\S]+/]]),["regex"]);function Yt(Ie){var Ze=Ie.langExtension;try{var Fe=k(Ie.sourceNode,Ie.pre),it=Fe.sourceCode;Ie.sourceCode=it,Ie.spans=Fe.spans,Ie.basePos=0,It(Ze,it)(Ie),et(Ie)}catch(nt){R.console&&console.log(nt&&nt.stack||nt)}}function qt(Ie,Ze,Fe){var it=Fe||!1,nt=Ze||null,ue=document.createElement("div");ue.innerHTML="<pre>"+Ie+"</pre>",ue=ue.firstChild,it&&ke(ue,it,!0);var ye={langExtension:nt,numberLines:it,sourceNode:ue,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Yt(ye),ue.innerHTML}function Ot(Ie,Ze){var Fe=Ze||document.body,it=Fe.ownerDocument||document;function nt(mt){return Fe.getElementsByTagName(mt)}for(var ue=[nt("pre"),nt("code"),nt("xmp")],ye=[],Te=0;Te<ue.length;++Te)for(var Ae=0,Me=ue[Te].length;Ae<Me;++Ae)ye.push(ue[Te][Ae]);ue=null;var ze=Date;ze.now||(ze={now:function(){return+new Date}});var qe=0,rt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Xe=/\bprettyprint\b/,He=/\bprettyprinted\b/,lt=/pre|xmp/i,gt=/^code$/i,ft=/^(?:pre|code|xmp)$/i,_t={};function wt(){for(var mt=R.PR_SHOULD_USE_CONTINUATION?ze.now()+250:1/0;qe<ye.length&&ze.now()<mt;qe++){for(var kt=ye[qe],bt=_t,$=kt;$=$.previousSibling;){var G=$.nodeType,Qe=(G===7||G===8)&&$.nodeValue;if(Qe?!/^\??prettify\b/.test(Qe):G!==3||/\S/.test($.nodeValue))break;if(Qe){bt={},Qe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Se,Dt,Pt){bt[Dt]=Pt});break}}var ae=kt.className;if((bt!==_t||Xe.test(ae))&&!He.test(ae)){for(var be=!1,Kt=kt.parentNode;Kt;Kt=Kt.parentNode){var Ee=Kt.tagName;if(ft.test(Ee)&&Kt.className&&Xe.test(Kt.className)){be=!0;break}}if(!be){kt.className+=" prettyprinted";var Pe=bt.lang;if(!Pe){Pe=ae.match(rt);var Ne;!Pe&&(Ne=pe(kt))&&gt.test(Ne.tagName)&&(Pe=Ne.className.match(rt)),Pe&&(Pe=Pe[1])}var ce;if(lt.test(kt.tagName))ce=1;else{var de=kt.currentStyle,we=it.defaultView,Le=de?de.whiteSpace:we&&we.getComputedStyle?we.getComputedStyle(kt,null).getPropertyValue("white-space"):0;ce=Le&&Le.substring(0,3)==="pre"}var ne=bt.linenums;(ne=ne==="true"||+ne)||(ne=ae.match(/\blinenums\b(?::(\d+))?/),ne=ne?ne[1]&&ne[1].length?+ne[1]:!0:!1),ne&&ke(kt,ne,ce);var dt={langExtension:Pe,sourceNode:kt,numberLines:ne,pre:ce,sourceCode:null,basePos:null,spans:null,decorations:null};Yt(dt)}}}qe<ye.length?R.setTimeout(wt,250):typeof Ie=="function"&&Ie()}wt()}var Ut=R.PR={createSimpleLexer:Oe,registerLangHandler:tt,sourceDecorator:$e,PR_ATTRIB_NAME:Y,PR_ATTRIB_VALUE:ie,PR_COMMENT:L,PR_DECLARATION:_e,PR_KEYWORD:x,PR_LITERAL:z,PR_NOCODE:U,PR_PLAIN:J,PR_PUNCTUATION:te,PR_SOURCE:se,PR_STRING:j,PR_TAG:ge,PR_TYPE:N,prettyPrintOne:H?R.prettyPrintOne=qt:P=qt,prettyPrint:F=H?R.prettyPrint=Ot:F=Ot},Ft=R.define;typeof Ft=="function"&&Ft.amd&&Ft("google-code-prettify",[],function(){return Ut})})()},25769:function(xt,Re,_){"use strict";var H=_(98040),I={"text/plain":"Text","text/html":"Url",default:"Text"},V="Copy to clipboard: #{key}, Enter";function P(R){var B=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return R.replace(/#{\s*key\s*}/g,B)}function F(R,B){var y,i,v,f,h,n,o=!1;B||(B={}),y=B.debug||!1;try{v=H(),f=document.createRange(),h=document.getSelection(),n=document.createElement("span"),n.textContent=R,n.ariaHidden="true",n.style.all="unset",n.style.position="fixed",n.style.top=0,n.style.clip="rect(0, 0, 0, 0)",n.style.whiteSpace="pre",n.style.webkitUserSelect="text",n.style.MozUserSelect="text",n.style.msUserSelect="text",n.style.userSelect="text",n.addEventListener("copy",function(S){if(S.stopPropagation(),B.format)if(S.preventDefault(),typeof S.clipboardData=="undefined"){y&&console.warn("unable to use e.clipboardData"),y&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var O=I[B.format]||I.default;window.clipboardData.setData(O,R)}else S.clipboardData.clearData(),S.clipboardData.setData(B.format,R);B.onCopy&&(S.preventDefault(),B.onCopy(S.clipboardData))}),document.body.appendChild(n),f.selectNodeContents(n),h.addRange(f);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");o=!0}catch(S){y&&console.error("unable to copy using execCommand: ",S),y&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(B.format||"text",R),B.onCopy&&B.onCopy(window.clipboardData),o=!0}catch(O){y&&console.error("unable to copy using clipboardData: ",O),y&&console.error("falling back to prompt"),i=P("message"in B?B.message:V),window.prompt(i,R)}}finally{h&&(typeof h.removeRange=="function"?h.removeRange(f):h.removeAllRanges()),n&&document.body.removeChild(n),v()}return o}xt.exports=F},24334:function(xt,Re,_){var H,I;(function(V,P){xt.exports=P(V)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof _.g!="undefined"?_.g:this,function(V){"use strict";V=V||{};var P=V.Base64,F="2.6.4",R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",B=function(Y){for(var ie={},U=0,Z=Y.length;U<Z;U++)ie[Y.charAt(U)]=U;return ie}(R),y=String.fromCharCode,i=function(Y){if(Y.length<2){var ie=Y.charCodeAt(0);return ie<128?Y:ie<2048?y(192|ie>>>6)+y(128|ie&63):y(224|ie>>>12&15)+y(128|ie>>>6&63)+y(128|ie&63)}else{var ie=65536+(Y.charCodeAt(0)-55296)*1024+(Y.charCodeAt(1)-56320);return y(240|ie>>>18&7)+y(128|ie>>>12&63)+y(128|ie>>>6&63)+y(128|ie&63)}},v=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,f=function(Y){return Y.replace(v,i)},h=function(Y){var ie=[0,2,1][Y.length%3],U=Y.charCodeAt(0)<<16|(Y.length>1?Y.charCodeAt(1):0)<<8|(Y.length>2?Y.charCodeAt(2):0),Z=[R.charAt(U>>>18),R.charAt(U>>>12&63),ie>=2?"=":R.charAt(U>>>6&63),ie>=1?"=":R.charAt(U&63)];return Z.join("")},n=V.btoa&&typeof V.btoa=="function"?function(Y){return V.btoa(Y)}:function(Y){if(Y.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Y.replace(/[\s\S]{1,3}/g,h)},o=function(Y){return n(f(String(Y)))},u=function(Y){return Y.replace(/[+\/]/g,function(ie){return ie=="+"?"-":"_"}).replace(/=/g,"")},S=function(Y,ie){return ie?u(o(Y)):o(Y)},O=function(Y){return S(Y,!0)},T;V.Uint8Array&&(T=function(Y,ie){for(var U="",Z=0,K=Y.length;Z<K;Z+=3){var k=Y[Z],D=Y[Z+1],re=Y[Z+2],pe=k<<16|D<<8|re;U+=R.charAt(pe>>>18)+R.charAt(pe>>>12&63)+(typeof D!="undefined"?R.charAt(pe>>>6&63):"=")+(typeof re!="undefined"?R.charAt(pe&63):"=")}return ie?u(U):U});var E=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,C=function(Y){switch(Y.length){case 4:var ie=(7&Y.charCodeAt(0))<<18|(63&Y.charCodeAt(1))<<12|(63&Y.charCodeAt(2))<<6|63&Y.charCodeAt(3),U=ie-65536;return y((U>>>10)+55296)+y((U&1023)+56320);case 3:return y((15&Y.charCodeAt(0))<<12|(63&Y.charCodeAt(1))<<6|63&Y.charCodeAt(2));default:return y((31&Y.charCodeAt(0))<<6|63&Y.charCodeAt(1))}},j=function(Y){return Y.replace(E,C)},x=function(Y){var ie=Y.length,U=ie%4,Z=(ie>0?B[Y.charAt(0)]<<18:0)|(ie>1?B[Y.charAt(1)]<<12:0)|(ie>2?B[Y.charAt(2)]<<6:0)|(ie>3?B[Y.charAt(3)]:0),K=[y(Z>>>16),y(Z>>>8&255),y(Z&255)];return K.length-=[0,0,2,1][U],K.join("")},L=V.atob&&typeof V.atob=="function"?function(Y){return V.atob(Y)}:function(Y){return Y.replace(/\S{1,4}/g,x)},N=function(Y){return L(String(Y).replace(/[^A-Za-z0-9\+\/]/g,""))},z=function(Y){return j(L(Y))},te=function(Y){return String(Y).replace(/[-_]/g,function(ie){return ie=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},J=function(Y){return z(te(Y))},ge;V.Uint8Array&&(ge=function(Y){return Uint8Array.from(N(te(Y)),function(ie){return ie.charCodeAt(0)})});var _e=function(){var Y=V.Base64;return V.Base64=P,Y};if(V.Base64={VERSION:F,atob:N,btoa:n,fromBase64:J,toBase64:S,utob:f,encode:S,encodeURI:O,btou:j,decode:J,noConflict:_e,fromUint8Array:T,toUint8Array:ge},typeof Object.defineProperty=="function"){var se=function(Y){return{value:Y,enumerable:!1,writable:!0,configurable:!0}};V.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",se(function(){return J(this)})),Object.defineProperty(String.prototype,"toBase64",se(function(Y){return S(this,Y)})),Object.defineProperty(String.prototype,"toBase64URI",se(function(){return S(this,!0)}))}}return V.Meteor&&(Base64=V.Base64),xt.exports?xt.exports.Base64=V.Base64:(H=[],I=function(){return V.Base64}.apply(Re,H),I!==void 0&&(xt.exports=I)),{Base64:V.Base64}})},53184:function(xt,Re,_){"use strict";var H,I;function V(P,F,R){var B=function(y,i){return P.js_beautify(y,i)};return B.js=P.js_beautify,B.css=F.css_beautify,B.html=R.html_beautify,B.js_beautify=P.js_beautify,B.css_beautify=F.css_beautify,B.html_beautify=R.html_beautify,B}H=[_(58553),_(87804),_(40998)],I=function(P,F,R){return V(P,F,R)}.apply(Re,H),I!==void 0&&(xt.exports=I)},87804:function(xt,Re){var _,H;(function(){var I;(function(){"use strict";var P=[,,function(y){function i(h){this.__parent=h,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=[]}i.prototype.clone_empty=function(){var h=new i(this.__parent);return h.set_indent(this.__indent_count,this.__alignment_count),h},i.prototype.item=function(h){return h<0?this.__items[this.__items.length+h]:this.__items[h]},i.prototype.has_match=function(h){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(h))return!0;return!1},i.prototype.set_indent=function(h,n){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},i.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)},i.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},i.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},i.prototype.is_empty=function(){return this.__items.length===0},i.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},i.prototype.push=function(h){this.__items.push(h);var n=h.lastIndexOf(`
`);n!==-1?this.__character_count=h.length-n:this.__character_count+=h.length},i.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},i.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},i.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},i.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},i.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function v(h,n){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),n=n||"",h.indent_level>0&&(n=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}v.prototype.get_indent_size=function(h,n){var o=this.__base_string_length;return n=n||0,h<0&&(o=0),o+=h*this.__indent_size,o+=n,o},v.prototype.get_indent_string=function(h,n){var o=this.__base_string;return n=n||0,h<0&&(h=0,o=""),n+=h*this.__indent_size,this.__ensure_cache(n),o+=this.__cache[n],o},v.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var h=this.__cache.length,n=0,o="";this.__indent_size&&h>=this.__indent_size&&(n=Math.floor(h/this.__indent_size),h-=n*this.__indent_size,o=new Array(n+1).join(this.__indent_string)),h&&(o+=new Array(h+1).join(" ")),this.__cache.push(o)};function f(h,n){this.__indent_cache=new v(h,n),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new i(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(h,n){return this.__indent_cache.get_indent_string(h,n)},f.prototype.get_indent_size=function(h,n){return this.__indent_cache.get_indent_size(h,n)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(h){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return h!==`
`&&(o=o.replace(/[\n]/g,h)),o},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(h,n){return h=h||0,n=n||0,this.next_line.set_indent(h,n),this.__lines.length>1?(this.current_line.set_indent(h,n),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(h){for(var n=0;n<h.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(h.whitespace_before),this.current_line.push(h.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},f.prototype.add_token=function(h){this.__add_space_before_token(),this.current_line.push(h),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},f.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},f.prototype.remove_indent=function(h){for(var n=this.__lines.length;h<n;)this.__lines[h]._remove_indent(),h++;this.current_line._remove_wrap_indent()},f.prototype.trim=function(h){for(h=h===void 0?!1:h,this.current_line.trim();h&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(h,n){for(var o=this.__lines.length-2;o>=0;){var u=this.__lines[o];if(u.is_empty())break;if(u.item(0).indexOf(h)!==0&&u.item(-1)!==n){this.__lines.splice(o+1,0,new i(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},y.exports.Output=f},,,,function(y){function i(h,n){this.raw_options=v(h,n),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"])}i.prototype._get_array=function(h,n){var o=this.raw_options[h],u=n||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(u=o.concat()):typeof o=="string"&&(u=o.split(/[^a-zA-Z0-9_\/\-]+/)),u},i.prototype._get_boolean=function(h,n){var o=this.raw_options[h],u=o===void 0?!!n:!!o;return u},i.prototype._get_characters=function(h,n){var o=this.raw_options[h],u=n||"";return typeof o=="string"&&(u=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),u},i.prototype._get_number=function(h,n){var o=this.raw_options[h];n=parseInt(n,10),isNaN(n)&&(n=0);var u=parseInt(o,10);return isNaN(u)&&(u=n),u},i.prototype._get_selection=function(h,n,o){var u=this._get_selection_list(h,n,o);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values:
`+n+`
You passed in: '`+this.raw_options[h]+"'");return u[0]},i.prototype._get_selection_list=function(h,n,o){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[n[0]],!this._is_valid_selection(o,n))throw new Error("Invalid Default Value!");var u=this._get_array(h,o);if(!this._is_valid_selection(u,n))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values:
`+n+`
You passed in: '`+this.raw_options[h]+"'");return u},i.prototype._is_valid_selection=function(h,n){return h.length&&n.length&&!h.some(function(o){return n.indexOf(o)===-1})};function v(h,n){var o={};h=f(h);var u;for(u in h)u!==n&&(o[u]=h[u]);if(n&&h[n])for(u in h[n])o[u]=h[n][u];return o}function f(h){var n={},o;for(o in h){var u=o.replace(/-/g,"_");n[u]=h[o]}return n}y.exports.Options=i,y.exports.normalizeOpts=f,y.exports.mergeOpts=v},,function(y){var i=RegExp.prototype.hasOwnProperty("sticky");function v(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position<this.__input_length},v.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__input.charAt(this.__position),this.__position+=1),f},v.prototype.peek=function(f){var h=null;return f=f||0,f+=this.__position,f>=0&&f<this.__input_length&&(h=this.__input.charAt(f)),h},v.prototype.__match=function(f,h){f.lastIndex=h;var n=f.exec(this.__input);return n&&!(i&&f.sticky)&&n.index!==h&&(n=null),n},v.prototype.test=function(f,h){return h=h||0,h+=this.__position,h>=0&&h<this.__input_length?!!this.__match(f,h):!1},v.prototype.testChar=function(f,h){var n=this.peek(h);return f.lastIndex=0,n!==null&&f.test(n)},v.prototype.match=function(f){var h=this.__match(f,this.__position);return h?this.__position+=h[0].length:h=null,h},v.prototype.read=function(f,h,n){var o="",u;return f&&(u=this.match(f),u&&(o+=u[0])),h&&(u||!f)&&(o+=this.readUntil(h,n)),o},v.prototype.readUntil=function(f,h){var n="",o=this.__position;f.lastIndex=this.__position;var u=f.exec(this.__input);return u?(o=u.index,h&&(o+=u[0].length)):o=this.__input_length,n=this.__input.substring(this.__position,o),this.__position=o,n},v.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)},v.prototype.get_regexp=function(f,h){var n=null,o="g";return h&&i&&(o="y"),typeof f=="string"&&f!==""?n=new RegExp(f,o):f&&(n=new RegExp(f.source,o)),n},v.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},v.prototype.peekUntilAfter=function(f){var h=this.__position,n=this.readUntilAfter(f);return this.__position=h,n},v.prototype.lookBack=function(f){var h=this.__position-1;return h>=f.length&&this.__input.substring(h-f.length,h).toLowerCase()===f},y.exports.InputScanner=v},,,,,function(y){function i(v,f){v=typeof v=="string"?v:v.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(v+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(v+/\sbeautify\signore:end\s/.source+f,"g")}i.prototype.get_directives=function(v){if(!v.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(v);h;)f[h[1]]=h[2],h=this.__directive_pattern.exec(v);return f},i.prototype.readIgnored=function(v){return v.readUntilAfter(this.__directives_end_ignore_pattern)},y.exports.Directives=i},,function(y,i,v){var f=v(16).Beautifier,h=v(17).Options;function n(o,u){var S=new f(o,u);return S.beautify()}y.exports=n,y.exports.defaultOptions=function(){return new h}},function(y,i,v){var f=v(17).Options,h=v(2).Output,n=v(8).InputScanner,o=v(13).Directives,u=new o(/\/\*/,/\*\//),S=/\r\n|[\r\n]/,O=/\r\n|[\r\n]/g,T=/\s/,E=/(?:\s|\n)+/g,C=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,j=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function x(L,N){this._source_text=L||"",this._options=new f(N),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"]}x.prototype.eatString=function(L){var N="";for(this._ch=this._input.next();this._ch;){if(N+=this._ch,this._ch==="\\")N+=this._input.next();else if(L.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return N},x.prototype.eatWhitespace=function(L){for(var N=T.test(this._input.peek()),z=0;T.test(this._input.peek());)this._ch=this._input.next(),L&&this._ch===`
`&&(z===0||z<this._options.max_preserve_newlines)&&(z++,this._output.add_new_line(!0));return N},x.prototype.foundNestedPseudoClass=function(){for(var L=0,N=1,z=this._input.peek(N);z;){if(z==="{")return!0;if(z==="(")L+=1;else if(z===")"){if(L===0)return!1;L-=1}else if(z===";"||z==="}")return!1;N++,z=this._input.peek(N)}return!1},x.prototype.print_string=function(L){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(L)},x.prototype.preserveSingleSpace=function(L){L&&(this._output.space_before_token=!0)},x.prototype.indent=function(){this._indentLevel++},x.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},x.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L=this._source_text,N=this._options.eol;N==="auto"&&(N=`
`,L&&S.test(L||"")&&(N=L.match(S)[0])),L=L.replace(O,`
`);var z=L.match(/^[\t ]*/)[0];this._output=new h(this._options,z),this._input=new n(L),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var te=0,J=!1,ge=!1,_e=!1,se=!1,Y=!1,ie=this._ch,U=!1,Z,K,k;Z=this._input.read(E),K=Z!=="",k=ie,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),ie=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var D=this._input.read(C),re=u.get_directives(D);re&&re.ignore==="start"&&(D+=u.readIgnored(this._input)),this.print_string(D),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(j)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(K),this.print_string(this._ch);var pe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);pe.match(/[ :]$/)&&(pe=this.eatString(": ").replace(/\s+$/,""),this.print_string(pe),this._output.space_before_token=!0),te===0&&pe.indexOf(":")!==-1&&(ge=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(K),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Oe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Oe.match(/[ :]$/)&&(Oe=this.eatString(": ").replace(/\s+$/,""),this.print_string(Oe),this._output.space_before_token=!0),te===0&&Oe.indexOf(":")!==-1?(ge=!0,this.indent()):Oe in this.NESTED_AT_RULE?(this._nestedLevel+=1,Oe in this.CONDITIONAL_GROUP_RULE&&(_e=!0)):te===0&&!ge&&(se=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(K),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")ge&&(ge=!1,this.outdent()),se=!1,_e?(_e=!1,J=this._indentLevel>=this._nestedLevel):J=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&J&&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)):(k==="("?this._output.space_before_token=!1:k!==","&&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(),k==="{"&&this._output.trim(!0),ge&&(this.outdent(),ge=!1),this.print_string(this._ch),J=!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 $e=0;$e<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;$e++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[$e])){U=!0;break}(J||_e)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!se&&te===0?(this.print_string(":"),ge||(ge=!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 Ge=k==='"'||k==="'";this.preserveSingleSpace(Ge||K),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")U=!1,te===0?(ge&&(this.outdent(),ge=!1),se=!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(),te++,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(")")),te&&(te--,this.outdent()));else{var ke=!1;this._input.lookBack("with")&&(ke=!0),this.preserveSingleSpace(K||ke),this.print_string(this._ch),ge&&k==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),Y=!0):(this.eatWhitespace(),te++,this.indent())}else if(this._ch===")")te&&(te--,this.outdent()),Y&&this._input.peek()===";"&&this._options.selector_separator_newline&&(Y=!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&&(!ge||Y)&&te===0&&!se?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!ge&&te===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&&T.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(K),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),T.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 et=k==='"'||k==="'";this.preserveSingleSpace(et||K),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&U&&this._output.add_new_line()}var Ke=this._output.get_code(N);return Ke},y.exports.Beautifier=x},function(y,i,v){var f=v(6).Options;function h(n){f.call(this,n,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var S=0;S<u.length;S++)u[S]!=="expand"?this.brace_style="collapse":this.brace_style=u[S]}h.prototype=new f,y.exports.Options=h}],F={};function R(y){var i=F[y];if(i!==void 0)return i.exports;var v=F[y]={exports:{}};return P[y](v,v.exports,R),v.exports}var B=R(15);I=B})();var V=I;_=[],H=function(){return{css_beautify:V}}.apply(Re,_),H!==void 0&&(xt.exports=H)})()},40998:function(xt,Re,_){var H,I;(function(){var V;(function(){"use strict";var B=[,,function(f){function h(u){this.__parent=u,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=[]}h.prototype.clone_empty=function(){var u=new h(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},h.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},h.prototype.has_match=function(u){for(var S=this.__items.length-1;S>=0;S--)if(this.__items[S].match(u))return!0;return!1},h.prototype.set_indent=function(u,S){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=S||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.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)},h.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},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(u){this.__items.push(u);var S=u.lastIndexOf(`
`);S!==-1?this.__character_count=u.length-S:this.__character_count+=u.length},h.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var u="";return this.is_empty()?this.__parent.indent_empty_lines&&(u=this.__parent.get_indent_string(this.__indent_count)):(u=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),u+=this.__items.join("")),u};function n(u,S){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),S=S||"",u.indent_level>0&&(S=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=S,this.__base_string_length=S.length}n.prototype.get_indent_size=function(u,S){var O=this.__base_string_length;return S=S||0,u<0&&(O=0),O+=u*this.__indent_size,O+=S,O},n.prototype.get_indent_string=function(u,S){var O=this.__base_string;return S=S||0,u<0&&(u=0,O=""),S+=u*this.__indent_size,this.__ensure_cache(S),O+=this.__cache[S],O},n.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var u=this.__cache.length,S=0,O="";this.__indent_size&&u>=this.__indent_size&&(S=Math.floor(u/this.__indent_size),u-=S*this.__indent_size,O=new Array(S+1).join(this.__indent_string)),u&&(O+=new Array(u+1).join(" ")),this.__cache.push(O)};function o(u,S){this.__indent_cache=new n(u,S),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(u,S){return this.__indent_cache.get_indent_string(u,S)},o.prototype.get_indent_size=function(u,S){return this.__indent_cache.get_indent_size(u,S)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(u){this.trim(!0);var S=this.current_line.pop();S&&(S[S.length-1]===`
`&&(S=S.replace(/\n+$/g,"")),this.current_line.push(S)),this._end_with_newline&&this.__add_outputline();var O=this.__lines.join(`
`);return u!==`
`&&(O=O.replace(/[\n]/g,u)),O},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(u,S){return u=u||0,S=S||0,this.next_line.set_indent(u,S),this.__lines.length>1?(this.current_line.set_indent(u,S),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(u){for(var S=0;S<u.newlines;S++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(u.whitespace_before),this.current_line.push(u.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},o.prototype.add_token=function(u){this.__add_space_before_token(),this.current_line.push(u),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},o.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(" "))},o.prototype.remove_indent=function(u){for(var S=this.__lines.length;u<S;)this.__lines[u]._remove_indent(),u++;this.current_line._remove_wrap_indent()},o.prototype.trim=function(u){for(u=u===void 0?!1:u,this.current_line.trim();u&&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},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(u,S){for(var O=this.__lines.length-2;O>=0;){var T=this.__lines[O];if(T.is_empty())break;if(T.item(0).indexOf(u)!==0&&T.item(-1)!==S){this.__lines.splice(O+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}O--}},f.exports.Output=o},function(f){function h(n,o,u,S){this.type=n,this.text=o,this.comments_before=null,this.newlines=u||0,this.whitespace_before=S||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}f.exports.Token=h},,,function(f){function h(u,S){this.raw_options=n(u,S),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"])}h.prototype._get_array=function(u,S){var O=this.raw_options[u],T=S||[];return typeof O=="object"?O!==null&&typeof O.concat=="function"&&(T=O.concat()):typeof O=="string"&&(T=O.split(/[^a-zA-Z0-9_\/\-]+/)),T},h.prototype._get_boolean=function(u,S){var O=this.raw_options[u],T=O===void 0?!!S:!!O;return T},h.prototype._get_characters=function(u,S){var O=this.raw_options[u],T=S||"";return typeof O=="string"&&(T=O.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),T},h.prototype._get_number=function(u,S){var O=this.raw_options[u];S=parseInt(S,10),isNaN(S)&&(S=0);var T=parseInt(O,10);return isNaN(T)&&(T=S),T},h.prototype._get_selection=function(u,S,O){var T=this._get_selection_list(u,S,O);if(T.length!==1)throw new Error("Invalid Option Value: The option '"+u+`' can only be one of the following values:
`+S+`
You passed in: '`+this.raw_options[u]+"'");return T[0]},h.prototype._get_selection_list=function(u,S,O){if(!S||S.length===0)throw new Error("Selection list cannot be empty.");if(O=O||[S[0]],!this._is_valid_selection(O,S))throw new Error("Invalid Default Value!");var T=this._get_array(u,O);if(!this._is_valid_selection(T,S))throw new Error("Invalid Option Value: The option '"+u+`' can contain only the following values:
`+S+`
You passed in: '`+this.raw_options[u]+"'");return T},h.prototype._is_valid_selection=function(u,S){return u.length&&S.length&&!u.some(function(O){return S.indexOf(O)===-1})};function n(u,S){var O={};u=o(u);var T;for(T in u)T!==S&&(O[T]=u[T]);if(S&&u[S])for(T in u[S])O[T]=u[S][T];return O}function o(u){var S={},O;for(O in u){var T=O.replace(/-/g,"_");S[T]=u[O]}return S}f.exports.Options=h,f.exports.normalizeOpts=o,f.exports.mergeOpts=n},,function(f){var h=RegExp.prototype.hasOwnProperty("sticky");function n(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__input.charAt(this.__position),this.__position+=1),o},n.prototype.peek=function(o){var u=null;return o=o||0,o+=this.__position,o>=0&&o<this.__input_length&&(u=this.__input.charAt(o)),u},n.prototype.__match=function(o,u){o.lastIndex=u;var S=o.exec(this.__input);return S&&!(h&&o.sticky)&&S.index!==u&&(S=null),S},n.prototype.test=function(o,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(o,u):!1},n.prototype.testChar=function(o,u){var S=this.peek(u);return o.lastIndex=0,S!==null&&o.test(S)},n.prototype.match=function(o){var u=this.__match(o,this.__position);return u?this.__position+=u[0].length:u=null,u},n.prototype.read=function(o,u,S){var O="",T;return o&&(T=this.match(o),T&&(O+=T[0])),u&&(T||!o)&&(O+=this.readUntil(u,S)),O},n.prototype.readUntil=function(o,u){var S="",O=this.__position;o.lastIndex=this.__position;var T=o.exec(this.__input);return T?(O=T.index,u&&(O+=T[0].length)):O=this.__input_length,S=this.__input.substring(this.__position,O),this.__position=O,S},n.prototype.readUntilAfter=function(o){return this.readUntil(o,!0)},n.prototype.get_regexp=function(o,u){var S=null,O="g";return u&&h&&(O="y"),typeof o=="string"&&o!==""?S=new RegExp(o,O):o&&(S=new RegExp(o.source,O)),S},n.prototype.get_literal_regexp=function(o){return RegExp(o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(o){var u=this.__position,S=this.readUntilAfter(o);return this.__position=u,S},n.prototype.lookBack=function(o){var u=this.__position-1;return u>=o.length&&this.__input.substring(u-o.length,u).toLowerCase()===o},f.exports.InputScanner=n},function(f,h,n){var o=n(8).InputScanner,u=n(3).Token,S=n(10).TokenStream,O=n(11).WhitespacePattern,T={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},E=function(C,j){this._input=new o(C),this._options=j||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new O(this._input)};E.prototype.tokenize=function(){this._input.restart(),this.__tokens=new S,this._reset();for(var C,j=new u(T.START,""),x=null,L=[],N=new S;j.type!==T.EOF;){for(C=this._get_next_token(j,x);this._is_comment(C);)N.add(C),C=this._get_next_token(j,x);N.isEmpty()||(C.comments_before=N,N=new S),C.parent=x,this._is_opening(C)?(L.push(x),x=C):x&&this._is_closing(C,x)&&(C.opened=x,x.closed=C,x=L.pop(),C.parent=x),C.previous=j,j.next=C,this.__tokens.add(C),j=C}return this.__tokens},E.prototype._is_first_token=function(){return this.__tokens.isEmpty()},E.prototype._reset=function(){},E.prototype._get_next_token=function(C,j){this._readWhitespace();var x=this._input.read(/.+/g);return x?this._create_token(T.RAW,x):this._create_token(T.EOF,"")},E.prototype._is_comment=function(C){return!1},E.prototype._is_opening=function(C){return!1},E.prototype._is_closing=function(C,j){return!1},E.prototype._create_token=function(C,j){var x=new u(C,j,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return x},E.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},f.exports.Tokenizer=E,f.exports.TOKEN=T},function(f){function h(n){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=n}h.prototype.restart=function(){this.__position=0},h.prototype.isEmpty=function(){return this.__tokens_length===0},h.prototype.hasNext=function(){return this.__position<this.__tokens_length},h.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__tokens[this.__position],this.__position+=1),n},h.prototype.peek=function(n){var o=null;return n=n||0,n+=this.__position,n>=0&&n<this.__tokens_length&&(o=this.__tokens[n]),o},h.prototype.add=function(n){this.__parent_token&&(n.parent=this.__parent_token),this.__tokens.push(n),this.__tokens_length+=1},f.exports.TokenStream=h},function(f,h,n){var o=n(12).Pattern;function u(S,O){o.call(this,S,O),O?this._line_regexp=this._input.get_regexp(O._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}u.prototype=new o,u.prototype.__set_whitespace_patterns=function(S,O){S+="\\t ",O+="\\n\\r",this._match_pattern=this._input.get_regexp("["+S+O+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+O+"]")},u.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var S=this._input.read(this._match_pattern);if(S===" ")this.whitespace_before_token=" ";else if(S){var O=this.__split(this._newline_regexp,S);this.newline_count=O.length-1,this.whitespace_before_token=O[this.newline_count]}return S},u.prototype.matching=function(S,O){var T=this._create();return T.__set_whitespace_patterns(S,O),T._update(),T},u.prototype._create=function(){return new u(this._input,this)},u.prototype.__split=function(S,O){S.lastIndex=0;for(var T=0,E=[],C=S.exec(O);C;)E.push(O.substring(T,C.index)),T=C.index+C[0].length,C=S.exec(O);return T<O.length?E.push(O.substring(T,O.length)):E.push(""),E},f.exports.WhitespacePattern=u},function(f){function h(n,o){this._input=n,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,o&&(this._starting_pattern=this._input.get_regexp(o._starting_pattern,!0),this._match_pattern=this._input.get_regexp(o._match_pattern,!0),this._until_pattern=this._input.get_regexp(o._until_pattern),this._until_after=o._until_after)}h.prototype.read=function(){var n=this._input.read(this._starting_pattern);return(!this._starting_pattern||n)&&(n+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),n},h.prototype.read_match=function(){return this._input.match(this._match_pattern)},h.prototype.until_after=function(n){var o=this._create();return o._until_after=!0,o._until_pattern=this._input.get_regexp(n),o._update(),o},h.prototype.until=function(n){var o=this._create();return o._until_after=!1,o._until_pattern=this._input.get_regexp(n),o._update(),o},h.prototype.starting_with=function(n){var o=this._create();return o._starting_pattern=this._input.get_regexp(n,!0),o._update(),o},h.prototype.matching=function(n){var o=this._create();return o._match_pattern=this._input.get_regexp(n,!0),o._update(),o},h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){},f.exports.Pattern=h},function(f){function h(n,o){n=typeof n=="string"?n:n.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(n+/\sbeautify\signore:end\s/.source+o,"g")}h.prototype.get_directives=function(n){if(!n.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(n);u;)o[u[1]]=u[2],u=this.__directive_pattern.exec(n);return o},h.prototype.readIgnored=function(n){return n.readUntilAfter(this.__directives_end_ignore_pattern)},f.exports.Directives=h},function(f,h,n){var o=n(12).Pattern,u={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function S(O,T){o.call(this,O,T),this.__template_pattern=null,this._disabled=Object.assign({},u),this._excluded=Object.assign({},u),T&&(this.__template_pattern=this._input.get_regexp(T.__template_pattern),this._excluded=Object.assign(this._excluded,T._excluded),this._disabled=Object.assign(this._disabled,T._disabled));var E=new o(O);this.__patterns={handlebars_comment:E.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:E.starting_with(/{{{/).until_after(/}}}/),handlebars:E.starting_with(/{{/).until_after(/}}/),php:E.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:E.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:E.starting_with(/{%/).until_after(/%}/),django_value:E.starting_with(/{{/).until_after(/}}/),django_comment:E.starting_with(/{#/).until_after(/#}/),smarty:E.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:E.starting_with(/{\*/).until_after(/\*}/),smarty_literal:E.starting_with(/{literal}/).until_after(/{\/literal}/)}}S.prototype=new o,S.prototype._create=function(){return new S(this._input,this)},S.prototype._update=function(){this.__set_templated_pattern()},S.prototype.disable=function(O){var T=this._create();return T._disabled[O]=!0,T._update(),T},S.prototype.read_options=function(O){var T=this._create();for(var E in u)T._disabled[E]=O.templating.indexOf(E)===-1;return T._update(),T},S.prototype.exclude=function(O){var T=this._create();return T._excluded[O]=!0,T._update(),T},S.prototype.read=function(){var O="";this._match_pattern?O=this._input.read(this._starting_pattern):O=this._input.read(this._starting_pattern,this.__template_pattern);for(var T=this._read_template();T;)this._match_pattern?T+=this._input.read(this._match_pattern):T+=this._input.readUntil(this.__template_pattern),O+=T,T=this._read_template();return this._until_after&&(O+=this._input.readUntilAfter(this._until_pattern)),O},S.prototype.__set_templated_pattern=function(){var O=[];this._disabled.php||O.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||O.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||O.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||O.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(O.push(this.__patterns.django._starting_pattern.source),O.push(this.__patterns.django_value._starting_pattern.source),O.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||O.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&O.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+O.join("|")+")")},S.prototype._read_template=function(){var O="",T=this._input.peek();if(T==="<"){var E=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&E==="?"&&(O=O||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&E==="%"&&(O=O||this.__patterns.erb.read())}else T==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(O=O||this.__patterns.handlebars_comment.read(),O=O||this.__patterns.handlebars_unescaped.read(),O=O||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(O=O||this.__patterns.django_value.read()),this._excluded.django||(O=O||this.__patterns.django_comment.read(),O=O||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(O=O||this.__patterns.smarty_comment.read(),O=O||this.__patterns.smarty_literal.read(),O=O||this.__patterns.smarty.read()));return O},f.exports.TemplatablePattern=S},,,,function(f,h,n){var o=n(19).Beautifier,u=n(20).Options;function S(O,T,E,C){var j=new o(O,T,E,C);return j.beautify()}f.exports=S,f.exports.defaultOptions=function(){return new u}},function(f,h,n){var o=n(20).Options,u=n(2).Output,S=n(21).Tokenizer,O=n(21).TOKEN,T=/\r\n|[\r\n]/,E=/\r\n|[\r\n]/g,C=function(se,Y){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=se.max_preserve_newlines,this.preserve_newlines=se.preserve_newlines,this._output=new u(se,Y)};C.prototype.current_line_has_match=function(se){return this._output.current_line.has_match(se)},C.prototype.set_space_before_token=function(se,Y){this._output.space_before_token=se,this._output.non_breaking_space=Y},C.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},C.prototype.add_raw_token=function(se){this._output.add_raw_token(se)},C.prototype.print_preserved_newlines=function(se){var Y=0;se.type!==O.TEXT&&se.previous.type!==O.TEXT&&(Y=se.newlines?1:0),this.preserve_newlines&&(Y=se.newlines<this.max_preserve_newlines+1?se.newlines:this.max_preserve_newlines+1);for(var ie=0;ie<Y;ie++)this.print_newline(ie>0);return Y!==0},C.prototype.traverse_whitespace=function(se){return se.whitespace_before||se.newlines?(this.print_preserved_newlines(se)||(this._output.space_before_token=!0),!0):!1},C.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},C.prototype.print_newline=function(se){this._output.add_new_line(se)},C.prototype.print_token=function(se){se.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(se.text))},C.prototype.indent=function(){this.indent_level++},C.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},C.prototype.get_full_indent=function(se){return se=this.indent_level+(se||0),se<1?"":this._output.get_indent_string(se)};var j=function(se){for(var Y=null,ie=se.next;ie.type!==O.EOF&&se.closed!==ie;){if(ie.type===O.ATTRIBUTE&&ie.text==="type"){ie.next&&ie.next.type===O.EQUALS&&ie.next.next&&ie.next.next.type===O.VALUE&&(Y=ie.next.next.text);break}ie=ie.next}return Y},x=function(se,Y){var ie=null,U=null;return Y.closed?(se==="script"?ie="text/javascript":se==="style"&&(ie="text/css"),ie=j(Y)||ie,ie.search("text/css")>-1?U="css":ie.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?U="javascript":ie.search(/(text|application|dojo)\/(x-)?(html)/)>-1?U="html":ie.search(/test\/null/)>-1&&(U="null"),U):null};function L(se,Y){return Y.indexOf(se)!==-1}function N(se,Y,ie){this.parent=se||null,this.tag=Y?Y.tag_name:"",this.indent_level=ie||0,this.parser_token=Y||null}function z(se){this._printer=se,this._current_frame=null}z.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},z.prototype.record_tag=function(se){var Y=new N(this._current_frame,se,this._printer.indent_level);this._current_frame=Y},z.prototype._try_pop_frame=function(se){var Y=null;return se&&(Y=se.parser_token,this._printer.indent_level=se.indent_level,this._current_frame=se.parent),Y},z.prototype._get_frame=function(se,Y){for(var ie=this._current_frame;ie&&se.indexOf(ie.tag)===-1;){if(Y&&Y.indexOf(ie.tag)!==-1){ie=null;break}ie=ie.parent}return ie},z.prototype.try_pop=function(se,Y){var ie=this._get_frame([se],Y);return this._try_pop_frame(ie)},z.prototype.indent_to_tag=function(se){var Y=this._get_frame(se);Y&&(this._printer.indent_level=Y.indent_level)};function te(se,Y,ie,U){this._source_text=se||"",Y=Y||{},this._js_beautify=ie,this._css_beautify=U,this._tag_stack=null;var Z=new o(Y,"html");this._options=Z,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"}te.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var se=this._source_text,Y=this._options.eol;this._options.eol==="auto"&&(Y=`
`,se&&T.test(se)&&(Y=se.match(T)[0])),se=se.replace(E,`
`);var ie=se.match(/^[\t ]*/)[0],U={text:"",type:""},Z=new J(this._options),K=new C(this._options,ie),k=new S(se,this._options).tokenize();this._tag_stack=new z(K);for(var D=null,re=k.next();re.type!==O.EOF;)re.type===O.TAG_OPEN||re.type===O.COMMENT?(D=this._handle_tag_open(K,re,Z,U,k),Z=D):re.type===O.ATTRIBUTE||re.type===O.EQUALS||re.type===O.VALUE||re.type===O.TEXT&&!Z.tag_complete?D=this._handle_inside_tag(K,re,Z,U):re.type===O.TAG_CLOSE?D=this._handle_tag_close(K,re,Z):re.type===O.TEXT?D=this._handle_text(K,re,Z):re.type===O.CONTROL_FLOW_OPEN?D=this._handle_control_flow_open(K,re):re.type===O.CONTROL_FLOW_CLOSE?D=this._handle_control_flow_close(K,re):K.add_raw_token(re),U=D,re=k.next();var pe=K._output.get_code(Y);return pe},te.prototype._handle_control_flow_open=function(se,Y){var ie={text:Y.text,type:Y.type};return se.set_space_before_token(Y.newlines||Y.whitespace_before!=="",!0),Y.newlines?se.print_preserved_newlines(Y):se.set_space_before_token(Y.newlines||Y.whitespace_before!=="",!0),se.print_token(Y),se.indent(),ie},te.prototype._handle_control_flow_close=function(se,Y){var ie={text:Y.text,type:Y.type};return se.deindent(),Y.newlines?se.print_preserved_newlines(Y):se.set_space_before_token(Y.newlines||Y.whitespace_before!=="",!0),se.print_token(Y),ie},te.prototype._handle_tag_close=function(se,Y,ie){var U={text:Y.text,type:Y.type};return se.alignment_size=0,ie.tag_complete=!0,se.set_space_before_token(Y.newlines||Y.whitespace_before!=="",!0),ie.is_unformatted?se.add_raw_token(Y):(ie.tag_start_char==="<"&&(se.set_space_before_token(Y.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&ie.has_wrapped_attrs&&se.print_newline(!1)),se.print_token(Y)),ie.indent_content&&!(ie.is_unformatted||ie.is_content_unformatted)&&(se.indent(),ie.indent_content=!1),!ie.is_inline_element&&!(ie.is_unformatted||ie.is_content_unformatted)&&se.set_wrap_point(),U},te.prototype._handle_inside_tag=function(se,Y,ie,U){var Z=ie.has_wrapped_attrs,K={text:Y.text,type:Y.type};return se.set_space_before_token(Y.newlines||Y.whitespace_before!=="",!0),ie.is_unformatted?se.add_raw_token(Y):ie.tag_start_char==="{"&&Y.type===O.TEXT?se.print_preserved_newlines(Y)?(Y.newlines=0,se.add_raw_token(Y)):se.print_token(Y):(Y.type===O.ATTRIBUTE?se.set_space_before_token(!0):(Y.type===O.EQUALS||Y.type===O.VALUE&&Y.previous.type===O.EQUALS)&&se.set_space_before_token(!1),Y.type===O.ATTRIBUTE&&ie.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(se.traverse_whitespace(Y),Z=Z||Y.newlines!==0),this._is_wrap_attributes_force&&ie.attr_count>=this._options.wrap_attributes_min_attrs&&(U.type!==O.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(se.print_newline(!1),Z=!0)),se.print_token(Y),Z=Z||se.previous_token_wrapped(),ie.has_wrapped_attrs=Z),K},te.prototype._handle_text=function(se,Y,ie){var U={text:Y.text,type:"TK_CONTENT"};return ie.custom_beautifier_name?this._print_custom_beatifier_text(se,Y,ie):ie.is_unformatted||ie.is_content_unformatted?se.add_raw_token(Y):(se.traverse_whitespace(Y),se.print_token(Y)),U},te.prototype._print_custom_beatifier_text=function(se,Y,ie){var U=this;if(Y.text!==""){var Z=Y.text,K,k=1,D="",re="";ie.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?K=this._js_beautify:ie.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?K=this._css_beautify:ie.custom_beautifier_name==="html"&&(K=function(et,Ke){var tt=new te(et,Ke,U._js_beautify,U._css_beautify);return tt.beautify()}),this._options.indent_scripts==="keep"?k=0:this._options.indent_scripts==="separate"&&(k=-se.indent_level);var pe=se.get_full_indent(k);if(Z=Z.replace(/\n[ \t]*$/,""),ie.custom_beautifier_name!=="html"&&Z[0]==="<"&&Z.match(/^(<!--|<!\[CDATA\[)/)){var Oe=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(Z);if(!Oe){se.add_raw_token(Y);return}D=pe+Oe[1]+`
`,Z=Oe[4],Oe[5]&&(re=pe+Oe[5]),Z=Z.replace(/\n[ \t]*$/,""),(Oe[2]||Oe[3].indexOf(`
`)!==-1)&&(Oe=Oe[3].match(/[ \t]+$/),Oe&&(Y.whitespace_before=Oe[0]))}if(Z)if(K){var $e=function(){this.eol=`
`};$e.prototype=this._options.raw_options;var Ge=new $e;Z=K(pe+Z,Ge)}else{var ke=Y.whitespace_before;ke&&(Z=Z.replace(new RegExp(`
(`+ke+")?","g"),`
`)),Z=pe+Z.replace(/\n/g,`
`+pe)}D&&(Z?Z=D+Z+`
`+re:Z=D+re),se.print_newline(!1),Z&&(Y.text=Z,Y.whitespace_before="",Y.newlines=0,se.add_raw_token(Y),se.print_newline(!0))}},te.prototype._handle_tag_open=function(se,Y,ie,U,Z){var K=this._get_tag_open_token(Y);if((ie.is_unformatted||ie.is_content_unformatted)&&!ie.is_empty_element&&Y.type===O.TAG_OPEN&&!K.is_start_tag?(se.add_raw_token(Y),K.start_tag_token=this._tag_stack.try_pop(K.tag_name)):(se.traverse_whitespace(Y),this._set_tag_position(se,Y,K,ie,U),K.is_inline_element||se.set_wrap_point(),se.print_token(Y)),K.is_start_tag&&this._is_wrap_attributes_force){var k=0,D;do D=Z.peek(k),D.type===O.ATTRIBUTE&&(K.attr_count+=1),k+=1;while(D.type!==O.EOF&&D.type!==O.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(K.alignment_size=Y.text.length+1),!K.tag_complete&&!K.is_unformatted&&(se.alignment_size=K.alignment_size),K};var J=function(se,Y,ie){if(this.parent=Y||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="",!ie)this.tag_complete=!0;else{var U;this.tag_start_char=ie.text[0],this.text=ie.text,this.tag_start_char==="<"?(U=ie.text.match(/^<([^\s>]*)/),this.tag_check=U?U[1]:""):(U=ie.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=U?U[1]:"",(ie.text.startsWith("{{#>")||ie.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&ie.next!==null?this.tag_check=ie.next.text.split(" ")[0]:this.tag_check=ie.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),ie.type===O.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||ie.closed&&ie.closed.text==="/>";var Z=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(Z=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!se.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(Z)))}};te.prototype._get_tag_open_token=function(se){var Y=new J(this._options,this._tag_stack.get_parser_token(),se);return Y.alignment_size=this._options.wrap_attributes_indent_size,Y.is_end_tag=Y.is_end_tag||L(Y.tag_check,this._options.void_elements),Y.is_empty_element=Y.tag_complete||Y.is_start_tag&&Y.is_end_tag,Y.is_unformatted=!Y.tag_complete&&L(Y.tag_check,this._options.unformatted),Y.is_content_unformatted=!Y.is_empty_element&&L(Y.tag_check,this._options.content_unformatted),Y.is_inline_element=L(Y.tag_name,this._options.inline)||this._options.inline_custom_elements&&Y.tag_name.includes("-")||Y.tag_start_char==="{",Y},te.prototype._set_tag_position=function(se,Y,ie,U,Z){if(ie.is_empty_element||(ie.is_end_tag?ie.start_tag_token=this._tag_stack.try_pop(ie.tag_name):(this._do_optional_end_element(ie)&&(ie.is_inline_element||se.print_newline(!1)),this._tag_stack.record_tag(ie),(ie.tag_name==="script"||ie.tag_name==="style")&&!(ie.is_unformatted||ie.is_content_unformatted)&&(ie.custom_beautifier_name=x(ie.tag_check,Y)))),L(ie.tag_check,this._options.extra_liners)&&(se.print_newline(!1),se._output.just_added_blankline()||se.print_newline(!0)),ie.is_empty_element){if(ie.tag_start_char==="{"&&ie.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),ie.indent_content=!0;var K=se.current_line_has_match(/{{#if/);K||se.print_newline(!1)}ie.tag_name==="!--"&&Z.type===O.TAG_CLOSE&&U.is_end_tag&&ie.text.indexOf(`
`)===-1||(ie.is_inline_element||ie.is_unformatted||se.print_newline(!1),this._calcluate_parent_multiline(se,ie))}else if(ie.is_end_tag){var k=!1;k=ie.start_tag_token&&ie.start_tag_token.multiline_content,k=k||!ie.is_inline_element&&!(U.is_inline_element||U.is_unformatted)&&!(Z.type===O.TAG_CLOSE&&ie.start_tag_token===U)&&Z.type!=="TK_CONTENT",(ie.is_content_unformatted||ie.is_unformatted)&&(k=!1),k&&se.print_newline(!1)}else ie.indent_content=!ie.custom_beautifier_name,ie.tag_start_char==="<"&&(ie.tag_name==="html"?ie.indent_content=this._options.indent_inner_html:ie.tag_name==="head"?ie.indent_content=this._options.indent_head_inner_html:ie.tag_name==="body"&&(ie.indent_content=this._options.indent_body_inner_html)),!(ie.is_inline_element||ie.is_unformatted)&&(Z.type!=="TK_CONTENT"||ie.is_content_unformatted)&&se.print_newline(!1),this._calcluate_parent_multiline(se,ie)},te.prototype._calcluate_parent_multiline=function(se,Y){Y.parent&&se._output.just_added_newline()&&!((Y.is_inline_element||Y.is_unformatted)&&Y.parent.is_inline_element)&&(Y.parent.multiline_content=!0)};var ge=["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"],_e=["a","audio","del","ins","map","noscript","video"];te.prototype._do_optional_end_element=function(se){var Y=null;if(!(se.is_empty_element||!se.is_start_tag||!se.parent)){if(se.tag_name==="body")Y=Y||this._tag_stack.try_pop("head");else if(se.tag_name==="li")Y=Y||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(se.tag_name==="dd"||se.tag_name==="dt")Y=Y||this._tag_stack.try_pop("dt",["dl"]),Y=Y||this._tag_stack.try_pop("dd",["dl"]);else if(se.parent.tag_name==="p"&&ge.indexOf(se.tag_name)!==-1){var ie=se.parent.parent;(!ie||_e.indexOf(ie.tag_name)===-1)&&(Y=Y||this._tag_stack.try_pop("p"))}else se.tag_name==="rp"||se.tag_name==="rt"?(Y=Y||this._tag_stack.try_pop("rt",["ruby","rtc"]),Y=Y||this._tag_stack.try_pop("rp",["ruby","rtc"])):se.tag_name==="optgroup"?Y=Y||this._tag_stack.try_pop("optgroup",["select"]):se.tag_name==="option"?Y=Y||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):se.tag_name==="colgroup"?Y=Y||this._tag_stack.try_pop("caption",["table"]):se.tag_name==="thead"?(Y=Y||this._tag_stack.try_pop("caption",["table"]),Y=Y||this._tag_stack.try_pop("colgroup",["table"])):se.tag_name==="tbody"||se.tag_name==="tfoot"?(Y=Y||this._tag_stack.try_pop("caption",["table"]),Y=Y||this._tag_stack.try_pop("colgroup",["table"]),Y=Y||this._tag_stack.try_pop("thead",["table"]),Y=Y||this._tag_stack.try_pop("tbody",["table"])):se.tag_name==="tr"?(Y=Y||this._tag_stack.try_pop("caption",["table"]),Y=Y||this._tag_stack.try_pop("colgroup",["table"]),Y=Y||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(se.tag_name==="th"||se.tag_name==="td")&&(Y=Y||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),Y=Y||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return se.parent=this._tag_stack.get_parser_token(),Y}},f.exports.Beautifier=te},function(f,h,n){var o=n(6).Options;function u(S){o.call(this,S,"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"])}u.prototype=new o,f.exports.Options=u},function(f,h,n){var o=n(9).Tokenizer,u=n(9).TOKEN,S=n(13).Directives,O=n(14).TemplatablePattern,T=n(12).Pattern,E={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:u.START,RAW:u.RAW,EOF:u.EOF},C=new S(/<\!--/,/-->/),j=function(x,L){o.call(this,x,L),this._current_tag_name="";var N=new O(this._input).read_options(this._options),z=new T(this._input);if(this.__patterns={word:N.until(/[\n\r\t <]/),word_control_flow_close_excluded:N.until(/[\n\r\t <}]/),single_quote:N.until_after(/'/),double_quote:N.until_after(/"/),attribute:N.until(/[\n\r\t =>]|\/>/),element_name:N.until(/[\n\r\t >\/]/),angular_control_flow_start:z.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:z.starting_with(/{{!--/).until_after(/--}}/),handlebars:z.starting_with(/{{/).until_after(/}}/),handlebars_open:z.until(/[\n\r\t }]/),handlebars_raw_close:z.until(/}}/),comment:z.starting_with(/<!--/).until_after(/-->/),cdata:z.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:z.starting_with(/<!\[/).until_after(/]>/),processing:z.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 te=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=z.matching(te).until_after(te)}};j.prototype=new o,j.prototype._is_comment=function(x){return!1},j.prototype._is_opening=function(x){return x.type===E.TAG_OPEN||x.type===E.CONTROL_FLOW_OPEN},j.prototype._is_closing=function(x,L){return x.type===E.TAG_CLOSE&&L&&((x.text===">"||x.text==="/>")&&L.text[0]==="<"||x.text==="}}"&&L.text[0]==="{"&&L.text[1]==="{")||x.type===E.CONTROL_FLOW_CLOSE&&x.text==="}"&&L.text.endsWith("{")},j.prototype._reset=function(){this._current_tag_name=""},j.prototype._get_next_token=function(x,L){var N=null;this._readWhitespace();var z=this._input.peek();return z===null?this._create_token(E.EOF,""):(N=N||this._read_open_handlebars(z,L),N=N||this._read_attribute(z,x,L),N=N||this._read_close(z,L),N=N||this._read_script_and_style(z,x),N=N||this._read_control_flows(z,L),N=N||this._read_raw_content(z,x,L),N=N||this._read_content_word(z,L),N=N||this._read_comment_or_cdata(z),N=N||this._read_processing(z),N=N||this._read_open(z,L),N=N||this._create_token(E.UNKNOWN,this._input.next()),N)},j.prototype._read_comment_or_cdata=function(x){var L=null,N=null,z=null;if(x==="<"){var te=this._input.peek(1);te==="!"&&(N=this.__patterns.comment.read(),N?(z=C.get_directives(N),z&&z.ignore==="start"&&(N+=C.readIgnored(this._input))):N=this.__patterns.cdata.read()),N&&(L=this._create_token(E.COMMENT,N),L.directives=z)}return L},j.prototype._read_processing=function(x){var L=null,N=null,z=null;if(x==="<"){var te=this._input.peek(1);(te==="!"||te==="?")&&(N=this.__patterns.conditional_comment.read(),N=N||this.__patterns.processing.read()),N&&(L=this._create_token(E.COMMENT,N),L.directives=z)}return L},j.prototype._read_open=function(x,L){var N=null,z=null;return(!L||L.type===E.CONTROL_FLOW_OPEN)&&x==="<"&&(N=this._input.next(),this._input.peek()==="/"&&(N+=this._input.next()),N+=this.__patterns.element_name.read(),z=this._create_token(E.TAG_OPEN,N)),z},j.prototype._read_open_handlebars=function(x,L){var N=null,z=null;return(!L||L.type===E.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&x==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(N=this.__patterns.handlebars_comment.read(),N=N||this.__patterns.handlebars.read(),z=this._create_token(E.COMMENT,N)):(N=this.__patterns.handlebars_open.read(),z=this._create_token(E.TAG_OPEN,N))),z},j.prototype._read_control_flows=function(x,L){var N="",z=null;if(!this._options.templating.includes("angular"))return z;if(x==="@"){if(N=this.__patterns.angular_control_flow_start.read(),N==="")return z;for(var te=N.endsWith("(")?1:0,J=0;!(N.endsWith("{")&&te===J);){var ge=this._input.next();if(ge===null)break;ge==="("?te++:ge===")"&&J++,N+=ge}z=this._create_token(E.CONTROL_FLOW_OPEN,N)}else x==="}"&&L&&L.type===E.CONTROL_FLOW_OPEN&&(N=this._input.next(),z=this._create_token(E.CONTROL_FLOW_CLOSE,N));return z},j.prototype._read_close=function(x,L){var N=null,z=null;return L&&L.type===E.TAG_OPEN&&(L.text[0]==="<"&&(x===">"||x==="/"&&this._input.peek(1)===">")?(N=this._input.next(),x==="/"&&(N+=this._input.next()),z=this._create_token(E.TAG_CLOSE,N)):L.text[0]==="{"&&x==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),z=this._create_token(E.TAG_CLOSE,"}}"))),z},j.prototype._read_attribute=function(x,L,N){var z=null,te="";if(N&&N.text[0]==="<")if(x==="=")z=this._create_token(E.EQUALS,this._input.next());else if(x==='"'||x==="'"){var J=this._input.next();x==='"'?J+=this.__patterns.double_quote.read():J+=this.__patterns.single_quote.read(),z=this._create_token(E.VALUE,J)}else te=this.__patterns.attribute.read(),te&&(L.type===E.EQUALS?z=this._create_token(E.VALUE,te):z=this._create_token(E.ATTRIBUTE,te));return z},j.prototype._is_content_unformatted=function(x){return this._options.void_elements.indexOf(x)===-1&&(this._options.content_unformatted.indexOf(x)!==-1||this._options.unformatted.indexOf(x)!==-1)},j.prototype._read_raw_content=function(x,L,N){var z="";if(N&&N.text[0]==="{")z=this.__patterns.handlebars_raw_close.read();else if(L.type===E.TAG_CLOSE&&L.opened.text[0]==="<"&&L.text[0]!=="/"){var te=L.opened.text.substr(1).toLowerCase();this._is_content_unformatted(te)&&(z=this._input.readUntil(new RegExp("</"+te+"[\\n\\r\\t ]*?>","ig")))}return z?this._create_token(E.TEXT,z):null},j.prototype._read_script_and_style=function(x,L){if(L.type===E.TAG_CLOSE&&L.opened.text[0]==="<"&&L.text[0]!=="/"){var N=L.opened.text.substr(1).toLowerCase();if(N==="script"||N==="style"){var z=this._read_comment_or_cdata(x);if(z)return z.type=E.TEXT,z;var te=this._input.readUntil(new RegExp("</"+N+"[\\n\\r\\t ]*?>","ig"));if(te)return this._create_token(E.TEXT,te)}}return null},j.prototype._read_content_word=function(x,L){var N="";return this._options.unformatted_content_delimiter&&x===this._options.unformatted_content_delimiter[0]&&(N=this.__patterns.unformatted_content_delimiter.read()),N||(N=L&&L.type===E.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),N?this._create_token(E.TEXT,N):null},f.exports.Tokenizer=j,f.exports.TOKEN=E}],y={};function i(f){var h=y[f];if(h!==void 0)return h.exports;var n=y[f]={exports:{}};return B[f](n,n.exports,i),n.exports}var v=i(18);V=v})();var P=V;if(1)H=[_,_(58553),_(87804)],I=function(B){var y=_(58553),i=_(87804);return{html_beautify:function(v,f){return P(v,f,y.js_beautify,i.css_beautify)}}}.apply(Re,H),I!==void 0&&(xt.exports=I);else var F,R})()},58553:function(xt,Re){var _,H;(function(){var I;(function(){"use strict";var P=[function(y,i,v){var f=v(1).Beautifier,h=v(5).Options;function n(o,u){var S=new f(o,u);return S.beautify()}y.exports=n,y.exports.defaultOptions=function(){return new h}},function(y,i,v){var f=v(2).Output,h=v(3).Token,n=v(4),o=v(5).Options,u=v(7).Tokenizer,S=v(7).line_starters,O=v(7).positionable_operators,T=v(7).TOKEN;function E(D,re){return re.indexOf(D)!==-1}function C(D){return D.replace(/^\s+/g,"")}function j(D){for(var re={},pe=0;pe<D.length;pe++)re[D[pe].replace(/-/g,"_")]=D[pe];return re}function x(D,re){return D&&D.type===T.RESERVED&&D.text===re}function L(D,re){return D&&D.type===T.RESERVED&&E(D.text,re)}var N=["case","return","do","if","throw","else","await","break","continue","async"],z=["before-newline","after-newline","preserve-newline"],te=j(z),J=[te.before_newline,te.preserve_newline],ge={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function _e(D,re){re.multiline_frame||re.mode===ge.ForInitializer||re.mode===ge.Conditional||D.remove_indent(re.start_line_index)}function se(D){D=D.replace(n.allLineBreaks,`
`);for(var re=[],pe=D.indexOf(`
`);pe!==-1;)re.push(D.substring(0,pe)),D=D.substring(pe+1),pe=D.indexOf(`
`);return D.length&&re.push(D),re}function Y(D){return D===ge.ArrayLiteral}function ie(D){return E(D,[ge.Expression,ge.ForInitializer,ge.Conditional])}function U(D,re){for(var pe=0;pe<D.length;pe++){var Oe=D[pe].trim();if(Oe.charAt(0)!==re)return!1}return!0}function Z(D,re){for(var pe=0,Oe=D.length,$e;pe<Oe;pe++)if($e=D[pe],$e&&$e.indexOf(re)!==0)return!1;return!0}function K(D,re){re=re||{},this._source_text=D||"",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 o(re)}K.prototype.create_flags=function(D,re){var pe=0;D&&(pe=D.indentation_level,!this._output.just_added_newline()&&D.line_indent_level>pe&&(pe=D.line_indent_level));var Oe={mode:re,parent:D,last_token:D?D.last_token:new h(T.START_BLOCK,""),last_word:D?D.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:pe,alignment:0,line_indent_level:D?D.line_indent_level:pe,start_line_index:this._output.get_line_number(),ternary_depth:0};return Oe},K.prototype._reset=function(D){var re=D.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new f(this._options,re),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(ge.BlockStatement);var pe=new u(D,this._options);return this._tokens=pe.tokenize(),D},K.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var D,re=this._reset(this._source_text),pe=this._options.eol;this._options.eol==="auto"&&(pe=`
`,re&&n.lineBreak.test(re||"")&&(pe=re.match(n.lineBreak)[0]));for(var Oe=this._tokens.next();Oe;)this.handle_token(Oe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Oe,Oe=this._tokens.next();return D=this._output.get_code(pe),D},K.prototype.handle_token=function(D,re){D.type===T.START_EXPR?this.handle_start_expr(D):D.type===T.END_EXPR?this.handle_end_expr(D):D.type===T.START_BLOCK?this.handle_start_block(D):D.type===T.END_BLOCK?this.handle_end_block(D):D.type===T.WORD?this.handle_word(D):D.type===T.RESERVED?this.handle_word(D):D.type===T.SEMICOLON?this.handle_semicolon(D):D.type===T.STRING?this.handle_string(D):D.type===T.EQUALS?this.handle_equals(D):D.type===T.OPERATOR?this.handle_operator(D):D.type===T.COMMA?this.handle_comma(D):D.type===T.BLOCK_COMMENT?this.handle_block_comment(D,re):D.type===T.COMMENT?this.handle_comment(D,re):D.type===T.DOT?this.handle_dot(D):D.type===T.EOF?this.handle_eof(D):D.type===T.UNKNOWN?this.handle_unknown(D,re):this.handle_unknown(D,re)},K.prototype.handle_whitespace_and_comments=function(D,re){var pe=D.newlines,Oe=this._options.keep_array_indentation&&Y(this._flags.mode);if(D.comments_before)for(var $e=D.comments_before.next();$e;)this.handle_whitespace_and_comments($e,re),this.handle_token($e,re),$e=D.comments_before.next();if(Oe)for(var Ge=0;Ge<pe;Ge+=1)this.print_newline(Ge>0,re);else if(this._options.max_preserve_newlines&&pe>this._options.max_preserve_newlines&&(pe=this._options.max_preserve_newlines),this._options.preserve_newlines&&pe>1){this.print_newline(!1,re);for(var ke=1;ke<pe;ke+=1)this.print_newline(!0,re)}};var k=["async","break","continue","return","throw","yield"];K.prototype.allow_wrap_or_preserved_newline=function(D,re){if(re=re===void 0?!1:re,!this._output.just_added_newline()){var pe=this._options.preserve_newlines&&D.newlines||re,Oe=E(this._flags.last_token.text,O)||E(D.text,O);if(Oe){var $e=E(this._flags.last_token.text,O)&&E(this._options.operator_position,J)||E(D.text,O);pe=pe&&$e}if(pe)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(L(this._flags.last_token,k))return;this._output.set_wrap_point()}}},K.prototype.print_newline=function(D,re){if(!re&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==T.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var pe=this._tokens.peek();this._flags.mode===ge.Statement&&!(this._flags.if_block&&x(pe,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(D)&&(this._flags.multiline_frame=!0)},K.prototype.print_token_line_indentation=function(D){this._output.just_added_newline()&&(this._options.keep_array_indentation&&D.newlines&&(D.text==="["||Y(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(D.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))},K.prototype.print_token=function(D){if(this._output.raw){this._output.add_raw_token(D);return}if(this._options.comma_first&&D.previous&&D.previous.type===T.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var re=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(re),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(D),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(D),this._output.non_breaking_space=!0,this._output.add_token(D.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},K.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},K.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))},K.prototype.set_mode=function(D){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,D),this._flags=this.create_flags(this._previous_flags,D),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},K.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===ge.Statement&&_e(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},K.prototype.start_of_object_property=function(){return this._flags.parent.mode===ge.ObjectLiteral&&this._flags.mode===ge.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"]))},K.prototype.start_of_statement=function(D){var re=!1;return re=re||L(this._flags.last_token,["var","let","const"])&&D.type===T.WORD,re=re||x(this._flags.last_token,"do"),re=re||!(this._flags.parent.mode===ge.ObjectLiteral&&this._flags.mode===ge.Statement)&&L(this._flags.last_token,k)&&!D.newlines,re=re||x(this._flags.last_token,"else")&&!(x(D,"if")&&!D.comments_before),re=re||this._flags.last_token.type===T.END_EXPR&&(this._previous_flags.mode===ge.ForInitializer||this._previous_flags.mode===ge.Conditional),re=re||this._flags.last_token.type===T.WORD&&this._flags.mode===ge.BlockStatement&&!this._flags.in_case&&!(D.text==="--"||D.text==="++")&&this._last_last_text!=="function"&&D.type!==T.WORD&&D.type!==T.RESERVED,re=re||this._flags.mode===ge.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"])),re?(this.set_mode(ge.Statement),this.indent(),this.handle_whitespace_and_comments(D,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D,L(D,["do","for","if","while"])),!0):!1},K.prototype.handle_start_expr=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D);var re=ge.Expression;if(D.text==="["){if(this._flags.last_token.type===T.WORD||this._flags.last_token.text===")"){L(this._flags.last_token,S)&&(this._output.space_before_token=!0),this.print_token(D),this.set_mode(re),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}re=ge.ArrayLiteral,Y(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()),E(this._flags.last_token.type,[T.START_EXPR,T.END_EXPR,T.WORD,T.OPERATOR,T.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===T.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,re=ge.ForInitializer):E(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,re=ge.Conditional):E(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&D.whitespace_before===""?this._output.space_before_token=!1:(E(this._flags.last_token.text,S)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===T.EQUALS||this._flags.last_token.type===T.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D);else if(this._flags.last_token.type===T.WORD){this._output.space_before_token=!1;var pe=this._tokens.peek(-3);if(this._options.space_after_named_function&&pe){var Oe=this._tokens.peek(-4);L(pe,["async","function"])||pe.text==="*"&&L(Oe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===ge.ObjectLiteral?(pe.text==="{"||pe.text===","||pe.text==="*"&&(Oe.text==="{"||Oe.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(D);(this._flags.last_token.type===T.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(E(this._last_last_text,["function","yield"])||this._flags.mode===ge.ObjectLiteral&&E(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===T.START_BLOCK?this.print_newline():(this._flags.last_token.type===T.END_EXPR||this._flags.last_token.type===T.START_EXPR||this._flags.last_token.type===T.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===T.COMMA)&&this.allow_wrap_or_preserved_newline(D,D.newlines),this.print_token(D),this.set_mode(re),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},K.prototype.handle_end_expr=function(D){for(;this._flags.mode===ge.Statement;)this.restore_mode();this.handle_whitespace_and_comments(D),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(D,D.text==="]"&&Y(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===T.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(D),this.restore_mode(),_e(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===ge.Conditional&&(this._previous_flags.mode=ge.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},K.prototype.handle_start_block=function(D){this.handle_whitespace_and_comments(D);var re=this._tokens.peek(),pe=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===T.END_EXPR?(this.set_mode(ge.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(ge.BlockStatement):pe&&(E(pe.text,[":",","])&&E(re.type,[T.STRING,T.WORD,T.RESERVED])||E(re.text,["get","set","..."])&&E(pe.type,[T.WORD,T.RESERVED]))?E(this._last_last_text,["class","interface"])&&!E(pe.text,[":",","])?this.set_mode(ge.BlockStatement):this.set_mode(ge.ObjectLiteral):this._flags.last_token.type===T.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(ge.BlockStatement):E(this._flags.last_token.type,[T.EQUALS,T.START_EXPR,T.COMMA,T.OPERATOR])||L(this._flags.last_token,["return","throw","import","default"])?this.set_mode(ge.ObjectLiteral):this.set_mode(ge.BlockStatement),this._flags.last_token&&L(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Oe=!re.comments_before&&re.text==="}",$e=Oe&&this._flags.last_word==="function"&&this._flags.last_token.type===T.END_EXPR;if(this._options.brace_preserve_inline){var Ge=0,ke=null;this._flags.inline_frame=!0;do if(Ge+=1,ke=this._tokens.peek(Ge-1),ke.newlines){this._flags.inline_frame=!1;break}while(ke.type!==T.EOF&&!(ke.type===T.END_BLOCK&&ke.opened===D))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&D.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==T.OPERATOR&&($e||this._flags.last_token.type===T.EQUALS||L(this._flags.last_token,N)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(Y(this._previous_flags.mode)&&(this._flags.last_token.type===T.START_EXPR||this._flags.last_token.type===T.COMMA)&&((this._flags.last_token.type===T.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===T.COMMA||this._flags.last_token.type===T.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(D),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==T.OPERATOR&&this._flags.last_token.type!==T.START_EXPR&&(E(this._flags.last_token.type,[T.START_BLOCK,T.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(D),this.indent(),!Oe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},K.prototype.handle_end_block=function(D){for(this.handle_whitespace_and_comments(D);this._flags.mode===ge.Statement;)this.restore_mode();var re=this._flags.last_token.type===T.START_BLOCK;this._flags.inline_frame&&!re?this._output.space_before_token=!0:this._options.brace_style==="expand"?re||this.print_newline():re||(Y(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(D)},K.prototype.handle_word=function(D){if(D.type===T.RESERVED){if(E(D.text,["set","get"])&&this._flags.mode!==ge.ObjectLiteral)D.type=T.WORD;else if(D.text==="import"&&E(this._tokens.peek().text,["(","."]))D.type=T.WORD;else if(E(D.text,["as","from"])&&!this._flags.import_block)D.type=T.WORD;else if(this._flags.mode===ge.ObjectLiteral){var re=this._tokens.peek();re.text===":"&&(D.type=T.WORD)}}if(this.start_of_statement(D)?L(this._flags.last_token,["var","let","const"])&&D.type===T.WORD&&(this._flags.declaration_statement=!0):D.newlines&&!ie(this._flags.mode)&&(this._flags.last_token.type!==T.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==T.EQUALS&&(this._options.preserve_newlines||!L(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(D),this.print_newline()):this.handle_whitespace_and_comments(D),this._flags.do_block&&!this._flags.do_while)if(x(D,"while")){this._output.space_before_token=!0,this.print_token(D),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&&x(D,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===ge.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&L(D,["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(D),this._flags.in_case=!0;return}if((this._flags.last_token.type===T.COMMA||this._flags.last_token.type===T.START_EXPR||this._flags.last_token.type===T.EQUALS||this._flags.last_token.type===T.OPERATOR)&&!this.start_of_object_property()&&!(E(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===ge.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(D),x(D,"function")){(E(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(E(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===T.OPERATOR))&&!this._output.just_added_blankline()&&!D.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===T.RESERVED||this._flags.last_token.type===T.WORD?L(this._flags.last_token,["get","set","new","export"])||L(this._flags.last_token,k)?this._output.space_before_token=!0:x(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===T.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(ie(this._flags.mode)||Y(this._flags.mode))||this.print_newline(),this.print_token(D),this._flags.last_word=D.text;return}var pe="NONE";if(this._flags.last_token.type===T.END_BLOCK?this._previous_flags.inline_frame?pe="SPACE":L(D,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&D.newlines?pe="NEWLINE":(pe="SPACE",this._output.space_before_token=!0):pe="NEWLINE":this._flags.last_token.type===T.SEMICOLON&&this._flags.mode===ge.BlockStatement?pe="NEWLINE":this._flags.last_token.type===T.SEMICOLON&&ie(this._flags.mode)?pe="SPACE":this._flags.last_token.type===T.STRING?pe="NEWLINE":this._flags.last_token.type===T.RESERVED||this._flags.last_token.type===T.WORD||this._flags.last_token.text==="*"&&(E(this._last_last_text,["function","yield"])||this._flags.mode===ge.ObjectLiteral&&E(this._last_last_text,["{",","]))?pe="SPACE":this._flags.last_token.type===T.START_BLOCK?this._flags.inline_frame?pe="SPACE":pe="NEWLINE":this._flags.last_token.type===T.END_EXPR&&(this._output.space_before_token=!0,pe="NEWLINE"),L(D,S)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?pe="SPACE":pe="NEWLINE"),L(D,["else","catch","finally"]))if((!(this._flags.last_token.type===T.END_BLOCK&&this._previous_flags.mode===ge.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&D.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var Oe=this._output.current_line;Oe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else pe==="NEWLINE"?L(this._flags.last_token,N)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&L(D,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==T.END_EXPR?(this._flags.last_token.type!==T.START_EXPR||!L(D,["var","let","const"]))&&this._flags.last_token.text!==":"&&(x(D,"if")&&x(D.previous,"else")?this._output.space_before_token=!0:this.print_newline()):L(D,S)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&Y(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():pe==="SPACE"&&(this._output.space_before_token=!0);D.previous&&(D.previous.type===T.WORD||D.previous.type===T.RESERVED)&&(this._output.space_before_token=!0),this.print_token(D),this._flags.last_word=D.text,D.type===T.RESERVED&&(D.text==="do"?this._flags.do_block=!0:D.text==="if"?this._flags.if_block=!0:D.text==="import"?this._flags.import_block=!0:this._flags.import_block&&x(D,"from")&&(this._flags.import_block=!1))},K.prototype.handle_semicolon=function(D){this.start_of_statement(D)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(D);for(var re=this._tokens.peek();this._flags.mode===ge.Statement&&!(this._flags.if_block&&x(re,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(D)},K.prototype.handle_string=function(D){D.text.startsWith("`")&&D.newlines===0&&D.whitespace_before===""&&(D.previous.text===")"||this._flags.last_token.type===T.WORD)||(this.start_of_statement(D)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(D),this._flags.last_token.type===T.RESERVED||this._flags.last_token.type===T.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===T.COMMA||this._flags.last_token.type===T.START_EXPR||this._flags.last_token.type===T.EQUALS||this._flags.last_token.type===T.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D):D.text.startsWith("`")&&this._flags.last_token.type===T.END_EXPR&&(D.previous.text==="]"||D.previous.text===")")&&D.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(D)},K.prototype.handle_equals=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0},K.prototype.handle_comma=function(D){this.handle_whitespace_and_comments(D,!0),this.print_token(D),this._output.space_before_token=!0,this._flags.declaration_statement?(ie(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(D)):this._flags.mode===ge.ObjectLiteral||this._flags.mode===ge.Statement&&this._flags.parent.mode===ge.ObjectLiteral?(this._flags.mode===ge.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(D)},K.prototype.handle_operator=function(D){var re=D.text==="*"&&(L(this._flags.last_token,["function","yield"])||E(this._flags.last_token.type,[T.START_BLOCK,T.COMMA,T.END_BLOCK,T.SEMICOLON])),pe=E(D.text,["-","+"])&&(E(this._flags.last_token.type,[T.START_BLOCK,T.START_EXPR,T.EQUALS,T.OPERATOR])||E(this._flags.last_token.text,S)||this._flags.last_token.text===",");if(!this.start_of_statement(D)){var Oe=!re;this.handle_whitespace_and_comments(D,Oe)}if(D.text==="*"&&this._flags.last_token.type===T.DOT){this.print_token(D);return}if(D.text==="::"){this.print_token(D);return}if(E(D.text,["-","+"])&&this.start_of_object_property()){this.print_token(D);return}if(this._flags.last_token.type===T.OPERATOR&&E(this._options.operator_position,J)&&this.allow_wrap_or_preserved_newline(D),D.text===":"&&this._flags.in_case){this.print_token(D),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==T.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 $e=!0,Ge=!0,ke=!1;if(D.text===":"?this._flags.ternary_depth===0?$e=!1:(this._flags.ternary_depth-=1,ke=!0):D.text==="?"&&(this._flags.ternary_depth+=1),!pe&&!re&&this._options.preserve_newlines&&E(D.text,O)){var et=D.text===":",Ke=et&&ke,tt=et&&!ke;switch(this._options.operator_position){case te.before_newline:this._output.space_before_token=!tt,this.print_token(D),(!et||Ke)&&this.allow_wrap_or_preserved_newline(D),this._output.space_before_token=!0;return;case te.after_newline:this._output.space_before_token=!0,!et||Ke?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(D):this._output.space_before_token=!1,this.print_token(D),this._output.space_before_token=!0;return;case te.preserve_newline:tt||this.allow_wrap_or_preserved_newline(D),$e=!(this._output.just_added_newline()||tt),this._output.space_before_token=$e,this.print_token(D),this._output.space_before_token=!0;return}}if(re){this.allow_wrap_or_preserved_newline(D),$e=!1;var It=this._tokens.peek();Ge=It&&E(It.type,[T.WORD,T.RESERVED])}else if(D.text==="...")this.allow_wrap_or_preserved_newline(D),$e=this._flags.last_token.type===T.START_BLOCK,Ge=!1;else if(E(D.text,["--","++","!","~"])||pe){if((this._flags.last_token.type===T.COMMA||this._flags.last_token.type===T.START_EXPR)&&this.allow_wrap_or_preserved_newline(D),$e=!1,Ge=!1,D.newlines&&(D.text==="--"||D.text==="++"||D.text==="~")){var Yt=L(this._flags.last_token,N)&&D.newlines;Yt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Yt,!0)}this._flags.last_token.text===";"&&ie(this._flags.mode)&&($e=!0),this._flags.last_token.type===T.RESERVED?$e=!0:this._flags.last_token.type===T.END_EXPR?$e=!(this._flags.last_token.text==="]"&&(D.text==="--"||D.text==="++")):this._flags.last_token.type===T.OPERATOR&&($e=E(D.text,["--","-","++","+"])&&E(this._flags.last_token.text,["--","-","++","+"]),E(D.text,["+","-"])&&E(this._flags.last_token.text,["--","++"])&&(Ge=!0)),(this._flags.mode===ge.BlockStatement&&!this._flags.inline_frame||this._flags.mode===ge.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||$e,this.print_token(D),this._output.space_before_token=Ge},K.prototype.handle_block_comment=function(D,re){if(this._output.raw){this._output.add_raw_token(D),D.directives&&D.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(D.directives){this.print_newline(!1,re),this.print_token(D),D.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!n.newline.test(D.text)&&!D.newlines){this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0;return}else this.print_block_commment(D,re)},K.prototype.print_block_commment=function(D,re){var pe=se(D.text),Oe,$e=!1,Ge=!1,ke=D.whitespace_before,et=ke.length;if(this.print_newline(!1,re),this.print_token_line_indentation(D),this._output.add_token(pe[0]),this.print_newline(!1,re),pe.length>1){for(pe=pe.slice(1),$e=U(pe,"*"),Ge=Z(pe,ke),$e&&(this._flags.alignment=1),Oe=0;Oe<pe.length;Oe++)$e?(this.print_token_line_indentation(D),this._output.add_token(C(pe[Oe]))):Ge&&pe[Oe]?(this.print_token_line_indentation(D),this._output.add_token(pe[Oe].substring(et))):(this._output.current_line.set_indent(-1),this._output.add_token(pe[Oe])),this.print_newline(!1,re);this._flags.alignment=0}},K.prototype.handle_comment=function(D,re){D.newlines?this.print_newline(!1,re):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(D),this.print_newline(!1,re)},K.prototype.handle_dot=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),L(this._flags.last_token,N)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(D,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(D)},K.prototype.handle_unknown=function(D,re){this.print_token(D),D.text[D.text.length-1]===`
`&&this.print_newline(!1,re)},K.prototype.handle_eof=function(D){for(;this._flags.mode===ge.Statement;)this.restore_mode();this.handle_whitespace_and_comments(D)},y.exports.Beautifier=K},function(y){function i(h){this.__parent=h,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=[]}i.prototype.clone_empty=function(){var h=new i(this.__parent);return h.set_indent(this.__indent_count,this.__alignment_count),h},i.prototype.item=function(h){return h<0?this.__items[this.__items.length+h]:this.__items[h]},i.prototype.has_match=function(h){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(h))return!0;return!1},i.prototype.set_indent=function(h,n){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},i.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)},i.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},i.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},i.prototype.is_empty=function(){return this.__items.length===0},i.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},i.prototype.push=function(h){this.__items.push(h);var n=h.lastIndexOf(`
`);n!==-1?this.__character_count=h.length-n:this.__character_count+=h.length},i.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},i.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},i.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},i.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},i.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function v(h,n){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),n=n||"",h.indent_level>0&&(n=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}v.prototype.get_indent_size=function(h,n){var o=this.__base_string_length;return n=n||0,h<0&&(o=0),o+=h*this.__indent_size,o+=n,o},v.prototype.get_indent_string=function(h,n){var o=this.__base_string;return n=n||0,h<0&&(h=0,o=""),n+=h*this.__indent_size,this.__ensure_cache(n),o+=this.__cache[n],o},v.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var h=this.__cache.length,n=0,o="";this.__indent_size&&h>=this.__indent_size&&(n=Math.floor(h/this.__indent_size),h-=n*this.__indent_size,o=new Array(n+1).join(this.__indent_string)),h&&(o+=new Array(h+1).join(" ")),this.__cache.push(o)};function f(h,n){this.__indent_cache=new v(h,n),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new i(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(h,n){return this.__indent_cache.get_indent_string(h,n)},f.prototype.get_indent_size=function(h,n){return this.__indent_cache.get_indent_size(h,n)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(h){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return h!==`
`&&(o=o.replace(/[\n]/g,h)),o},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(h,n){return h=h||0,n=n||0,this.next_line.set_indent(h,n),this.__lines.length>1?(this.current_line.set_indent(h,n),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(h){for(var n=0;n<h.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(h.whitespace_before),this.current_line.push(h.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},f.prototype.add_token=function(h){this.__add_space_before_token(),this.current_line.push(h),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},f.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},f.prototype.remove_indent=function(h){for(var n=this.__lines.length;h<n;)this.__lines[h]._remove_indent(),h++;this.current_line._remove_wrap_indent()},f.prototype.trim=function(h){for(h=h===void 0?!1:h,this.current_line.trim();h&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(h,n){for(var o=this.__lines.length-2;o>=0;){var u=this.__lines[o];if(u.is_empty())break;if(u.item(0).indexOf(h)!==0&&u.item(-1)!==n){this.__lines.splice(o+1,0,new i(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},y.exports.Output=f},function(y){function i(v,f,h,n){this.type=v,this.text=f,this.comments_before=null,this.newlines=h||0,this.whitespace_before=n||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}y.exports.Token=i},function(y,i){var v="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",f="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",h="\\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",n="\\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",o="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",u="(?:"+o+"|["+v+h+"])",S="(?:"+o+"|["+f+h+n+"])*";i.identifier=new RegExp(u+S,"g"),i.identifierStart=new RegExp(u),i.identifierMatch=new RegExp("(?:"+o+"|["+f+h+n+"])+");var O=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;i.newline=/[\n\r\u2028\u2029]/,i.lineBreak=new RegExp(`\r
|`+i.newline.source),i.allLineBreaks=new RegExp(i.lineBreak.source,"g")},function(y,i,v){var f=v(6).Options,h=["before-newline","after-newline","preserve-newline"];function n(o){f.call(this,o,"js");var u=this.raw_options.brace_style||null;u==="expand-strict"?this.raw_options.brace_style="expand":u==="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 S=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var O=0;O<S.length;O++)S[O]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=S[O];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",h),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}n.prototype=new f,y.exports.Options=n},function(y){function i(h,n){this.raw_options=v(h,n),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"])}i.prototype._get_array=function(h,n){var o=this.raw_options[h],u=n||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(u=o.concat()):typeof o=="string"&&(u=o.split(/[^a-zA-Z0-9_\/\-]+/)),u},i.prototype._get_boolean=function(h,n){var o=this.raw_options[h],u=o===void 0?!!n:!!o;return u},i.prototype._get_characters=function(h,n){var o=this.raw_options[h],u=n||"";return typeof o=="string"&&(u=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),u},i.prototype._get_number=function(h,n){var o=this.raw_options[h];n=parseInt(n,10),isNaN(n)&&(n=0);var u=parseInt(o,10);return isNaN(u)&&(u=n),u},i.prototype._get_selection=function(h,n,o){var u=this._get_selection_list(h,n,o);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values:
`+n+`
You passed in: '`+this.raw_options[h]+"'");return u[0]},i.prototype._get_selection_list=function(h,n,o){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[n[0]],!this._is_valid_selection(o,n))throw new Error("Invalid Default Value!");var u=this._get_array(h,o);if(!this._is_valid_selection(u,n))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values:
`+n+`
You passed in: '`+this.raw_options[h]+"'");return u},i.prototype._is_valid_selection=function(h,n){return h.length&&n.length&&!h.some(function(o){return n.indexOf(o)===-1})};function v(h,n){var o={};h=f(h);var u;for(u in h)u!==n&&(o[u]=h[u]);if(n&&h[n])for(u in h[n])o[u]=h[n][u];return o}function f(h){var n={},o;for(o in h){var u=o.replace(/-/g,"_");n[u]=h[o]}return n}y.exports.Options=i,y.exports.normalizeOpts=f,y.exports.mergeOpts=v},function(y,i,v){var f=v(8).InputScanner,h=v(9).Tokenizer,n=v(9).TOKEN,o=v(13).Directives,u=v(4),S=v(12).Pattern,O=v(14).TemplatablePattern;function T(U,Z){return Z.indexOf(U)!==-1}var E={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:n.START,RAW:n.RAW,EOF:n.EOF},C=new o(/\/\*/,/\*\//),j=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,x=/[0-9]/,L=/[^\d\.]/,N=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),z=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";z=z.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),z="\\?\\.(?!\\d) "+z,z=z.replace(/ /g,"|");var te=new RegExp(z),J="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),ge=J.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),_e=new RegExp("^(?:"+ge.join("|")+")$"),se,Y=function(U,Z){h.call(this,U,Z),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var K=new S(this._input),k=new O(this._input).read_options(this._options);this.__patterns={template:k,identifier:k.starting_with(u.identifier).matching(u.identifierMatch),number:K.matching(j),punct:K.matching(te),comment:K.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:K.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:K.matching(/<!--/),html_comment_end:K.matching(/-->/),include:K.starting_with(/#include/).until_after(u.lineBreak),shebang:K.starting_with(/#!/).until_after(u.lineBreak),xml:K.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:k.until(/['\\\n\r\u2028\u2029]/),double_quote:k.until(/["\\\n\r\u2028\u2029]/),template_text:k.until(/[`\\$]/),template_expression:k.until(/[`}\\]/)}};Y.prototype=new h,Y.prototype._is_comment=function(U){return U.type===E.COMMENT||U.type===E.BLOCK_COMMENT||U.type===E.UNKNOWN},Y.prototype._is_opening=function(U){return U.type===E.START_BLOCK||U.type===E.START_EXPR},Y.prototype._is_closing=function(U,Z){return(U.type===E.END_BLOCK||U.type===E.END_EXPR)&&Z&&(U.text==="]"&&Z.text==="["||U.text===")"&&Z.text==="("||U.text==="}"&&Z.text==="{")},Y.prototype._reset=function(){se=!1},Y.prototype._get_next_token=function(U,Z){var K=null;this._readWhitespace();var k=this._input.peek();return k===null?this._create_token(E.EOF,""):(K=K||this._read_non_javascript(k),K=K||this._read_string(k),K=K||this._read_pair(k,this._input.peek(1)),K=K||this._read_word(U),K=K||this._read_singles(k),K=K||this._read_comment(k),K=K||this._read_regexp(k,U),K=K||this._read_xml(k,U),K=K||this._read_punctuation(),K=K||this._create_token(E.UNKNOWN,this._input.next()),K)},Y.prototype._read_word=function(U){var Z;if(Z=this.__patterns.identifier.read(),Z!=="")return Z=Z.replace(u.allLineBreaks,`
`),!(U.type===E.DOT||U.type===E.RESERVED&&(U.text==="set"||U.text==="get"))&&_e.test(Z)?(Z==="in"||Z==="of")&&(U.type===E.WORD||U.type===E.STRING)?this._create_token(E.OPERATOR,Z):this._create_token(E.RESERVED,Z):this._create_token(E.WORD,Z);if(Z=this.__patterns.number.read(),Z!=="")return this._create_token(E.WORD,Z)},Y.prototype._read_singles=function(U){var Z=null;return U==="("||U==="["?Z=this._create_token(E.START_EXPR,U):U===")"||U==="]"?Z=this._create_token(E.END_EXPR,U):U==="{"?Z=this._create_token(E.START_BLOCK,U):U==="}"?Z=this._create_token(E.END_BLOCK,U):U===";"?Z=this._create_token(E.SEMICOLON,U):U==="."&&L.test(this._input.peek(1))?Z=this._create_token(E.DOT,U):U===","&&(Z=this._create_token(E.COMMA,U)),Z&&this._input.next(),Z},Y.prototype._read_pair=function(U,Z){var K=null;return U==="#"&&Z==="{"&&(K=this._create_token(E.START_BLOCK,U+Z)),K&&(this._input.next(),this._input.next()),K},Y.prototype._read_punctuation=function(){var U=this.__patterns.punct.read();if(U!=="")return U==="="?this._create_token(E.EQUALS,U):U==="?."?this._create_token(E.DOT,U):this._create_token(E.OPERATOR,U)},Y.prototype._read_non_javascript=function(U){var Z="";if(U==="#"){if(this._is_first_token()&&(Z=this.__patterns.shebang.read(),Z))return this._create_token(E.UNKNOWN,Z.trim()+`
`);if(Z=this.__patterns.include.read(),Z)return this._create_token(E.UNKNOWN,Z.trim()+`
`);U=this._input.next();var K="#";if(this._input.hasNext()&&this._input.testChar(x)){do U=this._input.next(),K+=U;while(this._input.hasNext()&&U!=="#"&&U!=="=");return U==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(K+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(K+="{}",this._input.next(),this._input.next())),this._create_token(E.WORD,K)}this._input.back()}else if(U==="<"&&this._is_first_token()){if(Z=this.__patterns.html_comment_start.read(),Z){for(;this._input.hasNext()&&!this._input.testChar(u.newline);)Z+=this._input.next();return se=!0,this._create_token(E.COMMENT,Z)}}else if(se&&U==="-"&&(Z=this.__patterns.html_comment_end.read(),Z))return se=!1,this._create_token(E.COMMENT,Z);return null},Y.prototype._read_comment=function(U){var Z=null;if(U==="/"){var K="";if(this._input.peek(1)==="*"){K=this.__patterns.block_comment.read();var k=C.get_directives(K);k&&k.ignore==="start"&&(K+=C.readIgnored(this._input)),K=K.replace(u.allLineBreaks,`
`),Z=this._create_token(E.BLOCK_COMMENT,K),Z.directives=k}else this._input.peek(1)==="/"&&(K=this.__patterns.comment.read(),Z=this._create_token(E.COMMENT,K))}return Z},Y.prototype._read_string=function(U){if(U==="`"||U==="'"||U==='"'){var Z=this._input.next();return this.has_char_escapes=!1,U==="`"?Z+=this._read_string_recursive("`",!0,"${"):Z+=this._read_string_recursive(U),this.has_char_escapes&&this._options.unescape_strings&&(Z=ie(Z)),this._input.peek()===U&&(Z+=this._input.next()),Z=Z.replace(u.allLineBreaks,`
`),this._create_token(E.STRING,Z)}return null},Y.prototype._allow_regexp_or_xml=function(U){return U.type===E.RESERVED&&T(U.text,["return","case","throw","else","do","typeof","yield"])||U.type===E.END_EXPR&&U.text===")"&&U.opened.previous.type===E.RESERVED&&T(U.opened.previous.text,["if","while","for"])||T(U.type,[E.COMMENT,E.START_EXPR,E.START_BLOCK,E.START,E.END_BLOCK,E.OPERATOR,E.EQUALS,E.EOF,E.SEMICOLON,E.COMMA])},Y.prototype._read_regexp=function(U,Z){if(U==="/"&&this._allow_regexp_or_xml(Z)){for(var K=this._input.next(),k=!1,D=!1;this._input.hasNext()&&(k||D||this._input.peek()!==U)&&!this._input.testChar(u.newline);)K+=this._input.peek(),k?k=!1:(k=this._input.peek()==="\\",this._input.peek()==="["?D=!0:this._input.peek()==="]"&&(D=!1)),this._input.next();return this._input.peek()===U&&(K+=this._input.next(),K+=this._input.read(u.identifier)),this._create_token(E.STRING,K)}return null},Y.prototype._read_xml=function(U,Z){if(this._options.e4x&&U==="<"&&this._allow_regexp_or_xml(Z)){var K="",k=this.__patterns.xml.read_match();if(k){for(var D=k[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),re=D.indexOf("{")===0,pe=0;k;){var Oe=!!k[1],$e=k[2],Ge=!!k[k.length-1]||$e.slice(0,8)==="![CDATA[";if(!Ge&&($e===D||re&&$e.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Oe?--pe:++pe),K+=k[0],pe<=0)break;k=this.__patterns.xml.read_match()}return k||(K+=this._input.match(/[\s\S]*/g)[0]),K=K.replace(u.allLineBreaks,`
`),this._create_token(E.STRING,K)}}return null};function ie(U){for(var Z="",K=0,k=new f(U),D=null;k.hasNext();)if(D=k.match(/([\s]|[^\\]|\\\\)+/g),D&&(Z+=D[0]),k.peek()==="\\"){if(k.next(),k.peek()==="x")D=k.match(/x([0-9A-Fa-f]{2})/g);else if(k.peek()==="u")D=k.match(/u([0-9A-Fa-f]{4})/g),D||(D=k.match(/u\{([0-9A-Fa-f]+)\}/g));else{Z+="\\",k.hasNext()&&(Z+=k.next());continue}if(!D||(K=parseInt(D[1],16),K>126&&K<=255&&D[0].indexOf("x")===0))return U;K>=0&&K<32||K>1114111?Z+="\\"+D[0]:K===34||K===39||K===92?Z+="\\"+String.fromCharCode(K):Z+=String.fromCharCode(K)}return Z}Y.prototype._read_string_recursive=function(U,Z,K){var k,D;U==="'"?D=this.__patterns.single_quote:U==='"'?D=this.__patterns.double_quote:U==="`"?D=this.__patterns.template_text:U==="}"&&(D=this.__patterns.template_expression);for(var re=D.read(),pe="";this._input.hasNext();){if(pe=this._input.next(),pe===U||!Z&&u.newline.test(pe)){this._input.back();break}else pe==="\\"&&this._input.hasNext()?(k=this._input.peek(),k==="x"||k==="u"?this.has_char_escapes=!0:k==="\r"&&this._input.peek(1)===`
`&&this._input.next(),pe+=this._input.next()):K&&(K==="${"&&pe==="$"&&this._input.peek()==="{"&&(pe+=this._input.next()),K===pe&&(U==="`"?pe+=this._read_string_recursive("}",Z,"`"):pe+=this._read_string_recursive("`",Z,"${"),this._input.hasNext()&&(pe+=this._input.next())));pe+=D.read(),re+=pe}return re},y.exports.Tokenizer=Y,y.exports.TOKEN=E,y.exports.positionable_operators=N.slice(),y.exports.line_starters=J.slice()},function(y){var i=RegExp.prototype.hasOwnProperty("sticky");function v(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position<this.__input_length},v.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__input.charAt(this.__position),this.__position+=1),f},v.prototype.peek=function(f){var h=null;return f=f||0,f+=this.__position,f>=0&&f<this.__input_length&&(h=this.__input.charAt(f)),h},v.prototype.__match=function(f,h){f.lastIndex=h;var n=f.exec(this.__input);return n&&!(i&&f.sticky)&&n.index!==h&&(n=null),n},v.prototype.test=function(f,h){return h=h||0,h+=this.__position,h>=0&&h<this.__input_length?!!this.__match(f,h):!1},v.prototype.testChar=function(f,h){var n=this.peek(h);return f.lastIndex=0,n!==null&&f.test(n)},v.prototype.match=function(f){var h=this.__match(f,this.__position);return h?this.__position+=h[0].length:h=null,h},v.prototype.read=function(f,h,n){var o="",u;return f&&(u=this.match(f),u&&(o+=u[0])),h&&(u||!f)&&(o+=this.readUntil(h,n)),o},v.prototype.readUntil=function(f,h){var n="",o=this.__position;f.lastIndex=this.__position;var u=f.exec(this.__input);return u?(o=u.index,h&&(o+=u[0].length)):o=this.__input_length,n=this.__input.substring(this.__position,o),this.__position=o,n},v.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)},v.prototype.get_regexp=function(f,h){var n=null,o="g";return h&&i&&(o="y"),typeof f=="string"&&f!==""?n=new RegExp(f,o):f&&(n=new RegExp(f.source,o)),n},v.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},v.prototype.peekUntilAfter=function(f){var h=this.__position,n=this.readUntilAfter(f);return this.__position=h,n},v.prototype.lookBack=function(f){var h=this.__position-1;return h>=f.length&&this.__input.substring(h-f.length,h).toLowerCase()===f},y.exports.InputScanner=v},function(y,i,v){var f=v(8).InputScanner,h=v(3).Token,n=v(10).TokenStream,o=v(11).WhitespacePattern,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},S=function(O,T){this._input=new f(O),this._options=T||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};S.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var O,T=new h(u.START,""),E=null,C=[],j=new n;T.type!==u.EOF;){for(O=this._get_next_token(T,E);this._is_comment(O);)j.add(O),O=this._get_next_token(T,E);j.isEmpty()||(O.comments_before=j,j=new n),O.parent=E,this._is_opening(O)?(C.push(E),E=O):E&&this._is_closing(O,E)&&(O.opened=E,E.closed=O,E=C.pop(),O.parent=E),O.previous=T,T.next=O,this.__tokens.add(O),T=O}return this.__tokens},S.prototype._is_first_token=function(){return this.__tokens.isEmpty()},S.prototype._reset=function(){},S.prototype._get_next_token=function(O,T){this._readWhitespace();var E=this._input.read(/.+/g);return E?this._create_token(u.RAW,E):this._create_token(u.EOF,"")},S.prototype._is_comment=function(O){return!1},S.prototype._is_opening=function(O){return!1},S.prototype._is_closing=function(O,T){return!1},S.prototype._create_token=function(O,T){var E=new h(O,T,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return E},S.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},y.exports.Tokenizer=S,y.exports.TOKEN=u},function(y){function i(v){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=v}i.prototype.restart=function(){this.__position=0},i.prototype.isEmpty=function(){return this.__tokens_length===0},i.prototype.hasNext=function(){return this.__position<this.__tokens_length},i.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__tokens[this.__position],this.__position+=1),v},i.prototype.peek=function(v){var f=null;return v=v||0,v+=this.__position,v>=0&&v<this.__tokens_length&&(f=this.__tokens[v]),f},i.prototype.add=function(v){this.__parent_token&&(v.parent=this.__parent_token),this.__tokens.push(v),this.__tokens_length+=1},y.exports.TokenStream=i},function(y,i,v){var f=v(12).Pattern;function h(n,o){f.call(this,n,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}h.prototype=new f,h.prototype.__set_whitespace_patterns=function(n,o){n+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+n+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},h.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var n=this._input.read(this._match_pattern);if(n===" ")this.whitespace_before_token=" ";else if(n){var o=this.__split(this._newline_regexp,n);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return n},h.prototype.matching=function(n,o){var u=this._create();return u.__set_whitespace_patterns(n,o),u._update(),u},h.prototype._create=function(){return new h(this._input,this)},h.prototype.__split=function(n,o){n.lastIndex=0;for(var u=0,S=[],O=n.exec(o);O;)S.push(o.substring(u,O.index)),u=O.index+O[0].length,O=n.exec(o);return u<o.length?S.push(o.substring(u,o.length)):S.push(""),S},y.exports.WhitespacePattern=h},function(y){function i(v,f){this._input=v,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,f&&(this._starting_pattern=this._input.get_regexp(f._starting_pattern,!0),this._match_pattern=this._input.get_regexp(f._match_pattern,!0),this._until_pattern=this._input.get_regexp(f._until_pattern),this._until_after=f._until_after)}i.prototype.read=function(){var v=this._input.read(this._starting_pattern);return(!this._starting_pattern||v)&&(v+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),v},i.prototype.read_match=function(){return this._input.match(this._match_pattern)},i.prototype.until_after=function(v){var f=this._create();return f._until_after=!0,f._until_pattern=this._input.get_regexp(v),f._update(),f},i.prototype.until=function(v){var f=this._create();return f._until_after=!1,f._until_pattern=this._input.get_regexp(v),f._update(),f},i.prototype.starting_with=function(v){var f=this._create();return f._starting_pattern=this._input.get_regexp(v,!0),f._update(),f},i.prototype.matching=function(v){var f=this._create();return f._match_pattern=this._input.get_regexp(v,!0),f._update(),f},i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){},y.exports.Pattern=i},function(y){function i(v,f){v=typeof v=="string"?v:v.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(v+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(v+/\sbeautify\signore:end\s/.source+f,"g")}i.prototype.get_directives=function(v){if(!v.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(v);h;)f[h[1]]=h[2],h=this.__directive_pattern.exec(v);return f},i.prototype.readIgnored=function(v){return v.readUntilAfter(this.__directives_end_ignore_pattern)},y.exports.Directives=i},function(y,i,v){var f=v(12).Pattern,h={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function n(o,u){f.call(this,o,u),this.__template_pattern=null,this._disabled=Object.assign({},h),this._excluded=Object.assign({},h),u&&(this.__template_pattern=this._input.get_regexp(u.__template_pattern),this._excluded=Object.assign(this._excluded,u._excluded),this._disabled=Object.assign(this._disabled,u._disabled));var S=new f(o);this.__patterns={handlebars_comment:S.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:S.starting_with(/{{{/).until_after(/}}}/),handlebars:S.starting_with(/{{/).until_after(/}}/),php:S.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:S.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:S.starting_with(/{%/).until_after(/%}/),django_value:S.starting_with(/{{/).until_after(/}}/),django_comment:S.starting_with(/{#/).until_after(/#}/),smarty:S.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:S.starting_with(/{\*/).until_after(/\*}/),smarty_literal:S.starting_with(/{literal}/).until_after(/{\/literal}/)}}n.prototype=new f,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(o){var u=this._create();return u._disabled[o]=!0,u._update(),u},n.prototype.read_options=function(o){var u=this._create();for(var S in h)u._disabled[S]=o.templating.indexOf(S)===-1;return u._update(),u},n.prototype.exclude=function(o){var u=this._create();return u._excluded[o]=!0,u._update(),u},n.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var u=this._read_template();u;)this._match_pattern?u+=this._input.read(this._match_pattern):u+=this._input.readUntil(this.__template_pattern),o+=u,u=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},n.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},n.prototype._read_template=function(){var o="",u=this._input.peek();if(u==="<"){var S=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&S==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&S==="%"&&(o=o||this.__patterns.erb.read())}else u==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},y.exports.TemplatablePattern=n}],F={};function R(y){var i=F[y];if(i!==void 0)return i.exports;var v=F[y]={exports:{}};return P[y](v,v.exports,R),v.exports}var B=R(0);I=B})();var V=I;_=[],H=function(){return{js_beautify:V}}.apply(Re,_),H!==void 0&&(xt.exports=H)})()},15342:function(xt){(function(_,H){xt.exports=H()})(typeof self!="undefined"?self:this,function(){return function(Re){var _={};function H(I){if(_[I])return _[I].exports;var V=_[I]={i:I,l:!1,exports:{}};return Re[I].call(V.exports,V,V.exports,H),V.l=!0,V.exports}return H.m=Re,H.c=_,H.d=function(I,V,P){H.o(I,V)||Object.defineProperty(I,V,{enumerable:!0,get:P})},H.r=function(I){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(I,"__esModule",{value:!0})},H.t=function(I,V){if(V&1&&(I=H(I)),V&8||V&4&&typeof I=="object"&&I&&I.__esModule)return I;var P=Object.create(null);if(H.r(P),Object.defineProperty(P,"default",{enumerable:!0,value:I}),V&2&&typeof I!="string")for(var F in I)H.d(P,F,function(R){return I[R]}.bind(null,F));return P},H.n=function(I){var V=I&&I.__esModule?function(){return I.default}:function(){return I};return H.d(V,"a",V),V},H.o=function(I,V){return Object.prototype.hasOwnProperty.call(I,V)},H.p="",H(H.s=1)}([function(Re,_,H){},function(Re,_,H){"use strict";H.r(_);var I=H(0),V=function(){function Q(d,m,g){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=d,this.start=m,this.end=g}return Q.range=function(m,g){return g?!m||!m.loc||!g.loc||m.loc.lexer!==g.loc.lexer?null:new Q(m.loc.lexer,m.loc.start,g.loc.end):m&&m.loc},Q}(),P=function(){function Q(m,g){this.text=void 0,this.loc=void 0,this.text=m,this.loc=g}var d=Q.prototype;return d.range=function(g,w){return new Q(w,V.range(this,g))},Q}(),F=function Q(d,m){this.position=void 0;var g="KaTeX parse error: "+d,w,q=m&&m.loc;if(q&&q.start<=q.end){var X=q.lexer.input;w=q.start;var fe=q.end;w===X.length?g+=" at end of input: ":g+=" at position "+(w+1)+": ";var ve=X.slice(w,fe).replace(/[^]/g,"$&\u0332"),Ce;w>15?Ce="\u2026"+X.slice(w-15,w):Ce=X.slice(0,w);var Be;fe+15<X.length?Be=X.slice(fe,fe+15)+"\u2026":Be=X.slice(fe),g+=Ce+ve+Be}var Ve=new Error(g);return Ve.name="ParseError",Ve.__proto__=Q.prototype,Ve.position=w,Ve};F.prototype.__proto__=Error.prototype;var R=F,B=function(d,m){return d.indexOf(m)!==-1},y=function(d,m){return d===void 0?m:d},i=/([A-Z])/g,v=function(d){return d.replace(i,"-$1").toLowerCase()},f={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},h=/[&><"']/g;function n(Q){return String(Q).replace(h,function(d){return f[d]})}var o=function Q(d){return d.type==="ordgroup"||d.type==="color"?d.body.length===1?Q(d.body[0]):d:d.type==="font"?Q(d.body):d},u=function(d){var m=o(d);return m.type==="mathord"||m.type==="textord"||m.type==="atom"},S=function(d){if(!d)throw new Error("Expected non-null, but got "+String(d));return d},O=function(d){var m=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(d);return m!=null?m[1]:"_relative"},T={contains:B,deflt:y,escape:n,hyphenate:v,getBaseElem:o,isCharacterBox:u,protocolFromUrl:O},E=function(){function Q(m){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,m=m||{},this.displayMode=T.deflt(m.displayMode,!1),this.output=T.deflt(m.output,"htmlAndMathml"),this.leqno=T.deflt(m.leqno,!1),this.fleqn=T.deflt(m.fleqn,!1),this.throwOnError=T.deflt(m.throwOnError,!0),this.errorColor=T.deflt(m.errorColor,"#cc0000"),this.macros=m.macros||{},this.minRuleThickness=Math.max(0,T.deflt(m.minRuleThickness,0)),this.colorIsTextColor=T.deflt(m.colorIsTextColor,!1),this.strict=T.deflt(m.strict,"warn"),this.trust=T.deflt(m.trust,!1),this.maxSize=Math.max(0,T.deflt(m.maxSize,1/0)),this.maxExpand=Math.max(0,T.deflt(m.maxExpand,1e3))}var d=Q.prototype;return d.reportNonstrict=function(g,w,q){var X=this.strict;if(typeof X=="function"&&(X=X(g,w,q)),!(!X||X==="ignore")){if(X===!0||X==="error")throw new R("LaTeX-incompatible input and strict mode is set to 'error': "+(w+" ["+g+"]"),q);X==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(w+" ["+g+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+X+"': "+w+" ["+g+"]"))}},d.useStrictBehavior=function(g,w,q){var X=this.strict;if(typeof X=="function")try{X=X(g,w,q)}catch(fe){X="error"}return!X||X==="ignore"?!1:X===!0||X==="error"?!0:X==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(w+" ["+g+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+X+"': "+w+" ["+g+"]")),!1)},d.isTrusted=function(g){g.url&&!g.protocol&&(g.protocol=T.protocolFromUrl(g.url));var w=typeof this.trust=="function"?this.trust(g):this.trust;return!!w},Q}(),C=function(){function Q(m,g,w){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=m,this.size=g,this.cramped=w}var d=Q.prototype;return d.sup=function(){return _e[se[this.id]]},d.sub=function(){return _e[Y[this.id]]},d.fracNum=function(){return _e[ie[this.id]]},d.fracDen=function(){return _e[U[this.id]]},d.cramp=function(){return _e[Z[this.id]]},d.text=function(){return _e[K[this.id]]},d.isTight=function(){return this.size>=2},Q}(),j=0,x=1,L=2,N=3,z=4,te=5,J=6,ge=7,_e=[new C(j,0,!1),new C(x,0,!0),new C(L,1,!1),new C(N,1,!0),new C(z,2,!1),new C(te,2,!0),new C(J,3,!1),new C(ge,3,!0)],se=[z,te,z,te,J,ge,J,ge],Y=[te,te,te,te,ge,ge,ge,ge],ie=[L,N,z,te,J,ge,J,ge],U=[N,N,te,te,ge,ge,ge,ge],Z=[x,x,N,N,te,te,ge,ge],K=[j,x,L,N,L,N,L,N],k={DISPLAY:_e[j],TEXT:_e[L],SCRIPT:_e[z],SCRIPTSCRIPT:_e[J]},D=[{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 re(Q){for(var d=0;d<D.length;d++)for(var m=D[d],g=0;g<m.blocks.length;g++){var w=m.blocks[g];if(Q>=w[0]&&Q<=w[1])return m.name}return null}var pe=[];D.forEach(function(Q){return Q.blocks.forEach(function(d){return pe.push.apply(pe,d)})});function Oe(Q){for(var d=0;d<pe.length;d+=2)if(Q>=pe[d]&&Q<=pe[d+1])return!0;return!1}var $e=80,Ge=function(d,m){return"M95,"+(622+d+m)+`
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`+d/2.075+" -"+d+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+d)+`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+d)+" "+m+"h400000v"+(40+d)+"h-400000z"},ke=function(d,m){return"M263,"+(601+d+m)+`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`+d/2.084+" -"+d+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+d)+`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+d)+" "+m+"h400000v"+(40+d)+"h-400000z"},et=function(d,m){return"M983 "+(10+d+m)+`
l`+d/3.13+" -"+d+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+d)+`
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+d)+" "+m+"h400000v"+(40+d)+"h-400000z"},Ke=function(d,m){return"M424,"+(2398+d+m)+`
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`+d/4.223+" -"+d+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+d)+`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+d)+" "+m+`
h400000v`+(40+d)+"h-400000z"},tt=function(d,m){return"M473,"+(2713+d+m)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+d/5.298+" -"+d+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+d)+`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+d)+" "+m+"h400000v"+(40+d)+"H1017.7z"},It=function(d,m,g){var w=g-54-m-d;return"M702 "+(d+m)+"H400000"+(40+d)+`
H742v`+w+`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 `+m+"H400000v"+(40+d)+"H742z"},Yt=function(d,m,g){m=1e3*m;var w="";switch(d){case"sqrtMain":w=Ge(m,$e);break;case"sqrtSize1":w=ke(m,$e);break;case"sqrtSize2":w=et(m,$e);break;case"sqrtSize3":w=Ke(m,$e);break;case"sqrtSize4":w=tt(m,$e);break;case"sqrtTall":w=It(m,$e,g)}return w},qt={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`},Ot=function(){function Q(m){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=m,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var d=Q.prototype;return d.hasClass=function(g){return T.contains(this.classes,g)},d.toNode=function(){for(var g=document.createDocumentFragment(),w=0;w<this.children.length;w++)g.appendChild(this.children[w].toNode());return g},d.toMarkup=function(){for(var g="",w=0;w<this.children.length;w++)g+=this.children[w].toMarkup();return g},d.toText=function(){var g=function(q){return q.toText()};return this.children.map(g).join("")},Q}(),Ut=function(d){return d.filter(function(m){return m}).join(" ")},Ft=function(d,m,g){if(this.classes=d||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=g||{},m){m.style.isTight()&&this.classes.push("mtight");var w=m.getColor();w&&(this.style.color=w)}},Ie=function(d){var m=document.createElement(d);m.className=Ut(this.classes);for(var g in this.style)this.style.hasOwnProperty(g)&&(m.style[g]=this.style[g]);for(var w in this.attributes)this.attributes.hasOwnProperty(w)&&m.setAttribute(w,this.attributes[w]);for(var q=0;q<this.children.length;q++)m.appendChild(this.children[q].toNode());return m},Ze=function(d){var m="<"+d;this.classes.length&&(m+=' class="'+T.escape(Ut(this.classes))+'"');var g="";for(var w in this.style)this.style.hasOwnProperty(w)&&(g+=T.hyphenate(w)+":"+this.style[w]+";");g&&(m+=' style="'+T.escape(g)+'"');for(var q in this.attributes)this.attributes.hasOwnProperty(q)&&(m+=" "+q+'="'+T.escape(this.attributes[q])+'"');m+=">";for(var X=0;X<this.children.length;X++)m+=this.children[X].toMarkup();return m+="</"+d+">",m},Fe=function(){function Q(m,g,w,q){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,Ft.call(this,m,w,q),this.children=g||[]}var d=Q.prototype;return d.setAttribute=function(g,w){this.attributes[g]=w},d.hasClass=function(g){return T.contains(this.classes,g)},d.toNode=function(){return Ie.call(this,"span")},d.toMarkup=function(){return Ze.call(this,"span")},Q}(),it=function(){function Q(m,g,w,q){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,Ft.call(this,g,q),this.children=w||[],this.setAttribute("href",m)}var d=Q.prototype;return d.setAttribute=function(g,w){this.attributes[g]=w},d.hasClass=function(g){return T.contains(this.classes,g)},d.toNode=function(){return Ie.call(this,"a")},d.toMarkup=function(){return Ze.call(this,"a")},Q}(),nt=function(){function Q(m,g,w){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=g,this.src=m,this.classes=["mord"],this.style=w}var d=Q.prototype;return d.hasClass=function(g){return T.contains(this.classes,g)},d.toNode=function(){var g=document.createElement("img");g.src=this.src,g.alt=this.alt,g.className="mord";for(var w in this.style)this.style.hasOwnProperty(w)&&(g.style[w]=this.style[w]);return g},d.toMarkup=function(){var g="<img src='"+this.src+" 'alt='"+this.alt+"' ",w="";for(var q in this.style)this.style.hasOwnProperty(q)&&(w+=T.hyphenate(q)+":"+this.style[q]+";");return w&&(g+=' style="'+T.escape(w)+'"'),g+="'/>",g},Q}(),ue={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},ye=function(){function Q(m,g,w,q,X,fe,ve,Ce){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=m,this.height=g||0,this.depth=w||0,this.italic=q||0,this.skew=X||0,this.width=fe||0,this.classes=ve||[],this.style=Ce||{},this.maxFontSize=0;var Be=re(this.text.charCodeAt(0));Be&&this.classes.push(Be+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=ue[this.text])}var d=Q.prototype;return d.hasClass=function(g){return T.contains(this.classes,g)},d.toNode=function(){var g=document.createTextNode(this.text),w=null;this.italic>0&&(w=document.createElement("span"),w.style.marginRight=this.italic+"em"),this.classes.length>0&&(w=w||document.createElement("span"),w.className=Ut(this.classes));for(var q in this.style)this.style.hasOwnProperty(q)&&(w=w||document.createElement("span"),w.style[q]=this.style[q]);return w?(w.appendChild(g),w):g},d.toMarkup=function(){var g=!1,w="<span";this.classes.length&&(g=!0,w+=' class="',w+=T.escape(Ut(this.classes)),w+='"');var q="";this.italic>0&&(q+="margin-right:"+this.italic+"em;");for(var X in this.style)this.style.hasOwnProperty(X)&&(q+=T.hyphenate(X)+":"+this.style[X]+";");q&&(g=!0,w+=' style="'+T.escape(q)+'"');var fe=T.escape(this.text);return g?(w+=">",w+=fe,w+="</span>",w):fe},Q}(),Te=function(){function Q(m,g){this.children=void 0,this.attributes=void 0,this.children=m||[],this.attributes=g||{}}var d=Q.prototype;return d.toNode=function(){var g="http://www.w3.org/2000/svg",w=document.createElementNS(g,"svg");for(var q in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,q)&&w.setAttribute(q,this.attributes[q]);for(var X=0;X<this.children.length;X++)w.appendChild(this.children[X].toNode());return w},d.toMarkup=function(){var g="<svg";for(var w in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,w)&&(g+=" "+w+"='"+this.attributes[w]+"'");g+=">";for(var q=0;q<this.children.length;q++)g+=this.children[q].toMarkup();return g+="</svg>",g},Q}(),Ae=function(){function Q(m,g){this.pathName=void 0,this.alternate=void 0,this.pathName=m,this.alternate=g}var d=Q.prototype;return d.toNode=function(){var g="http://www.w3.org/2000/svg",w=document.createElementNS(g,"path");return this.alternate?w.setAttribute("d",this.alternate):w.setAttribute("d",qt[this.pathName]),w},d.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+qt[this.pathName]+"'/>"},Q}(),Me=function(){function Q(m){this.attributes=void 0,this.attributes=m||{}}var d=Q.prototype;return d.toNode=function(){var g="http://www.w3.org/2000/svg",w=document.createElementNS(g,"line");for(var q in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,q)&&w.setAttribute(q,this.attributes[q]);return w},d.toMarkup=function(){var g="<line";for(var w in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,w)&&(g+=" "+w+"='"+this.attributes[w]+"'");return g+="/>",g},Q}();function ze(Q){if(Q instanceof ye)return Q;throw new Error("Expected symbolNode but got "+String(Q)+".")}function qe(Q){if(Q instanceof Fe)return Q;throw new Error("Expected span<HtmlDomNode> but got "+String(Q)+".")}var rt={"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]}},Xe={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]},He={\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(Q,d){rt[Q]=d}function gt(Q,d,m){if(!rt[d])throw new Error("Font metrics not found for font: "+d+".");var g=Q.charCodeAt(0),w=rt[d][g];if(!w&&Q[0]in He&&(g=He[Q[0]].charCodeAt(0),w=rt[d][g]),!w&&m==="text"&&Oe(g)&&(w=rt[d][77]),w)return{depth:w[0],height:w[1],italic:w[2],skew:w[3],width:w[4]}}var ft={};function _t(Q){var d;if(Q>=5?d=0:Q>=3?d=1:d=2,!ft[d]){var m=ft[d]={cssEmPerMu:Xe.quad[d]/18};for(var g in Xe)Xe.hasOwnProperty(g)&&(m[g]=Xe[g][d])}return ft[d]}var wt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},mt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},kt={math:{},text:{}},bt=kt;function $(Q,d,m,g,w,q){kt[Q][w]={font:d,group:m,replace:g},q&&g&&(kt[Q][g]=kt[Q][w])}var G="math",Qe="text",ae="main",be="ams",Kt="accent-token",Ee="bin",Pe="close",Ne="inner",ce="mathord",de="op-token",we="open",Le="punct",ne="rel",dt="spacing",Se="textord";$(G,ae,ne,"\u2261","\\equiv",!0),$(G,ae,ne,"\u227A","\\prec",!0),$(G,ae,ne,"\u227B","\\succ",!0),$(G,ae,ne,"\u223C","\\sim",!0),$(G,ae,ne,"\u22A5","\\perp"),$(G,ae,ne,"\u2AAF","\\preceq",!0),$(G,ae,ne,"\u2AB0","\\succeq",!0),$(G,ae,ne,"\u2243","\\simeq",!0),$(G,ae,ne,"\u2223","\\mid",!0),$(G,ae,ne,"\u226A","\\ll",!0),$(G,ae,ne,"\u226B","\\gg",!0),$(G,ae,ne,"\u224D","\\asymp",!0),$(G,ae,ne,"\u2225","\\parallel"),$(G,ae,ne,"\u22C8","\\bowtie",!0),$(G,ae,ne,"\u2323","\\smile",!0),$(G,ae,ne,"\u2291","\\sqsubseteq",!0),$(G,ae,ne,"\u2292","\\sqsupseteq",!0),$(G,ae,ne,"\u2250","\\doteq",!0),$(G,ae,ne,"\u2322","\\frown",!0),$(G,ae,ne,"\u220B","\\ni",!0),$(G,ae,ne,"\u221D","\\propto",!0),$(G,ae,ne,"\u22A2","\\vdash",!0),$(G,ae,ne,"\u22A3","\\dashv",!0),$(G,ae,ne,"\u220B","\\owns"),$(G,ae,Le,".","\\ldotp"),$(G,ae,Le,"\u22C5","\\cdotp"),$(G,ae,Se,"#","\\#"),$(Qe,ae,Se,"#","\\#"),$(G,ae,Se,"&","\\&"),$(Qe,ae,Se,"&","\\&"),$(G,ae,Se,"\u2135","\\aleph",!0),$(G,ae,Se,"\u2200","\\forall",!0),$(G,ae,Se,"\u210F","\\hbar",!0),$(G,ae,Se,"\u2203","\\exists",!0),$(G,ae,Se,"\u2207","\\nabla",!0),$(G,ae,Se,"\u266D","\\flat",!0),$(G,ae,Se,"\u2113","\\ell",!0),$(G,ae,Se,"\u266E","\\natural",!0),$(G,ae,Se,"\u2663","\\clubsuit",!0),$(G,ae,Se,"\u2118","\\wp",!0),$(G,ae,Se,"\u266F","\\sharp",!0),$(G,ae,Se,"\u2662","\\diamondsuit",!0),$(G,ae,Se,"\u211C","\\Re",!0),$(G,ae,Se,"\u2661","\\heartsuit",!0),$(G,ae,Se,"\u2111","\\Im",!0),$(G,ae,Se,"\u2660","\\spadesuit",!0),$(Qe,ae,Se,"\xA7","\\S",!0),$(Qe,ae,Se,"\xB6","\\P",!0),$(G,ae,Se,"\u2020","\\dag"),$(Qe,ae,Se,"\u2020","\\dag"),$(Qe,ae,Se,"\u2020","\\textdagger"),$(G,ae,Se,"\u2021","\\ddag"),$(Qe,ae,Se,"\u2021","\\ddag"),$(Qe,ae,Se,"\u2021","\\textdaggerdbl"),$(G,ae,Pe,"\u23B1","\\rmoustache",!0),$(G,ae,we,"\u23B0","\\lmoustache",!0),$(G,ae,Pe,"\u27EF","\\rgroup",!0),$(G,ae,we,"\u27EE","\\lgroup",!0),$(G,ae,Ee,"\u2213","\\mp",!0),$(G,ae,Ee,"\u2296","\\ominus",!0),$(G,ae,Ee,"\u228E","\\uplus",!0),$(G,ae,Ee,"\u2293","\\sqcap",!0),$(G,ae,Ee,"\u2217","\\ast"),$(G,ae,Ee,"\u2294","\\sqcup",!0),$(G,ae,Ee,"\u25EF","\\bigcirc"),$(G,ae,Ee,"\u2219","\\bullet"),$(G,ae,Ee,"\u2021","\\ddagger"),$(G,ae,Ee,"\u2240","\\wr",!0),$(G,ae,Ee,"\u2A3F","\\amalg"),$(G,ae,Ee,"&","\\And"),$(G,ae,ne,"\u27F5","\\longleftarrow",!0),$(G,ae,ne,"\u21D0","\\Leftarrow",!0),$(G,ae,ne,"\u27F8","\\Longleftarrow",!0),$(G,ae,ne,"\u27F6","\\longrightarrow",!0),$(G,ae,ne,"\u21D2","\\Rightarrow",!0),$(G,ae,ne,"\u27F9","\\Longrightarrow",!0),$(G,ae,ne,"\u2194","\\leftrightarrow",!0),$(G,ae,ne,"\u27F7","\\longleftrightarrow",!0),$(G,ae,ne,"\u21D4","\\Leftrightarrow",!0),$(G,ae,ne,"\u27FA","\\Longleftrightarrow",!0),$(G,ae,ne,"\u21A6","\\mapsto",!0),$(G,ae,ne,"\u27FC","\\longmapsto",!0),$(G,ae,ne,"\u2197","\\nearrow",!0),$(G,ae,ne,"\u21A9","\\hookleftarrow",!0),$(G,ae,ne,"\u21AA","\\hookrightarrow",!0),$(G,ae,ne,"\u2198","\\searrow",!0),$(G,ae,ne,"\u21BC","\\leftharpoonup",!0),$(G,ae,ne,"\u21C0","\\rightharpoonup",!0),$(G,ae,ne,"\u2199","\\swarrow",!0),$(G,ae,ne,"\u21BD","\\leftharpoondown",!0),$(G,ae,ne,"\u21C1","\\rightharpoondown",!0),$(G,ae,ne,"\u2196","\\nwarrow",!0),$(G,ae,ne,"\u21CC","\\rightleftharpoons",!0),$(G,be,ne,"\u226E","\\nless",!0),$(G,be,ne,"\uE010","\\@nleqslant"),$(G,be,ne,"\uE011","\\@nleqq"),$(G,be,ne,"\u2A87","\\lneq",!0),$(G,be,ne,"\u2268","\\lneqq",!0),$(G,be,ne,"\uE00C","\\@lvertneqq"),$(G,be,ne,"\u22E6","\\lnsim",!0),$(G,be,ne,"\u2A89","\\lnapprox",!0),$(G,be,ne,"\u2280","\\nprec",!0),$(G,be,ne,"\u22E0","\\npreceq",!0),$(G,be,ne,"\u22E8","\\precnsim",!0),$(G,be,ne,"\u2AB9","\\precnapprox",!0),$(G,be,ne,"\u2241","\\nsim",!0),$(G,be,ne,"\uE006","\\@nshortmid"),$(G,be,ne,"\u2224","\\nmid",!0),$(G,be,ne,"\u22AC","\\nvdash",!0),$(G,be,ne,"\u22AD","\\nvDash",!0),$(G,be,ne,"\u22EA","\\ntriangleleft"),$(G,be,ne,"\u22EC","\\ntrianglelefteq",!0),$(G,be,ne,"\u228A","\\subsetneq",!0),$(G,be,ne,"\uE01A","\\@varsubsetneq"),$(G,be,ne,"\u2ACB","\\subsetneqq",!0),$(G,be,ne,"\uE017","\\@varsubsetneqq"),$(G,be,ne,"\u226F","\\ngtr",!0),$(G,be,ne,"\uE00F","\\@ngeqslant"),$(G,be,ne,"\uE00E","\\@ngeqq"),$(G,be,ne,"\u2A88","\\gneq",!0),$(G,be,ne,"\u2269","\\gneqq",!0),$(G,be,ne,"\uE00D","\\@gvertneqq"),$(G,be,ne,"\u22E7","\\gnsim",!0),$(G,be,ne,"\u2A8A","\\gnapprox",!0),$(G,be,ne,"\u2281","\\nsucc",!0),$(G,be,ne,"\u22E1","\\nsucceq",!0),$(G,be,ne,"\u22E9","\\succnsim",!0),$(G,be,ne,"\u2ABA","\\succnapprox",!0),$(G,be,ne,"\u2246","\\ncong",!0),$(G,be,ne,"\uE007","\\@nshortparallel"),$(G,be,ne,"\u2226","\\nparallel",!0),$(G,be,ne,"\u22AF","\\nVDash",!0),$(G,be,ne,"\u22EB","\\ntriangleright"),$(G,be,ne,"\u22ED","\\ntrianglerighteq",!0),$(G,be,ne,"\uE018","\\@nsupseteqq"),$(G,be,ne,"\u228B","\\supsetneq",!0),$(G,be,ne,"\uE01B","\\@varsupsetneq"),$(G,be,ne,"\u2ACC","\\supsetneqq",!0),$(G,be,ne,"\uE019","\\@varsupsetneqq"),$(G,be,ne,"\u22AE","\\nVdash",!0),$(G,be,ne,"\u2AB5","\\precneqq",!0),$(G,be,ne,"\u2AB6","\\succneqq",!0),$(G,be,ne,"\uE016","\\@nsubseteqq"),$(G,be,Ee,"\u22B4","\\unlhd"),$(G,be,Ee,"\u22B5","\\unrhd"),$(G,be,ne,"\u219A","\\nleftarrow",!0),$(G,be,ne,"\u219B","\\nrightarrow",!0),$(G,be,ne,"\u21CD","\\nLeftarrow",!0),$(G,be,ne,"\u21CF","\\nRightarrow",!0),$(G,be,ne,"\u21AE","\\nleftrightarrow",!0),$(G,be,ne,"\u21CE","\\nLeftrightarrow",!0),$(G,be,ne,"\u25B3","\\vartriangle"),$(G,be,Se,"\u210F","\\hslash"),$(G,be,Se,"\u25BD","\\triangledown"),$(G,be,Se,"\u25CA","\\lozenge"),$(G,be,Se,"\u24C8","\\circledS"),$(G,be,Se,"\xAE","\\circledR"),$(Qe,be,Se,"\xAE","\\circledR"),$(G,be,Se,"\u2221","\\measuredangle",!0),$(G,be,Se,"\u2204","\\nexists"),$(G,be,Se,"\u2127","\\mho"),$(G,be,Se,"\u2132","\\Finv",!0),$(G,be,Se,"\u2141","\\Game",!0),$(G,be,Se,"\u2035","\\backprime"),$(G,be,Se,"\u25B2","\\blacktriangle"),$(G,be,Se,"\u25BC","\\blacktriangledown"),$(G,be,Se,"\u25A0","\\blacksquare"),$(G,be,Se,"\u29EB","\\blacklozenge"),$(G,be,Se,"\u2605","\\bigstar"),$(G,be,Se,"\u2222","\\sphericalangle",!0),$(G,be,Se,"\u2201","\\complement",!0),$(G,be,Se,"\xF0","\\eth",!0),$(G,be,Se,"\u2571","\\diagup"),$(G,be,Se,"\u2572","\\diagdown"),$(G,be,Se,"\u25A1","\\square"),$(G,be,Se,"\u25A1","\\Box"),$(G,be,Se,"\u25CA","\\Diamond"),$(G,be,Se,"\xA5","\\yen",!0),$(Qe,be,Se,"\xA5","\\yen",!0),$(G,be,Se,"\u2713","\\checkmark",!0),$(Qe,be,Se,"\u2713","\\checkmark"),$(G,be,Se,"\u2136","\\beth",!0),$(G,be,Se,"\u2138","\\daleth",!0),$(G,be,Se,"\u2137","\\gimel",!0),$(G,be,Se,"\u03DD","\\digamma",!0),$(G,be,Se,"\u03F0","\\varkappa"),$(G,be,we,"\u250C","\\ulcorner",!0),$(G,be,Pe,"\u2510","\\urcorner",!0),$(G,be,we,"\u2514","\\llcorner",!0),$(G,be,Pe,"\u2518","\\lrcorner",!0),$(G,be,ne,"\u2266","\\leqq",!0),$(G,be,ne,"\u2A7D","\\leqslant",!0),$(G,be,ne,"\u2A95","\\eqslantless",!0),$(G,be,ne,"\u2272","\\lesssim",!0),$(G,be,ne,"\u2A85","\\lessapprox",!0),$(G,be,ne,"\u224A","\\approxeq",!0),$(G,be,Ee,"\u22D6","\\lessdot"),$(G,be,ne,"\u22D8","\\lll",!0),$(G,be,ne,"\u2276","\\lessgtr",!0),$(G,be,ne,"\u22DA","\\lesseqgtr",!0),$(G,be,ne,"\u2A8B","\\lesseqqgtr",!0),$(G,be,ne,"\u2251","\\doteqdot"),$(G,be,ne,"\u2253","\\risingdotseq",!0),$(G,be,ne,"\u2252","\\fallingdotseq",!0),$(G,be,ne,"\u223D","\\backsim",!0),$(G,be,ne,"\u22CD","\\backsimeq",!0),$(G,be,ne,"\u2AC5","\\subseteqq",!0),$(G,be,ne,"\u22D0","\\Subset",!0),$(G,be,ne,"\u228F","\\sqsubset",!0),$(G,be,ne,"\u227C","\\preccurlyeq",!0),$(G,be,ne,"\u22DE","\\curlyeqprec",!0),$(G,be,ne,"\u227E","\\precsim",!0),$(G,be,ne,"\u2AB7","\\precapprox",!0),$(G,be,ne,"\u22B2","\\vartriangleleft"),$(G,be,ne,"\u22B4","\\trianglelefteq"),$(G,be,ne,"\u22A8","\\vDash",!0),$(G,be,ne,"\u22AA","\\Vvdash",!0),$(G,be,ne,"\u2323","\\smallsmile"),$(G,be,ne,"\u2322","\\smallfrown"),$(G,be,ne,"\u224F","\\bumpeq",!0),$(G,be,ne,"\u224E","\\Bumpeq",!0),$(G,be,ne,"\u2267","\\geqq",!0),$(G,be,ne,"\u2A7E","\\geqslant",!0),$(G,be,ne,"\u2A96","\\eqslantgtr",!0),$(G,be,ne,"\u2273","\\gtrsim",!0),$(G,be,ne,"\u2A86","\\gtrapprox",!0),$(G,be,Ee,"\u22D7","\\gtrdot"),$(G,be,ne,"\u22D9","\\ggg",!0),$(G,be,ne,"\u2277","\\gtrless",!0),$(G,be,ne,"\u22DB","\\gtreqless",!0),$(G,be,ne,"\u2A8C","\\gtreqqless",!0),$(G,be,ne,"\u2256","\\eqcirc",!0),$(G,be,ne,"\u2257","\\circeq",!0),$(G,be,ne,"\u225C","\\triangleq",!0),$(G,be,ne,"\u223C","\\thicksim"),$(G,be,ne,"\u2248","\\thickapprox"),$(G,be,ne,"\u2AC6","\\supseteqq",!0),$(G,be,ne,"\u22D1","\\Supset",!0),$(G,be,ne,"\u2290","\\sqsupset",!0),$(G,be,ne,"\u227D","\\succcurlyeq",!0),$(G,be,ne,"\u22DF","\\curlyeqsucc",!0),$(G,be,ne,"\u227F","\\succsim",!0),$(G,be,ne,"\u2AB8","\\succapprox",!0),$(G,be,ne,"\u22B3","\\vartriangleright"),$(G,be,ne,"\u22B5","\\trianglerighteq"),$(G,be,ne,"\u22A9","\\Vdash",!0),$(G,be,ne,"\u2223","\\shortmid"),$(G,be,ne,"\u2225","\\shortparallel"),$(G,be,ne,"\u226C","\\between",!0),$(G,be,ne,"\u22D4","\\pitchfork",!0),$(G,be,ne,"\u221D","\\varpropto"),$(G,be,ne,"\u25C0","\\blacktriangleleft"),$(G,be,ne,"\u2234","\\therefore",!0),$(G,be,ne,"\u220D","\\backepsilon"),$(G,be,ne,"\u25B6","\\blacktriangleright"),$(G,be,ne,"\u2235","\\because",!0),$(G,be,ne,"\u22D8","\\llless"),$(G,be,ne,"\u22D9","\\gggtr"),$(G,be,Ee,"\u22B2","\\lhd"),$(G,be,Ee,"\u22B3","\\rhd"),$(G,be,ne,"\u2242","\\eqsim",!0),$(G,ae,ne,"\u22C8","\\Join"),$(G,be,ne,"\u2251","\\Doteq",!0),$(G,be,Ee,"\u2214","\\dotplus",!0),$(G,be,Ee,"\u2216","\\smallsetminus"),$(G,be,Ee,"\u22D2","\\Cap",!0),$(G,be,Ee,"\u22D3","\\Cup",!0),$(G,be,Ee,"\u2A5E","\\doublebarwedge",!0),$(G,be,Ee,"\u229F","\\boxminus",!0),$(G,be,Ee,"\u229E","\\boxplus",!0),$(G,be,Ee,"\u22C7","\\divideontimes",!0),$(G,be,Ee,"\u22C9","\\ltimes",!0),$(G,be,Ee,"\u22CA","\\rtimes",!0),$(G,be,Ee,"\u22CB","\\leftthreetimes",!0),$(G,be,Ee,"\u22CC","\\rightthreetimes",!0),$(G,be,Ee,"\u22CF","\\curlywedge",!0),$(G,be,Ee,"\u22CE","\\curlyvee",!0),$(G,be,Ee,"\u229D","\\circleddash",!0),$(G,be,Ee,"\u229B","\\circledast",!0),$(G,be,Ee,"\u22C5","\\centerdot"),$(G,be,Ee,"\u22BA","\\intercal",!0),$(G,be,Ee,"\u22D2","\\doublecap"),$(G,be,Ee,"\u22D3","\\doublecup"),$(G,be,Ee,"\u22A0","\\boxtimes",!0),$(G,be,ne,"\u21E2","\\dashrightarrow",!0),$(G,be,ne,"\u21E0","\\dashleftarrow",!0),$(G,be,ne,"\u21C7","\\leftleftarrows",!0),$(G,be,ne,"\u21C6","\\leftrightarrows",!0),$(G,be,ne,"\u21DA","\\Lleftarrow",!0),$(G,be,ne,"\u219E","\\twoheadleftarrow",!0),$(G,be,ne,"\u21A2","\\leftarrowtail",!0),$(G,be,ne,"\u21AB","\\looparrowleft",!0),$(G,be,ne,"\u21CB","\\leftrightharpoons",!0),$(G,be,ne,"\u21B6","\\curvearrowleft",!0),$(G,be,ne,"\u21BA","\\circlearrowleft",!0),$(G,be,ne,"\u21B0","\\Lsh",!0),$(G,be,ne,"\u21C8","\\upuparrows",!0),$(G,be,ne,"\u21BF","\\upharpoonleft",!0),$(G,be,ne,"\u21C3","\\downharpoonleft",!0),$(G,be,ne,"\u22B8","\\multimap",!0),$(G,be,ne,"\u21AD","\\leftrightsquigarrow",!0),$(G,be,ne,"\u21C9","\\rightrightarrows",!0),$(G,be,ne,"\u21C4","\\rightleftarrows",!0),$(G,be,ne,"\u21A0","\\twoheadrightarrow",!0),$(G,be,ne,"\u21A3","\\rightarrowtail",!0),$(G,be,ne,"\u21AC","\\looparrowright",!0),$(G,be,ne,"\u21B7","\\curvearrowright",!0),$(G,be,ne,"\u21BB","\\circlearrowright",!0),$(G,be,ne,"\u21B1","\\Rsh",!0),$(G,be,ne,"\u21CA","\\downdownarrows",!0),$(G,be,ne,"\u21BE","\\upharpoonright",!0),$(G,be,ne,"\u21C2","\\downharpoonright",!0),$(G,be,ne,"\u21DD","\\rightsquigarrow",!0),$(G,be,ne,"\u21DD","\\leadsto"),$(G,be,ne,"\u21DB","\\Rrightarrow",!0),$(G,be,ne,"\u21BE","\\restriction"),$(G,ae,Se,"\u2018","`"),$(G,ae,Se,"$","\\$"),$(Qe,ae,Se,"$","\\$"),$(Qe,ae,Se,"$","\\textdollar"),$(G,ae,Se,"%","\\%"),$(Qe,ae,Se,"%","\\%"),$(G,ae,Se,"_","\\_"),$(Qe,ae,Se,"_","\\_"),$(Qe,ae,Se,"_","\\textunderscore"),$(G,ae,Se,"\u2220","\\angle",!0),$(G,ae,Se,"\u221E","\\infty",!0),$(G,ae,Se,"\u2032","\\prime"),$(G,ae,Se,"\u25B3","\\triangle"),$(G,ae,Se,"\u0393","\\Gamma",!0),$(G,ae,Se,"\u0394","\\Delta",!0),$(G,ae,Se,"\u0398","\\Theta",!0),$(G,ae,Se,"\u039B","\\Lambda",!0),$(G,ae,Se,"\u039E","\\Xi",!0),$(G,ae,Se,"\u03A0","\\Pi",!0),$(G,ae,Se,"\u03A3","\\Sigma",!0),$(G,ae,Se,"\u03A5","\\Upsilon",!0),$(G,ae,Se,"\u03A6","\\Phi",!0),$(G,ae,Se,"\u03A8","\\Psi",!0),$(G,ae,Se,"\u03A9","\\Omega",!0),$(G,ae,Se,"A","\u0391"),$(G,ae,Se,"B","\u0392"),$(G,ae,Se,"E","\u0395"),$(G,ae,Se,"Z","\u0396"),$(G,ae,Se,"H","\u0397"),$(G,ae,Se,"I","\u0399"),$(G,ae,Se,"K","\u039A"),$(G,ae,Se,"M","\u039C"),$(G,ae,Se,"N","\u039D"),$(G,ae,Se,"O","\u039F"),$(G,ae,Se,"P","\u03A1"),$(G,ae,Se,"T","\u03A4"),$(G,ae,Se,"X","\u03A7"),$(G,ae,Se,"\xAC","\\neg",!0),$(G,ae,Se,"\xAC","\\lnot"),$(G,ae,Se,"\u22A4","\\top"),$(G,ae,Se,"\u22A5","\\bot"),$(G,ae,Se,"\u2205","\\emptyset"),$(G,be,Se,"\u2205","\\varnothing"),$(G,ae,ce,"\u03B1","\\alpha",!0),$(G,ae,ce,"\u03B2","\\beta",!0),$(G,ae,ce,"\u03B3","\\gamma",!0),$(G,ae,ce,"\u03B4","\\delta",!0),$(G,ae,ce,"\u03F5","\\epsilon",!0),$(G,ae,ce,"\u03B6","\\zeta",!0),$(G,ae,ce,"\u03B7","\\eta",!0),$(G,ae,ce,"\u03B8","\\theta",!0),$(G,ae,ce,"\u03B9","\\iota",!0),$(G,ae,ce,"\u03BA","\\kappa",!0),$(G,ae,ce,"\u03BB","\\lambda",!0),$(G,ae,ce,"\u03BC","\\mu",!0),$(G,ae,ce,"\u03BD","\\nu",!0),$(G,ae,ce,"\u03BE","\\xi",!0),$(G,ae,ce,"\u03BF","\\omicron",!0),$(G,ae,ce,"\u03C0","\\pi",!0),$(G,ae,ce,"\u03C1","\\rho",!0),$(G,ae,ce,"\u03C3","\\sigma",!0),$(G,ae,ce,"\u03C4","\\tau",!0),$(G,ae,ce,"\u03C5","\\upsilon",!0),$(G,ae,ce,"\u03D5","\\phi",!0),$(G,ae,ce,"\u03C7","\\chi",!0),$(G,ae,ce,"\u03C8","\\psi",!0),$(G,ae,ce,"\u03C9","\\omega",!0),$(G,ae,ce,"\u03B5","\\varepsilon",!0),$(G,ae,ce,"\u03D1","\\vartheta",!0),$(G,ae,ce,"\u03D6","\\varpi",!0),$(G,ae,ce,"\u03F1","\\varrho",!0),$(G,ae,ce,"\u03C2","\\varsigma",!0),$(G,ae,ce,"\u03C6","\\varphi",!0),$(G,ae,Ee,"\u2217","*"),$(G,ae,Ee,"+","+"),$(G,ae,Ee,"\u2212","-"),$(G,ae,Ee,"\u22C5","\\cdot",!0),$(G,ae,Ee,"\u2218","\\circ"),$(G,ae,Ee,"\xF7","\\div",!0),$(G,ae,Ee,"\xB1","\\pm",!0),$(G,ae,Ee,"\xD7","\\times",!0),$(G,ae,Ee,"\u2229","\\cap",!0),$(G,ae,Ee,"\u222A","\\cup",!0),$(G,ae,Ee,"\u2216","\\setminus"),$(G,ae,Ee,"\u2227","\\land"),$(G,ae,Ee,"\u2228","\\lor"),$(G,ae,Ee,"\u2227","\\wedge",!0),$(G,ae,Ee,"\u2228","\\vee",!0),$(G,ae,Se,"\u221A","\\surd"),$(G,ae,we,"(","("),$(G,ae,we,"[","["),$(G,ae,we,"\u27E8","\\langle",!0),$(G,ae,we,"\u2223","\\lvert"),$(G,ae,we,"\u2225","\\lVert"),$(G,ae,Pe,")",")"),$(G,ae,Pe,"]","]"),$(G,ae,Pe,"?","?"),$(G,ae,Pe,"!","!"),$(G,ae,Pe,"\u27E9","\\rangle",!0),$(G,ae,Pe,"\u2223","\\rvert"),$(G,ae,Pe,"\u2225","\\rVert"),$(G,ae,ne,"=","="),$(G,ae,ne,"<","<"),$(G,ae,ne,">",">"),$(G,ae,ne,":",":"),$(G,ae,ne,"\u2248","\\approx",!0),$(G,ae,ne,"\u2245","\\cong",!0),$(G,ae,ne,"\u2265","\\ge"),$(G,ae,ne,"\u2265","\\geq",!0),$(G,ae,ne,"\u2190","\\gets"),$(G,ae,ne,">","\\gt"),$(G,ae,ne,"\u2208","\\in",!0),$(G,ae,ne,"\uE020","\\@not"),$(G,ae,ne,"\u2282","\\subset",!0),$(G,ae,ne,"\u2283","\\supset",!0),$(G,ae,ne,"\u2286","\\subseteq",!0),$(G,ae,ne,"\u2287","\\supseteq",!0),$(G,be,ne,"\u2288","\\nsubseteq",!0),$(G,be,ne,"\u2289","\\nsupseteq",!0),$(G,ae,ne,"\u22A8","\\models"),$(G,ae,ne,"\u2190","\\leftarrow",!0),$(G,ae,ne,"\u2264","\\le"),$(G,ae,ne,"\u2264","\\leq",!0),$(G,ae,ne,"<","\\lt"),$(G,ae,ne,"\u2192","\\rightarrow",!0),$(G,ae,ne,"\u2192","\\to"),$(G,be,ne,"\u2271","\\ngeq",!0),$(G,be,ne,"\u2270","\\nleq",!0),$(G,ae,dt,"\xA0","\\ "),$(G,ae,dt,"\xA0","~"),$(G,ae,dt,"\xA0","\\space"),$(G,ae,dt,"\xA0","\\nobreakspace"),$(Qe,ae,dt,"\xA0","\\ "),$(Qe,ae,dt,"\xA0","~"),$(Qe,ae,dt,"\xA0","\\space"),$(Qe,ae,dt,"\xA0","\\nobreakspace"),$(G,ae,dt,null,"\\nobreak"),$(G,ae,dt,null,"\\allowbreak"),$(G,ae,Le,",",","),$(G,ae,Le,";",";"),$(G,be,Ee,"\u22BC","\\barwedge",!0),$(G,be,Ee,"\u22BB","\\veebar",!0),$(G,ae,Ee,"\u2299","\\odot",!0),$(G,ae,Ee,"\u2295","\\oplus",!0),$(G,ae,Ee,"\u2297","\\otimes",!0),$(G,ae,Se,"\u2202","\\partial",!0),$(G,ae,Ee,"\u2298","\\oslash",!0),$(G,be,Ee,"\u229A","\\circledcirc",!0),$(G,be,Ee,"\u22A1","\\boxdot",!0),$(G,ae,Ee,"\u25B3","\\bigtriangleup"),$(G,ae,Ee,"\u25BD","\\bigtriangledown"),$(G,ae,Ee,"\u2020","\\dagger"),$(G,ae,Ee,"\u22C4","\\diamond"),$(G,ae,Ee,"\u22C6","\\star"),$(G,ae,Ee,"\u25C3","\\triangleleft"),$(G,ae,Ee,"\u25B9","\\triangleright"),$(G,ae,we,"{","\\{"),$(Qe,ae,Se,"{","\\{"),$(Qe,ae,Se,"{","\\textbraceleft"),$(G,ae,Pe,"}","\\}"),$(Qe,ae,Se,"}","\\}"),$(Qe,ae,Se,"}","\\textbraceright"),$(G,ae,we,"{","\\lbrace"),$(G,ae,Pe,"}","\\rbrace"),$(G,ae,we,"[","\\lbrack"),$(Qe,ae,Se,"[","\\lbrack"),$(G,ae,Pe,"]","\\rbrack"),$(Qe,ae,Se,"]","\\rbrack"),$(G,ae,we,"(","\\lparen"),$(G,ae,Pe,")","\\rparen"),$(Qe,ae,Se,"<","\\textless"),$(Qe,ae,Se,">","\\textgreater"),$(G,ae,we,"\u230A","\\lfloor",!0),$(G,ae,Pe,"\u230B","\\rfloor",!0),$(G,ae,we,"\u2308","\\lceil",!0),$(G,ae,Pe,"\u2309","\\rceil",!0),$(G,ae,Se,"\\","\\backslash"),$(G,ae,Se,"\u2223","|"),$(G,ae,Se,"\u2223","\\vert"),$(Qe,ae,Se,"|","\\textbar"),$(G,ae,Se,"\u2225","\\|"),$(G,ae,Se,"\u2225","\\Vert"),$(Qe,ae,Se,"\u2225","\\textbardbl"),$(Qe,ae,Se,"~","\\textasciitilde"),$(Qe,ae,Se,"\\","\\textbackslash"),$(Qe,ae,Se,"^","\\textasciicircum"),$(G,ae,ne,"\u2191","\\uparrow",!0),$(G,ae,ne,"\u21D1","\\Uparrow",!0),$(G,ae,ne,"\u2193","\\downarrow",!0),$(G,ae,ne,"\u21D3","\\Downarrow",!0),$(G,ae,ne,"\u2195","\\updownarrow",!0),$(G,ae,ne,"\u21D5","\\Updownarrow",!0),$(G,ae,de,"\u2210","\\coprod"),$(G,ae,de,"\u22C1","\\bigvee"),$(G,ae,de,"\u22C0","\\bigwedge"),$(G,ae,de,"\u2A04","\\biguplus"),$(G,ae,de,"\u22C2","\\bigcap"),$(G,ae,de,"\u22C3","\\bigcup"),$(G,ae,de,"\u222B","\\int"),$(G,ae,de,"\u222B","\\intop"),$(G,ae,de,"\u222C","\\iint"),$(G,ae,de,"\u222D","\\iiint"),$(G,ae,de,"\u220F","\\prod"),$(G,ae,de,"\u2211","\\sum"),$(G,ae,de,"\u2A02","\\bigotimes"),$(G,ae,de,"\u2A01","\\bigoplus"),$(G,ae,de,"\u2A00","\\bigodot"),$(G,ae,de,"\u222E","\\oint"),$(G,ae,de,"\u222F","\\oiint"),$(G,ae,de,"\u2230","\\oiiint"),$(G,ae,de,"\u2A06","\\bigsqcup"),$(G,ae,de,"\u222B","\\smallint"),$(Qe,ae,Ne,"\u2026","\\textellipsis"),$(G,ae,Ne,"\u2026","\\mathellipsis"),$(Qe,ae,Ne,"\u2026","\\ldots",!0),$(G,ae,Ne,"\u2026","\\ldots",!0),$(G,ae,Ne,"\u22EF","\\@cdots",!0),$(G,ae,Ne,"\u22F1","\\ddots",!0),$(G,ae,Se,"\u22EE","\\varvdots"),$(G,ae,Kt,"\u02CA","\\acute"),$(G,ae,Kt,"\u02CB","\\grave"),$(G,ae,Kt,"\xA8","\\ddot"),$(G,ae,Kt,"~","\\tilde"),$(G,ae,Kt,"\u02C9","\\bar"),$(G,ae,Kt,"\u02D8","\\breve"),$(G,ae,Kt,"\u02C7","\\check"),$(G,ae,Kt,"^","\\hat"),$(G,ae,Kt,"\u20D7","\\vec"),$(G,ae,Kt,"\u02D9","\\dot"),$(G,ae,Kt,"\u02DA","\\mathring"),$(G,ae,ce,"\u0131","\\imath",!0),$(G,ae,ce,"\u0237","\\jmath",!0),$(Qe,ae,Se,"\u0131","\\i",!0),$(Qe,ae,Se,"\u0237","\\j",!0),$(Qe,ae,Se,"\xDF","\\ss",!0),$(Qe,ae,Se,"\xE6","\\ae",!0),$(Qe,ae,Se,"\xE6","\\ae",!0),$(Qe,ae,Se,"\u0153","\\oe",!0),$(Qe,ae,Se,"\xF8","\\o",!0),$(Qe,ae,Se,"\xC6","\\AE",!0),$(Qe,ae,Se,"\u0152","\\OE",!0),$(Qe,ae,Se,"\xD8","\\O",!0),$(Qe,ae,Kt,"\u02CA","\\'"),$(Qe,ae,Kt,"\u02CB","\\`"),$(Qe,ae,Kt,"\u02C6","\\^"),$(Qe,ae,Kt,"\u02DC","\\~"),$(Qe,ae,Kt,"\u02C9","\\="),$(Qe,ae,Kt,"\u02D8","\\u"),$(Qe,ae,Kt,"\u02D9","\\."),$(Qe,ae,Kt,"\u02DA","\\r"),$(Qe,ae,Kt,"\u02C7","\\v"),$(Qe,ae,Kt,"\xA8",'\\"'),$(Qe,ae,Kt,"\u02DD","\\H"),$(Qe,ae,Kt,"\u25EF","\\textcircled");var Dt={"--":!0,"---":!0,"``":!0,"''":!0};$(Qe,ae,Se,"\u2013","--"),$(Qe,ae,Se,"\u2013","\\textendash"),$(Qe,ae,Se,"\u2014","---"),$(Qe,ae,Se,"\u2014","\\textemdash"),$(Qe,ae,Se,"\u2018","`"),$(Qe,ae,Se,"\u2018","\\textquoteleft"),$(Qe,ae,Se,"\u2019","'"),$(Qe,ae,Se,"\u2019","\\textquoteright"),$(Qe,ae,Se,"\u201C","``"),$(Qe,ae,Se,"\u201C","\\textquotedblleft"),$(Qe,ae,Se,"\u201D","''"),$(Qe,ae,Se,"\u201D","\\textquotedblright"),$(G,ae,Se,"\xB0","\\degree",!0),$(Qe,ae,Se,"\xB0","\\degree"),$(Qe,ae,Se,"\xB0","\\textdegree",!0),$(G,ae,ce,"\xA3","\\pounds"),$(G,ae,ce,"\xA3","\\mathsterling",!0),$(Qe,ae,ce,"\xA3","\\pounds"),$(Qe,ae,ce,"\xA3","\\textsterling",!0),$(G,be,Se,"\u2720","\\maltese"),$(Qe,be,Se,"\u2720","\\maltese"),$(Qe,ae,dt,"\xA0","\\ "),$(Qe,ae,dt,"\xA0"," "),$(Qe,ae,dt,"\xA0","~");for(var Pt='0123456789/@."',Ht=0;Ht<Pt.length;Ht++){var sr=Pt.charAt(Ht);$(G,ae,Se,sr,sr)}for(var St='0123456789!@*()-=+[]<>|";:?/.,',Et=0;Et<St.length;Et++){var ur=St.charAt(Et);$(Qe,ae,Se,ur,ur)}for(var Rr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",$r=0;$r<Rr.length;$r++){var zr=Rr.charAt($r);$(G,ae,ce,zr,zr),$(Qe,ae,Se,zr,zr)}$(G,be,Se,"C","\u2102"),$(Qe,be,Se,"C","\u2102"),$(G,be,Se,"H","\u210D"),$(Qe,be,Se,"H","\u210D"),$(G,be,Se,"N","\u2115"),$(Qe,be,Se,"N","\u2115"),$(G,be,Se,"P","\u2119"),$(Qe,be,Se,"P","\u2119"),$(G,be,Se,"Q","\u211A"),$(Qe,be,Se,"Q","\u211A"),$(G,be,Se,"R","\u211D"),$(Qe,be,Se,"R","\u211D"),$(G,be,Se,"Z","\u2124"),$(Qe,be,Se,"Z","\u2124"),$(G,ae,ce,"h","\u210E"),$(Qe,ae,ce,"h","\u210E");for(var Rt="",Zt=0;Zt<Rr.length;Zt++){var _r=Rr.charAt(Zt);Rt=String.fromCharCode(55349,56320+Zt),$(G,ae,ce,_r,Rt),$(Qe,ae,Se,_r,Rt),Rt=String.fromCharCode(55349,56372+Zt),$(G,ae,ce,_r,Rt),$(Qe,ae,Se,_r,Rt),Rt=String.fromCharCode(55349,56424+Zt),$(G,ae,ce,_r,Rt),$(Qe,ae,Se,_r,Rt),Rt=String.fromCharCode(55349,56580+Zt),$(G,ae,ce,_r,Rt),$(Qe,ae,Se,_r,Rt),Rt=String.fromCharCode(55349,56736+Zt),$(G,ae,ce,_r,Rt),$(Qe,ae,Se,_r,Rt),Rt=String.fromCharCode(55349,56788+Zt),$(G,ae,ce,_r,Rt),$(Qe,ae,Se,_r,Rt),Rt=String.fromCharCode(55349,56840+Zt),$(G,ae,ce,_r,Rt),$(Qe,ae,Se,_r,Rt),Rt=String.fromCharCode(55349,56944+Zt),$(G,ae,ce,_r,Rt),$(Qe,ae,Se,_r,Rt),Zt<26&&(Rt=String.fromCharCode(55349,56632+Zt),$(G,ae,ce,_r,Rt),$(Qe,ae,Se,_r,Rt),Rt=String.fromCharCode(55349,56476+Zt),$(G,ae,ce,_r,Rt),$(Qe,ae,Se,_r,Rt))}Rt="\u{1D55C}",$(G,ae,ce,"k",Rt),$(Qe,ae,Se,"k",Rt);for(var jr=0;jr<10;jr++){var Or=jr.toString();Rt=String.fromCharCode(55349,57294+jr),$(G,ae,ce,Or,Rt),$(Qe,ae,Se,Or,Rt),Rt=String.fromCharCode(55349,57314+jr),$(G,ae,ce,Or,Rt),$(Qe,ae,Se,Or,Rt),Rt=String.fromCharCode(55349,57324+jr),$(G,ae,ce,Or,Rt),$(Qe,ae,Se,Or,Rt),Rt=String.fromCharCode(55349,57334+jr),$(G,ae,ce,Or,Rt),$(Qe,ae,Se,Or,Rt)}for(var ti="\xC7\xD0\xDE\xE7\xFE",cr=0;cr<ti.length;cr++){var xi=ti.charAt(cr);$(G,ae,ce,xi,xi),$(Qe,ae,Se,xi,xi)}$(Qe,ae,Se,"\xF0","\xF0"),$(Qe,ae,Se,"\u2013","\u2013"),$(Qe,ae,Se,"\u2014","\u2014"),$(Qe,ae,Se,"\u2018","\u2018"),$(Qe,ae,Se,"\u2019","\u2019"),$(Qe,ae,Se,"\u201C","\u201C"),$(Qe,ae,Se,"\u201D","\u201D");var ri=[["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"]],zt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Tt=function(d,m){var g=d.charCodeAt(0),w=d.charCodeAt(1),q=(g-55296)*1024+(w-56320)+65536,X=m==="math"?0:1;if(119808<=q&&q<120484){var fe=Math.floor((q-119808)/26);return[ri[fe][2],ri[fe][X]]}else if(120782<=q&&q<=120831){var ve=Math.floor((q-120782)/10);return[zt[ve][2],zt[ve][X]]}else{if(q===120485||q===120486)return[ri[0][2],ri[0][X]];if(120486<q&&q<120782)return["",""];throw new R("Unsupported character: "+d)}},Qt=[[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]],Sr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],yr=function(d,m){return m.size<2?d:Qt[d-1][m.size-1]},Kr=function(){function Q(m){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=m.style,this.color=m.color,this.size=m.size||Q.BASESIZE,this.textSize=m.textSize||this.size,this.phantom=!!m.phantom,this.font=m.font||"",this.fontFamily=m.fontFamily||"",this.fontWeight=m.fontWeight||"",this.fontShape=m.fontShape||"",this.sizeMultiplier=Sr[this.size-1],this.maxSize=m.maxSize,this.minRuleThickness=m.minRuleThickness,this._fontMetrics=void 0}var d=Q.prototype;return d.extend=function(g){var w={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 q in g)g.hasOwnProperty(q)&&(w[q]=g[q]);return new Q(w)},d.havingStyle=function(g){return this.style===g?this:this.extend({style:g,size:yr(this.textSize,g)})},d.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},d.havingSize=function(g){return this.size===g&&this.textSize===g?this:this.extend({style:this.style.text(),size:g,textSize:g,sizeMultiplier:Sr[g-1]})},d.havingBaseStyle=function(g){g=g||this.style.text();var w=yr(Q.BASESIZE,g);return this.size===w&&this.textSize===Q.BASESIZE&&this.style===g?this:this.extend({style:g,size:w})},d.havingBaseSizing=function(){var g;switch(this.style.id){case 4:case 5:g=3;break;case 6:case 7:g=1;break;default:g=6}return this.extend({style:this.style.text(),size:g})},d.withColor=function(g){return this.extend({color:g})},d.withPhantom=function(){return this.extend({phantom:!0})},d.withFont=function(g){return this.extend({font:g})},d.withTextFontFamily=function(g){return this.extend({fontFamily:g,font:""})},d.withTextFontWeight=function(g){return this.extend({fontWeight:g,font:""})},d.withTextFontShape=function(g){return this.extend({fontShape:g,font:""})},d.sizingClasses=function(g){return g.size!==this.size?["sizing","reset-size"+g.size,"size"+this.size]:[]},d.baseSizingClasses=function(){return this.size!==Q.BASESIZE?["sizing","reset-size"+this.size,"size"+Q.BASESIZE]:[]},d.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=_t(this.size)),this._fontMetrics},d.getColor=function(){return this.phantom?"transparent":this.color},Q}();Kr.BASESIZE=6;var Mi=Kr,Vr={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},Cr={ex:!0,em:!0,mu:!0},Pr=function(d){return typeof d!="string"&&(d=d.unit),d in Vr||d in Cr||d==="ex"},dr=function(d,m){var g;if(d.unit in Vr)g=Vr[d.unit]/m.fontMetrics().ptPerEm/m.sizeMultiplier;else if(d.unit==="mu")g=m.fontMetrics().cssEmPerMu;else{var w;if(m.style.isTight()?w=m.havingStyle(m.style.text()):w=m,d.unit==="ex")g=w.fontMetrics().xHeight;else if(d.unit==="em")g=w.fontMetrics().quad;else throw new R("Invalid unit: '"+d.unit+"'");w!==m&&(g*=w.sizeMultiplier/m.sizeMultiplier)}return Math.min(d.number*g,m.maxSize)},ii=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],hi=function(d,m,g){return bt[g][d]&&bt[g][d].replace&&(d=bt[g][d].replace),{value:d,metrics:gt(d,m,g)}},Wr=function(d,m,g,w,q){var X=hi(d,m,g),fe=X.metrics;d=X.value;var ve;if(fe){var Ce=fe.italic;(g==="text"||w&&w.font==="mathit")&&(Ce=0),ve=new ye(d,fe.height,fe.depth,Ce,fe.skew,fe.width,q)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+d+"' in style '"+m+"' and mode '"+g+"'")),ve=new ye(d,0,0,0,0,0,q);if(w){ve.maxFontSize=w.sizeMultiplier,w.style.isTight()&&ve.classes.push("mtight");var Be=w.getColor();Be&&(ve.style.color=Be)}return ve},rr=function(d,m,g,w){return w===void 0&&(w=[]),g.font==="boldsymbol"&&hi(d,"Main-Bold",m).metrics?Wr(d,"Main-Bold",m,g,w.concat(["mathbf"])):d==="\\"||bt[m][d].font==="main"?Wr(d,"Main-Regular",m,g,w):Wr(d,"AMS-Regular",m,g,w.concat(["amsrm"]))},hr=function(d,m,g,w){return/[0-9]/.test(d.charAt(0))||T.contains(ii,d)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Ar=function(d,m,g,w){return T.contains(ii,d)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(d.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Lr=function(d,m,g,w){return hi(d,"Math-BoldItalic",m).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},wr=function(d,m,g){var w=d.mode,q=d.text,X=["mord"],fe=w==="math"||w==="text"&&m.font,ve=fe?m.font:m.fontFamily;if(q.charCodeAt(0)===55349){var Ce=Tt(q,w),Be=Ce[0],Ve=Ce[1];return Wr(q,Be,w,m,X.concat(Ve))}else if(ve){var st,ut;if(ve==="boldsymbol"||ve==="mathnormal"){var vt=ve==="boldsymbol"?Lr(q,w,m,X):Ar(q,w,m,X);st=vt.fontName,ut=[vt.fontClass]}else T.contains(ii,q)?(st="Main-Italic",ut=["mathit"]):fe?(st=Sn[ve].fontName,ut=[ve]):(st=an(ve,m.fontWeight,m.fontShape),ut=[ve,m.fontWeight,m.fontShape]);if(hi(q,st,w).metrics)return Wr(q,st,w,m,X.concat(ut));if(Dt.hasOwnProperty(q)&&st.substr(0,10)==="Typewriter"){for(var Lt=[],Wt=0;Wt<q.length;Wt++)Lt.push(Wr(q[Wt],st,w,m,X.concat(ut)));return ji(Lt)}}if(g==="mathord"){var er=hr(q,w,m,X);return Wr(q,er.fontName,w,m,X.concat([er.fontClass]))}else if(g==="textord"){var ir=bt[w][q]&&bt[w][q].font;if(ir==="ams"){var tr=an("amsrm",m.fontWeight,m.fontShape);return Wr(q,tr,w,m,X.concat("amsrm",m.fontWeight,m.fontShape))}else if(ir==="main"||!ir){var kr=an("textrm",m.fontWeight,m.fontShape);return Wr(q,kr,w,m,X.concat(m.fontWeight,m.fontShape))}else{var Ir=an(ir,m.fontWeight,m.fontShape);return Wr(q,Ir,w,m,X.concat(Ir,m.fontWeight,m.fontShape))}}else throw new Error("unexpected type: "+g+" in makeOrd")},si=function(d,m){if(Ut(d.classes)!==Ut(m.classes)||d.skew!==m.skew||d.maxFontSize!==m.maxFontSize)return!1;for(var g in d.style)if(d.style.hasOwnProperty(g)&&d.style[g]!==m.style[g])return!1;for(var w in m.style)if(m.style.hasOwnProperty(w)&&d.style[w]!==m.style[w])return!1;return!0},yn=function(d){for(var m=0;m<d.length-1;m++){var g=d[m],w=d[m+1];g instanceof ye&&w instanceof ye&&si(g,w)&&(g.text+=w.text,g.height=Math.max(g.height,w.height),g.depth=Math.max(g.depth,w.depth),g.italic=w.italic,d.splice(m+1,1),m--)}return d},Li=function(d){for(var m=0,g=0,w=0,q=0;q<d.children.length;q++){var X=d.children[q];X.height>m&&(m=X.height),X.depth>g&&(g=X.depth),X.maxFontSize>w&&(w=X.maxFontSize)}d.height=m,d.depth=g,d.maxFontSize=w},pr=function(d,m,g,w){var q=new Fe(d,m,g,w);return Li(q),q},vr=function(d,m,g,w){return new Fe(d,m,g,w)},Fi=function(d,m,g){var w=pr([d],[],m);return w.height=Math.max(g||m.fontMetrics().defaultRuleThickness,m.minRuleThickness),w.style.borderBottomWidth=w.height+"em",w.maxFontSize=1,w},Jr=function(d,m,g,w){var q=new it(d,m,g,w);return Li(q),q},ji=function(d){var m=new Ot(d);return Li(m),m},bn=function(d,m){return d instanceof Ot?pr([],[d],m):d},Rn=function(d){if(d.positionType==="individualShift"){for(var m=d.children,g=[m[0]],w=-m[0].shift-m[0].elem.depth,q=w,X=1;X<m.length;X++){var fe=-m[X].shift-q-m[X].elem.depth,ve=fe-(m[X-1].elem.height+m[X-1].elem.depth);q=q+fe,g.push({type:"kern",size:ve}),g.push(m[X])}return{children:g,depth:w}}var Ce;if(d.positionType==="top"){for(var Be=d.positionData,Ve=0;Ve<d.children.length;Ve++){var st=d.children[Ve];Be-=st.type==="kern"?st.size:st.elem.height+st.elem.depth}Ce=Be}else if(d.positionType==="bottom")Ce=-d.positionData;else{var ut=d.children[0];if(ut.type!=="elem")throw new Error('First child must have type "elem".');if(d.positionType==="shift")Ce=-ut.elem.depth-d.positionData;else if(d.positionType==="firstBaseline")Ce=-ut.elem.depth;else throw new Error("Invalid positionType "+d.positionType+".")}return{children:d.children,depth:Ce}},xn=function(d,m){for(var g=Rn(d),w=g.children,q=g.depth,X=0,fe=0;fe<w.length;fe++){var ve=w[fe];if(ve.type==="elem"){var Ce=ve.elem;X=Math.max(X,Ce.maxFontSize,Ce.height)}}X+=2;var Be=pr(["pstrut"],[]);Be.style.height=X+"em";for(var Ve=[],st=q,ut=q,vt=q,Lt=0;Lt<w.length;Lt++){var Wt=w[Lt];if(Wt.type==="kern")vt+=Wt.size;else{var er=Wt.elem,ir=Wt.wrapperClasses||[],tr=Wt.wrapperStyle||{},kr=pr(ir,[Be,er],void 0,tr);kr.style.top=-X-vt-er.depth+"em",Wt.marginLeft&&(kr.style.marginLeft=Wt.marginLeft),Wt.marginRight&&(kr.style.marginRight=Wt.marginRight),Ve.push(kr),vt+=er.height+er.depth}st=Math.min(st,vt),ut=Math.max(ut,vt)}var Ir=pr(["vlist"],Ve);Ir.style.height=ut+"em";var Hr;if(st<0){var Gr=pr([],[]),Xr=pr(["vlist"],[Gr]);Xr.style.height=-st+"em";var vi=pr(["vlist-s"],[new ye("\u200B")]);Hr=[pr(["vlist-r"],[Ir,vi]),pr(["vlist-r"],[Xr])]}else Hr=[pr(["vlist-r"],[Ir])];var ci=pr(["vlist-t"],Hr);return Hr.length===2&&ci.classes.push("vlist-t2"),ci.height=ut,ci.depth=-st,ci},fi=function(d,m){var g=pr(["mspace"],[],m),w=dr(d,m);return g.style.marginRight=w+"em",g},an=function(d,m,g){var w="";switch(d){case"amsrm":w="AMS";break;case"textrm":w="Main";break;case"textsf":w="SansSerif";break;case"texttt":w="Typewriter";break;default:w=d}var q;return m==="textbf"&&g==="textit"?q="BoldItalic":m==="textbf"?q="Bold":m==="textit"?q="Italic":q="Regular",w+"-"+q},Sn={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"}},Ji={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(d,m){var g=Ji[d],w=g[0],q=g[1],X=g[2],fe=new Ae(w),ve=new Te([fe],{width:q+"em",height:X+"em",style:"width:"+q+"em",viewBox:"0 0 "+1e3*q+" "+1e3*X,preserveAspectRatio:"xMinYMin"}),Ce=vr(["overlay"],[ve],m);return Ce.height=X,Ce.style.height=X+"em",Ce.style.width=q+"em",Ce},Ue={fontMap:Sn,makeSymbol:Wr,mathsym:rr,makeSpan:pr,makeSvgSpan:vr,makeLineSpan:Fi,makeAnchor:Jr,makeFragment:ji,wrapFragment:bn,makeVList:xn,makeOrd:wr,makeGlue:fi,staticSvg:lr,svgData:Ji,tryCombineChars:yn};function Xt(Q,d){var m=Mr(Q,d);if(!m)throw new Error("Expected node of type "+d+", but got "+(Q?"node of type "+Q.type:String(Q)));return m}function Mr(Q,d){return Q&&Q.type===d?Q:null}function Wi(Q,d){var m=on(Q,d);if(!m)throw new Error('Expected node of type "atom" and family "'+d+'", but got '+(Q?Q.type==="atom"?"atom of family "+Q.family:"node of type "+Q.type:String(Q)));return m}function on(Q,d){return Q&&Q.type==="atom"&&Q.family===d?Q:null}function ln(Q){var d=Si(Q);if(!d)throw new Error("Expected node of symbol group type, but got "+(Q?"node of type "+Q.type:String(Q)));return d}function Si(Q){return Q&&(Q.type==="atom"||mt.hasOwnProperty(Q.type))?Q:null}var br={number:3,unit:"mu"},wi={number:4,unit:"mu"},ki={number:5,unit:"mu"},qr={mord:{mop:br,mbin:wi,mrel:ki,minner:br},mop:{mord:br,mop:br,mrel:ki,minner:br},mbin:{mord:wi,mop:wi,mopen:wi,minner:wi},mrel:{mord:ki,mop:ki,mopen:ki,minner:ki},mopen:{},mclose:{mop:br,mbin:wi,mrel:ki,minner:br},mpunct:{mord:br,mop:br,mrel:ki,mopen:br,mclose:br,mpunct:br,minner:br},minner:{mord:br,mop:br,mbin:wi,mrel:ki,mopen:br,mpunct:br,minner:br}},di={mord:{mop:br},mop:{mord:br,mop:br},mbin:{},mrel:{},mopen:{},mclose:{mop:br},mpunct:{},minner:{mop:br}},Hn={},Gi={},Qi={};function Nt(Q){for(var d=Q.type,m=Q.names,g=Q.props,w=Q.handler,q=Q.htmlBuilder,X=Q.mathmlBuilder,fe={type:d,numArgs:g.numArgs,argTypes:g.argTypes,greediness:g.greediness===void 0?1:g.greediness,allowedInText:!!g.allowedInText,allowedInMath:g.allowedInMath===void 0?!0:g.allowedInMath,numOptionalArgs:g.numOptionalArgs||0,infix:!!g.infix,handler:w},ve=0;ve<m.length;++ve)Hn[m[ve]]=fe;d&&(q&&(Gi[d]=q),X&&(Qi[d]=X))}function Ai(Q){var d=Q.type,m=Q.htmlBuilder,g=Q.mathmlBuilder;Nt({type:d,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:m,mathmlBuilder:g})}var Qr=function(d){var m=Mr(d,"ordgroup");return m?m.body:[d]},pi=Ue.makeSpan,$n=["leftmost","mbin","mopen","mrel","mop","mpunct"],en=["rightmost","mrel","mclose","mpunct"],Ki={display:k.DISPLAY,text:k.TEXT,script:k.SCRIPT,scriptscript:k.SCRIPTSCRIPT},Bi={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Yr=function(d,m,g,w){w===void 0&&(w=[null,null]);for(var q=[],X=0;X<d.length;X++){var fe=fr(d[X],m);if(fe instanceof Ot){var ve=fe.children;q.push.apply(q,ve)}else q.push(fe)}if(!g)return q;var Ce=m;if(d.length===1){var Be=Mr(d[0],"sizing")||Mr(d[0],"styling");Be&&(Be.type==="sizing"?Ce=m.havingSize(Be.size):Be.type==="styling"&&(Ce=m.havingStyle(Ki[Be.style])))}var Ve=pi([w[0]||"leftmost"],[],m),st=pi([w[1]||"rightmost"],[],m);return Ni(q,function(ut,vt){var Lt=vt.classes[0],Wt=ut.classes[0];Lt==="mbin"&&T.contains(en,Wt)?vt.classes[0]="mord":Wt==="mbin"&&T.contains($n,Lt)&&(ut.classes[0]="mord")},{node:Ve},st),Ni(q,function(ut,vt){var Lt=mi(vt),Wt=mi(ut),er=Lt&&Wt?ut.hasClass("mtight")?di[Lt][Wt]:qr[Lt][Wt]:null;if(er)return Ue.makeGlue(er,Ce)},{node:Ve},st),q},Ni=function Q(d,m,g,w){w&&d.push(w);for(var q=0;q<d.length;q++){var X=d[q],fe=Ii(X);if(fe){Q(fe.children,m,g);continue}if(X.classes[0]!=="mspace"){var ve=m(X,g.node);ve&&(g.insertAfter?g.insertAfter(ve):(d.unshift(ve),q++)),g.node=X,g.insertAfter=function(Ce){return function(Be){d.splice(Ce+1,0,Be),q++}}(q)}}w&&d.pop()},Ii=function(d){return d instanceof Ot||d instanceof it?d:null},Ln=function Q(d,m){var g=Ii(d);if(g){var w=g.children;if(w.length){if(m==="right")return Q(w[w.length-1],"right");if(m==="left")return Q(w[0],"left")}}return d},mi=function(d,m){return d?(m&&(d=Ln(d,m)),Bi[d.classes[0]]||null):null},Ei=function(d,m){var g=["nulldelimiter"].concat(d.baseSizingClasses());return pi(m.concat(g))},fr=function(d,m,g){if(!d)return pi();if(Gi[d.type]){var w=Gi[d.type](d,m);if(g&&m.size!==g.size){w=pi(m.sizingClasses(g),[w],m);var q=m.sizeMultiplier/g.sizeMultiplier;w.height*=q,w.depth*=q}return w}else throw new R("Got group of unknown type: '"+d.type+"'")};function un(Q,d){var m=pi(["base"],Q,d),g=pi(["strut"]);return g.style.height=m.height+m.depth+"em",g.style.verticalAlign=-m.depth+"em",m.children.unshift(g),m}function kn(Q,d){var m=null;Q.length===1&&Q[0].type==="tag"&&(m=Q[0].tag,Q=Q[0].body);for(var g=Yr(Q,d,!0),w=[],q=[],X=0;X<g.length;X++)if(q.push(g[X]),g[X].hasClass("mbin")||g[X].hasClass("mrel")||g[X].hasClass("allowbreak")){for(var fe=!1;X<g.length-1&&g[X+1].hasClass("mspace")&&!g[X+1].hasClass("newline");)X++,q.push(g[X]),g[X].hasClass("nobreak")&&(fe=!0);fe||(w.push(un(q,d)),q=[])}else g[X].hasClass("newline")&&(q.pop(),q.length>0&&(w.push(un(q,d)),q=[]),w.push(g[X]));q.length>0&&w.push(un(q,d));var ve;m&&(ve=un(Yr(m,d,!0)),ve.classes=["tag"],w.push(ve));var Ce=pi(["katex-html"],w);if(Ce.setAttribute("aria-hidden","true"),ve){var Be=ve.children[0];Be.style.height=Ce.height+Ce.depth+"em",Be.style.verticalAlign=-Ce.depth+"em"}return Ce}function In(Q){return new Ot(Q)}var gi=function(){function Q(m,g){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=m,this.attributes={},this.children=g||[]}var d=Q.prototype;return d.setAttribute=function(g,w){this.attributes[g]=w},d.getAttribute=function(g){return this.attributes[g]},d.toNode=function(){var g=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var w in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,w)&&g.setAttribute(w,this.attributes[w]);for(var q=0;q<this.children.length;q++)g.appendChild(this.children[q].toNode());return g},d.toMarkup=function(){var g="<"+this.type;for(var w in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,w)&&(g+=" "+w+'="',g+=T.escape(this.attributes[w]),g+='"');g+=">";for(var q=0;q<this.children.length;q++)g+=this.children[q].toMarkup();return g+="</"+this.type+">",g},d.toText=function(){return this.children.map(function(g){return g.toText()}).join("")},Q}(),cn=function(){function Q(m){this.text=void 0,this.text=m}var d=Q.prototype;return d.toNode=function(){return document.createTextNode(this.text)},d.toMarkup=function(){return T.escape(this.toText())},d.toText=function(){return this.text},Q}(),jn=function(){function Q(m){this.width=void 0,this.character=void 0,this.width=m,m>=.05555&&m<=.05556?this.character="\u200A":m>=.1666&&m<=.1667?this.character="\u2009":m>=.2222&&m<=.2223?this.character="\u2005":m>=.2777&&m<=.2778?this.character="\u2005\u200A":m>=-.05556&&m<=-.05555?this.character="\u200A\u2063":m>=-.1667&&m<=-.1666?this.character="\u2009\u2063":m>=-.2223&&m<=-.2222?this.character="\u205F\u2063":m>=-.2778&&m<=-.2777?this.character="\u2005\u2063":this.character=null}var d=Q.prototype;return d.toNode=function(){if(this.character)return document.createTextNode(this.character);var g=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return g.setAttribute("width",this.width+"em"),g},d.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+this.width+'em"/>'},d.toText=function(){return this.character?this.character:" "},Q}(),yt={MathNode:gi,TextNode:cn,SpaceNode:jn,newDocumentFragment:In},_i=function(d,m,g){return bt[m][d]&&bt[m][d].replace&&d.charCodeAt(0)!==55349&&!(Dt.hasOwnProperty(d)&&g&&(g.fontFamily&&g.fontFamily.substr(4,2)==="tt"||g.font&&g.font.substr(4,2)==="tt"))&&(d=bt[m][d].replace),new yt.TextNode(d)},On=function(d){return d.length===1?d[0]:new yt.MathNode("mrow",d)},hn=function(d,m){if(m.fontFamily==="texttt")return"monospace";if(m.fontFamily==="textsf")return m.fontShape==="textit"&&m.fontWeight==="textbf"?"sans-serif-bold-italic":m.fontShape==="textit"?"sans-serif-italic":m.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(m.fontShape==="textit"&&m.fontWeight==="textbf")return"bold-italic";if(m.fontShape==="textit")return"italic";if(m.fontWeight==="textbf")return"bold";var g=m.font;if(!g||g==="mathnormal")return null;var w=d.mode;if(g==="mathit")return"italic";if(g==="boldsymbol")return"bold-italic";if(g==="mathbf")return"bold";if(g==="mathbb")return"double-struck";if(g==="mathfrak")return"fraktur";if(g==="mathscr"||g==="mathcal")return"script";if(g==="mathsf")return"sans-serif";if(g==="mathtt")return"monospace";var q=d.text;if(T.contains(["\\imath","\\jmath"],q))return null;bt[w][q]&&bt[w][q].replace&&(q=bt[w][q].replace);var X=Ue.fontMap[g].fontName;return gt(q,X,w)?Ue.fontMap[g].variant:null},ui=function(d,m,g){if(d.length===1){var w=xr(d[0],m);return g&&w instanceof gi&&w.type==="mo"&&(w.setAttribute("lspace","0em"),w.setAttribute("rspace","0em")),[w]}for(var q=[],X,fe=0;fe<d.length;fe++){var ve=xr(d[fe],m);if(ve instanceof gi&&X instanceof gi){if(ve.type==="mtext"&&X.type==="mtext"&&ve.getAttribute("mathvariant")===X.getAttribute("mathvariant")){var Ce;(Ce=X.children).push.apply(Ce,ve.children);continue}else if(ve.type==="mn"&&X.type==="mn"){var Be;(Be=X.children).push.apply(Be,ve.children);continue}else if(ve.type==="mi"&&ve.children.length===1&&X.type==="mn"){var Ve=ve.children[0];if(Ve instanceof cn&&Ve.text==="."){var st;(st=X.children).push.apply(st,ve.children);continue}}else if(X.type==="mi"&&X.children.length===1){var ut=X.children[0];if(ut instanceof cn&&ut.text==="\u0338"&&(ve.type==="mo"||ve.type==="mi"||ve.type==="mn")){var vt=ve.children[0];vt instanceof cn&&vt.text.length>0&&(vt.text=vt.text.slice(0,1)+"\u0338"+vt.text.slice(1),q.pop())}}}q.push(ve),X=ve}return q},ei=function(d,m,g){return On(ui(d,m,g))},xr=function(d,m){if(!d)return new yt.MathNode("mrow");if(Qi[d.type]){var g=Qi[d.type](d,m);return g}else throw new R("Got group of unknown type: '"+d.type+"'")};function Oi(Q,d,m,g){var w=ui(Q,m),q;w.length===1&&w[0]instanceof gi&&T.contains(["mrow","mtable"],w[0].type)?q=w[0]:q=new yt.MathNode("mrow",w);var X=new yt.MathNode("annotation",[new yt.TextNode(d)]);X.setAttribute("encoding","application/x-tex");var fe=new yt.MathNode("semantics",[q,X]),ve=new yt.MathNode("math",[fe]);ve.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var Ce=g?"katex":"katex-mathml";return Ue.makeSpan([Ce],[ve])}var Ui=function(d){return new Mi({style:d.displayMode?k.DISPLAY:k.TEXT,maxSize:d.maxSize,minRuleThickness:d.minRuleThickness})},tn=function(d,m){if(m.displayMode){var g=["katex-display"];m.leqno&&g.push("leqno"),m.fleqn&&g.push("fleqn"),d=Ue.makeSpan(g,[d])}return d},zi=function(d,m,g){var w=Ui(g),q;if(g.output==="mathml")return Oi(d,m,w,!0);if(g.output==="html"){var X=kn(d,w);q=Ue.makeSpan(["katex"],[X])}else{var fe=Oi(d,m,w,!1),ve=kn(d,w);q=Ue.makeSpan(["katex"],[fe,ve])}return tn(q,g)},Pn=function(d,m,g){var w=Ui(g),q=kn(d,w),X=Ue.makeSpan(["katex"],[q]);return tn(X,g)},Mn=zi,Wn={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"},wn=function(d){var m=new yt.MathNode("mo",[new yt.TextNode(Wn[d.substr(1)])]);return m.setAttribute("stretchy","true"),m},es={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]},Fn=function(d){return d.type==="ordgroup"?d.body.length:1},ts=function(d,m){function g(){var ve=4e5,Ce=d.label.substr(1);if(T.contains(["widehat","widecheck","widetilde","utilde"],Ce)){var Be=d,Ve=Fn(Be.base),st,ut,vt;if(Ve>5)Ce==="widehat"||Ce==="widecheck"?(st=420,ve=2364,vt=.42,ut=Ce+"4"):(st=312,ve=2340,vt=.34,ut="tilde4");else{var Lt=[1,1,2,2,3,3][Ve];Ce==="widehat"||Ce==="widecheck"?(ve=[0,1062,2364,2364,2364][Lt],st=[0,239,300,360,420][Lt],vt=[0,.24,.3,.3,.36,.42][Lt],ut=Ce+Lt):(ve=[0,600,1033,2339,2340][Lt],st=[0,260,286,306,312][Lt],vt=[0,.26,.286,.3,.306,.34][Lt],ut="tilde"+Lt)}var Wt=new Ae(ut),er=new Te([Wt],{width:"100%",height:vt+"em",viewBox:"0 0 "+ve+" "+st,preserveAspectRatio:"none"});return{span:Ue.makeSvgSpan([],[er],m),minWidth:0,height:vt}}else{var ir=[],tr=es[Ce],kr=tr[0],Ir=tr[1],Hr=tr[2],Gr=Hr/1e3,Xr=kr.length,vi,ci;if(Xr===1){var Tr=tr[3];vi=["hide-tail"],ci=[Tr]}else if(Xr===2)vi=["halfarrow-left","halfarrow-right"],ci=["xMinYMin","xMaxYMin"];else if(Xr===3)vi=["brace-left","brace-center","brace-right"],ci=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
`+Xr+" children.");for(var $i=0;$i<Xr;$i++){var _n=new Ae(kr[$i]),Xi=new Te([_n],{width:"400em",height:Gr+"em",viewBox:"0 0 "+ve+" "+Hr,preserveAspectRatio:ci[$i]+" slice"}),yi=Ue.makeSvgSpan([vi[$i]],[Xi],m);if(Xr===1)return{span:yi,minWidth:Ir,height:Gr};yi.style.height=Gr+"em",ir.push(yi)}return{span:Ue.makeSpan(["stretchy"],ir,m),minWidth:Ir,height:Gr}}}var w=g(),q=w.span,X=w.minWidth,fe=w.height;return q.height=fe,q.style.height=fe+"em",X>0&&(q.style.minWidth=X+"em"),q},Gt=function(d,m,g,w){var q,X=d.height+d.depth+2*g;if(/fbox|color/.test(m)){if(q=Ue.makeSpan(["stretchy",m],[],w),m==="fbox"){var fe=w.color&&w.getColor();fe&&(q.style.borderColor=fe)}}else{var ve=[];/^[bx]cancel$/.test(m)&&ve.push(new Me({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(m)&&ve.push(new Me({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var Ce=new Te(ve,{width:"100%",height:X+"em"});q=Ue.makeSvgSpan([],[Ce],w)}return q.height=X,q.style.height=X+"em",q},Mt={encloseSpan:Gt,mathMLnode:wn,svgSpan:ts},mr=function(d,m){var g,w,q=Mr(d,"supsub"),X;q?(w=Xt(q.base,"accent"),g=w.base,q.base=g,X=qe(fr(q,m)),q.base=w):(w=Xt(d,"accent"),g=w.base);var fe=fr(g,m.havingCrampedStyle()),ve=w.isShifty&&T.isCharacterBox(g),Ce=0;if(ve){var Be=T.getBaseElem(g),Ve=fr(Be,m.havingCrampedStyle());Ce=ze(Ve).skew}var st=Math.min(fe.height,m.fontMetrics().xHeight),ut;if(w.isStretchy)ut=Mt.svgSpan(w,m),ut=Ue.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:fe},{type:"elem",elem:ut,wrapperClasses:["svg-align"],wrapperStyle:Ce>0?{width:"calc(100% - "+2*Ce+"em)",marginLeft:2*Ce+"em"}:void 0}]},m);else{var vt,Lt;w.label==="\\vec"?(vt=Ue.staticSvg("vec",m),Lt=Ue.svgData.vec[1]):(vt=Ue.makeOrd({mode:w.mode,text:w.label},m,"textord"),vt=ze(vt),vt.italic=0,Lt=vt.width),ut=Ue.makeSpan(["accent-body"],[vt]);var Wt=w.label==="\\textcircled";Wt&&(ut.classes.push("accent-full"),st=fe.height);var er=Ce;Wt||(er-=Lt/2),ut.style.left=er+"em",w.label==="\\textcircled"&&(ut.style.top=".2em"),ut=Ue.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:fe},{type:"kern",size:-st},{type:"elem",elem:ut}]},m)}var ir=Ue.makeSpan(["mord","accent"],[ut],m);return X?(X.children[0]=ir,X.height=Math.max(ir.height,X.height),X.classes[0]="mord",X):ir},Zr=function(d,m){var g=d.isStretchy?Mt.mathMLnode(d.label):new yt.MathNode("mo",[_i(d.label,d.mode)]),w=new yt.MathNode("mover",[xr(d.base,m),g]);return w.setAttribute("accent","true"),w},Nr=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(Q){return"\\"+Q}).join("|"));Nt({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(d,m){var g=m[0],w=!Nr.test(d.funcName),q=!w||d.funcName==="\\widehat"||d.funcName==="\\widetilde"||d.funcName==="\\widecheck";return{type:"accent",mode:d.parser.mode,label:d.funcName,isStretchy:w,isShifty:q,base:g}},htmlBuilder:mr,mathmlBuilder:Zr}),Nt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(d,m){var g=m[0];return{type:"accent",mode:d.parser.mode,label:d.funcName,isStretchy:!1,isShifty:!0,base:g}},htmlBuilder:mr,mathmlBuilder:Zr}),Nt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(d,m){var g=d.parser,w=d.funcName,q=m[0];return{type:"accentUnder",mode:g.mode,label:w,base:q}},htmlBuilder:function(d,m){var g=fr(d.base,m),w=Mt.svgSpan(d,m),q=d.label==="\\utilde"?.12:0,X=Ue.makeVList({positionType:"bottom",positionData:w.height+q,children:[{type:"elem",elem:w,wrapperClasses:["svg-align"]},{type:"kern",size:q},{type:"elem",elem:g}]},m);return Ue.makeSpan(["mord","accentunder"],[X],m)},mathmlBuilder:function(d,m){var g=Mt.mathMLnode(d.label),w=new yt.MathNode("munder",[xr(d.base,m),g]);return w.setAttribute("accentunder","true"),w}});var Ti=function(d){var m=new yt.MathNode("mpadded",d?[d]:[]);return m.setAttribute("width","+0.6em"),m.setAttribute("lspace","0.3em"),m};Nt({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(d,m,g){var w=d.parser,q=d.funcName;return{type:"xArrow",mode:w.mode,label:q,body:m[0],below:g[0]}},htmlBuilder:function(d,m){var g=m.style,w=m.havingStyle(g.sup()),q=Ue.wrapFragment(fr(d.body,w,m),m);q.classes.push("x-arrow-pad");var X;d.below&&(w=m.havingStyle(g.sub()),X=Ue.wrapFragment(fr(d.below,w,m),m),X.classes.push("x-arrow-pad"));var fe=Mt.svgSpan(d,m),ve=-m.fontMetrics().axisHeight+.5*fe.height,Ce=-m.fontMetrics().axisHeight-.5*fe.height-.111;(q.depth>.25||d.label==="\\xleftequilibrium")&&(Ce-=q.depth);var Be;if(X){var Ve=-m.fontMetrics().axisHeight+X.height+.5*fe.height+.111;Be=Ue.makeVList({positionType:"individualShift",children:[{type:"elem",elem:q,shift:Ce},{type:"elem",elem:fe,shift:ve},{type:"elem",elem:X,shift:Ve}]},m)}else Be=Ue.makeVList({positionType:"individualShift",children:[{type:"elem",elem:q,shift:Ce},{type:"elem",elem:fe,shift:ve}]},m);return Be.children[0].children[0].children[1].classes.push("svg-align"),Ue.makeSpan(["mrel","x-arrow"],[Be],m)},mathmlBuilder:function(d,m){var g=Mt.mathMLnode(d.label),w;if(d.body){var q=Ti(xr(d.body,m));if(d.below){var X=Ti(xr(d.below,m));w=new yt.MathNode("munderover",[g,X,q])}else w=new yt.MathNode("mover",[g,q])}else if(d.below){var fe=Ti(xr(d.below,m));w=new yt.MathNode("munder",[g,fe])}else w=Ti(),w=new yt.MathNode("mover",[g,w]);return w}}),Nt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(d,m){for(var g=d.parser,w=Xt(m[0],"ordgroup"),q=w.body,X="",fe=0;fe<q.length;fe++){var ve=Xt(q[fe],"textord");X+=ve.text}var Ce=parseInt(X);if(isNaN(Ce))throw new R("\\@char has non-numeric argument "+X);return{type:"textord",mode:g.mode,text:String.fromCharCode(Ce)}}});var Gn=function(d,m){var g=Yr(d.body,m.withColor(d.color),!1);return Ue.makeFragment(g)},Kn=function(d,m){var g=ui(d.body,m.withColor(d.color)),w=new yt.MathNode("mstyle",g);return w.setAttribute("mathcolor",d.color),w};Nt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(d,m){var g=d.parser,w=Xt(m[0],"color-token").color,q=m[1];return{type:"color",mode:g.mode,color:w,body:Qr(q)}},htmlBuilder:Gn,mathmlBuilder:Kn}),Nt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(d,m){var g=d.parser,w=d.breakOnTokenText,q=Xt(m[0],"color-token").color;g.gullet.macros.set("\\current@color",q);var X=g.parseExpression(!0,w);return{type:"color",mode:g.mode,color:q,body:X}},htmlBuilder:Gn,mathmlBuilder:Kn}),Nt({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(d,m,g){var w=d.parser,q=d.funcName,X=g[0],fe=q==="\\cr",ve=!1;return fe||(w.settings.displayMode&&w.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?ve=!1:ve=!0),{type:"cr",mode:w.mode,newLine:ve,newRow:fe,size:X&&Xt(X,"size").value}},htmlBuilder:function(d,m){if(d.newRow)throw new R("\\cr valid only within a tabular/array environment");var g=Ue.makeSpan(["mspace"],[],m);return d.newLine&&(g.classes.push("newline"),d.size&&(g.style.marginTop=dr(d.size,m)+"em")),g},mathmlBuilder:function(d,m){var g=new yt.MathNode("mspace");return d.newLine&&(g.setAttribute("linebreak","newline"),d.size&&g.setAttribute("height",dr(d.size,m)+"em")),g}});var Vi=function(d,m,g){var w=bt.math[d]&&bt.math[d].replace,q=gt(w||d,m,g);if(!q)throw new Error("Unsupported symbol "+d+" and font size "+m+".");return q},ks=function(d,m,g,w){var q=g.havingBaseStyle(m),X=Ue.makeSpan(w.concat(q.sizingClasses(g)),[d],g),fe=q.sizeMultiplier/g.sizeMultiplier;return X.height*=fe,X.depth*=fe,X.maxFontSize=q.sizeMultiplier,X},ra=function(d,m,g){var w=m.havingBaseStyle(g),q=(1-m.sizeMultiplier/w.sizeMultiplier)*m.fontMetrics().axisHeight;d.classes.push("delimcenter"),d.style.top=q+"em",d.height-=q,d.depth+=q},Pa=function(d,m,g,w,q,X){var fe=Ue.makeSymbol(d,"Main-Regular",q,w),ve=ks(fe,m,w,X);return g&&ra(ve,w,m),ve},Ma=function(d,m,g,w){return Ue.makeSymbol(d,"Size"+m+"-Regular",g,w)},ia=function(d,m,g,w,q,X){var fe=Ma(d,m,q,w),ve=ks(Ue.makeSpan(["delimsizing","size"+m],[fe],w),k.TEXT,w,X);return g&&ra(ve,w,k.TEXT),ve},En=function(d,m,g){var w;m==="Size1-Regular"?w="delim-size1":w="delim-size4";var q=Ue.makeSpan(["delimsizinginner",w],[Ue.makeSpan([],[Ue.makeSymbol(d,m,g)])]);return{type:"elem",elem:q}},Pi={type:"kern",size:-.005},na=function(d,m,g,w,q,X){var fe,ve,Ce,Be;fe=Ce=Be=d,ve=null;var Ve="Size1-Regular";d==="\\uparrow"?Ce=Be="\u23D0":d==="\\Uparrow"?Ce=Be="\u2016":d==="\\downarrow"?fe=Ce="\u23D0":d==="\\Downarrow"?fe=Ce="\u2016":d==="\\updownarrow"?(fe="\\uparrow",Ce="\u23D0",Be="\\downarrow"):d==="\\Updownarrow"?(fe="\\Uparrow",Ce="\u2016",Be="\\Downarrow"):d==="["||d==="\\lbrack"?(fe="\u23A1",Ce="\u23A2",Be="\u23A3",Ve="Size4-Regular"):d==="]"||d==="\\rbrack"?(fe="\u23A4",Ce="\u23A5",Be="\u23A6",Ve="Size4-Regular"):d==="\\lfloor"||d==="\u230A"?(Ce=fe="\u23A2",Be="\u23A3",Ve="Size4-Regular"):d==="\\lceil"||d==="\u2308"?(fe="\u23A1",Ce=Be="\u23A2",Ve="Size4-Regular"):d==="\\rfloor"||d==="\u230B"?(Ce=fe="\u23A5",Be="\u23A6",Ve="Size4-Regular"):d==="\\rceil"||d==="\u2309"?(fe="\u23A4",Ce=Be="\u23A5",Ve="Size4-Regular"):d==="("||d==="\\lparen"?(fe="\u239B",Ce="\u239C",Be="\u239D",Ve="Size4-Regular"):d===")"||d==="\\rparen"?(fe="\u239E",Ce="\u239F",Be="\u23A0",Ve="Size4-Regular"):d==="\\{"||d==="\\lbrace"?(fe="\u23A7",ve="\u23A8",Be="\u23A9",Ce="\u23AA",Ve="Size4-Regular"):d==="\\}"||d==="\\rbrace"?(fe="\u23AB",ve="\u23AC",Be="\u23AD",Ce="\u23AA",Ve="Size4-Regular"):d==="\\lgroup"||d==="\u27EE"?(fe="\u23A7",Be="\u23A9",Ce="\u23AA",Ve="Size4-Regular"):d==="\\rgroup"||d==="\u27EF"?(fe="\u23AB",Be="\u23AD",Ce="\u23AA",Ve="Size4-Regular"):d==="\\lmoustache"||d==="\u23B0"?(fe="\u23A7",Be="\u23AD",Ce="\u23AA",Ve="Size4-Regular"):(d==="\\rmoustache"||d==="\u23B1")&&(fe="\u23AB",Be="\u23A9",Ce="\u23AA",Ve="Size4-Regular");var st=Vi(fe,Ve,q),ut=st.height+st.depth,vt=Vi(Ce,Ve,q),Lt=vt.height+vt.depth,Wt=Vi(Be,Ve,q),er=Wt.height+Wt.depth,ir=0,tr=1;if(ve!==null){var kr=Vi(ve,Ve,q);ir=kr.height+kr.depth,tr=2}var Ir=ut+er+ir,Hr=Math.max(0,Math.ceil((m-Ir)/(tr*Lt))),Gr=Ir+Hr*tr*Lt,Xr=w.fontMetrics().axisHeight;g&&(Xr*=w.sizeMultiplier);var vi=Gr/2-Xr,ci=(Hr+1)*.005-Lt,Tr=[];if(Tr.push(En(Be,Ve,q)),ve===null)for(var $i=0;$i<Hr;$i++)Tr.push(Pi),Tr.push(En(Ce,Ve,q));else{for(var _n=0;_n<Hr;_n++)Tr.push(Pi),Tr.push(En(Ce,Ve,q));Tr.push({type:"kern",size:ci}),Tr.push(En(Ce,Ve,q)),Tr.push(Pi),Tr.push(En(ve,Ve,q));for(var Xi=0;Xi<Hr;Xi++)Tr.push(Pi),Tr.push(En(Ce,Ve,q))}Tr.push({type:"kern",size:ci}),Tr.push(En(Ce,Ve,q)),Tr.push(Pi),Tr.push(En(fe,Ve,q));var yi=w.havingBaseStyle(k.TEXT),vn=Ue.makeVList({positionType:"bottom",positionData:vi,children:Tr},yi);return ks(Ue.makeSpan(["delimsizing","mult"],[vn],yi),k.TEXT,w,X)},Is=80,Hi=.08,fn=function(d,m,g,w,q){var X=Yt(d,w,g),fe=new Ae(d,X),ve=new Te([fe],{width:"400em",height:m+"em",viewBox:"0 0 400000 "+g,preserveAspectRatio:"xMinYMin slice"});return Ue.makeSvgSpan(["hide-tail"],[ve],q)},Fa=function(d,m){var g=m.havingBaseSizing(),w=sa("\\surd",d*g.sizeMultiplier,rs,g),q=g.sizeMultiplier,X=Math.max(0,m.minRuleThickness-m.fontMetrics().sqrtRuleThickness),fe,ve=0,Ce=0,Be=0,Ve;return w.type==="small"?(Be=1e3+1e3*X+Is,d<1?q=1:d<1.4&&(q=.7),ve=(1+X+Hi)/q,Ce=(1+X)/q,fe=fn("sqrtMain",ve,Be,X,m),fe.style.minWidth="0.853em",Ve=.833/q):w.type==="large"?(Be=(1e3+Is)*us[w.size],Ce=(us[w.size]+X)/q,ve=(us[w.size]+X+Hi)/q,fe=fn("sqrtSize"+w.size,ve,Be,X,m),fe.style.minWidth="1.02em",Ve=1/q):(ve=d+X+Hi,Ce=d+X,Be=Math.floor(1e3*d+X)+Is,fe=fn("sqrtTall",ve,Be,X,m),fe.style.minWidth="0.742em",Ve=1.056),fe.height=Ce,fe.style.height=ve+"em",{span:fe,advanceWidth:Ve,ruleWidth:(m.fontMetrics().sqrtRuleThickness+X)*q}},Cn=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Ba=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Os=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],us=[0,1.2,1.8,2.4,3],Na=function(d,m,g,w,q){if(d==="<"||d==="\\lt"||d==="\u27E8"?d="\\langle":(d===">"||d==="\\gt"||d==="\u27E9")&&(d="\\rangle"),T.contains(Cn,d)||T.contains(Os,d))return ia(d,m,!1,g,w,q);if(T.contains(Ba,d))return na(d,us[m],!1,g,w,q);throw new R("Illegal delimiter: '"+d+"'")},ai=[{type:"small",style:k.SCRIPTSCRIPT},{type:"small",style:k.SCRIPT},{type:"small",style:k.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ua=[{type:"small",style:k.SCRIPTSCRIPT},{type:"small",style:k.SCRIPT},{type:"small",style:k.TEXT},{type:"stack"}],rs=[{type:"small",style:k.SCRIPTSCRIPT},{type:"small",style:k.SCRIPT},{type:"small",style:k.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Vn=function(d){if(d.type==="small")return"Main-Regular";if(d.type==="large")return"Size"+d.size+"-Regular";if(d.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+d.type+"' here.")},sa=function(d,m,g,w){for(var q=Math.min(2,3-w.style.size),X=q;X<g.length&&g[X].type!=="stack";X++){var fe=Vi(d,Vn(g[X]),"math"),ve=fe.height+fe.depth;if(g[X].type==="small"){var Ce=w.havingBaseStyle(g[X].style);ve*=Ce.sizeMultiplier}if(ve>m)return g[X]}return g[g.length-1]},Fr=function(d,m,g,w,q,X){d==="<"||d==="\\lt"||d==="\u27E8"?d="\\langle":(d===">"||d==="\\gt"||d==="\u27E9")&&(d="\\rangle");var fe;T.contains(Os,d)?fe=ai:T.contains(Cn,d)?fe=rs:fe=Ua;var ve=sa(d,m,fe,w);return ve.type==="small"?Pa(d,ve.style,g,w,q,X):ve.type==="large"?ia(d,ve.size,g,w,q,X):na(d,m,g,w,q,X)},Ps=function(d,m,g,w,q,X){var fe=w.fontMetrics().axisHeight*w.sizeMultiplier,ve=901,Ce=5/w.fontMetrics().ptPerEm,Be=Math.max(m-fe,g+fe),Ve=Math.max(Be/500*ve,2*Be-Ce);return Fr(d,Ve,!0,w,q,X)},qi={sqrtImage:Fa,sizedDelim:Na,customSizedDelim:Fr,leftRightDelim:Ps},is={"\\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}},za=["(","\\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 cs(Q,d){var m=Si(Q);if(m&&T.contains(za,m.text))return m;throw new R("Invalid delimiter: '"+(m?m.text:JSON.stringify(Q))+"' after '"+d.funcName+"'",Q)}Nt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1},handler:function(d,m){var g=cs(m[0],d);return{type:"delimsizing",mode:d.parser.mode,size:is[d.funcName].size,mclass:is[d.funcName].mclass,delim:g.text}},htmlBuilder:function(d,m){return d.delim==="."?Ue.makeSpan([d.mclass]):qi.sizedDelim(d.delim,d.size,m,d.mode,[d.mclass])},mathmlBuilder:function(d){var m=[];d.delim!=="."&&m.push(_i(d.delim,d.mode));var g=new yt.MathNode("mo",m);return d.mclass==="mopen"||d.mclass==="mclose"?g.setAttribute("fence","true"):g.setAttribute("fence","false"),g}});function Ms(Q){if(!Q.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Nt({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(d,m){var g=d.parser.gullet.macros.get("\\current@color");if(g&&typeof g!="string")throw new R("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:d.parser.mode,delim:cs(m[0],d).text,color:g}}}),Nt({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(d,m){var g=cs(m[0],d),w=d.parser;++w.leftrightDepth;var q=w.parseExpression(!1);--w.leftrightDepth,w.expect("\\right",!1);var X=Xt(w.parseFunction(),"leftright-right");return{type:"leftright",mode:w.mode,body:q,left:g.text,right:X.delim,rightColor:X.color}},htmlBuilder:function(d,m){Ms(d);for(var g=Yr(d.body,m,!0,["mopen","mclose"]),w=0,q=0,X=!1,fe=0;fe<g.length;fe++)g[fe].isMiddle?X=!0:(w=Math.max(g[fe].height,w),q=Math.max(g[fe].depth,q));w*=m.sizeMultiplier,q*=m.sizeMultiplier;var ve;if(d.left==="."?ve=Ei(m,["mopen"]):ve=qi.leftRightDelim(d.left,w,q,m,d.mode,["mopen"]),g.unshift(ve),X)for(var Ce=1;Ce<g.length;Ce++){var Be=g[Ce],Ve=Be.isMiddle;Ve&&(g[Ce]=qi.leftRightDelim(Ve.delim,w,q,Ve.options,d.mode,[]))}var st;if(d.right===".")st=Ei(m,["mclose"]);else{var ut=d.rightColor?m.withColor(d.rightColor):m;st=qi.leftRightDelim(d.right,w,q,ut,d.mode,["mclose"])}return g.push(st),Ue.makeSpan(["minner"],g,m)},mathmlBuilder:function(d,m){Ms(d);var g=ui(d.body,m);if(d.left!=="."){var w=new yt.MathNode("mo",[_i(d.left,d.mode)]);w.setAttribute("fence","true"),g.unshift(w)}if(d.right!=="."){var q=new yt.MathNode("mo",[_i(d.right,d.mode)]);q.setAttribute("fence","true"),d.rightColor&&q.setAttribute("mathcolor",d.rightColor),g.push(q)}return On(g)}}),Nt({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(d,m){var g=cs(m[0],d);if(!d.parser.leftrightDepth)throw new R("\\middle without preceding \\left",g);return{type:"middle",mode:d.parser.mode,delim:g.text}},htmlBuilder:function(d,m){var g;if(d.delim===".")g=Ei(m,[]);else{g=qi.sizedDelim(d.delim,1,m,d.mode,[]);var w={delim:d.delim,options:m};g.isMiddle=w}return g},mathmlBuilder:function(d,m){var g=d.delim==="\\vert"||d.delim==="|"?_i("|","text"):_i(d.delim,d.mode),w=new yt.MathNode("mo",[g]);return w.setAttribute("fence","true"),w.setAttribute("lspace","0.05em"),w.setAttribute("rspace","0.05em"),w}});var hs=function(d,m){var g=Ue.wrapFragment(fr(d.body,m),m),w=d.label.substr(1),q=m.sizeMultiplier,X,fe=0,ve=T.isCharacterBox(d.body);if(w==="sout")X=Ue.makeSpan(["stretchy","sout"]),X.height=m.fontMetrics().defaultRuleThickness/q,fe=-.5*m.fontMetrics().xHeight;else{/cancel/.test(w)?ve||g.classes.push("cancel-pad"):g.classes.push("boxpad");var Ce=0,Be=0;/box/.test(w)?(Be=Math.max(m.fontMetrics().fboxrule,m.minRuleThickness),Ce=m.fontMetrics().fboxsep+(w==="colorbox"?0:Be)):Ce=ve?.2:0,X=Mt.encloseSpan(g,w,Ce,m),/fbox|boxed|fcolorbox/.test(w)&&(X.style.borderStyle="solid",X.style.borderWidth=Be+"em"),fe=g.depth+Ce,d.backgroundColor&&(X.style.backgroundColor=d.backgroundColor,d.borderColor&&(X.style.borderColor=d.borderColor))}var Ve;return d.backgroundColor?Ve=Ue.makeVList({positionType:"individualShift",children:[{type:"elem",elem:X,shift:fe},{type:"elem",elem:g,shift:0}]},m):Ve=Ue.makeVList({positionType:"individualShift",children:[{type:"elem",elem:g,shift:0},{type:"elem",elem:X,shift:fe,wrapperClasses:/cancel/.test(w)?["svg-align"]:[]}]},m),/cancel/.test(w)&&(Ve.height=g.height,Ve.depth=g.depth),/cancel/.test(w)&&!ve?Ue.makeSpan(["mord","cancel-lap"],[Ve],m):Ue.makeSpan(["mord"],[Ve],m)},Fs=function(d,m){var g=0,w=new yt.MathNode(d.label.indexOf("colorbox")>-1?"mpadded":"menclose",[xr(d.body,m)]);switch(d.label){case"\\cancel":w.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":w.setAttribute("notation","downdiagonalstrike");break;case"\\sout":w.setAttribute("notation","horizontalstrike");break;case"\\fbox":w.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(g=m.fontMetrics().fboxsep*m.fontMetrics().ptPerEm,w.setAttribute("width","+"+2*g+"pt"),w.setAttribute("height","+"+2*g+"pt"),w.setAttribute("lspace",g+"pt"),w.setAttribute("voffset",g+"pt"),d.label==="\\fcolorbox"){var q=Math.max(m.fontMetrics().fboxrule,m.minRuleThickness);w.setAttribute("style","border: "+q+"em solid "+String(d.borderColor))}break;case"\\xcancel":w.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return d.backgroundColor&&w.setAttribute("mathbackground",d.backgroundColor),w};Nt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(d,m,g){var w=d.parser,q=d.funcName,X=Xt(m[0],"color-token").color,fe=m[1];return{type:"enclose",mode:w.mode,label:q,backgroundColor:X,body:fe}},htmlBuilder:hs,mathmlBuilder:Fs}),Nt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(d,m,g){var w=d.parser,q=d.funcName,X=Xt(m[0],"color-token").color,fe=Xt(m[1],"color-token").color,ve=m[2];return{type:"enclose",mode:w.mode,label:q,backgroundColor:fe,borderColor:X,body:ve}},htmlBuilder:hs,mathmlBuilder:Fs}),Nt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(d,m){var g=d.parser;return{type:"enclose",mode:g.mode,label:"\\fbox",body:m[0]}}}),Nt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(d,m,g){var w=d.parser,q=d.funcName,X=m[0];return{type:"enclose",mode:w.mode,label:q,body:X}},htmlBuilder:hs,mathmlBuilder:Fs});var aa={};function Yi(Q){for(var d=Q.type,m=Q.names,g=Q.props,w=Q.handler,q=Q.htmlBuilder,X=Q.mathmlBuilder,fe={type:d,numArgs:g.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:w},ve=0;ve<m.length;++ve)aa[m[ve]]=fe;q&&(Gi[d]=q),X&&(Qi[d]=X)}function Bs(Q){var d=[];Q.consumeSpaces();for(var m=Q.fetch().text;m==="\\hline"||m==="\\hdashline";)Q.consume(),d.push(m==="\\hdashline"),Q.consumeSpaces(),m=Q.fetch().text;return d}function Bn(Q,d,m){var g=d.hskipBeforeAndAfter,w=d.addJot,q=d.cols,X=d.arraystretch,fe=d.colSeparationType;if(Q.gullet.beginGroup(),Q.gullet.macros.set("\\\\","\\cr"),!X){var ve=Q.gullet.expandMacroAsText("\\arraystretch");if(ve==null)X=1;else if(X=parseFloat(ve),!X||X<0)throw new R("Invalid \\arraystretch: "+ve)}Q.gullet.beginGroup();var Ce=[],Be=[Ce],Ve=[],st=[];for(st.push(Bs(Q));;){var ut=Q.parseExpression(!1,"\\cr");Q.gullet.endGroup(),Q.gullet.beginGroup(),ut={type:"ordgroup",mode:Q.mode,body:ut},m&&(ut={type:"styling",mode:Q.mode,style:m,body:[ut]}),Ce.push(ut);var vt=Q.fetch().text;if(vt==="&")Q.consume();else if(vt==="\\end"){Ce.length===1&&ut.type==="styling"&&ut.body[0].body.length===0&&Be.pop(),st.length<Be.length+1&&st.push([]);break}else if(vt==="\\cr"){var Lt=Xt(Q.parseFunction(),"cr");Ve.push(Lt.size),st.push(Bs(Q)),Ce=[],Be.push(Ce)}else throw new R("Expected & or \\\\ or \\cr or \\end",Q.nextToken)}return Q.gullet.endGroup(),Q.gullet.endGroup(),{type:"array",mode:Q.mode,addJot:w,arraystretch:X,body:Be,cols:q,rowGaps:Ve,hskipBeforeAndAfter:g,hLinesBeforeRow:st,colSeparationType:fe}}function fs(Q){return Q.substr(0,1)==="d"?"display":"text"}var dn=function(d,m){var g,w,q=d.body.length,X=d.hLinesBeforeRow,fe=0,ve=new Array(q),Ce=[],Be=Math.max(m.fontMetrics().arrayRuleWidth,m.minRuleThickness),Ve=1/m.fontMetrics().ptPerEm,st=5*Ve;if(d.colSeparationType&&d.colSeparationType==="small"){var ut=m.havingStyle(k.SCRIPT).sizeMultiplier;st=.2778*(ut/m.sizeMultiplier)}var vt=12*Ve,Lt=3*Ve,Wt=d.arraystretch*vt,er=.7*Wt,ir=.3*Wt,tr=0;function kr(ea){for(var zn=0;zn<ea.length;++zn)zn>0&&(tr+=.25),Ce.push({pos:tr,isDashed:ea[zn]})}for(kr(X[0]),g=0;g<d.body.length;++g){var Ir=d.body[g],Hr=er,Gr=ir;fe<Ir.length&&(fe=Ir.length);var Xr=new Array(Ir.length);for(w=0;w<Ir.length;++w){var vi=fr(Ir[w],m);Gr<vi.depth&&(Gr=vi.depth),Hr<vi.height&&(Hr=vi.height),Xr[w]=vi}var ci=d.rowGaps[g],Tr=0;ci&&(Tr=dr(ci,m),Tr>0&&(Tr+=ir,Gr<Tr&&(Gr=Tr),Tr=0)),d.addJot&&(Gr+=Lt),Xr.height=Hr,Xr.depth=Gr,tr+=Hr,Xr.pos=tr,tr+=Gr+Tr,ve[g]=Xr,kr(X[g+1])}var $i=tr/2+m.fontMetrics().axisHeight,_n=d.cols||[],Xi=[],yi,vn;for(w=0,vn=0;w<fe||vn<_n.length;++w,++vn){for(var ni=_n[vn]||{},rn=!0;ni.type==="separator";){if(rn||(yi=Ue.makeSpan(["arraycolsep"],[]),yi.style.width=m.fontMetrics().doubleRuleSep+"em",Xi.push(yi)),ni.separator==="|"||ni.separator===":"){var to=ni.separator==="|"?"solid":"dashed",Xn=Ue.makeSpan(["vertical-separator"],[],m);Xn.style.height=tr+"em",Xn.style.borderRightWidth=Be+"em",Xn.style.borderRightStyle=to,Xn.style.margin="0 -"+Be/2+"em",Xn.style.verticalAlign=-(tr-$i)+"em",Xi.push(Xn)}else throw new R("Invalid separator type: "+ni.separator);vn++,ni=_n[vn]||{},rn=!1}if(!(w>=fe)){var Jn=void 0;(w>0||d.hskipBeforeAndAfter)&&(Jn=T.deflt(ni.pregap,st),Jn!==0&&(yi=Ue.makeSpan(["arraycolsep"],[]),yi.style.width=Jn+"em",Xi.push(yi)));var Qn=[];for(g=0;g<q;++g){var As=ve[g],Ts=As[w];if(Ts){var Un=As.pos-$i;Ts.depth=As.depth,Ts.height=As.height,Qn.push({type:"elem",elem:Ts,shift:Un})}}Qn=Ue.makeVList({positionType:"individualShift",children:Qn},m),Qn=Ue.makeSpan(["col-align-"+(ni.align||"c")],[Qn]),Xi.push(Qn),(w<fe-1||d.hskipBeforeAndAfter)&&(Jn=T.deflt(ni.postgap,st),Jn!==0&&(yi=Ue.makeSpan(["arraycolsep"],[]),yi.style.width=Jn+"em",Xi.push(yi)))}}if(ve=Ue.makeSpan(["mtable"],Xi),Ce.length>0){for(var Ta=Ue.makeLineSpan("hline",m,Be),ro=Ue.makeLineSpan("hdashline",m,Be),Js=[{type:"elem",elem:ve,shift:0}];Ce.length>0;){var Ds=Ce.pop(),Qs=Ds.pos-$i;Ds.isDashed?Js.push({type:"elem",elem:ro,shift:Qs}):Js.push({type:"elem",elem:Ta,shift:Qs})}ve=Ue.makeVList({positionType:"individualShift",children:Js},m)}return Ue.makeSpan(["mord"],[ve],m)},pn={c:"center ",l:"left ",r:"right "},An=function(d,m){var g=new yt.MathNode("mtable",d.body.map(function(tr){return new yt.MathNode("mtr",tr.map(function(kr){return new yt.MathNode("mtd",[xr(kr,m)])}))})),w=d.arraystretch===.5?.1:.16+d.arraystretch-1+(d.addJot?.09:0);g.setAttribute("rowspacing",w+"em");var q="",X="";if(d.cols){var fe=d.cols,ve="",Ce=!1,Be=0,Ve=fe.length;fe[0].type==="separator"&&(q+="top ",Be=1),fe[fe.length-1].type==="separator"&&(q+="bottom ",Ve-=1);for(var st=Be;st<Ve;st++)fe[st].type==="align"?(X+=pn[fe[st].align],Ce&&(ve+="none "),Ce=!0):fe[st].type==="separator"&&Ce&&(ve+=fe[st].separator==="|"?"solid ":"dashed ",Ce=!1);g.setAttribute("columnalign",X.trim()),/[sd]/.test(ve)&&g.setAttribute("columnlines",ve.trim())}if(d.colSeparationType==="align"){for(var ut=d.cols||[],vt="",Lt=1;Lt<ut.length;Lt++)vt+=Lt%2?"0em ":"1em ";g.setAttribute("columnspacing",vt.trim())}else d.colSeparationType==="alignat"?g.setAttribute("columnspacing","0em"):d.colSeparationType==="small"?g.setAttribute("columnspacing","0.2778em"):g.setAttribute("columnspacing","1em");var Wt="",er=d.hLinesBeforeRow;q+=er[0].length>0?"left ":"",q+=er[er.length-1].length>0?"right ":"";for(var ir=1;ir<er.length-1;ir++)Wt+=er[ir].length===0?"none ":er[ir][0]?"dashed ":"solid ";return/[sd]/.test(Wt)&&g.setAttribute("rowlines",Wt.trim()),q!==""&&(g=new yt.MathNode("menclose",[g]),g.setAttribute("notation",q.trim())),d.arraystretch&&d.arraystretch<1&&(g=new yt.MathNode("mstyle",[g]),g.setAttribute("scriptlevel","1")),g},oa=function(d,m){var g=[],w=Bn(d.parser,{cols:g,addJot:!0},"display"),q,X=0,fe={type:"ordgroup",mode:d.mode,body:[]},ve=Mr(m[0],"ordgroup");if(ve){for(var Ce="",Be=0;Be<ve.body.length;Be++){var Ve=Xt(ve.body[Be],"textord");Ce+=Ve.text}q=Number(Ce),X=q*2}var st=!X;w.body.forEach(function(Wt){for(var er=1;er<Wt.length;er+=2){var ir=Xt(Wt[er],"styling"),tr=Xt(ir.body[0],"ordgroup");tr.body.unshift(fe)}if(st)X<Wt.length&&(X=Wt.length);else{var kr=Wt.length/2;if(q<kr)throw new R("Too many math in a row: "+("expected "+q+", but got "+kr),Wt[0])}});for(var ut=0;ut<X;++ut){var vt="r",Lt=0;ut%2===1?vt="l":ut>0&&st&&(Lt=1),g[ut]={type:"align",align:vt,pregap:Lt,postgap:0}}return w.colSeparationType=st?"align":"alignat",w};Yi({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(d,m){var g=Si(m[0]),w=g?[m[0]]:Xt(m[0],"ordgroup").body,q=w.map(function(fe){var ve=ln(fe),Ce=ve.text;if("lcr".indexOf(Ce)!==-1)return{type:"align",align:Ce};if(Ce==="|")return{type:"separator",separator:"|"};if(Ce===":")return{type:"separator",separator:":"};throw new R("Unknown column alignment: "+Ce,fe)}),X={cols:q,hskipBeforeAndAfter:!0};return Bn(d.parser,X,fs(d.envName))},htmlBuilder:dn,mathmlBuilder:An}),Yi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(d){var m={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[d.envName],g={hskipBeforeAndAfter:!1},w=Bn(d.parser,g,fs(d.envName));return m?{type:"leftright",mode:d.mode,body:[w],left:m[0],right:m[1],rightColor:void 0}:w},htmlBuilder:dn,mathmlBuilder:An}),Yi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(d){var m={arraystretch:.5},g=Bn(d.parser,m,"script");return g.colSeparationType="small",g},htmlBuilder:dn,mathmlBuilder:An}),Yi({type:"array",names:["subarray"],props:{numArgs:1},handler:function(d,m){var g=Si(m[0]),w=g?[m[0]]:Xt(m[0],"ordgroup").body,q=w.map(function(fe){var ve=ln(fe),Ce=ve.text;if("lc".indexOf(Ce)!==-1)return{type:"align",align:Ce};throw new R("Unknown column alignment: "+Ce,fe)});if(q.length>1)throw new R("{subarray} can contain only one column");var X={cols:q,hskipBeforeAndAfter:!1,arraystretch:.5};if(X=Bn(d.parser,X,"script"),X.body[0].length>1)throw new R("{subarray} can contain only one column");return X},htmlBuilder:dn,mathmlBuilder:An}),Yi({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(d){var m={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},g=Bn(d.parser,m,fs(d.envName));return{type:"leftright",mode:d.mode,body:[g],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:dn,mathmlBuilder:An}),Yi({type:"array",names:["aligned"],props:{numArgs:0},handler:oa,htmlBuilder:dn,mathmlBuilder:An}),Yi({type:"array",names:["gathered"],props:{numArgs:0},handler:function(d){var m={cols:[{type:"align",align:"c"}],addJot:!0};return Bn(d.parser,m,"display")},htmlBuilder:dn,mathmlBuilder:An}),Yi({type:"array",names:["alignedat"],props:{numArgs:1},handler:oa,htmlBuilder:dn,mathmlBuilder:An}),Nt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(d,m){throw new R(d.funcName+" valid only within array environment")}});var Ha=aa,la=Ha;Nt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(d,m){var g=d.parser,w=d.funcName,q=m[0];if(q.type!=="ordgroup")throw new R("Invalid environment name",q);for(var X="",fe=0;fe<q.body.length;++fe)X+=Xt(q.body[fe],"textord").text;if(w==="\\begin"){if(!la.hasOwnProperty(X))throw new R("No such environment: "+X,q);var ve=la[X],Ce=g.parseArguments("\\begin{"+X+"}",ve),Be=Ce.args,Ve=Ce.optArgs,st={mode:g.mode,envName:X,parser:g},ut=ve.handler(st,Be,Ve);g.expect("\\end",!1);var vt=g.nextToken,Lt=Xt(g.parseFunction(),"environment");if(Lt.name!==X)throw new R("Mismatch: \\begin{"+X+"} matched by \\end{"+Lt.name+"}",vt);return ut}return{type:"environment",mode:g.mode,name:X,nameGroup:q}}});var $a=Ue.makeSpan;function ds(Q,d){var m=Yr(Q.body,d,!0);return $a([Q.mclass],m,d)}function ua(Q,d){var m,g=ui(Q.body,d);return Q.mclass==="minner"?yt.newDocumentFragment(g):(Q.mclass==="mord"?Q.isCharacterBox?(m=g[0],m.type="mi"):m=new yt.MathNode("mi",g):(Q.isCharacterBox?(m=g[0],m.type="mo"):m=new yt.MathNode("mo",g),Q.mclass==="mbin"?(m.attributes.lspace="0.22em",m.attributes.rspace="0.22em"):Q.mclass==="mpunct"?(m.attributes.lspace="0em",m.attributes.rspace="0.17em"):(Q.mclass==="mopen"||Q.mclass==="mclose")&&(m.attributes.lspace="0em",m.attributes.rspace="0em")),m)}Nt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(d,m){var g=d.parser,w=d.funcName,q=m[0];return{type:"mclass",mode:g.mode,mclass:"m"+w.substr(5),body:Qr(q),isCharacterBox:T.isCharacterBox(q)}},htmlBuilder:ds,mathmlBuilder:ua});var ht=function(d){var m=d.type==="ordgroup"&&d.body.length?d.body[0]:d;return m.type==="atom"&&(m.family==="bin"||m.family==="rel")?"m"+m.family:"mord"};Nt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(d,m){var g=d.parser;return{type:"mclass",mode:g.mode,mclass:ht(m[0]),body:[m[1]],isCharacterBox:T.isCharacterBox(m[1])}}}),Nt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(d,m){var g=d.parser,w=d.funcName,q=m[1],X=m[0],fe;w!=="\\stackrel"?fe=ht(q):fe="mrel";var ve={type:"op",mode:q.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:w!=="\\stackrel",body:Qr(q)},Ce={type:"supsub",mode:X.mode,base:ve,sup:w==="\\underset"?null:X,sub:w==="\\underset"?X:null};return{type:"mclass",mode:g.mode,mclass:fe,body:[Ce],isCharacterBox:T.isCharacterBox(Ce)}},htmlBuilder:ds,mathmlBuilder:ua});var ps=function(d,m){var g=d.font,w=m.withFont(g);return fr(d.body,w)},Ns=function(d,m){var g=d.font,w=m.withFont(g);return xr(d.body,w)},ca={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Nt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(d,m){var g=d.parser,w=d.funcName,q=m[0],X=w;return X in ca&&(X=ca[X]),{type:"font",mode:g.mode,font:X.slice(1),body:q}},htmlBuilder:ps,mathmlBuilder:Ns}),Nt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(d,m){var g=d.parser,w=m[0],q=T.isCharacterBox(w);return{type:"mclass",mode:g.mode,mclass:ht(w),body:[{type:"font",mode:g.mode,font:"boldsymbol",body:w}],isCharacterBox:q}}}),Nt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(d,m){var g=d.parser,w=d.funcName,q=d.breakOnTokenText,X=g.mode,fe=g.parseExpression(!0,q),ve="math"+w.slice(1);return{type:"font",mode:X,font:ve,body:{type:"ordgroup",mode:g.mode,body:fe}}},htmlBuilder:ps,mathmlBuilder:Ns});var ha=function(d,m){var g=m;return d==="display"?g=g.id>=k.SCRIPT.id?g.text():k.DISPLAY:d==="text"&&g.size===k.DISPLAY.size?g=k.TEXT:d==="script"?g=k.SCRIPT:d==="scriptscript"&&(g=k.SCRIPTSCRIPT),g},Us=function(d,m){var g=ha(d.size,m.style),w=g.fracNum(),q=g.fracDen(),X;X=m.havingStyle(w);var fe=fr(d.numer,X,m);if(d.continued){var ve=8.5/m.fontMetrics().ptPerEm,Ce=3.5/m.fontMetrics().ptPerEm;fe.height=fe.height<ve?ve:fe.height,fe.depth=fe.depth<Ce?Ce:fe.depth}X=m.havingStyle(q);var Be=fr(d.denom,X,m),Ve,st,ut;d.hasBarLine?(d.barSize?(st=dr(d.barSize,m),Ve=Ue.makeLineSpan("frac-line",m,st)):Ve=Ue.makeLineSpan("frac-line",m),st=Ve.height,ut=Ve.height):(Ve=null,st=0,ut=m.fontMetrics().defaultRuleThickness);var vt,Lt,Wt;g.size===k.DISPLAY.size||d.size==="display"?(vt=m.fontMetrics().num1,st>0?Lt=3*ut:Lt=7*ut,Wt=m.fontMetrics().denom1):(st>0?(vt=m.fontMetrics().num2,Lt=ut):(vt=m.fontMetrics().num3,Lt=3*ut),Wt=m.fontMetrics().denom2);var er;if(Ve){var tr=m.fontMetrics().axisHeight;vt-fe.depth-(tr+.5*st)<Lt&&(vt+=Lt-(vt-fe.depth-(tr+.5*st))),tr-.5*st-(Be.height-Wt)<Lt&&(Wt+=Lt-(tr-.5*st-(Be.height-Wt)));var kr=-(tr-.5*st);er=Ue.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Be,shift:Wt},{type:"elem",elem:Ve,shift:kr},{type:"elem",elem:fe,shift:-vt}]},m)}else{var ir=vt-fe.depth-(Be.height-Wt);ir<Lt&&(vt+=.5*(Lt-ir),Wt+=.5*(Lt-ir)),er=Ue.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Be,shift:Wt},{type:"elem",elem:fe,shift:-vt}]},m)}X=m.havingStyle(g),er.height*=X.sizeMultiplier/m.sizeMultiplier,er.depth*=X.sizeMultiplier/m.sizeMultiplier;var Ir;g.size===k.DISPLAY.size?Ir=m.fontMetrics().delim1:Ir=m.fontMetrics().delim2;var Hr,Gr;return d.leftDelim==null?Hr=Ei(m,["mopen"]):Hr=qi.customSizedDelim(d.leftDelim,Ir,!0,m.havingStyle(g),d.mode,["mopen"]),d.continued?Gr=Ue.makeSpan([]):d.rightDelim==null?Gr=Ei(m,["mclose"]):Gr=qi.customSizedDelim(d.rightDelim,Ir,!0,m.havingStyle(g),d.mode,["mclose"]),Ue.makeSpan(["mord"].concat(X.sizingClasses(m)),[Hr,Ue.makeSpan(["mfrac"],[er]),Gr],m)},zs=function(d,m){var g=new yt.MathNode("mfrac",[xr(d.numer,m),xr(d.denom,m)]);if(!d.hasBarLine)g.setAttribute("linethickness","0px");else if(d.barSize){var w=dr(d.barSize,m);g.setAttribute("linethickness",w+"em")}var q=ha(d.size,m.style);if(q.size!==m.style.size){g=new yt.MathNode("mstyle",[g]);var X=q.size===k.DISPLAY.size?"true":"false";g.setAttribute("displaystyle",X),g.setAttribute("scriptlevel","0")}if(d.leftDelim!=null||d.rightDelim!=null){var fe=[];if(d.leftDelim!=null){var ve=new yt.MathNode("mo",[new yt.TextNode(d.leftDelim.replace("\\",""))]);ve.setAttribute("fence","true"),fe.push(ve)}if(fe.push(g),d.rightDelim!=null){var Ce=new yt.MathNode("mo",[new yt.TextNode(d.rightDelim.replace("\\",""))]);Ce.setAttribute("fence","true"),fe.push(Ce)}return On(fe)}return g};Nt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(d,m){var g=d.parser,w=d.funcName,q=m[0],X=m[1],fe,ve=null,Ce=null,Be="auto";switch(w){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":fe=!0;break;case"\\\\atopfrac":fe=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":fe=!1,ve="(",Ce=")";break;case"\\\\bracefrac":fe=!1,ve="\\{",Ce="\\}";break;case"\\\\brackfrac":fe=!1,ve="[",Ce="]";break;default:throw new Error("Unrecognized genfrac command")}switch(w){case"\\cfrac":case"\\dfrac":case"\\dbinom":Be="display";break;case"\\tfrac":case"\\tbinom":Be="text";break}return{type:"genfrac",mode:g.mode,continued:w==="\\cfrac",numer:q,denom:X,hasBarLine:fe,leftDelim:ve,rightDelim:Ce,size:Be,barSize:null}},htmlBuilder:Us,mathmlBuilder:zs}),Nt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(d){var m=d.parser,g=d.funcName,w=d.token,q;switch(g){case"\\over":q="\\frac";break;case"\\choose":q="\\binom";break;case"\\atop":q="\\\\atopfrac";break;case"\\brace":q="\\\\bracefrac";break;case"\\brack":q="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:m.mode,replaceWith:q,token:w}}});var Zi=["display","text","script","scriptscript"],ms=function(d){var m=null;return d.length>0&&(m=d,m=m==="."?null:m),m};Nt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(d,m){var g=d.parser,w=m[4],q=m[5],X=Mr(m[0],"atom");X&&(X=Wi(m[0],"open"));var fe=X?ms(X.text):null,ve=Mr(m[1],"atom");ve&&(ve=Wi(m[1],"close"));var Ce=ve?ms(ve.text):null,Be=Xt(m[2],"size"),Ve,st=null;Be.isBlank?Ve=!0:(st=Be.value,Ve=st.number>0);var ut="auto",vt=Mr(m[3],"ordgroup");if(vt){if(vt.body.length>0){var Lt=Xt(vt.body[0],"textord");ut=Zi[Number(Lt.text)]}}else vt=Xt(m[3],"textord"),ut=Zi[Number(vt.text)];return{type:"genfrac",mode:g.mode,numer:w,denom:q,continued:!1,hasBarLine:Ve,barSize:st,leftDelim:fe,rightDelim:Ce,size:ut}},htmlBuilder:Us,mathmlBuilder:zs}),Nt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(d,m){var g=d.parser,w=d.funcName,q=d.token;return{type:"infix",mode:g.mode,replaceWith:"\\\\abovefrac",size:Xt(m[0],"size").value,token:q}}}),Nt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(d,m){var g=d.parser,w=d.funcName,q=m[0],X=S(Xt(m[1],"infix").size),fe=m[2],ve=X.number>0;return{type:"genfrac",mode:g.mode,numer:q,denom:fe,continued:!1,hasBarLine:ve,barSize:X,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Us,mathmlBuilder:zs});var fa=function(d,m){var g=m.style,w,q,X=Mr(d,"supsub");X?(w=X.sup?fr(X.sup,m.havingStyle(g.sup()),m):fr(X.sub,m.havingStyle(g.sub()),m),q=Xt(X.base,"horizBrace")):q=Xt(d,"horizBrace");var fe=fr(q.base,m.havingBaseStyle(k.DISPLAY)),ve=Mt.svgSpan(q,m),Ce;if(q.isOver?(Ce=Ue.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:fe},{type:"kern",size:.1},{type:"elem",elem:ve}]},m),Ce.children[0].children[0].children[1].classes.push("svg-align")):(Ce=Ue.makeVList({positionType:"bottom",positionData:fe.depth+.1+ve.height,children:[{type:"elem",elem:ve},{type:"kern",size:.1},{type:"elem",elem:fe}]},m),Ce.children[0].children[0].children[0].classes.push("svg-align")),w){var Be=Ue.makeSpan(["mord",q.isOver?"mover":"munder"],[Ce],m);q.isOver?Ce=Ue.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Be},{type:"kern",size:.2},{type:"elem",elem:w}]},m):Ce=Ue.makeVList({positionType:"bottom",positionData:Be.depth+.2+w.height+w.depth,children:[{type:"elem",elem:w},{type:"kern",size:.2},{type:"elem",elem:Be}]},m)}return Ue.makeSpan(["mord",q.isOver?"mover":"munder"],[Ce],m)},ja=function(d,m){var g=Mt.mathMLnode(d.label);return new yt.MathNode(d.isOver?"mover":"munder",[xr(d.base,m),g])};Nt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(d,m){var g=d.parser,w=d.funcName;return{type:"horizBrace",mode:g.mode,label:w,isOver:/^\\over/.test(w),base:m[0]}},htmlBuilder:fa,mathmlBuilder:ja}),Nt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(d,m){var g=d.parser,w=m[1],q=Xt(m[0],"url").url;return g.settings.isTrusted({command:"\\href",url:q})?{type:"href",mode:g.mode,href:q,body:Qr(w)}:g.formatUnsupportedCmd("\\href")},htmlBuilder:function(d,m){var g=Yr(d.body,m,!1);return Ue.makeAnchor(d.href,[],g,m)},mathmlBuilder:function(d,m){var g=ei(d.body,m);return g instanceof gi||(g=new gi("mrow",[g])),g.setAttribute("href",d.href),g}}),Nt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(d,m){var g=d.parser,w=Xt(m[0],"url").url;if(!g.settings.isTrusted({command:"\\url",url:w}))return g.formatUnsupportedCmd("\\url");for(var q=[],X=0;X<w.length;X++){var fe=w[X];fe==="~"&&(fe="\\textasciitilde"),q.push({type:"textord",mode:"text",text:fe})}var ve={type:"text",mode:g.mode,font:"\\texttt",body:q};return{type:"href",mode:g.mode,href:w,body:Qr(ve)}}}),Nt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(d,m){var g=d.parser;return{type:"htmlmathml",mode:g.mode,html:Qr(m[0]),mathml:Qr(m[1])}},htmlBuilder:function(d,m){var g=Yr(d.html,m,!1);return Ue.makeFragment(g)},mathmlBuilder:function(d,m){return ei(d.mathml,m)}});var gs=function(d){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(d))return{number:+d,unit:"bp"};var m=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(d);if(!m)throw new R("Invalid size: '"+d+"' in \\includegraphics");var g={number:+(m[1]+m[2]),unit:m[3]};if(!Pr(g))throw new R("Invalid unit: '"+g.unit+"' in \\includegraphics.");return g};Nt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(d,m,g){var w=d.parser,q={number:0,unit:"em"},X={number:.9,unit:"em"},fe={number:0,unit:"em"},ve="";if(g[0])for(var Ce=Xt(g[0],"raw").string,Be=Ce.split(","),Ve=0;Ve<Be.length;Ve++){var st=Be[Ve].split("=");if(st.length===2){var ut=st[1].trim();switch(st[0].trim()){case"alt":ve=ut;break;case"width":q=gs(ut);break;case"height":X=gs(ut);break;case"totalheight":fe=gs(ut);break;default:throw new R("Invalid key: '"+st[0]+"' in \\includegraphics.")}}}var vt=Xt(m[0],"url").url;return ve===""&&(ve=vt,ve=ve.replace(/^.*[\\/]/,""),ve=ve.substring(0,ve.lastIndexOf("."))),w.settings.isTrusted({command:"\\includegraphics",url:vt})?{type:"includegraphics",mode:w.mode,alt:ve,width:q,height:X,totalheight:fe,src:vt}:w.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(d,m){var g=dr(d.height,m),w=0;d.totalheight.number>0&&(w=dr(d.totalheight,m)-g,w=Number(w.toFixed(2)));var q=0;d.width.number>0&&(q=dr(d.width,m));var X={height:g+w+"em"};q>0&&(X.width=q+"em"),w>0&&(X.verticalAlign=-w+"em");var fe=new nt(d.src,d.alt,X);return fe.height=g,fe.depth=w,fe},mathmlBuilder:function(d,m){var g=new yt.MathNode("mglyph",[]);g.setAttribute("alt",d.alt);var w=dr(d.height,m),q=0;if(d.totalheight.number>0&&(q=dr(d.totalheight,m)-w,q=q.toFixed(2),g.setAttribute("valign","-"+q+"em")),g.setAttribute("height",w+q+"em"),d.width.number>0){var X=dr(d.width,m);g.setAttribute("width",X+"em")}return g.setAttribute("src",d.src),g}}),Nt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(d,m){var g=d.parser,w=d.funcName,q=Xt(m[0],"size");if(g.settings.strict){var X=w[1]==="m",fe=q.value.unit==="mu";X?(fe||g.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+w+" supports only mu units, "+("not "+q.value.unit+" units")),g.mode!=="math"&&g.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+w+" works only in math mode")):fe&&g.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+w+" doesn't support mu units")}return{type:"kern",mode:g.mode,dimension:q.value}},htmlBuilder:function(d,m){return Ue.makeGlue(d.dimension,m)},mathmlBuilder:function(d,m){var g=dr(d.dimension,m);return new yt.SpaceNode(g)}}),Nt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(d,m){var g=d.parser,w=d.funcName,q=m[0];return{type:"lap",mode:g.mode,alignment:w.slice(5),body:q}},htmlBuilder:function(d,m){var g;d.alignment==="clap"?(g=Ue.makeSpan([],[fr(d.body,m)]),g=Ue.makeSpan(["inner"],[g],m)):g=Ue.makeSpan(["inner"],[fr(d.body,m)]);var w=Ue.makeSpan(["fix"],[]),q=Ue.makeSpan([d.alignment],[g,w],m),X=Ue.makeSpan(["strut"]);return X.style.height=q.height+q.depth+"em",X.style.verticalAlign=-q.depth+"em",q.children.unshift(X),q=Ue.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:q}]},m),Ue.makeSpan(["mord"],[q],m)},mathmlBuilder:function(d,m){var g=new yt.MathNode("mpadded",[xr(d.body,m)]);if(d.alignment!=="rlap"){var w=d.alignment==="llap"?"-1":"-0.5";g.setAttribute("lspace",w+"width")}return g.setAttribute("width","0px"),g}}),Nt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(d,m){var g=d.funcName,w=d.parser,q=w.mode;w.switchMode("math");var X=g==="\\("?"\\)":"$",fe=w.parseExpression(!1,X);return w.expect(X),w.switchMode(q),{type:"styling",mode:w.mode,style:"text",body:fe}}}),Nt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(d,m){throw new R("Mismatched "+d.funcName)}});var Hs=function(d,m){switch(m.style.size){case k.DISPLAY.size:return d.display;case k.TEXT.size:return d.text;case k.SCRIPT.size:return d.script;case k.SCRIPTSCRIPT.size:return d.scriptscript;default:return d.text}};Nt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(d,m){var g=d.parser;return{type:"mathchoice",mode:g.mode,display:Qr(m[0]),text:Qr(m[1]),script:Qr(m[2]),scriptscript:Qr(m[3])}},htmlBuilder:function(d,m){var g=Hs(d,m),w=Yr(g,m,!1);return Ue.makeFragment(w)},mathmlBuilder:function(d,m){var g=Hs(d,m);return ei(g,m)}});var _s=function(d,m,g,w,q,X,fe){d=Ue.makeSpan([],[d]);var ve,Ce;if(m){var Be=fr(m,w.havingStyle(q.sup()),w);Ce={elem:Be,kern:Math.max(w.fontMetrics().bigOpSpacing1,w.fontMetrics().bigOpSpacing3-Be.depth)}}if(g){var Ve=fr(g,w.havingStyle(q.sub()),w);ve={elem:Ve,kern:Math.max(w.fontMetrics().bigOpSpacing2,w.fontMetrics().bigOpSpacing4-Ve.height)}}var st;if(Ce&&ve){var ut=w.fontMetrics().bigOpSpacing5+ve.elem.height+ve.elem.depth+ve.kern+d.depth+fe;st=Ue.makeVList({positionType:"bottom",positionData:ut,children:[{type:"kern",size:w.fontMetrics().bigOpSpacing5},{type:"elem",elem:ve.elem,marginLeft:-X+"em"},{type:"kern",size:ve.kern},{type:"elem",elem:d},{type:"kern",size:Ce.kern},{type:"elem",elem:Ce.elem,marginLeft:X+"em"},{type:"kern",size:w.fontMetrics().bigOpSpacing5}]},w)}else if(ve){var vt=d.height-fe;st=Ue.makeVList({positionType:"top",positionData:vt,children:[{type:"kern",size:w.fontMetrics().bigOpSpacing5},{type:"elem",elem:ve.elem,marginLeft:-X+"em"},{type:"kern",size:ve.kern},{type:"elem",elem:d}]},w)}else if(Ce){var Lt=d.depth+fe;st=Ue.makeVList({positionType:"bottom",positionData:Lt,children:[{type:"elem",elem:d},{type:"kern",size:Ce.kern},{type:"elem",elem:Ce.elem,marginLeft:X+"em"},{type:"kern",size:w.fontMetrics().bigOpSpacing5}]},w)}else return d;return Ue.makeSpan(["mop","op-limits"],[st],w)},da=["\\smallint"],mn=function(d,m){var g,w,q=!1,X,fe=Mr(d,"supsub");fe?(g=fe.sup,w=fe.sub,X=Xt(fe.base,"op"),q=!0):X=Xt(d,"op");var ve=m.style,Ce=!1;ve.size===k.DISPLAY.size&&X.symbol&&!T.contains(da,X.name)&&(Ce=!0);var Be;if(X.symbol){var Ve=Ce?"Size2-Regular":"Size1-Regular",st="";if((X.name==="\\oiint"||X.name==="\\oiiint")&&(st=X.name.substr(1),X.name=st==="oiint"?"\\iint":"\\iiint"),Be=Ue.makeSymbol(X.name,Ve,"math",m,["mop","op-symbol",Ce?"large-op":"small-op"]),st.length>0){var ut=Be.italic,vt=Ue.staticSvg(st+"Size"+(Ce?"2":"1"),m);Be=Ue.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Be,shift:0},{type:"elem",elem:vt,shift:Ce?.08:0}]},m),X.name="\\"+st,Be.classes.unshift("mop"),Be.italic=ut}}else if(X.body){var Lt=Yr(X.body,m,!0);Lt.length===1&&Lt[0]instanceof ye?(Be=Lt[0],Be.classes[0]="mop"):Be=Ue.makeSpan(["mop"],Ue.tryCombineChars(Lt),m)}else{for(var Wt=[],er=1;er<X.name.length;er++)Wt.push(Ue.mathsym(X.name[er],X.mode,m));Be=Ue.makeSpan(["mop"],Wt,m)}var ir=0,tr=0;return(Be instanceof ye||X.name==="\\oiint"||X.name==="\\oiiint")&&!X.suppressBaseShift&&(ir=(Be.height-Be.depth)/2-m.fontMetrics().axisHeight,tr=Be.italic),q?_s(Be,g,w,m,ve,tr,ir):(ir&&(Be.style.position="relative",Be.style.top=ir+"em"),Be)},ns=function(d,m){var g;if(d.symbol)g=new gi("mo",[_i(d.name,d.mode)]),T.contains(da,d.name)&&g.setAttribute("largeop","false");else if(d.body)g=new gi("mo",ui(d.body,m));else{g=new gi("mi",[new cn(d.name.slice(1))]);var w=new gi("mo",[_i("\u2061","text")]);d.parentIsSupSub?g=new gi("mo",[g,w]):g=In([g,w])}return g},Wa={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Nt({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(d,m){var g=d.parser,w=d.funcName,q=w;return q.length===1&&(q=Wa[q]),{type:"op",mode:g.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:q}},htmlBuilder:mn,mathmlBuilder:ns}),Nt({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(d,m){var g=d.parser,w=m[0];return{type:"op",mode:g.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Qr(w)}},htmlBuilder:mn,mathmlBuilder:ns});var pa={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Nt({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(d){var m=d.parser,g=d.funcName;return{type:"op",mode:m.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:g}},htmlBuilder:mn,mathmlBuilder:ns}),Nt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(d){var m=d.parser,g=d.funcName;return{type:"op",mode:m.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:g}},htmlBuilder:mn,mathmlBuilder:ns}),Nt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(d){var m=d.parser,g=d.funcName,w=g;return w.length===1&&(w=pa[w]),{type:"op",mode:m.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:w}},htmlBuilder:mn,mathmlBuilder:ns});var $s=function(d,m){var g,w,q=!1,X,fe=Mr(d,"supsub");fe?(g=fe.sup,w=fe.sub,X=Xt(fe.base,"operatorname"),q=!0):X=Xt(d,"operatorname");var ve;if(X.body.length>0){for(var Ce=X.body.map(function(ut){var vt=ut.text;return typeof vt=="string"?{type:"textord",mode:ut.mode,text:vt}:ut}),Be=Yr(Ce,m.withFont("mathrm"),!0),Ve=0;Ve<Be.length;Ve++){var st=Be[Ve];st instanceof ye&&(st.text=st.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}ve=Ue.makeSpan(["mop"],Be,m)}else ve=Ue.makeSpan(["mop"],[],m);return q?_s(ve,g,w,m,m.style,0,0):ve},Ga=function(d,m){for(var g=ui(d.body,m.withFont("mathrm")),w=!0,q=0;q<g.length;q++){var X=g[q];if(!(X instanceof yt.SpaceNode))if(X instanceof yt.MathNode)switch(X.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var fe=X.children[0];X.children.length===1&&fe instanceof yt.TextNode?fe.text=fe.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):w=!1;break}default:w=!1}else w=!1}if(w){var ve=g.map(function(Ve){return Ve.toText()}).join("");g=[new yt.TextNode(ve)]}var Ce=new yt.MathNode("mi",g);Ce.setAttribute("mathvariant","normal");var Be=new yt.MathNode("mo",[_i("\u2061","text")]);return d.parentIsSupSub?new yt.MathNode("mo",[Ce,Be]):yt.newDocumentFragment([Ce,Be])};Nt({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(d,m){var g=d.parser,w=d.funcName,q=m[0];return{type:"operatorname",mode:g.mode,body:Qr(q),alwaysHandleSupSub:w==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:$s,mathmlBuilder:Ga}),Ai({type:"ordgroup",htmlBuilder:function(d,m){return d.semisimple?Ue.makeFragment(Yr(d.body,m,!1)):Ue.makeSpan(["mord"],Yr(d.body,m,!0),m)},mathmlBuilder:function(d,m){return ei(d.body,m,!0)}}),Nt({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(d,m){var g=d.parser,w=m[0];return{type:"overline",mode:g.mode,body:w}},htmlBuilder:function(d,m){var g=fr(d.body,m.havingCrampedStyle()),w=Ue.makeLineSpan("overline-line",m),q=m.fontMetrics().defaultRuleThickness,X=Ue.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:g},{type:"kern",size:3*q},{type:"elem",elem:w},{type:"kern",size:q}]},m);return Ue.makeSpan(["mord","overline"],[X],m)},mathmlBuilder:function(d,m){var g=new yt.MathNode("mo",[new yt.TextNode("\u203E")]);g.setAttribute("stretchy","true");var w=new yt.MathNode("mover",[xr(d.body,m),g]);return w.setAttribute("accent","true"),w}}),Nt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(d,m){var g=d.parser,w=m[0];return{type:"phantom",mode:g.mode,body:Qr(w)}},htmlBuilder:function(d,m){var g=Yr(d.body,m.withPhantom(),!1);return Ue.makeFragment(g)},mathmlBuilder:function(d,m){var g=ui(d.body,m);return new yt.MathNode("mphantom",g)}}),Nt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(d,m){var g=d.parser,w=m[0];return{type:"hphantom",mode:g.mode,body:w}},htmlBuilder:function(d,m){var g=Ue.makeSpan([],[fr(d.body,m.withPhantom())]);if(g.height=0,g.depth=0,g.children)for(var w=0;w<g.children.length;w++)g.children[w].height=0,g.children[w].depth=0;return g=Ue.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:g}]},m),Ue.makeSpan(["mord"],[g],m)},mathmlBuilder:function(d,m){var g=ui(Qr(d.body),m),w=new yt.MathNode("mphantom",g),q=new yt.MathNode("mpadded",[w]);return q.setAttribute("height","0px"),q.setAttribute("depth","0px"),q}}),Nt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(d,m){var g=d.parser,w=m[0];return{type:"vphantom",mode:g.mode,body:w}},htmlBuilder:function(d,m){var g=Ue.makeSpan(["inner"],[fr(d.body,m.withPhantom())]),w=Ue.makeSpan(["fix"],[]);return Ue.makeSpan(["mord","rlap"],[g,w],m)},mathmlBuilder:function(d,m){var g=ui(Qr(d.body),m),w=new yt.MathNode("mphantom",g),q=new yt.MathNode("mpadded",[w]);return q.setAttribute("width","0px"),q}}),Nt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(d,m){var g=d.parser,w=Xt(m[0],"size").value,q=m[1];return{type:"raisebox",mode:g.mode,dy:w,body:q}},htmlBuilder:function(d,m){var g=fr(d.body,m),w=dr(d.dy,m);return Ue.makeVList({positionType:"shift",positionData:-w,children:[{type:"elem",elem:g}]},m)},mathmlBuilder:function(d,m){var g=new yt.MathNode("mpadded",[xr(d.body,m)]),w=d.dy.number+d.dy.unit;return g.setAttribute("voffset",w),g}}),Nt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(d,m,g){var w=d.parser,q=g[0],X=Xt(m[0],"size"),fe=Xt(m[1],"size");return{type:"rule",mode:w.mode,shift:q&&Xt(q,"size").value,width:X.value,height:fe.value}},htmlBuilder:function(d,m){var g=Ue.makeSpan(["mord","rule"],[],m),w=dr(d.width,m),q=dr(d.height,m),X=d.shift?dr(d.shift,m):0;return g.style.borderRightWidth=w+"em",g.style.borderTopWidth=q+"em",g.style.bottom=X+"em",g.width=w,g.height=q+X,g.depth=-X,g.maxFontSize=q*1.125*m.sizeMultiplier,g},mathmlBuilder:function(d,m){var g=dr(d.width,m),w=dr(d.height,m),q=d.shift?dr(d.shift,m):0,X=m.color&&m.getColor()||"black",fe=new yt.MathNode("mspace");fe.setAttribute("mathbackground",X),fe.setAttribute("width",g+"em"),fe.setAttribute("height",w+"em");var ve=new yt.MathNode("mpadded",[fe]);return q>=0?ve.setAttribute("height","+"+q+"em"):(ve.setAttribute("height",q+"em"),ve.setAttribute("depth","+"+-q+"em")),ve.setAttribute("voffset",q+"em"),ve}});function js(Q,d,m){for(var g=Yr(Q,d,!1),w=d.sizeMultiplier/m.sizeMultiplier,q=0;q<g.length;q++){var X=g[q].classes.indexOf("sizing");X<0?Array.prototype.push.apply(g[q].classes,d.sizingClasses(m)):g[q].classes[X+1]==="reset-size"+d.size&&(g[q].classes[X+1]="reset-size"+m.size),g[q].height*=w,g[q].depth*=w}return Ue.makeFragment(g)}var ss=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Ka=function(d,m){var g=m.havingSize(d.size);return js(d.body,g,m)};Nt({type:"sizing",names:ss,props:{numArgs:0,allowedInText:!0},handler:function(d,m){var g=d.breakOnTokenText,w=d.funcName,q=d.parser,X=q.parseExpression(!1,g);return{type:"sizing",mode:q.mode,size:ss.indexOf(w)+1,body:X}},htmlBuilder:Ka,mathmlBuilder:function(d,m){var g=m.havingSize(d.size),w=ui(d.body,g),q=new yt.MathNode("mstyle",w);return q.setAttribute("mathsize",g.sizeMultiplier+"em"),q}}),Nt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(d,m,g){var w=d.parser,q=!1,X=!1,fe=g[0]&&Xt(g[0],"ordgroup");if(fe)for(var ve="",Ce=0;Ce<fe.body.length;++Ce){var Be=fe.body[Ce];if(ve=Be.text,ve==="t")q=!0;else if(ve==="b")X=!0;else{q=!1,X=!1;break}}else q=!0,X=!0;var Ve=m[0];return{type:"smash",mode:w.mode,body:Ve,smashHeight:q,smashDepth:X}},htmlBuilder:function(d,m){var g=Ue.makeSpan([],[fr(d.body,m)]);if(!d.smashHeight&&!d.smashDepth)return g;if(d.smashHeight&&(g.height=0,g.children))for(var w=0;w<g.children.length;w++)g.children[w].height=0;if(d.smashDepth&&(g.depth=0,g.children))for(var q=0;q<g.children.length;q++)g.children[q].depth=0;var X=Ue.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:g}]},m);return Ue.makeSpan(["mord"],[X],m)},mathmlBuilder:function(d,m){var g=new yt.MathNode("mpadded",[xr(d.body,m)]);return d.smashHeight&&g.setAttribute("height","0px"),d.smashDepth&&g.setAttribute("depth","0px"),g}}),Nt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(d,m,g){var w=d.parser,q=g[0],X=m[0];return{type:"sqrt",mode:w.mode,body:X,index:q}},htmlBuilder:function(d,m){var g=fr(d.body,m.havingCrampedStyle());g.height===0&&(g.height=m.fontMetrics().xHeight),g=Ue.wrapFragment(g,m);var w=m.fontMetrics(),q=w.defaultRuleThickness,X=q;m.style.id<k.TEXT.id&&(X=m.fontMetrics().xHeight);var fe=q+X/4,ve=g.height+g.depth+fe+q,Ce=qi.sqrtImage(ve,m),Be=Ce.span,Ve=Ce.ruleWidth,st=Ce.advanceWidth,ut=Be.height-Ve;ut>g.height+g.depth+fe&&(fe=(fe+ut-g.height-g.depth)/2);var vt=Be.height-g.height-fe-Ve;g.style.paddingLeft=st+"em";var Lt=Ue.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:g,wrapperClasses:["svg-align"]},{type:"kern",size:-(g.height+vt)},{type:"elem",elem:Be},{type:"kern",size:Ve}]},m);if(d.index){var Wt=m.havingStyle(k.SCRIPTSCRIPT),er=fr(d.index,Wt,m),ir=.6*(Lt.height-Lt.depth),tr=Ue.makeVList({positionType:"shift",positionData:-ir,children:[{type:"elem",elem:er}]},m),kr=Ue.makeSpan(["root"],[tr]);return Ue.makeSpan(["mord","sqrt"],[kr,Lt],m)}else return Ue.makeSpan(["mord","sqrt"],[Lt],m)},mathmlBuilder:function(d,m){var g=d.body,w=d.index;return w?new yt.MathNode("mroot",[xr(g,m),xr(w,m)]):new yt.MathNode("msqrt",[xr(g,m)])}});var ma={display:k.DISPLAY,text:k.TEXT,script:k.SCRIPT,scriptscript:k.SCRIPTSCRIPT};Nt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(d,m){var g=d.breakOnTokenText,w=d.funcName,q=d.parser,X=q.parseExpression(!0,g),fe=w.slice(1,w.length-5);return{type:"styling",mode:q.mode,style:fe,body:X}},htmlBuilder:function(d,m){var g=ma[d.style],w=m.havingStyle(g).withFont("");return js(d.body,w,m)},mathmlBuilder:function(d,m){var g=ma[d.style],w=m.havingStyle(g),q=ui(d.body,w),X=new yt.MathNode("mstyle",q),fe={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},ve=fe[d.style];return X.setAttribute("scriptlevel",ve[0]),X.setAttribute("displaystyle",ve[1]),X}});var Va=function(d,m){var g=d.base;if(g)if(g.type==="op"){var w=g.limits&&(m.style.size===k.DISPLAY.size||g.alwaysHandleSupSub);return w?mn:null}else if(g.type==="operatorname"){var q=g.alwaysHandleSupSub&&(m.style.size===k.DISPLAY.size||g.limits);return q?$s:null}else{if(g.type==="accent")return T.isCharacterBox(g.base)?mr:null;if(g.type==="horizBrace"){var X=!d.sub;return X===g.isOver?fa:null}else return null}else return null};Ai({type:"supsub",htmlBuilder:function(d,m){var g=Va(d,m);if(g)return g(d,m);var w=d.base,q=d.sup,X=d.sub,fe=fr(w,m),ve,Ce,Be=m.fontMetrics(),Ve=0,st=0,ut=w&&T.isCharacterBox(w);if(q){var vt=m.havingStyle(m.style.sup());ve=fr(q,vt,m),ut||(Ve=fe.height-vt.fontMetrics().supDrop*vt.sizeMultiplier/m.sizeMultiplier)}if(X){var Lt=m.havingStyle(m.style.sub());Ce=fr(X,Lt,m),ut||(st=fe.depth+Lt.fontMetrics().subDrop*Lt.sizeMultiplier/m.sizeMultiplier)}var Wt;m.style===k.DISPLAY?Wt=Be.sup1:m.style.cramped?Wt=Be.sup3:Wt=Be.sup2;var er=m.sizeMultiplier,ir=.5/Be.ptPerEm/er+"em",tr=null;if(Ce){var kr=d.base&&d.base.type==="op"&&d.base.name&&(d.base.name==="\\oiint"||d.base.name==="\\oiiint");(fe instanceof ye||kr)&&(tr=-fe.italic+"em")}var Ir;if(ve&&Ce){Ve=Math.max(Ve,Wt,ve.depth+.25*Be.xHeight),st=Math.max(st,Be.sub2);var Hr=Be.defaultRuleThickness,Gr=4*Hr;if(Ve-ve.depth-(Ce.height-st)<Gr){st=Gr-(Ve-ve.depth)+Ce.height;var Xr=.8*Be.xHeight-(Ve-ve.depth);Xr>0&&(Ve+=Xr,st-=Xr)}var vi=[{type:"elem",elem:Ce,shift:st,marginRight:ir,marginLeft:tr},{type:"elem",elem:ve,shift:-Ve,marginRight:ir}];Ir=Ue.makeVList({positionType:"individualShift",children:vi},m)}else if(Ce){st=Math.max(st,Be.sub1,Ce.height-.8*Be.xHeight);var ci=[{type:"elem",elem:Ce,marginLeft:tr,marginRight:ir}];Ir=Ue.makeVList({positionType:"shift",positionData:st,children:ci},m)}else if(ve)Ve=Math.max(Ve,Wt,ve.depth+.25*Be.xHeight),Ir=Ue.makeVList({positionType:"shift",positionData:-Ve,children:[{type:"elem",elem:ve,marginRight:ir}]},m);else throw new Error("supsub must have either sup or sub.");var Tr=mi(fe,"right")||"mord";return Ue.makeSpan([Tr],[fe,Ue.makeSpan(["msupsub"],[Ir])],m)},mathmlBuilder:function(d,m){var g=!1,w,q,X=Mr(d.base,"horizBrace");X&&(q=!!d.sup,q===X.isOver&&(g=!0,w=X.isOver)),d.base&&(d.base.type==="op"||d.base.type==="operatorname")&&(d.base.parentIsSupSub=!0);var fe=[xr(d.base,m)];d.sub&&fe.push(xr(d.sub,m)),d.sup&&fe.push(xr(d.sup,m));var ve;if(g)ve=w?"mover":"munder";else if(d.sub)if(d.sup){var Ve=d.base;Ve&&Ve.type==="op"&&Ve.limits&&m.style===k.DISPLAY||Ve&&Ve.type==="operatorname"&&Ve.alwaysHandleSupSub&&(m.style===k.DISPLAY||Ve.limits)?ve="munderover":ve="msubsup"}else{var Be=d.base;Be&&Be.type==="op"&&Be.limits&&(m.style===k.DISPLAY||Be.alwaysHandleSupSub)||Be&&Be.type==="operatorname"&&Be.alwaysHandleSupSub&&(Be.limits||m.style===k.DISPLAY)?ve="munder":ve="msub"}else{var Ce=d.base;Ce&&Ce.type==="op"&&Ce.limits&&(m.style===k.DISPLAY||Ce.alwaysHandleSupSub)||Ce&&Ce.type==="operatorname"&&Ce.alwaysHandleSupSub&&(Ce.limits||m.style===k.DISPLAY)?ve="mover":ve="msup"}var st=new yt.MathNode(ve,fe);return st}}),Ai({type:"atom",htmlBuilder:function(d,m){return Ue.mathsym(d.text,d.mode,m,["m"+d.family])},mathmlBuilder:function(d,m){var g=new yt.MathNode("mo",[_i(d.text,d.mode)]);if(d.family==="bin"){var w=hn(d,m);w==="bold-italic"&&g.setAttribute("mathvariant",w)}else d.family==="punct"?g.setAttribute("separator","true"):(d.family==="open"||d.family==="close")&&g.setAttribute("stretchy","false");return g}});var ga={mi:"italic",mn:"normal",mtext:"normal"};Ai({type:"mathord",htmlBuilder:function(d,m){return Ue.makeOrd(d,m,"mathord")},mathmlBuilder:function(d,m){var g=new yt.MathNode("mi",[_i(d.text,d.mode,m)]),w=hn(d,m)||"italic";return w!==ga[g.type]&&g.setAttribute("mathvariant",w),g}}),Ai({type:"textord",htmlBuilder:function(d,m){return Ue.makeOrd(d,m,"textord")},mathmlBuilder:function(d,m){var g=_i(d.text,d.mode,m),w=hn(d,m)||"normal",q;return d.mode==="text"?q=new yt.MathNode("mtext",[g]):/[0-9]/.test(d.text)?q=new yt.MathNode("mn",[g]):d.text==="\\prime"?q=new yt.MathNode("mo",[g]):q=new yt.MathNode("mi",[g]),w!==ga[q.type]&&q.setAttribute("mathvariant",w),q}});var vs={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ys={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ai({type:"spacing",htmlBuilder:function(d,m){if(ys.hasOwnProperty(d.text)){var g=ys[d.text].className||"";if(d.mode==="text"){var w=Ue.makeOrd(d,m,"textord");return w.classes.push(g),w}else return Ue.makeSpan(["mspace",g],[Ue.mathsym(d.text,d.mode,m)],m)}else{if(vs.hasOwnProperty(d.text))return Ue.makeSpan(["mspace",vs[d.text]],[],m);throw new R('Unknown type of space "'+d.text+'"')}},mathmlBuilder:function(d,m){var g;if(ys.hasOwnProperty(d.text))g=new yt.MathNode("mtext",[new yt.TextNode("\xA0")]);else{if(vs.hasOwnProperty(d.text))return new yt.MathNode("mspace");throw new R('Unknown type of space "'+d.text+'"')}return g}});var bs=function(){var d=new yt.MathNode("mtd",[]);return d.setAttribute("width","50%"),d};Ai({type:"tag",mathmlBuilder:function(d,m){var g=new yt.MathNode("mtable",[new yt.MathNode("mtr",[bs(),new yt.MathNode("mtd",[ei(d.body,m)]),bs(),new yt.MathNode("mtd",[ei(d.tag,m)])])]);return g.setAttribute("width","100%"),g}});var Ws={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},_a={"\\textbf":"textbf","\\textmd":"textmd"},va={"\\textit":"textit","\\textup":"textup"},ya=function(d,m){var g=d.font;return g?Ws[g]?m.withTextFontFamily(Ws[g]):_a[g]?m.withTextFontWeight(_a[g]):m.withTextFontShape(va[g]):m};Nt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(d,m){var g=d.parser,w=d.funcName,q=m[0];return{type:"text",mode:g.mode,body:Qr(q),font:w}},htmlBuilder:function(d,m){var g=ya(d,m),w=Yr(d.body,g,!0);return Ue.makeSpan(["mord","text"],Ue.tryCombineChars(w),g)},mathmlBuilder:function(d,m){var g=ya(d,m);return ei(d.body,g)}}),Nt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(d,m){var g=d.parser;return{type:"underline",mode:g.mode,body:m[0]}},htmlBuilder:function(d,m){var g=fr(d.body,m),w=Ue.makeLineSpan("underline-line",m),q=m.fontMetrics().defaultRuleThickness,X=Ue.makeVList({positionType:"top",positionData:g.height,children:[{type:"kern",size:q},{type:"elem",elem:w},{type:"kern",size:3*q},{type:"elem",elem:g}]},m);return Ue.makeSpan(["mord","underline"],[X],m)},mathmlBuilder:function(d,m){var g=new yt.MathNode("mo",[new yt.TextNode("\u203E")]);g.setAttribute("stretchy","true");var w=new yt.MathNode("munder",[xr(d.body,m),g]);return w.setAttribute("accentunder","true"),w}}),Nt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(d,m,g){throw new R("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(d,m){for(var g=ba(d),w=[],q=m.havingStyle(m.style.text()),X=0;X<g.length;X++){var fe=g[X];fe==="~"&&(fe="\\textasciitilde"),w.push(Ue.makeSymbol(fe,"Typewriter-Regular",d.mode,q,["mord","texttt"]))}return Ue.makeSpan(["mord","text"].concat(q.sizingClasses(m)),Ue.tryCombineChars(w),q)},mathmlBuilder:function(d,m){var g=new yt.TextNode(ba(d)),w=new yt.MathNode("mtext",[g]);return w.setAttribute("mathvariant","monospace"),w}});var ba=function(d){return d.body.replace(/ /g,d.star?"\u2423":"\xA0")},qa=Hn,qn=qa,Gs=`[ \r
]`,Ks="\\\\[a-zA-Z@]+",Ya="\\\\[^\uD800-\uDFFF]",xa=""+Ks+Gs+"*",Za=new RegExp("^("+Ks+")"+Gs+"*$"),Vs="[\u0300-\u036F]",oi=new RegExp(Vs+"+$"),Tn="("+Gs+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(Vs+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Vs+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+xa)+("|"+Ya+")"),xs=function(){function Q(m,g){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=m,this.settings=g,this.tokenRegex=new RegExp(Tn,"g"),this.catcodes={"%":14}}var d=Q.prototype;return d.setCatcode=function(g,w){this.catcodes[g]=w},d.lex=function(){var g=this.input,w=this.tokenRegex.lastIndex;if(w===g.length)return new P("EOF",new V(this,w,w));var q=this.tokenRegex.exec(g);if(q===null||q.index!==w)throw new R("Unexpected character: '"+g[w]+"'",new P(g[w],new V(this,w,w+1)));var X=q[2]||" ";if(this.catcodes[X]===14){var fe=g.indexOf(`
`,this.tokenRegex.lastIndex);return fe===-1?(this.tokenRegex.lastIndex=g.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=fe+1,this.lex()}var ve=X.match(Za);return ve&&(X=ve[1]),new P(X,new V(this,w,this.tokenRegex.lastIndex))},Q}(),Xa=function(){function Q(m,g){m===void 0&&(m={}),g===void 0&&(g={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=g,this.builtins=m,this.undefStack=[]}var d=Q.prototype;return d.beginGroup=function(){this.undefStack.push({})},d.endGroup=function(){if(this.undefStack.length===0)throw new R("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var g=this.undefStack.pop();for(var w in g)g.hasOwnProperty(w)&&(g[w]===void 0?delete this.current[w]:this.current[w]=g[w])},d.has=function(g){return this.current.hasOwnProperty(g)||this.builtins.hasOwnProperty(g)},d.get=function(g){return this.current.hasOwnProperty(g)?this.current[g]:this.builtins[g]},d.set=function(g,w,q){if(q===void 0&&(q=!1),q){for(var X=0;X<this.undefStack.length;X++)delete this.undefStack[X][g];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][g]=w)}else{var fe=this.undefStack[this.undefStack.length-1];fe&&!fe.hasOwnProperty(g)&&(fe[g]=this.current[g])}this.current[g]=w},Q}(),Sa={},Ss=Sa;function xe(Q,d){Sa[Q]=d}xe("\\@firstoftwo",function(Q){var d=Q.consumeArgs(2);return{tokens:d[0],numArgs:0}}),xe("\\@secondoftwo",function(Q){var d=Q.consumeArgs(2);return{tokens:d[1],numArgs:0}}),xe("\\@ifnextchar",function(Q){var d=Q.consumeArgs(3),m=Q.future();return d[0].length===1&&d[0][0].text===m.text?{tokens:d[1],numArgs:0}:{tokens:d[2],numArgs:0}}),xe("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),xe("\\TextOrMath",function(Q){var d=Q.consumeArgs(2);return Q.mode==="text"?{tokens:d[0],numArgs:0}:{tokens:d[1],numArgs:0}});var Nn={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};xe("\\char",function(Q){var d=Q.popToken(),m,g="";if(d.text==="'")m=8,d=Q.popToken();else if(d.text==='"')m=16,d=Q.popToken();else if(d.text==="`")if(d=Q.popToken(),d.text[0]==="\\")g=d.text.charCodeAt(1);else{if(d.text==="EOF")throw new R("\\char` missing argument");g=d.text.charCodeAt(0)}else m=10;if(m){if(g=Nn[d.text],g==null||g>=m)throw new R("Invalid base-"+m+" digit "+d.text);for(var w;(w=Nn[Q.future().text])!=null&&w<m;)g*=m,g+=w,Q.popToken()}return"\\@char{"+g+"}"});var qs=function(d,m){var g=d.consumeArgs(1)[0];if(g.length!==1)throw new R("\\gdef's first argument must be a macro name");var w=g[0].text,q=0;for(g=d.consumeArgs(1)[0];g.length===1&&g[0].text==="#";){if(g=d.consumeArgs(1)[0],g.length!==1)throw new R('Invalid argument number length "'+g.length+'"');if(!/^[1-9]$/.test(g[0].text))throw new R('Invalid argument number "'+g[0].text+'"');if(q++,parseInt(g[0].text)!==q)throw new R('Argument number "'+g[0].text+'" out of order');g=d.consumeArgs(1)[0]}return d.macros.set(w,{tokens:g,numArgs:q},m),""};xe("\\gdef",function(Q){return qs(Q,!0)}),xe("\\def",function(Q){return qs(Q,!1)}),xe("\\global",function(Q){var d=Q.consumeArgs(1)[0];if(d.length!==1)throw new R("Invalid command after \\global");var m=d[0].text;if(m==="\\def")return qs(Q,!0);throw new R("Invalid command '"+m+"' after \\global")});var ws=function(d,m,g){var w=d.consumeArgs(1)[0];if(w.length!==1)throw new R("\\newcommand's first argument must be a macro name");var q=w[0].text,X=d.isDefined(q);if(X&&!m)throw new R("\\newcommand{"+q+"} attempting to redefine "+(q+"; use \\renewcommand"));if(!X&&!g)throw new R("\\renewcommand{"+q+"} when command "+q+" does not yet exist; use \\newcommand");var fe=0;if(w=d.consumeArgs(1)[0],w.length===1&&w[0].text==="["){for(var ve="",Ce=d.expandNextToken();Ce.text!=="]"&&Ce.text!=="EOF";)ve+=Ce.text,Ce=d.expandNextToken();if(!ve.match(/^\s*[0-9]+\s*$/))throw new R("Invalid number of arguments: "+ve);fe=parseInt(ve),w=d.consumeArgs(1)[0]}return d.macros.set(q,{tokens:w,numArgs:fe}),""};xe("\\newcommand",function(Q){return ws(Q,!1,!0)}),xe("\\renewcommand",function(Q){return ws(Q,!0,!1)}),xe("\\providecommand",function(Q){return ws(Q,!0,!0)}),xe("\\bgroup","{"),xe("\\egroup","}"),xe("\\lq","`"),xe("\\rq","'"),xe("\\aa","\\r a"),xe("\\AA","\\r A"),xe("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),xe("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),xe("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),xe("\u212C","\\mathscr{B}"),xe("\u2130","\\mathscr{E}"),xe("\u2131","\\mathscr{F}"),xe("\u210B","\\mathscr{H}"),xe("\u2110","\\mathscr{I}"),xe("\u2112","\\mathscr{L}"),xe("\u2133","\\mathscr{M}"),xe("\u211B","\\mathscr{R}"),xe("\u212D","\\mathfrak{C}"),xe("\u210C","\\mathfrak{H}"),xe("\u2128","\\mathfrak{Z}"),xe("\\Bbbk","\\Bbb{k}"),xe("\xB7","\\cdotp"),xe("\\llap","\\mathllap{\\textrm{#1}}"),xe("\\rlap","\\mathrlap{\\textrm{#1}}"),xe("\\clap","\\mathclap{\\textrm{#1}}"),xe("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),xe("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),xe("\\ne","\\neq"),xe("\u2260","\\neq"),xe("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),xe("\u2209","\\notin"),xe("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),xe("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),xe("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),xe("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),xe("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),xe("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),xe("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),xe("\u27C2","\\perp"),xe("\u203C","\\mathclose{!\\mkern-0.8mu!}"),xe("\u220C","\\notni"),xe("\u231C","\\ulcorner"),xe("\u231D","\\urcorner"),xe("\u231E","\\llcorner"),xe("\u231F","\\lrcorner"),xe("\xA9","\\copyright"),xe("\xAE","\\textregistered"),xe("\uFE0F","\\textregistered"),xe("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),xe("\u22EE","\\vdots"),xe("\\varGamma","\\mathit{\\Gamma}"),xe("\\varDelta","\\mathit{\\Delta}"),xe("\\varTheta","\\mathit{\\Theta}"),xe("\\varLambda","\\mathit{\\Lambda}"),xe("\\varXi","\\mathit{\\Xi}"),xe("\\varPi","\\mathit{\\Pi}"),xe("\\varSigma","\\mathit{\\Sigma}"),xe("\\varUpsilon","\\mathit{\\Upsilon}"),xe("\\varPhi","\\mathit{\\Phi}"),xe("\\varPsi","\\mathit{\\Psi}"),xe("\\varOmega","\\mathit{\\Omega}"),xe("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),xe("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),xe("\\boxed","\\fbox{$\\displaystyle{#1}$}"),xe("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),xe("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),xe("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var gn={",":"\\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"};xe("\\dots",function(Q){var d="\\dotso",m=Q.expandAfterFuture().text;return m in gn?d=gn[m]:(m.substr(0,4)==="\\not"||m in bt.math&&T.contains(["bin","rel"],bt.math[m].group))&&(d="\\dotsb"),d});var Je={")":!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};xe("\\dotso",function(Q){var d=Q.future().text;return d in Je?"\\ldots\\,":"\\ldots"}),xe("\\dotsc",function(Q){var d=Q.future().text;return d in Je&&d!==","?"\\ldots\\,":"\\ldots"}),xe("\\cdots",function(Q){var d=Q.future().text;return d in Je?"\\@cdots\\,":"\\@cdots"}),xe("\\dotsb","\\cdots"),xe("\\dotsm","\\cdots"),xe("\\dotsi","\\!\\cdots"),xe("\\dotsx","\\ldots\\,"),xe("\\DOTSI","\\relax"),xe("\\DOTSB","\\relax"),xe("\\DOTSX","\\relax"),xe("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),xe("\\,","\\tmspace+{3mu}{.1667em}"),xe("\\thinspace","\\,"),xe("\\>","\\mskip{4mu}"),xe("\\:","\\tmspace+{4mu}{.2222em}"),xe("\\medspace","\\:"),xe("\\;","\\tmspace+{5mu}{.2777em}"),xe("\\thickspace","\\;"),xe("\\!","\\tmspace-{3mu}{.1667em}"),xe("\\negthinspace","\\!"),xe("\\negmedspace","\\tmspace-{4mu}{.2222em}"),xe("\\negthickspace","\\tmspace-{5mu}{.277em}"),xe("\\enspace","\\kern.5em "),xe("\\enskip","\\hskip.5em\\relax"),xe("\\quad","\\hskip1em\\relax"),xe("\\qquad","\\hskip2em\\relax"),xe("\\tag","\\@ifstar\\tag@literal\\tag@paren"),xe("\\tag@paren","\\tag@literal{({#1})}"),xe("\\tag@literal",function(Q){if(Q.macros.get("\\df@tag"))throw new R("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),xe("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),xe("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),xe("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),xe("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),xe("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),xe("\\\\","\\newline"),xe("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Ys=rt["Main-Regular"][84][1]-.7*rt["Main-Regular"][65][1]+"em";xe("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Ys+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),xe("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Ys+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),xe("\\hspace","\\@ifstar\\@hspacer\\@hspace"),xe("\\@hspace","\\hskip #1\\relax"),xe("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),xe("\\ordinarycolon",":"),xe("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),xe("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),xe("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),xe("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),xe("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),xe("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),xe("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),xe("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),xe("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),xe("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),xe("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),xe("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),xe("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),xe("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),xe("\u2237","\\dblcolon"),xe("\u2239","\\eqcolon"),xe("\u2254","\\coloneqq"),xe("\u2255","\\eqqcolon"),xe("\u2A74","\\Coloneqq"),xe("\\ratio","\\vcentcolon"),xe("\\coloncolon","\\dblcolon"),xe("\\colonequals","\\coloneqq"),xe("\\coloncolonequals","\\Coloneqq"),xe("\\equalscolon","\\eqqcolon"),xe("\\equalscoloncolon","\\Eqqcolon"),xe("\\colonminus","\\coloneq"),xe("\\coloncolonminus","\\Coloneq"),xe("\\minuscolon","\\eqcolon"),xe("\\minuscoloncolon","\\Eqcolon"),xe("\\coloncolonapprox","\\Colonapprox"),xe("\\coloncolonsim","\\Colonsim"),xe("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),xe("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),xe("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),xe("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),xe("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),xe("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),xe("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),xe("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),xe("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),xe("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),xe("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),xe("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),xe("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),xe("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),xe("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),xe("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),xe("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),xe("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),xe("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),xe("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),xe("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),xe("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),xe("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),xe("\u27E6","\\llbracket"),xe("\u27E7","\\rrbracket"),xe("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),xe("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),xe("\u2983","\\lBrace"),xe("\u2984","\\rBrace"),xe("\\darr","\\downarrow"),xe("\\dArr","\\Downarrow"),xe("\\Darr","\\Downarrow"),xe("\\lang","\\langle"),xe("\\rang","\\rangle"),xe("\\uarr","\\uparrow"),xe("\\uArr","\\Uparrow"),xe("\\Uarr","\\Uparrow"),xe("\\N","\\mathbb{N}"),xe("\\R","\\mathbb{R}"),xe("\\Z","\\mathbb{Z}"),xe("\\alef","\\aleph"),xe("\\alefsym","\\aleph"),xe("\\Alpha","\\mathrm{A}"),xe("\\Beta","\\mathrm{B}"),xe("\\bull","\\bullet"),xe("\\Chi","\\mathrm{X}"),xe("\\clubs","\\clubsuit"),xe("\\cnums","\\mathbb{C}"),xe("\\Complex","\\mathbb{C}"),xe("\\Dagger","\\ddagger"),xe("\\diamonds","\\diamondsuit"),xe("\\empty","\\emptyset"),xe("\\Epsilon","\\mathrm{E}"),xe("\\Eta","\\mathrm{H}"),xe("\\exist","\\exists"),xe("\\harr","\\leftrightarrow"),xe("\\hArr","\\Leftrightarrow"),xe("\\Harr","\\Leftrightarrow"),xe("\\hearts","\\heartsuit"),xe("\\image","\\Im"),xe("\\infin","\\infty"),xe("\\Iota","\\mathrm{I}"),xe("\\isin","\\in"),xe("\\Kappa","\\mathrm{K}"),xe("\\larr","\\leftarrow"),xe("\\lArr","\\Leftarrow"),xe("\\Larr","\\Leftarrow"),xe("\\lrarr","\\leftrightarrow"),xe("\\lrArr","\\Leftrightarrow"),xe("\\Lrarr","\\Leftrightarrow"),xe("\\Mu","\\mathrm{M}"),xe("\\natnums","\\mathbb{N}"),xe("\\Nu","\\mathrm{N}"),xe("\\Omicron","\\mathrm{O}"),xe("\\plusmn","\\pm"),xe("\\rarr","\\rightarrow"),xe("\\rArr","\\Rightarrow"),xe("\\Rarr","\\Rightarrow"),xe("\\real","\\Re"),xe("\\reals","\\mathbb{R}"),xe("\\Reals","\\mathbb{R}"),xe("\\Rho","\\mathrm{P}"),xe("\\sdot","\\cdot"),xe("\\sect","\\S"),xe("\\spades","\\spadesuit"),xe("\\sub","\\subset"),xe("\\sube","\\subseteq"),xe("\\supe","\\supseteq"),xe("\\Tau","\\mathrm{T}"),xe("\\thetasym","\\vartheta"),xe("\\weierp","\\wp"),xe("\\Zeta","\\mathrm{Z}"),xe("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),xe("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),xe("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),xe("\\blue","\\textcolor{##6495ed}{#1}"),xe("\\orange","\\textcolor{##ffa500}{#1}"),xe("\\pink","\\textcolor{##ff00af}{#1}"),xe("\\red","\\textcolor{##df0030}{#1}"),xe("\\green","\\textcolor{##28ae7b}{#1}"),xe("\\gray","\\textcolor{gray}{#1}"),xe("\\purple","\\textcolor{##9d38bd}{#1}"),xe("\\blueA","\\textcolor{##ccfaff}{#1}"),xe("\\blueB","\\textcolor{##80f6ff}{#1}"),xe("\\blueC","\\textcolor{##63d9ea}{#1}"),xe("\\blueD","\\textcolor{##11accd}{#1}"),xe("\\blueE","\\textcolor{##0c7f99}{#1}"),xe("\\tealA","\\textcolor{##94fff5}{#1}"),xe("\\tealB","\\textcolor{##26edd5}{#1}"),xe("\\tealC","\\textcolor{##01d1c1}{#1}"),xe("\\tealD","\\textcolor{##01a995}{#1}"),xe("\\tealE","\\textcolor{##208170}{#1}"),xe("\\greenA","\\textcolor{##b6ffb0}{#1}"),xe("\\greenB","\\textcolor{##8af281}{#1}"),xe("\\greenC","\\textcolor{##74cf70}{#1}"),xe("\\greenD","\\textcolor{##1fab54}{#1}"),xe("\\greenE","\\textcolor{##0d923f}{#1}"),xe("\\goldA","\\textcolor{##ffd0a9}{#1}"),xe("\\goldB","\\textcolor{##ffbb71}{#1}"),xe("\\goldC","\\textcolor{##ff9c39}{#1}"),xe("\\goldD","\\textcolor{##e07d10}{#1}"),xe("\\goldE","\\textcolor{##a75a05}{#1}"),xe("\\redA","\\textcolor{##fca9a9}{#1}"),xe("\\redB","\\textcolor{##ff8482}{#1}"),xe("\\redC","\\textcolor{##f9685d}{#1}"),xe("\\redD","\\textcolor{##e84d39}{#1}"),xe("\\redE","\\textcolor{##bc2612}{#1}"),xe("\\maroonA","\\textcolor{##ffbde0}{#1}"),xe("\\maroonB","\\textcolor{##ff92c6}{#1}"),xe("\\maroonC","\\textcolor{##ed5fa6}{#1}"),xe("\\maroonD","\\textcolor{##ca337c}{#1}"),xe("\\maroonE","\\textcolor{##9e034e}{#1}"),xe("\\purpleA","\\textcolor{##ddd7ff}{#1}"),xe("\\purpleB","\\textcolor{##c6b9fc}{#1}"),xe("\\purpleC","\\textcolor{##aa87ff}{#1}"),xe("\\purpleD","\\textcolor{##7854ab}{#1}"),xe("\\purpleE","\\textcolor{##543b78}{#1}"),xe("\\mintA","\\textcolor{##f5f9e8}{#1}"),xe("\\mintB","\\textcolor{##edf2df}{#1}"),xe("\\mintC","\\textcolor{##e0e5cc}{#1}"),xe("\\grayA","\\textcolor{##f6f7f7}{#1}"),xe("\\grayB","\\textcolor{##f0f1f2}{#1}"),xe("\\grayC","\\textcolor{##e3e5e6}{#1}"),xe("\\grayD","\\textcolor{##d6d8da}{#1}"),xe("\\grayE","\\textcolor{##babec2}{#1}"),xe("\\grayF","\\textcolor{##888d93}{#1}"),xe("\\grayG","\\textcolor{##626569}{#1}"),xe("\\grayH","\\textcolor{##3b3e40}{#1}"),xe("\\grayI","\\textcolor{##21242c}{#1}"),xe("\\kaBlue","\\textcolor{##314453}{#1}"),xe("\\kaGreen","\\textcolor{##71B307}{#1}");var Es={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Ja=function(){function Q(m,g,w){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=g,this.expansionCount=0,this.feed(m),this.macros=new Xa(Ss,g.macros),this.mode=w,this.stack=[]}var d=Q.prototype;return d.feed=function(g){this.lexer=new xs(g,this.settings)},d.switchMode=function(g){this.mode=g},d.beginGroup=function(){this.macros.beginGroup()},d.endGroup=function(){this.macros.endGroup()},d.future=function(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},d.popToken=function(){return this.future(),this.stack.pop()},d.pushToken=function(g){this.stack.push(g)},d.pushTokens=function(g){var w;(w=this.stack).push.apply(w,g)},d.consumeSpaces=function(){for(;;){var g=this.future();if(g.text===" ")this.stack.pop();else break}},d.consumeArgs=function(g){for(var w=[],q=0;q<g;++q){this.consumeSpaces();var X=this.popToken();if(X.text==="{"){for(var fe=[],ve=1;ve!==0;){var Ce=this.popToken();if(fe.push(Ce),Ce.text==="{")++ve;else if(Ce.text==="}")--ve;else if(Ce.text==="EOF")throw new R("End of input in macro argument",X)}fe.pop(),fe.reverse(),w[q]=fe}else{if(X.text==="EOF")throw new R("End of input expecting macro argument");w[q]=[X]}}return w},d.expandOnce=function(){var g=this.popToken(),w=g.text,q=this._getExpansion(w);if(q==null)return this.pushToken(g),g;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new R("Too many expansions: infinite loop or need to increase maxExpand setting");var X=q.tokens;if(q.numArgs){var fe=this.consumeArgs(q.numArgs);X=X.slice();for(var ve=X.length-1;ve>=0;--ve){var Ce=X[ve];if(Ce.text==="#"){if(ve===0)throw new R("Incomplete placeholder at end of macro body",Ce);if(Ce=X[--ve],Ce.text==="#")X.splice(ve+1,1);else if(/^[1-9]$/.test(Ce.text)){var Be;(Be=X).splice.apply(Be,[ve,2].concat(fe[+Ce.text-1]))}else throw new R("Not a valid argument number",Ce)}}}return this.pushTokens(X),X},d.expandAfterFuture=function(){return this.expandOnce(),this.future()},d.expandNextToken=function(){for(;;){var g=this.expandOnce();if(g instanceof P)if(g.text==="\\relax")this.stack.pop();else return this.stack.pop()}throw new Error},d.expandMacro=function(g){if(this.macros.get(g)){var w=[],q=this.stack.length;for(this.pushToken(new P(g));this.stack.length>q;){var X=this.expandOnce();X instanceof P&&w.push(this.stack.pop())}return w}},d.expandMacroAsText=function(g){var w=this.expandMacro(g);return w&&w.map(function(q){return q.text}).join("")},d._getExpansion=function(g){var w=this.macros.get(g);if(w==null)return w;var q=typeof w=="function"?w(this):w;if(typeof q=="string"){var X=0;if(q.indexOf("#")!==-1)for(var fe=q.replace(/##/g,"");fe.indexOf("#"+(X+1))!==-1;)++X;for(var ve=new xs(q,this.settings),Ce=[],Be=ve.lex();Be.text!=="EOF";)Ce.push(Be),Be=ve.lex();Ce.reverse();var Ve={tokens:Ce,numArgs:X};return Ve}return q},d.isDefined=function(g){return this.macros.has(g)||qn.hasOwnProperty(g)||bt.math.hasOwnProperty(g)||bt.text.hasOwnProperty(g)||Es.hasOwnProperty(g)},Q}(),Yn={"\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"}},wa={\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"},Cs=function(){function Q(m,g){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 Ja(m,g,this.mode),this.settings=g,this.leftrightDepth=0}var d=Q.prototype;return d.expect=function(g,w){if(w===void 0&&(w=!0),this.fetch().text!==g)throw new R("Expected '"+g+"', got '"+this.fetch().text+"'",this.fetch());w&&this.consume()},d.consume=function(){this.nextToken=null},d.fetch=function(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},d.switchMode=function(g){this.mode=g,this.gullet.switchMode(g)},d.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var g=this.parseExpression(!1);return this.expect("EOF"),this.gullet.endGroup(),g},d.parseExpression=function(g,w){for(var q=[];;){this.mode==="math"&&this.consumeSpaces();var X=this.fetch();if(Q.endOfExpression.indexOf(X.text)!==-1||w&&X.text===w||g&&qn[X.text]&&qn[X.text].infix)break;var fe=this.parseAtom(w);if(!fe)break;q.push(fe)}return this.mode==="text"&&this.formLigatures(q),this.handleInfixNodes(q)},d.handleInfixNodes=function(g){for(var w=-1,q,X=0;X<g.length;X++){var fe=Mr(g[X],"infix");if(fe){if(w!==-1)throw new R("only one infix operator per group",fe.token);w=X,q=fe.replaceWith}}if(w!==-1&&q){var ve,Ce,Be=g.slice(0,w),Ve=g.slice(w+1);Be.length===1&&Be[0].type==="ordgroup"?ve=Be[0]:ve={type:"ordgroup",mode:this.mode,body:Be},Ve.length===1&&Ve[0].type==="ordgroup"?Ce=Ve[0]:Ce={type:"ordgroup",mode:this.mode,body:Ve};var st;return q==="\\\\abovefrac"?st=this.callFunction(q,[ve,g[w],Ce],[]):st=this.callFunction(q,[ve,Ce],[]),[st]}else return g},d.handleSupSubscript=function(g){var w=this.fetch(),q=w.text;this.consume();var X=this.parseGroup(g,!1,Q.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!X)throw new R("Expected group after '"+q+"'",w);return X},d.formatUnsupportedCmd=function(g){for(var w=[],q=0;q<g.length;q++)w.push({type:"textord",mode:"text",text:g[q]});var X={type:"text",mode:this.mode,body:w},fe={type:"color",mode:this.mode,color:this.settings.errorColor,body:[X]};return fe},d.parseAtom=function(g){var w=this.parseGroup("atom",!1,null,g);if(this.mode==="text")return w;for(var q,X;;){this.consumeSpaces();var fe=this.fetch();if(fe.text==="\\limits"||fe.text==="\\nolimits"){var ve=Mr(w,"op");if(ve){var Ce=fe.text==="\\limits";ve.limits=Ce,ve.alwaysHandleSupSub=!0}else if(ve=Mr(w,"operatorname"),ve&&ve.alwaysHandleSupSub){var Be=fe.text==="\\limits";ve.limits=Be}else throw new R("Limit controls must follow a math operator",fe);this.consume()}else if(fe.text==="^"){if(q)throw new R("Double superscript",fe);q=this.handleSupSubscript("superscript")}else if(fe.text==="_"){if(X)throw new R("Double subscript",fe);X=this.handleSupSubscript("subscript")}else if(fe.text==="'"){if(q)throw new R("Double superscript",fe);var Ve={type:"textord",mode:this.mode,text:"\\prime"},st=[Ve];for(this.consume();this.fetch().text==="'";)st.push(Ve),this.consume();this.fetch().text==="^"&&st.push(this.handleSupSubscript("superscript")),q={type:"ordgroup",mode:this.mode,body:st}}else break}return q||X?{type:"supsub",mode:this.mode,base:w,sup:q,sub:X}:w},d.parseFunction=function(g,w,q){var X=this.fetch(),fe=X.text,ve=qn[fe];if(!ve)return null;if(this.consume(),q!=null&&ve.greediness<=q)throw new R("Got function '"+fe+"' with no arguments"+(w?" as "+w:""),X);if(this.mode==="text"&&!ve.allowedInText)throw new R("Can't use function '"+fe+"' in text mode",X);if(this.mode==="math"&&ve.allowedInMath===!1)throw new R("Can't use function '"+fe+"' in math mode",X);var Ce=this.parseArguments(fe,ve),Be=Ce.args,Ve=Ce.optArgs;return this.callFunction(fe,Be,Ve,X,g)},d.callFunction=function(g,w,q,X,fe){var ve={funcName:g,parser:this,token:X,breakOnTokenText:fe},Ce=qn[g];if(Ce&&Ce.handler)return Ce.handler(ve,w,q);throw new R("No function handler for "+g)},d.parseArguments=function(g,w){var q=w.numArgs+w.numOptionalArgs;if(q===0)return{args:[],optArgs:[]};for(var X=w.greediness,fe=[],ve=[],Ce=0;Ce<q;Ce++){var Be=w.argTypes&&w.argTypes[Ce],Ve=Ce<w.numOptionalArgs,st=Ce>0&&!Ve||Ce===0&&!Ve&&this.mode==="math",ut=this.parseGroupOfType("argument to '"+g+"'",Be,Ve,X,st);if(!ut){if(Ve){ve.push(null);continue}throw new R("Expected group after '"+g+"'",this.fetch())}(Ve?ve:fe).push(ut)}return{args:fe,optArgs:ve}},d.parseGroupOfType=function(g,w,q,X,fe){switch(w){case"color":return fe&&this.consumeSpaces(),this.parseColorGroup(q);case"size":return fe&&this.consumeSpaces(),this.parseSizeGroup(q);case"url":return this.parseUrlGroup(q,fe);case"math":case"text":return this.parseGroup(g,q,X,void 0,w,fe);case"hbox":{var ve=this.parseGroup(g,q,X,void 0,"text",fe);if(!ve)return ve;var Ce={type:"styling",mode:ve.mode,body:[ve],style:"text"};return Ce}case"raw":{if(fe&&this.consumeSpaces(),q&&this.fetch().text==="{")return null;var Be=this.parseStringGroup("raw",q,!0);if(Be)return{type:"raw",mode:"text",string:Be.text};throw new R("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(g,q,X,void 0,void 0,fe);default:throw new R("Unknown group type as "+g,this.fetch())}},d.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},d.parseStringGroup=function(g,w,q){var X=w?"[":"{",fe=w?"]":"}",ve=this.fetch();if(ve.text!==X){if(w)return null;if(q&&ve.text!=="EOF"&&/[^{}[\]]/.test(ve.text))return this.consume(),ve}var Ce=this.mode;this.mode="text",this.expect(X);for(var Be="",Ve=this.fetch(),st=0,ut=Ve,vt;(vt=this.fetch()).text!==fe||q&&st>0;){switch(vt.text){case"EOF":throw new R("Unexpected end of input in "+g,Ve.range(ut,Be));case X:st++;break;case fe:st--;break}ut=vt,Be+=ut.text,this.consume()}return this.expect(fe),this.mode=Ce,Ve.range(ut,Be)},d.parseRegexGroup=function(g,w){var q=this.mode;this.mode="text";for(var X=this.fetch(),fe=X,ve="",Ce;(Ce=this.fetch()).text!=="EOF"&&g.test(ve+Ce.text);)fe=Ce,ve+=fe.text,this.consume();if(ve==="")throw new R("Invalid "+w+": '"+X.text+"'",X);return this.mode=q,X.range(fe,ve)},d.parseColorGroup=function(g){var w=this.parseStringGroup("color",g);if(!w)return null;var q=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(w.text);if(!q)throw new R("Invalid color: '"+w.text+"'",w);var X=q[0];return/^[0-9a-f]{6}$/i.test(X)&&(X="#"+X),{type:"color-token",mode:this.mode,color:X}},d.parseSizeGroup=function(g){var w,q=!1;if(!g&&this.fetch().text!=="{"?w=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):w=this.parseStringGroup("size",g),!w)return null;!g&&w.text.length===0&&(w.text="0pt",q=!0);var X=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(w.text);if(!X)throw new R("Invalid size: '"+w.text+"'",w);var fe={number:+(X[1]+X[2]),unit:X[3]};if(!Pr(fe))throw new R("Invalid unit: '"+fe.unit+"'",w);return{type:"size",mode:this.mode,value:fe,isBlank:q}},d.parseUrlGroup=function(g,w){this.gullet.lexer.setCatcode("%",13);var q=this.parseStringGroup("url",g,!0);if(this.gullet.lexer.setCatcode("%",14),!q)return null;var X=q.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:X}},d.parseGroup=function(g,w,q,X,fe,ve){var Ce=this.mode;fe&&this.switchMode(fe),ve&&this.consumeSpaces();var Be=this.fetch(),Ve=Be.text,st;if(w?Ve==="[":Ve==="{"||Ve==="\\begingroup"){this.consume();var ut=Q.endOfGroup[Ve];this.gullet.beginGroup();var vt=this.parseExpression(!1,ut),Lt=this.fetch();this.expect(ut),this.gullet.endGroup(),st={type:"ordgroup",mode:this.mode,loc:V.range(Be,Lt),body:vt,semisimple:Ve==="\\begingroup"||void 0}}else if(w)st=null;else if(st=this.parseFunction(X,g,q)||this.parseSymbol(),st==null&&Ve[0]==="\\"&&!Es.hasOwnProperty(Ve)){if(this.settings.throwOnError)throw new R("Undefined control sequence: "+Ve,Be);st=this.formatUnsupportedCmd(Ve),this.consume()}return fe&&this.switchMode(Ce),st},d.formLigatures=function(g){for(var w=g.length-1,q=0;q<w;++q){var X=g[q],fe=X.text;fe==="-"&&g[q+1].text==="-"&&(q+1<w&&g[q+2].text==="-"?(g.splice(q,3,{type:"textord",mode:"text",loc:V.range(X,g[q+2]),text:"---"}),w-=2):(g.splice(q,2,{type:"textord",mode:"text",loc:V.range(X,g[q+1]),text:"--"}),w-=1)),(fe==="'"||fe==="`")&&g[q+1].text===fe&&(g.splice(q,2,{type:"textord",mode:"text",loc:V.range(X,g[q+1]),text:fe+fe}),w-=1)}},d.parseSymbol=function(){var g=this.fetch(),w=g.text;if(/^\\verb[^a-zA-Z]/.test(w)){this.consume();var q=w.slice(5),X=q.charAt(0)==="*";if(X&&(q=q.slice(1)),q.length<2||q.charAt(0)!==q.slice(-1))throw new R(`\\verb assertion failed --
please report what input caused this bug`);return q=q.slice(1,-1),{type:"verb",mode:"text",body:q,star:X}}wa.hasOwnProperty(w[0])&&!bt[this.mode][w[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+w[0]+'" used in math mode',g),w=wa[w[0]]+w.substr(1));var fe=oi.exec(w);fe&&(w=w.substring(0,fe.index),w==="i"?w="\u0131":w==="j"&&(w="\u0237"));var ve;if(bt[this.mode][w]){this.settings.strict&&this.mode==="math"&&ti.indexOf(w)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+w[0]+'" used in math mode',g);var Ce=bt[this.mode][w].group,Be=V.range(g),Ve;if(wt.hasOwnProperty(Ce)){var st=Ce;Ve={type:"atom",mode:this.mode,family:st,loc:Be,text:w}}else Ve={type:Ce,mode:this.mode,loc:Be,text:w};ve=Ve}else if(w.charCodeAt(0)>=128)this.settings.strict&&(Oe(w.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+w[0]+'" used in math mode',g):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+w[0]+'"'+(" ("+w.charCodeAt(0)+")"),g)),ve={type:"textord",mode:"text",loc:V.range(g),text:w};else return null;if(this.consume(),fe)for(var ut=0;ut<fe[0].length;ut++){var vt=fe[0][ut];if(!Yn[vt])throw new R("Unknown accent ' "+vt+"'",g);var Lt=Yn[vt][this.mode];if(!Lt)throw new R("Accent "+vt+" unsupported in "+this.mode+" mode",g);ve={type:"accent",mode:this.mode,loc:V.range(g),label:Lt,isStretchy:!1,isShifty:!0,base:ve}}return ve},Q}();Cs.endOfExpression=["}","\\endgroup","\\end","\\right","&"],Cs.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},Cs.SUPSUB_GREEDINESS=1;var Ea=function(d,m){if(!(typeof d=="string"||d instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var g=new Cs(d,m);delete g.gullet.macros.current["\\df@tag"];var w=g.parse();if(g.gullet.macros.get("\\df@tag")){if(!m.displayMode)throw new R("\\tag works only in display equations");g.gullet.feed("\\df@tag"),w=[{type:"tag",mode:"text",body:w,tag:g.parse()}]}return w},Zs=Ea,Ca=function(d,m,g){m.textContent="";var w=Di(d,g).toNode();m.appendChild(w)};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."),Ca=function(){throw new R("KaTeX doesn't work in quirks mode.")});var Zn=function(d,m){var g=Di(d,m).toMarkup();return g},Xs=function(d,m){var g=new E(m);return Zs(d,g)},as=function(d,m,g){if(g.throwOnError||!(d instanceof R))throw d;var w=Ue.makeSpan(["katex-error"],[new ye(m)]);return w.setAttribute("title",d.toString()),w.setAttribute("style","color:"+g.errorColor),w},Di=function(d,m){var g=new E(m);try{var w=Zs(d,g);return zi(w,d,g)}catch(q){return as(q,d,g)}},Qa=function(d,m){var g=new E(m);try{var w=Zs(d,g);return Pn(w,d,g)}catch(q){return as(q,d,g)}},Aa={version:"0.11.1",render:Ca,renderToString:Zn,ParseError:R,__parse:Xs,__renderToDomTree:Di,__renderToHTMLTree:Qa,__setFontMetrics:lt,__defineSymbol:$,__defineMacro:xe,__domTree:{Span:Fe,Anchor:it,SymbolNode:ye,SvgNode:Te,PathNode:Ae,LineNode:Me}},eo=_.default=Aa}]).default})},32834:function(xt){(function(Re,_){xt.exports=_()})(this,function(){"use strict";function Re(Ee,Pe){for(var Ne=0;Ne<Pe.length;Ne++){var ce=Pe[Ne];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Ee,ce.key,ce)}}function _(Ee,Pe,Ne){return Pe&&Re(Ee.prototype,Pe),Ne&&Re(Ee,Ne),Ee}function H(Ee,Pe){if(Ee){if(typeof Ee=="string")return I(Ee,Pe);var Ne=Object.prototype.toString.call(Ee).slice(8,-1);if(Ne==="Object"&&Ee.constructor&&(Ne=Ee.constructor.name),Ne==="Map"||Ne==="Set")return Array.from(Ee);if(Ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ne))return I(Ee,Pe)}}function I(Ee,Pe){(Pe==null||Pe>Ee.length)&&(Pe=Ee.length);for(var Ne=0,ce=new Array(Pe);Ne<Pe;Ne++)ce[Ne]=Ee[Ne];return ce}function V(Ee,Pe){var Ne=typeof Symbol!="undefined"&&Ee[Symbol.iterator]||Ee["@@iterator"];if(Ne)return(Ne=Ne.call(Ee)).next.bind(Ne);if(Array.isArray(Ee)||(Ne=H(Ee))||Pe&&Ee&&typeof Ee.length=="number"){Ne&&(Ee=Ne);var ce=0;return function(){return ce>=Ee.length?{done:!0}:{done:!1,value:Ee[ce++]}}}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 P={exports:{}};function F(){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 R(Ee){P.exports.defaults=Ee}P.exports={defaults:F(),getDefaults:F,changeDefaults:R};var B=/[&<>"']/,y=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,v=/[<>"']|&(?!#?\w+;)/g,f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},h=function(Pe){return f[Pe]};function n(Ee,Pe){if(Pe){if(B.test(Ee))return Ee.replace(y,h)}else if(i.test(Ee))return Ee.replace(v,h);return Ee}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function u(Ee){return Ee.replace(o,function(Pe,Ne){return Ne=Ne.toLowerCase(),Ne==="colon"?":":Ne.charAt(0)==="#"?Ne.charAt(1)==="x"?String.fromCharCode(parseInt(Ne.substring(2),16)):String.fromCharCode(+Ne.substring(1)):""})}var S=/(^|[^\[])\^/g;function O(Ee,Pe){Ee=Ee.source||Ee,Pe=Pe||"";var Ne={replace:function(de,we){return we=we.source||we,we=we.replace(S,"$1"),Ee=Ee.replace(de,we),Ne},getRegex:function(){return new RegExp(Ee,Pe)}};return Ne}var T=/[^\w:]/g,E=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function C(Ee,Pe,Ne){if(Ee){var ce;try{ce=decodeURIComponent(u(Ne)).replace(T,"").toLowerCase()}catch(de){return null}if(ce.indexOf("javascript:")===0||ce.indexOf("vbscript:")===0||ce.indexOf("data:")===0)return null}Pe&&!E.test(Ne)&&(Ne=z(Pe,Ne));try{Ne=encodeURI(Ne).replace(/%25/g,"%")}catch(de){return null}return Ne}var j={},x=/^[^:]+:\/*[^/]*$/,L=/^([^:]+:)[\s\S]*$/,N=/^([^:]+:\/*[^/]*)[\s\S]*$/;function z(Ee,Pe){j[" "+Ee]||(x.test(Ee)?j[" "+Ee]=Ee+"/":j[" "+Ee]=_e(Ee,"/",!0)),Ee=j[" "+Ee];var Ne=Ee.indexOf(":")===-1;return Pe.substring(0,2)==="//"?Ne?Pe:Ee.replace(L,"$1")+Pe:Pe.charAt(0)==="/"?Ne?Pe:Ee.replace(N,"$1")+Pe:Ee+Pe}var te={exec:function(){}};function J(Ee){for(var Pe=1,Ne,ce;Pe<arguments.length;Pe++){Ne=arguments[Pe];for(ce in Ne)Object.prototype.hasOwnProperty.call(Ne,ce)&&(Ee[ce]=Ne[ce])}return Ee}function ge(Ee,Pe){var Ne=Ee.replace(/\|/g,function(we,Le,ne){for(var dt=!1,Se=Le;--Se>=0&&ne[Se]==="\\";)dt=!dt;return dt?"|":" |"}),ce=Ne.split(/ \|/),de=0;if(ce.length>Pe)ce.splice(Pe);else for(;ce.length<Pe;)ce.push("");for(;de<ce.length;de++)ce[de]=ce[de].trim().replace(/\\\|/g,"|");return ce}function _e(Ee,Pe,Ne){var ce=Ee.length;if(ce===0)return"";for(var de=0;de<ce;){var we=Ee.charAt(ce-de-1);if(we===Pe&&!Ne)de++;else if(we!==Pe&&Ne)de++;else break}return Ee.substr(0,ce-de)}function se(Ee,Pe){if(Ee.indexOf(Pe[1])===-1)return-1;for(var Ne=Ee.length,ce=0,de=0;de<Ne;de++)if(Ee[de]==="\\")de++;else if(Ee[de]===Pe[0])ce++;else if(Ee[de]===Pe[1]&&(ce--,ce<0))return de;return-1}function Y(Ee){Ee&&Ee.sanitize&&!Ee.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function ie(Ee,Pe){if(Pe<1)return"";for(var Ne="";Pe>1;)Pe&1&&(Ne+=Ee),Pe>>=1,Ee+=Ee;return Ne+Ee}var U={escape:n,unescape:u,edit:O,cleanUrl:C,resolveUrl:z,noopTest:te,merge:J,splitCells:ge,rtrim:_e,findClosingBracket:se,checkSanitizeDeprecation:Y,repeatString:ie},Z=P.exports.defaults,K=U.rtrim,k=U.splitCells,D=U.escape,re=U.findClosingBracket;function pe(Ee,Pe,Ne){var ce=Pe.href,de=Pe.title?D(Pe.title):null,we=Ee[1].replace(/\\([\[\]])/g,"$1");return Ee[0].charAt(0)!=="!"?{type:"link",raw:Ne,href:ce,title:de,text:we}:{type:"image",raw:Ne,href:ce,title:de,text:D(we)}}function Oe(Ee,Pe){var Ne=Ee.match(/^(\s+)(?:```)/);if(Ne===null)return Pe;var ce=Ne[1];return Pe.split(`
`).map(function(de){var we=de.match(/^\s+/);if(we===null)return de;var Le=we[0];return Le.length>=ce.length?de.slice(ce.length):de}).join(`
`)}var $e=function(){function Ee(Ne){this.options=Ne||Z}var Pe=Ee.prototype;return Pe.space=function(ce){var de=this.rules.block.newline.exec(ce);if(de)return de[0].length>1?{type:"space",raw:de[0]}:{raw:`
`}},Pe.code=function(ce){var de=this.rules.block.code.exec(ce);if(de){var we=de[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:de[0],codeBlockStyle:"indented",text:this.options.pedantic?we:K(we,`
`)}}},Pe.fences=function(ce){var de=this.rules.block.fences.exec(ce);if(de){var we=de[0],Le=Oe(we,de[3]||"");return{type:"code",raw:we,lang:de[2]?de[2].trim():de[2],text:Le}}},Pe.heading=function(ce){var de=this.rules.block.heading.exec(ce);if(de){var we=de[2].trim();if(/#$/.test(we)){var Le=K(we,"#");(this.options.pedantic||!Le||/ $/.test(Le))&&(we=Le.trim())}return{type:"heading",raw:de[0],depth:de[1].length,text:we}}},Pe.nptable=function(ce){var de=this.rules.block.nptable.exec(ce);if(de){var we={type:"table",header:k(de[1].replace(/^ *| *\| *$/g,"")),align:de[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:de[3]?de[3].replace(/\n$/,"").split(`
`):[],raw:de[0]};if(we.header.length===we.align.length){var Le=we.align.length,ne;for(ne=0;ne<Le;ne++)/^ *-+: *$/.test(we.align[ne])?we.align[ne]="right":/^ *:-+: *$/.test(we.align[ne])?we.align[ne]="center":/^ *:-+ *$/.test(we.align[ne])?we.align[ne]="left":we.align[ne]=null;for(Le=we.cells.length,ne=0;ne<Le;ne++)we.cells[ne]=k(we.cells[ne],we.header.length);return we}}},Pe.hr=function(ce){var de=this.rules.block.hr.exec(ce);if(de)return{type:"hr",raw:de[0]}},Pe.blockquote=function(ce){var de=this.rules.block.blockquote.exec(ce);if(de){var we=de[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:de[0],text:we}}},Pe.list=function(ce){var de=this.rules.block.list.exec(ce);if(de){var we=de[0],Le=de[2],ne=Le.length>1,dt={type:"list",raw:we,ordered:ne,start:ne?+Le.slice(0,-1):"",loose:!1,items:[]},Se=de[0].match(this.rules.block.item),Dt=!1,Pt,Ht,sr,St,Et,ur,Rr,$r,zr,Rt=Se.length;sr=this.rules.block.listItemStart.exec(Se[0]);for(var Zt=0;Zt<Rt;Zt++){if(Pt=Se[Zt],we=Pt,this.options.pedantic||(zr=Pt.match(new RegExp("\\n\\s*\\n {0,"+(sr[0].length-1)+"}\\S")),zr&&(Et=Pt.length-zr.index+Se.slice(Zt+1).join(`
`).length,dt.raw=dt.raw.substring(0,dt.raw.length-Et),Pt=Pt.substring(0,zr.index),we=Pt,Rt=Zt+1)),Zt!==Rt-1){if(St=this.rules.block.listItemStart.exec(Se[Zt+1]),this.options.pedantic?St[1].length>sr[1].length:St[1].length>=sr[0].length||St[1].length>3){Se.splice(Zt,2,Se[Zt]+(!this.options.pedantic&&St[1].length<sr[0].length&&!Se[Zt].match(/\n$/)?"":`
`)+Se[Zt+1]),Zt--,Rt--;continue}else(!this.options.pedantic||this.options.smartLists?St[2][St[2].length-1]!==Le[Le.length-1]:ne===(St[2].length===1))&&(Et=Se.slice(Zt+1).join(`
`).length,dt.raw=dt.raw.substring(0,dt.raw.length-Et),Zt=Rt-1);sr=St}Ht=Pt.length,Pt=Pt.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Pt.indexOf(`
`)&&(Ht-=Pt.length,Pt=this.options.pedantic?Pt.replace(/^ {1,4}/gm,""):Pt.replace(new RegExp("^ {1,"+Ht+"}","gm"),"")),Pt=K(Pt,`
`),Zt!==Rt-1&&(we=we+`
`),ur=Dt||/\n\n(?!\s*$)/.test(we),Zt!==Rt-1&&(Dt=we.slice(-2)===`
`,ur||(ur=Dt)),ur&&(dt.loose=!0),this.options.gfm&&(Rr=/^\[[ xX]\] /.test(Pt),$r=void 0,Rr&&($r=Pt[1]!==" ",Pt=Pt.replace(/^\[[ xX]\] +/,""))),dt.items.push({type:"list_item",raw:we,task:Rr,checked:$r,loose:ur,text:Pt})}return dt}},Pe.html=function(ce){var de=this.rules.block.html.exec(ce);if(de)return{type:this.options.sanitize?"paragraph":"html",raw:de[0],pre:!this.options.sanitizer&&(de[1]==="pre"||de[1]==="script"||de[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):D(de[0]):de[0]}},Pe.def=function(ce){var de=this.rules.block.def.exec(ce);if(de){de[3]&&(de[3]=de[3].substring(1,de[3].length-1));var we=de[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:we,raw:de[0],href:de[2],title:de[3]}}},Pe.table=function(ce){var de=this.rules.block.table.exec(ce);if(de){var we={type:"table",header:k(de[1].replace(/^ *| *\| *$/g,"")),align:de[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:de[3]?de[3].replace(/\n$/,"").split(`
`):[]};if(we.header.length===we.align.length){we.raw=de[0];var Le=we.align.length,ne;for(ne=0;ne<Le;ne++)/^ *-+: *$/.test(we.align[ne])?we.align[ne]="right":/^ *:-+: *$/.test(we.align[ne])?we.align[ne]="center":/^ *:-+ *$/.test(we.align[ne])?we.align[ne]="left":we.align[ne]=null;for(Le=we.cells.length,ne=0;ne<Le;ne++)we.cells[ne]=k(we.cells[ne].replace(/^ *\| *| *\| *$/g,""),we.header.length);return we}}},Pe.lheading=function(ce){var de=this.rules.block.lheading.exec(ce);if(de)return{type:"heading",raw:de[0],depth:de[2].charAt(0)==="="?1:2,text:de[1]}},Pe.paragraph=function(ce){var de=this.rules.block.paragraph.exec(ce);if(de)return{type:"paragraph",raw:de[0],text:de[1].charAt(de[1].length-1)===`
`?de[1].slice(0,-1):de[1]}},Pe.text=function(ce){var de=this.rules.block.text.exec(ce);if(de)return{type:"text",raw:de[0],text:de[0]}},Pe.escape=function(ce){var de=this.rules.inline.escape.exec(ce);if(de)return{type:"escape",raw:de[0],text:D(de[1])}},Pe.tag=function(ce,de,we){var Le=this.rules.inline.tag.exec(ce);if(Le)return!de&&/^<a /i.test(Le[0])?de=!0:de&&/^<\/a>/i.test(Le[0])&&(de=!1),!we&&/^<(pre|code|kbd|script)(\s|>)/i.test(Le[0])?we=!0:we&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Le[0])&&(we=!1),{type:this.options.sanitize?"text":"html",raw:Le[0],inLink:de,inRawBlock:we,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):D(Le[0]):Le[0]}},Pe.link=function(ce){var de=this.rules.inline.link.exec(ce);if(de){var we=de[2].trim();if(!this.options.pedantic&&/^</.test(we)){if(!/>$/.test(we))return;var Le=K(we.slice(0,-1),"\\");if((we.length-Le.length)%2===0)return}else{var ne=re(de[2],"()");if(ne>-1){var dt=de[0].indexOf("!")===0?5:4,Se=dt+de[1].length+ne;de[2]=de[2].substring(0,ne),de[0]=de[0].substring(0,Se).trim(),de[3]=""}}var Dt=de[2],Pt="";if(this.options.pedantic){var Ht=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Dt);Ht&&(Dt=Ht[1],Pt=Ht[3])}else Pt=de[3]?de[3].slice(1,-1):"";return Dt=Dt.trim(),/^</.test(Dt)&&(this.options.pedantic&&!/>$/.test(we)?Dt=Dt.slice(1):Dt=Dt.slice(1,-1)),pe(de,{href:Dt&&Dt.replace(this.rules.inline._escapes,"$1"),title:Pt&&Pt.replace(this.rules.inline._escapes,"$1")},de[0])}},Pe.reflink=function(ce,de){var we;if((we=this.rules.inline.reflink.exec(ce))||(we=this.rules.inline.nolink.exec(ce))){var Le=(we[2]||we[1]).replace(/\s+/g," ");if(Le=de[Le.toLowerCase()],!Le||!Le.href){var ne=we[0].charAt(0);return{type:"text",raw:ne,text:ne}}return pe(we,Le,we[0])}},Pe.emStrong=function(ce,de,we){we===void 0&&(we="");var Le=this.rules.inline.emStrong.lDelim.exec(ce);if(Le&&!(Le[3]&&we.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 ne=Le[1]||Le[2]||"";if(!ne||ne&&(we===""||this.rules.inline.punctuation.exec(we))){var dt=Le[0].length-1,Se,Dt,Pt=dt,Ht=0,sr=Le[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(sr.lastIndex=0,de=de.slice(-1*ce.length+dt);(Le=sr.exec(de))!=null;)if(Se=Le[1]||Le[2]||Le[3]||Le[4]||Le[5]||Le[6],!!Se){if(Dt=Se.length,Le[3]||Le[4]){Pt+=Dt;continue}else if((Le[5]||Le[6])&&dt%3&&!((dt+Dt)%3)){Ht+=Dt;continue}if(Pt-=Dt,!(Pt>0))return Dt=Math.min(Dt,Dt+Pt+Ht),Math.min(dt,Dt)%2?{type:"em",raw:ce.slice(0,dt+Le.index+Dt+1),text:ce.slice(1,dt+Le.index+Dt)}:{type:"strong",raw:ce.slice(0,dt+Le.index+Dt+1),text:ce.slice(2,dt+Le.index+Dt-1)}}}}},Pe.codespan=function(ce){var de=this.rules.inline.code.exec(ce);if(de){var we=de[2].replace(/\n/g," "),Le=/[^ ]/.test(we),ne=/^ /.test(we)&&/ $/.test(we);return Le&&ne&&(we=we.substring(1,we.length-1)),we=D(we,!0),{type:"codespan",raw:de[0],text:we}}},Pe.br=function(ce){var de=this.rules.inline.br.exec(ce);if(de)return{type:"br",raw:de[0]}},Pe.del=function(ce){var de=this.rules.inline.del.exec(ce);if(de)return{type:"del",raw:de[0],text:de[2]}},Pe.autolink=function(ce,de){var we=this.rules.inline.autolink.exec(ce);if(we){var Le,ne;return we[2]==="@"?(Le=D(this.options.mangle?de(we[1]):we[1]),ne="mailto:"+Le):(Le=D(we[1]),ne=Le),{type:"link",raw:we[0],text:Le,href:ne,tokens:[{type:"text",raw:Le,text:Le}]}}},Pe.url=function(ce,de){var we;if(we=this.rules.inline.url.exec(ce)){var Le,ne;if(we[2]==="@")Le=D(this.options.mangle?de(we[0]):we[0]),ne="mailto:"+Le;else{var dt;do dt=we[0],we[0]=this.rules.inline._backpedal.exec(we[0])[0];while(dt!==we[0]);Le=D(we[0]),we[1]==="www."?ne="http://"+Le:ne=Le}return{type:"link",raw:we[0],text:Le,href:ne,tokens:[{type:"text",raw:Le,text:Le}]}}},Pe.inlineText=function(ce,de,we){var Le=this.rules.inline.text.exec(ce);if(Le){var ne;return de?ne=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):D(Le[0]):Le[0]:ne=D(this.options.smartypants?we(Le[0]):Le[0]),{type:"text",raw:Le[0],text:ne}}},Ee}(),Ge=U.noopTest,ke=U.edit,et=U.merge,Ke={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:Ge,table:Ge,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ke._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ke._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ke.def=ke(Ke.def).replace("label",Ke._label).replace("title",Ke._title).getRegex(),Ke.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ke.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Ke.item=ke(Ke.item,"gm").replace(/bull/g,Ke.bullet).getRegex(),Ke.listItemStart=ke(/^( *)(bull) */).replace("bull",Ke.bullet).getRegex(),Ke.list=ke(Ke.list).replace(/bull/g,Ke.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ke.def.source+")").getRegex(),Ke._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",Ke._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Ke.html=ke(Ke.html,"i").replace("comment",Ke._comment).replace("tag",Ke._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ke.paragraph=ke(Ke._paragraph).replace("hr",Ke.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",Ke._tag).getRegex(),Ke.blockquote=ke(Ke.blockquote).replace("paragraph",Ke.paragraph).getRegex(),Ke.normal=et({},Ke),Ke.gfm=et({},Ke.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*|$)"}),Ke.gfm.nptable=ke(Ke.gfm.nptable).replace("hr",Ke.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",Ke._tag).getRegex(),Ke.gfm.table=ke(Ke.gfm.table).replace("hr",Ke.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",Ke._tag).getRegex(),Ke.pedantic=et({},Ke.normal,{html:ke(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ke._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:Ge,paragraph:ke(Ke.normal._paragraph).replace("hr",Ke.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Ke.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var tt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ge,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:Ge,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};tt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",tt.punctuation=ke(tt.punctuation).replace(/punctuation/g,tt._punctuation).getRegex(),tt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,tt.escapedEmSt=/\\\*|\\_/g,tt._comment=ke(Ke._comment).replace("(?:-->|$)","-->").getRegex(),tt.emStrong.lDelim=ke(tt.emStrong.lDelim).replace(/punct/g,tt._punctuation).getRegex(),tt.emStrong.rDelimAst=ke(tt.emStrong.rDelimAst,"g").replace(/punct/g,tt._punctuation).getRegex(),tt.emStrong.rDelimUnd=ke(tt.emStrong.rDelimUnd,"g").replace(/punct/g,tt._punctuation).getRegex(),tt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,tt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,tt._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])?)+(?![-_])/,tt.autolink=ke(tt.autolink).replace("scheme",tt._scheme).replace("email",tt._email).getRegex(),tt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,tt.tag=ke(tt.tag).replace("comment",tt._comment).replace("attribute",tt._attribute).getRegex(),tt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,tt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,tt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,tt.link=ke(tt.link).replace("label",tt._label).replace("href",tt._href).replace("title",tt._title).getRegex(),tt.reflink=ke(tt.reflink).replace("label",tt._label).getRegex(),tt.reflinkSearch=ke(tt.reflinkSearch,"g").replace("reflink",tt.reflink).replace("nolink",tt.nolink).getRegex(),tt.normal=et({},tt),tt.pedantic=et({},tt.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ke(/^!?\[(label)\]\((.*?)\)/).replace("label",tt._label).getRegex(),reflink:ke(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",tt._label).getRegex()}),tt.gfm=et({},tt.normal,{escape:ke(tt.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),tt.gfm.url=ke(tt.gfm.url,"i").replace("email",tt.gfm._extended_email).getRegex(),tt.breaks=et({},tt.gfm,{br:ke(tt.br).replace("{2,}","*").getRegex(),text:ke(tt.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var It={block:Ke,inline:tt},Yt=$e,qt=P.exports.defaults,Ot=It.block,Ut=It.inline,Ft=U.repeatString;function Ie(Ee){return Ee.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Ze(Ee){var Pe="",Ne,ce,de=Ee.length;for(Ne=0;Ne<de;Ne++)ce=Ee.charCodeAt(Ne),Math.random()>.5&&(ce="x"+ce.toString(16)),Pe+="&#"+ce+";";return Pe}var Fe=function(){function Ee(Ne){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ne||qt,this.options.tokenizer=this.options.tokenizer||new Yt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ce={block:Ot.normal,inline:Ut.normal};this.options.pedantic?(ce.block=Ot.pedantic,ce.inline=Ut.pedantic):this.options.gfm&&(ce.block=Ot.gfm,this.options.breaks?ce.inline=Ut.breaks:ce.inline=Ut.gfm),this.tokenizer.rules=ce}Ee.lex=function(ce,de){var we=new Ee(de);return we.lex(ce)},Ee.lexInline=function(ce,de){var we=new Ee(de);return we.inlineTokens(ce)};var Pe=Ee.prototype;return Pe.lex=function(ce){return ce=ce.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ce,this.tokens,!0),this.inline(this.tokens),this.tokens},Pe.blockTokens=function(ce,de,we){de===void 0&&(de=[]),we===void 0&&(we=!0),this.options.pedantic&&(ce=ce.replace(/^ +$/gm,""));for(var Le,ne,dt,Se;ce;){if(Le=this.tokenizer.space(ce)){ce=ce.substring(Le.raw.length),Le.type&&de.push(Le);continue}if(Le=this.tokenizer.code(ce)){ce=ce.substring(Le.raw.length),Se=de[de.length-1],Se&&Se.type==="paragraph"?(Se.raw+=`
`+Le.raw,Se.text+=`
`+Le.text):de.push(Le);continue}if(Le=this.tokenizer.fences(ce)){ce=ce.substring(Le.raw.length),de.push(Le);continue}if(Le=this.tokenizer.heading(ce)){ce=ce.substring(Le.raw.length),de.push(Le);continue}if(Le=this.tokenizer.nptable(ce)){ce=ce.substring(Le.raw.length),de.push(Le);continue}if(Le=this.tokenizer.hr(ce)){ce=ce.substring(Le.raw.length),de.push(Le);continue}if(Le=this.tokenizer.blockquote(ce)){ce=ce.substring(Le.raw.length),Le.tokens=this.blockTokens(Le.text,[],we),de.push(Le);continue}if(Le=this.tokenizer.list(ce)){for(ce=ce.substring(Le.raw.length),dt=Le.items.length,ne=0;ne<dt;ne++)Le.items[ne].tokens=this.blockTokens(Le.items[ne].text,[],!1);de.push(Le);continue}if(Le=this.tokenizer.html(ce)){ce=ce.substring(Le.raw.length),de.push(Le);continue}if(we&&(Le=this.tokenizer.def(ce))){ce=ce.substring(Le.raw.length),this.tokens.links[Le.tag]||(this.tokens.links[Le.tag]={href:Le.href,title:Le.title});continue}if(Le=this.tokenizer.table(ce)){ce=ce.substring(Le.raw.length),de.push(Le);continue}if(Le=this.tokenizer.lheading(ce)){ce=ce.substring(Le.raw.length),de.push(Le);continue}if(we&&(Le=this.tokenizer.paragraph(ce))){ce=ce.substring(Le.raw.length),de.push(Le);continue}if(Le=this.tokenizer.text(ce)){ce=ce.substring(Le.raw.length),Se=de[de.length-1],Se&&Se.type==="text"?(Se.raw+=`
`+Le.raw,Se.text+=`
`+Le.text):de.push(Le);continue}if(ce){var Dt="Infinite loop on byte: "+ce.charCodeAt(0);if(this.options.silent){console.error(Dt);break}else throw new Error(Dt)}}return de},Pe.inline=function(ce){var de,we,Le,ne,dt,Se,Dt=ce.length;for(de=0;de<Dt;de++)switch(Se=ce[de],Se.type){case"paragraph":case"text":case"heading":{Se.tokens=[],this.inlineTokens(Se.text,Se.tokens);break}case"table":{for(Se.tokens={header:[],cells:[]},ne=Se.header.length,we=0;we<ne;we++)Se.tokens.header[we]=[],this.inlineTokens(Se.header[we],Se.tokens.header[we]);for(ne=Se.cells.length,we=0;we<ne;we++)for(dt=Se.cells[we],Se.tokens.cells[we]=[],Le=0;Le<dt.length;Le++)Se.tokens.cells[we][Le]=[],this.inlineTokens(dt[Le],Se.tokens.cells[we][Le]);break}case"blockquote":{this.inline(Se.tokens);break}case"list":{for(ne=Se.items.length,we=0;we<ne;we++)this.inline(Se.items[we].tokens);break}}return ce},Pe.inlineTokens=function(ce,de,we,Le){de===void 0&&(de=[]),we===void 0&&(we=!1),Le===void 0&&(Le=!1);var ne,dt,Se=ce,Dt,Pt,Ht;if(this.tokens.links){var sr=Object.keys(this.tokens.links);if(sr.length>0)for(;(Dt=this.tokenizer.rules.inline.reflinkSearch.exec(Se))!=null;)sr.includes(Dt[0].slice(Dt[0].lastIndexOf("[")+1,-1))&&(Se=Se.slice(0,Dt.index)+"["+Ft("a",Dt[0].length-2)+"]"+Se.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Dt=this.tokenizer.rules.inline.blockSkip.exec(Se))!=null;)Se=Se.slice(0,Dt.index)+"["+Ft("a",Dt[0].length-2)+"]"+Se.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Dt=this.tokenizer.rules.inline.escapedEmSt.exec(Se))!=null;)Se=Se.slice(0,Dt.index)+"++"+Se.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;ce;){if(Pt||(Ht=""),Pt=!1,ne=this.tokenizer.escape(ce)){ce=ce.substring(ne.raw.length),de.push(ne);continue}if(ne=this.tokenizer.tag(ce,we,Le)){ce=ce.substring(ne.raw.length),we=ne.inLink,Le=ne.inRawBlock;var St=de[de.length-1];St&&ne.type==="text"&&St.type==="text"?(St.raw+=ne.raw,St.text+=ne.text):de.push(ne);continue}if(ne=this.tokenizer.link(ce)){ce=ce.substring(ne.raw.length),ne.type==="link"&&(ne.tokens=this.inlineTokens(ne.text,[],!0,Le)),de.push(ne);continue}if(ne=this.tokenizer.reflink(ce,this.tokens.links)){ce=ce.substring(ne.raw.length);var Et=de[de.length-1];ne.type==="link"?(ne.tokens=this.inlineTokens(ne.text,[],!0,Le),de.push(ne)):Et&&ne.type==="text"&&Et.type==="text"?(Et.raw+=ne.raw,Et.text+=ne.text):de.push(ne);continue}if(ne=this.tokenizer.emStrong(ce,Se,Ht)){ce=ce.substring(ne.raw.length),ne.tokens=this.inlineTokens(ne.text,[],we,Le),de.push(ne);continue}if(ne=this.tokenizer.codespan(ce)){ce=ce.substring(ne.raw.length),de.push(ne);continue}if(ne=this.tokenizer.br(ce)){ce=ce.substring(ne.raw.length),de.push(ne);continue}if(ne=this.tokenizer.del(ce)){ce=ce.substring(ne.raw.length),ne.tokens=this.inlineTokens(ne.text,[],we,Le),de.push(ne);continue}if(ne=this.tokenizer.autolink(ce,Ze)){ce=ce.substring(ne.raw.length),de.push(ne);continue}if(!we&&(ne=this.tokenizer.url(ce,Ze))){ce=ce.substring(ne.raw.length),de.push(ne);continue}if(ne=this.tokenizer.inlineText(ce,Le,Ie)){ce=ce.substring(ne.raw.length),ne.raw.slice(-1)!=="_"&&(Ht=ne.raw.slice(-1)),Pt=!0,dt=de[de.length-1],dt&&dt.type==="text"?(dt.raw+=ne.raw,dt.text+=ne.text):de.push(ne);continue}if(ce){var ur="Infinite loop on byte: "+ce.charCodeAt(0);if(this.options.silent){console.error(ur);break}else throw new Error(ur)}}return de},_(Ee,null,[{key:"rules",get:function(){return{block:Ot,inline:Ut}}}]),Ee}(),it=P.exports.defaults,nt=U.cleanUrl,ue=U.escape,ye=function(){function Ee(Ne){this.options=Ne||it}var Pe=Ee.prototype;return Pe.code=function(ce,de,we){var Le=(de||"").match(/\S*/)[0];if(this.options.highlight){var ne=this.options.highlight(ce,Le);ne!=null&&ne!==ce&&(we=!0,ce=ne)}return ce=ce.replace(/\n$/,"")+`
`,Le?'<pre><code class="'+this.options.langPrefix+ue(Le,!0)+'">'+(we?ce:ue(ce,!0))+`</code></pre>
`:"<pre><code>"+(we?ce:ue(ce,!0))+`</code></pre>
`},Pe.blockquote=function(ce){return`<blockquote>
`+ce+`</blockquote>
`},Pe.html=function(ce){return ce},Pe.heading=function(ce,de,we,Le){return this.options.headerIds?"<h"+de+' id="'+this.options.headerPrefix+Le.slug(we)+'">'+ce+"</h"+de+`>
`:"<h"+de+">"+ce+"</h"+de+`>
`},Pe.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Pe.list=function(ce,de,we){var Le=de?"ol":"ul",ne=de&&we!==1?' start="'+we+'"':"";return"<"+Le+ne+`>
`+ce+"</"+Le+`>
`},Pe.listitem=function(ce){return"<li>"+ce+`</li>
`},Pe.checkbox=function(ce){return"<input "+(ce?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Pe.paragraph=function(ce){return"<p>"+ce+`</p>
`},Pe.table=function(ce,de){return de&&(de="<tbody>"+de+"</tbody>"),`<table>
<thead>
`+ce+`</thead>
`+de+`</table>
`},Pe.tablerow=function(ce){return`<tr>
`+ce+`</tr>
`},Pe.tablecell=function(ce,de){var we=de.header?"th":"td",Le=de.align?"<"+we+' align="'+de.align+'">':"<"+we+">";return Le+ce+"</"+we+`>
`},Pe.strong=function(ce){return"<strong>"+ce+"</strong>"},Pe.em=function(ce){return"<em>"+ce+"</em>"},Pe.codespan=function(ce){return"<code>"+ce+"</code>"},Pe.br=function(){return this.options.xhtml?"<br/>":"<br>"},Pe.del=function(ce){return"<del>"+ce+"</del>"},Pe.link=function(ce,de,we){if(ce=nt(this.options.sanitize,this.options.baseUrl,ce),ce===null)return we;var Le='<a href="'+ue(ce)+'"';return de&&(Le+=' title="'+de+'"'),Le+=">"+we+"</a>",Le},Pe.image=function(ce,de,we){if(ce=nt(this.options.sanitize,this.options.baseUrl,ce),ce===null)return we;var Le='<img src="'+ce+'" alt="'+we+'"';return de&&(Le+=' title="'+de+'"'),Le+=this.options.xhtml?"/>":">",Le},Pe.text=function(ce){return ce},Ee}(),Te=function(){function Ee(){}var Pe=Ee.prototype;return Pe.strong=function(ce){return ce},Pe.em=function(ce){return ce},Pe.codespan=function(ce){return ce},Pe.del=function(ce){return ce},Pe.html=function(ce){return ce},Pe.text=function(ce){return ce},Pe.link=function(ce,de,we){return""+we},Pe.image=function(ce,de,we){return""+we},Pe.br=function(){return""},Ee}(),Ae=function(){function Ee(){this.seen={}}var Pe=Ee.prototype;return Pe.serialize=function(ce){return ce.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Pe.getNextSafeSlug=function(ce,de){var we=ce,Le=0;if(this.seen.hasOwnProperty(we)){Le=this.seen[ce];do Le++,we=ce+"-"+Le;while(this.seen.hasOwnProperty(we))}return de||(this.seen[ce]=Le,this.seen[we]=0),we},Pe.slug=function(ce,de){de===void 0&&(de={});var we=this.serialize(ce);return this.getNextSafeSlug(we,de.dryrun)},Ee}(),Me=ye,ze=Te,qe=Ae,rt=P.exports.defaults,Xe=U.unescape,He=function(){function Ee(Ne){this.options=Ne||rt,this.options.renderer=this.options.renderer||new Me,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ze,this.slugger=new qe}Ee.parse=function(ce,de){var we=new Ee(de);return we.parse(ce)},Ee.parseInline=function(ce,de){var we=new Ee(de);return we.parseInline(ce)};var Pe=Ee.prototype;return Pe.parse=function(ce,de){de===void 0&&(de=!0);var we="",Le,ne,dt,Se,Dt,Pt,Ht,sr,St,Et,ur,Rr,$r,zr,Rt,Zt,_r,jr,Or=ce.length;for(Le=0;Le<Or;Le++)switch(Et=ce[Le],Et.type){case"space":continue;case"hr":{we+=this.renderer.hr();continue}case"heading":{we+=this.renderer.heading(this.parseInline(Et.tokens),Et.depth,Xe(this.parseInline(Et.tokens,this.textRenderer)),this.slugger);continue}case"code":{we+=this.renderer.code(Et.text,Et.lang,Et.escaped);continue}case"table":{for(sr="",Ht="",Se=Et.header.length,ne=0;ne<Se;ne++)Ht+=this.renderer.tablecell(this.parseInline(Et.tokens.header[ne]),{header:!0,align:Et.align[ne]});for(sr+=this.renderer.tablerow(Ht),St="",Se=Et.cells.length,ne=0;ne<Se;ne++){for(Pt=Et.tokens.cells[ne],Ht="",Dt=Pt.length,dt=0;dt<Dt;dt++)Ht+=this.renderer.tablecell(this.parseInline(Pt[dt]),{header:!1,align:Et.align[dt]});St+=this.renderer.tablerow(Ht)}we+=this.renderer.table(sr,St);continue}case"blockquote":{St=this.parse(Et.tokens),we+=this.renderer.blockquote(St);continue}case"list":{for(ur=Et.ordered,Rr=Et.start,$r=Et.loose,Se=Et.items.length,St="",ne=0;ne<Se;ne++)Rt=Et.items[ne],Zt=Rt.checked,_r=Rt.task,zr="",Rt.task&&(jr=this.renderer.checkbox(Zt),$r?Rt.tokens.length>0&&Rt.tokens[0].type==="text"?(Rt.tokens[0].text=jr+" "+Rt.tokens[0].text,Rt.tokens[0].tokens&&Rt.tokens[0].tokens.length>0&&Rt.tokens[0].tokens[0].type==="text"&&(Rt.tokens[0].tokens[0].text=jr+" "+Rt.tokens[0].tokens[0].text)):Rt.tokens.unshift({type:"text",text:jr}):zr+=jr),zr+=this.parse(Rt.tokens,$r),St+=this.renderer.listitem(zr,_r,Zt);we+=this.renderer.list(St,ur,Rr);continue}case"html":{we+=this.renderer.html(Et.text);continue}case"paragraph":{we+=this.renderer.paragraph(this.parseInline(Et.tokens));continue}case"text":{for(St=Et.tokens?this.parseInline(Et.tokens):Et.text;Le+1<Or&&ce[Le+1].type==="text";)Et=ce[++Le],St+=`
`+(Et.tokens?this.parseInline(Et.tokens):Et.text);we+=de?this.renderer.paragraph(St):St;continue}default:{var ti='Token with "'+Et.type+'" type was not found.';if(this.options.silent){console.error(ti);return}else throw new Error(ti)}}return we},Pe.parseInline=function(ce,de){de=de||this.renderer;var we="",Le,ne,dt=ce.length;for(Le=0;Le<dt;Le++)switch(ne=ce[Le],ne.type){case"escape":{we+=de.text(ne.text);break}case"html":{we+=de.html(ne.text);break}case"link":{we+=de.link(ne.href,ne.title,this.parseInline(ne.tokens,de));break}case"image":{we+=de.image(ne.href,ne.title,ne.text);break}case"strong":{we+=de.strong(this.parseInline(ne.tokens,de));break}case"em":{we+=de.em(this.parseInline(ne.tokens,de));break}case"codespan":{we+=de.codespan(ne.text);break}case"br":{we+=de.br();break}case"del":{we+=de.del(this.parseInline(ne.tokens,de));break}case"text":{we+=de.text(ne.text);break}default:{var Se='Token with "'+ne.type+'" type was not found.';if(this.options.silent){console.error(Se);return}else throw new Error(Se)}}return we},Ee}(),lt=Fe,gt=He,ft=$e,_t=ye,wt=Te,mt=Ae,kt=U.merge,bt=U.checkSanitizeDeprecation,$=U.escape,G=P.exports.getDefaults,Qe=P.exports.changeDefaults,ae=P.exports.defaults;function be(Ee,Pe,Ne){if(typeof Ee=="undefined"||Ee===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ee!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ee)+", string expected");if(typeof Pe=="function"&&(Ne=Pe,Pe=null),Pe=kt({},be.defaults,Pe||{}),bt(Pe),Ne){var ce=Pe.highlight,de;try{de=lt.lex(Ee,Pe)}catch(dt){return Ne(dt)}var we=function(Se){var Dt;if(!Se)try{Pe.walkTokens&&be.walkTokens(de,Pe.walkTokens),Dt=gt.parse(de,Pe)}catch(Pt){Se=Pt}return Pe.highlight=ce,Se?Ne(Se):Ne(null,Dt)};if(!ce||ce.length<3||(delete Pe.highlight,!de.length))return we();var Le=0;be.walkTokens(de,function(dt){dt.type==="code"&&(Le++,setTimeout(function(){ce(dt.text,dt.lang,function(Se,Dt){if(Se)return we(Se);Dt!=null&&Dt!==dt.text&&(dt.text=Dt,dt.escaped=!0),Le--,Le===0&&we()})},0))}),Le===0&&we();return}try{var ne=lt.lex(Ee,Pe);return Pe.walkTokens&&be.walkTokens(ne,Pe.walkTokens),gt.parse(ne,Pe)}catch(dt){if(dt.message+=`
Please report this to https://github.com/markedjs/marked.`,Pe.silent)return"<p>An error occurred:</p><pre>"+$(dt.message+"",!0)+"</pre>";throw dt}}be.options=be.setOptions=function(Ee){return kt(be.defaults,Ee),Qe(be.defaults),be},be.getDefaults=G,be.defaults=ae,be.use=function(Ee){var Pe=kt({},Ee);if(Ee.renderer&&function(){var ce=be.defaults.renderer||new _t,de=function(ne){var dt=ce[ne];ce[ne]=function(){for(var Se=arguments.length,Dt=new Array(Se),Pt=0;Pt<Se;Pt++)Dt[Pt]=arguments[Pt];var Ht=Ee.renderer[ne].apply(ce,Dt);return Ht===!1&&(Ht=dt.apply(ce,Dt)),Ht}};for(var we in Ee.renderer)de(we);Pe.renderer=ce}(),Ee.tokenizer&&function(){var ce=be.defaults.tokenizer||new ft,de=function(ne){var dt=ce[ne];ce[ne]=function(){for(var Se=arguments.length,Dt=new Array(Se),Pt=0;Pt<Se;Pt++)Dt[Pt]=arguments[Pt];var Ht=Ee.tokenizer[ne].apply(ce,Dt);return Ht===!1&&(Ht=dt.apply(ce,Dt)),Ht}};for(var we in Ee.tokenizer)de(we);Pe.tokenizer=ce}(),Ee.walkTokens){var Ne=be.defaults.walkTokens;Pe.walkTokens=function(ce){Ee.walkTokens(ce),Ne&&Ne(ce)}}be.setOptions(Pe)},be.walkTokens=function(Ee,Pe){for(var Ne=V(Ee),ce;!(ce=Ne()).done;){var de=ce.value;switch(Pe(de),de.type){case"table":{for(var we=V(de.tokens.header),Le;!(Le=we()).done;){var ne=Le.value;be.walkTokens(ne,Pe)}for(var dt=V(de.tokens.cells),Se;!(Se=dt()).done;)for(var Dt=Se.value,Pt=V(Dt),Ht;!(Ht=Pt()).done;){var sr=Ht.value;be.walkTokens(sr,Pe)}break}case"list":{be.walkTokens(de.items,Pe);break}default:de.tokens&&be.walkTokens(de.tokens,Pe)}}},be.parseInline=function(Ee,Pe){if(typeof Ee=="undefined"||Ee===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Ee!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Ee)+", string expected");Pe=kt({},be.defaults,Pe||{}),bt(Pe);try{var Ne=lt.lexInline(Ee,Pe);return Pe.walkTokens&&be.walkTokens(Ne,Pe.walkTokens),gt.parseInline(Ne,Pe)}catch(ce){if(ce.message+=`
Please report this to https://github.com/markedjs/marked.`,Pe.silent)return"<p>An error occurred:</p><pre>"+$(ce.message+"",!0)+"</pre>";throw ce}},be.Parser=gt,be.parser=gt.parse,be.Renderer=_t,be.TextRenderer=wt,be.Lexer=lt,be.lexer=lt.lex,be.Tokenizer=ft,be.Slugger=mt,be.parse=be;var Kt=be;return Kt})},11690:function(xt){const Re=/[&<>"']/,_=/[&<>"']/g,H=/[<>"']|&(?!#?\w+;)/,I=/[<>"']|&(?!#?\w+;)/g,V={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},P=z=>V[z];function F(z,te){if(te){if(Re.test(z))return z.replace(_,P)}else if(H.test(z))return z.replace(I,P);return z}const R=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function B(z){return z.replace(R,(te,J)=>(J=J.toLowerCase(),J==="colon"?":":J.charAt(0)==="#"?J.charAt(1)==="x"?String.fromCharCode(parseInt(J.substring(2),16)):String.fromCharCode(+J.substring(1)):""))}const y=/(^|[^\[])\^/g;function i(z,te){z=z.source||z,te=te||"";const J={replace:(ge,_e)=>(_e=_e.source||_e,_e=_e.replace(y,"$1"),z=z.replace(ge,_e),J),getRegex:()=>new RegExp(z,te)};return J}const v=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function h(z,te,J){if(z){let ge;try{ge=decodeURIComponent(B(J)).replace(v,"").toLowerCase()}catch(_e){return null}if(ge.indexOf("javascript:")===0||ge.indexOf("vbscript:")===0||ge.indexOf("data:")===0)return null}te&&!f.test(J)&&(J=O(te,J));try{J=encodeURI(J).replace(/%25/g,"%")}catch(ge){return null}return J}const n={},o=/^[^:]+:\/*[^/]*$/,u=/^([^:]+:)[\s\S]*$/,S=/^([^:]+:\/*[^/]*)[\s\S]*$/;function O(z,te){n[" "+z]||(o.test(z)?n[" "+z]=z+"/":n[" "+z]=j(z,"/",!0)),z=n[" "+z];const J=z.indexOf(":")===-1;return te.substring(0,2)==="//"?J?te:z.replace(u,"$1")+te:te.charAt(0)==="/"?J?te:z.replace(S,"$1")+te:z+te}const T={exec:function(){}};function E(z){let te=1,J,ge;for(;te<arguments.length;te++){J=arguments[te];for(ge in J)Object.prototype.hasOwnProperty.call(J,ge)&&(z[ge]=J[ge])}return z}function C(z,te){const J=z.replace(/\|/g,(se,Y,ie)=>{let U=!1,Z=Y;for(;--Z>=0&&ie[Z]==="\\";)U=!U;return U?"|":" |"}),ge=J.split(/ \|/);let _e=0;if(ge.length>te)ge.splice(te);else for(;ge.length<te;)ge.push("");for(;_e<ge.length;_e++)ge[_e]=ge[_e].trim().replace(/\\\|/g,"|");return ge}function j(z,te,J){const ge=z.length;if(ge===0)return"";let _e=0;for(;_e<ge;){const se=z.charAt(ge-_e-1);if(se===te&&!J)_e++;else if(se!==te&&J)_e++;else break}return z.substr(0,ge-_e)}function x(z,te){if(z.indexOf(te[1])===-1)return-1;const J=z.length;let ge=0,_e=0;for(;_e<J;_e++)if(z[_e]==="\\")_e++;else if(z[_e]===te[0])ge++;else if(z[_e]===te[1]&&(ge--,ge<0))return _e;return-1}function L(z){z&&z.sanitize&&!z.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 N(z,te){if(te<1)return"";let J="";for(;te>1;)te&1&&(J+=z),te>>=1,z+=z;return J+z}xt.exports={escape:F,unescape:B,edit:i,cleanUrl:h,resolveUrl:O,noopTest:T,merge:E,splitCells:C,rtrim:j,findClosingBracket:x,checkSanitizeDeprecation:L,repeatString:N}},75918:function(xt,Re,_){"use strict";_.d(Re,{Wi:function(){return R},Z0:function(){return B},aU:function(){return F},eZ:function(){return i},wY:function(){return y}});var H=_(4348),I=_(69323),V=_(13268),P=function(v,f,h,n){function o(u){return u instanceof h?u:new h(function(S){S(u)})}return new(h||(h=Promise))(function(u,S){function O(C){try{E(n.next(C))}catch(j){S(j)}}function T(C){try{E(n.throw(C))}catch(j){S(j)}}function E(C){C.done?u(C.value):o(C.value).then(O,T)}E((n=n.apply(v,f||[])).next())})};class F extends I.JT{constructor(f,h="",n="",o=!0,u){super(),this._onDidChange=this._register(new H.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=f,this._label=h,this._cssClass=n,this._enabled=o,this._actionCallback=u}get id(){return this._id}get label(){return this._label}set label(f){this._setLabel(f)}_setLabel(f){this._label!==f&&(this._label=f,this._onDidChange.fire({label:f}))}get tooltip(){return this._tooltip||""}set tooltip(f){this._setTooltip(f)}_setTooltip(f){this._tooltip!==f&&(this._tooltip=f,this._onDidChange.fire({tooltip:f}))}get class(){return this._cssClass}set class(f){this._setClass(f)}_setClass(f){this._cssClass!==f&&(this._cssClass=f,this._onDidChange.fire({class:f}))}get enabled(){return this._enabled}set enabled(f){this._setEnabled(f)}_setEnabled(f){this._enabled!==f&&(this._enabled=f,this._onDidChange.fire({enabled:f}))}get checked(){return this._checked}set checked(f){this._setChecked(f)}_setChecked(f){this._checked!==f&&(this._checked=f,this._onDidChange.fire({checked:f}))}run(f,h){return P(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(f))})}}class R extends I.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new H.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new H.Q5),this.onDidRun=this._onDidRun.event}run(f,h){return P(this,void 0,void 0,function*(){if(!f.enabled)return;this._onBeforeRun.fire({action:f});let n;try{yield this.runAction(f,h)}catch(o){n=o}this._onDidRun.fire({action:f,error:n})})}runAction(f,h){return P(this,void 0,void 0,function*(){yield f.run(h)})}}class B extends F{constructor(f){super(B.ID,f,f?"separator text":"separator"),this.checked=!1,this.enabled=!1}}B.ID="vs.actions.separator";class y{constructor(f,h,n,o){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=f,this.label=h,this.class=o,this._actions=n}get actions(){return this._actions}dispose(){}run(){return P(this,void 0,void 0,function*(){})}}class i extends F{constructor(){super(i.ID,V.N("submenu.empty","(empty)"),void 0,!1)}}i.ID="vs.actions.empty"},76068:function(xt,Re,_){"use strict";_.d(Re,{ok:function(){return H}});function H(I,V){if(!I)throw new Error(V?`Assertion failed (${V})`:"Assertion Failed")}},52615:function(xt,Re,_){"use strict";_.d(Re,{CM:function(){return F},JL:function(){return R},dT:function(){return y},fK:function(){return P},lA:function(){return B}});var H=_(4348);class I{constructor(){this._icons=new Map,this._onDidRegister=new H.Q5}add(v){const f=this._icons.get(v.id);f?v.description?f.description=v.description:console.error(`Duplicate registration of codicon ${v.id}`):(this._icons.set(v.id,v),this._onDidRegister.fire(v))}get(v){return this._icons.get(v)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const V=new I,P=V;function F(i,v){return new B(i,v)}function R(i){return i?i.replace(/\$\((.*?)\)/g,(v,f)=>` ${f} `).trim():""}class B{constructor(v,f,h){this.id=v,this.definition=f,this.description=h,V.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var y;(function(i){i.iconNameSegment="[A-Za-z0-9]+",i.iconNameExpression="[A-Za-z0-9\\-]+",i.iconModifierExpression="~[A-Za-z]+";const v=new RegExp(`^(${i.iconNameExpression})(${i.iconModifierExpression})?$`);function f(o){if(o instanceof B)return["codicon","codicon-"+o.id];const u=v.exec(o.id);if(!u)return f(B.error);let[,S,O]=u;const T=["codicon","codicon-"+S];return O&&T.push("codicon-modifier-"+O.substr(1)),T}i.asClassNameArray=f;function h(o){return f(o).join(" ")}i.asClassName=h;function n(o){return"."+f(o).join(".")}i.asCSSSelector=n})(y||(y={})),function(i){i.add=new i("add",{fontCharacter:"\\ea60"}),i.plus=new i("plus",i.add.definition),i.gistNew=new i("gist-new",i.add.definition),i.repoCreate=new i("repo-create",i.add.definition),i.lightbulb=new i("lightbulb",{fontCharacter:"\\ea61"}),i.lightBulb=new i("light-bulb",{fontCharacter:"\\ea61"}),i.repo=new i("repo",{fontCharacter:"\\ea62"}),i.repoDelete=new i("repo-delete",{fontCharacter:"\\ea62"}),i.gistFork=new i("gist-fork",{fontCharacter:"\\ea63"}),i.repoForked=new i("repo-forked",{fontCharacter:"\\ea63"}),i.gitPullRequest=new i("git-pull-request",{fontCharacter:"\\ea64"}),i.gitPullRequestAbandoned=new i("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),i.recordKeys=new i("record-keys",{fontCharacter:"\\ea65"}),i.keyboard=new i("keyboard",{fontCharacter:"\\ea65"}),i.tag=new i("tag",{fontCharacter:"\\ea66"}),i.tagAdd=new i("tag-add",{fontCharacter:"\\ea66"}),i.tagRemove=new i("tag-remove",{fontCharacter:"\\ea66"}),i.person=new i("person",{fontCharacter:"\\ea67"}),i.personFollow=new i("person-follow",{fontCharacter:"\\ea67"}),i.personOutline=new i("person-outline",{fontCharacter:"\\ea67"}),i.personFilled=new i("person-filled",{fontCharacter:"\\ea67"}),i.gitBranch=new i("git-branch",{fontCharacter:"\\ea68"}),i.gitBranchCreate=new i("git-branch-create",{fontCharacter:"\\ea68"}),i.gitBranchDelete=new i("git-branch-delete",{fontCharacter:"\\ea68"}),i.sourceControl=new i("source-control",{fontCharacter:"\\ea68"}),i.mirror=new i("mirror",{fontCharacter:"\\ea69"}),i.mirrorPublic=new i("mirror-public",{fontCharacter:"\\ea69"}),i.star=new i("star",{fontCharacter:"\\ea6a"}),i.starAdd=new i("star-add",{fontCharacter:"\\ea6a"}),i.starDelete=new i("star-delete",{fontCharacter:"\\ea6a"}),i.starEmpty=new i("star-empty",{fontCharacter:"\\ea6a"}),i.comment=new i("comment",{fontCharacter:"\\ea6b"}),i.commentAdd=new i("comment-add",{fontCharacter:"\\ea6b"}),i.alert=new i("alert",{fontCharacter:"\\ea6c"}),i.warning=new i("warning",{fontCharacter:"\\ea6c"}),i.search=new i("search",{fontCharacter:"\\ea6d"}),i.searchSave=new i("search-save",{fontCharacter:"\\ea6d"}),i.logOut=new i("log-out",{fontCharacter:"\\ea6e"}),i.signOut=new i("sign-out",{fontCharacter:"\\ea6e"}),i.logIn=new i("log-in",{fontCharacter:"\\ea6f"}),i.signIn=new i("sign-in",{fontCharacter:"\\ea6f"}),i.eye=new i("eye",{fontCharacter:"\\ea70"}),i.eyeUnwatch=new i("eye-unwatch",{fontCharacter:"\\ea70"}),i.eyeWatch=new i("eye-watch",{fontCharacter:"\\ea70"}),i.circleFilled=new i("circle-filled",{fontCharacter:"\\ea71"}),i.primitiveDot=new i("primitive-dot",{fontCharacter:"\\ea71"}),i.closeDirty=new i("close-dirty",{fontCharacter:"\\ea71"}),i.debugBreakpoint=new i("debug-breakpoint",{fontCharacter:"\\ea71"}),i.debugBreakpointDisabled=new i("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),i.debugHint=new i("debug-hint",{fontCharacter:"\\ea71"}),i.primitiveSquare=new i("primitive-square",{fontCharacter:"\\ea72"}),i.edit=new i("edit",{fontCharacter:"\\ea73"}),i.pencil=new i("pencil",{fontCharacter:"\\ea73"}),i.info=new i("info",{fontCharacter:"\\ea74"}),i.issueOpened=new i("issue-opened",{fontCharacter:"\\ea74"}),i.gistPrivate=new i("gist-private",{fontCharacter:"\\ea75"}),i.gitForkPrivate=new i("git-fork-private",{fontCharacter:"\\ea75"}),i.lock=new i("lock",{fontCharacter:"\\ea75"}),i.mirrorPrivate=new i("mirror-private",{fontCharacter:"\\ea75"}),i.close=new i("close",{fontCharacter:"\\ea76"}),i.removeClose=new i("remove-close",{fontCharacter:"\\ea76"}),i.x=new i("x",{fontCharacter:"\\ea76"}),i.repoSync=new i("repo-sync",{fontCharacter:"\\ea77"}),i.sync=new i("sync",{fontCharacter:"\\ea77"}),i.clone=new i("clone",{fontCharacter:"\\ea78"}),i.desktopDownload=new i("desktop-download",{fontCharacter:"\\ea78"}),i.beaker=new i("beaker",{fontCharacter:"\\ea79"}),i.microscope=new i("microscope",{fontCharacter:"\\ea79"}),i.vm=new i("vm",{fontCharacter:"\\ea7a"}),i.deviceDesktop=new i("device-desktop",{fontCharacter:"\\ea7a"}),i.file=new i("file",{fontCharacter:"\\ea7b"}),i.fileText=new i("file-text",{fontCharacter:"\\ea7b"}),i.more=new i("more",{fontCharacter:"\\ea7c"}),i.ellipsis=new i("ellipsis",{fontCharacter:"\\ea7c"}),i.kebabHorizontal=new i("kebab-horizontal",{fontCharacter:"\\ea7c"}),i.mailReply=new i("mail-reply",{fontCharacter:"\\ea7d"}),i.reply=new i("reply",{fontCharacter:"\\ea7d"}),i.organization=new i("organization",{fontCharacter:"\\ea7e"}),i.organizationFilled=new i("organization-filled",{fontCharacter:"\\ea7e"}),i.organizationOutline=new i("organization-outline",{fontCharacter:"\\ea7e"}),i.newFile=new i("new-file",{fontCharacter:"\\ea7f"}),i.fileAdd=new i("file-add",{fontCharacter:"\\ea7f"}),i.newFolder=new i("new-folder",{fontCharacter:"\\ea80"}),i.fileDirectoryCreate=new i("file-directory-create",{fontCharacter:"\\ea80"}),i.trash=new i("trash",{fontCharacter:"\\ea81"}),i.trashcan=new i("trashcan",{fontCharacter:"\\ea81"}),i.history=new i("history",{fontCharacter:"\\ea82"}),i.clock=new i("clock",{fontCharacter:"\\ea82"}),i.folder=new i("folder",{fontCharacter:"\\ea83"}),i.fileDirectory=new i("file-directory",{fontCharacter:"\\ea83"}),i.symbolFolder=new i("symbol-folder",{fontCharacter:"\\ea83"}),i.logoGithub=new i("logo-github",{fontCharacter:"\\ea84"}),i.markGithub=new i("mark-github",{fontCharacter:"\\ea84"}),i.github=new i("github",{fontCharacter:"\\ea84"}),i.terminal=new i("terminal",{fontCharacter:"\\ea85"}),i.console=new i("console",{fontCharacter:"\\ea85"}),i.repl=new i("repl",{fontCharacter:"\\ea85"}),i.zap=new i("zap",{fontCharacter:"\\ea86"}),i.symbolEvent=new i("symbol-event",{fontCharacter:"\\ea86"}),i.error=new i("error",{fontCharacter:"\\ea87"}),i.stop=new i("stop",{fontCharacter:"\\ea87"}),i.variable=new i("variable",{fontCharacter:"\\ea88"}),i.symbolVariable=new i("symbol-variable",{fontCharacter:"\\ea88"}),i.array=new i("array",{fontCharacter:"\\ea8a"}),i.symbolArray=new i("symbol-array",{fontCharacter:"\\ea8a"}),i.symbolModule=new i("symbol-module",{fontCharacter:"\\ea8b"}),i.symbolPackage=new i("symbol-package",{fontCharacter:"\\ea8b"}),i.symbolNamespace=new i("symbol-namespace",{fontCharacter:"\\ea8b"}),i.symbolObject=new i("symbol-object",{fontCharacter:"\\ea8b"}),i.symbolMethod=new i("symbol-method",{fontCharacter:"\\ea8c"}),i.symbolFunction=new i("symbol-function",{fontCharacter:"\\ea8c"}),i.symbolConstructor=new i("symbol-constructor",{fontCharacter:"\\ea8c"}),i.symbolBoolean=new i("symbol-boolean",{fontCharacter:"\\ea8f"}),i.symbolNull=new i("symbol-null",{fontCharacter:"\\ea8f"}),i.symbolNumeric=new i("symbol-numeric",{fontCharacter:"\\ea90"}),i.symbolNumber=new i("symbol-number",{fontCharacter:"\\ea90"}),i.symbolStructure=new i("symbol-structure",{fontCharacter:"\\ea91"}),i.symbolStruct=new i("symbol-struct",{fontCharacter:"\\ea91"}),i.symbolParameter=new i("symbol-parameter",{fontCharacter:"\\ea92"}),i.symbolTypeParameter=new i("symbol-type-parameter",{fontCharacter:"\\ea92"}),i.symbolKey=new i("symbol-key",{fontCharacter:"\\ea93"}),i.symbolText=new i("symbol-text",{fontCharacter:"\\ea93"}),i.symbolReference=new i("symbol-reference",{fontCharacter:"\\ea94"}),i.goToFile=new i("go-to-file",{fontCharacter:"\\ea94"}),i.symbolEnum=new i("symbol-enum",{fontCharacter:"\\ea95"}),i.symbolValue=new i("symbol-value",{fontCharacter:"\\ea95"}),i.symbolRuler=new i("symbol-ruler",{fontCharacter:"\\ea96"}),i.symbolUnit=new i("symbol-unit",{fontCharacter:"\\ea96"}),i.activateBreakpoints=new i("activate-breakpoints",{fontCharacter:"\\ea97"}),i.archive=new i("archive",{fontCharacter:"\\ea98"}),i.arrowBoth=new i("arrow-both",{fontCharacter:"\\ea99"}),i.arrowDown=new i("arrow-down",{fontCharacter:"\\ea9a"}),i.arrowLeft=new i("arrow-left",{fontCharacter:"\\ea9b"}),i.arrowRight=new i("arrow-right",{fontCharacter:"\\ea9c"}),i.arrowSmallDown=new i("arrow-small-down",{fontCharacter:"\\ea9d"}),i.arrowSmallLeft=new i("arrow-small-left",{fontCharacter:"\\ea9e"}),i.arrowSmallRight=new i("arrow-small-right",{fontCharacter:"\\ea9f"}),i.arrowSmallUp=new i("arrow-small-up",{fontCharacter:"\\eaa0"}),i.arrowUp=new i("arrow-up",{fontCharacter:"\\eaa1"}),i.bell=new i("bell",{fontCharacter:"\\eaa2"}),i.bold=new i("bold",{fontCharacter:"\\eaa3"}),i.book=new i("book",{fontCharacter:"\\eaa4"}),i.bookmark=new i("bookmark",{fontCharacter:"\\eaa5"}),i.debugBreakpointConditionalUnverified=new i("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),i.debugBreakpointConditional=new i("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),i.debugBreakpointConditionalDisabled=new i("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),i.debugBreakpointDataUnverified=new i("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),i.debugBreakpointData=new i("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),i.debugBreakpointDataDisabled=new i("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),i.debugBreakpointLogUnverified=new i("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),i.debugBreakpointLog=new i("debug-breakpoint-log",{fontCharacter:"\\eaab"}),i.debugBreakpointLogDisabled=new i("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),i.briefcase=new i("briefcase",{fontCharacter:"\\eaac"}),i.broadcast=new i("broadcast",{fontCharacter:"\\eaad"}),i.browser=new i("browser",{fontCharacter:"\\eaae"}),i.bug=new i("bug",{fontCharacter:"\\eaaf"}),i.calendar=new i("calendar",{fontCharacter:"\\eab0"}),i.caseSensitive=new i("case-sensitive",{fontCharacter:"\\eab1"}),i.check=new i("check",{fontCharacter:"\\eab2"}),i.checklist=new i("checklist",{fontCharacter:"\\eab3"}),i.chevronDown=new i("chevron-down",{fontCharacter:"\\eab4"}),i.dropDownButton=new i("drop-down-button",i.chevronDown.definition),i.chevronLeft=new i("chevron-left",{fontCharacter:"\\eab5"}),i.chevronRight=new i("chevron-right",{fontCharacter:"\\eab6"}),i.chevronUp=new i("chevron-up",{fontCharacter:"\\eab7"}),i.chromeClose=new i("chrome-close",{fontCharacter:"\\eab8"}),i.chromeMaximize=new i("chrome-maximize",{fontCharacter:"\\eab9"}),i.chromeMinimize=new i("chrome-minimize",{fontCharacter:"\\eaba"}),i.chromeRestore=new i("chrome-restore",{fontCharacter:"\\eabb"}),i.circleOutline=new i("circle-outline",{fontCharacter:"\\eabc"}),i.debugBreakpointUnverified=new i("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),i.circleSlash=new i("circle-slash",{fontCharacter:"\\eabd"}),i.circuitBoard=new i("circuit-board",{fontCharacter:"\\eabe"}),i.clearAll=new i("clear-all",{fontCharacter:"\\eabf"}),i.clippy=new i("clippy",{fontCharacter:"\\eac0"}),i.closeAll=new i("close-all",{fontCharacter:"\\eac1"}),i.cloudDownload=new i("cloud-download",{fontCharacter:"\\eac2"}),i.cloudUpload=new i("cloud-upload",{fontCharacter:"\\eac3"}),i.code=new i("code",{fontCharacter:"\\eac4"}),i.collapseAll=new i("collapse-all",{fontCharacter:"\\eac5"}),i.colorMode=new i("color-mode",{fontCharacter:"\\eac6"}),i.commentDiscussion=new i("comment-discussion",{fontCharacter:"\\eac7"}),i.compareChanges=new i("compare-changes",{fontCharacter:"\\eafd"}),i.creditCard=new i("credit-card",{fontCharacter:"\\eac9"}),i.dash=new i("dash",{fontCharacter:"\\eacc"}),i.dashboard=new i("dashboard",{fontCharacter:"\\eacd"}),i.database=new i("database",{fontCharacter:"\\eace"}),i.debugContinue=new i("debug-continue",{fontCharacter:"\\eacf"}),i.debugDisconnect=new i("debug-disconnect",{fontCharacter:"\\ead0"}),i.debugPause=new i("debug-pause",{fontCharacter:"\\ead1"}),i.debugRestart=new i("debug-restart",{fontCharacter:"\\ead2"}),i.debugStart=new i("debug-start",{fontCharacter:"\\ead3"}),i.debugStepInto=new i("debug-step-into",{fontCharacter:"\\ead4"}),i.debugStepOut=new i("debug-step-out",{fontCharacter:"\\ead5"}),i.debugStepOver=new i("debug-step-over",{fontCharacter:"\\ead6"}),i.debugStop=new i("debug-stop",{fontCharacter:"\\ead7"}),i.debug=new i("debug",{fontCharacter:"\\ead8"}),i.deviceCameraVideo=new i("device-camera-video",{fontCharacter:"\\ead9"}),i.deviceCamera=new i("device-camera",{fontCharacter:"\\eada"}),i.deviceMobile=new i("device-mobile",{fontCharacter:"\\eadb"}),i.diffAdded=new i("diff-added",{fontCharacter:"\\eadc"}),i.diffIgnored=new i("diff-ignored",{fontCharacter:"\\eadd"}),i.diffModified=new i("diff-modified",{fontCharacter:"\\eade"}),i.diffRemoved=new i("diff-removed",{fontCharacter:"\\eadf"}),i.diffRenamed=new i("diff-renamed",{fontCharacter:"\\eae0"}),i.diff=new i("diff",{fontCharacter:"\\eae1"}),i.discard=new i("discard",{fontCharacter:"\\eae2"}),i.editorLayout=new i("editor-layout",{fontCharacter:"\\eae3"}),i.emptyWindow=new i("empty-window",{fontCharacter:"\\eae4"}),i.exclude=new i("exclude",{fontCharacter:"\\eae5"}),i.extensions=new i("extensions",{fontCharacter:"\\eae6"}),i.eyeClosed=new i("eye-closed",{fontCharacter:"\\eae7"}),i.fileBinary=new i("file-binary",{fontCharacter:"\\eae8"}),i.fileCode=new i("file-code",{fontCharacter:"\\eae9"}),i.fileMedia=new i("file-media",{fontCharacter:"\\eaea"}),i.filePdf=new i("file-pdf",{fontCharacter:"\\eaeb"}),i.fileSubmodule=new i("file-submodule",{fontCharacter:"\\eaec"}),i.fileSymlinkDirectory=new i("file-symlink-directory",{fontCharacter:"\\eaed"}),i.fileSymlinkFile=new i("file-symlink-file",{fontCharacter:"\\eaee"}),i.fileZip=new i("file-zip",{fontCharacter:"\\eaef"}),i.files=new i("files",{fontCharacter:"\\eaf0"}),i.filter=new i("filter",{fontCharacter:"\\eaf1"}),i.flame=new i("flame",{fontCharacter:"\\eaf2"}),i.foldDown=new i("fold-down",{fontCharacter:"\\eaf3"}),i.foldUp=new i("fold-up",{fontCharacter:"\\eaf4"}),i.fold=new i("fold",{fontCharacter:"\\eaf5"}),i.folderActive=new i("folder-active",{fontCharacter:"\\eaf6"}),i.folderOpened=new i("folder-opened",{fontCharacter:"\\eaf7"}),i.gear=new i("gear",{fontCharacter:"\\eaf8"}),i.gift=new i("gift",{fontCharacter:"\\eaf9"}),i.gistSecret=new i("gist-secret",{fontCharacter:"\\eafa"}),i.gist=new i("gist",{fontCharacter:"\\eafb"}),i.gitCommit=new i("git-commit",{fontCharacter:"\\eafc"}),i.gitCompare=new i("git-compare",{fontCharacter:"\\eafd"}),i.gitMerge=new i("git-merge",{fontCharacter:"\\eafe"}),i.githubAction=new i("github-action",{fontCharacter:"\\eaff"}),i.githubAlt=new i("github-alt",{fontCharacter:"\\eb00"}),i.globe=new i("globe",{fontCharacter:"\\eb01"}),i.grabber=new i("grabber",{fontCharacter:"\\eb02"}),i.graph=new i("graph",{fontCharacter:"\\eb03"}),i.gripper=new i("gripper",{fontCharacter:"\\eb04"}),i.heart=new i("heart",{fontCharacter:"\\eb05"}),i.home=new i("home",{fontCharacter:"\\eb06"}),i.horizontalRule=new i("horizontal-rule",{fontCharacter:"\\eb07"}),i.hubot=new i("hubot",{fontCharacter:"\\eb08"}),i.inbox=new i("inbox",{fontCharacter:"\\eb09"}),i.issueClosed=new i("issue-closed",{fontCharacter:"\\eba4"}),i.issueReopened=new i("issue-reopened",{fontCharacter:"\\eb0b"}),i.issues=new i("issues",{fontCharacter:"\\eb0c"}),i.italic=new i("italic",{fontCharacter:"\\eb0d"}),i.jersey=new i("jersey",{fontCharacter:"\\eb0e"}),i.json=new i("json",{fontCharacter:"\\eb0f"}),i.kebabVertical=new i("kebab-vertical",{fontCharacter:"\\eb10"}),i.key=new i("key",{fontCharacter:"\\eb11"}),i.law=new i("law",{fontCharacter:"\\eb12"}),i.lightbulbAutofix=new i("lightbulb-autofix",{fontCharacter:"\\eb13"}),i.linkExternal=new i("link-external",{fontCharacter:"\\eb14"}),i.link=new i("link",{fontCharacter:"\\eb15"}),i.listOrdered=new i("list-ordered",{fontCharacter:"\\eb16"}),i.listUnordered=new i("list-unordered",{fontCharacter:"\\eb17"}),i.liveShare=new i("live-share",{fontCharacter:"\\eb18"}),i.loading=new i("loading",{fontCharacter:"\\eb19"}),i.location=new i("location",{fontCharacter:"\\eb1a"}),i.mailRead=new i("mail-read",{fontCharacter:"\\eb1b"}),i.mail=new i("mail",{fontCharacter:"\\eb1c"}),i.markdown=new i("markdown",{fontCharacter:"\\eb1d"}),i.megaphone=new i("megaphone",{fontCharacter:"\\eb1e"}),i.mention=new i("mention",{fontCharacter:"\\eb1f"}),i.milestone=new i("milestone",{fontCharacter:"\\eb20"}),i.mortarBoard=new i("mortar-board",{fontCharacter:"\\eb21"}),i.move=new i("move",{fontCharacter:"\\eb22"}),i.multipleWindows=new i("multiple-windows",{fontCharacter:"\\eb23"}),i.mute=new i("mute",{fontCharacter:"\\eb24"}),i.noNewline=new i("no-newline",{fontCharacter:"\\eb25"}),i.note=new i("note",{fontCharacter:"\\eb26"}),i.octoface=new i("octoface",{fontCharacter:"\\eb27"}),i.openPreview=new i("open-preview",{fontCharacter:"\\eb28"}),i.package_=new i("package",{fontCharacter:"\\eb29"}),i.paintcan=new i("paintcan",{fontCharacter:"\\eb2a"}),i.pin=new i("pin",{fontCharacter:"\\eb2b"}),i.play=new i("play",{fontCharacter:"\\eb2c"}),i.run=new i("run",{fontCharacter:"\\eb2c"}),i.plug=new i("plug",{fontCharacter:"\\eb2d"}),i.preserveCase=new i("preserve-case",{fontCharacter:"\\eb2e"}),i.preview=new i("preview",{fontCharacter:"\\eb2f"}),i.project=new i("project",{fontCharacter:"\\eb30"}),i.pulse=new i("pulse",{fontCharacter:"\\eb31"}),i.question=new i("question",{fontCharacter:"\\eb32"}),i.quote=new i("quote",{fontCharacter:"\\eb33"}),i.radioTower=new i("radio-tower",{fontCharacter:"\\eb34"}),i.reactions=new i("reactions",{fontCharacter:"\\eb35"}),i.references=new i("references",{fontCharacter:"\\eb36"}),i.refresh=new i("refresh",{fontCharacter:"\\eb37"}),i.regex=new i("regex",{fontCharacter:"\\eb38"}),i.remoteExplorer=new i("remote-explorer",{fontCharacter:"\\eb39"}),i.remote=new i("remote",{fontCharacter:"\\eb3a"}),i.remove=new i("remove",{fontCharacter:"\\eb3b"}),i.replaceAll=new i("replace-all",{fontCharacter:"\\eb3c"}),i.replace=new i("replace",{fontCharacter:"\\eb3d"}),i.repoClone=new i("repo-clone",{fontCharacter:"\\eb3e"}),i.repoForcePush=new i("repo-force-push",{fontCharacter:"\\eb3f"}),i.repoPull=new i("repo-pull",{fontCharacter:"\\eb40"}),i.repoPush=new i("repo-push",{fontCharacter:"\\eb41"}),i.report=new i("report",{fontCharacter:"\\eb42"}),i.requestChanges=new i("request-changes",{fontCharacter:"\\eb43"}),i.rocket=new i("rocket",{fontCharacter:"\\eb44"}),i.rootFolderOpened=new i("root-folder-opened",{fontCharacter:"\\eb45"}),i.rootFolder=new i("root-folder",{fontCharacter:"\\eb46"}),i.rss=new i("rss",{fontCharacter:"\\eb47"}),i.ruby=new i("ruby",{fontCharacter:"\\eb48"}),i.saveAll=new i("save-all",{fontCharacter:"\\eb49"}),i.saveAs=new i("save-as",{fontCharacter:"\\eb4a"}),i.save=new i("save",{fontCharacter:"\\eb4b"}),i.screenFull=new i("screen-full",{fontCharacter:"\\eb4c"}),i.screenNormal=new i("screen-normal",{fontCharacter:"\\eb4d"}),i.searchStop=new i("search-stop",{fontCharacter:"\\eb4e"}),i.server=new i("server",{fontCharacter:"\\eb50"}),i.settingsGear=new i("settings-gear",{fontCharacter:"\\eb51"}),i.settings=new i("settings",{fontCharacter:"\\eb52"}),i.shield=new i("shield",{fontCharacter:"\\eb53"}),i.smiley=new i("smiley",{fontCharacter:"\\eb54"}),i.sortPrecedence=new i("sort-precedence",{fontCharacter:"\\eb55"}),i.splitHorizontal=new i("split-horizontal",{fontCharacter:"\\eb56"}),i.splitVertical=new i("split-vertical",{fontCharacter:"\\eb57"}),i.squirrel=new i("squirrel",{fontCharacter:"\\eb58"}),i.starFull=new i("star-full",{fontCharacter:"\\eb59"}),i.starHalf=new i("star-half",{fontCharacter:"\\eb5a"}),i.symbolClass=new i("symbol-class",{fontCharacter:"\\eb5b"}),i.symbolColor=new i("symbol-color",{fontCharacter:"\\eb5c"}),i.symbolConstant=new i("symbol-constant",{fontCharacter:"\\eb5d"}),i.symbolEnumMember=new i("symbol-enum-member",{fontCharacter:"\\eb5e"}),i.symbolField=new i("symbol-field",{fontCharacter:"\\eb5f"}),i.symbolFile=new i("symbol-file",{fontCharacter:"\\eb60"}),i.symbolInterface=new i("symbol-interface",{fontCharacter:"\\eb61"}),i.symbolKeyword=new i("symbol-keyword",{fontCharacter:"\\eb62"}),i.symbolMisc=new i("symbol-misc",{fontCharacter:"\\eb63"}),i.symbolOperator=new i("symbol-operator",{fontCharacter:"\\eb64"}),i.symbolProperty=new i("symbol-property",{fontCharacter:"\\eb65"}),i.wrench=new i("wrench",{fontCharacter:"\\eb65"}),i.wrenchSubaction=new i("wrench-subaction",{fontCharacter:"\\eb65"}),i.symbolSnippet=new i("symbol-snippet",{fontCharacter:"\\eb66"}),i.tasklist=new i("tasklist",{fontCharacter:"\\eb67"}),i.telescope=new i("telescope",{fontCharacter:"\\eb68"}),i.textSize=new i("text-size",{fontCharacter:"\\eb69"}),i.threeBars=new i("three-bars",{fontCharacter:"\\eb6a"}),i.thumbsdown=new i("thumbsdown",{fontCharacter:"\\eb6b"}),i.thumbsup=new i("thumbsup",{fontCharacter:"\\eb6c"}),i.tools=new i("tools",{fontCharacter:"\\eb6d"}),i.triangleDown=new i("triangle-down",{fontCharacter:"\\eb6e"}),i.triangleLeft=new i("triangle-left",{fontCharacter:"\\eb6f"}),i.triangleRight=new i("triangle-right",{fontCharacter:"\\eb70"}),i.triangleUp=new i("triangle-up",{fontCharacter:"\\eb71"}),i.twitter=new i("twitter",{fontCharacter:"\\eb72"}),i.unfold=new i("unfold",{fontCharacter:"\\eb73"}),i.unlock=new i("unlock",{fontCharacter:"\\eb74"}),i.unmute=new i("unmute",{fontCharacter:"\\eb75"}),i.unverified=new i("unverified",{fontCharacter:"\\eb76"}),i.verified=new i("verified",{fontCharacter:"\\eb77"}),i.versions=new i("versions",{fontCharacter:"\\eb78"}),i.vmActive=new i("vm-active",{fontCharacter:"\\eb79"}),i.vmOutline=new i("vm-outline",{fontCharacter:"\\eb7a"}),i.vmRunning=new i("vm-running",{fontCharacter:"\\eb7b"}),i.watch=new i("watch",{fontCharacter:"\\eb7c"}),i.whitespace=new i("whitespace",{fontCharacter:"\\eb7d"}),i.wholeWord=new i("whole-word",{fontCharacter:"\\eb7e"}),i.window=new i("window",{fontCharacter:"\\eb7f"}),i.wordWrap=new i("word-wrap",{fontCharacter:"\\eb80"}),i.zoomIn=new i("zoom-in",{fontCharacter:"\\eb81"}),i.zoomOut=new i("zoom-out",{fontCharacter:"\\eb82"}),i.listFilter=new i("list-filter",{fontCharacter:"\\eb83"}),i.listFlat=new i("list-flat",{fontCharacter:"\\eb84"}),i.listSelection=new i("list-selection",{fontCharacter:"\\eb85"}),i.selection=new i("selection",{fontCharacter:"\\eb85"}),i.listTree=new i("list-tree",{fontCharacter:"\\eb86"}),i.debugBreakpointFunctionUnverified=new i("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),i.debugBreakpointFunction=new i("debug-breakpoint-function",{fontCharacter:"\\eb88"}),i.debugBreakpointFunctionDisabled=new i("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),i.debugStackframeActive=new i("debug-stackframe-active",{fontCharacter:"\\eb89"}),i.debugStackframeDot=new i("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),i.debugStackframe=new i("debug-stackframe",{fontCharacter:"\\eb8b"}),i.debugStackframeFocused=new i("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),i.debugBreakpointUnsupported=new i("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),i.symbolString=new i("symbol-string",{fontCharacter:"\\eb8d"}),i.debugReverseContinue=new i("debug-reverse-continue",{fontCharacter:"\\eb8e"}),i.debugStepBack=new i("debug-step-back",{fontCharacter:"\\eb8f"}),i.debugRestartFrame=new i("debug-restart-frame",{fontCharacter:"\\eb90"}),i.callIncoming=new i("call-incoming",{fontCharacter:"\\eb92"}),i.callOutgoing=new i("call-outgoing",{fontCharacter:"\\eb93"}),i.menu=new i("menu",{fontCharacter:"\\eb94"}),i.expandAll=new i("expand-all",{fontCharacter:"\\eb95"}),i.feedback=new i("feedback",{fontCharacter:"\\eb96"}),i.groupByRefType=new i("group-by-ref-type",{fontCharacter:"\\eb97"}),i.ungroupByRefType=new i("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),i.account=new i("account",{fontCharacter:"\\eb99"}),i.bellDot=new i("bell-dot",{fontCharacter:"\\eb9a"}),i.debugConsole=new i("debug-console",{fontCharacter:"\\eb9b"}),i.library=new i("library",{fontCharacter:"\\eb9c"}),i.output=new i("output",{fontCharacter:"\\eb9d"}),i.runAll=new i("run-all",{fontCharacter:"\\eb9e"}),i.syncIgnored=new i("sync-ignored",{fontCharacter:"\\eb9f"}),i.pinned=new i("pinned",{fontCharacter:"\\eba0"}),i.githubInverted=new i("github-inverted",{fontCharacter:"\\eba1"}),i.debugAlt=new i("debug-alt",{fontCharacter:"\\eb91"}),i.serverProcess=new i("server-process",{fontCharacter:"\\eba2"}),i.serverEnvironment=new i("server-environment",{fontCharacter:"\\eba3"}),i.pass=new i("pass",{fontCharacter:"\\eba4"}),i.stopCircle=new i("stop-circle",{fontCharacter:"\\eba5"}),i.playCircle=new i("play-circle",{fontCharacter:"\\eba6"}),i.record=new i("record",{fontCharacter:"\\eba7"}),i.debugAltSmall=new i("debug-alt-small",{fontCharacter:"\\eba8"}),i.vmConnect=new i("vm-connect",{fontCharacter:"\\eba9"}),i.cloud=new i("cloud",{fontCharacter:"\\ebaa"}),i.merge=new i("merge",{fontCharacter:"\\ebab"}),i.exportIcon=new i("export",{fontCharacter:"\\ebac"}),i.graphLeft=new i("graph-left",{fontCharacter:"\\ebad"}),i.magnet=new i("magnet",{fontCharacter:"\\ebae"}),i.notebook=new i("notebook",{fontCharacter:"\\ebaf"}),i.redo=new i("redo",{fontCharacter:"\\ebb0"}),i.checkAll=new i("check-all",{fontCharacter:"\\ebb1"}),i.pinnedDirty=new i("pinned-dirty",{fontCharacter:"\\ebb2"}),i.passFilled=new i("pass-filled",{fontCharacter:"\\ebb3"}),i.circleLargeFilled=new i("circle-large-filled",{fontCharacter:"\\ebb4"}),i.circleLargeOutline=new i("circle-large-outline",{fontCharacter:"\\ebb5"}),i.combine=new i("combine",{fontCharacter:"\\ebb6"}),i.gather=new i("gather",{fontCharacter:"\\ebb6"}),i.table=new i("table",{fontCharacter:"\\ebb7"}),i.variableGroup=new i("variable-group",{fontCharacter:"\\ebb8"}),i.typeHierarchy=new i("type-hierarchy",{fontCharacter:"\\ebb9"}),i.typeHierarchySub=new i("type-hierarchy-sub",{fontCharacter:"\\ebba"}),i.typeHierarchySuper=new i("type-hierarchy-super",{fontCharacter:"\\ebbb"}),i.gitPullRequestCreate=new i("git-pull-request-create",{fontCharacter:"\\ebbc"}),i.runAbove=new i("run-above",{fontCharacter:"\\ebbd"}),i.runBelow=new i("run-below",{fontCharacter:"\\ebbe"}),i.notebookTemplate=new i("notebook-template",{fontCharacter:"\\ebbf"}),i.debugRerun=new i("debug-rerun",{fontCharacter:"\\ebc0"}),i.workspaceTrusted=new i("workspace-trusted",{fontCharacter:"\\ebc1"}),i.workspaceUntrusted=new i("workspace-untrusted",{fontCharacter:"\\ebc2"}),i.workspaceUnspecified=new i("workspace-unspecified",{fontCharacter:"\\ebc3"}),i.terminalCmd=new i("terminal-cmd",{fontCharacter:"\\ebc4"}),i.terminalDebian=new i("terminal-debian",{fontCharacter:"\\ebc5"}),i.terminalLinux=new i("terminal-linux",{fontCharacter:"\\ebc6"}),i.terminalPowershell=new i("terminal-powershell",{fontCharacter:"\\ebc7"}),i.terminalTmux=new i("terminal-tmux",{fontCharacter:"\\ebc8"}),i.terminalUbuntu=new i("terminal-ubuntu",{fontCharacter:"\\ebc9"}),i.terminalBash=new i("terminal-bash",{fontCharacter:"\\ebca"}),i.arrowSwap=new i("arrow-swap",{fontCharacter:"\\ebcb"}),i.copy=new i("copy",{fontCharacter:"\\ebcc"}),i.personAdd=new i("person-add",{fontCharacter:"\\ebcd"}),i.filterFilled=new i("filter-filled",{fontCharacter:"\\ebce"}),i.wand=new i("wand",{fontCharacter:"\\ebcf"}),i.debugLineByLine=new i("debug-line-by-line",{fontCharacter:"\\ebd0"}),i.inspect=new i("inspect",{fontCharacter:"\\ebd1"}),i.layers=new i("layers",{fontCharacter:"\\ebd2"}),i.layersDot=new i("layers-dot",{fontCharacter:"\\ebd3"}),i.layersActive=new i("layers-active",{fontCharacter:"\\ebd4"}),i.compass=new i("compass",{fontCharacter:"\\ebd5"}),i.compassDot=new i("compass-dot",{fontCharacter:"\\ebd6"}),i.compassActive=new i("compass-active",{fontCharacter:"\\ebd7"}),i.azure=new i("azure",{fontCharacter:"\\ebd8"}),i.issueDraft=new i("issue-draft",{fontCharacter:"\\ebd9"}),i.gitPullRequestClosed=new i("git-pull-request-closed",{fontCharacter:"\\ebda"}),i.gitPullRequestDraft=new i("git-pull-request-draft",{fontCharacter:"\\ebdb"}),i.debugAll=new i("debug-all",{fontCharacter:"\\ebdc"}),i.debugCoverage=new i("debug-coverage",{fontCharacter:"\\ebdd"}),i.runErrors=new i("run-errors",{fontCharacter:"\\ebde"}),i.folderLibrary=new i("folder-library",{fontCharacter:"\\ebdf"}),i.debugContinueSmall=new i("debug-continue-small",{fontCharacter:"\\ebe0"}),i.beakerStop=new i("beaker-stop",{fontCharacter:"\\ebe1"}),i.graphLine=new i("graph-line",{fontCharacter:"\\ebe2"}),i.graphScatter=new i("graph-scatter",{fontCharacter:"\\ebe3"}),i.pieChart=new i("pie-chart",{fontCharacter:"\\ebe4"}),i.bracket=new i("bracket",i.json.definition),i.bracketDot=new i("bracket-dot",{fontCharacter:"\\ebe5"}),i.bracketError=new i("bracket-error",{fontCharacter:"\\ebe6"}),i.lockSmall=new i("lock-small",{fontCharacter:"\\ebe7"}),i.azureDevops=new i("azure-devops",{fontCharacter:"\\ebe8"}),i.verifiedFilled=new i("verified-filled",{fontCharacter:"\\ebe9"})}(B||(B={}))},79881:function(xt,Re,_){"use strict";_.d(Re,{B8:function(){return f},Cp:function(){return P},F0:function(){return y},L6:function(){return v},VV:function(){return B},b1:function(){return i},dL:function(){return V},ri:function(){return F}});class H{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(n){setTimeout(()=>{throw n.stack?new Error(n.message+`
`+n.stack):n},0)}}emit(n){this.listeners.forEach(o=>{o(n)})}onUnexpectedError(n){this.unexpectedErrorHandler(n),this.emit(n)}onUnexpectedExternalError(n){this.unexpectedErrorHandler(n)}}const I=new H;function V(h){B(h)||I.onUnexpectedError(h)}function P(h){B(h)||I.onUnexpectedExternalError(h)}function F(h){if(h instanceof Error){let{name:n,message:o}=h;const u=h.stacktrace||h.stack;return{$isError:!0,name:n,message:o,stack:u}}return h}const R="Canceled";function B(h){return h instanceof Error&&h.name===R&&h.message===R}function y(){const h=new Error(R);return h.name=h.message,h}function i(h){return h?new Error(`Illegal argument: ${h}`):new Error("Illegal argument")}function v(h){return h?new Error(`Illegal state: ${h}`):new Error("Illegal state")}class f extends Error{constructor(n){super("NotSupported"),n&&(this.message=n)}}},4348:function(xt,Re,_){"use strict";_.d(Re,{D0:function(){return f},E7:function(){return h},K3:function(){return v},Q5:function(){return i},ZD:function(){return n},ju:function(){return F}});var H=_(79881),I=_(69323),V=_(34502),P=_(95830),F;(function(o){o.None=()=>I.JT.None;function u(ie){return(U,Z=null,K)=>{let k=!1,D;return D=ie(re=>{if(!k)return D?D.dispose():k=!0,U.call(Z,re)},null,K),k&&D.dispose(),D}}o.once=u;function S(ie,U){return x((Z,K=null,k)=>ie(D=>Z.call(K,U(D)),null,k))}o.map=S;function O(ie,U){return x((Z,K=null,k)=>ie(D=>{U(D),Z.call(K,D)},null,k))}o.forEach=O;function T(ie,U){return x((Z,K=null,k)=>ie(D=>U(D)&&Z.call(K,D),null,k))}o.filter=T;function E(ie){return ie}o.signal=E;function C(...ie){return(U,Z=null,K)=>(0,I.F8)(...ie.map(k=>k(D=>U.call(Z,D),null,K)))}o.any=C;function j(ie,U,Z){let K=Z;return S(ie,k=>(K=U(K,k),K))}o.reduce=j;function x(ie){let U;const Z=new i({onFirstListenerAdd(){U=ie(Z.fire,Z)},onLastListenerRemove(){U.dispose()}});return Z.event}function L(ie,U,Z=100,K=!1,k){let D,re,pe,Oe=0;const $e=new i({leakWarningThreshold:k,onFirstListenerAdd(){D=ie(Ge=>{Oe++,re=U(re,Ge),K&&!pe&&($e.fire(re),re=void 0),clearTimeout(pe),pe=setTimeout(()=>{const ke=re;re=void 0,pe=void 0,(!K||Oe>1)&&$e.fire(ke),Oe=0},Z)})},onLastListenerRemove(){D.dispose()}});return $e.event}o.debounce=L;function N(ie,U=(Z,K)=>Z===K){let Z=!0,K;return T(ie,k=>{const D=Z||!U(k,K);return Z=!1,K=k,D})}o.latch=N;function z(ie,U){return[o.filter(ie,U),o.filter(ie,Z=>!U(Z))]}o.split=z;function te(ie,U=!1,Z=[]){let K=Z.slice(),k=ie(pe=>{K?K.push(pe):re.fire(pe)});const D=()=>{K&&K.forEach(pe=>re.fire(pe)),K=null},re=new i({onFirstListenerAdd(){k||(k=ie(pe=>re.fire(pe)))},onFirstListenerDidAdd(){K&&(U?setTimeout(D):D())},onLastListenerRemove(){k&&k.dispose(),k=null}});return re.event}o.buffer=te;class J{constructor(U){this.event=U}map(U){return new J(S(this.event,U))}forEach(U){return new J(O(this.event,U))}filter(U){return new J(T(this.event,U))}reduce(U,Z){return new J(j(this.event,U,Z))}latch(){return new J(N(this.event))}debounce(U,Z=100,K=!1,k){return new J(L(this.event,U,Z,K,k))}on(U,Z,K){return this.event(U,Z,K)}once(U,Z,K){return u(this.event)(U,Z,K)}}function ge(ie){return new J(ie)}o.chain=ge;function _e(ie,U,Z=K=>K){const K=(...pe)=>re.fire(Z(...pe)),k=()=>ie.on(U,K),D=()=>ie.removeListener(U,K),re=new i({onFirstListenerAdd:k,onLastListenerRemove:D});return re.event}o.fromNodeEventEmitter=_e;function se(ie,U,Z=K=>K){const K=(...pe)=>re.fire(Z(...pe)),k=()=>ie.addEventListener(U,K),D=()=>ie.removeEventListener(U,K),re=new i({onFirstListenerAdd:k,onLastListenerRemove:D});return re.event}o.fromDOMEventEmitter=se;function Y(ie){return new Promise(U=>u(ie)(U))}o.toPromise=Y})(F||(F={}));class R{constructor(u){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${u}_${R._idPool++}`}start(u){this._stopWatch=new P.G(!0),this._listenerCount=u}stop(){if(this._stopWatch){const u=this._stopWatch.elapsed();this._elapsedOverall+=u,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${u.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}R._idPool=0;let B=-1;class y{constructor(u,S=Math.random().toString(18).slice(2,5)){this.customThreshold=u,this.name=S,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(u){let S=B;if(typeof this.customThreshold=="number"&&(S=this.customThreshold),S<=0||u<S)return;this._stacks||(this._stacks=new Map);const O=new Error().stack.split(`
`).slice(3).join(`
`),T=this._stacks.get(O)||0;if(this._stacks.set(O,T+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=S*.5;let E,C=0;for(const[j,x]of this._stacks)(!E||C<x)&&(E=j,C=x);console.warn(`[${this.name}] potential listener LEAK detected, having ${u} listeners already. MOST frequent listener (${C}):`),console.warn(E)}return()=>{const E=this._stacks.get(O)||0;this._stacks.set(O,E-1)}}}class i{constructor(u){var S;this._disposed=!1,this._options=u,this._leakageMon=B>0?new y(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((S=this._options)===null||S===void 0)&&S._profName?new R(this._options._profName):void 0}get event(){return this._event||(this._event=(u,S,O)=>{var T;this._listeners||(this._listeners=new V.S);const E=this._listeners.isEmpty();E&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const C=this._listeners.push(S?[u,S]:u);E&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,u,S);const j=(T=this._leakageMon)===null||T===void 0?void 0:T.check(this._listeners.size),x=(0,I.OF)(()=>{j&&j(),this._disposed||(C(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return O instanceof I.SL?O.add(x):Array.isArray(O)&&O.push(x),x}),this._event}fire(u){var S,O;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new V.S);for(let T of this._listeners)this._deliveryQueue.push([T,u]);for((S=this._perfMon)===null||S===void 0||S.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[T,E]=this._deliveryQueue.shift();try{typeof T=="function"?T.call(void 0,E):T[0].call(T[1],E)}catch(C){(0,H.dL)(C)}}(O=this._perfMon)===null||O===void 0||O.stop()}}dispose(){var u,S,O,T,E;this._disposed||(this._disposed=!0,(u=this._listeners)===null||u===void 0||u.clear(),(S=this._deliveryQueue)===null||S===void 0||S.clear(),(T=(O=this._options)===null||O===void 0?void 0:O.onLastListenerRemove)===null||T===void 0||T.call(O),(E=this._leakageMon)===null||E===void 0||E.dispose())}}class v extends i{constructor(u){super(u),this._isPaused=0,this._eventQueue=new V.S,this._mergeFn=u==null?void 0:u.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const u=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(u))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(u){this._listeners&&(this._isPaused!==0?this._eventQueue.push(u):super.fire(u))}}class f extends v{constructor(u){var S;super(u),this._delay=(S=u.delay)!==null&&S!==void 0?S:100}fire(u){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(u)}}class h{constructor(){this.buffers=[]}wrapEvent(u){return(S,O,T)=>u(E=>{const C=this.buffers[this.buffers.length-1];C?C.push(()=>S.call(O,E)):S.call(O,E)},void 0,T)}bufferEvents(u){const S=[];this.buffers.push(S);const O=u();return this.buffers.pop(),S.forEach(T=>T()),O}}class n{constructor(){this.listening=!1,this.inputEvent=F.None,this.inputEventListener=I.JT.None,this.emitter=new i({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(u){this.inputEvent=u,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=u(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(xt,Re,_){"use strict";_.d(Re,{I:function(){return H}});function H(I){const V=this;let P=!1,F;return function(){return P||(P=!0,F=I.apply(V,arguments)),F}}},88226:function(xt,Re,_){"use strict";_.d(Re,{$:function(){return H}});var H;(function(I){function V(C){return C&&typeof C=="object"&&typeof C[Symbol.iterator]=="function"}I.is=V;const P=Object.freeze([]);function F(){return P}I.empty=F;function*R(C){yield C}I.single=R;function B(C){return C||P}I.from=B;function y(C){return!C||C[Symbol.iterator]().next().done===!0}I.isEmpty=y;function i(C){return C[Symbol.iterator]().next().value}I.first=i;function v(C,j){for(const x of C)if(j(x))return!0;return!1}I.some=v;function f(C,j){for(const x of C)if(j(x))return x}I.find=f;function*h(C,j){for(const x of C)j(x)&&(yield x)}I.filter=h;function*n(C,j){let x=0;for(const L of C)yield j(L,x++)}I.map=n;function*o(...C){for(const j of C)for(const x of j)yield x}I.concat=o;function*u(C){for(const j of C)for(const x of j)yield x}I.concatNested=u;function S(C,j,x){let L=x;for(const N of C)L=j(L,N);return L}I.reduce=S;function*O(C,j,x=C.length){for(j<0&&(j+=C.length),x<0?x+=C.length:x>C.length&&(x=C.length);j<x;j++)yield C[j]}I.slice=O;function T(C,j=Number.POSITIVE_INFINITY){const x=[];if(j===0)return[x,C];const L=C[Symbol.iterator]();for(let N=0;N<j;N++){const z=L.next();if(z.done)return[x,I.empty()];x.push(z.value)}return[x,{[Symbol.iterator](){return L}}]}I.consume=T;function E(C,j,x=(L,N)=>L===N){const L=C[Symbol.iterator](),N=j[Symbol.iterator]();for(;;){const z=L.next(),te=N.next();if(z.done!==te.done)return!1;if(z.done)return!0;if(!x(z.value,te.value))return!1}}I.equals=E})(H||(H={}))},69323:function(xt,Re,_){"use strict";_.d(Re,{B9:function(){return n},F8:function(){return o},JT:function(){return O},Jz:function(){return E},OF:function(){return u},SL:function(){return S},Wf:function(){return h},XK:function(){return T},dk:function(){return v}});var H=_(17845),I=_(88226);const V=!1;let P=null;function F(C){P=C}if(V){const C="__is_disposable_tracked__";F(new class{trackDisposable(j){const x=new Error("Potentially leaked disposable").stack;setTimeout(()=>{j[C]||console.log(x)},3e3)}setParent(j,x){if(j&&j!==O.None)try{j[C]=!0}catch(L){}}markAsDisposed(j){if(j&&j!==O.None)try{j[C]=!0}catch(x){}}markAsSingleton(j){}})}function R(C){return P==null||P.trackDisposable(C),C}function B(C){P==null||P.markAsDisposed(C)}function y(C,j){P==null||P.setParent(C,j)}function i(C,j){if(P)for(const x of C)P.setParent(x,j)}function v(C){return P==null||P.markAsSingleton(C),C}class f extends Error{constructor(j){super(`Encountered errors while disposing of store. Errors: [${j.join(", ")}]`),this.errors=j}}function h(C){return typeof C.dispose=="function"&&C.dispose.length===0}function n(C){if(I.$.is(C)){let j=[];for(const x of C)if(x)try{x.dispose()}catch(L){j.push(L)}if(j.length===1)throw j[0];if(j.length>1)throw new f(j);return Array.isArray(C)?[]:C}else if(C)return C.dispose(),C}function o(...C){const j=u(()=>n(C));return i(C,j),j}function u(C){const j=R({dispose:(0,H.I)(()=>{B(j),C()})});return j}class S{constructor(){this._toDispose=new Set,this._isDisposed=!1,R(this)}dispose(){this._isDisposed||(B(this),this._isDisposed=!0,this.clear())}clear(){try{n(this._toDispose.values())}finally{this._toDispose.clear()}}add(j){if(!j)return j;if(j===this)throw new Error("Cannot register a disposable on itself!");return y(j,this),this._isDisposed?S.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(j),j}}S.DISABLE_DISPOSED_WARNING=!1;class O{constructor(){this._store=new S,R(this),y(this._store,this)}dispose(){B(this),this._store.dispose()}_register(j){if(j===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(j)}}O.None=Object.freeze({dispose(){}});class T{constructor(){this._isDisposed=!1,R(this)}get value(){return this._isDisposed?void 0:this._value}set value(j){var x;this._isDisposed||j===this._value||((x=this._value)===null||x===void 0||x.dispose(),j&&y(j,this),this._value=j)}clear(){this.value=void 0}dispose(){var j;this._isDisposed=!0,B(this),(j=this._value)===null||j===void 0||j.dispose(),this._value=void 0}clearAndLeak(){const j=this._value;return this._value=void 0,j&&y(j,null),j}}class E{constructor(j){this.object=j}dispose(){}}},34502:function(xt,Re,_){"use strict";_.d(Re,{S:function(){return I}});class H{constructor(P){this.element=P,this.next=H.Undefined,this.prev=H.Undefined}}H.Undefined=new H(void 0);class I{constructor(){this._first=H.Undefined,this._last=H.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===H.Undefined}clear(){let P=this._first;for(;P!==H.Undefined;){const F=P.next;P.prev=H.Undefined,P.next=H.Undefined,P=F}this._first=H.Undefined,this._last=H.Undefined,this._size=0}unshift(P){return this._insert(P,!1)}push(P){return this._insert(P,!0)}_insert(P,F){const R=new H(P);if(this._first===H.Undefined)this._first=R,this._last=R;else if(F){const y=this._last;this._last=R,R.prev=y,y.next=R}else{const y=this._first;this._first=R,R.next=y,y.prev=R}this._size+=1;let B=!1;return()=>{B||(B=!0,this._remove(R))}}shift(){if(this._first!==H.Undefined){const P=this._first.element;return this._remove(this._first),P}}pop(){if(this._last!==H.Undefined){const P=this._last.element;return this._remove(this._last),P}}_remove(P){if(P.prev!==H.Undefined&&P.next!==H.Undefined){const F=P.prev;F.next=P.next,P.next.prev=F}else P.prev===H.Undefined&&P.next===H.Undefined?(this._first=H.Undefined,this._last=H.Undefined):P.next===H.Undefined?(this._last=this._last.prev,this._last.next=H.Undefined):P.prev===H.Undefined&&(this._first=this._first.next,this._first.prev=H.Undefined);this._size-=1}*[Symbol.iterator](){let P=this._first;for(;P!==H.Undefined;)yield P.element,P=P.next}}},23345:function(xt,Re,_){"use strict";_.d(Re,{$L:function(){return L},ED:function(){return E},IJ:function(){return j},OS:function(){return J},WE:function(){return z},dz:function(){return C},gn:function(){return N},li:function(){return u},r:function(){return se},tY:function(){return x},xS:function(){return te}});var H=_(97671),I;const V="en";let P=!1,F=!1,R=!1,B=!1,y=!1,i=!1,v=!1,f,h=null,n=null,o;const u=typeof self=="object"?self:typeof _.g=="object"?_.g:{};let S;typeof u.vscode!="undefined"&&typeof u.vscode.process!="undefined"?S=u.vscode.process:typeof H!="undefined"&&(S=H);const O=typeof((I=S==null?void 0:S.versions)===null||I===void 0?void 0:I.electron)=="string"&&S.type==="renderer";if(typeof navigator=="object"&&!O)o=navigator.userAgent,P=o.indexOf("Windows")>=0,F=o.indexOf("Macintosh")>=0,v=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,R=o.indexOf("Linux")>=0,i=!0,f=navigator.language,h=f;else if(typeof S=="object"){P=S.platform==="win32",F=S.platform==="darwin",R=S.platform==="linux",B=R&&!!S.env.SNAP&&!!S.env.SNAP_REVISION,f=V,h=V;const Y=S.env.VSCODE_NLS_CONFIG;if(Y)try{const ie=JSON.parse(Y),U=ie.availableLanguages["*"];f=ie.locale,h=U||V,n=ie._translationsConfigFile}catch(ie){}y=!0}else console.error("Unable to resolve platform.");let T=0;F?T=1:P?T=3:R&&(T=2);const E=P,C=F,j=R,x=y,L=i,N=v,z=o,te=function(){if(u.setImmediate)return u.setImmediate.bind(u);if(typeof u.postMessage=="function"&&!u.importScripts){let U=[];u.addEventListener("message",K=>{if(K.data&&K.data.vscodeSetImmediateId)for(let k=0,D=U.length;k<D;k++){const re=U[k];if(re.id===K.data.vscodeSetImmediateId){U.splice(k,1),re.callback();return}}});let Z=0;return K=>{const k=++Z;U.push({id:k,callback:K}),u.postMessage({vscodeSetImmediateId:k},"*")}}if(typeof(S==null?void 0:S.nextTick)=="function")return S.nextTick.bind(S);const ie=Promise.resolve();return U=>ie.then(U)}(),J=F||v?2:P?1:3;let ge=!0,_e=!1;function se(){if(!_e){_e=!0;const Y=new Uint8Array(2);Y[0]=1,Y[1]=2,ge=new Uint16Array(Y.buffer)[0]===513}return ge}},95830:function(xt,Re,_){"use strict";_.d(Re,{G:function(){return V}});var H=_(23345);const I=H.li.performance&&typeof H.li.performance.now=="function";class V{constructor(F){this._highResolution=I&&F,this._startTime=this._now(),this._stopTime=-1}static create(F=!0){return new V(F)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?H.li.performance.now():Date.now()}}},82983:function(xt,Re,_){"use strict";_.d(Re,{$i:function(){return Oe},C8:function(){return Ke},GF:function(){return f},HO:function(){return Z},IO:function(){return h},K7:function(){return et},Kw:function(){return Yt},LC:function(){return u},Mh:function(){return te},P1:function(){return J},PJ:function(){return qt},Qe:function(){return $e},R1:function(){return v},RP:function(){return re},S6:function(){return Ot},TT:function(){return E},Ut:function(){return k},V8:function(){return S},WU:function(){return V},YK:function(){return _e},YU:function(){return P},ZG:function(){return ge},ZH:function(){return Y},ab:function(){return Ge},c1:function(){return tt},df:function(){return L},ec:function(){return F},fi:function(){return Ut},fy:function(){return R},j3:function(){return B},j_:function(){return j},m5:function(){return H},mK:function(){return x},mr:function(){return n},oH:function(){return Ze},oL:function(){return y},ok:function(){return z},ow:function(){return O},qq:function(){return N},qu:function(){return T},rL:function(){return se},uS:function(){return It},un:function(){return i},uq:function(){return o},vH:function(){return U},xe:function(){return ke},zY:function(){return C}});function H(ue){return!ue||typeof ue!="string"?!0:ue.trim().length===0}const I=/{(\d+)}/g;function V(ue,...ye){return ye.length===0?ue:ue.replace(I,function(Te,Ae){const Me=parseInt(Ae,10);return isNaN(Me)||Me<0||Me>=ye.length?Te:ye[Me]})}function P(ue){return ue.replace(/[<>&]/g,function(ye){switch(ye){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return ye}})}function F(ue){return ue.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function R(ue,ye=" "){const Te=B(ue,ye);return y(Te,ye)}function B(ue,ye){if(!ue||!ye)return ue;const Te=ye.length;if(Te===0||ue.length===0)return ue;let Ae=0;for(;ue.indexOf(ye,Ae)===Ae;)Ae=Ae+Te;return ue.substring(Ae)}function y(ue,ye){if(!ue||!ye)return ue;const Te=ye.length,Ae=ue.length;if(Te===0||Ae===0)return ue;let Me=Ae,ze=-1;for(;ze=ue.lastIndexOf(ye,Me-1),!(ze===-1||ze+Te!==Me);){if(ze===0)return"";Me=ze}return ue.substring(0,Me)}function i(ue){return ue.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function v(ue){return ue.replace(/\*/g,"")}function f(ue,ye,Te={}){if(!ue)throw new Error("Cannot create regex from empty string");ye||(ue=F(ue)),Te.wholeWord&&(/\B/.test(ue.charAt(0))||(ue="\\b"+ue),/\B/.test(ue.charAt(ue.length-1))||(ue=ue+"\\b"));let Ae="";return Te.global&&(Ae+="g"),Te.matchCase||(Ae+="i"),Te.multiline&&(Ae+="m"),Te.unicode&&(Ae+="u"),new RegExp(ue,Ae)}function h(ue){return ue.source==="^"||ue.source==="^$"||ue.source==="$"||ue.source==="^\\s*$"?!1:!!(ue.exec("")&&ue.lastIndex===0)}function n(ue){return(ue.global?"g":"")+(ue.ignoreCase?"i":"")+(ue.multiline?"m":"")+(ue.unicode?"u":"")}function o(ue){return ue.split(/\r\n|\r|\n/)}function u(ue){for(let ye=0,Te=ue.length;ye<Te;ye++){const Ae=ue.charCodeAt(ye);if(Ae!==32&&Ae!==9)return ye}return-1}function S(ue,ye=0,Te=ue.length){for(let Ae=ye;Ae<Te;Ae++){const Me=ue.charCodeAt(Ae);if(Me!==32&&Me!==9)return ue.substring(ye,Ae)}return ue.substring(ye,Te)}function O(ue,ye=ue.length-1){for(let Te=ye;Te>=0;Te--){const Ae=ue.charCodeAt(Te);if(Ae!==32&&Ae!==9)return Te}return-1}function T(ue,ye){return ue<ye?-1:ue>ye?1:0}function E(ue,ye,Te=0,Ae=ue.length,Me=0,ze=ye.length){for(;Te<Ae&&Me<ze;Te++,Me++){let Xe=ue.charCodeAt(Te),He=ye.charCodeAt(Me);if(Xe<He)return-1;if(Xe>He)return 1}const qe=Ae-Te,rt=ze-Me;return qe<rt?-1:qe>rt?1:0}function C(ue,ye){return j(ue,ye,0,ue.length,0,ye.length)}function j(ue,ye,Te=0,Ae=ue.length,Me=0,ze=ye.length){for(;Te<Ae&&Me<ze;Te++,Me++){let Xe=ue.charCodeAt(Te),He=ye.charCodeAt(Me);if(Xe===He)continue;if(Xe>=128||He>=128)return E(ue.toLowerCase(),ye.toLowerCase(),Te,Ae,Me,ze);x(Xe)&&(Xe-=32),x(He)&&(He-=32);const lt=Xe-He;if(lt!==0)return lt}const qe=Ae-Te,rt=ze-Me;return qe<rt?-1:qe>rt?1:0}function x(ue){return ue>=97&&ue<=122}function L(ue){return ue>=65&&ue<=90}function N(ue,ye){return ue.length===ye.length&&j(ue,ye)===0}function z(ue,ye){const Te=ye.length;return ye.length>ue.length?!1:j(ue,ye,0,Te)===0}function te(ue,ye){let Te,Ae=Math.min(ue.length,ye.length);for(Te=0;Te<Ae;Te++)if(ue.charCodeAt(Te)!==ye.charCodeAt(Te))return Te;return Ae}function J(ue,ye){let Te,Ae=Math.min(ue.length,ye.length);const Me=ue.length-1,ze=ye.length-1;for(Te=0;Te<Ae;Te++)if(ue.charCodeAt(Me-Te)!==ye.charCodeAt(ze-Te))return Te;return Ae}function ge(ue){return 55296<=ue&&ue<=56319}function _e(ue){return 56320<=ue&&ue<=57343}function se(ue,ye){return(ue-55296<<10)+(ye-56320)+65536}function Y(ue,ye,Te){const Ae=ue.charCodeAt(Te);if(ge(Ae)&&Te+1<ye){const Me=ue.charCodeAt(Te+1);if(_e(Me))return se(Ae,Me)}return Ae}function ie(ue,ye){const Te=ue.charCodeAt(ye-1);if(_e(Te)&&ye>1){const Ae=ue.charCodeAt(ye-2);if(ge(Ae))return se(Ae,Te)}return Te}function U(ue,ye){const Te=Ft.getInstance(),Ae=ye,Me=ue.length,ze=Y(ue,Me,ye);ye+=ze>=65536?2:1;let qe=Te.getGraphemeBreakType(ze);for(;ye<Me;){const rt=Y(ue,Me,ye),Xe=Te.getGraphemeBreakType(rt);if(Ut(qe,Xe))break;ye+=rt>=65536?2:1,qe=Xe}return ye-Ae}function Z(ue,ye){const Te=Ft.getInstance(),Ae=ye,Me=ie(ue,ye);ye-=Me>=65536?2:1;let ze=Te.getGraphemeBreakType(Me);for(;ye>0;){const qe=ie(ue,ye),rt=Te.getGraphemeBreakType(qe);if(Ut(rt,ze))break;ye-=qe>=65536?2:1,ze=rt}return Ae-ye}const K=/(?:[\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 k(ue){return K.test(ue)}const D=/(?:[\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 re(ue){return D.test(ue)}const pe=/^[\t\n\r\x20-\x7E]*$/;function Oe(ue){return pe.test(ue)}const $e=/[\u2028\u2029]/;function Ge(ue){return $e.test(ue)}function ke(ue){for(let ye=0,Te=ue.length;ye<Te;ye++)if(et(ue.charCodeAt(ye)))return!0;return!1}function et(ue){return ue=+ue,ue>=11904&&ue<=55215||ue>=63744&&ue<=64255||ue>=65281&&ue<=65374}function Ke(ue){return ue>=127462&&ue<=127487||ue===8986||ue===8987||ue===9200||ue===9203||ue>=9728&&ue<=10175||ue===11088||ue===11093||ue>=127744&&ue<=128591||ue>=128640&&ue<=128764||ue>=128992&&ue<=129003||ue>=129280&&ue<=129535||ue>=129648&&ue<=129750}const tt="\uFEFF";function It(ue){return!!(ue&&ue.length>0&&ue.charCodeAt(0)===65279)}function Yt(ue,ye=!1){return ue?(ye&&(ue=ue.replace(/\\./g,"")),ue.toLowerCase()!==ue):!1}function qt(ue){return ue=ue%(2*26),ue<26?String.fromCharCode(97+ue):String.fromCharCode(65+ue-26)}function Ot(ue){return Ft.getInstance().getGraphemeBreakType(ue)}function Ut(ue,ye){return ue===0?ye!==5&&ye!==7:ue===2&&ye===3?!1:ue===4||ue===2||ue===3||ye===4||ye===2||ye===3?!0:!(ue===8&&(ye===8||ye===9||ye===11||ye===12)||(ue===11||ue===9)&&(ye===9||ye===10)||(ue===12||ue===10)&&ye===10||ye===5||ye===13||ye===7||ue===1||ue===13&&ye===14||ue===6&&ye===6)}class Ft{constructor(){this._data=Ie()}static getInstance(){return Ft._INSTANCE||(Ft._INSTANCE=new Ft),Ft._INSTANCE}getGraphemeBreakType(ye){if(ye<32)return ye===10?3:ye===13?2:4;if(ye<127)return 0;const Te=this._data,Ae=Te.length/3;let Me=1;for(;Me<=Ae;)if(ye<Te[3*Me])Me=2*Me;else if(ye>Te[3*Me+1])Me=2*Me+1;else return Te[3*Me+2];return 0}}Ft._INSTANCE=null;function Ie(){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 Ze(ue,ye){if(ue===0)return 0;const Te=Fe(ue,ye);if(Te!==void 0)return Te;const Ae=ie(ye,ue);return ue-=it(Ae),ue}function Fe(ue,ye){let Te=ie(ye,ue);for(ue-=it(Te);nt(Te)||Te===65039||Te===8419;){if(ue===0)return;Te=ie(ye,ue),ue-=it(Te)}if(Ke(Te)){if(ue>=0){const Ae=ie(ye,ue);Ae===8205&&(ue-=it(Ae))}return ue}}function it(ue){return ue>=65536?2:1}function nt(ue){return 127995<=ue&&ue<=127999}},72999:function(xt,Re,_){"use strict";_.d(Re,{$E:function(){return u},$K:function(){return B},D8:function(){return h},HD:function(){return I},IU:function(){return S},Jp:function(){return y},Kn:function(){return V},cW:function(){return v},f6:function(){return O},hj:function(){return P},jn:function(){return F},kJ:function(){return H},mf:function(){return f},o8:function(){return R},p_:function(){return i},vE:function(){return T}});function H(E){return Array.isArray(E)}function I(E){return typeof E=="string"}function V(E){return typeof E=="object"&&E!==null&&!Array.isArray(E)&&!(E instanceof RegExp)&&!(E instanceof Date)}function P(E){return typeof E=="number"&&!isNaN(E)}function F(E){return E===!0||E===!1}function R(E){return typeof E=="undefined"}function B(E){return!y(E)}function y(E){return R(E)||E===null}function i(E,C){if(!E)throw new Error(C?`Unexpected type, expected '${C}'`:"Unexpected type")}function v(E){if(y(E))throw new Error("Assertion Failed: argument is undefined or null");return E}function f(E){return typeof E=="function"}function h(E,C){const j=Math.min(E.length,C.length);for(let x=0;x<j;x++)n(E[x],C[x])}function n(E,C){if(I(C)){if(typeof E!==C)throw new Error(`argument does not match constraint: typeof ${C}`)}else if(f(C)){try{if(E instanceof C)return}catch(j){}if(!y(E)&&E.constructor===C||C.length===1&&C.call(void 0,E)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function o(E){let C=[],j=Object.getPrototypeOf(E);for(;Object.prototype!==j;)C=C.concat(Object.getOwnPropertyNames(j)),j=Object.getPrototypeOf(j);return C}function u(E){const C=[];for(const j of o(E))typeof E[j]=="function"&&C.push(j);return C}function S(E,C){const j=L=>function(){const N=Array.prototype.slice.call(arguments,0);return C(L,N)};let x={};for(const L of E)x[L]=j(L);return x}function O(E){return E===null?void 0:E}function T(E,C="Unreachable"){throw new Error(C)}},13268:function(xt,Re,_){"use strict";_.d(Re,{N:function(){return I}});function H(V,P){let F;return P.length===0?F=V:F=V.replace(/\{(\d+)\}/g,function(R,B){const y=B[0];return typeof P[y]!="undefined"?P[y]:R}),F}function I(V,P,...F){return H(P,F)}},96236:function(xt,Re,_){"use strict";_.d(Re,{BH:function(){return S},NZ:function(){return O},U8:function(){return T},co:function(){return u},eH:function(){return o},vr:function(){return n}});var H=_(75918),I=_(52615),V=_(4348),P=_(88226),F=_(69323),R=_(34502),B=_(35884),y=_(90689),i=_(16925),v=_(49055),f=function(E,C,j,x){var L=arguments.length,N=L<3?C:x===null?x=Object.getOwnPropertyDescriptor(C,j):x,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(E,C,j,x);else for(var te=E.length-1;te>=0;te--)(z=E[te])&&(N=(L<3?z(N):L>3?z(C,j,N):z(C,j))||N);return L>3&&N&&Object.defineProperty(C,j,N),N},h=function(E,C){return function(j,x){C(j,x,E)}};function n(E){return E.command!==void 0}class o{constructor(C){this.id=o._idPool++,this._debugName=C}}o._idPool=0,o.CommandPalette=new o("CommandPalette"),o.EditorContext=new o("EditorContext"),o.SimpleEditorContext=new o("SimpleEditorContext"),o.EditorContextCopy=new o("EditorContextCopy"),o.EditorContextPeek=new o("EditorContextPeek"),o.MenubarEditMenu=new o("MenubarEditMenu"),o.MenubarCopy=new o("MenubarCopy"),o.MenubarGoMenu=new o("MenubarGoMenu"),o.MenubarSelectionMenu=new o("MenubarSelectionMenu"),o.InlineCompletionsActions=new o("InlineCompletionsActions");const u=(0,i.yh)("menuService"),S=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new V.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:E=>E===o.CommandPalette}}addCommand(E){return this.addCommands(P.$.single(E))}addCommands(E){for(const C of E)this._commands.set(C.id,C);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,F.OF)(()=>{let C=!1;for(const j of E)C=this._commands.delete(j.id)||C;C&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(E){return this._commands.get(E)}getCommands(){const E=new Map;return this._commands.forEach((C,j)=>E.set(j,C)),E}appendMenuItem(E,C){return this.appendMenuItems(P.$.single({id:E,item:C}))}appendMenuItems(E){const C=new Set,j=new R.S;for(const{id:x,item:L}of E){let N=this._menuItems.get(x);N||(N=new R.S,this._menuItems.set(x,N)),j.push(N.push(L)),C.add(x)}return this._onDidChangeMenu.fire(C),(0,F.OF)(()=>{if(j.size>0){for(let x of j)x();this._onDidChangeMenu.fire(C),j.clear()}})}getMenuItems(E){let C;return this._menuItems.has(E)?C=[...this._menuItems.get(E)]:C=[],E===o.CommandPalette&&this._appendImplicitItems(C),C}_appendImplicitItems(E){const C=new Set;for(const j of E)n(j)&&(C.add(j.command.id),j.alt&&C.add(j.alt.id));this._commands.forEach((j,x)=>{C.has(x)||E.push({command:j})})}};class O extends H.wY{constructor(C,j,x,L){super(`submenuitem.${C.submenu.id}`,typeof C.title=="string"?C.title:C.title.value,[],"submenu"),this.item=C,this._menuService=j,this._contextKeyService=x,this._options=L}get actions(){const C=[],j=this._menuService.createMenu(this.item.submenu,this._contextKeyService),x=j.getActions(this._options);j.dispose();for(const[,L]of x)L.length>0&&(C.push(...L),C.push(new H.Z0));return C.length&&C.pop(),C}}let T=class Xo{constructor(C,j,x,L,N){var z,te;if(this._commandService=N,this.id=C.id,this.label=x!=null&&x.renderShortTitle&&C.shortTitle?typeof C.shortTitle=="string"?C.shortTitle:C.shortTitle.value:typeof C.title=="string"?C.title:C.title.value,this.tooltip=(te=typeof C.tooltip=="string"?C.tooltip:(z=C.tooltip)===null||z===void 0?void 0:z.value)!==null&&te!==void 0?te:"",this.enabled=!C.precondition||L.contextMatchesRules(C.precondition),this.checked=void 0,C.toggled){const J=C.toggled.condition?C.toggled:{condition:C.toggled};this.checked=L.contextMatchesRules(J.condition),this.checked&&J.tooltip&&(this.tooltip=typeof J.tooltip=="string"?J.tooltip:J.tooltip.value),J.title&&(this.label=typeof J.title=="string"?J.title:J.title.value)}this.item=C,this.alt=j?new Xo(j,void 0,x,L,N):void 0,this._options=x,v.kS.isThemeIcon(C.icon)&&(this.class=I.dT.asClassName(C.icon))}dispose(){}run(...C){var j,x;let L=[];return!((j=this._options)===null||j===void 0)&&j.arg&&(L=[...L,this._options.arg]),!((x=this._options)===null||x===void 0)&&x.shouldForwardArgs&&(L=[...L,...C]),this._commandService.executeCommand(this.id,...L)}};T=f([h(3,y.i6),h(4,B.H)],T)},35884:function(xt,Re,_){"use strict";_.d(Re,{H:function(){return B},P:function(){return y}});var H=_(4348),I=_(88226),V=_(69323),P=_(34502),F=_(72999),R=_(16925);const B=(0,R.yh)("commandService"),y=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new H.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(i,v){if(!i)throw new Error("invalid command");if(typeof i=="string"){if(!v)throw new Error("invalid command");return this.registerCommand({id:i,handler:v})}if(i.description){const u=[];for(let O of i.description.args)u.push(O.constraint);const S=i.handler;i.handler=function(O,...T){return(0,F.D8)(T,u),S(O,...T)}}const{id:f}=i;let h=this._commands.get(f);h||(h=new P.S,this._commands.set(f,h));let n=h.unshift(i),o=(0,V.OF)(()=>{n();const u=this._commands.get(f);u!=null&&u.isEmpty()&&this._commands.delete(f)});return this._onDidRegisterCommand.fire(f),o}registerCommandAlias(i,v){return y.registerCommand(i,(f,...h)=>f.get(B).executeCommand(v,...h))}getCommand(i){const v=this._commands.get(i);if(!(!v||v.isEmpty()))return I.$.first(v)}getCommands(){const i=new Map;for(const v of this._commands.keys()){const f=this.getCommand(v);f&&i.set(v,f)}return i}};y.registerCommand("noop",()=>{})},90689:function(xt,Re,_){"use strict";_.d(Re,{Ao:function(){return B},Eq:function(){return se},Fb:function(){return y},K8:function(){return U},i6:function(){return _e},uy:function(){return ge}});var H=_(23345),I=_(82983),V=_(16925);let P=H.WE||"";const F=new Map;F.set("false",!1),F.set("true",!0),F.set("isMac",H.dz),F.set("isLinux",H.IJ),F.set("isWindows",H.ED),F.set("isWeb",H.$L),F.set("isMacNative",H.dz&&!H.$L),F.set("isEdge",P.indexOf("Edg/")>=0),F.set("isFirefox",P.indexOf("Firefox")>=0),F.set("isChrome",P.indexOf("Chrome")>=0),F.set("isSafari",P.indexOf("Safari")>=0);const R=Object.prototype.hasOwnProperty;class B{static has(k){return h.create(k)}static equals(k,D){return n.create(k,D)}static regex(k,D){return L.create(k,D)}static not(k){return O.create(k)}static and(...k){return te.create(k,null)}static or(...k){return J.create(k,null,!0)}static deserialize(k,D=!1){if(k)return this._deserializeOrExpression(k,D)}static _deserializeOrExpression(k,D){let re=k.split("||");return J.create(re.map(pe=>this._deserializeAndExpression(pe,D)),null,!0)}static _deserializeAndExpression(k,D){let re=k.split("&&");return te.create(re.map(pe=>this._deserializeOne(pe,D)),null)}static _deserializeOne(k,D){if(k=k.trim(),k.indexOf("!=")>=0){let re=k.split("!=");return S.create(re[0].trim(),this._deserializeValue(re[1],D))}if(k.indexOf("==")>=0){let re=k.split("==");return n.create(re[0].trim(),this._deserializeValue(re[1],D))}if(k.indexOf("=~")>=0){let re=k.split("=~");return L.create(re[0].trim(),this._deserializeRegexValue(re[1],D))}if(k.indexOf(" in ")>=0){let re=k.split(" in ");return o.create(re[0].trim(),re[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(k)){const re=k.split(">=");return C.create(re[0].trim(),re[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(k)){const re=k.split(">");return E.create(re[0].trim(),re[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(k)){const re=k.split("<=");return x.create(re[0].trim(),re[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(k)){const re=k.split("<");return j.create(re[0].trim(),re[1].trim())}return/^\!\s*/.test(k)?O.create(k.substr(1).trim()):h.create(k)}static _deserializeValue(k,D){if(k=k.trim(),k==="true")return!0;if(k==="false")return!1;let re=/^'([^']*)'$/.exec(k);return re?re[1].trim():k}static _deserializeRegexValue(k,D){if((0,I.m5)(k)){if(D)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let re=k.indexOf("/"),pe=k.lastIndexOf("/");if(re===pe||re<0){if(D)throw new Error(`bad regexp-value '${k}', missing /-enclosure`);return console.warn(`bad regexp-value '${k}', missing /-enclosure`),null}let Oe=k.slice(re+1,pe),$e=k[pe+1]==="i"?"i":"";try{return new RegExp(Oe,$e)}catch(Ge){if(D)throw new Error(`bad regexp-value '${k}', parse error: ${Ge}`);return console.warn(`bad regexp-value '${k}', parse error: ${Ge}`),null}}}function y(K,k){const D=K?K.substituteConstants():void 0,re=k?k.substituteConstants():void 0;return!D&&!re?!0:!D||!re?!1:D.equals(re)}function i(K,k){return K.cmp(k)}class v{constructor(){this.type=0}cmp(k){return this.type-k.type}equals(k){return k.type===this.type}substituteConstants(){return this}evaluate(k){return!1}serialize(){return"false"}keys(){return[]}negate(){return f.INSTANCE}}v.INSTANCE=new v;class f{constructor(){this.type=1}cmp(k){return this.type-k.type}equals(k){return k.type===this.type}substituteConstants(){return this}evaluate(k){return!0}serialize(){return"true"}keys(){return[]}negate(){return v.INSTANCE}}f.INSTANCE=new f;class h{constructor(k,D){this.key=k,this.negated=D,this.type=2}static create(k,D=null){const re=F.get(k);return typeof re=="boolean"?re?f.INSTANCE:v.INSTANCE:new h(k,D)}cmp(k){return k.type!==this.type?this.type-k.type:Y(this.key,k.key)}equals(k){return k.type===this.type?this.key===k.key:!1}substituteConstants(){const k=F.get(this.key);return typeof k=="boolean"?k?f.INSTANCE:v.INSTANCE:this}evaluate(k){return!!k.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this)),this.negated}}class n{constructor(k,D,re){this.key=k,this.value=D,this.negated=re,this.type=4}static create(k,D,re=null){if(typeof D=="boolean")return D?h.create(k,re):O.create(k,re);const pe=F.get(k);return typeof pe=="boolean"?D===(pe?"true":"false")?f.INSTANCE:v.INSTANCE:new n(k,D,re)}cmp(k){return k.type!==this.type?this.type-k.type:ie(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){const k=F.get(this.key);if(typeof k=="boolean"){const D=k?"true":"false";return this.value===D?f.INSTANCE:v.INSTANCE}return this}evaluate(k){return k.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this.key,this.value,this)),this.negated}}class o{constructor(k,D){this.key=k,this.valueKey=D,this.type=10,this.negated=null}static create(k,D){return new o(k,D)}cmp(k){return k.type!==this.type?this.type-k.type:ie(this.key,this.valueKey,k.key,k.valueKey)}equals(k){return k.type===this.type?this.key===k.key&&this.valueKey===k.valueKey:!1}substituteConstants(){return this}evaluate(k){const D=k.getValue(this.valueKey),re=k.getValue(this.key);return Array.isArray(D)?D.indexOf(re)>=0:typeof re=="string"&&typeof D=="object"&&D!==null?R.call(D,re):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=u.create(this)),this.negated}}class u{constructor(k){this._actual=k,this.type=11}static create(k){return new u(k)}cmp(k){return k.type!==this.type?this.type-k.type:this._actual.cmp(k._actual)}equals(k){return k.type===this.type?this._actual.equals(k._actual):!1}substituteConstants(){return this}evaluate(k){return!this._actual.evaluate(k)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class S{constructor(k,D,re){this.key=k,this.value=D,this.negated=re,this.type=5}static create(k,D,re=null){if(typeof D=="boolean")return D?O.create(k,re):h.create(k,re);const pe=F.get(k);return typeof pe=="boolean"?D===(pe?"true":"false")?v.INSTANCE:f.INSTANCE:new S(k,D,re)}cmp(k){return k.type!==this.type?this.type-k.type:ie(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){const k=F.get(this.key);if(typeof k=="boolean"){const D=k?"true":"false";return this.value===D?v.INSTANCE:f.INSTANCE}return this}evaluate(k){return k.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=n.create(this.key,this.value,this)),this.negated}}class O{constructor(k,D){this.key=k,this.negated=D,this.type=3}static create(k,D=null){const re=F.get(k);return typeof re=="boolean"?re?v.INSTANCE:f.INSTANCE:new O(k,D)}cmp(k){return k.type!==this.type?this.type-k.type:Y(this.key,k.key)}equals(k){return k.type===this.type?this.key===k.key:!1}substituteConstants(){const k=F.get(this.key);return typeof k=="boolean"?k?v.INSTANCE:f.INSTANCE:this}evaluate(k){return!k.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this)),this.negated}}function T(K,k){if(typeof K=="string"){const D=parseFloat(K);isNaN(D)||(K=D)}return typeof K=="string"||typeof K=="number"?k(K):v.INSTANCE}class E{constructor(k,D,re){this.key=k,this.value=D,this.negated=re,this.type=12}static create(k,D,re=null){return T(D,pe=>new E(k,pe,re))}cmp(k){return k.type!==this.type?this.type-k.type:ie(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this.key,this.value,this)),this.negated}}class C{constructor(k,D,re){this.key=k,this.value=D,this.negated=re,this.type=13}static create(k,D,re=null){return T(D,pe=>new C(k,pe,re))}cmp(k){return k.type!==this.type?this.type-k.type:ie(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=j.create(this.key,this.value,this)),this.negated}}class j{constructor(k,D,re){this.key=k,this.value=D,this.negated=re,this.type=14}static create(k,D,re=null){return T(D,pe=>new j(k,pe,re))}cmp(k){return k.type!==this.type?this.type-k.type:ie(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=C.create(this.key,this.value,this)),this.negated}}class x{constructor(k,D,re){this.key=k,this.value=D,this.negated=re,this.type=15}static create(k,D,re=null){return T(D,pe=>new x(k,pe,re))}cmp(k){return k.type!==this.type?this.type-k.type:ie(this.key,this.value,k.key,k.value)}equals(k){return k.type===this.type?this.key===k.key&&this.value===k.value:!1}substituteConstants(){return this}evaluate(k){return typeof this.value=="string"?!1:parseFloat(k.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class L{constructor(k,D){this.key=k,this.regexp=D,this.type=7,this.negated=null}static create(k,D){return new L(k,D)}cmp(k){if(k.type!==this.type)return this.type-k.type;if(this.key<k.key)return-1;if(this.key>k.key)return 1;const D=this.regexp?this.regexp.source:"",re=k.regexp?k.regexp.source:"";return D<re?-1:D>re?1:0}equals(k){if(k.type===this.type){const D=this.regexp?this.regexp.source:"",re=k.regexp?k.regexp.source:"";return this.key===k.key&&D===re}return!1}substituteConstants(){return this}evaluate(k){let D=k.getValue(this.key);return this.regexp?this.regexp.test(D):!1}serialize(){const k=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${k}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this)),this.negated}}class N{constructor(k){this._actual=k,this.type=8}static create(k){return new N(k)}cmp(k){return k.type!==this.type?this.type-k.type:this._actual.cmp(k._actual)}equals(k){return k.type===this.type?this._actual.equals(k._actual):!1}substituteConstants(){return this}evaluate(k){return!this._actual.evaluate(k)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function z(K){let k=null;for(let D=0,re=K.length;D<re;D++){const pe=K[D].substituteConstants();if(K[D]!==pe&&k===null){k=[];for(let Oe=0;Oe<D;Oe++)k[Oe]=K[Oe]}k!==null&&(k[D]=pe)}return k===null?K:k}class te{constructor(k,D){this.expr=k,this.negated=D,this.type=6}static create(k,D){return te._normalizeArr(k,D)}cmp(k){if(k.type!==this.type)return this.type-k.type;if(this.expr.length<k.expr.length)return-1;if(this.expr.length>k.expr.length)return 1;for(let D=0,re=this.expr.length;D<re;D++){const pe=i(this.expr[D],k.expr[D]);if(pe!==0)return pe}return 0}equals(k){if(k.type===this.type){if(this.expr.length!==k.expr.length)return!1;for(let D=0,re=this.expr.length;D<re;D++)if(!this.expr[D].equals(k.expr[D]))return!1;return!0}return!1}substituteConstants(){const k=z(this.expr);return k===this.expr?this:te.create(k,this.negated)}evaluate(k){for(let D=0,re=this.expr.length;D<re;D++)if(!this.expr[D].evaluate(k))return!1;return!0}static _normalizeArr(k,D){const re=[];let pe=!1;for(const Oe of k)if(Oe){if(Oe.type===1){pe=!0;continue}if(Oe.type===0)return v.INSTANCE;if(Oe.type===6){re.push(...Oe.expr);continue}re.push(Oe)}if(re.length===0&&pe)return f.INSTANCE;if(re.length!==0){if(re.length===1)return re[0];re.sort(i);for(let Oe=1;Oe<re.length;Oe++)re[Oe-1].equals(re[Oe])&&(re.splice(Oe,1),Oe--);if(re.length===1)return re[0];for(;re.length>1;){const Oe=re[re.length-1];if(Oe.type!==9)break;re.pop();const $e=re.pop(),Ge=re.length===0,ke=J.create(Oe.expr.map(et=>te.create([et,$e],null)),null,Ge);ke&&(re.push(ke),re.sort(i))}return re.length===1?re[0]:new te(re,D)}}serialize(){return this.expr.map(k=>k.serialize()).join(" && ")}keys(){const k=[];for(let D of this.expr)k.push(...D.keys());return k}negate(){if(!this.negated){const k=[];for(let D of this.expr)k.push(D.negate());this.negated=J.create(k,this,!0)}return this.negated}}class J{constructor(k,D){this.expr=k,this.negated=D,this.type=9}static create(k,D,re){return J._normalizeArr(k,D,re)}cmp(k){if(k.type!==this.type)return this.type-k.type;if(this.expr.length<k.expr.length)return-1;if(this.expr.length>k.expr.length)return 1;for(let D=0,re=this.expr.length;D<re;D++){const pe=i(this.expr[D],k.expr[D]);if(pe!==0)return pe}return 0}equals(k){if(k.type===this.type){if(this.expr.length!==k.expr.length)return!1;for(let D=0,re=this.expr.length;D<re;D++)if(!this.expr[D].equals(k.expr[D]))return!1;return!0}return!1}substituteConstants(){const k=z(this.expr);return k===this.expr?this:J.create(k,this.negated,!1)}evaluate(k){for(let D=0,re=this.expr.length;D<re;D++)if(this.expr[D].evaluate(k))return!0;return!1}static _normalizeArr(k,D,re){let pe=[],Oe=!1;if(k){for(let $e=0,Ge=k.length;$e<Ge;$e++){const ke=k[$e];if(ke){if(ke.type===0){Oe=!0;continue}if(ke.type===1)return f.INSTANCE;if(ke.type===9){pe=pe.concat(ke.expr);continue}pe.push(ke)}}if(pe.length===0&&Oe)return v.INSTANCE;pe.sort(i)}if(pe.length!==0){if(pe.length===1)return pe[0];for(let $e=1;$e<pe.length;$e++)pe[$e-1].equals(pe[$e])&&(pe.splice($e,1),$e--);if(pe.length===1)return pe[0];if(re){for(let $e=0;$e<pe.length;$e++)for(let Ge=$e+1;Ge<pe.length;Ge++)U(pe[$e],pe[Ge])&&(pe.splice(Ge,1),Ge--);if(pe.length===1)return pe[0]}return new J(pe,D)}}serialize(){return this.expr.map(k=>k.serialize()).join(" || ")}keys(){const k=[];for(let D of this.expr)k.push(...D.keys());return k}negate(){if(!this.negated){let k=[];for(let D of this.expr)k.push(D.negate());for(;k.length>1;){const D=k.shift(),re=k.shift(),pe=[];for(const $e of Z(D))for(const Ge of Z(re))pe.push(te.create([$e,Ge],null));const Oe=k.length===0;k.unshift(J.create(pe,null,Oe))}this.negated=k[0]}return this.negated}}class ge extends h{constructor(k,D,re){super(k,null),this._defaultValue=D,typeof re=="object"?ge._info.push(Object.assign(Object.assign({},re),{key:k})):re!==!0&&ge._info.push({key:k,description:re,type:D!=null?typeof D:void 0})}static all(){return ge._info.values()}bindTo(k){return k.createKey(this.key,this._defaultValue)}getValue(k){return k.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(k){return n.create(this.key,k)}}ge._info=[];const _e=(0,V.yh)("contextKeyService"),se="setContext";function Y(K,k){return K<k?-1:K>k?1:0}function ie(K,k,D,re){return K<D?-1:K>D?1:k<re?-1:k>re?1:0}function U(K,k){if(k.type===6&&K.type!==9&&K.type!==6){for(const pe of k.expr)if(K.equals(pe))return!0}const D=K.negate(),re=Z(D).concat(Z(k));re.sort(i);for(let pe=0;pe<re.length;pe++){const $e=re[pe].negate();for(let Ge=pe+1;Ge<re.length;Ge++){const ke=re[Ge];if($e.equals(ke))return!0}}return!1}function Z(K){return K.type===9?K.expr:[K]}},16925:function(xt,Re,_){"use strict";_.d(Re,{I8:function(){return H},TG:function(){return I},jt:function(){return F},yh:function(){return P}});var H;(function(R){R.serviceIds=new Map,R.DI_TARGET="$di$target",R.DI_DEPENDENCIES="$di$dependencies";function B(y){return y[R.DI_DEPENDENCIES]||[]}R.getServiceDependencies=B})(H||(H={}));const I=P("instantiationService");function V(R,B,y,i){B[H.DI_TARGET]===B?B[H.DI_DEPENDENCIES].push({id:R,index:y,optional:i}):(B[H.DI_DEPENDENCIES]=[{id:R,index:y,optional:i}],B[H.DI_TARGET]=B)}function P(R){if(H.serviceIds.has(R))return H.serviceIds.get(R);const B=function(y,i,v){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");V(B,y,v,!1)};return B.toString=()=>R,H.serviceIds.set(R,B),B}function F(R){return function(B,y,i){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");V(R,B,i,!0)}}},44650:function(xt,Re,_){"use strict";_.d(Re,{B:function(){return P}});var H=_(76068),I=_(72999);class V{constructor(){this.data=new Map}add(R,B){H.ok(I.HD(R)),H.ok(I.Kn(B)),H.ok(!this.data.has(R),"There is already an extension with this id"),this.data.set(R,B)}as(R){return this.data.get(R)||null}}const P=new V},66213:function(xt,Re,_){"use strict";_.d(Re,{e:function(){return H}});var H;(function(I){I.DARK="dark",I.LIGHT="light",I.HIGH_CONTRAST="hc"})(H||(H={}))},49055:function(xt,Re,_){"use strict";_.d(Re,{EN:function(){return i},IP:function(){return h},Ic:function(){return u},XE:function(){return B},bB:function(){return S},kS:function(){return v},m6:function(){return f}});var H=_(52615),I=_(4348),V=_(69323),P=_(16925),F=_(44650),R=_(66213);const B=(0,P.yh)("themeService");var y;(function(O){function T(E){return E&&typeof E=="object"&&typeof E.id=="string"}O.isThemeColor=T})(y||(y={}));function i(O){return{id:O}}var v;(function(O){function T(N){return N&&typeof N=="object"&&typeof N.id=="string"&&(typeof N.color=="undefined"||y.isThemeColor(N.color))}O.isThemeIcon=T;const E=new RegExp(`^\\$\\((${H.dT.iconNameExpression}(?:${H.dT.iconModifierExpression})?)\\)$`);function C(N){const z=E.exec(N);if(!z)return;let[,te]=z;return{id:te}}O.fromString=C;function j(N,z){let te=N.id;const J=te.lastIndexOf("~");return J!==-1&&(te=te.substring(0,J)),z&&(te=`${te}~${z}`),{id:te}}O.modify=j;function x(N,z){var te,J;return N.id===z.id&&((te=N.color)===null||te===void 0?void 0:te.id)===((J=z.color)===null||J===void 0?void 0:J.id)}O.isEqual=x;function L(N,z){return{id:N.id,color:z?i(z):void 0}}O.asThemeIcon=L,O.asClassNameArray=H.dT.asClassNameArray,O.asClassName=H.dT.asClassName,O.asCSSSelector=H.dT.asCSSSelector})(v||(v={}));function f(O){switch(O){case R.e.DARK:return"vs-dark";case R.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const h={ThemingContribution:"base.contributions.theming"};class n{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new I.Q5}onColorThemeChange(T){return this.themingParticipants.push(T),this.onThemingParticipantAddedEmitter.fire(T),(0,V.OF)(()=>{const E=this.themingParticipants.indexOf(T);this.themingParticipants.splice(E,1)})}getThemingParticipants(){return this.themingParticipants}}let o=new n;F.B.add(h.ThemingContribution,o);function u(O){return o.onColorThemeChange(O)}class S extends V.JT{constructor(T){super(),this.themeService=T,this.theme=T.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(E=>this.onThemeChange(E)))}onThemeChange(T){this.theme=T,this.updateStyles()}updateStyles(){}}},93681:function(xt,Re,_){"use strict";_.r(Re),_.d(Re,{BaseInput:function(){return v},default:function(){return E}});var H=_(96663),I=_(44127),V=_(90493),P=_(20135),F=_(92310),R=_.n(F),B=_(59301),y=_(5643),i=function(j){var x,L,N=j.inputElement,z=j.prefixCls,te=j.prefix,J=j.suffix,ge=j.addonBefore,_e=j.addonAfter,se=j.className,Y=j.style,ie=j.disabled,U=j.readOnly,Z=j.focused,K=j.triggerFocus,k=j.allowClear,D=j.value,re=j.handleReset,pe=j.hidden,Oe=j.classes,$e=j.classNames,Ge=j.dataAttrs,ke=j.styles,et=j.components,Ke=(et==null?void 0:et.affixWrapper)||"span",tt=(et==null?void 0:et.groupWrapper)||"span",It=(et==null?void 0:et.wrapper)||"span",Yt=(et==null?void 0:et.groupAddon)||"span",qt=(0,B.useRef)(null),Ot=function(Me){var ze;(ze=qt.current)!==null&&ze!==void 0&&ze.contains(Me.target)&&(K==null||K())},Ut=function(){var Me;if(!k)return null;var ze=!ie&&!U&&D,qe="".concat(z,"-clear-icon"),rt=(0,P.Z)(k)==="object"&&k!==null&&k!==void 0&&k.clearIcon?k.clearIcon:"\u2716";return B.createElement("span",{onClick:re,onMouseDown:function(He){return He.preventDefault()},className:R()(qe,(Me={},(0,V.Z)(Me,"".concat(qe,"-hidden"),!ze),(0,V.Z)(Me,"".concat(qe,"-has-suffix"),!!J),Me)),role:"button",tabIndex:-1},rt)},Ft=(0,B.cloneElement)(N,{value:D,hidden:pe,className:R()((x=N.props)===null||x===void 0?void 0:x.className,!(0,y.X3)(j)&&!(0,y.He)(j)&&se)||null,style:(0,I.Z)((0,I.Z)({},(L=N.props)===null||L===void 0?void 0:L.style),!(0,y.X3)(j)&&!(0,y.He)(j)?Y:{})});if((0,y.X3)(j)){var Ie,Ze="".concat(z,"-affix-wrapper"),Fe=R()(Ze,(Ie={},(0,V.Z)(Ie,"".concat(Ze,"-disabled"),ie),(0,V.Z)(Ie,"".concat(Ze,"-focused"),Z),(0,V.Z)(Ie,"".concat(Ze,"-readonly"),U),(0,V.Z)(Ie,"".concat(Ze,"-input-with-clear-btn"),J&&k&&D),Ie),!(0,y.He)(j)&&se,Oe==null?void 0:Oe.affixWrapper,$e==null?void 0:$e.affixWrapper),it=(J||k)&&B.createElement("span",{className:R()("".concat(z,"-suffix"),$e==null?void 0:$e.suffix),style:ke==null?void 0:ke.suffix},Ut(),J);Ft=B.createElement(Ke,(0,H.Z)({className:Fe,style:(0,I.Z)((0,I.Z)({},(0,y.He)(j)?void 0:Y),ke==null?void 0:ke.affixWrapper),hidden:!(0,y.He)(j)&&pe,onClick:Ot},Ge==null?void 0:Ge.affixWrapper,{ref:qt}),te&&B.createElement("span",{className:R()("".concat(z,"-prefix"),$e==null?void 0:$e.prefix),style:ke==null?void 0:ke.prefix},te),(0,B.cloneElement)(N,{value:D,hidden:null}),it)}if((0,y.He)(j)){var nt="".concat(z,"-group"),ue="".concat(nt,"-addon"),ye=R()("".concat(z,"-wrapper"),nt,Oe==null?void 0:Oe.wrapper),Te=R()("".concat(z,"-group-wrapper"),se,Oe==null?void 0:Oe.group);return B.createElement(tt,{className:Te,style:Y,hidden:pe},B.createElement(It,{className:ye},ge&&B.createElement(Yt,{className:ue},ge),(0,B.cloneElement)(Ft,{hidden:null}),_e&&B.createElement(Yt,{className:ue},_e)))}return Ft},v=i,f=_(19127),h=_(72071),n=_(6620),o=_(18929),u=_(2738),S=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],O=(0,B.forwardRef)(function(C,j){var x=C.autoComplete,L=C.onChange,N=C.onFocus,z=C.onBlur,te=C.onPressEnter,J=C.onKeyDown,ge=C.prefixCls,_e=ge===void 0?"rc-input":ge,se=C.disabled,Y=C.htmlSize,ie=C.className,U=C.maxLength,Z=C.suffix,K=C.showCount,k=C.type,D=k===void 0?"text":k,re=C.classes,pe=C.classNames,Oe=C.styles,$e=(0,n.Z)(C,S),Ge=(0,o.Z)(C.defaultValue,{value:C.value}),ke=(0,h.Z)(Ge,2),et=ke[0],Ke=ke[1],tt=(0,B.useState)(!1),It=(0,h.Z)(tt,2),Yt=It[0],qt=It[1],Ot=(0,B.useRef)(null),Ut=function(Te){Ot.current&&(0,y.nH)(Ot.current,Te)};(0,B.useImperativeHandle)(j,function(){return{focus:Ut,blur:function(){var Te;(Te=Ot.current)===null||Te===void 0||Te.blur()},setSelectionRange:function(Te,Ae,Me){var ze;(ze=Ot.current)===null||ze===void 0||ze.setSelectionRange(Te,Ae,Me)},select:function(){var Te;(Te=Ot.current)===null||Te===void 0||Te.select()},input:Ot.current}}),(0,B.useEffect)(function(){qt(function(ye){return ye&&se?!1:ye})},[se]);var Ft=function(Te){C.value===void 0&&Ke(Te.target.value),Ot.current&&(0,y.rJ)(Ot.current,Te,L)},Ie=function(Te){te&&Te.key==="Enter"&&te(Te),J==null||J(Te)},Ze=function(Te){qt(!0),N==null||N(Te)},Fe=function(Te){qt(!1),z==null||z(Te)},it=function(Te){Ke(""),Ut(),Ot.current&&(0,y.rJ)(Ot.current,Te,L)},nt=function(){var Te=(0,u.Z)(C,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return B.createElement("input",(0,H.Z)({autoComplete:x},Te,{onChange:Ft,onFocus:Ze,onBlur:Fe,onKeyDown:Ie,className:R()(_e,(0,V.Z)({},"".concat(_e,"-disabled"),se),pe==null?void 0:pe.input),style:Oe==null?void 0:Oe.input,ref:Ot,size:Y,type:D}))},ue=function(){var Te=Number(U)>0;if(Z||K){var Ae=(0,y.D7)(et),Me=(0,f.Z)(Ae).length,ze=(0,P.Z)(K)==="object"?K.formatter({value:Ae,count:Me,maxLength:U}):"".concat(Me).concat(Te?" / ".concat(U):"");return B.createElement(B.Fragment,null,!!K&&B.createElement("span",{className:R()("".concat(_e,"-show-count-suffix"),(0,V.Z)({},"".concat(_e,"-show-count-has-suffix"),!!Z),pe==null?void 0:pe.count),style:(0,I.Z)({},Oe==null?void 0:Oe.count)},ze),Z)}return null};return B.createElement(v,(0,H.Z)({},$e,{prefixCls:_e,className:ie,inputElement:nt(),handleReset:it,value:(0,y.D7)(et),focused:Yt,triggerFocus:Ut,suffix:ue(),disabled:se,classes:re,classNames:pe,styles:Oe}))}),T=O,E=T},5643:function(xt,Re,_){"use strict";_.d(Re,{D7:function(){return F},He:function(){return H},X3:function(){return I},nH:function(){return P},rJ:function(){return V}});function H(R){return!!(R.addonBefore||R.addonAfter)}function I(R){return!!(R.prefix||R.suffix||R.allowClear)}function V(R,B,y,i){if(y){var v=B;if(B.type==="click"){var f=R.cloneNode(!0);v=Object.create(B,{target:{value:f},currentTarget:{value:f}}),f.value="",y(v);return}if(i!==void 0){v=Object.create(B,{target:{value:R},currentTarget:{value:R}}),R.value=i,y(v);return}y(v)}}function P(R,B){if(R){R.focus(B);var y=B||{},i=y.cursor;if(i){var v=R.value.length;switch(i){case"start":R.setSelectionRange(0,0);break;case"end":R.setSelectionRange(v,v);break;default:R.setSelectionRange(0,v)}}}}function F(R){return typeof R=="undefined"||R===null?"":String(R)}},29301:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return se}});var H=_(96663),I=_(59301),V=_(11592),P=_(48736),F=_(44127),R=_(20135),B=_(76846),y=_(8654),i=I.createContext(null);function v(Y){var ie=Y.children,U=Y.onBatchResize,Z=I.useRef(0),K=I.useRef([]),k=I.useContext(i),D=I.useCallback(function(re,pe,Oe){Z.current+=1;var $e=Z.current;K.current.push({size:re,element:pe,data:Oe}),Promise.resolve().then(function(){$e===Z.current&&(U==null||U(K.current),K.current=[])}),k==null||k(re,pe,Oe)},[U,k]);return I.createElement(i.Provider,{value:D},ie)}var f=_(76374),h=new Map;function n(Y){Y.forEach(function(ie){var U,Z=ie.target;(U=h.get(Z))===null||U===void 0||U.forEach(function(K){return K(Z)})})}var o=new f.Z(n),u=null,S=null;function O(Y,ie){h.has(Y)||(h.set(Y,new Set),o.observe(Y)),h.get(Y).add(ie)}function T(Y,ie){h.has(Y)&&(h.get(Y).delete(ie),h.get(Y).size||(o.unobserve(Y),h.delete(Y)))}var E=_(52884),C=_(95727),j=_(65711),x=_(85745),L=function(Y){(0,j.Z)(U,Y);var ie=(0,x.Z)(U);function U(){return(0,E.Z)(this,U),ie.apply(this,arguments)}return(0,C.Z)(U,[{key:"render",value:function(){return this.props.children}}]),U}(I.Component);function N(Y,ie){var U=Y.children,Z=Y.disabled,K=I.useRef(null),k=I.useRef(null),D=I.useContext(i),re=typeof U=="function",pe=re?U(K):U,Oe=I.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),$e=!re&&I.isValidElement(pe)&&(0,y.Yr)(pe),Ge=$e?(0,y.C4)(pe):null,ke=(0,y.x1)(Ge,K),et=function(){var Yt;return(0,B.ZP)(K.current)||(K.current&&(0,R.Z)(K.current)==="object"?(0,B.ZP)((Yt=K.current)===null||Yt===void 0?void 0:Yt.nativeElement):null)||(0,B.ZP)(k.current)};I.useImperativeHandle(ie,function(){return et()});var Ke=I.useRef(Y);Ke.current=Y;var tt=I.useCallback(function(It){var Yt=Ke.current,qt=Yt.onResize,Ot=Yt.data,Ut=It.getBoundingClientRect(),Ft=Ut.width,Ie=Ut.height,Ze=It.offsetWidth,Fe=It.offsetHeight,it=Math.floor(Ft),nt=Math.floor(Ie);if(Oe.current.width!==it||Oe.current.height!==nt||Oe.current.offsetWidth!==Ze||Oe.current.offsetHeight!==Fe){var ue={width:it,height:nt,offsetWidth:Ze,offsetHeight:Fe};Oe.current=ue;var ye=Ze===Math.round(Ft)?Ft:Ze,Te=Fe===Math.round(Ie)?Ie:Fe,Ae=(0,F.Z)((0,F.Z)({},ue),{},{offsetWidth:ye,offsetHeight:Te});D==null||D(Ae,It,Ot),qt&&Promise.resolve().then(function(){qt(Ae,It)})}},[]);return I.useEffect(function(){var It=et();return It&&!Z&&O(It,tt),function(){return T(It,tt)}},[K.current,Z]),I.createElement(L,{ref:k},$e?I.cloneElement(pe,{ref:ke}):pe)}var z=I.forwardRef(N),te=z,J="rc-observer-key";function ge(Y,ie){var U=Y.children,Z=typeof U=="function"?[U]:(0,V.Z)(U);return Z.map(function(K,k){var D=(K==null?void 0:K.key)||"".concat(J,"-").concat(k);return I.createElement(te,(0,H.Z)({},Y,{key:D,ref:k===0?ie:void 0}),K)})}var _e=I.forwardRef(ge);_e.Collection=v;var se=_e},9296:function(xt,Re,_){"use strict";_.r(Re),_.d(Re,{ResizableTextArea:function(){return ge},default:function(){return Z}});var H=_(96663),I=_(44127),V=_(90493),P=_(20135),F=_(72071),R=_(6620),B=_(19127),y=_(92310),i=_.n(y),v=_(93681),f=_(5643),h=_(18929),n=_(59301),o=_(29301),u=_(34280),S=_(16089),O=`
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;
`,T=["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"],E={},C;function j(K){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,D=K.getAttribute("id")||K.getAttribute("data-reactid")||K.getAttribute("name");if(k&&E[D])return E[D];var re=window.getComputedStyle(K),pe=re.getPropertyValue("box-sizing")||re.getPropertyValue("-moz-box-sizing")||re.getPropertyValue("-webkit-box-sizing"),Oe=parseFloat(re.getPropertyValue("padding-bottom"))+parseFloat(re.getPropertyValue("padding-top")),$e=parseFloat(re.getPropertyValue("border-bottom-width"))+parseFloat(re.getPropertyValue("border-top-width")),Ge=T.map(function(et){return"".concat(et,":").concat(re.getPropertyValue(et))}).join(";"),ke={sizingStyle:Ge,paddingSize:Oe,borderSize:$e,boxSizing:pe};return k&&D&&(E[D]=ke),ke}function x(K){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;C||(C=document.createElement("textarea"),C.setAttribute("tab-index","-1"),C.setAttribute("aria-hidden","true"),document.body.appendChild(C)),K.getAttribute("wrap")?C.setAttribute("wrap",K.getAttribute("wrap")):C.removeAttribute("wrap");var pe=j(K,k),Oe=pe.paddingSize,$e=pe.borderSize,Ge=pe.boxSizing,ke=pe.sizingStyle;C.setAttribute("style","".concat(ke,";").concat(O)),C.value=K.value||K.placeholder||"";var et=void 0,Ke=void 0,tt,It=C.scrollHeight;if(Ge==="border-box"?It+=$e:Ge==="content-box"&&(It-=Oe),D!==null||re!==null){C.value=" ";var Yt=C.scrollHeight-Oe;D!==null&&(et=Yt*D,Ge==="border-box"&&(et=et+Oe+$e),It=Math.max(et,It)),re!==null&&(Ke=Yt*re,Ge==="border-box"&&(Ke=Ke+Oe+$e),tt=It>Ke?"":"hidden",It=Math.min(Ke,It))}var qt={height:It,overflowY:tt,resize:"none"};return et&&(qt.minHeight=et),Ke&&(qt.maxHeight=Ke),qt}var L=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],N=0,z=1,te=2,J=n.forwardRef(function(K,k){var D=K,re=D.prefixCls,pe=D.onPressEnter,Oe=D.defaultValue,$e=D.value,Ge=D.autoSize,ke=D.onResize,et=D.className,Ke=D.style,tt=D.disabled,It=D.onChange,Yt=D.onInternalAutoSize,qt=(0,R.Z)(D,L),Ot=(0,h.Z)(Oe,{value:$e,postState:function(G){return G!=null?G:""}}),Ut=(0,F.Z)(Ot,2),Ft=Ut[0],Ie=Ut[1],Ze=function(G){Ie(G.target.value),It==null||It(G)},Fe=n.useRef();n.useImperativeHandle(k,function(){return{textArea:Fe.current}});var it=n.useMemo(function(){return Ge&&(0,P.Z)(Ge)==="object"?[Ge.minRows,Ge.maxRows]:[]},[Ge]),nt=(0,F.Z)(it,2),ue=nt[0],ye=nt[1],Te=!!Ge,Ae=function(){try{if(document.activeElement===Fe.current){var G=Fe.current,Qe=G.selectionStart,ae=G.selectionEnd,be=G.scrollTop;Fe.current.setSelectionRange(Qe,ae),Fe.current.scrollTop=be}}catch(Kt){}},Me=n.useState(te),ze=(0,F.Z)(Me,2),qe=ze[0],rt=ze[1],Xe=n.useState(),He=(0,F.Z)(Xe,2),lt=He[0],gt=He[1],ft=function(){rt(N)};(0,u.Z)(function(){Te&&ft()},[$e,ue,ye,Te]),(0,u.Z)(function(){if(qe===N)rt(z);else if(qe===z){var $=x(Fe.current,!1,ue,ye);rt(te),gt($)}else Ae()},[qe]);var _t=n.useRef(),wt=function(){S.Z.cancel(_t.current)},mt=function(G){qe===te&&(ke==null||ke(G),Ge&&(wt(),_t.current=(0,S.Z)(function(){ft()})))};n.useEffect(function(){return wt},[]);var kt=Te?lt:null,bt=(0,I.Z)((0,I.Z)({},Ke),kt);return(qe===N||qe===z)&&(bt.overflowY="hidden",bt.overflowX="hidden"),n.createElement(o.Z,{onResize:mt,disabled:!(Ge||ke)},n.createElement("textarea",(0,H.Z)({},qt,{ref:Fe,style:bt,className:i()(re,et,(0,V.Z)({},"".concat(re,"-disabled"),tt)),disabled:tt,value:Ft,onChange:Ze})))}),ge=J,_e=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function se(K,k){return(0,B.Z)(K||"").slice(0,k).join("")}function Y(K,k,D,re){var pe=D;return K?pe=se(D,re):(0,B.Z)(k||"").length<D.length&&(0,B.Z)(D||"").length>re&&(pe=k),pe}var ie=n.forwardRef(function(K,k){var D,re=K.defaultValue,pe=K.value,Oe=K.onFocus,$e=K.onBlur,Ge=K.onChange,ke=K.allowClear,et=K.maxLength,Ke=K.onCompositionStart,tt=K.onCompositionEnd,It=K.suffix,Yt=K.prefixCls,qt=Yt===void 0?"rc-textarea":Yt,Ot=K.classes,Ut=K.showCount,Ft=K.className,Ie=K.style,Ze=K.disabled,Fe=K.hidden,it=K.classNames,nt=K.styles,ue=K.onResize,ye=(0,R.Z)(K,_e),Te=(0,h.Z)(re,{value:pe,defaultValue:re}),Ae=(0,F.Z)(Te,2),Me=Ae[0],ze=Ae[1],qe=(0,n.useRef)(null),rt=n.useState(!1),Xe=(0,F.Z)(rt,2),He=Xe[0],lt=Xe[1],gt=n.useState(!1),ft=(0,F.Z)(gt,2),_t=ft[0],wt=ft[1],mt=n.useRef(),kt=n.useRef(0),bt=n.useState(null),$=(0,F.Z)(bt,2),G=$[0],Qe=$[1],ae=function(){var St;(St=qe.current)===null||St===void 0||St.textArea.focus()};(0,n.useImperativeHandle)(k,function(){return{resizableTextArea:qe.current,focus:ae,blur:function(){var St;(St=qe.current)===null||St===void 0||St.textArea.blur()}}}),(0,n.useEffect)(function(){lt(function(sr){return!Ze&&sr})},[Ze]);var be=Number(et)>0,Kt=function(St){wt(!0),mt.current=Me,kt.current=St.currentTarget.selectionStart,Ke==null||Ke(St)},Ee=function(St){wt(!1);var Et=St.currentTarget.value;if(be){var ur,Rr=kt.current>=et+1||kt.current===((ur=mt.current)===null||ur===void 0?void 0:ur.length);Et=Y(Rr,mt.current,Et,et)}Et!==Me&&(ze(Et),(0,f.rJ)(St.currentTarget,St,Ge,Et)),tt==null||tt(St)},Pe=function(St){var Et=St.target.value;if(!_t&&be){var ur=St.target.selectionStart>=et+1||St.target.selectionStart===Et.length||!St.target.selectionStart;Et=Y(ur,Me,Et,et)}ze(Et),(0,f.rJ)(St.currentTarget,St,Ge,Et)},Ne=function(St){var Et=ye.onPressEnter,ur=ye.onKeyDown;St.key==="Enter"&&Et&&Et(St),ur==null||ur(St)},ce=function(St){lt(!0),Oe==null||Oe(St)},de=function(St){lt(!1),$e==null||$e(St)},we=function(St){var Et;ze(""),ae(),(0,f.rJ)((Et=qe.current)===null||Et===void 0?void 0:Et.textArea,St,Ge)},Le=(0,f.D7)(Me);!_t&&be&&pe==null&&(Le=se(Le,et));var ne=It,dt;if(Ut){var Se=(0,B.Z)(Le).length;(0,P.Z)(Ut)==="object"?dt=Ut.formatter({value:Le,count:Se,maxLength:et}):dt="".concat(Se).concat(be?" / ".concat(et):""),ne=n.createElement(n.Fragment,null,ne,n.createElement("span",{className:i()("".concat(qt,"-data-count"),it==null?void 0:it.count),style:nt==null?void 0:nt.count},dt))}var Dt=function(St){var Et;ue==null||ue(St),(Et=qe.current)!==null&&Et!==void 0&&Et.textArea.style.height&&Qe(!0)},Pt=!ye.autoSize&&!Ut&&!ke,Ht=n.createElement(v.BaseInput,{value:Le,allowClear:ke,handleReset:we,suffix:ne,prefixCls:qt,classes:{affixWrapper:i()(Ot==null?void 0:Ot.affixWrapper,(D={},(0,V.Z)(D,"".concat(qt,"-show-count"),Ut),(0,V.Z)(D,"".concat(qt,"-textarea-allow-clear"),ke),D))},disabled:Ze,focused:He,className:Ft,style:(0,I.Z)((0,I.Z)({},Ie),G&&!Pt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof dt=="string"?dt:void 0}},hidden:Fe,inputElement:n.createElement(ge,(0,H.Z)({},ye,{onKeyDown:Ne,onChange:Pe,onFocus:ce,onBlur:de,onCompositionStart:Kt,onCompositionEnd:Ee,className:it==null?void 0:it.textarea,style:(0,I.Z)((0,I.Z)({},nt==null?void 0:nt.textarea),{},{resize:Ie==null?void 0:Ie.resize}),disabled:Ze,prefixCls:qt,onResize:Dt,ref:qe}))});return Ht}),U=ie,Z=U},55477:function(xt,Re,_){"use strict";_.d(Re,{G:function(){return n},Z:function(){return O}});var H=_(96663),I=_(44127),V=_(6620),P=_(35593),F=_(59301),R={shiftX:64,adjustY:1},B={adjustX:1,shiftY:!0},y=[0,0],i={left:{points:["cr","cl"],overflow:B,offset:[-4,0],targetOffset:y},right:{points:["cl","cr"],overflow:B,offset:[4,0],targetOffset:y},top:{points:["bc","tc"],overflow:R,offset:[0,-4],targetOffset:y},bottom:{points:["tc","bc"],overflow:R,offset:[0,4],targetOffset:y},topLeft:{points:["bl","tl"],overflow:R,offset:[0,-4],targetOffset:y},leftTop:{points:["tr","tl"],overflow:B,offset:[-4,0],targetOffset:y},topRight:{points:["br","tr"],overflow:R,offset:[0,-4],targetOffset:y},rightTop:{points:["tl","tr"],overflow:B,offset:[4,0],targetOffset:y},bottomRight:{points:["tr","br"],overflow:R,offset:[0,4],targetOffset:y},rightBottom:{points:["bl","br"],overflow:B,offset:[4,0],targetOffset:y},bottomLeft:{points:["tl","bl"],overflow:R,offset:[0,4],targetOffset:y},leftBottom:{points:["br","bl"],overflow:B,offset:[-4,0],targetOffset:y}},v=null,f=_(92310),h=_.n(f);function n(T){var E=T.children,C=T.prefixCls,j=T.id,x=T.overlayInnerStyle,L=T.className,N=T.style;return F.createElement("div",{className:h()("".concat(C,"-content"),L),style:N},F.createElement("div",{className:"".concat(C,"-inner"),id:j,role:"tooltip",style:x},typeof E=="function"?E():E))}var o=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],u=function(E,C){var j=E.overlayClassName,x=E.trigger,L=x===void 0?["hover"]:x,N=E.mouseEnterDelay,z=N===void 0?0:N,te=E.mouseLeaveDelay,J=te===void 0?.1:te,ge=E.overlayStyle,_e=E.prefixCls,se=_e===void 0?"rc-tooltip":_e,Y=E.children,ie=E.onVisibleChange,U=E.afterVisibleChange,Z=E.transitionName,K=E.animation,k=E.motion,D=E.placement,re=D===void 0?"right":D,pe=E.align,Oe=pe===void 0?{}:pe,$e=E.destroyTooltipOnHide,Ge=$e===void 0?!1:$e,ke=E.defaultVisible,et=E.getTooltipContainer,Ke=E.overlayInnerStyle,tt=E.arrowContent,It=E.overlay,Yt=E.id,qt=E.showArrow,Ot=qt===void 0?!0:qt,Ut=(0,V.Z)(E,o),Ft=(0,F.useRef)(null);(0,F.useImperativeHandle)(C,function(){return Ft.current});var Ie=(0,I.Z)({},Ut);"visible"in E&&(Ie.popupVisible=E.visible);var Ze=function(){return F.createElement(n,{key:"content",prefixCls:se,id:Yt,overlayInnerStyle:Ke},It)};return F.createElement(P.Z,(0,H.Z)({popupClassName:j,prefixCls:se,popup:Ze,action:L,builtinPlacements:i,popupPlacement:re,ref:Ft,popupAlign:Oe,getPopupContainer:et,onPopupVisibleChange:ie,afterPopupVisibleChange:U,popupTransitionName:Z,popupAnimation:K,popupMotion:k,defaultPopupVisible:ke,autoDestroy:Ge,mouseLeaveDelay:J,popupStyle:ge,mouseEnterDelay:z,arrow:Ot},Ie),Y)},S=(0,F.forwardRef)(u),O=S},49658:function(xt,Re){"use strict";Re.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(xt,Re,_){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.CopyToClipboard=void 0;var H=V(_(59301)),I=V(_(25769));function V(E){return E&&E.__esModule?E:{default:E}}function P(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(j){return typeof j}:P=function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},P(E)}function F(E,C){var j=Object.keys(E);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(E);C&&(x=x.filter(function(L){return Object.getOwnPropertyDescriptor(E,L).enumerable})),j.push.apply(j,x)}return j}function R(E){for(var C=1;C<arguments.length;C++){var j=arguments[C]!=null?arguments[C]:{};C%2?F(j,!0).forEach(function(x){O(E,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(j)):F(j).forEach(function(x){Object.defineProperty(E,x,Object.getOwnPropertyDescriptor(j,x))})}return E}function B(E,C){if(E==null)return{};var j=y(E,C),x,L;if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(E);for(L=0;L<N.length;L++)x=N[L],!(C.indexOf(x)>=0)&&Object.prototype.propertyIsEnumerable.call(E,x)&&(j[x]=E[x])}return j}function y(E,C){if(E==null)return{};var j={},x=Object.keys(E),L,N;for(N=0;N<x.length;N++)L=x[N],!(C.indexOf(L)>=0)&&(j[L]=E[L]);return j}function i(E,C){if(!(E instanceof C))throw new TypeError("Cannot call a class as a function")}function v(E,C){for(var j=0;j<C.length;j++){var x=C[j];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(E,x.key,x)}}function f(E,C,j){return C&&v(E.prototype,C),j&&v(E,j),E}function h(E,C){return C&&(P(C)==="object"||typeof C=="function")?C:o(E)}function n(E){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(j){return j.__proto__||Object.getPrototypeOf(j)},n(E)}function o(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function u(E,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(C&&C.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),C&&S(E,C)}function S(E,C){return S=Object.setPrototypeOf||function(x,L){return x.__proto__=L,x},S(E,C)}function O(E,C,j){return C in E?Object.defineProperty(E,C,{value:j,enumerable:!0,configurable:!0,writable:!0}):E[C]=j,E}var T=function(E){u(C,E);function C(){var j,x;i(this,C);for(var L=arguments.length,N=new Array(L),z=0;z<L;z++)N[z]=arguments[z];return x=h(this,(j=n(C)).call.apply(j,[this].concat(N))),O(o(x),"onClick",function(te){var J=x.props,ge=J.text,_e=J.onCopy,se=J.children,Y=J.options,ie=H.default.Children.only(se),U=(0,I.default)(ge,Y);_e&&_e(ge,U),ie&&ie.props&&typeof ie.props.onClick=="function"&&ie.props.onClick(te)}),x}return f(C,[{key:"render",value:function(){var x=this.props,L=x.text,N=x.onCopy,z=x.options,te=x.children,J=B(x,["text","onCopy","options","children"]),ge=H.default.Children.only(te);return H.default.cloneElement(ge,R({},J,{onClick:this.onClick}))}}]),C}(H.default.PureComponent);Re.CopyToClipboard=T,O(T,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(xt,Re,_){"use strict";var H=_(83145),I=H.CopyToClipboard;I.CopyToClipboard=I,xt.exports=I},76374:function(xt,Re,_){"use strict";var H=function(){if(typeof Map!="undefined")return Map;function se(Y,ie){var U=-1;return Y.some(function(Z,K){return Z[0]===ie?(U=K,!0):!1}),U}return function(){function Y(){this.__entries__=[]}return Object.defineProperty(Y.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),Y.prototype.get=function(ie){var U=se(this.__entries__,ie),Z=this.__entries__[U];return Z&&Z[1]},Y.prototype.set=function(ie,U){var Z=se(this.__entries__,ie);~Z?this.__entries__[Z][1]=U:this.__entries__.push([ie,U])},Y.prototype.delete=function(ie){var U=this.__entries__,Z=se(U,ie);~Z&&U.splice(Z,1)},Y.prototype.has=function(ie){return!!~se(this.__entries__,ie)},Y.prototype.clear=function(){this.__entries__.splice(0)},Y.prototype.forEach=function(ie,U){U===void 0&&(U=null);for(var Z=0,K=this.__entries__;Z<K.length;Z++){var k=K[Z];ie.call(U,k[1],k[0])}},Y}()}(),I=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,V=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")()}(),P=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(V):function(se){return setTimeout(function(){return se(Date.now())},1e3/60)}}(),F=2;function R(se,Y){var ie=!1,U=!1,Z=0;function K(){ie&&(ie=!1,se()),U&&D()}function k(){P(K)}function D(){var re=Date.now();if(ie){if(re-Z<F)return;U=!0}else ie=!0,U=!1,setTimeout(k,Y);Z=re}return D}var B=20,y=["top","right","bottom","left","width","height","size","weight"],i=typeof MutationObserver!="undefined",v=function(){function se(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=R(this.refresh.bind(this),B)}return se.prototype.addObserver=function(Y){~this.observers_.indexOf(Y)||this.observers_.push(Y),this.connected_||this.connect_()},se.prototype.removeObserver=function(Y){var ie=this.observers_,U=ie.indexOf(Y);~U&&ie.splice(U,1),!ie.length&&this.connected_&&this.disconnect_()},se.prototype.refresh=function(){var Y=this.updateObservers_();Y&&this.refresh()},se.prototype.updateObservers_=function(){var Y=this.observers_.filter(function(ie){return ie.gatherActive(),ie.hasActive()});return Y.forEach(function(ie){return ie.broadcastActive()}),Y.length>0},se.prototype.connect_=function(){!I||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),i?(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)},se.prototype.disconnect_=function(){!I||!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)},se.prototype.onTransitionEnd_=function(Y){var ie=Y.propertyName,U=ie===void 0?"":ie,Z=y.some(function(K){return!!~U.indexOf(K)});Z&&this.refresh()},se.getInstance=function(){return this.instance_||(this.instance_=new se),this.instance_},se.instance_=null,se}(),f=function(se,Y){for(var ie=0,U=Object.keys(Y);ie<U.length;ie++){var Z=U[ie];Object.defineProperty(se,Z,{value:Y[Z],enumerable:!1,writable:!1,configurable:!0})}return se},h=function(se){var Y=se&&se.ownerDocument&&se.ownerDocument.defaultView;return Y||V},n=L(0,0,0,0);function o(se){return parseFloat(se)||0}function u(se){for(var Y=[],ie=1;ie<arguments.length;ie++)Y[ie-1]=arguments[ie];return Y.reduce(function(U,Z){var K=se["border-"+Z+"-width"];return U+o(K)},0)}function S(se){for(var Y=["top","right","bottom","left"],ie={},U=0,Z=Y;U<Z.length;U++){var K=Z[U],k=se["padding-"+K];ie[K]=o(k)}return ie}function O(se){var Y=se.getBBox();return L(0,0,Y.width,Y.height)}function T(se){var Y=se.clientWidth,ie=se.clientHeight;if(!Y&&!ie)return n;var U=h(se).getComputedStyle(se),Z=S(U),K=Z.left+Z.right,k=Z.top+Z.bottom,D=o(U.width),re=o(U.height);if(U.boxSizing==="border-box"&&(Math.round(D+K)!==Y&&(D-=u(U,"left","right")+K),Math.round(re+k)!==ie&&(re-=u(U,"top","bottom")+k)),!C(se)){var pe=Math.round(D+K)-Y,Oe=Math.round(re+k)-ie;Math.abs(pe)!==1&&(D-=pe),Math.abs(Oe)!==1&&(re-=Oe)}return L(Z.left,Z.top,D,re)}var E=function(){return typeof SVGGraphicsElement!="undefined"?function(se){return se instanceof h(se).SVGGraphicsElement}:function(se){return se instanceof h(se).SVGElement&&typeof se.getBBox=="function"}}();function C(se){return se===h(se).document.documentElement}function j(se){return I?E(se)?O(se):T(se):n}function x(se){var Y=se.x,ie=se.y,U=se.width,Z=se.height,K=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,k=Object.create(K.prototype);return f(k,{x:Y,y:ie,width:U,height:Z,top:ie,right:Y+U,bottom:Z+ie,left:Y}),k}function L(se,Y,ie,U){return{x:se,y:Y,width:ie,height:U}}var N=function(){function se(Y){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=L(0,0,0,0),this.target=Y}return se.prototype.isActive=function(){var Y=j(this.target);return this.contentRect_=Y,Y.width!==this.broadcastWidth||Y.height!==this.broadcastHeight},se.prototype.broadcastRect=function(){var Y=this.contentRect_;return this.broadcastWidth=Y.width,this.broadcastHeight=Y.height,Y},se}(),z=function(){function se(Y,ie){var U=x(ie);f(this,{target:Y,contentRect:U})}return se}(),te=function(){function se(Y,ie,U){if(this.activeObservations_=[],this.observations_=new H,typeof Y!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=Y,this.controller_=ie,this.callbackCtx_=U}return se.prototype.observe=function(Y){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(Y instanceof h(Y).Element))throw new TypeError('parameter 1 is not of type "Element".');var ie=this.observations_;ie.has(Y)||(ie.set(Y,new N(Y)),this.controller_.addObserver(this),this.controller_.refresh())}},se.prototype.unobserve=function(Y){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(Y instanceof h(Y).Element))throw new TypeError('parameter 1 is not of type "Element".');var ie=this.observations_;ie.has(Y)&&(ie.delete(Y),ie.size||this.controller_.removeObserver(this))}},se.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},se.prototype.gatherActive=function(){var Y=this;this.clearActive(),this.observations_.forEach(function(ie){ie.isActive()&&Y.activeObservations_.push(ie)})},se.prototype.broadcastActive=function(){if(this.hasActive()){var Y=this.callbackCtx_,ie=this.activeObservations_.map(function(U){return new z(U.target,U.broadcastRect())});this.callback_.call(Y,ie,Y),this.clearActive()}},se.prototype.clearActive=function(){this.activeObservations_.splice(0)},se.prototype.hasActive=function(){return this.activeObservations_.length>0},se}(),J=typeof WeakMap!="undefined"?new WeakMap:new H,ge=function(){function se(Y){if(!(this instanceof se))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var ie=v.getInstance(),U=new te(Y,ie,this);J.set(this,U)}return se}();["observe","unobserve","disconnect"].forEach(function(se){ge.prototype[se]=function(){var Y;return(Y=J.get(this))[se].apply(Y,arguments)}});var _e=function(){return typeof V.ResizeObserver!="undefined"?V.ResizeObserver:ge}();Re.Z=_e},98040:function(xt){xt.exports=function(){var Re=document.getSelection();if(!Re.rangeCount)return function(){};for(var _=document.activeElement,H=[],I=0;I<Re.rangeCount;I++)H.push(Re.getRangeAt(I));switch(_.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":_.blur();break;default:_=null;break}return Re.removeAllRanges(),function(){Re.type==="Caret"&&Re.removeAllRanges(),Re.rangeCount||H.forEach(function(V){Re.addRange(V)}),_&&_.focus()}}},1012:function(xt,Re,_){"use strict";_.d(Re,{Z:function(){return h}});var H=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),I=new Uint8Array(16);function V(){if(!H)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return H(I)}var P=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function F(n){return typeof n=="string"&&P.test(n)}for(var R=F,B=[],y=0;y<256;++y)B.push((y+256).toString(16).substr(1));function i(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,u=(B[n[o+0]]+B[n[o+1]]+B[n[o+2]]+B[n[o+3]]+"-"+B[n[o+4]]+B[n[o+5]]+"-"+B[n[o+6]]+B[n[o+7]]+"-"+B[n[o+8]]+B[n[o+9]]+"-"+B[n[o+10]]+B[n[o+11]]+B[n[o+12]]+B[n[o+13]]+B[n[o+14]]+B[n[o+15]]).toLowerCase();if(!R(u))throw TypeError("Stringified UUID is invalid");return u}var v=i;function f(n,o,u){n=n||{};var S=n.random||(n.rng||V)();if(S[6]=S[6]&15|64,S[8]=S[8]&63|128,o){u=u||0;for(var O=0;O<16;++O)o[u+O]=S[O];return o}return v(S)}var h=f},34376:function(xt){(function(Re,_){if(1)xt.exports=_();else var H,I})(window,function(){return function(Re){var _={};function H(I){if(_[I])return _[I].exports;var V=_[I]={i:I,l:!1,exports:{}};return Re[I].call(V.exports,V,V.exports,H),V.l=!0,V.exports}return H.m=Re,H.c=_,H.d=function(I,V,P){H.o(I,V)||Object.defineProperty(I,V,{enumerable:!0,get:P})},H.r=function(I){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(I,"__esModule",{value:!0})},H.t=function(I,V){if(1&V&&(I=H(I)),8&V||4&V&&typeof I=="object"&&I&&I.__esModule)return I;var P=Object.create(null);if(H.r(P),Object.defineProperty(P,"default",{enumerable:!0,value:I}),2&V&&typeof I!="string")for(var F in I)H.d(P,F,function(R){return I[R]}.bind(null,F));return P},H.n=function(I){var V=I&&I.__esModule?function(){return I.default}:function(){return I};return H.d(V,"a",V),V},H.o=function(I,V){return Object.prototype.hasOwnProperty.call(I,V)},H.p="",H(H.s=34)}([function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.forwardEvent=_.EventEmitter=void 0;var I=function(){function V(){this._listeners=[],this._disposed=!1}return Object.defineProperty(V.prototype,"event",{get:function(){var P=this;return this._event||(this._event=function(F){return P._listeners.push(F),{dispose:function(){if(!P._disposed){for(var R=0;R<P._listeners.length;R++)if(P._listeners[R]===F)return void P._listeners.splice(R,1)}}}}),this._event},enumerable:!1,configurable:!0}),V.prototype.fire=function(P,F){for(var R=[],B=0;B<this._listeners.length;B++)R.push(this._listeners[B]);for(B=0;B<R.length;B++)R[B].call(void 0,P,F)},V.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},V}();_.EventEmitter=I,_.forwardEvent=function(V,P){return V(function(F){return P.fire(F)})}},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.IUnicodeService=_.IOptionsService=_.ILogService=_.IInstantiationService=_.IDirtyRowService=_.ICharsetService=_.ICoreService=_.ICoreMouseService=_.IBufferService=void 0;var I=H(14);_.IBufferService=I.createDecorator("BufferService"),_.ICoreMouseService=I.createDecorator("CoreMouseService"),_.ICoreService=I.createDecorator("CoreService"),_.ICharsetService=I.createDecorator("CharsetService"),_.IDirtyRowService=I.createDecorator("DirtyRowService"),_.IInstantiationService=I.createDecorator("InstantiationService"),_.ILogService=I.createDecorator("LogService"),_.IOptionsService=I.createDecorator("OptionsService"),_.IUnicodeService=I.createDecorator("UnicodeService")},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.getDisposeArrayDisposable=_.disposeArray=_.Disposable=void 0;var I=function(){function P(){this._disposables=[],this._isDisposed=!1}return P.prototype.dispose=function(){this._isDisposed=!0;for(var F=0,R=this._disposables;F<R.length;F++)R[F].dispose();this._disposables.length=0},P.prototype.register=function(F){return this._disposables.push(F),F},P.prototype.unregister=function(F){var R=this._disposables.indexOf(F);R!==-1&&this._disposables.splice(R,1)},P}();function V(P){for(var F=0,R=P;F<R.length;F++)R[F].dispose();P.length=0}_.Disposable=I,_.disposeArray=V,_.getDisposeArrayDisposable=function(P){return{dispose:function(){return V(P)}}}},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.WHITESPACE_CELL_CODE=_.WHITESPACE_CELL_WIDTH=_.WHITESPACE_CELL_CHAR=_.NULL_CELL_CODE=_.NULL_CELL_WIDTH=_.NULL_CELL_CHAR=_.CHAR_DATA_CODE_INDEX=_.CHAR_DATA_WIDTH_INDEX=_.CHAR_DATA_CHAR_INDEX=_.CHAR_DATA_ATTR_INDEX=_.DEFAULT_ATTR=_.DEFAULT_COLOR=void 0,_.DEFAULT_COLOR=256,_.DEFAULT_ATTR=256|_.DEFAULT_COLOR<<9,_.CHAR_DATA_ATTR_INDEX=0,_.CHAR_DATA_CHAR_INDEX=1,_.CHAR_DATA_WIDTH_INDEX=2,_.CHAR_DATA_CODE_INDEX=3,_.NULL_CELL_CHAR="",_.NULL_CELL_WIDTH=1,_.NULL_CELL_CODE=0,_.WHITESPACE_CELL_CHAR=" ",_.WHITESPACE_CELL_WIDTH=1,_.WHITESPACE_CELL_CODE=32},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(y,i){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,f){v.__proto__=f}||function(v,f){for(var h in f)f.hasOwnProperty(h)&&(v[h]=f[h])})(y,i)},function(y,i){function v(){this.constructor=y}I(y,i),y.prototype=i===null?Object.create(i):(v.prototype=i.prototype,new v)});Object.defineProperty(_,"__esModule",{value:!0}),_.CellData=void 0;var P=H(8),F=H(3),R=H(6),B=function(y){function i(){var v=y!==null&&y.apply(this,arguments)||this;return v.content=0,v.fg=0,v.bg=0,v.extended=new R.ExtendedAttrs,v.combinedData="",v}return V(i,y),i.fromCharData=function(v){var f=new i;return f.setFromCharData(v),f},i.prototype.isCombined=function(){return 2097152&this.content},i.prototype.getWidth=function(){return this.content>>22},i.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?P.stringFromCodePoint(2097151&this.content):""},i.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},i.prototype.setFromCharData=function(v){this.fg=v[F.CHAR_DATA_ATTR_INDEX],this.bg=0;var f=!1;if(v[F.CHAR_DATA_CHAR_INDEX].length>2)f=!0;else if(v[F.CHAR_DATA_CHAR_INDEX].length===2){var h=v[F.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=h&&h<=56319){var n=v[F.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=n&&n<=57343?this.content=1024*(h-55296)+n-56320+65536|v[F.CHAR_DATA_WIDTH_INDEX]<<22:f=!0}else f=!0}else this.content=v[F.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[F.CHAR_DATA_WIDTH_INDEX]<<22;f&&(this.combinedData=v[F.CHAR_DATA_CHAR_INDEX],this.content=2097152|v[F.CHAR_DATA_WIDTH_INDEX]<<22)},i.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},i}(R.AttributeData);_.CellData=B},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.ISoundService=_.ISelectionService=_.IRenderService=_.IMouseService=_.ICoreBrowserService=_.ICharSizeService=void 0;var I=H(14);_.ICharSizeService=I.createDecorator("CharSizeService"),_.ICoreBrowserService=I.createDecorator("CoreBrowserService"),_.IMouseService=I.createDecorator("MouseService"),_.IRenderService=I.createDecorator("RenderService"),_.ISelectionService=I.createDecorator("SelectionService"),_.ISoundService=I.createDecorator("SoundService")},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.ExtendedAttrs=_.AttributeData=void 0;var I=function(){function P(){this.fg=0,this.bg=0,this.extended=new V}return P.toColorRGB=function(F){return[F>>>16&255,F>>>8&255,255&F]},P.fromColorRGB=function(F){return(255&F[0])<<16|(255&F[1])<<8|255&F[2]},P.prototype.clone=function(){var F=new P;return F.fg=this.fg,F.bg=this.bg,F.extended=this.extended.clone(),F},P.prototype.isInverse=function(){return 67108864&this.fg},P.prototype.isBold=function(){return 134217728&this.fg},P.prototype.isUnderline=function(){return 268435456&this.fg},P.prototype.isBlink=function(){return 536870912&this.fg},P.prototype.isInvisible=function(){return 1073741824&this.fg},P.prototype.isItalic=function(){return 67108864&this.bg},P.prototype.isDim=function(){return 134217728&this.bg},P.prototype.getFgColorMode=function(){return 50331648&this.fg},P.prototype.getBgColorMode=function(){return 50331648&this.bg},P.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},P.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},P.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},P.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},P.prototype.isFgDefault=function(){return(50331648&this.fg)==0},P.prototype.isBgDefault=function(){return(50331648&this.bg)==0},P.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},P.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},P.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},P.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},P.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},P.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},P.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},P.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},P.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},P.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},P.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},P}();_.AttributeData=I;var V=function(){function P(F,R){F===void 0&&(F=0),R===void 0&&(R=-1),this.underlineStyle=F,this.underlineColor=R}return P.prototype.clone=function(){return new P(this.underlineStyle,this.underlineColor)},P.prototype.isEmpty=function(){return this.underlineStyle===0},P}();_.ExtendedAttrs=V},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.addDisposableDomListener=void 0,_.addDisposableDomListener=function(I,V,P,F){I.addEventListener(V,P,F);var R=!1;return{dispose:function(){R||(R=!0,I.removeEventListener(V,P,F))}}}},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.Utf8ToUtf32=_.StringToUtf32=_.utf32ToString=_.stringFromCodePoint=void 0,_.stringFromCodePoint=function(P){return P>65535?(P-=65536,String.fromCharCode(55296+(P>>10))+String.fromCharCode(P%1024+56320)):String.fromCharCode(P)},_.utf32ToString=function(P,F,R){F===void 0&&(F=0),R===void 0&&(R=P.length);for(var B="",y=F;y<R;++y){var i=P[y];i>65535?(i-=65536,B+=String.fromCharCode(55296+(i>>10))+String.fromCharCode(i%1024+56320)):B+=String.fromCharCode(i)}return B};var I=function(){function P(){this._interim=0}return P.prototype.clear=function(){this._interim=0},P.prototype.decode=function(F,R){var B=F.length;if(!B)return 0;var y=0,i=0;this._interim&&(56320<=(h=F.charCodeAt(i++))&&h<=57343?R[y++]=1024*(this._interim-55296)+h-56320+65536:(R[y++]=this._interim,R[y++]=h),this._interim=0);for(var v=i;v<B;++v){var f=F.charCodeAt(v);if(55296<=f&&f<=56319){if(++v>=B)return this._interim=f,y;var h;56320<=(h=F.charCodeAt(v))&&h<=57343?R[y++]=1024*(f-55296)+h-56320+65536:(R[y++]=f,R[y++]=h)}else R[y++]=f}return y},P}();_.StringToUtf32=I;var V=function(){function P(){this.interim=new Uint8Array(3)}return P.prototype.clear=function(){this.interim.fill(0)},P.prototype.decode=function(F,R){var B=F.length;if(!B)return 0;var y,i,v,f,h=0,n=0,o=0;if(this.interim[0]){var u=!1,S=this.interim[0];S&=(224&S)==192?31:(240&S)==224?15:7;for(var O=0,T=void 0;(T=63&this.interim[++O])&&O<4;)S<<=6,S|=T;for(var E=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=E-O;o<C;){if(o>=B)return 0;if((192&(T=F[o++]))!=128){o--,u=!0;break}this.interim[O++]=T,S<<=6,S|=63&T}u||(E===2?S<128?o--:R[h++]=S:E===3?S<2048||S>=55296&&S<=57343||(R[h++]=S):S<65536||S>1114111||(R[h++]=S)),this.interim.fill(0)}for(var j=B-4,x=o;x<B;){for(;!(!(x<j)||128&(y=F[x])||128&(i=F[x+1])||128&(v=F[x+2])||128&(f=F[x+3]));)R[h++]=y,R[h++]=i,R[h++]=v,R[h++]=f,x+=4;if((y=F[x++])<128)R[h++]=y;else if((224&y)==192){if(x>=B)return this.interim[0]=y,h;if((192&(i=F[x++]))!=128){x--;continue}if((n=(31&y)<<6|63&i)<128){x--;continue}R[h++]=n}else if((240&y)==224){if(x>=B)return this.interim[0]=y,h;if((192&(i=F[x++]))!=128){x--;continue}if(x>=B)return this.interim[0]=y,this.interim[1]=i,h;if((192&(v=F[x++]))!=128){x--;continue}if((n=(15&y)<<12|(63&i)<<6|63&v)<2048||n>=55296&&n<=57343)continue;R[h++]=n}else if((248&y)==240){if(x>=B)return this.interim[0]=y,h;if((192&(i=F[x++]))!=128){x--;continue}if(x>=B)return this.interim[0]=y,this.interim[1]=i,h;if((192&(v=F[x++]))!=128){x--;continue}if(x>=B)return this.interim[0]=y,this.interim[1]=i,this.interim[2]=v,h;if((192&(f=F[x++]))!=128){x--;continue}if((n=(7&y)<<18|(63&i)<<12|(63&v)<<6|63&f)<65536||n>1114111)continue;R[h++]=n}}return h},P}();_.Utf8ToUtf32=V},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.CHAR_ATLAS_CELL_SPACING=_.DIM_OPACITY=_.INVERTED_DEFAULT_COLOR=void 0,_.INVERTED_DEFAULT_COLOR=257,_.DIM_OPACITY=.5,_.CHAR_ATLAS_CELL_SPACING=1},function(Re,_,H){"use strict";var I,V,P,F;function R(y){var i=y.toString(16);return i.length<2?"0"+i:i}function B(y,i){return y<i?(i+.05)/(y+.05):(y+.05)/(i+.05)}Object.defineProperty(_,"__esModule",{value:!0}),_.contrastRatio=_.toPaddedHex=_.rgba=_.rgb=_.css=_.color=_.channels=void 0,function(y){y.toCss=function(i,v,f,h){return h!==void 0?"#"+R(i)+R(v)+R(f)+R(h):"#"+R(i)+R(v)+R(f)},y.toRgba=function(i,v,f,h){return h===void 0&&(h=255),(i<<24|v<<16|f<<8|h)>>>0}}(I=_.channels||(_.channels={})),(V=_.color||(_.color={})).blend=function(y,i){var v=(255&i.rgba)/255;if(v===1)return{css:i.css,rgba:i.rgba};var f=i.rgba>>24&255,h=i.rgba>>16&255,n=i.rgba>>8&255,o=y.rgba>>24&255,u=y.rgba>>16&255,S=y.rgba>>8&255,O=o+Math.round((f-o)*v),T=u+Math.round((h-u)*v),E=S+Math.round((n-S)*v);return{css:I.toCss(O,T,E),rgba:I.toRgba(O,T,E)}},V.isOpaque=function(y){return(255&y.rgba)==255},V.ensureContrastRatio=function(y,i,v){var f=F.ensureContrastRatio(y.rgba,i.rgba,v);if(f)return F.toColor(f>>24&255,f>>16&255,f>>8&255)},V.opaque=function(y){var i=(255|y.rgba)>>>0,v=F.toChannels(i),f=v[0],h=v[1],n=v[2];return{css:I.toCss(f,h,n),rgba:i}},V.opacity=function(y,i){var v=Math.round(255*i),f=F.toChannels(y.rgba),h=f[0],n=f[1],o=f[2];return{css:I.toCss(h,n,o,v),rgba:I.toRgba(h,n,o,v)}},(_.css||(_.css={})).toColor=function(y){switch(y.length){case 7:return{css:y,rgba:(parseInt(y.slice(1),16)<<8|255)>>>0};case 9:return{css:y,rgba:parseInt(y.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(y){function i(v,f,h){var n=v/255,o=f/255,u=h/255;return .2126*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.7152*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))+.0722*(u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4))}y.relativeLuminance=function(v){return i(v>>16&255,v>>8&255,255&v)},y.relativeLuminance2=i}(P=_.rgb||(_.rgb={})),function(y){function i(f,h,n){for(var o=f>>24&255,u=f>>16&255,S=f>>8&255,O=h>>24&255,T=h>>16&255,E=h>>8&255,C=B(P.relativeLuminance2(O,E,T),P.relativeLuminance2(o,u,S));C<n&&(O>0||T>0||E>0);)O-=Math.max(0,Math.ceil(.1*O)),T-=Math.max(0,Math.ceil(.1*T)),E-=Math.max(0,Math.ceil(.1*E)),C=B(P.relativeLuminance2(O,E,T),P.relativeLuminance2(o,u,S));return(O<<24|T<<16|E<<8|255)>>>0}function v(f,h,n){for(var o=f>>24&255,u=f>>16&255,S=f>>8&255,O=h>>24&255,T=h>>16&255,E=h>>8&255,C=B(P.relativeLuminance2(O,E,T),P.relativeLuminance2(o,u,S));C<n&&(O<255||T<255||E<255);)O=Math.min(255,O+Math.ceil(.1*(255-O))),T=Math.min(255,T+Math.ceil(.1*(255-T))),E=Math.min(255,E+Math.ceil(.1*(255-E))),C=B(P.relativeLuminance2(O,E,T),P.relativeLuminance2(o,u,S));return(O<<24|T<<16|E<<8|255)>>>0}y.ensureContrastRatio=function(f,h,n){var o=P.relativeLuminance(f>>8),u=P.relativeLuminance(h>>8);if(B(o,u)<n)return u<o?i(f,h,n):v(f,h,n)},y.reduceLuminance=i,y.increaseLuminance=v,y.toChannels=function(f){return[f>>24&255,f>>16&255,f>>8&255,255&f]},y.toColor=function(f,h,n){return{css:I.toCss(f,h,n),rgba:I.toRgba(f,h,n)}}}(F=_.rgba||(_.rgba={})),_.toPaddedHex=R,_.contrastRatio=B},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.isLinux=_.isWindows=_.isIphone=_.isIpad=_.isMac=_.isSafari=_.isFirefox=void 0;var I=typeof navigator=="undefined",V=I?"node":navigator.userAgent,P=I?"node":navigator.platform;function F(R,B){return R.indexOf(B)>=0}_.isFirefox=!!~V.indexOf("Firefox"),_.isSafari=/^((?!chrome|android).)*safari/i.test(V),_.isMac=F(["Macintosh","MacIntel","MacPPC","Mac68K"],P),_.isIpad=P==="iPad",_.isIphone=P==="iPhone",_.isWindows=F(["Windows","Win16","Win32","WinCE"],P),_.isLinux=P.indexOf("Linux")>=0},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.C1=_.C0=void 0,function(I){I.NUL="\0",I.SOH="",I.STX="",I.ETX="",I.EOT="",I.ENQ="",I.ACK="",I.BEL="\x07",I.BS="\b",I.HT=" ",I.LF=`
`,I.VT="\v",I.FF="\f",I.CR="\r",I.SO="",I.SI="",I.DLE="",I.DC1="",I.DC2="",I.DC3="",I.DC4="",I.NAK="",I.SYN="",I.ETB="",I.CAN="",I.EM="",I.SUB="",I.ESC="\x1B",I.FS="",I.GS="",I.RS="",I.US="",I.SP=" ",I.DEL="\x7F"}(_.C0||(_.C0={})),function(I){I.PAD="\x80",I.HOP="\x81",I.BPH="\x82",I.NBH="\x83",I.IND="\x84",I.NEL="\x85",I.SSA="\x86",I.ESA="\x87",I.HTS="\x88",I.HTJ="\x89",I.VTS="\x8A",I.PLD="\x8B",I.PLU="\x8C",I.RI="\x8D",I.SS2="\x8E",I.SS3="\x8F",I.DCS="\x90",I.PU1="\x91",I.PU2="\x92",I.STS="\x93",I.CCH="\x94",I.MW="\x95",I.SPA="\x96",I.EPA="\x97",I.SOS="\x98",I.SGCI="\x99",I.SCI="\x9A",I.CSI="\x9B",I.ST="\x9C",I.OSC="\x9D",I.PM="\x9E",I.APC="\x9F"}(_.C1||(_.C1={}))},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.BaseRenderLayer=void 0;var I=H(3),V=H(9),P=H(25),F=H(6),R=H(28),B=H(10),y=H(17),i=function(){function v(f,h,n,o,u,S,O,T){this._container=f,this._alpha=o,this._colors=u,this._rendererId=S,this._bufferService=O,this._optionsService=T,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+h+"-layer"),this._canvas.style.zIndex=n.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return v.prototype.dispose=function(){var f;y.removeElementFromParent(this._canvas),(f=this._charAtlas)===null||f===void 0||f.dispose()},v.prototype._initCanvas=function(){this._ctx=R.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},v.prototype.onOptionsChanged=function(){},v.prototype.onBlur=function(){},v.prototype.onFocus=function(){},v.prototype.onCursorMove=function(){},v.prototype.onGridChanged=function(f,h){},v.prototype.onSelectionChanged=function(f,h,n){n===void 0&&(n=!1)},v.prototype.setColors=function(f){this._refreshCharAtlas(f)},v.prototype._setTransparency=function(f){if(f!==this._alpha){var h=this._canvas;this._alpha=f,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,h),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},v.prototype._refreshCharAtlas=function(f){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=P.acquireCharAtlas(this._optionsService.options,this._rendererId,f,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},v.prototype.resize=function(f){this._scaledCellWidth=f.scaledCellWidth,this._scaledCellHeight=f.scaledCellHeight,this._scaledCharWidth=f.scaledCharWidth,this._scaledCharHeight=f.scaledCharHeight,this._scaledCharLeft=f.scaledCharLeft,this._scaledCharTop=f.scaledCharTop,this._canvas.width=f.scaledCanvasWidth,this._canvas.height=f.scaledCanvasHeight,this._canvas.style.width=f.canvasWidth+"px",this._canvas.style.height=f.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},v.prototype._fillCells=function(f,h,n,o){this._ctx.fillRect(f*this._scaledCellWidth,h*this._scaledCellHeight,n*this._scaledCellWidth,o*this._scaledCellHeight)},v.prototype._fillBottomLineAtCells=function(f,h,n){n===void 0&&(n=1),this._ctx.fillRect(f*this._scaledCellWidth,(h+1)*this._scaledCellHeight-window.devicePixelRatio-1,n*this._scaledCellWidth,window.devicePixelRatio)},v.prototype._fillLeftLineAtCell=function(f,h,n){this._ctx.fillRect(f*this._scaledCellWidth,h*this._scaledCellHeight,window.devicePixelRatio*n,this._scaledCellHeight)},v.prototype._strokeRectAtCell=function(f,h,n,o){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(f*this._scaledCellWidth+window.devicePixelRatio/2,h*this._scaledCellHeight+window.devicePixelRatio/2,n*this._scaledCellWidth-window.devicePixelRatio,o*this._scaledCellHeight-window.devicePixelRatio)},v.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},v.prototype._clearCells=function(f,h,n,o){this._alpha?this._ctx.clearRect(f*this._scaledCellWidth,h*this._scaledCellHeight,n*this._scaledCellWidth,o*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(f*this._scaledCellWidth,h*this._scaledCellHeight,n*this._scaledCellWidth,o*this._scaledCellHeight))},v.prototype._fillCharTrueColor=function(f,h,n){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(n),this._ctx.fillText(f.getChars(),h*this._scaledCellWidth+this._scaledCharLeft,n*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},v.prototype._drawChars=function(f,h,n){var o,u,S=this._getContrastColor(f);S||f.isFgRGB()||f.isBgRGB()?this._drawUncachedChars(f,h,n,S):(f.isInverse()?(o=f.isBgDefault()?V.INVERTED_DEFAULT_COLOR:f.getBgColor(),u=f.isFgDefault()?V.INVERTED_DEFAULT_COLOR:f.getFgColor()):(u=f.isBgDefault()?I.DEFAULT_COLOR:f.getBgColor(),o=f.isFgDefault()?I.DEFAULT_COLOR:f.getFgColor()),o+=this._optionsService.options.drawBoldTextInBrightColors&&f.isBold()&&o<8?8:0,this._currentGlyphIdentifier.chars=f.getChars()||I.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=f.getCode()||I.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=u,this._currentGlyphIdentifier.fg=o,this._currentGlyphIdentifier.bold=!!f.isBold(),this._currentGlyphIdentifier.dim=!!f.isDim(),this._currentGlyphIdentifier.italic=!!f.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,h*this._scaledCellWidth+this._scaledCharLeft,n*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(f,h,n))},v.prototype._drawUncachedChars=function(f,h,n,o){if(this._ctx.save(),this._ctx.font=this._getFont(!!f.isBold(),!!f.isItalic()),this._ctx.textBaseline="middle",f.isInverse())if(o)this._ctx.fillStyle=o.css;else if(f.isBgDefault())this._ctx.fillStyle=B.color.opaque(this._colors.background).css;else if(f.isBgRGB())this._ctx.fillStyle="rgb("+F.AttributeData.toColorRGB(f.getBgColor()).join(",")+")";else{var u=f.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&f.isBold()&&u<8&&(u+=8),this._ctx.fillStyle=this._colors.ansi[u].css}else if(o)this._ctx.fillStyle=o.css;else if(f.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(f.isFgRGB())this._ctx.fillStyle="rgb("+F.AttributeData.toColorRGB(f.getFgColor()).join(",")+")";else{var S=f.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&f.isBold()&&S<8&&(S+=8),this._ctx.fillStyle=this._colors.ansi[S].css}this._clipRow(n),f.isDim()&&(this._ctx.globalAlpha=V.DIM_OPACITY),this._ctx.fillText(f.getChars(),h*this._scaledCellWidth+this._scaledCharLeft,n*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},v.prototype._clipRow=function(f){this._ctx.beginPath(),this._ctx.rect(0,f*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},v.prototype._getFont=function(f,h){return(h?"italic":"")+" "+(f?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},v.prototype._getContrastColor=function(f){if(this._optionsService.options.minimumContrastRatio!==1){var h=this._colors.contrastCache.getColor(f.bg,f.fg);if(h!==void 0)return h||void 0;var n=f.getFgColor(),o=f.getFgColorMode(),u=f.getBgColor(),S=f.getBgColorMode(),O=!!f.isInverse(),T=!!f.isInverse();if(O){var E=n;n=u,u=E;var C=o;o=S,S=C}var j=this._resolveBackgroundRgba(S,u,O),x=this._resolveForegroundRgba(o,n,O,T),L=B.rgba.ensureContrastRatio(j,x,this._optionsService.options.minimumContrastRatio);if(L){var N={css:B.channels.toCss(L>>24&255,L>>16&255,L>>8&255),rgba:L};return this._colors.contrastCache.setColor(f.bg,f.fg,N),N}this._colors.contrastCache.setColor(f.bg,f.fg,null)}},v.prototype._resolveBackgroundRgba=function(f,h,n){switch(f){case 16777216:case 33554432:return this._colors.ansi[h].rgba;case 50331648:return h<<8;case 0:default:return n?this._colors.foreground.rgba:this._colors.background.rgba}},v.prototype._resolveForegroundRgba=function(f,h,n,o){switch(f){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&o&&h<8&&(h+=8),this._colors.ansi[h].rgba;case 50331648:return h<<8;case 0:default:return n?this._colors.background.rgba:this._colors.foreground.rgba}},v}();_.BaseRenderLayer=i},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.createDecorator=_.getServiceDependencies=_.serviceRegistry=void 0;function I(V,P,F){P.di$target===P?P.di$dependencies.push({id:V,index:F}):(P.di$dependencies=[{id:V,index:F}],P.di$target=P)}_.serviceRegistry=new Map,_.getServiceDependencies=function(V){return V.di$dependencies||[]},_.createDecorator=function(V){if(_.serviceRegistry.has(V))return _.serviceRegistry.get(V);var P=function(F,R,B){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");I(P,F,B)};return P.toString=function(){return V},_.serviceRegistry.set(V,P),P}},function(Re,_,H){"use strict";function I(V,P,F,R){if(F===void 0&&(F=0),R===void 0&&(R=V.length),F>=V.length)return V;F=(V.length+F)%V.length,R=R>=V.length?V.length:(V.length+R)%V.length;for(var B=F;B<R;++B)V[B]=P;return V}Object.defineProperty(_,"__esModule",{value:!0}),_.concat=_.fillFallback=_.fill=void 0,_.fill=function(V,P,F,R){return V.fill?V.fill(P,F,R):I(V,P,F,R)},_.fillFallback=I,_.concat=function(V,P){var F=new V.constructor(V.length+P.length);return F.set(V),F.set(P,V.length),F}},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.BufferLine=_.DEFAULT_ATTR_DATA=void 0;var I=H(8),V=H(3),P=H(4),F=H(6);_.DEFAULT_ATTR_DATA=Object.freeze(new F.AttributeData);var R=function(){function B(y,i,v){v===void 0&&(v=!1),this.isWrapped=v,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*y);for(var f=i||P.CellData.fromCharData([0,V.NULL_CELL_CHAR,V.NULL_CELL_WIDTH,V.NULL_CELL_CODE]),h=0;h<y;++h)this.setCell(h,f);this.length=y}return B.prototype.get=function(y){var i=this._data[3*y+0],v=2097151&i;return[this._data[3*y+1],2097152&i?this._combined[y]:v?I.stringFromCodePoint(v):"",i>>22,2097152&i?this._combined[y].charCodeAt(this._combined[y].length-1):v]},B.prototype.set=function(y,i){this._data[3*y+1]=i[V.CHAR_DATA_ATTR_INDEX],i[V.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[y]=i[1],this._data[3*y+0]=2097152|y|i[V.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*y+0]=i[V.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|i[V.CHAR_DATA_WIDTH_INDEX]<<22},B.prototype.getWidth=function(y){return this._data[3*y+0]>>22},B.prototype.hasWidth=function(y){return 12582912&this._data[3*y+0]},B.prototype.getFg=function(y){return this._data[3*y+1]},B.prototype.getBg=function(y){return this._data[3*y+2]},B.prototype.hasContent=function(y){return 4194303&this._data[3*y+0]},B.prototype.getCodePoint=function(y){var i=this._data[3*y+0];return 2097152&i?this._combined[y].charCodeAt(this._combined[y].length-1):2097151&i},B.prototype.isCombined=function(y){return 2097152&this._data[3*y+0]},B.prototype.getString=function(y){var i=this._data[3*y+0];return 2097152&i?this._combined[y]:2097151&i?I.stringFromCodePoint(2097151&i):""},B.prototype.loadCell=function(y,i){var v=3*y;return i.content=this._data[v+0],i.fg=this._data[v+1],i.bg=this._data[v+2],2097152&i.content&&(i.combinedData=this._combined[y]),268435456&i.bg&&(i.extended=this._extendedAttrs[y]),i},B.prototype.setCell=function(y,i){2097152&i.content&&(this._combined[y]=i.combinedData),268435456&i.bg&&(this._extendedAttrs[y]=i.extended),this._data[3*y+0]=i.content,this._data[3*y+1]=i.fg,this._data[3*y+2]=i.bg},B.prototype.setCellFromCodePoint=function(y,i,v,f,h,n){268435456&h&&(this._extendedAttrs[y]=n),this._data[3*y+0]=i|v<<22,this._data[3*y+1]=f,this._data[3*y+2]=h},B.prototype.addCodepointToCell=function(y,i){var v=this._data[3*y+0];2097152&v?this._combined[y]+=I.stringFromCodePoint(i):(2097151&v?(this._combined[y]=I.stringFromCodePoint(2097151&v)+I.stringFromCodePoint(i),v&=-2097152,v|=2097152):v=i|1<<22,this._data[3*y+0]=v)},B.prototype.insertCells=function(y,i,v,f){if((y%=this.length)&&this.getWidth(y-1)===2&&this.setCellFromCodePoint(y-1,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new F.ExtendedAttrs),i<this.length-y){for(var h=new P.CellData,n=this.length-y-i-1;n>=0;--n)this.setCell(y+i+n,this.loadCell(y+n,h));for(n=0;n<i;++n)this.setCell(y+n,v)}else for(n=y;n<this.length;++n)this.setCell(n,v);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new F.ExtendedAttrs)},B.prototype.deleteCells=function(y,i,v,f){if(y%=this.length,i<this.length-y){for(var h=new P.CellData,n=0;n<this.length-y-i;++n)this.setCell(y+n,this.loadCell(y+i+n,h));for(n=this.length-i;n<this.length;++n)this.setCell(n,v)}else for(n=y;n<this.length;++n)this.setCell(n,v);y&&this.getWidth(y-1)===2&&this.setCellFromCodePoint(y-1,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new F.ExtendedAttrs),this.getWidth(y)!==0||this.hasContent(y)||this.setCellFromCodePoint(y,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new F.ExtendedAttrs)},B.prototype.replaceCells=function(y,i,v,f){for(y&&this.getWidth(y-1)===2&&this.setCellFromCodePoint(y-1,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new F.ExtendedAttrs),i<this.length&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new F.ExtendedAttrs);y<i&&y<this.length;)this.setCell(y++,v)},B.prototype.resize=function(y,i){if(y!==this.length){if(y>this.length){var v=new Uint32Array(3*y);this.length&&(3*y<this._data.length?v.set(this._data.subarray(0,3*y)):v.set(this._data)),this._data=v;for(var f=this.length;f<y;++f)this.setCell(f,i)}else if(y){(v=new Uint32Array(3*y)).set(this._data.subarray(0,3*y)),this._data=v;var h=Object.keys(this._combined);for(f=0;f<h.length;f++){var n=parseInt(h[f],10);n>=y&&delete this._combined[n]}}else this._data=new Uint32Array(0),this._combined={};this.length=y}},B.prototype.fill=function(y){this._combined={},this._extendedAttrs={};for(var i=0;i<this.length;++i)this.setCell(i,y)},B.prototype.copyFrom=function(y){for(var i in this.length!==y.length?this._data=new Uint32Array(y._data):this._data.set(y._data),this.length=y.length,this._combined={},y._combined)this._combined[i]=y._combined[i];for(var i in this._extendedAttrs={},y._extendedAttrs)this._extendedAttrs[i]=y._extendedAttrs[i];this.isWrapped=y.isWrapped},B.prototype.clone=function(){var y=new B(0);for(var i in y._data=new Uint32Array(this._data),y.length=this.length,this._combined)y._combined[i]=this._combined[i];for(var i in this._extendedAttrs)y._extendedAttrs[i]=this._extendedAttrs[i];return y.isWrapped=this.isWrapped,y},B.prototype.getTrimmedLength=function(){for(var y=this.length-1;y>=0;--y)if(4194303&this._data[3*y+0])return y+(this._data[3*y+0]>>22);return 0},B.prototype.copyCellsFrom=function(y,i,v,f,h){var n=y._data;if(h)for(var o=f-1;o>=0;o--)for(var u=0;u<3;u++)this._data[3*(v+o)+u]=n[3*(i+o)+u];else for(o=0;o<f;o++)for(u=0;u<3;u++)this._data[3*(v+o)+u]=n[3*(i+o)+u];var S=Object.keys(y._combined);for(u=0;u<S.length;u++){var O=parseInt(S[u],10);O>=i&&(this._combined[O-i+v]=y._combined[O])}},B.prototype.translateToString=function(y,i,v){y===void 0&&(y=!1),i===void 0&&(i=0),v===void 0&&(v=this.length),y&&(v=Math.min(v,this.getTrimmedLength()));for(var f="";i<v;){var h=this._data[3*i+0],n=2097151&h;f+=2097152&h?this._combined[i]:n?I.stringFromCodePoint(n):V.WHITESPACE_CELL_CHAR,i+=h>>22||1}return f},B}();_.BufferLine=R},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.removeElementFromParent=void 0,_.removeElementFromParent=function(){for(var I,V=[],P=0;P<arguments.length;P++)V[P]=arguments[P];for(var F=0,R=V;F<R.length;F++){var B=R[F];(I=B==null?void 0:B.parentElement)===null||I===void 0||I.removeChild(B)}}},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.tooMuchOutput=_.promptLabel=void 0,_.promptLabel="Terminal input",_.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(x,L){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,z){N.__proto__=z}||function(N,z){for(var te in z)z.hasOwnProperty(te)&&(N[te]=z[te])})(x,L)},function(x,L){function N(){this.constructor=x}I(x,L),x.prototype=L===null?Object.create(L):(N.prototype=L.prototype,new N)});Object.defineProperty(_,"__esModule",{value:!0}),_.InputHandler=_.WindowsOptionsReportType=void 0;var P,F=H(12),R=H(20),B=H(39),y=H(2),i=H(15),v=H(8),f=H(16),h=H(0),n=H(3),o=H(4),u=H(6),S=H(22),O=H(24),T={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function E(x,L){if(x>24)return L.setWinLines||!1;switch(x){case 1:return!!L.restoreWin;case 2:return!!L.minimizeWin;case 3:return!!L.setWinPosition;case 4:return!!L.setWinSizePixels;case 5:return!!L.raiseWin;case 6:return!!L.lowerWin;case 7:return!!L.refreshWin;case 8:return!!L.setWinSizeChars;case 9:return!!L.maximizeWin;case 10:return!!L.fullscreenWin;case 11:return!!L.getWinState;case 13:return!!L.getWinPosition;case 14:return!!L.getWinSizePixels;case 15:return!!L.getScreenSizePixels;case 16:return!!L.getCellSizePixels;case 18:return!!L.getWinSizeChars;case 19:return!!L.getScreenSizeChars;case 20:return!!L.getIconTitle;case 21:return!!L.getWinTitle;case 22:return!!L.pushTitle;case 23:return!!L.popTitle;case 24:return!!L.setWinLines}return!1}(function(x){x[x.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",x[x.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(P=_.WindowsOptionsReportType||(_.WindowsOptionsReportType={}));var C=function(){function x(L,N,z,te){this._bufferService=L,this._coreService=N,this._logService=z,this._optionsService=te,this._data=new Uint32Array(0)}return x.prototype.hook=function(L){this._data=new Uint32Array(0)},x.prototype.put=function(L,N,z){this._data=i.concat(this._data,L.subarray(N,z))},x.prototype.unhook=function(L){if(L){var N=v.utf32ToString(this._data);switch(this._data=new Uint32Array(0),N){case'"q':return this._coreService.triggerDataEvent(F.C0.ESC+'P1$r0"q'+F.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(F.C0.ESC+'P1$r61;1"p'+F.C0.ESC+"\\");case"r":var z=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(F.C0.ESC+"P1$r"+z+F.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(F.C0.ESC+"P1$r0m"+F.C0.ESC+"\\");case" q":var te={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return te-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(F.C0.ESC+"P1$r"+te+" q"+F.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",N),this._coreService.triggerDataEvent(F.C0.ESC+"P0$r"+F.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},x}(),j=function(x){function L(N,z,te,J,ge,_e,se,Y,ie){ie===void 0&&(ie=new B.EscapeSequenceParser);var U=x.call(this)||this;U._bufferService=N,U._charsetService=z,U._coreService=te,U._dirtyRowService=J,U._logService=ge,U._optionsService=_e,U._coreMouseService=se,U._unicodeService=Y,U._parser=ie,U._parseBuffer=new Uint32Array(4096),U._stringDecoder=new v.StringToUtf32,U._utf8Decoder=new v.Utf8ToUtf32,U._workCell=new o.CellData,U._windowTitle="",U._iconName="",U._windowTitleStack=[],U._iconNameStack=[],U._curAttrData=f.DEFAULT_ATTR_DATA.clone(),U._eraseAttrDataInternal=f.DEFAULT_ATTR_DATA.clone(),U._onRequestBell=new h.EventEmitter,U._onRequestRefreshRows=new h.EventEmitter,U._onRequestReset=new h.EventEmitter,U._onRequestScroll=new h.EventEmitter,U._onRequestSyncScrollBar=new h.EventEmitter,U._onRequestWindowsOptionsReport=new h.EventEmitter,U._onA11yChar=new h.EventEmitter,U._onA11yTab=new h.EventEmitter,U._onCursorMove=new h.EventEmitter,U._onLineFeed=new h.EventEmitter,U._onScroll=new h.EventEmitter,U._onTitleChange=new h.EventEmitter,U.register(U._parser),U._parser.setCsiHandlerFallback(function(D,re){U._logService.debug("Unknown CSI code: ",{identifier:U._parser.identToString(D),params:re.toArray()})}),U._parser.setEscHandlerFallback(function(D){U._logService.debug("Unknown ESC code: ",{identifier:U._parser.identToString(D)})}),U._parser.setExecuteHandlerFallback(function(D){U._logService.debug("Unknown EXECUTE code: ",{code:D})}),U._parser.setOscHandlerFallback(function(D,re,pe){U._logService.debug("Unknown OSC code: ",{identifier:D,action:re,data:pe})}),U._parser.setDcsHandlerFallback(function(D,re,pe){re==="HOOK"&&(pe=pe.toArray()),U._logService.debug("Unknown DCS code: ",{identifier:U._parser.identToString(D),action:re,payload:pe})}),U._parser.setPrintHandler(function(D,re,pe){return U.print(D,re,pe)}),U._parser.setCsiHandler({final:"@"},function(D){return U.insertChars(D)}),U._parser.setCsiHandler({intermediates:" ",final:"@"},function(D){return U.scrollLeft(D)}),U._parser.setCsiHandler({final:"A"},function(D){return U.cursorUp(D)}),U._parser.setCsiHandler({intermediates:" ",final:"A"},function(D){return U.scrollRight(D)}),U._parser.setCsiHandler({final:"B"},function(D){return U.cursorDown(D)}),U._parser.setCsiHandler({final:"C"},function(D){return U.cursorForward(D)}),U._parser.setCsiHandler({final:"D"},function(D){return U.cursorBackward(D)}),U._parser.setCsiHandler({final:"E"},function(D){return U.cursorNextLine(D)}),U._parser.setCsiHandler({final:"F"},function(D){return U.cursorPrecedingLine(D)}),U._parser.setCsiHandler({final:"G"},function(D){return U.cursorCharAbsolute(D)}),U._parser.setCsiHandler({final:"H"},function(D){return U.cursorPosition(D)}),U._parser.setCsiHandler({final:"I"},function(D){return U.cursorForwardTab(D)}),U._parser.setCsiHandler({final:"J"},function(D){return U.eraseInDisplay(D)}),U._parser.setCsiHandler({prefix:"?",final:"J"},function(D){return U.eraseInDisplay(D)}),U._parser.setCsiHandler({final:"K"},function(D){return U.eraseInLine(D)}),U._parser.setCsiHandler({prefix:"?",final:"K"},function(D){return U.eraseInLine(D)}),U._parser.setCsiHandler({final:"L"},function(D){return U.insertLines(D)}),U._parser.setCsiHandler({final:"M"},function(D){return U.deleteLines(D)}),U._parser.setCsiHandler({final:"P"},function(D){return U.deleteChars(D)}),U._parser.setCsiHandler({final:"S"},function(D){return U.scrollUp(D)}),U._parser.setCsiHandler({final:"T"},function(D){return U.scrollDown(D)}),U._parser.setCsiHandler({final:"X"},function(D){return U.eraseChars(D)}),U._parser.setCsiHandler({final:"Z"},function(D){return U.cursorBackwardTab(D)}),U._parser.setCsiHandler({final:"`"},function(D){return U.charPosAbsolute(D)}),U._parser.setCsiHandler({final:"a"},function(D){return U.hPositionRelative(D)}),U._parser.setCsiHandler({final:"b"},function(D){return U.repeatPrecedingCharacter(D)}),U._parser.setCsiHandler({final:"c"},function(D){return U.sendDeviceAttributesPrimary(D)}),U._parser.setCsiHandler({prefix:">",final:"c"},function(D){return U.sendDeviceAttributesSecondary(D)}),U._parser.setCsiHandler({final:"d"},function(D){return U.linePosAbsolute(D)}),U._parser.setCsiHandler({final:"e"},function(D){return U.vPositionRelative(D)}),U._parser.setCsiHandler({final:"f"},function(D){return U.hVPosition(D)}),U._parser.setCsiHandler({final:"g"},function(D){return U.tabClear(D)}),U._parser.setCsiHandler({final:"h"},function(D){return U.setMode(D)}),U._parser.setCsiHandler({prefix:"?",final:"h"},function(D){return U.setModePrivate(D)}),U._parser.setCsiHandler({final:"l"},function(D){return U.resetMode(D)}),U._parser.setCsiHandler({prefix:"?",final:"l"},function(D){return U.resetModePrivate(D)}),U._parser.setCsiHandler({final:"m"},function(D){return U.charAttributes(D)}),U._parser.setCsiHandler({final:"n"},function(D){return U.deviceStatus(D)}),U._parser.setCsiHandler({prefix:"?",final:"n"},function(D){return U.deviceStatusPrivate(D)}),U._parser.setCsiHandler({intermediates:"!",final:"p"},function(D){return U.softReset(D)}),U._parser.setCsiHandler({intermediates:" ",final:"q"},function(D){return U.setCursorStyle(D)}),U._parser.setCsiHandler({final:"r"},function(D){return U.setScrollRegion(D)}),U._parser.setCsiHandler({final:"s"},function(D){return U.saveCursor(D)}),U._parser.setCsiHandler({final:"t"},function(D){return U.windowOptions(D)}),U._parser.setCsiHandler({final:"u"},function(D){return U.restoreCursor(D)}),U._parser.setCsiHandler({intermediates:"'",final:"}"},function(D){return U.insertColumns(D)}),U._parser.setCsiHandler({intermediates:"'",final:"~"},function(D){return U.deleteColumns(D)}),U._parser.setExecuteHandler(F.C0.BEL,function(){return U.bell()}),U._parser.setExecuteHandler(F.C0.LF,function(){return U.lineFeed()}),U._parser.setExecuteHandler(F.C0.VT,function(){return U.lineFeed()}),U._parser.setExecuteHandler(F.C0.FF,function(){return U.lineFeed()}),U._parser.setExecuteHandler(F.C0.CR,function(){return U.carriageReturn()}),U._parser.setExecuteHandler(F.C0.BS,function(){return U.backspace()}),U._parser.setExecuteHandler(F.C0.HT,function(){return U.tab()}),U._parser.setExecuteHandler(F.C0.SO,function(){return U.shiftOut()}),U._parser.setExecuteHandler(F.C0.SI,function(){return U.shiftIn()}),U._parser.setExecuteHandler(F.C1.IND,function(){return U.index()}),U._parser.setExecuteHandler(F.C1.NEL,function(){return U.nextLine()}),U._parser.setExecuteHandler(F.C1.HTS,function(){return U.tabSet()}),U._parser.setOscHandler(0,new S.OscHandler(function(D){U.setTitle(D),U.setIconName(D)})),U._parser.setOscHandler(1,new S.OscHandler(function(D){return U.setIconName(D)})),U._parser.setOscHandler(2,new S.OscHandler(function(D){return U.setTitle(D)})),U._parser.setEscHandler({final:"7"},function(){return U.saveCursor()}),U._parser.setEscHandler({final:"8"},function(){return U.restoreCursor()}),U._parser.setEscHandler({final:"D"},function(){return U.index()}),U._parser.setEscHandler({final:"E"},function(){return U.nextLine()}),U._parser.setEscHandler({final:"H"},function(){return U.tabSet()}),U._parser.setEscHandler({final:"M"},function(){return U.reverseIndex()}),U._parser.setEscHandler({final:"="},function(){return U.keypadApplicationMode()}),U._parser.setEscHandler({final:">"},function(){return U.keypadNumericMode()}),U._parser.setEscHandler({final:"c"},function(){return U.fullReset()}),U._parser.setEscHandler({final:"n"},function(){return U.setgLevel(2)}),U._parser.setEscHandler({final:"o"},function(){return U.setgLevel(3)}),U._parser.setEscHandler({final:"|"},function(){return U.setgLevel(3)}),U._parser.setEscHandler({final:"}"},function(){return U.setgLevel(2)}),U._parser.setEscHandler({final:"~"},function(){return U.setgLevel(1)}),U._parser.setEscHandler({intermediates:"%",final:"@"},function(){return U.selectDefaultCharset()}),U._parser.setEscHandler({intermediates:"%",final:"G"},function(){return U.selectDefaultCharset()});var Z=function(D){K._parser.setEscHandler({intermediates:"(",final:D},function(){return U.selectCharset("("+D)}),K._parser.setEscHandler({intermediates:")",final:D},function(){return U.selectCharset(")"+D)}),K._parser.setEscHandler({intermediates:"*",final:D},function(){return U.selectCharset("*"+D)}),K._parser.setEscHandler({intermediates:"+",final:D},function(){return U.selectCharset("+"+D)}),K._parser.setEscHandler({intermediates:"-",final:D},function(){return U.selectCharset("-"+D)}),K._parser.setEscHandler({intermediates:".",final:D},function(){return U.selectCharset("."+D)}),K._parser.setEscHandler({intermediates:"/",final:D},function(){return U.selectCharset("/"+D)})},K=this;for(var k in R.CHARSETS)Z(k);return U._parser.setEscHandler({intermediates:"#",final:"8"},function(){return U.screenAlignmentPattern()}),U._parser.setErrorHandler(function(D){return U._logService.error("Parsing error: ",D),D}),U._parser.setDcsHandler({intermediates:"$",final:"q"},new C(U._bufferService,U._coreService,U._logService,U._optionsService)),U}return V(L,x),Object.defineProperty(L.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),L.prototype.dispose=function(){x.prototype.dispose.call(this)},L.prototype.parse=function(N){var z=this._bufferService.buffer,te=z.x,J=z.y;if(this._logService.debug("parsing data",N),this._parseBuffer.length<N.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(N.length,131072))),this._dirtyRowService.clearRange(),N.length>131072)for(var ge=0;ge<N.length;ge+=131072){var _e=ge+131072<N.length?ge+131072:N.length,se=typeof N=="string"?this._stringDecoder.decode(N.substring(ge,_e),this._parseBuffer):this._utf8Decoder.decode(N.subarray(ge,_e),this._parseBuffer);this._parser.parse(this._parseBuffer,se)}else se=typeof N=="string"?this._stringDecoder.decode(N,this._parseBuffer):this._utf8Decoder.decode(N,this._parseBuffer),this._parser.parse(this._parseBuffer,se);(z=this._bufferService.buffer).x===te&&z.y===J||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},L.prototype.print=function(N,z,te){var J,ge,_e=this._bufferService.buffer,se=this._charsetService.charset,Y=this._optionsService.options.screenReaderMode,ie=this._bufferService.cols,U=this._coreService.decPrivateModes.wraparound,Z=this._coreService.modes.insertMode,K=this._curAttrData,k=_e.lines.get(_e.ybase+_e.y);this._dirtyRowService.markDirty(_e.y),_e.x&&te-z>0&&k.getWidth(_e.x-1)===2&&k.setCellFromCodePoint(_e.x-1,0,1,K.fg,K.bg,K.extended);for(var D=z;D<te;++D){if(J=N[D],ge=this._unicodeService.wcwidth(J),J<127&&se){var re=se[String.fromCharCode(J)];re&&(J=re.charCodeAt(0))}if(Y&&this._onA11yChar.fire(v.stringFromCodePoint(J)),ge||!_e.x){if(_e.x+ge-1>=ie){if(U){for(;_e.x<ie;)k.setCellFromCodePoint(_e.x++,0,1,K.fg,K.bg,K.extended);_e.x=0,_e.y++,_e.y===_e.scrollBottom+1?(_e.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(_e.y>=this._bufferService.rows&&(_e.y=this._bufferService.rows-1),_e.lines.get(_e.ybase+_e.y).isWrapped=!0),k=_e.lines.get(_e.ybase+_e.y)}else if(_e.x=ie-1,ge===2)continue}if(Z&&(k.insertCells(_e.x,ge,_e.getNullCell(K),K),k.getWidth(ie-1)===2&&k.setCellFromCodePoint(ie-1,n.NULL_CELL_CODE,n.NULL_CELL_WIDTH,K.fg,K.bg,K.extended)),k.setCellFromCodePoint(_e.x++,J,ge,K.fg,K.bg,K.extended),ge>0)for(;--ge;)k.setCellFromCodePoint(_e.x++,0,0,K.fg,K.bg,K.extended)}else k.getWidth(_e.x-1)?k.addCodepointToCell(_e.x-1,J):k.addCodepointToCell(_e.x-2,J)}te-z>0&&(k.loadCell(_e.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),_e.x<ie&&te-z>0&&k.getWidth(_e.x)===0&&!k.hasContent(_e.x)&&k.setCellFromCodePoint(_e.x,0,1,K.fg,K.bg,K.extended),this._dirtyRowService.markDirty(_e.y)},L.prototype.addCsiHandler=function(N,z){var te=this;return N.final!=="t"||N.prefix||N.intermediates?this._parser.addCsiHandler(N,z):this._parser.addCsiHandler(N,function(J){return!E(J.params[0],te._optionsService.options.windowOptions)||z(J)})},L.prototype.addDcsHandler=function(N,z){return this._parser.addDcsHandler(N,new O.DcsHandler(z))},L.prototype.addEscHandler=function(N,z){return this._parser.addEscHandler(N,z)},L.prototype.addOscHandler=function(N,z){return this._parser.addOscHandler(N,new S.OscHandler(z))},L.prototype.bell=function(){this._onRequestBell.fire()},L.prototype.lineFeed=function(){var N=this._bufferService.buffer;this._dirtyRowService.markDirty(N.y),this._optionsService.options.convertEol&&(N.x=0),N.y++,N.y===N.scrollBottom+1?(N.y--,this._onRequestScroll.fire(this._eraseAttrData())):N.y>=this._bufferService.rows&&(N.y=this._bufferService.rows-1),N.x>=this._bufferService.cols&&N.x--,this._dirtyRowService.markDirty(N.y),this._onLineFeed.fire()},L.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},L.prototype.backspace=function(){var N,z=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(z.x>0&&z.x--);if(this._restrictCursor(this._bufferService.cols),z.x>0)z.x--;else if(z.x===0&&z.y>z.scrollTop&&z.y<=z.scrollBottom&&(!((N=z.lines.get(z.ybase+z.y))===null||N===void 0)&&N.isWrapped)){z.lines.get(z.ybase+z.y).isWrapped=!1,z.y--,z.x=this._bufferService.cols-1;var te=z.lines.get(z.ybase+z.y);te.hasWidth(z.x)&&!te.hasContent(z.x)&&z.x--}this._restrictCursor()},L.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var N=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-N)}},L.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},L.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},L.prototype._restrictCursor=function(N){N===void 0&&(N=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(N,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},L.prototype._setCursor=function(N,z){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=N,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+z):(this._bufferService.buffer.x=N,this._bufferService.buffer.y=z),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},L.prototype._moveCursor=function(N,z){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+N,this._bufferService.buffer.y+z)},L.prototype.cursorUp=function(N){var z=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;z>=0?this._moveCursor(0,-Math.min(z,N.params[0]||1)):this._moveCursor(0,-(N.params[0]||1))},L.prototype.cursorDown=function(N){var z=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;z>=0?this._moveCursor(0,Math.min(z,N.params[0]||1)):this._moveCursor(0,N.params[0]||1)},L.prototype.cursorForward=function(N){this._moveCursor(N.params[0]||1,0)},L.prototype.cursorBackward=function(N){this._moveCursor(-(N.params[0]||1),0)},L.prototype.cursorNextLine=function(N){this.cursorDown(N),this._bufferService.buffer.x=0},L.prototype.cursorPrecedingLine=function(N){this.cursorUp(N),this._bufferService.buffer.x=0},L.prototype.cursorCharAbsolute=function(N){this._setCursor((N.params[0]||1)-1,this._bufferService.buffer.y)},L.prototype.cursorPosition=function(N){this._setCursor(N.length>=2?(N.params[1]||1)-1:0,(N.params[0]||1)-1)},L.prototype.charPosAbsolute=function(N){this._setCursor((N.params[0]||1)-1,this._bufferService.buffer.y)},L.prototype.hPositionRelative=function(N){this._moveCursor(N.params[0]||1,0)},L.prototype.linePosAbsolute=function(N){this._setCursor(this._bufferService.buffer.x,(N.params[0]||1)-1)},L.prototype.vPositionRelative=function(N){this._moveCursor(0,N.params[0]||1)},L.prototype.hVPosition=function(N){this.cursorPosition(N)},L.prototype.tabClear=function(N){var z=N.params[0];z===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:z===3&&(this._bufferService.buffer.tabs={})},L.prototype.cursorForwardTab=function(N){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var z=N.params[0]||1;z--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},L.prototype.cursorBackwardTab=function(N){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var z=N.params[0]||1,te=this._bufferService.buffer;z--;)te.x=te.prevStop()},L.prototype._eraseInBufferLine=function(N,z,te,J){J===void 0&&(J=!1);var ge=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+N);ge.replaceCells(z,te,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),J&&(ge.isWrapped=!1)},L.prototype._resetBufferLine=function(N){var z=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+N);z.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),z.isWrapped=!1},L.prototype.eraseInDisplay=function(N){var z;switch(this._restrictCursor(),N.params[0]){case 0:for(z=this._bufferService.buffer.y,this._dirtyRowService.markDirty(z),this._eraseInBufferLine(z++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);z<this._bufferService.rows;z++)this._resetBufferLine(z);this._dirtyRowService.markDirty(z);break;case 1:for(z=this._bufferService.buffer.y,this._dirtyRowService.markDirty(z),this._eraseInBufferLine(z,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(z+1).isWrapped=!1);z--;)this._resetBufferLine(z);this._dirtyRowService.markDirty(0);break;case 2:for(z=this._bufferService.rows,this._dirtyRowService.markDirty(z-1);z--;)this._resetBufferLine(z);this._dirtyRowService.markDirty(0);break;case 3:var te=this._bufferService.buffer.lines.length-this._bufferService.rows;te>0&&(this._bufferService.buffer.lines.trimStart(te),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-te,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-te,0),this._onScroll.fire(0))}},L.prototype.eraseInLine=function(N){switch(this._restrictCursor(),N.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},L.prototype.insertLines=function(N){this._restrictCursor();var z=N.params[0]||1,te=this._bufferService.buffer;if(!(te.y>te.scrollBottom||te.y<te.scrollTop)){for(var J=te.ybase+te.y,ge=this._bufferService.rows-1-te.scrollBottom,_e=this._bufferService.rows-1+te.ybase-ge+1;z--;)te.lines.splice(_e-1,1),te.lines.splice(J,0,te.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(te.y,te.scrollBottom),te.x=0}},L.prototype.deleteLines=function(N){this._restrictCursor();var z=N.params[0]||1,te=this._bufferService.buffer;if(!(te.y>te.scrollBottom||te.y<te.scrollTop)){var J,ge=te.ybase+te.y;for(J=this._bufferService.rows-1-te.scrollBottom,J=this._bufferService.rows-1+te.ybase-J;z--;)te.lines.splice(ge,1),te.lines.splice(J,0,te.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(te.y,te.scrollBottom),te.x=0}},L.prototype.insertChars=function(N){this._restrictCursor();var z=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);z&&(z.insertCells(this._bufferService.buffer.x,N.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},L.prototype.deleteChars=function(N){this._restrictCursor();var z=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);z&&(z.deleteCells(this._bufferService.buffer.x,N.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},L.prototype.scrollUp=function(N){for(var z=N.params[0]||1,te=this._bufferService.buffer;z--;)te.lines.splice(te.ybase+te.scrollTop,1),te.lines.splice(te.ybase+te.scrollBottom,0,te.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(te.scrollTop,te.scrollBottom)},L.prototype.scrollDown=function(N){for(var z=N.params[0]||1,te=this._bufferService.buffer;z--;)te.lines.splice(te.ybase+te.scrollBottom,1),te.lines.splice(te.ybase+te.scrollTop,0,te.getBlankLine(f.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(te.scrollTop,te.scrollBottom)},L.prototype.scrollLeft=function(N){var z=this._bufferService.buffer;if(!(z.y>z.scrollBottom||z.y<z.scrollTop)){for(var te=N.params[0]||1,J=z.scrollTop;J<=z.scrollBottom;++J){var ge=z.lines.get(z.ybase+J);ge.deleteCells(0,te,z.getNullCell(this._eraseAttrData()),this._eraseAttrData()),ge.isWrapped=!1}this._dirtyRowService.markRangeDirty(z.scrollTop,z.scrollBottom)}},L.prototype.scrollRight=function(N){var z=this._bufferService.buffer;if(!(z.y>z.scrollBottom||z.y<z.scrollTop)){for(var te=N.params[0]||1,J=z.scrollTop;J<=z.scrollBottom;++J){var ge=z.lines.get(z.ybase+J);ge.insertCells(0,te,z.getNullCell(this._eraseAttrData()),this._eraseAttrData()),ge.isWrapped=!1}this._dirtyRowService.markRangeDirty(z.scrollTop,z.scrollBottom)}},L.prototype.insertColumns=function(N){var z=this._bufferService.buffer;if(!(z.y>z.scrollBottom||z.y<z.scrollTop)){for(var te=N.params[0]||1,J=z.scrollTop;J<=z.scrollBottom;++J){var ge=this._bufferService.buffer.lines.get(z.ybase+J);ge.insertCells(z.x,te,z.getNullCell(this._eraseAttrData()),this._eraseAttrData()),ge.isWrapped=!1}this._dirtyRowService.markRangeDirty(z.scrollTop,z.scrollBottom)}},L.prototype.deleteColumns=function(N){var z=this._bufferService.buffer;if(!(z.y>z.scrollBottom||z.y<z.scrollTop)){for(var te=N.params[0]||1,J=z.scrollTop;J<=z.scrollBottom;++J){var ge=z.lines.get(z.ybase+J);ge.deleteCells(z.x,te,z.getNullCell(this._eraseAttrData()),this._eraseAttrData()),ge.isWrapped=!1}this._dirtyRowService.markRangeDirty(z.scrollTop,z.scrollBottom)}},L.prototype.eraseChars=function(N){this._restrictCursor();var z=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);z&&(z.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(N.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},L.prototype.repeatPrecedingCharacter=function(N){if(this._parser.precedingCodepoint){for(var z=N.params[0]||1,te=new Uint32Array(z),J=0;J<z;++J)te[J]=this._parser.precedingCodepoint;this.print(te,0,te.length)}},L.prototype.sendDeviceAttributesPrimary=function(N){N.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(F.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(F.C0.ESC+"[?6c"))},L.prototype.sendDeviceAttributesSecondary=function(N){N.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(F.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(F.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(N.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(F.C0.ESC+"[>83;40003;0c"))},L.prototype._is=function(N){return(this._optionsService.options.termName+"").indexOf(N)===0},L.prototype.setMode=function(N){for(var z=0;z<N.length;z++)switch(N.params[z]){case 4:this._coreService.modes.insertMode=!0}},L.prototype.setModePrivate=function(N){for(var z=0;z<N.length;z++)switch(N.params[z]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,R.DEFAULT_CHARSET),this._charsetService.setgCharset(1,R.DEFAULT_CHARSET),this._charsetService.setgCharset(2,R.DEFAULT_CHARSET),this._charsetService.setgCharset(3,R.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0;break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}},L.prototype.resetMode=function(N){for(var z=0;z<N.length;z++)switch(N.params[z]){case 4:this._coreService.modes.insertMode=!1}},L.prototype.resetModePrivate=function(N){for(var z=0;z<N.length;z++)switch(N.params[z]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),N.params[z]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},L.prototype._updateAttrColor=function(N,z,te,J,ge){return z===2?(N|=50331648,N&=-16777216,N|=u.AttributeData.fromColorRGB([te,J,ge])):z===5&&(N&=-50331904,N|=33554432|255&te),N},L.prototype._extractColor=function(N,z,te){var J=[0,0,-1,0,0,0],ge=0,_e=0;do{if(J[_e+ge]=N.params[z+_e],N.hasSubParams(z+_e)){var se=N.getSubParams(z+_e),Y=0;do J[1]===5&&(ge=1),J[_e+Y+1+ge]=se[Y];while(++Y<se.length&&Y+_e+1+ge<J.length);break}if(J[1]===5&&_e+ge>=2||J[1]===2&&_e+ge>=5)break;J[1]&&(ge=1)}while(++_e+z<N.length&&_e+ge<J.length);for(Y=2;Y<J.length;++Y)J[Y]===-1&&(J[Y]=0);switch(J[0]){case 38:te.fg=this._updateAttrColor(te.fg,J[1],J[3],J[4],J[5]);break;case 48:te.bg=this._updateAttrColor(te.bg,J[1],J[3],J[4],J[5]);break;case 58:te.extended=te.extended.clone(),te.extended.underlineColor=this._updateAttrColor(te.extended.underlineColor,J[1],J[3],J[4],J[5])}return _e},L.prototype._processUnderline=function(N,z){z.extended=z.extended.clone(),(!~N||N>5)&&(N=1),z.extended.underlineStyle=N,z.fg|=268435456,N===0&&(z.fg&=-268435457),z.updateExtended()},L.prototype.charAttributes=function(N){if(N.length===1&&N.params[0]===0)return this._curAttrData.fg=f.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=f.DEFAULT_ATTR_DATA.bg);for(var z,te=N.length,J=this._curAttrData,ge=0;ge<te;ge++)(z=N.params[ge])>=30&&z<=37?(J.fg&=-50331904,J.fg|=16777216|z-30):z>=40&&z<=47?(J.bg&=-50331904,J.bg|=16777216|z-40):z>=90&&z<=97?(J.fg&=-50331904,J.fg|=16777224|z-90):z>=100&&z<=107?(J.bg&=-50331904,J.bg|=16777224|z-100):z===0?(J.fg=f.DEFAULT_ATTR_DATA.fg,J.bg=f.DEFAULT_ATTR_DATA.bg):z===1?J.fg|=134217728:z===3?J.bg|=67108864:z===4?(J.fg|=268435456,this._processUnderline(N.hasSubParams(ge)?N.getSubParams(ge)[0]:1,J)):z===5?J.fg|=536870912:z===7?J.fg|=67108864:z===8?J.fg|=1073741824:z===2?J.bg|=134217728:z===21?this._processUnderline(2,J):z===22?(J.fg&=-134217729,J.bg&=-134217729):z===23?J.bg&=-67108865:z===24?J.fg&=-268435457:z===25?J.fg&=-536870913:z===27?J.fg&=-67108865:z===28?J.fg&=-1073741825:z===39?(J.fg&=-67108864,J.fg|=16777215&f.DEFAULT_ATTR_DATA.fg):z===49?(J.bg&=-67108864,J.bg|=16777215&f.DEFAULT_ATTR_DATA.bg):z===38||z===48||z===58?ge+=this._extractColor(N,ge,J):z===59?(J.extended=J.extended.clone(),J.extended.underlineColor=-1,J.updateExtended()):z===100?(J.fg&=-67108864,J.fg|=16777215&f.DEFAULT_ATTR_DATA.fg,J.bg&=-67108864,J.bg|=16777215&f.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",z)},L.prototype.deviceStatus=function(N){switch(N.params[0]){case 5:this._coreService.triggerDataEvent(F.C0.ESC+"[0n");break;case 6:var z=this._bufferService.buffer.y+1,te=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(F.C0.ESC+"["+z+";"+te+"R")}},L.prototype.deviceStatusPrivate=function(N){switch(N.params[0]){case 6:var z=this._bufferService.buffer.y+1,te=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(F.C0.ESC+"[?"+z+";"+te+"R")}},L.prototype.softReset=function(N){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=f.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},L.prototype.setCursorStyle=function(N){var z=N.params[0]||1;switch(z){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var te=z%2==1;this._optionsService.options.cursorBlink=te},L.prototype.setScrollRegion=function(N){var z,te=N.params[0]||1;(N.length<2||(z=N.params[1])>this._bufferService.rows||z===0)&&(z=this._bufferService.rows),z>te&&(this._bufferService.buffer.scrollTop=te-1,this._bufferService.buffer.scrollBottom=z-1,this._setCursor(0,0))},L.prototype.windowOptions=function(N){if(E(N.params[0],this._optionsService.options.windowOptions)){var z=N.length>1?N.params[1]:0;switch(N.params[0]){case 14:z!==2&&this._onRequestWindowsOptionsReport.fire(P.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(P.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(F.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:z!==0&&z!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),z!==0&&z!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:z!==0&&z!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),z!==0&&z!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},L.prototype.saveCursor=function(N){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},L.prototype.restoreCursor=function(N){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},L.prototype.setTitle=function(N){this._windowTitle=N,this._onTitleChange.fire(N)},L.prototype.setIconName=function(N){this._iconName=N},L.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},L.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},L.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},L.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,R.DEFAULT_CHARSET)},L.prototype.selectCharset=function(N){N.length===2?N[0]!=="/"&&this._charsetService.setgCharset(T[N[0]],R.CHARSETS[N[1]]||R.DEFAULT_CHARSET):this.selectDefaultCharset()},L.prototype.index=function(){this._restrictCursor();var N=this._bufferService.buffer;this._bufferService.buffer.y++,N.y===N.scrollBottom+1?(N.y--,this._onRequestScroll.fire(this._eraseAttrData())):N.y>=this._bufferService.rows&&(N.y=this._bufferService.rows-1),this._restrictCursor()},L.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},L.prototype.reverseIndex=function(){this._restrictCursor();var N=this._bufferService.buffer;if(N.y===N.scrollTop){var z=N.scrollBottom-N.scrollTop;N.lines.shiftElements(N.ybase+N.y,z,1),N.lines.set(N.ybase+N.y,N.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(N.scrollTop,N.scrollBottom)}else N.y--,this._restrictCursor()},L.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},L.prototype.reset=function(){this._curAttrData=f.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=f.DEFAULT_ATTR_DATA.clone()},L.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},L.prototype.setgLevel=function(N){this._charsetService.setgLevel(N)},L.prototype.screenAlignmentPattern=function(){var N=new o.CellData;N.content=1<<22|69,N.fg=this._curAttrData.fg,N.bg=this._curAttrData.bg;var z=this._bufferService.buffer;this._setCursor(0,0);for(var te=0;te<this._bufferService.rows;++te){var J=z.ybase+z.y+te,ge=z.lines.get(J);ge&&(ge.fill(N),ge.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},L}(y.Disposable);_.InputHandler=j},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.DEFAULT_CHARSET=_.CHARSETS=void 0,_.CHARSETS={},_.DEFAULT_CHARSET=_.CHARSETS.B,_.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},_.CHARSETS.A={"#":"\xA3"},_.CHARSETS.B=void 0,_.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},_.CHARSETS.C=_.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},_.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},_.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},_.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},_.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},_.CHARSETS.E=_.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},_.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},_.CHARSETS.H=_.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},_.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.Params=void 0;var I=function(){function V(P,F){if(P===void 0&&(P=32),F===void 0&&(F=32),this.maxLength=P,this.maxSubParamsLength=F,F>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(P),this.length=0,this._subParams=new Int32Array(F),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(P),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return V.fromArray=function(P){var F=new V;if(!P.length)return F;for(var R=P[0]instanceof Array?1:0;R<P.length;++R){var B=P[R];if(B instanceof Array)for(var y=0;y<B.length;++y)F.addSubParam(B[y]);else F.addParam(B)}return F},V.prototype.clone=function(){var P=new V(this.maxLength,this.maxSubParamsLength);return P.params.set(this.params),P.length=this.length,P._subParams.set(this._subParams),P._subParamsLength=this._subParamsLength,P._subParamsIdx.set(this._subParamsIdx),P._rejectDigits=this._rejectDigits,P._rejectSubDigits=this._rejectSubDigits,P._digitIsSub=this._digitIsSub,P},V.prototype.toArray=function(){for(var P=[],F=0;F<this.length;++F){P.push(this.params[F]);var R=this._subParamsIdx[F]>>8,B=255&this._subParamsIdx[F];B-R>0&&P.push(Array.prototype.slice.call(this._subParams,R,B))}return P},V.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},V.prototype.addParam=function(P){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(P<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=P>2147483647?2147483647:P}},V.prototype.addSubParam=function(P){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(P<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=P>2147483647?2147483647:P,this._subParamsIdx[this.length-1]++}},V.prototype.hasSubParams=function(P){return(255&this._subParamsIdx[P])-(this._subParamsIdx[P]>>8)>0},V.prototype.getSubParams=function(P){var F=this._subParamsIdx[P]>>8,R=255&this._subParamsIdx[P];return R-F>0?this._subParams.subarray(F,R):null},V.prototype.getSubParamsAll=function(){for(var P={},F=0;F<this.length;++F){var R=this._subParamsIdx[F]>>8,B=255&this._subParamsIdx[F];B-R>0&&(P[F]=this._subParams.slice(R,B))}return P},V.prototype.addDigit=function(P){var F;if(!(this._rejectDigits||!(F=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var R=this._digitIsSub?this._subParams:this.params,B=R[F-1];R[F-1]=~B?Math.min(10*B+P,2147483647):P}},V}();_.Params=I},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.OscHandler=_.OscParser=void 0;var I=H(23),V=H(8),P=function(){function R(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return R.prototype.addHandler=function(B,y){this._handlers[B]===void 0&&(this._handlers[B]=[]);var i=this._handlers[B];return i.push(y),{dispose:function(){var v=i.indexOf(y);v!==-1&&i.splice(v,1)}}},R.prototype.setHandler=function(B,y){this._handlers[B]=[y]},R.prototype.clearHandler=function(B){this._handlers[B]&&delete this._handlers[B]},R.prototype.setHandlerFallback=function(B){this._handlerFb=B},R.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},R.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},R.prototype._start=function(){var B=this._handlers[this._id];if(B)for(var y=B.length-1;y>=0;y--)B[y].start();else this._handlerFb(this._id,"START")},R.prototype._put=function(B,y,i){var v=this._handlers[this._id];if(v)for(var f=v.length-1;f>=0;f--)v[f].put(B,y,i);else this._handlerFb(this._id,"PUT",V.utf32ToString(B,y,i))},R.prototype._end=function(B){var y=this._handlers[this._id];if(y){for(var i=y.length-1;i>=0&&y[i].end(B)===!1;i--);for(i--;i>=0;i--)y[i].end(!1)}else this._handlerFb(this._id,"END",B)},R.prototype.start=function(){this.reset(),this._id=-1,this._state=1},R.prototype.put=function(B,y,i){if(this._state!==3){if(this._state===1)for(;y<i;){var v=B[y++];if(v===59){this._state=2,this._start();break}if(v<48||57<v)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+v-48}this._state===2&&i-y>0&&this._put(B,y,i)}},R.prototype.end=function(B){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(B)),this._id=-1,this._state=0)},R}();_.OscParser=P;var F=function(){function R(B){this._handler=B,this._data="",this._hitLimit=!1}return R.prototype.start=function(){this._data="",this._hitLimit=!1},R.prototype.put=function(B,y,i){this._hitLimit||(this._data+=V.utf32ToString(B,y,i),this._data.length>I.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},R.prototype.end=function(B){var y;return this._hitLimit?y=!1:B&&(y=this._handler(this._data)),this._data="",this._hitLimit=!1,y},R}();_.OscHandler=F},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.PAYLOAD_LIMIT=void 0,_.PAYLOAD_LIMIT=1e7},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.DcsHandler=_.DcsParser=void 0;var I=H(8),V=H(21),P=H(23),F=[],R=function(){function y(){this._handlers=Object.create(null),this._active=F,this._ident=0,this._handlerFb=function(){}}return y.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},y.prototype.addHandler=function(i,v){this._handlers[i]===void 0&&(this._handlers[i]=[]);var f=this._handlers[i];return f.push(v),{dispose:function(){var h=f.indexOf(v);h!==-1&&f.splice(h,1)}}},y.prototype.setHandler=function(i,v){this._handlers[i]=[v]},y.prototype.clearHandler=function(i){this._handlers[i]&&delete this._handlers[i]},y.prototype.setHandlerFallback=function(i){this._handlerFb=i},y.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=F,this._ident=0},y.prototype.hook=function(i,v){if(this.reset(),this._ident=i,this._active=this._handlers[i]||F,this._active.length)for(var f=this._active.length-1;f>=0;f--)this._active[f].hook(v);else this._handlerFb(this._ident,"HOOK",v)},y.prototype.put=function(i,v,f){if(this._active.length)for(var h=this._active.length-1;h>=0;h--)this._active[h].put(i,v,f);else this._handlerFb(this._ident,"PUT",I.utf32ToString(i,v,f))},y.prototype.unhook=function(i){if(this._active.length){for(var v=this._active.length-1;v>=0&&this._active[v].unhook(i)===!1;v--);for(v--;v>=0;v--)this._active[v].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",i);this._active=F,this._ident=0},y}();_.DcsParser=R;var B=function(){function y(i){this._handler=i,this._data="",this._hitLimit=!1}return y.prototype.hook=function(i){this._params=i.clone(),this._data="",this._hitLimit=!1},y.prototype.put=function(i,v,f){this._hitLimit||(this._data+=I.utf32ToString(i,v,f),this._data.length>P.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},y.prototype.unhook=function(i){var v;return this._hitLimit?v=!1:i&&(v=this._handler(this._data,this._params||new V.Params)),this._params=void 0,this._data="",this._hitLimit=!1,v},y}();_.DcsHandler=B},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.removeTerminalFromCache=_.acquireCharAtlas=void 0;var I=H(26),V=H(43),P=[];_.acquireCharAtlas=function(F,R,B,y,i){for(var v=I.generateConfig(y,i,F,B),f=0;f<P.length;f++){var h=(n=P[f]).ownedBy.indexOf(R);if(h>=0){if(I.configEquals(n.config,v))return n.atlas;n.ownedBy.length===1?(n.atlas.dispose(),P.splice(f,1)):n.ownedBy.splice(h,1);break}}for(f=0;f<P.length;f++){var n=P[f];if(I.configEquals(n.config,v))return n.ownedBy.push(R),n.atlas}var o={atlas:new V.DynamicCharAtlas(document,v),config:v,ownedBy:[R]};return P.push(o),o.atlas},_.removeTerminalFromCache=function(F){for(var R=0;R<P.length;R++){var B=P[R].ownedBy.indexOf(F);if(B!==-1){P[R].ownedBy.length===1?(P[R].atlas.dispose(),P.splice(R,1)):P[R].ownedBy.splice(B,1);break}}}},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.is256Color=_.configEquals=_.generateConfig=void 0;var I=H(3);_.generateConfig=function(V,P,F,R){var B={foreground:R.foreground,background:R.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:R.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:V,scaledCharHeight:P,fontFamily:F.fontFamily,fontSize:F.fontSize,fontWeight:F.fontWeight,fontWeightBold:F.fontWeightBold,allowTransparency:F.allowTransparency,colors:B}},_.configEquals=function(V,P){for(var F=0;F<V.colors.ansi.length;F++)if(V.colors.ansi[F].rgba!==P.colors.ansi[F].rgba)return!1;return V.devicePixelRatio===P.devicePixelRatio&&V.fontFamily===P.fontFamily&&V.fontSize===P.fontSize&&V.fontWeight===P.fontWeight&&V.fontWeightBold===P.fontWeightBold&&V.allowTransparency===P.allowTransparency&&V.scaledCharWidth===P.scaledCharWidth&&V.scaledCharHeight===P.scaledCharHeight&&V.colors.foreground===P.colors.foreground&&V.colors.background===P.colors.background},_.is256Color=function(V){return V<I.DEFAULT_COLOR}},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.ColorManager=_.DEFAULT_ANSI_COLORS=void 0;var I=H(10),V=H(45),P=I.css.toColor("#ffffff"),F=I.css.toColor("#000000"),R=I.css.toColor("#ffffff"),B=I.css.toColor("#000000"),y={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};_.DEFAULT_ANSI_COLORS=function(){for(var v=[I.css.toColor("#2e3436"),I.css.toColor("#cc0000"),I.css.toColor("#4e9a06"),I.css.toColor("#c4a000"),I.css.toColor("#3465a4"),I.css.toColor("#75507b"),I.css.toColor("#06989a"),I.css.toColor("#d3d7cf"),I.css.toColor("#555753"),I.css.toColor("#ef2929"),I.css.toColor("#8ae234"),I.css.toColor("#fce94f"),I.css.toColor("#729fcf"),I.css.toColor("#ad7fa8"),I.css.toColor("#34e2e2"),I.css.toColor("#eeeeec")],f=[0,95,135,175,215,255],h=0;h<216;h++){var n=f[h/36%6|0],o=f[h/6%6|0],u=f[h%6];v.push({css:I.channels.toCss(n,o,u),rgba:I.channels.toRgba(n,o,u)})}for(h=0;h<24;h++){var S=8+10*h;v.push({css:I.channels.toCss(S,S,S),rgba:I.channels.toRgba(S,S,S)})}return v}();var i=function(){function v(f,h){this.allowTransparency=h;var n=f.createElement("canvas");n.width=1,n.height=1;var o=n.getContext("2d");if(!o)throw new Error("Could not get rendering context");this._ctx=o,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new V.ColorContrastCache,this.colors={foreground:P,background:F,cursor:R,cursorAccent:B,selectionTransparent:y,selectionOpaque:I.color.blend(F,y),ansi:_.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return v.prototype.onOptionsChange=function(f){f==="minimumContrastRatio"&&this._contrastCache.clear()},v.prototype.setTheme=function(f){f===void 0&&(f={}),this.colors.foreground=this._parseColor(f.foreground,P),this.colors.background=this._parseColor(f.background,F),this.colors.cursor=this._parseColor(f.cursor,R,!0),this.colors.cursorAccent=this._parseColor(f.cursorAccent,B,!0),this.colors.selectionTransparent=this._parseColor(f.selection,y,!0),this.colors.selectionOpaque=I.color.blend(this.colors.background,this.colors.selectionTransparent),I.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=I.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(f.black,_.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(f.red,_.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(f.green,_.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(f.yellow,_.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(f.blue,_.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(f.magenta,_.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(f.cyan,_.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(f.white,_.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(f.brightBlack,_.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(f.brightRed,_.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(f.brightGreen,_.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(f.brightYellow,_.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(f.brightBlue,_.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(f.brightMagenta,_.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(f.brightCyan,_.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(f.brightWhite,_.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},v.prototype._parseColor=function(f,h,n){if(n===void 0&&(n=this.allowTransparency),f===void 0)return h;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=f,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+f+" is invalid using fallback "+h.css),h;this._ctx.fillRect(0,0,1,1);var o=this._ctx.getImageData(0,0,1,1).data;if(o[3]!==255){if(!n)return console.warn("Color: "+f+" is using transparency, but allowTransparency is false. Using fallback "+h.css+"."),h;var u=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(j){return Number(j)}),S=u[0],O=u[1],T=u[2],E=u[3],C=Math.round(255*E);return{rgba:I.channels.toRgba(S,O,T,C),css:f}}return{css:this._ctx.fillStyle,rgba:I.channels.toRgba(o[0],o[1],o[2],o[3])}},v}();_.ColorManager=i},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.throwIfFalsy=void 0,_.throwIfFalsy=function(I){if(!I)throw new Error("value must not be falsy");return I}},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(i,v){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var n in h)h.hasOwnProperty(n)&&(f[n]=h[n])})(i,v)},function(i,v){function f(){this.constructor=i}I(i,v),i.prototype=v===null?Object.create(v):(f.prototype=v.prototype,new f)});Object.defineProperty(_,"__esModule",{value:!0}),_.CharacterJoinerRegistry=_.JoinedCellData=void 0;var P=H(6),F=H(3),R=H(4),B=function(i){function v(f,h,n){var o=i.call(this)||this;return o.content=0,o.combinedData="",o.fg=f.fg,o.bg=f.bg,o.combinedData=h,o._width=n,o}return V(v,i),v.prototype.isCombined=function(){return 2097152},v.prototype.getWidth=function(){return this._width},v.prototype.getChars=function(){return this.combinedData},v.prototype.getCode=function(){return 2097151},v.prototype.setFromCharData=function(f){throw new Error("not implemented")},v.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},v}(P.AttributeData);_.JoinedCellData=B;var y=function(){function i(v){this._bufferService=v,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new R.CellData}return i.prototype.registerCharacterJoiner=function(v){var f={id:this._nextCharacterJoinerId++,handler:v};return this._characterJoiners.push(f),f.id},i.prototype.deregisterCharacterJoiner=function(v){for(var f=0;f<this._characterJoiners.length;f++)if(this._characterJoiners[f].id===v)return this._characterJoiners.splice(f,1),!0;return!1},i.prototype.getJoinedCharacters=function(v){if(this._characterJoiners.length===0)return[];var f=this._bufferService.buffer.lines.get(v);if(!f||f.length===0)return[];for(var h=[],n=f.translateToString(!0),o=0,u=0,S=0,O=f.getFg(0),T=f.getBg(0),E=0;E<f.getTrimmedLength();E++)if(f.loadCell(E,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==O||this._workCell.bg!==T){if(E-o>1)for(var C=this._getJoinedRanges(n,S,u,f,o),j=0;j<C.length;j++)h.push(C[j]);o=E,S=u,O=this._workCell.fg,T=this._workCell.bg}u+=this._workCell.getChars().length||F.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-o>1)for(C=this._getJoinedRanges(n,S,u,f,o),j=0;j<C.length;j++)h.push(C[j]);return h},i.prototype._getJoinedRanges=function(v,f,h,n,o){for(var u=v.substring(f,h),S=this._characterJoiners[0].handler(u),O=1;O<this._characterJoiners.length;O++)for(var T=this._characterJoiners[O].handler(u),E=0;E<T.length;E++)i._mergeRanges(S,T[E]);return this._stringRangesToCellRanges(S,n,o),S},i.prototype._stringRangesToCellRanges=function(v,f,h){var n=0,o=!1,u=0,S=v[n];if(S){for(var O=h;O<this._bufferService.cols;O++){var T=f.getWidth(O),E=f.getString(O).length||F.WHITESPACE_CELL_CHAR.length;if(T!==0){if(!o&&S[0]<=u&&(S[0]=O,o=!0),S[1]<=u){if(S[1]=O,!(S=v[++n]))break;S[0]<=u?(S[0]=O,o=!0):o=!1}u+=E}}S&&(S[1]=this._bufferService.cols)}},i._mergeRanges=function(v,f){for(var h=!1,n=0;n<v.length;n++){var o=v[n];if(h){if(f[1]<=o[0])return v[n-1][1]=f[1],v;if(f[1]<=o[1])return v[n-1][1]=Math.max(f[1],o[1]),v.splice(n,1),v;v.splice(n,1),n--}else{if(f[1]<=o[0])return v.splice(n,0,f),v;if(f[1]<=o[1])return o[0]=Math.min(f[0],o[0]),v;f[0]<o[1]&&(o[0]=Math.min(f[0],o[0]),h=!0)}}return h?v[v.length-1][1]=f[1]:v.push(f),v},i}();_.CharacterJoinerRegistry=y},function(Re,_,H){"use strict";function I(V,P){var F=P.getBoundingClientRect();return[V.clientX-F.left,V.clientY-F.top]}Object.defineProperty(_,"__esModule",{value:!0}),_.getRawByteCoords=_.getCoords=_.getCoordsRelativeToElement=void 0,_.getCoordsRelativeToElement=I,_.getCoords=function(V,P,F,R,B,y,i,v){if(B){var f=I(V,P);if(f)return f[0]=Math.ceil((f[0]+(v?y/2:0))/y),f[1]=Math.ceil(f[1]/i),f[0]=Math.min(Math.max(f[0],1),F+(v?1:0)),f[1]=Math.min(Math.max(f[1],1),R),f}},_.getRawByteCoords=function(V){if(V)return{x:V[0]+32,y:V[1]+32}}},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.RenderDebouncer=void 0;var I=function(){function V(P){this._renderCallback=P}return V.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},V.prototype.refresh=function(P,F,R){var B=this;this._rowCount=R,P=P!==void 0?P:0,F=F!==void 0?F:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,P):P,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,F):F,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return B._innerRefresh()}))},V.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var P=Math.max(this._rowStart,0),F=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(P,F)}},V}();_.RenderDebouncer=I},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(F,R){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(B,y){B.__proto__=y}||function(B,y){for(var i in y)y.hasOwnProperty(i)&&(B[i]=y[i])})(F,R)},function(F,R){function B(){this.constructor=F}I(F,R),F.prototype=R===null?Object.create(R):(B.prototype=R.prototype,new B)});Object.defineProperty(_,"__esModule",{value:!0}),_.ScreenDprMonitor=void 0;var P=function(F){function R(){var B=F!==null&&F.apply(this,arguments)||this;return B._currentDevicePixelRatio=window.devicePixelRatio,B}return V(R,F),R.prototype.setListener=function(B){var y=this;this._listener&&this.clearListener(),this._listener=B,this._outerListener=function(){y._listener&&(y._listener(window.devicePixelRatio,y._currentDevicePixelRatio),y._updateDpr())},this._updateDpr()},R.prototype.dispose=function(){F.prototype.dispose.call(this),this.clearListener()},R.prototype._updateDpr=function(){var B;this._outerListener&&((B=this._resolutionMediaMatchList)===null||B===void 0||B.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},R.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},R}(H(2).Disposable);_.ScreenDprMonitor=P},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.clone=void 0,_.clone=function I(V,P){if(P===void 0&&(P=5),typeof V!="object")return V;var F=Array.isArray(V)?[]:{};for(var R in V)F[R]=P<=1?V[R]:V[R]?I(V[R],P-1):V[R];return F}},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.Terminal=void 0;var I=H(4),V=H(35),P=H(18),F=H(0),R=H(83),B=function(){function n(o){this._core=new V.Terminal(o),this._addonManager=new R.AddonManager}return n.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(n.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new f(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"unicode",{get:function(){return this._checkProposedApi(),new h(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"buffer",{get:function(){return this._checkProposedApi(),new i(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),n.prototype.blur=function(){this._core.blur()},n.prototype.focus=function(){this._core.focus()},n.prototype.resize=function(o,u){this._verifyIntegers(o,u),this._core.resize(o,u)},n.prototype.open=function(o){this._core.open(o)},n.prototype.attachCustomKeyEventHandler=function(o){this._core.attachCustomKeyEventHandler(o)},n.prototype.registerLinkMatcher=function(o,u,S){return this._checkProposedApi(),this._core.registerLinkMatcher(o,u,S)},n.prototype.deregisterLinkMatcher=function(o){this._checkProposedApi(),this._core.deregisterLinkMatcher(o)},n.prototype.registerLinkProvider=function(o){return this._checkProposedApi(),this._core.registerLinkProvider(o)},n.prototype.registerCharacterJoiner=function(o){return this._checkProposedApi(),this._core.registerCharacterJoiner(o)},n.prototype.deregisterCharacterJoiner=function(o){this._checkProposedApi(),this._core.deregisterCharacterJoiner(o)},n.prototype.registerMarker=function(o){return this._checkProposedApi(),this._verifyIntegers(o),this._core.addMarker(o)},n.prototype.addMarker=function(o){return this.registerMarker(o)},n.prototype.hasSelection=function(){return this._core.hasSelection()},n.prototype.select=function(o,u,S){this._verifyIntegers(o,u,S),this._core.select(o,u,S)},n.prototype.getSelection=function(){return this._core.getSelection()},n.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},n.prototype.clearSelection=function(){this._core.clearSelection()},n.prototype.selectAll=function(){this._core.selectAll()},n.prototype.selectLines=function(o,u){this._verifyIntegers(o,u),this._core.selectLines(o,u)},n.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},n.prototype.scrollLines=function(o){this._verifyIntegers(o),this._core.scrollLines(o)},n.prototype.scrollPages=function(o){this._verifyIntegers(o),this._core.scrollPages(o)},n.prototype.scrollToTop=function(){this._core.scrollToTop()},n.prototype.scrollToBottom=function(){this._core.scrollToBottom()},n.prototype.scrollToLine=function(o){this._verifyIntegers(o),this._core.scrollToLine(o)},n.prototype.clear=function(){this._core.clear()},n.prototype.write=function(o,u){this._core.write(o,u)},n.prototype.writeUtf8=function(o,u){this._core.write(o,u)},n.prototype.writeln=function(o,u){this._core.write(o),this._core.write(`\r
`,u)},n.prototype.paste=function(o){this._core.paste(o)},n.prototype.getOption=function(o){return this._core.optionsService.getOption(o)},n.prototype.setOption=function(o,u){this._core.optionsService.setOption(o,u)},n.prototype.refresh=function(o,u){this._verifyIntegers(o,u),this._core.refresh(o,u)},n.prototype.reset=function(){this._core.reset()},n.prototype.loadAddon=function(o){return this._addonManager.loadAddon(this,o)},Object.defineProperty(n,"strings",{get:function(){return P},enumerable:!1,configurable:!0}),n.prototype._verifyIntegers=function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];for(var S=0,O=o;S<O.length;S++){var T=O[S];if(T===1/0||isNaN(T)||T%1!=0)throw new Error("This API only accepts integers")}},n}();_.Terminal=B;var y=function(){function n(o,u){this._buffer=o,this.type=u}return n.prototype.init=function(o){return this._buffer=o,this},Object.defineProperty(n.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),n.prototype.getLine=function(o){var u=this._buffer.lines.get(o);if(u)return new v(u)},n.prototype.getNullCell=function(){return new I.CellData},n}(),i=function(){function n(o){var u=this;this._buffers=o,this._onBufferChange=new F.EventEmitter,this._normal=new y(this._buffers.normal,"normal"),this._alternate=new y(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return u._onBufferChange.fire(u.active)})}return Object.defineProperty(n.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),n}(),v=function(){function n(o){this._line=o}return Object.defineProperty(n.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),n.prototype.getCell=function(o,u){if(!(o<0||o>=this._line.length))return u?(this._line.loadCell(o,u),u):this._line.loadCell(o,new I.CellData)},n.prototype.translateToString=function(o,u,S){return this._line.translateToString(o,u,S)},n}(),f=function(){function n(o){this._core=o}return n.prototype.registerCsiHandler=function(o,u){return this._core.addCsiHandler(o,function(S){return u(S.toArray())})},n.prototype.addCsiHandler=function(o,u){return this.registerCsiHandler(o,u)},n.prototype.registerDcsHandler=function(o,u){return this._core.addDcsHandler(o,function(S,O){return u(S,O.toArray())})},n.prototype.addDcsHandler=function(o,u){return this.registerDcsHandler(o,u)},n.prototype.registerEscHandler=function(o,u){return this._core.addEscHandler(o,u)},n.prototype.addEscHandler=function(o,u){return this.registerEscHandler(o,u)},n.prototype.registerOscHandler=function(o,u){return this._core.addOscHandler(o,u)},n.prototype.addOscHandler=function(o,u){return this.registerOscHandler(o,u)},n}(),h=function(){function n(o){this._core=o}return n.prototype.register=function(o){this._core.unicodeService.register(o)},Object.defineProperty(n.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(o){this._core.unicodeService.activeVersion=o},enumerable:!1,configurable:!0}),n}()},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(ie,U){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Z,K){Z.__proto__=K}||function(Z,K){for(var k in K)K.hasOwnProperty(k)&&(Z[k]=K[k])})(ie,U)},function(ie,U){function Z(){this.constructor=ie}I(ie,U),ie.prototype=U===null?Object.create(U):(Z.prototype=U.prototype,new Z)});Object.defineProperty(_,"__esModule",{value:!0}),_.Terminal=void 0;var P=H(36),F=H(37),R=H(38),B=H(12),y=H(19),i=H(40),v=H(50),f=H(51),h=H(11),n=H(7),o=H(18),u=H(54),S=H(55),O=H(56),T=H(57),E=H(59),C=H(0),j=H(16),x=H(27),L=H(60),N=H(5),z=H(61),te=H(62),J=H(63),ge=H(64),_e=H(65),se=typeof window!="undefined"?window.document:null,Y=function(ie){function U(Z){Z===void 0&&(Z={});var K=ie.call(this,Z)||this;return K.browser=h,K._keyDownHandled=!1,K._onCursorMove=new C.EventEmitter,K._onKey=new C.EventEmitter,K._onRender=new C.EventEmitter,K._onSelectionChange=new C.EventEmitter,K._onTitleChange=new C.EventEmitter,K._onFocus=new C.EventEmitter,K._onBlur=new C.EventEmitter,K._onA11yCharEmitter=new C.EventEmitter,K._onA11yTabEmitter=new C.EventEmitter,K._setup(),K.linkifier=K._instantiationService.createInstance(v.Linkifier),K.linkifier2=K.register(K._instantiationService.createInstance(J.Linkifier2)),K.register(K._inputHandler.onRequestBell(function(){return K.bell()})),K.register(K._inputHandler.onRequestRefreshRows(function(k,D){return K.refresh(k,D)})),K.register(K._inputHandler.onRequestReset(function(){return K.reset()})),K.register(K._inputHandler.onRequestScroll(function(k,D){return K.scroll(k,D||void 0)})),K.register(K._inputHandler.onRequestWindowsOptionsReport(function(k){return K._reportWindowsOptions(k)})),K.register(C.forwardEvent(K._inputHandler.onCursorMove,K._onCursorMove)),K.register(C.forwardEvent(K._inputHandler.onTitleChange,K._onTitleChange)),K.register(C.forwardEvent(K._inputHandler.onA11yChar,K._onA11yCharEmitter)),K.register(C.forwardEvent(K._inputHandler.onA11yTab,K._onA11yTabEmitter)),K.register(K._bufferService.onResize(function(k){return K._afterResize(k.cols,k.rows)})),K}return V(U,ie),Object.defineProperty(U.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),U.prototype.dispose=function(){var Z,K,k;this._isDisposed||(ie.prototype.dispose.call(this),(Z=this._renderService)===null||Z===void 0||Z.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(k=(K=this.element)===null||K===void 0?void 0:K.parentNode)===null||k===void 0||k.removeChild(this.element))},U.prototype._setup=function(){ie.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(U.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),U.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},U.prototype._updateOptions=function(Z){var K,k,D,re;switch(ie.prototype._updateOptions.call(this,Z),Z){case"fontFamily":case"fontSize":(K=this._renderService)===null||K===void 0||K.clear(),(k=this._charSizeService)===null||k===void 0||k.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(D=this.viewport)===null||D===void 0||D.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new O.AccessibilityManager(this,this._renderService)):((re=this._accessibilityManager)===null||re===void 0||re.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},U.prototype._onTextAreaFocus=function(Z){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(B.C0.ESC+"[I"),this.updateCursorStyle(Z),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},U.prototype.blur=function(){var Z;return(Z=this.textarea)===null||Z===void 0?void 0:Z.blur()},U.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(B.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},U.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var Z=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),K=this._bufferService.buffer.y*Z,k=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=k+"px",this.textarea.style.top=K+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=Z+"px",this.textarea.style.lineHeight=Z+"px",this.textarea.style.zIndex="-5"}},U.prototype._initGlobal=function(){var Z=this;this._bindKeys(),this.register(n.addDisposableDomListener(this.element,"copy",function(k){Z.hasSelection()&&R.copyHandler(k,Z._selectionService)}));var K=function(k){return R.handlePasteEvent(k,Z.textarea,Z._coreService)};this.register(n.addDisposableDomListener(this.textarea,"paste",K)),this.register(n.addDisposableDomListener(this.element,"paste",K)),h.isFirefox?this.register(n.addDisposableDomListener(this.element,"mousedown",function(k){k.button===2&&R.rightClickHandler(k,Z.textarea,Z.screenElement,Z._selectionService,Z.options.rightClickSelectsWord)})):this.register(n.addDisposableDomListener(this.element,"contextmenu",function(k){R.rightClickHandler(k,Z.textarea,Z.screenElement,Z._selectionService,Z.options.rightClickSelectsWord)})),h.isLinux&&this.register(n.addDisposableDomListener(this.element,"auxclick",function(k){k.button===1&&R.moveTextAreaUnderMouseCursor(k,Z.textarea,Z.screenElement)}))},U.prototype._bindKeys=function(){var Z=this;this.register(n.addDisposableDomListener(this.textarea,"keyup",function(K){return Z._keyUp(K)},!0)),this.register(n.addDisposableDomListener(this.textarea,"keydown",function(K){return Z._keyDown(K)},!0)),this.register(n.addDisposableDomListener(this.textarea,"keypress",function(K){return Z._keyPress(K)},!0)),this.register(n.addDisposableDomListener(this.textarea,"compositionstart",function(){return Z._compositionHelper.compositionstart()})),this.register(n.addDisposableDomListener(this.textarea,"compositionupdate",function(K){return Z._compositionHelper.compositionupdate(K)})),this.register(n.addDisposableDomListener(this.textarea,"compositionend",function(){return Z._compositionHelper.compositionend()})),this.register(this.onRender(function(){return Z._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(K){return Z._queueLinkification(K.start,K.end)}))},U.prototype.open=function(Z){var K=this;if(!Z)throw new Error("Terminal requires a parent element.");se.body.contains(Z)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=Z.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),Z.appendChild(this.element);var k=se.createDocumentFragment();this._viewportElement=se.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),k.appendChild(this._viewportElement),this._viewportScrollArea=se.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=se.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=se.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),k.appendChild(this.screenElement),this.textarea=se.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",o.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(n.addDisposableDomListener(this.textarea,"focus",function(pe){return K._onTextAreaFocus(pe)})),this.register(n.addDisposableDomListener(this.textarea,"blur",function(){return K._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var D=this._instantiationService.createInstance(ge.CoreBrowserService,this.textarea);this._instantiationService.setService(N.ICoreBrowserService,D),this._charSizeService=this._instantiationService.createInstance(z.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(N.ICharSizeService,this._charSizeService),this._compositionView=se.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(P.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(k),this._theme=this.options.theme||this._theme,this._colorManager=new x.ColorManager(se,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(pe){return K._colorManager.onOptionsChange(pe)})),this._colorManager.setTheme(this._theme);var re=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(L.RenderService,re,this.rows,this.screenElement)),this._instantiationService.setService(N.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(pe){return K._onRender.fire(pe)})),this.onResize(function(pe){return K._renderService.resize(pe.cols,pe.rows)}),this._soundService=this._instantiationService.createInstance(u.SoundService),this._instantiationService.setService(N.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(te.MouseService),this._instantiationService.setService(N.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(F.Viewport,function(pe,Oe){return K.scrollLines(pe,Oe)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return K.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){K._renderService.onCursorMove(),K._syncTextArea()})),this.register(this.onResize(function(){return K._renderService.onResize(K.cols,K.rows)})),this.register(this.onBlur(function(){return K._renderService.onBlur()})),this.register(this.onFocus(function(){return K._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return K.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(f.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(N.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(pe){return K.scrollLines(pe.amount,pe.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return K._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(pe){return K._renderService.onSelectionChanged(pe.start,pe.end,pe.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(pe){K.textarea.value=pe,K.textarea.focus(),K.textarea.select()})),this.register(this.onScroll(function(){K.viewport.syncScrollArea(),K._selectionService.refresh()})),this.register(n.addDisposableDomListener(this._viewportElement,"scroll",function(){return K._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(S.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return K._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(n.addDisposableDomListener(this.element,"mousedown",function(pe){return K._selectionService.onMouseDown(pe)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new O.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},U.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(i.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(T.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},U.prototype._setTheme=function(Z){var K,k,D;this._theme=Z,(K=this._colorManager)===null||K===void 0||K.setTheme(Z),(k=this._renderService)===null||k===void 0||k.setColors(this._colorManager.colors),(D=this.viewport)===null||D===void 0||D.onThemeChange(this._colorManager.colors)},U.prototype.bindMouse=function(){var Z=this,K=this,k=this.element;function D(ke){var et,Ke,tt=K._mouseService.getRawByteCoords(ke,K.screenElement,K.cols,K.rows);if(!tt)return!1;switch(ke.overrideType||ke.type){case"mousemove":Ke=32,ke.buttons===void 0?(et=3,ke.button!==void 0&&(et=ke.button<3?ke.button:3)):et=1&ke.buttons?0:4&ke.buttons?1:2&ke.buttons?2:3;break;case"mouseup":Ke=0,et=ke.button<3?ke.button:3;break;case"mousedown":Ke=1,et=ke.button<3?ke.button:3;break;case"wheel":ke.deltaY!==0&&(Ke=ke.deltaY<0?0:1),et=4;break;default:return!1}return!(Ke===void 0||et===void 0||et>4)&&K._coreMouseService.triggerMouseEvent({col:tt.x-33,row:tt.y-33,button:et,action:Ke,ctrl:ke.ctrlKey,alt:ke.altKey,shift:ke.shiftKey})}var re={mouseup:null,wheel:null,mousedrag:null,mousemove:null},pe=function(ke){return D(ke),ke.buttons||(Z._document.removeEventListener("mouseup",re.mouseup),re.mousedrag&&Z._document.removeEventListener("mousemove",re.mousedrag)),Z.cancel(ke)},Oe=function(ke){return D(ke),ke.preventDefault(),Z.cancel(ke)},$e=function(ke){ke.buttons&&D(ke)},Ge=function(ke){ke.buttons||D(ke)};this.register(this._coreMouseService.onProtocolChange(function(ke){ke?(Z.optionsService.options.logLevel==="debug"&&Z._logService.debug("Binding to mouse events:",Z._coreMouseService.explainEvents(ke)),Z.element.classList.add("enable-mouse-events"),Z._selectionService.disable()):(Z._logService.debug("Unbinding from mouse events."),Z.element.classList.remove("enable-mouse-events"),Z._selectionService.enable()),8&ke?re.mousemove||(k.addEventListener("mousemove",Ge),re.mousemove=Ge):(k.removeEventListener("mousemove",re.mousemove),re.mousemove=null),16&ke?re.wheel||(k.addEventListener("wheel",Oe,{passive:!1}),re.wheel=Oe):(k.removeEventListener("wheel",re.wheel),re.wheel=null),2&ke?re.mouseup||(re.mouseup=pe):(Z._document.removeEventListener("mouseup",re.mouseup),re.mouseup=null),4&ke?re.mousedrag||(re.mousedrag=$e):(Z._document.removeEventListener("mousemove",re.mousedrag),re.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(n.addDisposableDomListener(k,"mousedown",function(ke){if(ke.preventDefault(),Z.focus(),Z._coreMouseService.areMouseEventsActive&&!Z._selectionService.shouldForceSelection(ke))return D(ke),re.mouseup&&Z._document.addEventListener("mouseup",re.mouseup),re.mousedrag&&Z._document.addEventListener("mousemove",re.mousedrag),Z.cancel(ke)})),this.register(n.addDisposableDomListener(k,"wheel",function(ke){if(!re.wheel){if(!Z.buffer.hasScrollback){var et=Z.viewport.getLinesScrolled(ke);if(et===0)return;for(var Ke=B.C0.ESC+(Z._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ke.deltaY<0?"A":"B"),tt="",It=0;It<Math.abs(et);It++)tt+=Ke;Z._coreService.triggerDataEvent(tt,!0)}}},{passive:!0})),this.register(n.addDisposableDomListener(k,"wheel",function(ke){if(!re.wheel)return Z.viewport.onWheel(ke)?void 0:Z.cancel(ke)},{passive:!1})),this.register(n.addDisposableDomListener(k,"touchstart",function(ke){if(!Z._coreMouseService.areMouseEventsActive)return Z.viewport.onTouchStart(ke),Z.cancel(ke)},{passive:!0})),this.register(n.addDisposableDomListener(k,"touchmove",function(ke){if(!Z._coreMouseService.areMouseEventsActive)return Z.viewport.onTouchMove(ke)?void 0:Z.cancel(ke)},{passive:!1}))},U.prototype.refresh=function(Z,K){var k;(k=this._renderService)===null||k===void 0||k.refreshRows(Z,K)},U.prototype._queueLinkification=function(Z,K){var k;(k=this.linkifier)===null||k===void 0||k.linkifyRows(Z,K)},U.prototype.updateCursorStyle=function(Z){this._selectionService&&this._selectionService.shouldColumnSelect(Z)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},U.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},U.prototype.scrollLines=function(Z,K){ie.prototype.scrollLines.call(this,Z,K),this.refresh(0,this.rows-1)},U.prototype.paste=function(Z){R.paste(Z,this.textarea,this._coreService)},U.prototype.attachCustomKeyEventHandler=function(Z){this._customKeyEventHandler=Z},U.prototype.registerLinkMatcher=function(Z,K,k){var D=this.linkifier.registerLinkMatcher(Z,K,k);return this.refresh(0,this.rows-1),D},U.prototype.deregisterLinkMatcher=function(Z){this.linkifier.deregisterLinkMatcher(Z)&&this.refresh(0,this.rows-1)},U.prototype.registerLinkProvider=function(Z){return this.linkifier2.registerLinkProvider(Z)},U.prototype.registerCharacterJoiner=function(Z){var K=this._renderService.registerCharacterJoiner(Z);return this.refresh(0,this.rows-1),K},U.prototype.deregisterCharacterJoiner=function(Z){this._renderService.deregisterCharacterJoiner(Z)&&this.refresh(0,this.rows-1)},Object.defineProperty(U.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),U.prototype.addMarker=function(Z){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Z)},U.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},U.prototype.select=function(Z,K,k){this._selectionService.setSelection(Z,K,k)},U.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},U.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},U.prototype.clearSelection=function(){var Z;(Z=this._selectionService)===null||Z===void 0||Z.clearSelection()},U.prototype.selectAll=function(){var Z;(Z=this._selectionService)===null||Z===void 0||Z.selectAll()},U.prototype.selectLines=function(Z,K){var k;(k=this._selectionService)===null||k===void 0||k.selectLines(Z,K)},U.prototype._keyDown=function(Z){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Z)===!1)return!1;if(!this._compositionHelper.keydown(Z))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var K=E.evaluateKeyboardEvent(Z,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Z),K.type===3||K.type===2){var k=this.rows-1;return this.scrollLines(K.type===2?-k:k),this.cancel(Z,!0)}return K.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Z)||(K.cancel&&this.cancel(Z,!0),!K.key||(K.key!==B.C0.ETX&&K.key!==B.C0.CR||(this.textarea.value=""),this._onKey.fire({key:K.key,domEvent:Z}),this._showCursor(),this._coreService.triggerDataEvent(K.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(Z,!0)))},U.prototype._isThirdLevelShift=function(Z,K){var k=Z.isMac&&!this.options.macOptionIsMeta&&K.altKey&&!K.ctrlKey&&!K.metaKey||Z.isWindows&&K.altKey&&K.ctrlKey&&!K.metaKey;return K.type==="keypress"?k:k&&(!K.keyCode||K.keyCode>47)},U.prototype._keyUp=function(Z){this._customKeyEventHandler&&this._customKeyEventHandler(Z)===!1||(function(K){return K.keyCode===16||K.keyCode===17||K.keyCode===18}(Z)||this.focus(),this.updateCursorStyle(Z))},U.prototype._keyPress=function(Z){var K;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Z)===!1)return!1;if(this.cancel(Z),Z.charCode)K=Z.charCode;else if(Z.which===null||Z.which===void 0)K=Z.keyCode;else{if(Z.which===0||Z.charCode===0)return!1;K=Z.which}return!(!K||(Z.altKey||Z.ctrlKey||Z.metaKey)&&!this._isThirdLevelShift(this.browser,Z))&&(K=String.fromCharCode(K),this._onKey.fire({key:K,domEvent:Z}),this._showCursor(),this._coreService.triggerDataEvent(K,!0),!0)},U.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},U.prototype.resize=function(Z,K){Z!==this.cols||K!==this.rows?ie.prototype.resize.call(this,Z,K):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},U.prototype._afterResize=function(Z,K){var k,D;(k=this._charSizeService)===null||k===void 0||k.measure(),(D=this.viewport)===null||D===void 0||D.syncScrollArea(!0)},U.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var Z=1;Z<this.rows;Z++)this.buffer.lines.push(this.buffer.getBlankLine(j.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},U.prototype.reset=function(){var Z,K;this.options.rows=this.rows,this.options.cols=this.cols;var k=this._customKeyEventHandler;this._setup(),ie.prototype.reset.call(this),(Z=this._selectionService)===null||Z===void 0||Z.reset(),this._customKeyEventHandler=k,this.refresh(0,this.rows-1),(K=this.viewport)===null||K===void 0||K.syncScrollArea()},U.prototype._reportWindowsOptions=function(Z){if(this._renderService)switch(Z){case y.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var K=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),k=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(B.C0.ESC+"[4;"+k+";"+K+"t");break;case y.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var D=this._renderService.dimensions.scaledCellWidth.toFixed(0),re=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(B.C0.ESC+"[6;"+re+";"+D+"t")}},U.prototype.cancel=function(Z,K){if(this.options.cancelEvents||K)return Z.preventDefault(),Z.stopPropagation(),!1},U.prototype._visualBell=function(){return!1},U.prototype._soundBell=function(){return this.options.bellStyle==="sound"},U}(_e.CoreTerminal);_.Terminal=Y},function(Re,_,H){"use strict";var I=this&&this.__decorate||function(B,y,i,v){var f,h=arguments.length,n=h<3?y:v===null?v=Object.getOwnPropertyDescriptor(y,i):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(B,y,i,v);else for(var o=B.length-1;o>=0;o--)(f=B[o])&&(n=(h<3?f(n):h>3?f(y,i,n):f(y,i))||n);return h>3&&n&&Object.defineProperty(y,i,n),n},V=this&&this.__param||function(B,y){return function(i,v){y(i,v,B)}};Object.defineProperty(_,"__esModule",{value:!0}),_.CompositionHelper=void 0;var P=H(5),F=H(1),R=function(){function B(y,i,v,f,h,n){this._textarea=y,this._compositionView=i,this._bufferService=v,this._optionsService=f,this._charSizeService=h,this._coreService=n,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(B.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),B.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},B.prototype.compositionupdate=function(y){var i=this;this._compositionView.textContent=y.data,this.updateCompositionElements(),setTimeout(function(){i._compositionPosition.end=i._textarea.value.length},0)},B.prototype.compositionend=function(){this._finalizeComposition(!0)},B.prototype.keydown=function(y){if(this._isComposing||this._isSendingComposition){if(y.keyCode===229||y.keyCode===16||y.keyCode===17||y.keyCode===18)return!1;this._finalizeComposition(!1)}return y.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},B.prototype._finalizeComposition=function(y){var i=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,y){var v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(i._isSendingComposition){i._isSendingComposition=!1;var h=void 0;h=i._isComposing?i._textarea.value.substring(v.start,v.end):i._textarea.value.substring(v.start),i._coreService.triggerDataEvent(h,!0)}},0)}else{this._isSendingComposition=!1;var f=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(f,!0)}},B.prototype._handleAnyTextareaChanges=function(){var y=this,i=this._textarea.value;setTimeout(function(){if(!y._isComposing){var v=y._textarea.value.replace(i,"");v.length>0&&y._coreService.triggerDataEvent(v,!0)}},0)},B.prototype.updateCompositionElements=function(y){var i=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var v=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),f=this._bufferService.buffer.y*v,h=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=h+"px",this._compositionView.style.top=f+"px",this._compositionView.style.height=v+"px",this._compositionView.style.lineHeight=v+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var n=this._compositionView.getBoundingClientRect();this._textarea.style.left=h+"px",this._textarea.style.top=f+"px",this._textarea.style.width=n.width+"px",this._textarea.style.height=n.height+"px",this._textarea.style.lineHeight=n.height+"px"}y||setTimeout(function(){return i.updateCompositionElements(!0)},0)}},B=I([V(2,F.IBufferService),V(3,F.IOptionsService),V(4,P.ICharSizeService),V(5,F.ICoreService)],B)}();_.CompositionHelper=R},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(f,h){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var u in o)o.hasOwnProperty(u)&&(n[u]=o[u])})(f,h)},function(f,h){function n(){this.constructor=f}I(f,h),f.prototype=h===null?Object.create(h):(n.prototype=h.prototype,new n)}),P=this&&this.__decorate||function(f,h,n,o){var u,S=arguments.length,O=S<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,n):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(f,h,n,o);else for(var T=f.length-1;T>=0;T--)(u=f[T])&&(O=(S<3?u(O):S>3?u(h,n,O):u(h,n))||O);return S>3&&O&&Object.defineProperty(h,n,O),O},F=this&&this.__param||function(f,h){return function(n,o){h(n,o,f)}};Object.defineProperty(_,"__esModule",{value:!0}),_.Viewport=void 0;var R=H(2),B=H(7),y=H(5),i=H(1),v=function(f){function h(n,o,u,S,O,T,E){var C=f.call(this)||this;return C._scrollLines=n,C._viewportElement=o,C._scrollArea=u,C._bufferService=S,C._optionsService=O,C._charSizeService=T,C._renderService=E,C.scrollBarWidth=0,C._currentRowHeight=0,C._lastRecordedBufferLength=0,C._lastRecordedViewportHeight=0,C._lastRecordedBufferHeight=0,C._lastTouchY=0,C._lastScrollTop=0,C._wheelPartialScroll=0,C._refreshAnimationFrame=null,C._ignoreNextScrollEvent=!1,C.scrollBarWidth=C._viewportElement.offsetWidth-C._scrollArea.offsetWidth||15,C.register(B.addDisposableDomListener(C._viewportElement,"scroll",C._onScroll.bind(C))),setTimeout(function(){return C.syncScrollArea()},0),C}return V(h,f),h.prototype.onThemeChange=function(n){this._viewportElement.style.backgroundColor=n.background.css},h.prototype._refresh=function(n){var o=this;if(n)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return o._innerRefresh()}))},h.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var n=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==n&&(this._lastRecordedBufferHeight=n,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var o=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==o&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=o),this._refreshAnimationFrame=null},h.prototype.syncScrollArea=function(n){if(n===void 0&&(n=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(n);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var o=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===o&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(n)}else this._refresh(n)},h.prototype._onScroll=function(n){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var o=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(o,!0)}},h.prototype._bubbleScroll=function(n,o){var u=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&u<this._lastRecordedBufferHeight)||(n.cancelable&&n.preventDefault(),!1)},h.prototype.onWheel=function(n){var o=this._getPixelsScrolled(n);return o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(n,o))},h.prototype._getPixelsScrolled=function(n){if(n.deltaY===0)return 0;var o=this._applyScrollModifier(n.deltaY,n);return n.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:n.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o},h.prototype.getLinesScrolled=function(n){if(n.deltaY===0)return 0;var o=this._applyScrollModifier(n.deltaY,n);return n.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=this._currentRowHeight+0,this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):n.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o},h.prototype._applyScrollModifier=function(n,o){var u=this._optionsService.options.fastScrollModifier;return u==="alt"&&o.altKey||u==="ctrl"&&o.ctrlKey||u==="shift"&&o.shiftKey?n*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:n*this._optionsService.options.scrollSensitivity},h.prototype.onTouchStart=function(n){this._lastTouchY=n.touches[0].pageY},h.prototype.onTouchMove=function(n){var o=this._lastTouchY-n.touches[0].pageY;return this._lastTouchY=n.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(n,o))},h=P([F(3,i.IBufferService),F(4,i.IOptionsService),F(5,y.ICharSizeService),F(6,y.IRenderService)],h)}(R.Disposable);_.Viewport=v},function(Re,_,H){"use strict";function I(R){return R.replace(/\r?\n/g,"\r")}function V(R,B){return B?"\x1B[200~"+R+"\x1B[201~":R}function P(R,B,y){R=V(R=I(R),y.decPrivateModes.bracketedPasteMode),y.triggerDataEvent(R,!0),B.value=""}function F(R,B,y){var i=y.getBoundingClientRect(),v=R.clientX-i.left-10,f=R.clientY-i.top-10;B.style.width="20px",B.style.height="20px",B.style.left=v+"px",B.style.top=f+"px",B.style.zIndex="1000",B.focus()}Object.defineProperty(_,"__esModule",{value:!0}),_.rightClickHandler=_.moveTextAreaUnderMouseCursor=_.paste=_.handlePasteEvent=_.copyHandler=_.bracketTextForPaste=_.prepareTextForTerminal=void 0,_.prepareTextForTerminal=I,_.bracketTextForPaste=V,_.copyHandler=function(R,B){R.clipboardData&&R.clipboardData.setData("text/plain",B.selectionText),R.preventDefault()},_.handlePasteEvent=function(R,B,y){R.stopPropagation(),R.clipboardData&&P(R.clipboardData.getData("text/plain"),B,y)},_.paste=P,_.moveTextAreaUnderMouseCursor=F,_.rightClickHandler=function(R,B,y,i,v){F(R,B,y),v&&!i.isClickInSelection(R)&&i.selectWordAtCursor(R),B.value=i.selectionText,B.select()}},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(f,h){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var u in o)o.hasOwnProperty(u)&&(n[u]=o[u])})(f,h)},function(f,h){function n(){this.constructor=f}I(f,h),f.prototype=h===null?Object.create(h):(n.prototype=h.prototype,new n)});Object.defineProperty(_,"__esModule",{value:!0}),_.EscapeSequenceParser=_.VT500_TRANSITION_TABLE=_.TransitionTable=void 0;var P=H(2),F=H(15),R=H(21),B=H(22),y=H(24),i=function(){function f(h){this.table=new Uint8Array(h)}return f.prototype.setDefault=function(h,n){F.fill(this.table,h<<4|n)},f.prototype.add=function(h,n,o,u){this.table[n<<8|h]=o<<4|u},f.prototype.addMany=function(h,n,o,u){for(var S=0;S<h.length;S++)this.table[n<<8|h[S]]=o<<4|u},f}();_.TransitionTable=i,_.VT500_TRANSITION_TABLE=function(){var f=new i(4095),h=Array.apply(null,Array(256)).map(function(T,E){return E}),n=function(T,E){return h.slice(T,E)},o=n(32,127),u=n(0,24);u.push(25),u.push.apply(u,n(28,32));var S,O=n(0,14);for(S in f.setDefault(1,0),f.addMany(o,0,2,0),O)f.addMany([24,26,153,154],S,3,0),f.addMany(n(128,144),S,3,0),f.addMany(n(144,152),S,3,0),f.add(156,S,0,0),f.add(27,S,11,1),f.add(157,S,4,8),f.addMany([152,158,159],S,0,7),f.add(155,S,11,3),f.add(144,S,11,9);return f.addMany(u,0,3,0),f.addMany(u,1,3,1),f.add(127,1,0,1),f.addMany(u,8,0,8),f.addMany(u,3,3,3),f.add(127,3,0,3),f.addMany(u,4,3,4),f.add(127,4,0,4),f.addMany(u,6,3,6),f.addMany(u,5,3,5),f.add(127,5,0,5),f.addMany(u,2,3,2),f.add(127,2,0,2),f.add(93,1,4,8),f.addMany(o,8,5,8),f.add(127,8,5,8),f.addMany([156,27,24,26,7],8,6,0),f.addMany(n(28,32),8,0,8),f.addMany([88,94,95],1,0,7),f.addMany(o,7,0,7),f.addMany(u,7,0,7),f.add(156,7,0,0),f.add(127,7,0,7),f.add(91,1,11,3),f.addMany(n(64,127),3,7,0),f.addMany(n(48,60),3,8,4),f.addMany([60,61,62,63],3,9,4),f.addMany(n(48,60),4,8,4),f.addMany(n(64,127),4,7,0),f.addMany([60,61,62,63],4,0,6),f.addMany(n(32,64),6,0,6),f.add(127,6,0,6),f.addMany(n(64,127),6,0,0),f.addMany(n(32,48),3,9,5),f.addMany(n(32,48),5,9,5),f.addMany(n(48,64),5,0,6),f.addMany(n(64,127),5,7,0),f.addMany(n(32,48),4,9,5),f.addMany(n(32,48),1,9,2),f.addMany(n(32,48),2,9,2),f.addMany(n(48,127),2,10,0),f.addMany(n(48,80),1,10,0),f.addMany(n(81,88),1,10,0),f.addMany([89,90,92],1,10,0),f.addMany(n(96,127),1,10,0),f.add(80,1,11,9),f.addMany(u,9,0,9),f.add(127,9,0,9),f.addMany(n(28,32),9,0,9),f.addMany(n(32,48),9,9,12),f.addMany(n(48,60),9,8,10),f.addMany([60,61,62,63],9,9,10),f.addMany(u,11,0,11),f.addMany(n(32,128),11,0,11),f.addMany(n(28,32),11,0,11),f.addMany(u,10,0,10),f.add(127,10,0,10),f.addMany(n(28,32),10,0,10),f.addMany(n(48,60),10,8,10),f.addMany([60,61,62,63],10,0,11),f.addMany(n(32,48),10,9,12),f.addMany(u,12,0,12),f.add(127,12,0,12),f.addMany(n(28,32),12,0,12),f.addMany(n(32,48),12,9,12),f.addMany(n(48,64),12,0,11),f.addMany(n(64,127),12,12,13),f.addMany(n(64,127),10,12,13),f.addMany(n(64,127),9,12,13),f.addMany(u,13,13,13),f.addMany(o,13,13,13),f.add(127,13,0,13),f.addMany([27,156,24,26],13,14,0),f.add(160,0,2,0),f.add(160,8,5,8),f.add(160,6,0,6),f.add(160,11,0,11),f.add(160,13,13,13),f}();var v=function(f){function h(n){n===void 0&&(n=_.VT500_TRANSITION_TABLE);var o=f.call(this)||this;return o._transitions=n,o.initialState=0,o.currentState=o.initialState,o._params=new R.Params,o._params.addParam(0),o._collect=0,o.precedingCodepoint=0,o._printHandlerFb=function(u,S,O){},o._executeHandlerFb=function(u){},o._csiHandlerFb=function(u,S){},o._escHandlerFb=function(u){},o._errorHandlerFb=function(u){return u},o._printHandler=o._printHandlerFb,o._executeHandlers=Object.create(null),o._csiHandlers=Object.create(null),o._escHandlers=Object.create(null),o._oscParser=new B.OscParser,o._dcsParser=new y.DcsParser,o._errorHandler=o._errorHandlerFb,o.setEscHandler({final:"\\"},function(){}),o}return V(h,f),h.prototype._identifier=function(n,o){o===void 0&&(o=[64,126]);var u=0;if(n.prefix){if(n.prefix.length>1)throw new Error("only one byte as prefix supported");if((u=n.prefix.charCodeAt(0))&&60>u||u>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(n.intermediates){if(n.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var S=0;S<n.intermediates.length;++S){var O=n.intermediates.charCodeAt(S);if(32>O||O>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");u<<=8,u|=O}}if(n.final.length!==1)throw new Error("final must be a single byte");var T=n.final.charCodeAt(0);if(o[0]>T||T>o[1])throw new Error("final must be in range "+o[0]+" .. "+o[1]);return u<<=8,u|=T},h.prototype.identToString=function(n){for(var o=[];n;)o.push(String.fromCharCode(255&n)),n>>=8;return o.reverse().join("")},h.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},h.prototype.setPrintHandler=function(n){this._printHandler=n},h.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},h.prototype.addEscHandler=function(n,o){var u=this._identifier(n,[48,126]);this._escHandlers[u]===void 0&&(this._escHandlers[u]=[]);var S=this._escHandlers[u];return S.push(o),{dispose:function(){var O=S.indexOf(o);O!==-1&&S.splice(O,1)}}},h.prototype.setEscHandler=function(n,o){this._escHandlers[this._identifier(n,[48,126])]=[o]},h.prototype.clearEscHandler=function(n){this._escHandlers[this._identifier(n,[48,126])]&&delete this._escHandlers[this._identifier(n,[48,126])]},h.prototype.setEscHandlerFallback=function(n){this._escHandlerFb=n},h.prototype.setExecuteHandler=function(n,o){this._executeHandlers[n.charCodeAt(0)]=o},h.prototype.clearExecuteHandler=function(n){this._executeHandlers[n.charCodeAt(0)]&&delete this._executeHandlers[n.charCodeAt(0)]},h.prototype.setExecuteHandlerFallback=function(n){this._executeHandlerFb=n},h.prototype.addCsiHandler=function(n,o){var u=this._identifier(n);this._csiHandlers[u]===void 0&&(this._csiHandlers[u]=[]);var S=this._csiHandlers[u];return S.push(o),{dispose:function(){var O=S.indexOf(o);O!==-1&&S.splice(O,1)}}},h.prototype.setCsiHandler=function(n,o){this._csiHandlers[this._identifier(n)]=[o]},h.prototype.clearCsiHandler=function(n){this._csiHandlers[this._identifier(n)]&&delete this._csiHandlers[this._identifier(n)]},h.prototype.setCsiHandlerFallback=function(n){this._csiHandlerFb=n},h.prototype.addDcsHandler=function(n,o){return this._dcsParser.addHandler(this._identifier(n),o)},h.prototype.setDcsHandler=function(n,o){this._dcsParser.setHandler(this._identifier(n),o)},h.prototype.clearDcsHandler=function(n){this._dcsParser.clearHandler(this._identifier(n))},h.prototype.setDcsHandlerFallback=function(n){this._dcsParser.setHandlerFallback(n)},h.prototype.addOscHandler=function(n,o){return this._oscParser.addHandler(n,o)},h.prototype.setOscHandler=function(n,o){this._oscParser.setHandler(n,o)},h.prototype.clearOscHandler=function(n){this._oscParser.clearHandler(n)},h.prototype.setOscHandlerFallback=function(n){this._oscParser.setHandlerFallback(n)},h.prototype.setErrorHandler=function(n){this._errorHandler=n},h.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},h.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},h.prototype.parse=function(n,o){for(var u=0,S=0,O=this.currentState,T=this._oscParser,E=this._dcsParser,C=this._collect,j=this._params,x=this._transitions.table,L=0;L<o;++L){switch((S=x[O<<8|((u=n[L])<160?u:160)])>>4){case 2:for(var N=L+1;;++N){if(N>=o||(u=n[N])<32||u>126&&u<160){this._printHandler(n,L,N),L=N-1;break}if(++N>=o||(u=n[N])<32||u>126&&u<160){this._printHandler(n,L,N),L=N-1;break}if(++N>=o||(u=n[N])<32||u>126&&u<160){this._printHandler(n,L,N),L=N-1;break}if(++N>=o||(u=n[N])<32||u>126&&u<160){this._printHandler(n,L,N),L=N-1;break}}break;case 3:this._executeHandlers[u]?this._executeHandlers[u]():this._executeHandlerFb(u),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:L,code:u,currentState:O,collect:C,params:j,abort:!1}).abort)return;break;case 7:for(var z=this._csiHandlers[C<<8|u],te=z?z.length-1:-1;te>=0&&z[te](j)===!1;te--);te<0&&this._csiHandlerFb(C<<8|u,j),this.precedingCodepoint=0;break;case 8:do switch(u){case 59:j.addParam(0);break;case 58:j.addSubParam(-1);break;default:j.addDigit(u-48)}while(++L<o&&(u=n[L])>47&&u<60);L--;break;case 9:C<<=8,C|=u;break;case 10:for(var J=this._escHandlers[C<<8|u],ge=J?J.length-1:-1;ge>=0&&J[ge]()===!1;ge--);ge<0&&this._escHandlerFb(C<<8|u),this.precedingCodepoint=0;break;case 11:j.reset(),j.addParam(0),C=0;break;case 12:E.hook(C<<8|u,j);break;case 13:for(var _e=L+1;;++_e)if(_e>=o||(u=n[_e])===24||u===26||u===27||u>127&&u<160){E.put(n,L,_e),L=_e-1;break}break;case 14:E.unhook(u!==24&&u!==26),u===27&&(S|=1),j.reset(),j.addParam(0),C=0,this.precedingCodepoint=0;break;case 4:T.start();break;case 5:for(var se=L+1;;se++)if(se>=o||(u=n[se])<32||u>127&&u<=159){T.put(n,L,se),L=se-1;break}break;case 6:T.end(u!==24&&u!==26),u===27&&(S|=1),j.reset(),j.addParam(0),C=0,this.precedingCodepoint=0}O=15&S}this._collect=C,this.currentState=O},h}(P.Disposable);_.EscapeSequenceParser=v},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(T,E){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,j){C.__proto__=j}||function(C,j){for(var x in j)j.hasOwnProperty(x)&&(C[x]=j[x])})(T,E)},function(T,E){function C(){this.constructor=T}I(T,E),T.prototype=E===null?Object.create(E):(C.prototype=E.prototype,new C)}),P=this&&this.__decorate||function(T,E,C,j){var x,L=arguments.length,N=L<3?E:j===null?j=Object.getOwnPropertyDescriptor(E,C):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(T,E,C,j);else for(var z=T.length-1;z>=0;z--)(x=T[z])&&(N=(L<3?x(N):L>3?x(E,C,N):x(E,C))||N);return L>3&&N&&Object.defineProperty(E,C,N),N},F=this&&this.__param||function(T,E){return function(C,j){E(C,j,T)}};Object.defineProperty(_,"__esModule",{value:!0}),_.Renderer=void 0;var R=H(41),B=H(47),y=H(48),i=H(49),v=H(29),f=H(2),h=H(5),n=H(1),o=H(25),u=H(0),S=1,O=function(T){function E(C,j,x,L,N,z,te,J,ge){var _e=T.call(this)||this;_e._colors=C,_e._screenElement=j,_e._bufferService=N,_e._charSizeService=z,_e._optionsService=te,_e._id=S++,_e._onRequestRedraw=new u.EventEmitter;var se=_e._optionsService.options.allowTransparency;return _e._characterJoinerRegistry=new v.CharacterJoinerRegistry(_e._bufferService),_e._renderLayers=[new R.TextRenderLayer(_e._screenElement,0,_e._colors,_e._characterJoinerRegistry,se,_e._id,_e._bufferService,te),new B.SelectionRenderLayer(_e._screenElement,1,_e._colors,_e._id,_e._bufferService,te),new i.LinkRenderLayer(_e._screenElement,2,_e._colors,_e._id,x,L,_e._bufferService,te),new y.CursorRenderLayer(_e._screenElement,3,_e._colors,_e._id,_e._onRequestRedraw,_e._bufferService,te,J,ge)],_e.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},_e._devicePixelRatio=window.devicePixelRatio,_e._updateDimensions(),_e.onOptionsChanged(),_e}return V(E,T),Object.defineProperty(E.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),E.prototype.dispose=function(){for(var C=0,j=this._renderLayers;C<j.length;C++)j[C].dispose();T.prototype.dispose.call(this),o.removeTerminalFromCache(this._id)},E.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},E.prototype.setColors=function(C){this._colors=C;for(var j=0,x=this._renderLayers;j<x.length;j++){var L=x[j];L.setColors(this._colors),L.reset()}},E.prototype.onResize=function(C,j){this._updateDimensions();for(var x=0,L=this._renderLayers;x<L.length;x++)L[x].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},E.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},E.prototype.onBlur=function(){this._runOperation(function(C){return C.onBlur()})},E.prototype.onFocus=function(){this._runOperation(function(C){return C.onFocus()})},E.prototype.onSelectionChanged=function(C,j,x){x===void 0&&(x=!1),this._runOperation(function(L){return L.onSelectionChanged(C,j,x)})},E.prototype.onCursorMove=function(){this._runOperation(function(C){return C.onCursorMove()})},E.prototype.onOptionsChanged=function(){this._runOperation(function(C){return C.onOptionsChanged()})},E.prototype.clear=function(){this._runOperation(function(C){return C.reset()})},E.prototype._runOperation=function(C){for(var j=0,x=this._renderLayers;j<x.length;j++)C(x[j])},E.prototype.renderRows=function(C,j){for(var x=0,L=this._renderLayers;x<L.length;x++)L[x].onGridChanged(C,j)},E.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},E.prototype.registerCharacterJoiner=function(C){return this._characterJoinerRegistry.registerCharacterJoiner(C)},E.prototype.deregisterCharacterJoiner=function(C){return this._characterJoinerRegistry.deregisterCharacterJoiner(C)},E=P([F(4,n.IBufferService),F(5,h.ICharSizeService),F(6,n.IOptionsService),F(7,n.ICoreService),F(8,h.ICoreBrowserService)],E)}(f.Disposable);_.Renderer=O},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(f,h){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var u in o)o.hasOwnProperty(u)&&(n[u]=o[u])})(f,h)},function(f,h){function n(){this.constructor=f}I(f,h),f.prototype=h===null?Object.create(h):(n.prototype=h.prototype,new n)});Object.defineProperty(_,"__esModule",{value:!0}),_.TextRenderLayer=void 0;var P=H(42),F=H(13),R=H(6),B=H(3),y=H(29),i=H(4),v=function(f){function h(n,o,u,S,O,T,E,C){var j=f.call(this,n,"text",o,O,u,T,E,C)||this;return j._characterWidth=0,j._characterFont="",j._characterOverlapCache={},j._workCell=new i.CellData,j._state=new P.GridCache,j._characterJoinerRegistry=S,j}return V(h,f),h.prototype.resize=function(n){f.prototype.resize.call(this,n);var o=this._getFont(!1,!1);this._characterWidth===n.scaledCharWidth&&this._characterFont===o||(this._characterWidth=n.scaledCharWidth,this._characterFont=o,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},h.prototype.reset=function(){this._state.clear(),this._clearAll()},h.prototype._forEachCell=function(n,o,u,S){for(var O=n;O<=o;O++)for(var T=O+this._bufferService.buffer.ydisp,E=this._bufferService.buffer.lines.get(T),C=u?u.getJoinedCharacters(T):[],j=0;j<this._bufferService.cols;j++){E.loadCell(j,this._workCell);var x=this._workCell,L=!1,N=j;if(x.getWidth()!==0){if(C.length>0&&j===C[0][0]){L=!0;var z=C.shift();x=new y.JoinedCellData(this._workCell,E.translateToString(!0,z[0],z[1]),z[1]-z[0]),N=z[1]-1}!L&&this._isOverlapping(x)&&N<E.length-1&&E.getCodePoint(N+1)===B.NULL_CELL_CODE&&(x.content&=-12582913,x.content|=2<<22),S(x,j,O),j=N}}},h.prototype._drawBackground=function(n,o){var u=this,S=this._ctx,O=this._bufferService.cols,T=0,E=0,C=null;S.save(),this._forEachCell(n,o,null,function(j,x,L){var N=null;j.isInverse()?N=j.isFgDefault()?u._colors.foreground.css:j.isFgRGB()?"rgb("+R.AttributeData.toColorRGB(j.getFgColor()).join(",")+")":u._colors.ansi[j.getFgColor()].css:j.isBgRGB()?N="rgb("+R.AttributeData.toColorRGB(j.getBgColor()).join(",")+")":j.isBgPalette()&&(N=u._colors.ansi[j.getBgColor()].css),C===null&&(T=x,E=L),L!==E?(S.fillStyle=C||"",u._fillCells(T,E,O-T,1),T=x,E=L):C!==N&&(S.fillStyle=C||"",u._fillCells(T,E,x-T,1),T=x,E=L),C=N}),C!==null&&(S.fillStyle=C,this._fillCells(T,E,O-T,1)),S.restore()},h.prototype._drawForeground=function(n,o){var u=this;this._forEachCell(n,o,this._characterJoinerRegistry,function(S,O,T){if(!S.isInvisible()&&(u._drawChars(S,O,T),S.isUnderline())){if(u._ctx.save(),S.isInverse())if(S.isBgDefault())u._ctx.fillStyle=u._colors.background.css;else if(S.isBgRGB())u._ctx.fillStyle="rgb("+R.AttributeData.toColorRGB(S.getBgColor()).join(",")+")";else{var E=S.getBgColor();u._optionsService.options.drawBoldTextInBrightColors&&S.isBold()&&E<8&&(E+=8),u._ctx.fillStyle=u._colors.ansi[E].css}else if(S.isFgDefault())u._ctx.fillStyle=u._colors.foreground.css;else if(S.isFgRGB())u._ctx.fillStyle="rgb("+R.AttributeData.toColorRGB(S.getFgColor()).join(",")+")";else{var C=S.getFgColor();u._optionsService.options.drawBoldTextInBrightColors&&S.isBold()&&C<8&&(C+=8),u._ctx.fillStyle=u._colors.ansi[C].css}u._fillBottomLineAtCells(O,T,S.getWidth()),u._ctx.restore()}})},h.prototype.onGridChanged=function(n,o){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,n,this._bufferService.cols,o-n+1),this._drawBackground(n,o),this._drawForeground(n,o))},h.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},h.prototype._isOverlapping=function(n){if(n.getWidth()!==1||n.getCode()<256)return!1;var o=n.getChars();if(this._characterOverlapCache.hasOwnProperty(o))return this._characterOverlapCache[o];this._ctx.save(),this._ctx.font=this._characterFont;var u=Math.floor(this._ctx.measureText(o).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[o]=u,u},h}(F.BaseRenderLayer);_.TextRenderLayer=v},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.GridCache=void 0;var I=function(){function V(){this.cache=[]}return V.prototype.resize=function(P,F){for(var R=0;R<P;R++){this.cache.length<=R&&this.cache.push([]);for(var B=this.cache[R].length;B<F;B++)this.cache[R].push(void 0);this.cache[R].length=F}this.cache.length=P},V.prototype.clear=function(){for(var P=0;P<this.cache.length;P++)for(var F=0;F<this.cache[P].length;F++)this.cache[P][F]=void 0},V}();_.GridCache=I},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(u,S){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,T){O.__proto__=T}||function(O,T){for(var E in T)T.hasOwnProperty(E)&&(O[E]=T[E])})(u,S)},function(u,S){function O(){this.constructor=u}I(u,S),u.prototype=S===null?Object.create(S):(O.prototype=S.prototype,new O)});Object.defineProperty(_,"__esModule",{value:!0}),_.NoneCharAtlas=_.DynamicCharAtlas=_.getGlyphCacheKey=void 0;var P=H(9),F=H(44),R=H(27),B=H(46),y=H(11),i=H(28),v=H(10),f={css:"rgba(0, 0, 0, 0)",rgba:0};function h(u){return u.code<<21|u.bg<<12|u.fg<<3|(u.bold?0:4)+(u.dim?0:2)+(u.italic?0:1)}_.getGlyphCacheKey=h;var n=function(u){function S(O,T){var E=u.call(this)||this;E._config=T,E._drawToCacheCount=0,E._glyphsWaitingOnBitmap=[],E._bitmapCommitTimeout=null,E._bitmap=null,E._cacheCanvas=O.createElement("canvas"),E._cacheCanvas.width=1024,E._cacheCanvas.height=1024,E._cacheCtx=i.throwIfFalsy(E._cacheCanvas.getContext("2d",{alpha:!0}));var C=O.createElement("canvas");C.width=E._config.scaledCharWidth,C.height=E._config.scaledCharHeight,E._tmpCtx=i.throwIfFalsy(C.getContext("2d",{alpha:E._config.allowTransparency})),E._width=Math.floor(1024/E._config.scaledCharWidth),E._height=Math.floor(1024/E._config.scaledCharHeight);var j=E._width*E._height;return E._cacheMap=new B.LRUMap(j),E._cacheMap.prealloc(j),E}return V(S,u),S.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},S.prototype.beginFrame=function(){this._drawToCacheCount=0},S.prototype.draw=function(O,T,E,C){if(T.code===32)return!0;if(!this._canCache(T))return!1;var j=h(T),x=this._cacheMap.get(j);if(x!=null)return this._drawFromCache(O,x,E,C),!0;if(this._drawToCacheCount<100){var L=void 0;L=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var N=this._drawToCache(T,L);return this._cacheMap.set(j,N),this._drawFromCache(O,N,E,C),!0}return!1},S.prototype._canCache=function(O){return O.code<256},S.prototype._toCoordinateX=function(O){return O%this._width*this._config.scaledCharWidth},S.prototype._toCoordinateY=function(O){return Math.floor(O/this._width)*this._config.scaledCharHeight},S.prototype._drawFromCache=function(O,T,E,C){if(!T.isEmpty){var j=this._toCoordinateX(T.index),x=this._toCoordinateY(T.index);O.drawImage(T.inBitmap?this._bitmap:this._cacheCanvas,j,x,this._config.scaledCharWidth,this._config.scaledCharHeight,E,C,this._config.scaledCharWidth,this._config.scaledCharHeight)}},S.prototype._getColorFromAnsiIndex=function(O){return O<this._config.colors.ansi.length?this._config.colors.ansi[O]:R.DEFAULT_ANSI_COLORS[O]},S.prototype._getBackgroundColor=function(O){return this._config.allowTransparency?f:O.bg===P.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:O.bg<256?this._getColorFromAnsiIndex(O.bg):this._config.colors.background},S.prototype._getForegroundColor=function(O){return O.fg===P.INVERTED_DEFAULT_COLOR?v.color.opaque(this._config.colors.background):O.fg<256?this._getColorFromAnsiIndex(O.fg):this._config.colors.foreground},S.prototype._drawToCache=function(O,T){this._drawToCacheCount++,this._tmpCtx.save();var E=this._getBackgroundColor(O);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=E.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var C=O.bold?this._config.fontWeightBold:this._config.fontWeight,j=O.italic?"italic":"";this._tmpCtx.font=j+" "+C+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(O).css,O.dim&&(this._tmpCtx.globalAlpha=P.DIM_OPACITY),this._tmpCtx.fillText(O.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var x=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),L=!1;this._config.allowTransparency||(L=function(J,ge){for(var _e=!0,se=ge.rgba>>>24,Y=ge.rgba>>>16&255,ie=ge.rgba>>>8&255,U=0;U<J.data.length;U+=4)J.data[U]===se&&J.data[U+1]===Y&&J.data[U+2]===ie?J.data[U+3]=0:_e=!1;return _e}(x,E));var N=this._toCoordinateX(T),z=this._toCoordinateY(T);this._cacheCtx.putImageData(x,N,z);var te={index:T,isEmpty:L,inBitmap:!1};return this._addGlyphToBitmap(te),te},S.prototype._addGlyphToBitmap=function(O){var T=this;!("createImageBitmap"in window)||y.isFirefox||y.isSafari||(this._glyphsWaitingOnBitmap.push(O),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return T._generateBitmap()},100)))},S.prototype._generateBitmap=function(){var O=this,T=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(E){O._bitmap=E;for(var C=0;C<T.length;C++)T[C].inBitmap=!0}),this._bitmapCommitTimeout=null},S}(F.BaseCharAtlas);_.DynamicCharAtlas=n;var o=function(u){function S(O,T){return u.call(this)||this}return V(S,u),S.prototype.draw=function(O,T,E,C){return!1},S}(F.BaseCharAtlas);_.NoneCharAtlas=o},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.BaseCharAtlas=void 0;var I=function(){function V(){this._didWarmUp=!1}return V.prototype.dispose=function(){},V.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},V.prototype._doWarmUp=function(){},V.prototype.beginFrame=function(){},V}();_.BaseCharAtlas=I},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.ColorContrastCache=void 0;var I=function(){function V(){this._color={},this._rgba={}}return V.prototype.clear=function(){this._color={},this._rgba={}},V.prototype.setCss=function(P,F,R){this._rgba[P]||(this._rgba[P]={}),this._rgba[P][F]=R},V.prototype.getCss=function(P,F){return this._rgba[P]?this._rgba[P][F]:void 0},V.prototype.setColor=function(P,F,R){this._color[P]||(this._color[P]={}),this._color[P][F]=R},V.prototype.getColor=function(P,F){return this._color[P]?this._color[P][F]:void 0},V}();_.ColorContrastCache=I},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.LRUMap=void 0;var I=function(){function V(P){this.capacity=P,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return V.prototype._unlinkNode=function(P){var F=P.prev,R=P.next;P===this._head&&(this._head=R),P===this._tail&&(this._tail=F),F!==null&&(F.next=R),R!==null&&(R.prev=F)},V.prototype._appendNode=function(P){var F=this._tail;F!==null&&(F.next=P),P.prev=F,P.next=null,this._tail=P,this._head===null&&(this._head=P)},V.prototype.prealloc=function(P){for(var F=this._nodePool,R=0;R<P;R++)F.push({prev:null,next:null,key:null,value:null})},V.prototype.get=function(P){var F=this._map[P];return F!==void 0?(this._unlinkNode(F),this._appendNode(F),F.value):null},V.prototype.peekValue=function(P){var F=this._map[P];return F!==void 0?F.value:null},V.prototype.peek=function(){var P=this._head;return P===null?null:P.value},V.prototype.set=function(P,F){var R=this._map[P];if(R!==void 0)R=this._map[P],this._unlinkNode(R),R.value=F;else if(this.size>=this.capacity)R=this._head,this._unlinkNode(R),delete this._map[R.key],R.key=P,R.value=F,this._map[P]=R;else{var B=this._nodePool;B.length>0?((R=B.pop()).key=P,R.value=F):R={prev:null,next:null,key:P,value:F},this._map[P]=R,this.size++}this._appendNode(R)},V}();_.LRUMap=I},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(F,R){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(B,y){B.__proto__=y}||function(B,y){for(var i in y)y.hasOwnProperty(i)&&(B[i]=y[i])})(F,R)},function(F,R){function B(){this.constructor=F}I(F,R),F.prototype=R===null?Object.create(R):(B.prototype=R.prototype,new B)});Object.defineProperty(_,"__esModule",{value:!0}),_.SelectionRenderLayer=void 0;var P=function(F){function R(B,y,i,v,f,h){var n=F.call(this,B,"selection",y,!0,i,v,f,h)||this;return n._clearState(),n}return V(R,F),R.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},R.prototype.resize=function(B){F.prototype.resize.call(this,B),this._clearState()},R.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},R.prototype.onSelectionChanged=function(B,y,i){if(this._didStateChange(B,y,i,this._bufferService.buffer.ydisp))if(this._clearAll(),B&&y){var v=B[1]-this._bufferService.buffer.ydisp,f=y[1]-this._bufferService.buffer.ydisp,h=Math.max(v,0),n=Math.min(f,this._bufferService.rows-1);if(!(h>=this._bufferService.rows||n<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,i){var o=B[0],u=y[0]-o,S=n-h+1;this._fillCells(o,h,u,S)}else{o=v===h?B[0]:0;var O=h===n?y[0]:this._bufferService.cols;this._fillCells(o,h,O-o,1);var T=Math.max(n-h-1,0);if(this._fillCells(0,h+1,this._bufferService.cols,T),h!==n){var E=f===n?y[0]:this._bufferService.cols;this._fillCells(0,n,E,1)}}this._state.start=[B[0],B[1]],this._state.end=[y[0],y[1]],this._state.columnSelectMode=i,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},R.prototype._didStateChange=function(B,y,i,v){return!this._areCoordinatesEqual(B,this._state.start)||!this._areCoordinatesEqual(y,this._state.end)||i!==this._state.columnSelectMode||v!==this._state.ydisp},R.prototype._areCoordinatesEqual=function(B,y){return!(!B||!y)&&B[0]===y[0]&&B[1]===y[1]},R}(H(13).BaseRenderLayer);_.SelectionRenderLayer=P},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(y,i){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,f){v.__proto__=f}||function(v,f){for(var h in f)f.hasOwnProperty(h)&&(v[h]=f[h])})(y,i)},function(y,i){function v(){this.constructor=y}I(y,i),y.prototype=i===null?Object.create(i):(v.prototype=i.prototype,new v)});Object.defineProperty(_,"__esModule",{value:!0}),_.CursorRenderLayer=void 0;var P=H(13),F=H(4),R=function(y){function i(v,f,h,n,o,u,S,O,T){var E=y.call(this,v,"cursor",f,!0,h,n,u,S)||this;return E._onRequestRedraw=o,E._coreService=O,E._coreBrowserService=T,E._cell=new F.CellData,E._state={x:0,y:0,isFocused:!1,style:"",width:0},E._cursorRenderers={bar:E._renderBarCursor.bind(E),block:E._renderBlockCursor.bind(E),underline:E._renderUnderlineCursor.bind(E)},E}return V(i,y),i.prototype.resize=function(v){y.prototype.resize.call(this,v),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},i.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},i.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},i.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},i.prototype.onOptionsChanged=function(){var v,f=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new B(this._coreBrowserService.isFocused,function(){f._render(!0)})):((v=this._cursorBlinkStateManager)===null||v===void 0||v.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},i.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},i.prototype.onGridChanged=function(v,f){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},i.prototype._render=function(v){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var f=this._bufferService.buffer.ybase+this._bufferService.buffer.y,h=f-this._bufferService.buffer.ydisp;if(h<0||h>=this._bufferService.rows)this._clearCursor();else{var n=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(f).loadCell(n,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var o=this._optionsService.options.cursorStyle;return o&&o!=="block"?this._cursorRenderers[o](n,h,this._cell):this._renderBlurCursor(n,h,this._cell),this._ctx.restore(),this._state.x=n,this._state.y=h,this._state.isFocused=!1,this._state.style=o,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===n&&this._state.y===h&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](n,h,this._cell),this._ctx.restore(),this._state.x=n,this._state.y=h,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},i.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},i.prototype._renderBarCursor=function(v,f,h){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(v,f,this._optionsService.options.cursorWidth),this._ctx.restore()},i.prototype._renderBlockCursor=function(v,f,h){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(v,f,h.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(h,v,f),this._ctx.restore()},i.prototype._renderUnderlineCursor=function(v,f,h){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(v,f),this._ctx.restore()},i.prototype._renderBlurCursor=function(v,f,h){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(v,f,h.getWidth(),1),this._ctx.restore()},i}(P.BaseRenderLayer);_.CursorRenderLayer=R;var B=function(){function y(i,v){this._renderCallback=v,this.isCursorVisible=!0,i&&this._restartInterval()}return Object.defineProperty(y.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),y.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},y.prototype.restartBlinkAnimation=function(){var i=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){i._renderCallback(),i._animationFrame=void 0})))},y.prototype._restartInterval=function(i){var v=this;i===void 0&&(i=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(v._animationTimeRestarted){var f=600-(Date.now()-v._animationTimeRestarted);if(v._animationTimeRestarted=void 0,f>0)return void v._restartInterval(f)}v.isCursorVisible=!1,v._animationFrame=window.requestAnimationFrame(function(){v._renderCallback(),v._animationFrame=void 0}),v._blinkInterval=window.setInterval(function(){if(v._animationTimeRestarted){var h=600-(Date.now()-v._animationTimeRestarted);return v._animationTimeRestarted=void 0,void v._restartInterval(h)}v.isCursorVisible=!v.isCursorVisible,v._animationFrame=window.requestAnimationFrame(function(){v._renderCallback(),v._animationFrame=void 0})},600)},i)},y.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},y.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},y}()},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(y,i){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,f){v.__proto__=f}||function(v,f){for(var h in f)f.hasOwnProperty(h)&&(v[h]=f[h])})(y,i)},function(y,i){function v(){this.constructor=y}I(y,i),y.prototype=i===null?Object.create(i):(v.prototype=i.prototype,new v)});Object.defineProperty(_,"__esModule",{value:!0}),_.LinkRenderLayer=void 0;var P=H(13),F=H(9),R=H(26),B=function(y){function i(v,f,h,n,o,u,S,O){var T=y.call(this,v,"link",f,!0,h,n,S,O)||this;return o.onShowLinkUnderline(function(E){return T._onShowLinkUnderline(E)}),o.onHideLinkUnderline(function(E){return T._onHideLinkUnderline(E)}),u.onShowLinkUnderline(function(E){return T._onShowLinkUnderline(E)}),u.onHideLinkUnderline(function(E){return T._onHideLinkUnderline(E)}),T}return V(i,y),i.prototype.resize=function(v){y.prototype.resize.call(this,v),this._state=void 0},i.prototype.reset=function(){this._clearCurrentLink()},i.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var v=this._state.y2-this._state.y1-1;v>0&&this._clearCells(0,this._state.y1+1,this._state.cols,v),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},i.prototype._onShowLinkUnderline=function(v){if(v.fg===F.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:v.fg&&R.is256Color(v.fg)?this._ctx.fillStyle=this._colors.ansi[v.fg].css:this._ctx.fillStyle=this._colors.foreground.css,v.y1===v.y2)this._fillBottomLineAtCells(v.x1,v.y1,v.x2-v.x1);else{this._fillBottomLineAtCells(v.x1,v.y1,v.cols-v.x1);for(var f=v.y1+1;f<v.y2;f++)this._fillBottomLineAtCells(0,f,v.cols);this._fillBottomLineAtCells(0,v.y2,v.x2)}this._state=v},i.prototype._onHideLinkUnderline=function(v){this._clearCurrentLink()},i}(P.BaseRenderLayer);_.LinkRenderLayer=B},function(Re,_,H){"use strict";var I=this&&this.__decorate||function(y,i,v,f){var h,n=arguments.length,o=n<3?i:f===null?f=Object.getOwnPropertyDescriptor(i,v):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(y,i,v,f);else for(var u=y.length-1;u>=0;u--)(h=y[u])&&(o=(n<3?h(o):n>3?h(i,v,o):h(i,v))||o);return n>3&&o&&Object.defineProperty(i,v,o),o},V=this&&this.__param||function(y,i){return function(v,f){i(v,f,y)}};Object.defineProperty(_,"__esModule",{value:!0}),_.MouseZone=_.Linkifier=void 0;var P=H(0),F=H(1),R=function(){function y(i,v,f){this._bufferService=i,this._logService=v,this._unicodeService=f,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new P.EventEmitter,this._onHideLinkUnderline=new P.EventEmitter,this._onLinkTooltip=new P.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(y.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),y.prototype.attachToDom=function(i,v){this._element=i,this._mouseZoneManager=v},y.prototype.linkifyRows=function(i,v){var f=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=i,this._rowsToLinkify.end=v):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,i),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,v)),this._mouseZoneManager.clearAll(i,v),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return f._linkifyRows()},y._timeBeforeLatency))},y.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var i=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var v=i.ydisp+this._rowsToLinkify.start;if(!(v>=i.lines.length)){for(var f=i.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,h=Math.ceil(2e3/this._bufferService.cols),n=this._bufferService.buffer.iterator(!1,v,f,h,h);n.hasNext();)for(var o=n.next(),u=0;u<this._linkMatchers.length;u++)this._doLinkifyRow(o.range.first,o.content,this._linkMatchers[u]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},y.prototype.registerLinkMatcher=function(i,v,f){if(f===void 0&&(f={}),!v)throw new Error("handler must be defined");var h={id:this._nextLinkMatcherId++,regex:i,handler:v,matchIndex:f.matchIndex,validationCallback:f.validationCallback,hoverTooltipCallback:f.tooltipCallback,hoverLeaveCallback:f.leaveCallback,willLinkActivate:f.willLinkActivate,priority:f.priority||0};return this._addLinkMatcherToList(h),h.id},y.prototype._addLinkMatcherToList=function(i){if(this._linkMatchers.length!==0){for(var v=this._linkMatchers.length-1;v>=0;v--)if(i.priority<=this._linkMatchers[v].priority)return void this._linkMatchers.splice(v+1,0,i);this._linkMatchers.splice(0,0,i)}else this._linkMatchers.push(i)},y.prototype.deregisterLinkMatcher=function(i){for(var v=0;v<this._linkMatchers.length;v++)if(this._linkMatchers[v].id===i)return this._linkMatchers.splice(v,1),!0;return!1},y.prototype._doLinkifyRow=function(i,v,f){for(var h,n=this,o=new RegExp(f.regex.source,(f.regex.flags||"")+"g"),u=-1,S=function(){var T=h[typeof f.matchIndex!="number"?0:f.matchIndex];if(!T)return O._logService.debug("match found without corresponding matchIndex",h,f),"break";if(u=v.indexOf(T,u+1),o.lastIndex=u+T.length,u<0)return"break";var E=O._bufferService.buffer.stringIndexToBufferIndex(i,u);if(E[0]<0)return"break";var C=O._bufferService.buffer.lines.get(E[0]);if(!C)return"break";var j=C.getFg(E[1]),x=j?j>>9&511:void 0;f.validationCallback?f.validationCallback(T,function(L){n._rowsTimeoutId||L&&n._addLink(E[1],E[0]-n._bufferService.buffer.ydisp,T,f,x)}):O._addLink(E[1],E[0]-O._bufferService.buffer.ydisp,T,f,x)},O=this;(h=o.exec(v))!==null&&S()!=="break";);},y.prototype._addLink=function(i,v,f,h,n){var o=this;if(this._mouseZoneManager&&this._element){var u=this._unicodeService.getStringCellWidth(f),S=i%this._bufferService.cols,O=v+Math.floor(i/this._bufferService.cols),T=(S+u)%this._bufferService.cols,E=O+Math.floor((S+u)/this._bufferService.cols);T===0&&(T=this._bufferService.cols,E--),this._mouseZoneManager.add(new B(S+1,O+1,T+1,E+1,function(C){if(h.handler)return h.handler(C,f);var j=window.open();j?(j.opener=null,j.location.href=f):console.warn("Opening link blocked as opener could not be cleared")},function(){o._onShowLinkUnderline.fire(o._createLinkHoverEvent(S,O,T,E,n)),o._element.classList.add("xterm-cursor-pointer")},function(C){o._onLinkTooltip.fire(o._createLinkHoverEvent(S,O,T,E,n)),h.hoverTooltipCallback&&h.hoverTooltipCallback(C,f,{start:{x:S,y:O},end:{x:T,y:E}})},function(){o._onHideLinkUnderline.fire(o._createLinkHoverEvent(S,O,T,E,n)),o._element.classList.remove("xterm-cursor-pointer"),h.hoverLeaveCallback&&h.hoverLeaveCallback()},function(C){return!h.willLinkActivate||h.willLinkActivate(C,f)}))}},y.prototype._createLinkHoverEvent=function(i,v,f,h,n){return{x1:i,y1:v,x2:f,y2:h,cols:this._bufferService.cols,fg:n}},y._timeBeforeLatency=200,y=I([V(0,F.IBufferService),V(1,F.ILogService),V(2,F.IUnicodeService)],y)}();_.Linkifier=R;var B=function(y,i,v,f,h,n,o,u,S){this.x1=y,this.y1=i,this.x2=v,this.y2=f,this.clickCallback=h,this.hoverCallback=n,this.tooltipCallback=o,this.leaveCallback=u,this.willLinkActivate=S};_.MouseZone=B},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(T,E){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,j){C.__proto__=j}||function(C,j){for(var x in j)j.hasOwnProperty(x)&&(C[x]=j[x])})(T,E)},function(T,E){function C(){this.constructor=T}I(T,E),T.prototype=E===null?Object.create(E):(C.prototype=E.prototype,new C)}),P=this&&this.__decorate||function(T,E,C,j){var x,L=arguments.length,N=L<3?E:j===null?j=Object.getOwnPropertyDescriptor(E,C):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(T,E,C,j);else for(var z=T.length-1;z>=0;z--)(x=T[z])&&(N=(L<3?x(N):L>3?x(E,C,N):x(E,C))||N);return L>3&&N&&Object.defineProperty(E,C,N),N},F=this&&this.__param||function(T,E){return function(C,j){E(C,j,T)}};Object.defineProperty(_,"__esModule",{value:!0}),_.SelectionService=void 0;var R=H(11),B=H(52),y=H(4),i=H(0),v=H(5),f=H(1),h=H(30),n=H(53),o=H(2),u="\xA0",S=new RegExp(u,"g"),O=function(T){function E(C,j,x,L,N,z,te){var J=T.call(this)||this;return J._element=C,J._screenElement=j,J._bufferService=x,J._coreService=L,J._mouseService=N,J._optionsService=z,J._renderService=te,J._dragScrollAmount=0,J._enabled=!0,J._workCell=new y.CellData,J._mouseDownTimeStamp=0,J._onLinuxMouseSelection=J.register(new i.EventEmitter),J._onRedrawRequest=J.register(new i.EventEmitter),J._onSelectionChange=J.register(new i.EventEmitter),J._onRequestScrollLines=J.register(new i.EventEmitter),J._mouseMoveListener=function(ge){return J._onMouseMove(ge)},J._mouseUpListener=function(ge){return J._onMouseUp(ge)},J._coreService.onUserInput(function(){J.hasSelection&&J.clearSelection()}),J._trimListener=J._bufferService.buffer.lines.onTrim(function(ge){return J._onTrim(ge)}),J.register(J._bufferService.buffers.onBufferActivate(function(ge){return J._onBufferActivate(ge)})),J.enable(),J._model=new B.SelectionModel(J._bufferService),J._activeSelectionMode=0,J}return V(E,T),Object.defineProperty(E.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),E.prototype.dispose=function(){this._removeMouseDownListeners()},E.prototype.reset=function(){this.clearSelection()},E.prototype.disable=function(){this.clearSelection(),this._enabled=!1},E.prototype.enable=function(){this._enabled=!0},Object.defineProperty(E.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"hasSelection",{get:function(){var C=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!(!C||!j)&&(C[0]!==j[0]||C[1]!==j[1])},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"selectionText",{get:function(){var C=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;if(!C||!j)return"";var x=this._bufferService.buffer,L=[];if(this._activeSelectionMode===3){if(C[0]===j[0])return"";for(var N=C[1];N<=j[1];N++){var z=x.translateBufferLineToString(N,!0,C[0],j[0]);L.push(z)}}else{var te=C[1]===j[1]?j[0]:void 0;for(L.push(x.translateBufferLineToString(C[1],!0,C[0],te)),N=C[1]+1;N<=j[1]-1;N++){var J=x.lines.get(N);z=x.translateBufferLineToString(N,!0),J&&J.isWrapped?L[L.length-1]+=z:L.push(z)}C[1]!==j[1]&&(J=x.lines.get(j[1]),z=x.translateBufferLineToString(j[1],!0,0,j[0]),J&&J.isWrapped?L[L.length-1]+=z:L.push(z))}return L.map(function(ge){return ge.replace(S," ")}).join(R.isWindows?`\r
`:`
`)},enumerable:!1,configurable:!0}),E.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},E.prototype.refresh=function(C){var j=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return j._refresh()})),R.isLinux&&C&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},E.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},E.prototype.isClickInSelection=function(C){var j=this._getMouseBufferCoords(C),x=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!!(x&&L&&j)&&this._areCoordsInSelection(j,x,L)},E.prototype._areCoordsInSelection=function(C,j,x){return C[1]>j[1]&&C[1]<x[1]||j[1]===x[1]&&C[1]===j[1]&&C[0]>=j[0]&&C[0]<x[0]||j[1]<x[1]&&C[1]===x[1]&&C[0]<x[0]||j[1]<x[1]&&C[1]===j[1]&&C[0]>=j[0]},E.prototype.selectWordAtCursor=function(C){var j=this._getMouseBufferCoords(C);j&&(this._selectWordAt(j,!1),this._model.selectionEnd=void 0,this.refresh(!0))},E.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},E.prototype.selectLines=function(C,j){this._model.clearSelection(),C=Math.max(C,0),j=Math.min(j,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,C],this._model.selectionEnd=[this._bufferService.cols,j],this.refresh(),this._onSelectionChange.fire()},E.prototype._onTrim=function(C){this._model.onTrim(C)&&this.refresh()},E.prototype._getMouseBufferCoords=function(C){var j=this._mouseService.getCoords(C,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(j)return j[0]--,j[1]--,j[1]+=this._bufferService.buffer.ydisp,j},E.prototype._getMouseEventScrollAmount=function(C){var j=h.getCoordsRelativeToElement(C,this._screenElement)[1],x=this._renderService.dimensions.canvasHeight;return j>=0&&j<=x?0:(j>x&&(j-=x),j=Math.min(Math.max(j,-50),50),(j/=50)/Math.abs(j)+Math.round(14*j))},E.prototype.shouldForceSelection=function(C){return R.isMac?C.altKey&&this._optionsService.options.macOptionClickForcesSelection:C.shiftKey},E.prototype.onMouseDown=function(C){if(this._mouseDownTimeStamp=C.timeStamp,(C.button!==2||!this.hasSelection)&&C.button===0){if(!this._enabled){if(!this.shouldForceSelection(C))return;C.stopPropagation()}C.preventDefault(),this._dragScrollAmount=0,this._enabled&&C.shiftKey?this._onIncrementalClick(C):C.detail===1?this._onSingleClick(C):C.detail===2?this._onDoubleClick(C):C.detail===3&&this._onTripleClick(C),this._addMouseDownListeners(),this.refresh(!0)}},E.prototype._addMouseDownListeners=function(){var C=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return C._dragScroll()},50)},E.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},E.prototype._onIncrementalClick=function(C){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(C))},E.prototype._onSingleClick=function(C){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(C)?3:0,this._model.selectionStart=this._getMouseBufferCoords(C),this._model.selectionStart){this._model.selectionEnd=void 0;var j=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);j&&j.length!==this._model.selectionStart[0]&&j.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},E.prototype._onDoubleClick=function(C){var j=this._getMouseBufferCoords(C);j&&(this._activeSelectionMode=1,this._selectWordAt(j,!0))},E.prototype._onTripleClick=function(C){var j=this._getMouseBufferCoords(C);j&&(this._activeSelectionMode=2,this._selectLineAt(j[1]))},E.prototype.shouldColumnSelect=function(C){return C.altKey&&!(R.isMac&&this._optionsService.options.macOptionClickForcesSelection)},E.prototype._onMouseMove=function(C){if(C.stopImmediatePropagation(),this._model.selectionStart){var j=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(C),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(C),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var x=this._bufferService.buffer;if(this._model.selectionEnd[1]<x.lines.length){var L=x.lines.get(this._model.selectionEnd[1]);L&&L.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}j&&j[0]===this._model.selectionEnd[0]&&j[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},E.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var C=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(C.ydisp+this._bufferService.rows,C.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=C.ydisp),this.refresh()}},E.prototype._onMouseUp=function(C){var j=C.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&j<500&&C.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var x=this._mouseService.getCoords(C,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(x&&x[0]!==void 0&&x[1]!==void 0){var L=n.moveToCellSequence(x[0]-1,x[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(L,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},E.prototype._onBufferActivate=function(C){var j=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=C.activeBuffer.lines.onTrim(function(x){return j._onTrim(x)})},E.prototype._convertViewportColToCharacterIndex=function(C,j){for(var x=j[0],L=0;j[0]>=L;L++){var N=C.loadCell(L,this._workCell).getChars().length;this._workCell.getWidth()===0?x--:N>1&&j[0]!==L&&(x+=N-1)}return x},E.prototype.setSelection=function(C,j,x){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[C,j],this._model.selectionStartLength=x,this.refresh()},E.prototype._getWordAt=function(C,j,x,L){if(x===void 0&&(x=!0),L===void 0&&(L=!0),!(C[0]>=this._bufferService.cols)){var N=this._bufferService.buffer,z=N.lines.get(C[1]);if(z){var te=N.translateBufferLineToString(C[1],!1),J=this._convertViewportColToCharacterIndex(z,C),ge=J,_e=C[0]-J,se=0,Y=0,ie=0,U=0;if(te.charAt(J)===" "){for(;J>0&&te.charAt(J-1)===" ";)J--;for(;ge<te.length&&te.charAt(ge+1)===" ";)ge++}else{var Z=C[0],K=C[0];z.getWidth(Z)===0&&(se++,Z--),z.getWidth(K)===2&&(Y++,K++);var k=z.getString(K).length;for(k>1&&(U+=k-1,ge+=k-1);Z>0&&J>0&&!this._isCharWordSeparator(z.loadCell(Z-1,this._workCell));){z.loadCell(Z-1,this._workCell);var D=this._workCell.getChars().length;this._workCell.getWidth()===0?(se++,Z--):D>1&&(ie+=D-1,J-=D-1),J--,Z--}for(;K<z.length&&ge+1<te.length&&!this._isCharWordSeparator(z.loadCell(K+1,this._workCell));){z.loadCell(K+1,this._workCell);var re=this._workCell.getChars().length;this._workCell.getWidth()===2?(Y++,K++):re>1&&(U+=re-1,ge+=re-1),ge++,K++}}ge++;var pe=J+_e-se+ie,Oe=Math.min(this._bufferService.cols,ge-J+se+Y-ie-U);if(j||te.slice(J,ge).trim()!==""){if(x&&pe===0&&z.getCodePoint(0)!==32){var $e=N.lines.get(C[1]-1);if($e&&z.isWrapped&&$e.getCodePoint(this._bufferService.cols-1)!==32){var Ge=this._getWordAt([this._bufferService.cols-1,C[1]-1],!1,!0,!1);if(Ge){var ke=this._bufferService.cols-Ge.start;pe-=ke,Oe+=ke}}}if(L&&pe+Oe===this._bufferService.cols&&z.getCodePoint(this._bufferService.cols-1)!==32){var et=N.lines.get(C[1]+1);if(et&&et.isWrapped&&et.getCodePoint(0)!==32){var Ke=this._getWordAt([0,C[1]+1],!1,!1,!0);Ke&&(Oe+=Ke.length)}}return{start:pe,length:Oe}}}}},E.prototype._selectWordAt=function(C,j){var x=this._getWordAt(C,j);if(x){for(;x.start<0;)x.start+=this._bufferService.cols,C[1]--;this._model.selectionStart=[x.start,C[1]],this._model.selectionStartLength=x.length}},E.prototype._selectToWordAt=function(C){var j=this._getWordAt(C,!0);if(j){for(var x=C[1];j.start<0;)j.start+=this._bufferService.cols,x--;if(!this._model.areSelectionValuesReversed())for(;j.start+j.length>this._bufferService.cols;)j.length-=this._bufferService.cols,x++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?j.start:j.start+j.length,x]}},E.prototype._isCharWordSeparator=function(C){return C.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(C.getChars())>=0},E.prototype._selectLineAt=function(C){var j=this._bufferService.buffer.getWrappedRangeForLine(C);this._model.selectionStart=[0,j.first],this._model.selectionEnd=[this._bufferService.cols,j.last],this._model.selectionStartLength=0},E=P([F(2,f.IBufferService),F(3,f.ICoreService),F(4,v.IMouseService),F(5,f.IOptionsService),F(6,v.IRenderService)],E)}(o.Disposable);_.SelectionService=O},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.SelectionModel=void 0;var I=function(){function V(P){this._bufferService=P,this.isSelectAllActive=!1,this.selectionStartLength=0}return V.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(V.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var P=this.selectionStart[0]+this.selectionStartLength;return P>this._bufferService.cols?[P%this._bufferService.cols,this.selectionStart[1]+Math.floor(P/this._bufferService.cols)]:[P,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),V.prototype.areSelectionValuesReversed=function(){var P=this.selectionStart,F=this.selectionEnd;return!(!P||!F)&&(P[1]>F[1]||P[1]===F[1]&&P[0]>F[0])},V.prototype.onTrim=function(P){return this.selectionStart&&(this.selectionStart[1]-=P),this.selectionEnd&&(this.selectionEnd[1]-=P),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},V}();_.SelectionModel=I},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.moveToCellSequence=void 0;var I=H(12);function V(i,v,f,h){var n=i-P(f,i),o=v-P(f,v);return y(Math.abs(n-o)-function(u,S,O){for(var T=0,E=u-P(O,u),C=S-P(O,S),j=0;j<Math.abs(E-C);j++){var x=F(u,S)==="A"?-1:1,L=O.buffer.lines.get(E+x*j);L&&L.isWrapped&&T++}return T}(i,v,f),B(F(i,v),h))}function P(i,v){for(var f=0,h=i.buffer.lines.get(v),n=h&&h.isWrapped;n&&v>=0&&v<i.rows;)f++,n=(h=i.buffer.lines.get(--v))&&h.isWrapped;return f}function F(i,v){return i>v?"A":"B"}function R(i,v,f,h,n,o){for(var u=i,S=v,O="";u!==f||S!==h;)u+=n?1:-1,n&&u>o.cols-1?(O+=o.buffer.translateBufferLineToString(S,!1,i,u),u=0,i=0,S++):!n&&u<0&&(O+=o.buffer.translateBufferLineToString(S,!1,0,i+1),i=u=o.cols-1,S--);return O+o.buffer.translateBufferLineToString(S,!1,i,u)}function B(i,v){var f=v?"O":"[";return I.C0.ESC+f+i}function y(i,v){i=Math.floor(i);for(var f="",h=0;h<i;h++)f+=v;return f}_.moveToCellSequence=function(i,v,f,h){var n,o=f.buffer.x,u=f.buffer.y;if(!f.buffer.hasScrollback)return function(O,T,E,C,j,x){return V(T,C,j,x).length===0?"":y(R(O,T,O,T-P(j,T),!1,j).length,B("D",x))}(o,u,0,v,f,h)+V(u,v,f,h)+function(O,T,E,C,j,x){var L;L=V(T,C,j,x).length>0?C-P(j,C):T;var N=C,z=function(te,J,ge,_e,se,Y){var ie;return ie=V(ge,_e,se,Y).length>0?_e-P(se,_e):J,te<ge&&ie<=_e||te>=ge&&ie<_e?"C":"D"}(O,T,E,C,j,x);return y(R(O,L,E,N,z==="C",j).length,B(z,x))}(o,u,i,v,f,h);if(u===v)return n=o>i?"D":"C",y(Math.abs(o-i),B(n,h));n=u>v?"D":"C";var S=Math.abs(u-v);return y(function(O,T){return T.cols-O}(u>v?i:o,f)+(S-1)*f.cols+1+((u>v?o:i)-1),B(n,h))}},function(Re,_,H){"use strict";var I=this&&this.__decorate||function(R,B,y,i){var v,f=arguments.length,h=f<3?B:i===null?i=Object.getOwnPropertyDescriptor(B,y):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(R,B,y,i);else for(var n=R.length-1;n>=0;n--)(v=R[n])&&(h=(f<3?v(h):f>3?v(B,y,h):v(B,y))||h);return f>3&&h&&Object.defineProperty(B,y,h),h},V=this&&this.__param||function(R,B){return function(y,i){B(y,i,R)}};Object.defineProperty(_,"__esModule",{value:!0}),_.SoundService=void 0;var P=H(1),F=function(){function R(B){this._optionsService=B}return Object.defineProperty(R,"audioContext",{get:function(){if(!R._audioContext){var B=window.AudioContext||window.webkitAudioContext;if(!B)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;R._audioContext=new B}return R._audioContext},enumerable:!1,configurable:!0}),R.prototype.playBellSound=function(){var B=R.audioContext;if(B){var y=B.createBufferSource();B.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(i){y.buffer=i,y.connect(B.destination),y.start(0)})}},R.prototype._base64ToArrayBuffer=function(B){for(var y=window.atob(B),i=y.length,v=new Uint8Array(i),f=0;f<i;f++)v[f]=y.charCodeAt(f);return v.buffer},R.prototype._removeMimeType=function(B){return B.split(",")[1]},R=I([V(0,P.IOptionsService)],R)}();_.SoundService=F},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(f,h){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var u in o)o.hasOwnProperty(u)&&(n[u]=o[u])})(f,h)},function(f,h){function n(){this.constructor=f}I(f,h),f.prototype=h===null?Object.create(h):(n.prototype=h.prototype,new n)}),P=this&&this.__decorate||function(f,h,n,o){var u,S=arguments.length,O=S<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,n):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(f,h,n,o);else for(var T=f.length-1;T>=0;T--)(u=f[T])&&(O=(S<3?u(O):S>3?u(h,n,O):u(h,n))||O);return S>3&&O&&Object.defineProperty(h,n,O),O},F=this&&this.__param||function(f,h){return function(n,o){h(n,o,f)}};Object.defineProperty(_,"__esModule",{value:!0}),_.MouseZoneManager=void 0;var R=H(2),B=H(7),y=H(5),i=H(1),v=function(f){function h(n,o,u,S,O,T){var E=f.call(this)||this;return E._element=n,E._screenElement=o,E._bufferService=u,E._mouseService=S,E._selectionService=O,E._optionsService=T,E._zones=[],E._areZonesActive=!1,E._lastHoverCoords=[void 0,void 0],E._initialSelectionLength=0,E.register(B.addDisposableDomListener(E._element,"mousedown",function(C){return E._onMouseDown(C)})),E._mouseMoveListener=function(C){return E._onMouseMove(C)},E._mouseLeaveListener=function(C){return E._onMouseLeave(C)},E._clickListener=function(C){return E._onClick(C)},E}return V(h,f),h.prototype.dispose=function(){f.prototype.dispose.call(this),this._deactivate()},h.prototype.add=function(n){this._zones.push(n),this._zones.length===1&&this._activate()},h.prototype.clearAll=function(n,o){if(this._zones.length!==0){n&&o||(n=0,o=this._bufferService.rows-1);for(var u=0;u<this._zones.length;u++){var S=this._zones[u];(S.y1>n&&S.y1<=o+1||S.y2>n&&S.y2<=o+1||S.y1<n&&S.y2>o+1)&&(this._currentZone&&this._currentZone===S&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(u--,1))}this._zones.length===0&&this._deactivate()}},h.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},h.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},h.prototype._onMouseMove=function(n){this._lastHoverCoords[0]===n.pageX&&this._lastHoverCoords[1]===n.pageY||(this._onHover(n),this._lastHoverCoords=[n.pageX,n.pageY])},h.prototype._onHover=function(n){var o=this,u=this._findZoneEventAt(n);u!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),u&&(this._currentZone=u,u.hoverCallback&&u.hoverCallback(n),this._tooltipTimeout=window.setTimeout(function(){return o._onTooltip(n)},this._optionsService.options.linkTooltipHoverDuration)))},h.prototype._onTooltip=function(n){this._tooltipTimeout=void 0;var o=this._findZoneEventAt(n);o&&o.tooltipCallback&&o.tooltipCallback(n)},h.prototype._onMouseDown=function(n){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var o=this._findZoneEventAt(n);o!=null&&o.willLinkActivate(n)&&(n.preventDefault(),n.stopImmediatePropagation())}},h.prototype._onMouseLeave=function(n){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},h.prototype._onClick=function(n){var o=this._findZoneEventAt(n),u=this._getSelectionLength();o&&u===this._initialSelectionLength&&(o.clickCallback(n),n.preventDefault(),n.stopImmediatePropagation())},h.prototype._getSelectionLength=function(){var n=this._selectionService.selectionText;return n?n.length:0},h.prototype._findZoneEventAt=function(n){var o=this._mouseService.getCoords(n,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(o)for(var u=o[0],S=o[1],O=0;O<this._zones.length;O++){var T=this._zones[O];if(T.y1===T.y2){if(S===T.y1&&u>=T.x1&&u<T.x2)return T}else if(S===T.y1&&u>=T.x1||S===T.y2&&u<T.x2||S>T.y1&&S<T.y2)return T}},h=P([F(2,i.IBufferService),F(3,y.IMouseService),F(4,y.ISelectionService),F(5,i.IOptionsService)],h)}(R.Disposable);_.MouseZoneManager=v},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(h,n){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,u){o.__proto__=u}||function(o,u){for(var S in u)u.hasOwnProperty(S)&&(o[S]=u[S])})(h,n)},function(h,n){function o(){this.constructor=h}I(h,n),h.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)});Object.defineProperty(_,"__esModule",{value:!0}),_.AccessibilityManager=void 0;var P=H(18),F=H(11),R=H(31),B=H(7),y=H(2),i=H(32),v=H(17),f=function(h){function n(o,u){var S=h.call(this)||this;S._terminal=o,S._renderService=u,S._liveRegionLineCount=0,S._charsToConsume=[],S._charsToAnnounce="",S._accessibilityTreeRoot=document.createElement("div"),S._accessibilityTreeRoot.classList.add("xterm-accessibility"),S._rowContainer=document.createElement("div"),S._rowContainer.classList.add("xterm-accessibility-tree"),S._rowContainer.setAttribute("role","list"),S._rowElements=[];for(var O=0;O<S._terminal.rows;O++)S._rowElements[O]=S._createAccessibilityTreeNode(),S._rowContainer.appendChild(S._rowElements[O]);if(S._topBoundaryFocusListener=function(T){return S._onBoundaryFocus(T,0)},S._bottomBoundaryFocusListener=function(T){return S._onBoundaryFocus(T,1)},S._rowElements[0].addEventListener("focus",S._topBoundaryFocusListener),S._rowElements[S._rowElements.length-1].addEventListener("focus",S._bottomBoundaryFocusListener),S._refreshRowsDimensions(),S._accessibilityTreeRoot.appendChild(S._rowContainer),S._renderRowsDebouncer=new R.RenderDebouncer(S._renderRows.bind(S)),S._refreshRows(),S._liveRegion=document.createElement("div"),S._liveRegion.classList.add("live-region"),S._liveRegion.setAttribute("aria-live","assertive"),S._accessibilityTreeRoot.appendChild(S._liveRegion),!S._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return S._terminal.element.insertAdjacentElement("afterbegin",S._accessibilityTreeRoot),S.register(S._renderRowsDebouncer),S.register(S._terminal.onResize(function(T){return S._onResize(T.rows)})),S.register(S._terminal.onRender(function(T){return S._refreshRows(T.start,T.end)})),S.register(S._terminal.onScroll(function(){return S._refreshRows()})),S.register(S._terminal.onA11yChar(function(T){return S._onChar(T)})),S.register(S._terminal.onLineFeed(function(){return S._onChar(`
`)})),S.register(S._terminal.onA11yTab(function(T){return S._onTab(T)})),S.register(S._terminal.onKey(function(T){return S._onKey(T.key)})),S.register(S._terminal.onBlur(function(){return S._clearLiveRegion()})),S.register(S._renderService.onDimensionsChange(function(){return S._refreshRowsDimensions()})),S._screenDprMonitor=new i.ScreenDprMonitor,S.register(S._screenDprMonitor),S._screenDprMonitor.setListener(function(){return S._refreshRowsDimensions()}),S.register(B.addDisposableDomListener(window,"resize",function(){return S._refreshRowsDimensions()})),S}return V(n,h),n.prototype.dispose=function(){h.prototype.dispose.call(this),v.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},n.prototype._onBoundaryFocus=function(o,u){var S=o.target,O=this._rowElements[u===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")!==(u===0?"1":""+this._terminal.buffer.lines.length)&&o.relatedTarget===O){var T,E;if(u===0?(T=S,E=this._rowElements.pop(),this._rowContainer.removeChild(E)):(T=this._rowElements.shift(),E=S,this._rowContainer.removeChild(T)),T.removeEventListener("focus",this._topBoundaryFocusListener),E.removeEventListener("focus",this._bottomBoundaryFocusListener),u===0){var C=this._createAccessibilityTreeNode();this._rowElements.unshift(C),this._rowContainer.insertAdjacentElement("afterbegin",C)}else C=this._createAccessibilityTreeNode(),this._rowElements.push(C),this._rowContainer.appendChild(C);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(u===0?-1:1),this._rowElements[u===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}},n.prototype._onResize=function(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var u=this._rowContainer.children.length;u<this._terminal.rows;u++)this._rowElements[u]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[u]);for(;this._rowElements.length>o;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},n.prototype._createAccessibilityTreeNode=function(){var o=document.createElement("div");return o.setAttribute("role","listitem"),o.tabIndex=-1,this._refreshRowDimensions(o),o},n.prototype._onTab=function(o){for(var u=0;u<o;u++)this._onChar(" ")},n.prototype._onChar=function(o){var u=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==o&&(this._charsToAnnounce+=o):this._charsToAnnounce+=o,o===`
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=P.tooMuchOutput)),F.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){u._accessibilityTreeRoot.appendChild(u._liveRegion)},0))},n.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,F.isMac&&v.removeElementFromParent(this._liveRegion)},n.prototype._onKey=function(o){this._clearLiveRegion(),this._charsToConsume.push(o)},n.prototype._refreshRows=function(o,u){this._renderRowsDebouncer.refresh(o,u,this._terminal.rows)},n.prototype._renderRows=function(o,u){for(var S=this._terminal.buffer,O=S.lines.length.toString(),T=o;T<=u;T++){var E=S.translateBufferLineToString(S.ydisp+T,!0),C=(S.ydisp+T+1).toString(),j=this._rowElements[T];j&&(E.length===0?j.innerHTML="&nbsp;":j.textContent=E,j.setAttribute("aria-posinset",C),j.setAttribute("aria-setsize",O))}this._announceCharacters()},n.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var o=0;o<this._terminal.rows;o++)this._refreshRowDimensions(this._rowElements[o])}},n.prototype._refreshRowDimensions=function(o){o.style.height=this._renderService.dimensions.actualCellHeight+"px"},n.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},n}(y.Disposable);_.AccessibilityManager=f},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(S,O){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,E){T.__proto__=E}||function(T,E){for(var C in E)E.hasOwnProperty(C)&&(T[C]=E[C])})(S,O)},function(S,O){function T(){this.constructor=S}I(S,O),S.prototype=O===null?Object.create(O):(T.prototype=O.prototype,new T)}),P=this&&this.__decorate||function(S,O,T,E){var C,j=arguments.length,x=j<3?O:E===null?E=Object.getOwnPropertyDescriptor(O,T):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(S,O,T,E);else for(var L=S.length-1;L>=0;L--)(C=S[L])&&(x=(j<3?C(x):j>3?C(O,T,x):C(O,T))||x);return j>3&&x&&Object.defineProperty(O,T,x),x},F=this&&this.__param||function(S,O){return function(T,E){O(T,E,S)}};Object.defineProperty(_,"__esModule",{value:!0}),_.DomRenderer=void 0;var R=H(58),B=H(9),y=H(2),i=H(5),v=H(1),f=H(0),h=H(10),n=H(17),o=1,u=function(S){function O(T,E,C,j,x,L,N,z,te){var J=S.call(this)||this;return J._colors=T,J._element=E,J._screenElement=C,J._viewportElement=j,J._linkifier=x,J._linkifier2=L,J._charSizeService=N,J._optionsService=z,J._bufferService=te,J._terminalClass=o++,J._rowElements=[],J._rowContainer=document.createElement("div"),J._rowContainer.classList.add("xterm-rows"),J._rowContainer.style.lineHeight="normal",J._rowContainer.setAttribute("aria-hidden","true"),J._refreshRowElements(J._bufferService.cols,J._bufferService.rows),J._selectionContainer=document.createElement("div"),J._selectionContainer.classList.add("xterm-selection"),J._selectionContainer.setAttribute("aria-hidden","true"),J.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},J._updateDimensions(),J._injectCss(),J._rowFactory=new R.DomRendererRowFactory(document,J._optionsService,J._colors),J._element.classList.add("xterm-dom-renderer-owner-"+J._terminalClass),J._screenElement.appendChild(J._rowContainer),J._screenElement.appendChild(J._selectionContainer),J._linkifier.onShowLinkUnderline(function(ge){return J._onLinkHover(ge)}),J._linkifier.onHideLinkUnderline(function(ge){return J._onLinkLeave(ge)}),J._linkifier2.onShowLinkUnderline(function(ge){return J._onLinkHover(ge)}),J._linkifier2.onHideLinkUnderline(function(ge){return J._onLinkLeave(ge)}),J}return V(O,S),Object.defineProperty(O.prototype,"onRequestRedraw",{get:function(){return new f.EventEmitter().event},enumerable:!1,configurable:!0}),O.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),n.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),S.prototype.dispose.call(this)},O.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var T=0,E=this._rowElements;T<E.length;T++){var C=E[T];C.style.width=this.dimensions.canvasWidth+"px",C.style.height=this.dimensions.actualCellHeight+"px",C.style.lineHeight=this.dimensions.actualCellHeight+"px",C.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var j=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=j,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},O.prototype.setColors=function(T){this._colors=T,this._injectCss()},O.prototype._injectCss=function(){var T=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var E=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";E+=this._terminalSelector+" span:not(."+R.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+R.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+R.ITALIC_CLASS+" { font-style: italic;}",E+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",E+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",E+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+R.CURSOR_CLASS+"."+R.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+R.CURSOR_CLASS+"."+R.CURSOR_BLINK_CLASS+":not(."+R.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+R.CURSOR_CLASS+"."+R.CURSOR_BLINK_CLASS+"."+R.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+R.CURSOR_CLASS+"."+R.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+R.CURSOR_CLASS+"."+R.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+R.CURSOR_CLASS+"."+R.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",E+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(C,j){E+=T._terminalSelector+" .xterm-fg-"+j+" { color: "+C.css+"; }"+T._terminalSelector+" .xterm-bg-"+j+" { background-color: "+C.css+"; }"}),E+=this._terminalSelector+" .xterm-fg-"+B.INVERTED_DEFAULT_COLOR+" { color: "+h.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+B.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=E},O.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},O.prototype._refreshRowElements=function(T,E){for(var C=this._rowElements.length;C<=E;C++){var j=document.createElement("div");this._rowContainer.appendChild(j),this._rowElements.push(j)}for(;this._rowElements.length>E;)this._rowContainer.removeChild(this._rowElements.pop())},O.prototype.onResize=function(T,E){this._refreshRowElements(T,E),this._updateDimensions()},O.prototype.onCharSizeChanged=function(){this._updateDimensions()},O.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},O.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},O.prototype.onSelectionChanged=function(T,E,C){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(T&&E){var j=T[1]-this._bufferService.buffer.ydisp,x=E[1]-this._bufferService.buffer.ydisp,L=Math.max(j,0),N=Math.min(x,this._bufferService.rows-1);if(!(L>=this._bufferService.rows||N<0)){var z=document.createDocumentFragment();if(C)z.appendChild(this._createSelectionElement(L,T[0],E[0],N-L+1));else{var te=j===L?T[0]:0,J=L===N?E[0]:this._bufferService.cols;z.appendChild(this._createSelectionElement(L,te,J));var ge=N-L-1;if(z.appendChild(this._createSelectionElement(L+1,0,this._bufferService.cols,ge)),L!==N){var _e=x===N?E[0]:this._bufferService.cols;z.appendChild(this._createSelectionElement(N,0,_e))}}this._selectionContainer.appendChild(z)}}},O.prototype._createSelectionElement=function(T,E,C,j){j===void 0&&(j=1);var x=document.createElement("div");return x.style.height=j*this.dimensions.actualCellHeight+"px",x.style.top=T*this.dimensions.actualCellHeight+"px",x.style.left=E*this.dimensions.actualCellWidth+"px",x.style.width=this.dimensions.actualCellWidth*(C-E)+"px",x},O.prototype.onCursorMove=function(){},O.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},O.prototype.clear=function(){for(var T=0,E=this._rowElements;T<E.length;T++)E[T].innerHTML=""},O.prototype.renderRows=function(T,E){for(var C=this._bufferService.buffer.ybase+this._bufferService.buffer.y,j=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),x=this._optionsService.options.cursorBlink,L=T;L<=E;L++){var N=this._rowElements[L];N.innerHTML="";var z=L+this._bufferService.buffer.ydisp,te=this._bufferService.buffer.lines.get(z),J=this._optionsService.options.cursorStyle;N.appendChild(this._rowFactory.createRow(te,z===C,J,j,x,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(O.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),O.prototype.registerCharacterJoiner=function(T){return-1},O.prototype.deregisterCharacterJoiner=function(T){return!1},O.prototype._onLinkHover=function(T){this._setCellUnderline(T.x1,T.x2,T.y1,T.y2,T.cols,!0)},O.prototype._onLinkLeave=function(T){this._setCellUnderline(T.x1,T.x2,T.y1,T.y2,T.cols,!1)},O.prototype._setCellUnderline=function(T,E,C,j,x,L){for(;T!==E||C!==j;){var N=this._rowElements[C];if(!N)return;var z=N.children[T];z&&(z.style.textDecoration=L?"underline":"none"),++T>=x&&(T=0,C++)}},O=P([F(6,i.ICharSizeService),F(7,v.IOptionsService),F(8,v.IBufferService)],O)}(y.Disposable);_.DomRenderer=u},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.DomRendererRowFactory=_.CURSOR_STYLE_UNDERLINE_CLASS=_.CURSOR_STYLE_BAR_CLASS=_.CURSOR_STYLE_BLOCK_CLASS=_.CURSOR_BLINK_CLASS=_.CURSOR_CLASS=_.UNDERLINE_CLASS=_.ITALIC_CLASS=_.DIM_CLASS=_.BOLD_CLASS=void 0;var I=H(9),V=H(3),P=H(4),F=H(10);_.BOLD_CLASS="xterm-bold",_.DIM_CLASS="xterm-dim",_.ITALIC_CLASS="xterm-italic",_.UNDERLINE_CLASS="xterm-underline",_.CURSOR_CLASS="xterm-cursor",_.CURSOR_BLINK_CLASS="xterm-cursor-blink",_.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",_.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",_.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var R=function(){function y(i,v,f){this._document=i,this._optionsService=v,this._colors=f,this._workCell=new P.CellData}return y.prototype.setColors=function(i){this._colors=i},y.prototype.createRow=function(i,v,f,h,n,o,u){for(var S=this._document.createDocumentFragment(),O=0,T=Math.min(i.length,u)-1;T>=0;T--)if(i.loadCell(T,this._workCell).getCode()!==V.NULL_CELL_CODE||v&&T===h){O=T+1;break}for(T=0;T<O;T++){i.loadCell(T,this._workCell);var E=this._workCell.getWidth();if(E!==0){var C=this._document.createElement("span");if(E>1&&(C.style.width=o*E+"px"),v&&T===h)switch(C.classList.add(_.CURSOR_CLASS),n&&C.classList.add(_.CURSOR_BLINK_CLASS),f){case"bar":C.classList.add(_.CURSOR_STYLE_BAR_CLASS);break;case"underline":C.classList.add(_.CURSOR_STYLE_UNDERLINE_CLASS);break;default:C.classList.add(_.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&C.classList.add(_.BOLD_CLASS),this._workCell.isItalic()&&C.classList.add(_.ITALIC_CLASS),this._workCell.isDim()&&C.classList.add(_.DIM_CLASS),this._workCell.isUnderline()&&C.classList.add(_.UNDERLINE_CLASS),this._workCell.isInvisible()?C.textContent=V.WHITESPACE_CELL_CHAR:C.textContent=this._workCell.getChars()||V.WHITESPACE_CELL_CHAR;var j=this._workCell.getFgColor(),x=this._workCell.getFgColorMode(),L=this._workCell.getBgColor(),N=this._workCell.getBgColorMode(),z=!!this._workCell.isInverse();if(z){var te=j;j=L,L=te;var J=x;x=N,N=J}switch(x){case 16777216:case 33554432:this._workCell.isBold()&&j<8&&this._optionsService.options.drawBoldTextInBrightColors&&(j+=8),this._applyMinimumContrast(C,this._colors.background,this._colors.ansi[j])||C.classList.add("xterm-fg-"+j);break;case 50331648:var ge=F.rgba.toColor(j>>16&255,j>>8&255,255&j);this._applyMinimumContrast(C,this._colors.background,ge)||this._addStyle(C,"color:#"+B(j.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(C,this._colors.background,this._colors.foreground)||z&&C.classList.add("xterm-fg-"+I.INVERTED_DEFAULT_COLOR)}switch(N){case 16777216:case 33554432:C.classList.add("xterm-bg-"+L);break;case 50331648:this._addStyle(C,"background-color:#"+B(L.toString(16),"0",6));break;case 0:default:z&&C.classList.add("xterm-bg-"+I.INVERTED_DEFAULT_COLOR)}S.appendChild(C)}}return S},y.prototype._applyMinimumContrast=function(i,v,f){if(this._optionsService.options.minimumContrastRatio===1)return!1;var h=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return h===void 0&&(h=F.color.ensureContrastRatio(v,f,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,h!=null?h:null)),!!h&&(this._addStyle(i,"color:"+h.css),!0)},y.prototype._addStyle=function(i,v){i.setAttribute("style",""+(i.getAttribute("style")||"")+v+";")},y}();function B(y,i,v){for(;y.length<v;)y=i+y;return y}_.DomRendererRowFactory=R},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.evaluateKeyboardEvent=void 0;var I=H(12),V={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};_.evaluateKeyboardEvent=function(P,F,R,B){var y={type:0,cancel:!1,key:void 0},i=(P.shiftKey?1:0)|(P.altKey?2:0)|(P.ctrlKey?4:0)|(P.metaKey?8:0);switch(P.keyCode){case 0:P.key==="UIKeyInputUpArrow"?y.key=F?I.C0.ESC+"OA":I.C0.ESC+"[A":P.key==="UIKeyInputLeftArrow"?y.key=F?I.C0.ESC+"OD":I.C0.ESC+"[D":P.key==="UIKeyInputRightArrow"?y.key=F?I.C0.ESC+"OC":I.C0.ESC+"[C":P.key==="UIKeyInputDownArrow"&&(y.key=F?I.C0.ESC+"OB":I.C0.ESC+"[B");break;case 8:if(P.shiftKey){y.key=I.C0.BS;break}if(P.altKey){y.key=I.C0.ESC+I.C0.DEL;break}y.key=I.C0.DEL;break;case 9:if(P.shiftKey){y.key=I.C0.ESC+"[Z";break}y.key=I.C0.HT,y.cancel=!0;break;case 13:y.key=P.altKey?I.C0.ESC+I.C0.CR:I.C0.CR,y.cancel=!0;break;case 27:y.key=I.C0.ESC,P.altKey&&(y.key=I.C0.ESC+I.C0.ESC),y.cancel=!0;break;case 37:if(P.metaKey)break;i?(y.key=I.C0.ESC+"[1;"+(i+1)+"D",y.key===I.C0.ESC+"[1;3D"&&(y.key=I.C0.ESC+(R?"b":"[1;5D"))):y.key=F?I.C0.ESC+"OD":I.C0.ESC+"[D";break;case 39:if(P.metaKey)break;i?(y.key=I.C0.ESC+"[1;"+(i+1)+"C",y.key===I.C0.ESC+"[1;3C"&&(y.key=I.C0.ESC+(R?"f":"[1;5C"))):y.key=F?I.C0.ESC+"OC":I.C0.ESC+"[C";break;case 38:if(P.metaKey)break;i?(y.key=I.C0.ESC+"[1;"+(i+1)+"A",R||y.key!==I.C0.ESC+"[1;3A"||(y.key=I.C0.ESC+"[1;5A")):y.key=F?I.C0.ESC+"OA":I.C0.ESC+"[A";break;case 40:if(P.metaKey)break;i?(y.key=I.C0.ESC+"[1;"+(i+1)+"B",R||y.key!==I.C0.ESC+"[1;3B"||(y.key=I.C0.ESC+"[1;5B")):y.key=F?I.C0.ESC+"OB":I.C0.ESC+"[B";break;case 45:P.shiftKey||P.ctrlKey||(y.key=I.C0.ESC+"[2~");break;case 46:y.key=i?I.C0.ESC+"[3;"+(i+1)+"~":I.C0.ESC+"[3~";break;case 36:y.key=i?I.C0.ESC+"[1;"+(i+1)+"H":F?I.C0.ESC+"OH":I.C0.ESC+"[H";break;case 35:y.key=i?I.C0.ESC+"[1;"+(i+1)+"F":F?I.C0.ESC+"OF":I.C0.ESC+"[F";break;case 33:P.shiftKey?y.type=2:y.key=I.C0.ESC+"[5~";break;case 34:P.shiftKey?y.type=3:y.key=I.C0.ESC+"[6~";break;case 112:y.key=i?I.C0.ESC+"[1;"+(i+1)+"P":I.C0.ESC+"OP";break;case 113:y.key=i?I.C0.ESC+"[1;"+(i+1)+"Q":I.C0.ESC+"OQ";break;case 114:y.key=i?I.C0.ESC+"[1;"+(i+1)+"R":I.C0.ESC+"OR";break;case 115:y.key=i?I.C0.ESC+"[1;"+(i+1)+"S":I.C0.ESC+"OS";break;case 116:y.key=i?I.C0.ESC+"[15;"+(i+1)+"~":I.C0.ESC+"[15~";break;case 117:y.key=i?I.C0.ESC+"[17;"+(i+1)+"~":I.C0.ESC+"[17~";break;case 118:y.key=i?I.C0.ESC+"[18;"+(i+1)+"~":I.C0.ESC+"[18~";break;case 119:y.key=i?I.C0.ESC+"[19;"+(i+1)+"~":I.C0.ESC+"[19~";break;case 120:y.key=i?I.C0.ESC+"[20;"+(i+1)+"~":I.C0.ESC+"[20~";break;case 121:y.key=i?I.C0.ESC+"[21;"+(i+1)+"~":I.C0.ESC+"[21~";break;case 122:y.key=i?I.C0.ESC+"[23;"+(i+1)+"~":I.C0.ESC+"[23~";break;case 123:y.key=i?I.C0.ESC+"[24;"+(i+1)+"~":I.C0.ESC+"[24~";break;default:if(!P.ctrlKey||P.shiftKey||P.altKey||P.metaKey)if(R&&!B||!P.altKey||P.metaKey)R&&!P.altKey&&!P.ctrlKey&&P.metaKey?P.keyCode===65&&(y.type=1):P.key&&!P.ctrlKey&&!P.altKey&&!P.metaKey&&P.keyCode>=48&&P.key.length===1?y.key=P.key:P.key&&P.ctrlKey&&P.key==="_"&&(y.key=I.C0.US);else{var v=V[P.keyCode],f=v&&v[P.shiftKey?1:0];if(f)y.key=I.C0.ESC+f;else if(P.keyCode>=65&&P.keyCode<=90){var h=P.ctrlKey?P.keyCode-64:P.keyCode+32;y.key=I.C0.ESC+String.fromCharCode(h)}}else P.keyCode>=65&&P.keyCode<=90?y.key=String.fromCharCode(P.keyCode-64):P.keyCode===32?y.key=I.C0.NUL:P.keyCode>=51&&P.keyCode<=55?y.key=String.fromCharCode(P.keyCode-51+27):P.keyCode===56?y.key=I.C0.DEL:P.keyCode===219?y.key=I.C0.ESC:P.keyCode===220?y.key=I.C0.FS:P.keyCode===221&&(y.key=I.C0.GS)}return y}},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(o,u){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,O){S.__proto__=O}||function(S,O){for(var T in O)O.hasOwnProperty(T)&&(S[T]=O[T])})(o,u)},function(o,u){function S(){this.constructor=o}I(o,u),o.prototype=u===null?Object.create(u):(S.prototype=u.prototype,new S)}),P=this&&this.__decorate||function(o,u,S,O){var T,E=arguments.length,C=E<3?u:O===null?O=Object.getOwnPropertyDescriptor(u,S):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(o,u,S,O);else for(var j=o.length-1;j>=0;j--)(T=o[j])&&(C=(E<3?T(C):E>3?T(u,S,C):T(u,S))||C);return E>3&&C&&Object.defineProperty(u,S,C),C},F=this&&this.__param||function(o,u){return function(S,O){u(S,O,o)}};Object.defineProperty(_,"__esModule",{value:!0}),_.RenderService=void 0;var R=H(31),B=H(0),y=H(2),i=H(32),v=H(7),f=H(1),h=H(5),n=function(o){function u(S,O,T,E,C,j){var x=o.call(this)||this;if(x._renderer=S,x._rowCount=O,x._isPaused=!1,x._needsFullRefresh=!1,x._isNextRenderRedrawOnly=!0,x._needsSelectionRefresh=!1,x._canvasWidth=0,x._canvasHeight=0,x._selectionState={start:void 0,end:void 0,columnSelectMode:!1},x._onDimensionsChange=new B.EventEmitter,x._onRender=new B.EventEmitter,x._onRefreshRequest=new B.EventEmitter,x.register({dispose:function(){return x._renderer.dispose()}}),x._renderDebouncer=new R.RenderDebouncer(function(N,z){return x._renderRows(N,z)}),x.register(x._renderDebouncer),x._screenDprMonitor=new i.ScreenDprMonitor,x._screenDprMonitor.setListener(function(){return x.onDevicePixelRatioChange()}),x.register(x._screenDprMonitor),x.register(j.onResize(function(N){return x._fullRefresh()})),x.register(E.onOptionChange(function(){return x._renderer.onOptionsChanged()})),x.register(C.onCharSizeChange(function(){return x.onCharSizeChanged()})),x._renderer.onRequestRedraw(function(N){return x.refreshRows(N.start,N.end,!0)}),x.register(v.addDisposableDomListener(window,"resize",function(){return x.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var L=new IntersectionObserver(function(N){return x._onIntersectionChange(N[N.length-1])},{threshold:0});L.observe(T),x.register({dispose:function(){return L.disconnect()}})}return x}return V(u,o),Object.defineProperty(u.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),u.prototype._onIntersectionChange=function(S){this._isPaused=S.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},u.prototype.refreshRows=function(S,O,T){T===void 0&&(T=!1),this._isPaused?this._needsFullRefresh=!0:(T||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(S,O,this._rowCount))},u.prototype._renderRows=function(S,O){this._renderer.renderRows(S,O),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:S,end:O}),this._isNextRenderRedrawOnly=!0},u.prototype.resize=function(S,O){this._rowCount=O,this._fireOnCanvasResize()},u.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},u.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},u.prototype.dispose=function(){o.prototype.dispose.call(this)},u.prototype.setRenderer=function(S){var O=this;this._renderer.dispose(),this._renderer=S,this._renderer.onRequestRedraw(function(T){return O.refreshRows(T.start,T.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},u.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},u.prototype.setColors=function(S){this._renderer.setColors(S),this._fullRefresh()},u.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},u.prototype.onResize=function(S,O){this._renderer.onResize(S,O),this._fullRefresh()},u.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},u.prototype.onBlur=function(){this._renderer.onBlur()},u.prototype.onFocus=function(){this._renderer.onFocus()},u.prototype.onSelectionChanged=function(S,O,T){this._selectionState.start=S,this._selectionState.end=O,this._selectionState.columnSelectMode=T,this._renderer.onSelectionChanged(S,O,T)},u.prototype.onCursorMove=function(){this._renderer.onCursorMove()},u.prototype.clear=function(){this._renderer.clear()},u.prototype.registerCharacterJoiner=function(S){return this._renderer.registerCharacterJoiner(S)},u.prototype.deregisterCharacterJoiner=function(S){return this._renderer.deregisterCharacterJoiner(S)},u=P([F(3,f.IOptionsService),F(4,h.ICharSizeService),F(5,f.IBufferService)],u)}(y.Disposable);_.RenderService=n},function(Re,_,H){"use strict";var I=this&&this.__decorate||function(y,i,v,f){var h,n=arguments.length,o=n<3?i:f===null?f=Object.getOwnPropertyDescriptor(i,v):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(y,i,v,f);else for(var u=y.length-1;u>=0;u--)(h=y[u])&&(o=(n<3?h(o):n>3?h(i,v,o):h(i,v))||o);return n>3&&o&&Object.defineProperty(i,v,o),o},V=this&&this.__param||function(y,i){return function(v,f){i(v,f,y)}};Object.defineProperty(_,"__esModule",{value:!0}),_.CharSizeService=void 0;var P=H(1),F=H(0),R=function(){function y(i,v,f){this._optionsService=f,this.width=0,this.height=0,this._onCharSizeChange=new F.EventEmitter,this._measureStrategy=new B(i,v,this._optionsService)}return Object.defineProperty(y.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),y.prototype.measure=function(){var i=this._measureStrategy.measure();i.width===this.width&&i.height===this.height||(this.width=i.width,this.height=i.height,this._onCharSizeChange.fire())},y=I([V(2,P.IOptionsService)],y)}();_.CharSizeService=R;var B=function(){function y(i,v,f){this._document=i,this._parentElement=v,this._optionsService=f,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return y.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var i=this._measureElement.getBoundingClientRect();return i.width!==0&&i.height!==0&&(this._result.width=i.width,this._result.height=Math.ceil(i.height)),this._result},y}()},function(Re,_,H){"use strict";var I=this&&this.__decorate||function(B,y,i,v){var f,h=arguments.length,n=h<3?y:v===null?v=Object.getOwnPropertyDescriptor(y,i):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(B,y,i,v);else for(var o=B.length-1;o>=0;o--)(f=B[o])&&(n=(h<3?f(n):h>3?f(y,i,n):f(y,i))||n);return h>3&&n&&Object.defineProperty(y,i,n),n},V=this&&this.__param||function(B,y){return function(i,v){y(i,v,B)}};Object.defineProperty(_,"__esModule",{value:!0}),_.MouseService=void 0;var P=H(5),F=H(30),R=function(){function B(y,i){this._renderService=y,this._charSizeService=i}return B.prototype.getCoords=function(y,i,v,f,h){return F.getCoords(y,i,v,f,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,h)},B.prototype.getRawByteCoords=function(y,i,v,f){var h=this.getCoords(y,i,v,f);return F.getRawByteCoords(h)},B=I([V(0,P.IRenderService),V(1,P.ICharSizeService)],B)}();_.MouseService=R},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(f,h){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var u in o)o.hasOwnProperty(u)&&(n[u]=o[u])})(f,h)},function(f,h){function n(){this.constructor=f}I(f,h),f.prototype=h===null?Object.create(h):(n.prototype=h.prototype,new n)}),P=this&&this.__decorate||function(f,h,n,o){var u,S=arguments.length,O=S<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,n):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(f,h,n,o);else for(var T=f.length-1;T>=0;T--)(u=f[T])&&(O=(S<3?u(O):S>3?u(h,n,O):u(h,n))||O);return S>3&&O&&Object.defineProperty(h,n,O),O},F=this&&this.__param||function(f,h){return function(n,o){h(n,o,f)}};Object.defineProperty(_,"__esModule",{value:!0}),_.Linkifier2=void 0;var R=H(1),B=H(0),y=H(2),i=H(7),v=function(f){function h(n){var o=f.call(this)||this;return o._bufferService=n,o._linkProviders=[],o._linkCacheDisposables=[],o._isMouseOut=!0,o._activeLine=-1,o._onShowLinkUnderline=o.register(new B.EventEmitter),o._onHideLinkUnderline=o.register(new B.EventEmitter),o.register(y.getDisposeArrayDisposable(o._linkCacheDisposables)),o}return V(h,f),Object.defineProperty(h.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),h.prototype.registerLinkProvider=function(n){var o=this;return this._linkProviders.push(n),{dispose:function(){var u=o._linkProviders.indexOf(n);u!==-1&&o._linkProviders.splice(u,1)}}},h.prototype.attachToDom=function(n,o,u){var S=this;this._element=n,this._mouseService=o,this._renderService=u,this.register(i.addDisposableDomListener(this._element,"mouseleave",function(){S._isMouseOut=!0,S._clearCurrentLink()})),this.register(i.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(i.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},h.prototype._onMouseMove=function(n){if(this._lastMouseEvent=n,this._element&&this._mouseService){var o=this._positionFromMouseEvent(n,this._element,this._mouseService);if(o){this._isMouseOut=!1;for(var u=n.composedPath(),S=0;S<u.length;S++){var O=u[S];if(O.classList.contains("xterm"))break;if(O.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._onHover(o),this._lastBufferCell=o)}}},h.prototype._onHover=function(n){if(this._activeLine!==n.y)return this._clearCurrentLink(),void this._askForLink(n,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,n)||(this._clearCurrentLink(),this._askForLink(n,!0))},h.prototype._askForLink=function(n,o){var u=this;this._activeProviderReplies&&o||(this._activeProviderReplies=new Map,this._activeLine=n.y);var S=!1;this._linkProviders.forEach(function(O,T){var E;o?!((E=u._activeProviderReplies)===null||E===void 0)&&E.get(T)&&(S=u._checkLinkProviderResult(T,n,S)):O.provideLinks(n.y,function(C){var j,x;if(!u._isMouseOut){var L=C==null?void 0:C.map(function(N){return{link:N}});(j=u._activeProviderReplies)===null||j===void 0||j.set(T,L),S=u._checkLinkProviderResult(T,n,S),((x=u._activeProviderReplies)===null||x===void 0?void 0:x.size)===u._linkProviders.length&&u._removeIntersectingLinks(n.y,u._activeProviderReplies)}})})},h.prototype._removeIntersectingLinks=function(n,o){for(var u=new Set,S=0;S<o.size;S++){var O=o.get(S);if(O)for(var T=0;T<O.length;T++)for(var E=O[T],C=E.link.range.start.y<n?0:E.link.range.start.x,j=E.link.range.end.y>n?this._bufferService.cols:E.link.range.end.x,x=C;x<=j;x++){if(u.has(x)){O.splice(T--,1);break}u.add(x)}}},h.prototype._checkLinkProviderResult=function(n,o,u){var S,O=this;if(!this._activeProviderReplies)return u;for(var T=this._activeProviderReplies.get(n),E=!1,C=0;C<n;C++)this._activeProviderReplies.has(C)&&!this._activeProviderReplies.get(C)||(E=!0);if(!E&&T){var j=T.find(function(L){return O._linkAtPosition(L.link,o)});j&&(u=!0,this._handleNewLink(j))}if(this._activeProviderReplies.size===this._linkProviders.length&&!u)for(C=0;C<this._activeProviderReplies.size;C++){var x=(S=this._activeProviderReplies.get(C))===null||S===void 0?void 0:S.find(function(L){return O._linkAtPosition(L.link,o)});if(x){u=!0,this._handleNewLink(x);break}}return u},h.prototype._onClick=function(n){if(this._element&&this._mouseService&&this._currentLink){var o=this._positionFromMouseEvent(n,this._element,this._mouseService);o&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(n,this._currentLink.link.text)}},h.prototype._clearCurrentLink=function(n,o){this._element&&this._currentLink&&this._lastMouseEvent&&(!n||!o||this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,y.disposeArray(this._linkCacheDisposables))},h.prototype._handleNewLink=function(n){var o=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var u=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);u&&this._linkAtPosition(n.link,u)&&(this._currentLink=n,this._currentLink.state={decorations:{underline:n.link.decorations===void 0||n.link.decorations.underline,pointerCursor:n.link.decorations===void 0||n.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,n.link,this._lastMouseEvent),n.link.decorations={},Object.defineProperties(n.link.decorations,{pointerCursor:{get:function(){var S,O;return(O=(S=o._currentLink)===null||S===void 0?void 0:S.state)===null||O===void 0?void 0:O.decorations.pointerCursor},set:function(S){var O,T;!((O=o._currentLink)===null||O===void 0)&&O.state&&o._currentLink.state.decorations.pointerCursor!==S&&(o._currentLink.state.decorations.pointerCursor=S,o._currentLink.state.isHovered&&((T=o._element)===null||T===void 0||T.classList.toggle("xterm-cursor-pointer",S)))}},underline:{get:function(){var S,O;return(O=(S=o._currentLink)===null||S===void 0?void 0:S.state)===null||O===void 0?void 0:O.decorations.underline},set:function(S){var O,T,E;!((O=o._currentLink)===null||O===void 0)&&O.state&&((E=(T=o._currentLink)===null||T===void 0?void 0:T.state)===null||E===void 0?void 0:E.decorations.underline)!==S&&(o._currentLink.state.decorations.underline=S,o._currentLink.state.isHovered&&o._fireUnderlineEvent(n.link,S))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(S){var O=S.start===0?0:S.start+1+o._bufferService.buffer.ydisp;o._clearCurrentLink(O,S.end+1+o._bufferService.buffer.ydisp)})))}},h.prototype._linkHover=function(n,o,u){var S;!((S=this._currentLink)===null||S===void 0)&&S.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&n.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(u,o.text)},h.prototype._fireUnderlineEvent=function(n,o){var u=n.range,S=this._bufferService.buffer.ydisp,O=this._createLinkUnderlineEvent(u.start.x-1,u.start.y-S-1,u.end.x,u.end.y-S-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(O)},h.prototype._linkLeave=function(n,o,u){var S;!((S=this._currentLink)===null||S===void 0)&&S.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&n.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(u,o.text)},h.prototype._linkAtPosition=function(n,o){var u=n.range.start.y===n.range.end.y,S=n.range.start.y<o.y,O=n.range.end.y>o.y;return(u&&n.range.start.x<=o.x&&n.range.end.x>=o.x||S&&n.range.end.x>=o.x||O&&n.range.start.x<=o.x||S&&O)&&n.range.start.y<=o.y&&n.range.end.y>=o.y},h.prototype._positionFromMouseEvent=function(n,o,u){var S=u.getCoords(n,o,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}},h.prototype._createLinkUnderlineEvent=function(n,o,u,S,O){return{x1:n,y1:o,x2:u,y2:S,cols:this._bufferService.cols,fg:O}},h=P([F(0,R.IBufferService)],h)}(y.Disposable);_.Linkifier2=v},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.CoreBrowserService=void 0;var I=function(){function V(P){this._textarea=P}return Object.defineProperty(V.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),V}();_.CoreBrowserService=I},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(C,j){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,L){x.__proto__=L}||function(x,L){for(var N in L)L.hasOwnProperty(N)&&(x[N]=L[N])})(C,j)},function(C,j){function x(){this.constructor=C}I(C,j),C.prototype=j===null?Object.create(j):(x.prototype=j.prototype,new x)});Object.defineProperty(_,"__esModule",{value:!0}),_.CoreTerminal=void 0;var P=H(2),F=H(1),R=H(66),B=H(67),y=H(68),i=H(74),v=H(75),f=H(0),h=H(76),n=H(77),o=H(78),u=H(80),S=H(81),O=H(19),T=H(82),E=function(C){function j(x){var L=C.call(this)||this;return L._onBinary=new f.EventEmitter,L._onData=new f.EventEmitter,L._onLineFeed=new f.EventEmitter,L._onResize=new f.EventEmitter,L._onScroll=new f.EventEmitter,L._instantiationService=new R.InstantiationService,L.optionsService=new i.OptionsService(x),L._instantiationService.setService(F.IOptionsService,L.optionsService),L._bufferService=L.register(L._instantiationService.createInstance(y.BufferService)),L._instantiationService.setService(F.IBufferService,L._bufferService),L._logService=L._instantiationService.createInstance(B.LogService),L._instantiationService.setService(F.ILogService,L._logService),L._coreService=L.register(L._instantiationService.createInstance(v.CoreService,function(){return L.scrollToBottom()})),L._instantiationService.setService(F.ICoreService,L._coreService),L._coreMouseService=L._instantiationService.createInstance(h.CoreMouseService),L._instantiationService.setService(F.ICoreMouseService,L._coreMouseService),L._dirtyRowService=L._instantiationService.createInstance(n.DirtyRowService),L._instantiationService.setService(F.IDirtyRowService,L._dirtyRowService),L.unicodeService=L._instantiationService.createInstance(o.UnicodeService),L._instantiationService.setService(F.IUnicodeService,L.unicodeService),L._charsetService=L._instantiationService.createInstance(u.CharsetService),L._instantiationService.setService(F.ICharsetService,L._charsetService),L._inputHandler=new O.InputHandler(L._bufferService,L._charsetService,L._coreService,L._dirtyRowService,L._logService,L.optionsService,L._coreMouseService,L.unicodeService),L.register(f.forwardEvent(L._inputHandler.onLineFeed,L._onLineFeed)),L.register(L._inputHandler),L.register(f.forwardEvent(L._bufferService.onResize,L._onResize)),L.register(f.forwardEvent(L._coreService.onData,L._onData)),L.register(f.forwardEvent(L._coreService.onBinary,L._onBinary)),L.register(L.optionsService.onOptionChange(function(N){return L._updateOptions(N)})),L._writeBuffer=new T.WriteBuffer(function(N){return L._inputHandler.parse(N)}),L}return V(j,C),Object.defineProperty(j.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),j.prototype.dispose=function(){var x;this._isDisposed||(C.prototype.dispose.call(this),(x=this._windowsMode)===null||x===void 0||x.dispose(),this._windowsMode=void 0)},j.prototype.write=function(x,L){this._writeBuffer.write(x,L)},j.prototype.writeSync=function(x){this._writeBuffer.writeSync(x)},j.prototype.resize=function(x,L){isNaN(x)||isNaN(L)||(x=Math.max(x,y.MINIMUM_COLS),L=Math.max(L,y.MINIMUM_ROWS),this._bufferService.resize(x,L))},j.prototype.scroll=function(x,L){L===void 0&&(L=!1);var N,z=this._bufferService.buffer;(N=this._cachedBlankLine)&&N.length===this.cols&&N.getFg(0)===x.fg&&N.getBg(0)===x.bg||(N=z.getBlankLine(x,L),this._cachedBlankLine=N),N.isWrapped=L;var te=z.ybase+z.scrollTop,J=z.ybase+z.scrollBottom;if(z.scrollTop===0){var ge=z.lines.isFull;J===z.lines.length-1?ge?z.lines.recycle().copyFrom(N):z.lines.push(N.clone()):z.lines.splice(J+1,0,N.clone()),ge?this._bufferService.isUserScrolling&&(z.ydisp=Math.max(z.ydisp-1,0)):(z.ybase++,this._bufferService.isUserScrolling||z.ydisp++)}else{var _e=J-te+1;z.lines.shiftElements(te+1,_e-1,-1),z.lines.set(J,N.clone())}this._bufferService.isUserScrolling||(z.ydisp=z.ybase),this._dirtyRowService.markRangeDirty(z.scrollTop,z.scrollBottom),this._onScroll.fire(z.ydisp)},j.prototype.scrollLines=function(x,L){var N=this._bufferService.buffer;if(x<0){if(N.ydisp===0)return;this._bufferService.isUserScrolling=!0}else x+N.ydisp>=N.ybase&&(this._bufferService.isUserScrolling=!1);var z=N.ydisp;N.ydisp=Math.max(Math.min(N.ydisp+x,N.ybase),0),z!==N.ydisp&&(L||this._onScroll.fire(N.ydisp))},j.prototype.scrollPages=function(x){this.scrollLines(x*(this.rows-1))},j.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},j.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},j.prototype.scrollToLine=function(x){var L=x-this._bufferService.buffer.ydisp;L!==0&&this.scrollLines(L)},j.prototype.addEscHandler=function(x,L){return this._inputHandler.addEscHandler(x,L)},j.prototype.addDcsHandler=function(x,L){return this._inputHandler.addDcsHandler(x,L)},j.prototype.addCsiHandler=function(x,L){return this._inputHandler.addCsiHandler(x,L)},j.prototype.addOscHandler=function(x,L){return this._inputHandler.addOscHandler(x,L)},j.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},j.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},j.prototype._updateOptions=function(x){var L;switch(x){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((L=this._windowsMode)===null||L===void 0||L.dispose(),this._windowsMode=void 0)}},j.prototype._enableWindowsMode=function(){var x=this;if(!this._windowsMode){var L=[];L.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),L.push(this.addCsiHandler({final:"H"},function(){return S.updateWindowsModeWrappedState(x._bufferService),!1})),this._windowsMode={dispose:function(){for(var N=0,z=L;N<z.length;N++)z[N].dispose()}}}},j}(P.Disposable);_.CoreTerminal=E},function(Re,_,H){"use strict";var I=this&&this.__spreadArrays||function(){for(var B=0,y=0,i=arguments.length;y<i;y++)B+=arguments[y].length;var v=Array(B),f=0;for(y=0;y<i;y++)for(var h=arguments[y],n=0,o=h.length;n<o;n++,f++)v[f]=h[n];return v};Object.defineProperty(_,"__esModule",{value:!0}),_.InstantiationService=_.ServiceCollection=void 0;var V=H(1),P=H(14),F=function(){function B(){for(var y=[],i=0;i<arguments.length;i++)y[i]=arguments[i];this._entries=new Map;for(var v=0,f=y;v<f.length;v++){var h=f[v],n=h[0],o=h[1];this.set(n,o)}}return B.prototype.set=function(y,i){var v=this._entries.get(y);return this._entries.set(y,i),v},B.prototype.forEach=function(y){this._entries.forEach(function(i,v){return y(v,i)})},B.prototype.has=function(y){return this._entries.has(y)},B.prototype.get=function(y){return this._entries.get(y)},B}();_.ServiceCollection=F;var R=function(){function B(){this._services=new F,this._services.set(V.IInstantiationService,this)}return B.prototype.setService=function(y,i){this._services.set(y,i)},B.prototype.getService=function(y){return this._services.get(y)},B.prototype.createInstance=function(y){for(var i=[],v=1;v<arguments.length;v++)i[v-1]=arguments[v];for(var f=P.getServiceDependencies(y).sort(function(T,E){return T.index-E.index}),h=[],n=0,o=f;n<o.length;n++){var u=o[n],S=this._services.get(u.id);if(!S)throw new Error("[createInstance] "+y.name+" depends on UNKNOWN service "+u.id+".");h.push(S)}var O=f.length>0?f[0].index:i.length;if(i.length!==O)throw new Error("[createInstance] First service dependency of "+y.name+" at position "+(O+1)+" conflicts with "+i.length+" static arguments");return new(y.bind.apply(y,I([void 0],I(i,h))))},B}();_.InstantiationService=R},function(Re,_,H){"use strict";var I=this&&this.__decorate||function(i,v,f,h){var n,o=arguments.length,u=o<3?v:h===null?h=Object.getOwnPropertyDescriptor(v,f):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(i,v,f,h);else for(var S=i.length-1;S>=0;S--)(n=i[S])&&(u=(o<3?n(u):o>3?n(v,f,u):n(v,f))||u);return o>3&&u&&Object.defineProperty(v,f,u),u},V=this&&this.__param||function(i,v){return function(f,h){v(f,h,i)}},P=this&&this.__spreadArrays||function(){for(var i=0,v=0,f=arguments.length;v<f;v++)i+=arguments[v].length;var h=Array(i),n=0;for(v=0;v<f;v++)for(var o=arguments[v],u=0,S=o.length;u<S;u++,n++)h[n]=o[u];return h};Object.defineProperty(_,"__esModule",{value:!0}),_.LogService=_.LogLevel=void 0;var F,R=H(1);(function(i){i[i.DEBUG=0]="DEBUG",i[i.INFO=1]="INFO",i[i.WARN=2]="WARN",i[i.ERROR=3]="ERROR",i[i.OFF=4]="OFF"})(F=_.LogLevel||(_.LogLevel={}));var B={debug:F.DEBUG,info:F.INFO,warn:F.WARN,error:F.ERROR,off:F.OFF},y=function(){function i(v){var f=this;this._optionsService=v,this._updateLogLevel(),this._optionsService.onOptionChange(function(h){h==="logLevel"&&f._updateLogLevel()})}return i.prototype._updateLogLevel=function(){this._logLevel=B[this._optionsService.options.logLevel]},i.prototype._evalLazyOptionalParams=function(v){for(var f=0;f<v.length;f++)typeof v[f]=="function"&&(v[f]=v[f]())},i.prototype._log=function(v,f,h){this._evalLazyOptionalParams(h),v.call.apply(v,P([console,"xterm.js: "+f],h))},i.prototype.debug=function(v){for(var f=[],h=1;h<arguments.length;h++)f[h-1]=arguments[h];this._logLevel<=F.DEBUG&&this._log(console.log,v,f)},i.prototype.info=function(v){for(var f=[],h=1;h<arguments.length;h++)f[h-1]=arguments[h];this._logLevel<=F.INFO&&this._log(console.info,v,f)},i.prototype.warn=function(v){for(var f=[],h=1;h<arguments.length;h++)f[h-1]=arguments[h];this._logLevel<=F.WARN&&this._log(console.warn,v,f)},i.prototype.error=function(v){for(var f=[],h=1;h<arguments.length;h++)f[h-1]=arguments[h];this._logLevel<=F.ERROR&&this._log(console.error,v,f)},i=I([V(0,R.IOptionsService)],i)}();_.LogService=y},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(f,h){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var u in o)o.hasOwnProperty(u)&&(n[u]=o[u])})(f,h)},function(f,h){function n(){this.constructor=f}I(f,h),f.prototype=h===null?Object.create(h):(n.prototype=h.prototype,new n)}),P=this&&this.__decorate||function(f,h,n,o){var u,S=arguments.length,O=S<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,n):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(f,h,n,o);else for(var T=f.length-1;T>=0;T--)(u=f[T])&&(O=(S<3?u(O):S>3?u(h,n,O):u(h,n))||O);return S>3&&O&&Object.defineProperty(h,n,O),O},F=this&&this.__param||function(f,h){return function(n,o){h(n,o,f)}};Object.defineProperty(_,"__esModule",{value:!0}),_.BufferService=_.MINIMUM_ROWS=_.MINIMUM_COLS=void 0;var R=H(1),B=H(69),y=H(0),i=H(2);_.MINIMUM_COLS=2,_.MINIMUM_ROWS=1;var v=function(f){function h(n){var o=f.call(this)||this;return o._optionsService=n,o.isUserScrolling=!1,o._onResize=new y.EventEmitter,o.cols=Math.max(n.options.cols,_.MINIMUM_COLS),o.rows=Math.max(n.options.rows,_.MINIMUM_ROWS),o.buffers=new B.BufferSet(n,o),o}return V(h,f),Object.defineProperty(h.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),h.prototype.dispose=function(){f.prototype.dispose.call(this),this.buffers.dispose()},h.prototype.resize=function(n,o){this.cols=n,this.rows=o,this.buffers.resize(n,o),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:n,rows:o})},h.prototype.reset=function(){this.buffers.dispose(),this.buffers=new B.BufferSet(this._optionsService,this),this.isUserScrolling=!1},h=P([F(0,R.IOptionsService)],h)}(i.Disposable);_.BufferService=v},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(B,y){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,v){i.__proto__=v}||function(i,v){for(var f in v)v.hasOwnProperty(f)&&(i[f]=v[f])})(B,y)},function(B,y){function i(){this.constructor=B}I(B,y),B.prototype=y===null?Object.create(y):(i.prototype=y.prototype,new i)});Object.defineProperty(_,"__esModule",{value:!0}),_.BufferSet=void 0;var P=H(70),F=H(0),R=function(B){function y(i,v){var f=B.call(this)||this;return f._onBufferActivate=f.register(new F.EventEmitter),f._normal=new P.Buffer(!0,i,v),f._normal.fillViewportRows(),f._alt=new P.Buffer(!1,i,v),f._activeBuffer=f._normal,f.setupTabStops(),f}return V(y,B),Object.defineProperty(y.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),y.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},y.prototype.activateAltBuffer=function(i){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(i),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},y.prototype.resize=function(i,v){this._normal.resize(i,v),this._alt.resize(i,v)},y.prototype.setupTabStops=function(i){this._normal.setupTabStops(i),this._alt.setupTabStops(i)},y}(H(2).Disposable);_.BufferSet=R},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.BufferStringIterator=_.Buffer=_.MAX_BUFFER_SIZE=void 0;var I=H(71),V=H(16),P=H(4),F=H(3),R=H(72),B=H(73),y=H(20),i=H(6);_.MAX_BUFFER_SIZE=4294967295;var v=function(){function h(n,o,u){this._hasScrollback=n,this._optionsService=o,this._bufferService=u,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=V.DEFAULT_ATTR_DATA.clone(),this.savedCharset=y.DEFAULT_CHARSET,this.markers=[],this._nullCell=P.CellData.fromCharData([0,F.NULL_CELL_CHAR,F.NULL_CELL_WIDTH,F.NULL_CELL_CODE]),this._whitespaceCell=P.CellData.fromCharData([0,F.WHITESPACE_CELL_CHAR,F.WHITESPACE_CELL_WIDTH,F.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new I.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return h.prototype.getNullCell=function(n){return n?(this._nullCell.fg=n.fg,this._nullCell.bg=n.bg,this._nullCell.extended=n.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new i.ExtendedAttrs),this._nullCell},h.prototype.getWhitespaceCell=function(n){return n?(this._whitespaceCell.fg=n.fg,this._whitespaceCell.bg=n.bg,this._whitespaceCell.extended=n.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new i.ExtendedAttrs),this._whitespaceCell},h.prototype.getBlankLine=function(n,o){return new V.BufferLine(this._bufferService.cols,this.getNullCell(n),o)},Object.defineProperty(h.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isCursorInViewport",{get:function(){var n=this.ybase+this.y-this.ydisp;return n>=0&&n<this._rows},enumerable:!1,configurable:!0}),h.prototype._getCorrectBufferLength=function(n){if(!this._hasScrollback)return n;var o=n+this._optionsService.options.scrollback;return o>_.MAX_BUFFER_SIZE?_.MAX_BUFFER_SIZE:o},h.prototype.fillViewportRows=function(n){if(this.lines.length===0){n===void 0&&(n=V.DEFAULT_ATTR_DATA);for(var o=this._rows;o--;)this.lines.push(this.getBlankLine(n))}},h.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new I.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},h.prototype.resize=function(n,o){var u=this.getNullCell(V.DEFAULT_ATTR_DATA),S=this._getCorrectBufferLength(o);if(S>this.lines.maxLength&&(this.lines.maxLength=S),this.lines.length>0){if(this._cols<n)for(var O=0;O<this.lines.length;O++)this.lines.get(O).resize(n,u);var T=0;if(this._rows<o)for(var E=this._rows;E<o;E++)this.lines.length<o+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new V.BufferLine(n,u)):this.ybase>0&&this.lines.length<=this.ybase+this.y+T+1?(this.ybase--,T++,this.ydisp>0&&this.ydisp--):this.lines.push(new V.BufferLine(n,u)));else for(E=this._rows;E>o;E--)this.lines.length>o+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(S<this.lines.maxLength){var C=this.lines.length-S;C>0&&(this.lines.trimStart(C),this.ybase=Math.max(this.ybase-C,0),this.ydisp=Math.max(this.ydisp-C,0),this.savedY=Math.max(this.savedY-C,0)),this.lines.maxLength=S}this.x=Math.min(this.x,n-1),this.y=Math.min(this.y,o-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,n-1),this.scrollTop=0}if(this.scrollBottom=o-1,this._isReflowEnabled&&(this._reflow(n,o),this._cols>n))for(O=0;O<this.lines.length;O++)this.lines.get(O).resize(n,u);this._cols=n,this._rows=o},Object.defineProperty(h.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),h.prototype._reflow=function(n,o){this._cols!==n&&(n>this._cols?this._reflowLarger(n,o):this._reflowSmaller(n,o))},h.prototype._reflowLarger=function(n,o){var u=R.reflowLargerGetLinesToRemove(this.lines,this._cols,n,this.ybase+this.y,this.getNullCell(V.DEFAULT_ATTR_DATA));if(u.length>0){var S=R.reflowLargerCreateNewLayout(this.lines,u);R.reflowLargerApplyNewLayout(this.lines,S.layout),this._reflowLargerAdjustViewport(n,o,S.countRemoved)}},h.prototype._reflowLargerAdjustViewport=function(n,o,u){for(var S=this.getNullCell(V.DEFAULT_ATTR_DATA),O=u;O-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<o&&this.lines.push(new V.BufferLine(n,S))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-u,0)},h.prototype._reflowSmaller=function(n,o){for(var u=this.getNullCell(V.DEFAULT_ATTR_DATA),S=[],O=0,T=this.lines.length-1;T>=0;T--){var E=this.lines.get(T);if(!(!E||!E.isWrapped&&E.getTrimmedLength()<=n)){for(var C=[E];E.isWrapped&&T>0;)E=this.lines.get(--T),C.unshift(E);var j=this.ybase+this.y;if(!(j>=T&&j<T+C.length)){var x=C[C.length-1].getTrimmedLength(),L=R.reflowSmallerGetNewLineLengths(C,this._cols,n),N=L.length-C.length,z=void 0;z=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+N):Math.max(0,this.lines.length-this.lines.maxLength+N);for(var te=[],J=0;J<N;J++){var ge=this.getBlankLine(V.DEFAULT_ATTR_DATA,!0);te.push(ge)}te.length>0&&(S.push({start:T+C.length+O,newLines:te}),O+=te.length),C.push.apply(C,te);var _e=L.length-1,se=L[_e];se===0&&(se=L[--_e]);for(var Y=C.length-N-1,ie=x;Y>=0;){var U=Math.min(ie,se);if(C[_e].copyCellsFrom(C[Y],ie-U,se-U,U,!0),(se-=U)===0&&(se=L[--_e]),(ie-=U)===0){Y--;var Z=Math.max(Y,0);ie=R.getWrappedLineTrimmedLength(C,Z,this._cols)}}for(J=0;J<C.length;J++)L[J]<n&&C[J].setCell(L[J],u);for(var K=N-z;K-- >0;)this.ybase===0?this.y<o-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+O)-o&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+N,this.ybase+o-1)}}}if(S.length>0){var k=[],D=[];for(J=0;J<this.lines.length;J++)D.push(this.lines.get(J));var re=this.lines.length,pe=re-1,Oe=0,$e=S[Oe];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+O);var Ge=0;for(J=Math.min(this.lines.maxLength-1,re+O-1);J>=0;J--)if($e&&$e.start>pe+Ge){for(var ke=$e.newLines.length-1;ke>=0;ke--)this.lines.set(J--,$e.newLines[ke]);J++,k.push({index:pe+1,amount:$e.newLines.length}),Ge+=$e.newLines.length,$e=S[++Oe]}else this.lines.set(J,D[pe--]);var et=0;for(J=k.length-1;J>=0;J--)k[J].index+=et,this.lines.onInsertEmitter.fire(k[J]),et+=k[J].amount;var Ke=Math.max(0,re+O-this.lines.maxLength);Ke>0&&this.lines.onTrimEmitter.fire(Ke)}},h.prototype.stringIndexToBufferIndex=function(n,o,u){for(u===void 0&&(u=!1);o;){var S=this.lines.get(n);if(!S)return[-1,-1];for(var O=u?S.getTrimmedLength():S.length,T=0;T<O;++T)if(S.get(T)[F.CHAR_DATA_WIDTH_INDEX]&&(o-=S.get(T)[F.CHAR_DATA_CHAR_INDEX].length||1),o<0)return[n,T];n++}return[n,0]},h.prototype.translateBufferLineToString=function(n,o,u,S){u===void 0&&(u=0);var O=this.lines.get(n);return O?O.translateToString(o,u,S):""},h.prototype.getWrappedRangeForLine=function(n){for(var o=n,u=n;o>0&&this.lines.get(o).isWrapped;)o--;for(;u+1<this.lines.length&&this.lines.get(u+1).isWrapped;)u++;return{first:o,last:u}},h.prototype.setupTabStops=function(n){for(n!=null?this.tabs[n]||(n=this.prevStop(n)):(this.tabs={},n=0);n<this._cols;n+=this._optionsService.options.tabStopWidth)this.tabs[n]=!0},h.prototype.prevStop=function(n){for(n==null&&(n=this.x);!this.tabs[--n]&&n>0;);return n>=this._cols?this._cols-1:n<0?0:n},h.prototype.nextStop=function(n){for(n==null&&(n=this.x);!this.tabs[++n]&&n<this._cols;);return n>=this._cols?this._cols-1:n<0?0:n},h.prototype.addMarker=function(n){var o=this,u=new B.Marker(n);return this.markers.push(u),u.register(this.lines.onTrim(function(S){u.line-=S,u.line<0&&u.dispose()})),u.register(this.lines.onInsert(function(S){u.line>=S.index&&(u.line+=S.amount)})),u.register(this.lines.onDelete(function(S){u.line>=S.index&&u.line<S.index+S.amount&&u.dispose(),u.line>S.index&&(u.line-=S.amount)})),u.register(u.onDispose(function(){return o._removeMarker(u)})),u},h.prototype._removeMarker=function(n){this.markers.splice(this.markers.indexOf(n),1)},h.prototype.iterator=function(n,o,u,S,O){return new f(this,n,o,u,S,O)},h}();_.Buffer=v;var f=function(){function h(n,o,u,S,O,T){u===void 0&&(u=0),S===void 0&&(S=n.lines.length),O===void 0&&(O=0),T===void 0&&(T=0),this._buffer=n,this._trimRight=o,this._startIndex=u,this._endIndex=S,this._startOverscan=O,this._endOverscan=T,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return h.prototype.hasNext=function(){return this._current<this._endIndex},h.prototype.next=function(){var n=this._buffer.getWrappedRangeForLine(this._current);n.first<this._startIndex-this._startOverscan&&(n.first=this._startIndex-this._startOverscan),n.last>this._endIndex+this._endOverscan&&(n.last=this._endIndex+this._endOverscan),n.first=Math.max(n.first,0),n.last=Math.min(n.last,this._buffer.lines.length);for(var o="",u=n.first;u<=n.last;++u)o+=this._buffer.translateBufferLineToString(u,this._trimRight);return this._current=n.last+1,{range:n,content:o}},h}();_.BufferStringIterator=f},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.CircularList=void 0;var I=H(0),V=function(){function P(F){this._maxLength=F,this.onDeleteEmitter=new I.EventEmitter,this.onInsertEmitter=new I.EventEmitter,this.onTrimEmitter=new I.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(P.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"maxLength",{get:function(){return this._maxLength},set:function(F){if(this._maxLength!==F){for(var R=new Array(F),B=0;B<Math.min(F,this.length);B++)R[B]=this._array[this._getCyclicIndex(B)];this._array=R,this._maxLength=F,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"length",{get:function(){return this._length},set:function(F){if(F>this._length)for(var R=this._length;R<F;R++)this._array[R]=void 0;this._length=F},enumerable:!1,configurable:!0}),P.prototype.get=function(F){return this._array[this._getCyclicIndex(F)]},P.prototype.set=function(F,R){this._array[this._getCyclicIndex(F)]=R},P.prototype.push=function(F){this._array[this._getCyclicIndex(this._length)]=F,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},P.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(P.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),P.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},P.prototype.splice=function(F,R){for(var B=[],y=2;y<arguments.length;y++)B[y-2]=arguments[y];if(R){for(var i=F;i<this._length-R;i++)this._array[this._getCyclicIndex(i)]=this._array[this._getCyclicIndex(i+R)];this._length-=R}for(i=this._length-1;i>=F;i--)this._array[this._getCyclicIndex(i+B.length)]=this._array[this._getCyclicIndex(i)];for(i=0;i<B.length;i++)this._array[this._getCyclicIndex(F+i)]=B[i];if(this._length+B.length>this._maxLength){var v=this._length+B.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=B.length},P.prototype.trimStart=function(F){F>this._length&&(F=this._length),this._startIndex+=F,this._length-=F,this.onTrimEmitter.fire(F)},P.prototype.shiftElements=function(F,R,B){if(!(R<=0)){if(F<0||F>=this._length)throw new Error("start argument out of range");if(F+B<0)throw new Error("Cannot shift elements in list beyond index 0");if(B>0){for(var y=R-1;y>=0;y--)this.set(F+y+B,this.get(F+y));var i=F+R+B-this._length;if(i>0)for(this._length+=i;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(y=0;y<R;y++)this.set(F+y+B,this.get(F+y))}},P.prototype._getCyclicIndex=function(F){return(this._startIndex+F)%this._maxLength},P}();_.CircularList=V},function(Re,_,H){"use strict";function I(V,P,F){if(P===V.length-1)return V[P].getTrimmedLength();var R=!V[P].hasContent(F-1)&&V[P].getWidth(F-1)===1,B=V[P+1].getWidth(0)===2;return R&&B?F-1:F}Object.defineProperty(_,"__esModule",{value:!0}),_.getWrappedLineTrimmedLength=_.reflowSmallerGetNewLineLengths=_.reflowLargerApplyNewLayout=_.reflowLargerCreateNewLayout=_.reflowLargerGetLinesToRemove=void 0,_.reflowLargerGetLinesToRemove=function(V,P,F,R,B){for(var y=[],i=0;i<V.length-1;i++){var v=i,f=V.get(++v);if(f.isWrapped){for(var h=[V.get(i)];v<V.length&&f.isWrapped;)h.push(f),f=V.get(++v);if(R>=i&&R<v)i+=h.length-1;else{for(var n=0,o=I(h,n,P),u=1,S=0;u<h.length;){var O=I(h,u,P),T=O-S,E=F-o,C=Math.min(T,E);h[n].copyCellsFrom(h[u],S,o,C,!1),(o+=C)===F&&(n++,o=0),(S+=C)===O&&(u++,S=0),o===0&&n!==0&&h[n-1].getWidth(F-1)===2&&(h[n].copyCellsFrom(h[n-1],F-1,o++,1,!1),h[n-1].setCell(F-1,B))}h[n].replaceCells(o,F,B);for(var j=0,x=h.length-1;x>0&&(x>n||h[x].getTrimmedLength()===0);x--)j++;j>0&&(y.push(i+h.length-j),y.push(j)),i+=h.length-1}}}return y},_.reflowLargerCreateNewLayout=function(V,P){for(var F=[],R=0,B=P[R],y=0,i=0;i<V.length;i++)if(B===i){var v=P[++R];V.onDeleteEmitter.fire({index:i-y,amount:v}),i+=v-1,y+=v,B=P[++R]}else F.push(i);return{layout:F,countRemoved:y}},_.reflowLargerApplyNewLayout=function(V,P){for(var F=[],R=0;R<P.length;R++)F.push(V.get(P[R]));for(R=0;R<F.length;R++)V.set(R,F[R]);V.length=P.length},_.reflowSmallerGetNewLineLengths=function(V,P,F){for(var R=[],B=V.map(function(o,u){return I(V,u,P)}).reduce(function(o,u){return o+u}),y=0,i=0,v=0;v<B;){if(B-v<F){R.push(B-v);break}y+=F;var f=I(V,i,P);y>f&&(y-=f,i++);var h=V[i].getWidth(y-1)===2;h&&y--;var n=h?F-1:F;R.push(n),v+=n}return R},_.getWrappedLineTrimmedLength=I},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(R,B){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,i){y.__proto__=i}||function(y,i){for(var v in i)i.hasOwnProperty(v)&&(y[v]=i[v])})(R,B)},function(R,B){function y(){this.constructor=R}I(R,B),R.prototype=B===null?Object.create(B):(y.prototype=B.prototype,new y)});Object.defineProperty(_,"__esModule",{value:!0}),_.Marker=void 0;var P=H(0),F=function(R){function B(y){var i=R.call(this)||this;return i.line=y,i._id=B._nextId++,i.isDisposed=!1,i._onDispose=new P.EventEmitter,i}return V(B,R),Object.defineProperty(B.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),B.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},B._nextId=1,B}(H(2).Disposable);_.Marker=F},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.OptionsService=_.DEFAULT_OPTIONS=_.DEFAULT_BELL_SOUND=void 0;var I=H(0),V=H(11),P=H(33);_.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",_.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:_.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:V.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var F=["cols","rows"],R=function(){function B(y){this._onOptionChange=new I.EventEmitter,this.options=P.clone(_.DEFAULT_OPTIONS);for(var i=0,v=Object.keys(y);i<v.length;i++){var f=v[i];if(f in this.options){var h=y[f];this.options[f]=h}}}return Object.defineProperty(B.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),B.prototype.setOption=function(y,i){if(!(y in _.DEFAULT_OPTIONS))throw new Error('No option with key "'+y+'"');if(F.indexOf(y)!==-1)throw new Error('Option "'+y+'" can only be set in the constructor');this.options[y]!==i&&(i=this._sanitizeAndValidateOption(y,i),this.options[y]!==i&&(this.options[y]=i,this._onOptionChange.fire(y)))},B.prototype._sanitizeAndValidateOption=function(y,i){switch(y){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":i||(i=_.DEFAULT_OPTIONS[y]);break;case"cursorWidth":i=Math.floor(i);case"lineHeight":case"tabStopWidth":if(i<1)throw new Error(y+" cannot be less than 1, value: "+i);break;case"minimumContrastRatio":i=Math.max(1,Math.min(21,Math.round(10*i)/10));break;case"scrollback":if((i=Math.min(i,4294967295))<0)throw new Error(y+" cannot be less than 0, value: "+i);break;case"fastScrollSensitivity":case"scrollSensitivity":if(i<=0)throw new Error(y+" cannot be less than or equal to 0, value: "+i)}return i},B.prototype.getOption=function(y){if(!(y in _.DEFAULT_OPTIONS))throw new Error('No option with key "'+y+'"');return this.options[y]},B}();_.OptionsService=R},function(Re,_,H){"use strict";var I,V=this&&this.__extends||(I=function(n,o){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,S){u.__proto__=S}||function(u,S){for(var O in S)S.hasOwnProperty(O)&&(u[O]=S[O])})(n,o)},function(n,o){function u(){this.constructor=n}I(n,o),n.prototype=o===null?Object.create(o):(u.prototype=o.prototype,new u)}),P=this&&this.__decorate||function(n,o,u,S){var O,T=arguments.length,E=T<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,u):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(n,o,u,S);else for(var C=n.length-1;C>=0;C--)(O=n[C])&&(E=(T<3?O(E):T>3?O(o,u,E):O(o,u))||E);return T>3&&E&&Object.defineProperty(o,u,E),E},F=this&&this.__param||function(n,o){return function(u,S){o(u,S,n)}};Object.defineProperty(_,"__esModule",{value:!0}),_.CoreService=void 0;var R=H(1),B=H(0),y=H(33),i=H(2),v=Object.freeze({insertMode:!1}),f=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),h=function(n){function o(u,S,O,T){var E=n.call(this)||this;return E._bufferService=S,E._logService=O,E._optionsService=T,E.isCursorInitialized=!1,E.isCursorHidden=!1,E._onData=E.register(new B.EventEmitter),E._onUserInput=E.register(new B.EventEmitter),E._onBinary=E.register(new B.EventEmitter),E._scrollToBottom=u,E.register({dispose:function(){return E._scrollToBottom=void 0}}),E.modes=y.clone(v),E.decPrivateModes=y.clone(f),E}return V(o,n),Object.defineProperty(o.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),o.prototype.reset=function(){this.modes=y.clone(v),this.decPrivateModes=y.clone(f)},o.prototype.triggerDataEvent=function(u,S){if(S===void 0&&(S=!1),!this._optionsService.options.disableStdin){var O=this._bufferService.buffer;O.ybase!==O.ydisp&&this._scrollToBottom(),S&&this._onUserInput.fire(),this._logService.debug('sending data "'+u+'"',function(){return u.split("").map(function(T){return T.charCodeAt(0)})}),this._onData.fire(u)}},o.prototype.triggerBinaryEvent=function(u){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+u+'"',function(){return u.split("").map(function(S){return S.charCodeAt(0)})}),this._onBinary.fire(u))},o=P([F(1,R.IBufferService),F(2,R.ILogService),F(3,R.IOptionsService)],o)}(i.Disposable);_.CoreService=h},function(Re,_,H){"use strict";var I=this&&this.__decorate||function(f,h,n,o){var u,S=arguments.length,O=S<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,n):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(f,h,n,o);else for(var T=f.length-1;T>=0;T--)(u=f[T])&&(O=(S<3?u(O):S>3?u(h,n,O):u(h,n))||O);return S>3&&O&&Object.defineProperty(h,n,O),O},V=this&&this.__param||function(f,h){return function(n,o){h(n,o,f)}};Object.defineProperty(_,"__esModule",{value:!0}),_.CoreMouseService=void 0;var P=H(1),F=H(0),R={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(f){return f.button!==4&&f.action===1&&(f.ctrl=!1,f.alt=!1,f.shift=!1,!0)}},VT200:{events:19,restrict:function(f){return f.action!==32}},DRAG:{events:23,restrict:function(f){return f.action!==32||f.button!==3}},ANY:{events:31,restrict:function(f){return!0}}};function B(f,h){var n=(f.ctrl?16:0)|(f.shift?4:0)|(f.alt?8:0);return f.button===4?(n|=64,n|=f.action):(n|=3&f.button,4&f.button&&(n|=64),8&f.button&&(n|=128),f.action===32?n|=32:f.action!==0||h||(n|=3)),n}var y=String.fromCharCode,i={DEFAULT:function(f){var h=[B(f,!1)+32,f.col+32,f.row+32];return h[0]>255||h[1]>255||h[2]>255?"":"\x1B[M"+y(h[0])+y(h[1])+y(h[2])},SGR:function(f){var h=f.action===0&&f.button!==4?"m":"M";return"\x1B[<"+B(f,!0)+";"+f.col+";"+f.row+h}},v=function(){function f(h,n){this._bufferService=h,this._coreService=n,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new F.EventEmitter,this._lastEvent=null;for(var o=0,u=Object.keys(R);o<u.length;o++){var S=u[o];this.addProtocol(S,R[S])}for(var O=0,T=Object.keys(i);O<T.length;O++){var E=T[O];this.addEncoding(E,i[E])}this.reset()}return f.prototype.addProtocol=function(h,n){this._protocols[h]=n},f.prototype.addEncoding=function(h,n){this._encodings[h]=n},Object.defineProperty(f.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(h){if(!this._protocols[h])throw new Error('unknown protocol "'+h+'"');this._activeProtocol=h,this._onProtocolChange.fire(this._protocols[h].events)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(h){if(!this._encodings[h])throw new Error('unknown encoding "'+h+'"');this._activeEncoding=h},enumerable:!1,configurable:!0}),f.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(f.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),f.prototype.triggerMouseEvent=function(h){if(h.col<0||h.col>=this._bufferService.cols||h.row<0||h.row>=this._bufferService.rows||h.button===4&&h.action===32||h.button===3&&h.action!==32||h.button!==4&&(h.action===2||h.action===3)||(h.col++,h.row++,h.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,h))||!this._protocols[this._activeProtocol].restrict(h))return!1;var n=this._encodings[this._activeEncoding](h);return n&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(n):this._coreService.triggerDataEvent(n,!0)),this._lastEvent=h,!0},f.prototype.explainEvents=function(h){return{down:!!(1&h),up:!!(2&h),drag:!!(4&h),move:!!(8&h),wheel:!!(16&h)}},f.prototype._compareEvents=function(h,n){return h.col===n.col&&h.row===n.row&&h.button===n.button&&h.action===n.action&&h.ctrl===n.ctrl&&h.alt===n.alt&&h.shift===n.shift},f=I([V(0,P.IBufferService),V(1,P.ICoreService)],f)}();_.CoreMouseService=v},function(Re,_,H){"use strict";var I=this&&this.__decorate||function(R,B,y,i){var v,f=arguments.length,h=f<3?B:i===null?i=Object.getOwnPropertyDescriptor(B,y):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(R,B,y,i);else for(var n=R.length-1;n>=0;n--)(v=R[n])&&(h=(f<3?v(h):f>3?v(B,y,h):v(B,y))||h);return f>3&&h&&Object.defineProperty(B,y,h),h},V=this&&this.__param||function(R,B){return function(y,i){B(y,i,R)}};Object.defineProperty(_,"__esModule",{value:!0}),_.DirtyRowService=void 0;var P=H(1),F=function(){function R(B){this._bufferService=B,this.clearRange()}return Object.defineProperty(R.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),R.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},R.prototype.markDirty=function(B){B<this._start?this._start=B:B>this._end&&(this._end=B)},R.prototype.markRangeDirty=function(B,y){if(B>y){var i=B;B=y,y=i}B<this._start&&(this._start=B),y>this._end&&(this._end=y)},R.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},R=I([V(0,P.IBufferService)],R)}();_.DirtyRowService=F},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.UnicodeService=void 0;var I=H(0),V=H(79),P=function(){function F(){this._providers=Object.create(null),this._active="",this._onChange=new I.EventEmitter;var R=new V.UnicodeV6;this.register(R),this._active=R.version,this._activeProvider=R}return Object.defineProperty(F.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"activeVersion",{get:function(){return this._active},set:function(R){if(!this._providers[R])throw new Error('unknown Unicode version "'+R+'"');this._active=R,this._activeProvider=this._providers[R],this._onChange.fire(R)},enumerable:!1,configurable:!0}),F.prototype.register=function(R){this._providers[R.version]=R},F.prototype.wcwidth=function(R){return this._activeProvider.wcwidth(R)},F.prototype.getStringCellWidth=function(R){for(var B=0,y=R.length,i=0;i<y;++i){var v=R.charCodeAt(i);if(55296<=v&&v<=56319){if(++i>=y)return B+this.wcwidth(v);var f=R.charCodeAt(i);56320<=f&&f<=57343?v=1024*(v-55296)+f-56320+65536:B+=this.wcwidth(f)}B+=this.wcwidth(v)}return B},F}();_.UnicodeService=P},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.UnicodeV6=void 0;var I,V=H(15),P=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],F=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],R=function(){function B(){if(this.version="6",!I){I=new Uint8Array(65536),V.fill(I,1),I[0]=0,V.fill(I,0,1,32),V.fill(I,0,127,160),V.fill(I,2,4352,4448),I[9001]=2,I[9002]=2,V.fill(I,2,11904,42192),I[12351]=1,V.fill(I,2,44032,55204),V.fill(I,2,63744,64256),V.fill(I,2,65040,65050),V.fill(I,2,65072,65136),V.fill(I,2,65280,65377),V.fill(I,2,65504,65511);for(var y=0;y<P.length;++y)V.fill(I,0,P[y][0],P[y][1]+1)}}return B.prototype.wcwidth=function(y){return y<32?0:y<127?1:y<65536?I[y]:function(i,v){var f,h=0,n=v.length-1;if(i<v[0][0]||i>v[n][1])return!1;for(;n>=h;)if(i>v[f=h+n>>1][1])h=f+1;else{if(!(i<v[f][0]))return!0;n=f-1}return!1}(y,F)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1},B}();_.UnicodeV6=R},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.CharsetService=void 0;var I=function(){function V(){this.glevel=0,this._charsets=[]}return V.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},V.prototype.setgLevel=function(P){this.glevel=P,this.charset=this._charsets[P]},V.prototype.setgCharset=function(P,F){this._charsets[P]=F,this.glevel===P&&(this.charset=F)},V}();_.CharsetService=I},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.updateWindowsModeWrappedState=void 0;var I=H(3);_.updateWindowsModeWrappedState=function(V){var P=V.buffer.lines.get(V.buffer.ybase+V.buffer.y-1),F=P==null?void 0:P.get(V.cols-1),R=V.buffer.lines.get(V.buffer.ybase+V.buffer.y);R&&F&&(R.isWrapped=F[I.CHAR_DATA_CODE_INDEX]!==I.NULL_CELL_CODE&&F[I.CHAR_DATA_CODE_INDEX]!==I.WHITESPACE_CELL_CODE)}},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.WriteBuffer=void 0;var I=function(){function V(P){this._action=P,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return V.prototype.writeSync=function(P){if(this._writeBuffer.length){for(var F=this._bufferOffset;F<this._writeBuffer.length;++F){var R=this._writeBuffer[F],B=this._callbacks[F];this._action(R),B&&B()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(P)},V.prototype.write=function(P,F){var R=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return R._innerWrite()})),this._pendingData+=P.length,this._writeBuffer.push(P),this._callbacks.push(F)},V.prototype._innerWrite=function(){for(var P=this,F=Date.now();this._writeBuffer.length>this._bufferOffset;){var R=this._writeBuffer[this._bufferOffset],B=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(R),this._pendingData-=R.length,B&&B(),Date.now()-F>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return P._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},V}();_.WriteBuffer=I},function(Re,_,H){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.AddonManager=void 0;var I=function(){function V(){this._addons=[]}return V.prototype.dispose=function(){for(var P=this._addons.length-1;P>=0;P--)this._addons[P].instance.dispose()},V.prototype.loadAddon=function(P,F){var R=this,B={instance:F,dispose:F.dispose,isDisposed:!1};this._addons.push(B),F.dispose=function(){return R._wrappedAddonDispose(B)},F.activate(P)},V.prototype._wrappedAddonDispose=function(P){if(!P.isDisposed){for(var F=-1,R=0;R<this._addons.length;R++)if(this._addons[R]===P){F=R;break}if(F===-1)throw new Error("Could not dispose an addon that has not been loaded");P.isDisposed=!0,P.dispose.apply(P.instance),this._addons.splice(F,1)}},V}();_.AddonManager=I}])})},93314:function(xt){"use strict";xt.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=="},40846:function(xt,Re,_){"use strict";_.d(Re,{ZP:function(){return ls}});function H(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var I={exports:{}};(function(c,e){(function(t){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,s=/^(?=([^\/?#]*))\1([^]*)$/,a=/(?:\/|^)\.(?=\/)/g,l=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,p={buildAbsoluteURL:function(b,A,M){if(M=M||{},b=b.trim(),A=A.trim(),!A){if(!M.alwaysNormalize)return b;var W=p.parseURL(b);if(!W)throw new Error("Error trying to parse base URL.");return W.path=p.normalizePath(W.path),p.buildURLFromParts(W)}var ee=p.parseURL(A);if(!ee)throw new Error("Error trying to parse relative URL.");if(ee.scheme)return M.alwaysNormalize?(ee.path=p.normalizePath(ee.path),p.buildURLFromParts(ee)):A;var le=p.parseURL(b);if(!le)throw new Error("Error trying to parse base URL.");if(!le.netLoc&&le.path&&le.path[0]!=="/"){var oe=s.exec(le.path);le.netLoc=oe[1],le.path=oe[2]}le.netLoc&&!le.path&&(le.path="/");var he={scheme:le.scheme,netLoc:ee.netLoc,path:null,params:ee.params,query:ee.query,fragment:ee.fragment};if(!ee.netLoc&&(he.netLoc=le.netLoc,ee.path[0]!=="/"))if(!ee.path)he.path=le.path,ee.params||(he.params=le.params,ee.query||(he.query=le.query));else{var me=le.path,De=me.substring(0,me.lastIndexOf("/")+1)+ee.path;he.path=p.normalizePath(De)}return he.path===null&&(he.path=M.alwaysNormalize?p.normalizePath(ee.path):ee.path),p.buildURLFromParts(he)},parseURL:function(b){var A=r.exec(b);return A?{scheme:A[1]||"",netLoc:A[2]||"",path:A[3]||"",params:A[4]||"",query:A[5]||"",fragment:A[6]||""}:null},normalizePath:function(b){for(b=b.split("").reverse().join("").replace(a,"");b.length!==(b=b.replace(l,"")).length;);return b.split("").reverse().join("")},buildURLFromParts:function(b){return b.scheme+b.netLoc+b.path+b.params+b.query+b.fragment}};c.exports=p})()})(I);var V=I.exports;function P(c,e){var t=Object.keys(c);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(c);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(c,s).enumerable})),t.push.apply(t,r)}return t}function F(c){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?P(Object(t),!0).forEach(function(r){y(c,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach(function(r){Object.defineProperty(c,r,Object.getOwnPropertyDescriptor(t,r))})}return c}function R(c,e){if(typeof c!="object"||!c)return c;var t=c[Symbol.toPrimitive];if(t!==void 0){var r=t.call(c,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(c)}function B(c){var e=R(c,"string");return typeof e=="symbol"?e:String(e)}function y(c,e,t){return e=B(e),e in c?Object.defineProperty(c,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):c[e]=t,c}function i(){return i=Object.assign?Object.assign.bind():function(c){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(c[r]=t[r])}return c},i.apply(this,arguments)}const v=Number.isFinite||function(c){return typeof c=="number"&&isFinite(c)},f=Number.isSafeInteger||function(c){return typeof c=="number"&&Math.abs(c)<=h},h=Number.MAX_SAFE_INTEGER||9007199254740991;let n=function(c){return c.MEDIA_ATTACHING="hlsMediaAttaching",c.MEDIA_ATTACHED="hlsMediaAttached",c.MEDIA_DETACHING="hlsMediaDetaching",c.MEDIA_DETACHED="hlsMediaDetached",c.BUFFER_RESET="hlsBufferReset",c.BUFFER_CODECS="hlsBufferCodecs",c.BUFFER_CREATED="hlsBufferCreated",c.BUFFER_APPENDING="hlsBufferAppending",c.BUFFER_APPENDED="hlsBufferAppended",c.BUFFER_EOS="hlsBufferEos",c.BUFFER_FLUSHING="hlsBufferFlushing",c.BUFFER_FLUSHED="hlsBufferFlushed",c.MANIFEST_LOADING="hlsManifestLoading",c.MANIFEST_LOADED="hlsManifestLoaded",c.MANIFEST_PARSED="hlsManifestParsed",c.LEVEL_SWITCHING="hlsLevelSwitching",c.LEVEL_SWITCHED="hlsLevelSwitched",c.LEVEL_LOADING="hlsLevelLoading",c.LEVEL_LOADED="hlsLevelLoaded",c.LEVEL_UPDATED="hlsLevelUpdated",c.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",c.LEVELS_UPDATED="hlsLevelsUpdated",c.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",c.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",c.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",c.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",c.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",c.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",c.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",c.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",c.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",c.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",c.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",c.CUES_PARSED="hlsCuesParsed",c.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",c.INIT_PTS_FOUND="hlsInitPtsFound",c.FRAG_LOADING="hlsFragLoading",c.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",c.FRAG_LOADED="hlsFragLoaded",c.FRAG_DECRYPTED="hlsFragDecrypted",c.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",c.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",c.FRAG_PARSING_METADATA="hlsFragParsingMetadata",c.FRAG_PARSED="hlsFragParsed",c.FRAG_BUFFERED="hlsFragBuffered",c.FRAG_CHANGED="hlsFragChanged",c.FPS_DROP="hlsFpsDrop",c.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",c.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",c.ERROR="hlsError",c.DESTROYING="hlsDestroying",c.KEY_LOADING="hlsKeyLoading",c.KEY_LOADED="hlsKeyLoaded",c.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",c.BACK_BUFFER_REACHED="hlsBackBufferReached",c.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",c}({}),o=function(c){return c.NETWORK_ERROR="networkError",c.MEDIA_ERROR="mediaError",c.KEY_SYSTEM_ERROR="keySystemError",c.MUX_ERROR="muxError",c.OTHER_ERROR="otherError",c}({}),u=function(c){return c.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",c.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",c.KEY_SYSTEM_NO_SESSION="keySystemNoSession",c.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",c.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",c.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",c.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",c.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",c.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",c.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",c.MANIFEST_LOAD_ERROR="manifestLoadError",c.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",c.MANIFEST_PARSING_ERROR="manifestParsingError",c.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",c.LEVEL_EMPTY_ERROR="levelEmptyError",c.LEVEL_LOAD_ERROR="levelLoadError",c.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",c.LEVEL_PARSING_ERROR="levelParsingError",c.LEVEL_SWITCH_ERROR="levelSwitchError",c.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",c.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",c.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",c.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",c.FRAG_LOAD_ERROR="fragLoadError",c.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",c.FRAG_DECRYPT_ERROR="fragDecryptError",c.FRAG_PARSING_ERROR="fragParsingError",c.FRAG_GAP="fragGap",c.REMUX_ALLOC_ERROR="remuxAllocError",c.KEY_LOAD_ERROR="keyLoadError",c.KEY_LOAD_TIMEOUT="keyLoadTimeOut",c.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",c.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",c.BUFFER_APPEND_ERROR="bufferAppendError",c.BUFFER_APPENDING_ERROR="bufferAppendingError",c.BUFFER_STALLED_ERROR="bufferStalledError",c.BUFFER_FULL_ERROR="bufferFullError",c.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",c.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",c.INTERNAL_EXCEPTION="internalException",c.INTERNAL_ABORTED="aborted",c.UNKNOWN="unknown",c}({});const S=function(){},O={trace:S,debug:S,log:S,warn:S,info:S,error:S};let T=O;function E(c){const e=self.console[c];return e?e.bind(self.console,`[${c}] >`):S}function C(c,...e){e.forEach(function(t){T[t]=c[t]?c[t].bind(c):E(t)})}function j(c,e){if(typeof console=="object"&&c===!0||typeof c=="object"){C(c,"debug","log","info","warn","error");try{T.log(`Debug logs enabled for "${e}" in hls.js version 1.5.20`)}catch(t){T=O}}else T=O}const x=T,L=/^(\d+)x(\d+)$/,N=/(.+?)=(".*?"|.*?)(?:,|$)/g;class z{constructor(e){typeof e=="string"&&(e=z.parseAttrList(e)),i(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const r=new Uint8Array(t.length/2);for(let s=0;s<t.length/2;s++)r[s]=parseInt(t.slice(s*2,s*2+2),16);return r}else return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const r=this[e];return r?parseFloat(r):t}enumeratedString(e){return this[e]}bool(e){return this[e]==="YES"}decimalResolution(e){const t=L.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const r={},s='"';for(N.lastIndex=0;(t=N.exec(e))!==null;){let a=t[2];a.indexOf(s)===0&&a.lastIndexOf(s)===a.length-1&&(a=a.slice(1,-1));const l=t[1].trim();r[l]=a}return r}}function te(c){return c!=="ID"&&c!=="CLASS"&&c!=="START-DATE"&&c!=="DURATION"&&c!=="END-DATE"&&c!=="END-ON-NEXT"}function J(c){return c==="SCTE35-OUT"||c==="SCTE35-IN"}class ge{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const r=t.attr;for(const s in r)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==r[s]){x.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=i(new z({}),r,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const r=new Date(this.attr["END-DATE"]);v(r.getTime())&&(this._endDate=r)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return e!==null?new Date(this._startDate.getTime()+e*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(v(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&v(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}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 se={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class Y{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[se.AUDIO]:null,[se.VIDEO]:null,[se.AUDIOVIDEO]:null},this.baseurl=e}setByteRange(e,t){const r=e.split("@",2);let s;r.length===1?s=(t==null?void 0:t.byteRangeEndOffset)||0:s=parseInt(r[1]),this._byteRange=[s,parseInt(r[0])+s]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=V.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class ie extends Y{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=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.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new _e,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 decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const r=Object.keys(this.levelkeys);if(r.length===1)return this._decryptdata=this.levelkeys[r[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null||!v(this.programDateTime))return null;const e=v(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),r=t.length;if(r>1||r===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,r,s,a,l=!1){const{elementaryStreams:p}=this,b=p[e];if(!b){p[e]={startPTS:t,endPTS:r,startDTS:s,endDTS:a,partial:l};return}b.startPTS=Math.min(b.startPTS,t),b.endPTS=Math.max(b.endPTS,r),b.startDTS=Math.min(b.startDTS,s),b.endDTS=Math.max(b.endDTS,a)}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[se.AUDIO]=null,e[se.VIDEO]=null,e[se.AUDIOVIDEO]=null}}class U extends Y{constructor(e,t,r,s,a){super(r),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new _e,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=s;const l=e.enumeratedString("BYTERANGE");l&&this.setByteRange(l,a),a&&(this.fragOffset=a.fragOffset+a.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)}}const Z=10;class K{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.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 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.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,r=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!r||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&r>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return this.fragments.length?v(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Z}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get 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 lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function k(c){return Uint8Array.from(atob(c),e=>e.charCodeAt(0))}function D(c){const e=Oe(c).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function re(c){const e=function(r,s,a){const l=r[s];r[s]=r[a],r[a]=l};e(c,0,3),e(c,1,2),e(c,4,5),e(c,6,7)}function pe(c){const e=c.split(":");let t=null;if(e[0]==="data"&&e.length===2){const r=e[1].split(";"),s=r[r.length-1].split(",");if(s.length===2){const a=s[0]==="base64",l=s[1];a?(r.splice(-1,1),t=k(l)):t=D(l)}}return t}function Oe(c){return Uint8Array.from(unescape(encodeURIComponent(c)),e=>e.charCodeAt(0))}const $e=typeof self!="undefined"?self:void 0;var Ge={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},ke={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function et(c){switch(c){case ke.FAIRPLAY:return Ge.FAIRPLAY;case ke.PLAYREADY:return Ge.PLAYREADY;case ke.WIDEVINE:return Ge.WIDEVINE;case ke.CLEARKEY:return Ge.CLEARKEY}}var Ke={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",FAIRPLAY:"94ce86fb07ff4f43adb893d2fa968ca2",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function tt(c){if(c===Ke.WIDEVINE)return Ge.WIDEVINE;if(c===Ke.PLAYREADY)return Ge.PLAYREADY;if(c===Ke.CENC||c===Ke.CLEARKEY)return Ge.CLEARKEY}function It(c){switch(c){case Ge.FAIRPLAY:return ke.FAIRPLAY;case Ge.PLAYREADY:return ke.PLAYREADY;case Ge.WIDEVINE:return ke.WIDEVINE;case Ge.CLEARKEY:return ke.CLEARKEY}}function Yt(c){const{drmSystems:e,widevineLicenseUrl:t}=c,r=e?[Ge.FAIRPLAY,Ge.WIDEVINE,Ge.PLAYREADY,Ge.CLEARKEY].filter(s=>!!e[s]):[];return!r[Ge.WIDEVINE]&&t&&r.push(Ge.WIDEVINE),r}const qt=function(c){return $e!=null&&(c=$e.navigator)!=null&&c.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function Ot(c,e,t,r){let s;switch(c){case Ge.FAIRPLAY:s=["cenc","sinf"];break;case Ge.WIDEVINE:case Ge.PLAYREADY:s=["cenc"];break;case Ge.CLEARKEY:s=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${c}`)}return Ut(s,e,t,r)}function Ut(c,e,t,r){return[{initDataTypes:c,persistentState:r.persistentState||"optional",distinctiveIdentifier:r.distinctiveIdentifier||"optional",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:e.map(a=>({contentType:`audio/mp4; codecs="${a}"`,robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null})),videoCapabilities:t.map(a=>({contentType:`video/mp4; codecs="${a}"`,robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}))}]}function Ft(c){const e=new Uint16Array(c.buffer,c.byteOffset,c.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),r=t.substring(t.indexOf("<"),t.length),l=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(l){const p=l.childNodes[0]?l.childNodes[0].nodeValue:l.getAttribute("VALUE");if(p){const b=k(p).subarray(0,16);return re(b),b}}return null}function Ie(c,e,t){return Uint8Array.prototype.slice?c.slice(e,t):new Uint8Array(Array.prototype.slice.call(c,e,t))}const Ze=(c,e)=>e+10<=c.length&&c[e]===73&&c[e+1]===68&&c[e+2]===51&&c[e+3]<255&&c[e+4]<255&&c[e+6]<128&&c[e+7]<128&&c[e+8]<128&&c[e+9]<128,Fe=(c,e)=>e+10<=c.length&&c[e]===51&&c[e+1]===68&&c[e+2]===73&&c[e+3]<255&&c[e+4]<255&&c[e+6]<128&&c[e+7]<128&&c[e+8]<128&&c[e+9]<128,it=(c,e)=>{const t=e;let r=0;for(;Ze(c,e);){r+=10;const s=nt(c,e+6);r+=s,Fe(c,e+10)&&(r+=10),e+=r}if(r>0)return c.subarray(t,t+r)},nt=(c,e)=>{let t=0;return t=(c[e]&127)<<21,t|=(c[e+1]&127)<<14,t|=(c[e+2]&127)<<7,t|=c[e+3]&127,t},ue=(c,e)=>Ze(c,e)&&nt(c,e+6)+10<=c.length-e,ye=c=>{const e=Me(c);for(let t=0;t<e.length;t++){const r=e[t];if(Te(r))return He(r)}},Te=c=>c&&c.key==="PRIV"&&c.info==="com.apple.streaming.transportStreamTimestamp",Ae=c=>{const e=String.fromCharCode(c[0],c[1],c[2],c[3]),t=nt(c,4),r=10;return{type:e,size:t,data:c.subarray(r,r+t)}},Me=c=>{let e=0;const t=[];for(;Ze(c,e);){const r=nt(c,e+6);e+=10;const s=e+r;for(;e+8<s;){const a=Ae(c.subarray(e)),l=ze(a);l&&t.push(l),e+=a.size+10}Fe(c,e)&&(e+=10)}return t},ze=c=>c.type==="PRIV"?qe(c):c.type[0]==="W"?Xe(c):rt(c),qe=c=>{if(c.size<2)return;const e=lt(c.data,!0),t=new Uint8Array(c.data.subarray(e.length+1));return{key:c.type,info:e,data:t.buffer}},rt=c=>{if(c.size<2)return;if(c.type==="TXXX"){let t=1;const r=lt(c.data.subarray(t),!0);t+=r.length+1;const s=lt(c.data.subarray(t));return{key:c.type,info:r,data:s}}const e=lt(c.data.subarray(1));return{key:c.type,data:e}},Xe=c=>{if(c.type==="WXXX"){if(c.size<2)return;let t=1;const r=lt(c.data.subarray(t),!0);t+=r.length+1;const s=lt(c.data.subarray(t));return{key:c.type,info:r,data:s}}const e=lt(c.data);return{key:c.type,data:e}},He=c=>{if(c.data.byteLength===8){const e=new Uint8Array(c.data),t=e[3]&1;let r=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return r/=45,t&&(r+=4772185884e-2),Math.round(r)}},lt=(c,e=!1)=>{const t=ft();if(t){const A=t.decode(c);if(e){const M=A.indexOf("\0");return M!==-1?A.substring(0,M):A}return A.replace(/\0/g,"")}const r=c.length;let s,a,l,p="",b=0;for(;b<r;){if(s=c[b++],s===0&&e)return p;if(s===0||s===3)continue;switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:p+=String.fromCharCode(s);break;case 12:case 13:a=c[b++],p+=String.fromCharCode((s&31)<<6|a&63);break;case 14:a=c[b++],l=c[b++],p+=String.fromCharCode((s&15)<<12|(a&63)<<6|(l&63)<<0);break}}return p};let gt;function ft(){if(!navigator.userAgent.includes("PlayStation 4"))return!gt&&typeof self.TextDecoder!="undefined"&&(gt=new self.TextDecoder("utf-8")),gt}const _t={hexDump:function(c){let e="";for(let t=0;t<c.length;t++){let r=c[t].toString(16);r.length<2&&(r="0"+r),e+=r}return e}},wt=Math.pow(2,32)-1,mt=[].push,kt={video:1,audio:2,id3:3,text:4};function bt(c){return String.fromCharCode.apply(null,c)}function $(c,e){const t=c[e]<<8|c[e+1];return t<0?65536+t:t}function G(c,e){const t=ae(c,e);return t<0?4294967296+t:t}function Qe(c,e){let t=G(c,e);return t*=Math.pow(2,32),t+=G(c,e+4),t}function ae(c,e){return c[e]<<24|c[e+1]<<16|c[e+2]<<8|c[e+3]}function be(c,e,t){c[e]=t>>24,c[e+1]=t>>16&255,c[e+2]=t>>8&255,c[e+3]=t&255}function Kt(c){const e=c.byteLength;for(let t=0;t<e;){const r=G(c,t);if(r>8&&c[t+4]===109&&c[t+5]===111&&c[t+6]===111&&c[t+7]===102)return!0;t=r>1?t+r:e}return!1}function Ee(c,e){const t=[];if(!e.length)return t;const r=c.byteLength;for(let s=0;s<r;){const a=G(c,s),l=bt(c.subarray(s+4,s+8)),p=a>1?s+a:r;if(l===e[0])if(e.length===1)t.push(c.subarray(s+8,p));else{const b=Ee(c.subarray(s+8,p),e.slice(1));b.length&&mt.apply(t,b)}s=p}return t}function Pe(c){const e=[],t=c[0];let r=8;const s=G(c,r);r+=4;let a=0,l=0;t===0?(a=G(c,r),l=G(c,r+4),r+=8):(a=Qe(c,r),l=Qe(c,r+8),r+=16),r+=2;let p=c.length+l;const b=$(c,r);r+=2;for(let A=0;A<b;A++){let M=r;const W=G(c,M);M+=4;const ee=W&2147483647;if((W&2147483648)>>>31===1)return x.warn("SIDX has hierarchical references (not supported)"),null;const oe=G(c,M);M+=4,e.push({referenceSize:ee,subsegmentDuration:oe,info:{duration:oe/s,start:p,end:p+ee-1}}),p+=ee,M+=4,r=M}return{earliestPresentationTime:a,timescale:s,version:t,referencesCount:b,references:e}}function Ne(c){const e=[],t=Ee(c,["moov","trak"]);for(let s=0;s<t.length;s++){const a=t[s],l=Ee(a,["tkhd"])[0];if(l){let p=l[0];const b=G(l,p===0?12:20),A=Ee(a,["mdia","mdhd"])[0];if(A){p=A[0];const M=G(A,p===0?12:20),W=Ee(a,["mdia","hdlr"])[0];if(W){const ee=bt(W.subarray(8,12)),le={soun:se.AUDIO,vide:se.VIDEO}[ee];if(le){const oe=Ee(a,["mdia","minf","stbl","stsd"])[0],he=ce(oe);e[b]={timescale:M,type:le},e[le]=F({timescale:M,id:b},he)}}}}}return Ee(c,["moov","mvex","trex"]).forEach(s=>{const a=G(s,4),l=e[a];l&&(l.default={duration:G(s,12),flags:G(s,20)})}),e}function ce(c){const e=c.subarray(8),t=e.subarray(86),r=bt(e.subarray(4,8));let s=r;const a=r==="enca"||r==="encv";if(a){const p=Ee(e,[r])[0].subarray(r==="enca"?28:78);Ee(p,["sinf"]).forEach(A=>{const M=Ee(A,["schm"])[0];if(M){const W=bt(M.subarray(4,8));if(W==="cbcs"||W==="cenc"){const ee=Ee(A,["frma"])[0];ee&&(s=bt(ee))}}})}switch(s){case"avc1":case"avc2":case"avc3":case"avc4":{const l=Ee(t,["avcC"])[0];s+="."+we(l[1])+we(l[2])+we(l[3]);break}case"mp4a":{const l=Ee(e,[r])[0],p=Ee(l.subarray(28),["esds"])[0];if(p&&p.length>12){let b=4;if(p[b++]!==3)break;b=de(p,b),b+=2;const A=p[b++];if(A&128&&(b+=2),A&64&&(b+=p[b++]),p[b++]!==4)break;b=de(p,b);const M=p[b++];if(M===64)s+="."+we(M);else break;if(b+=12,p[b++]!==5)break;b=de(p,b);const W=p[b++];let ee=(W&248)>>3;ee===31&&(ee+=1+((W&7)<<3)+((p[b]&224)>>5)),s+="."+ee}break}case"hvc1":case"hev1":{const l=Ee(t,["hvcC"])[0],p=l[1],b=["","A","B","C"][p>>6],A=p&31,M=G(l,2),W=(p&32)>>5?"H":"L",ee=l[12],le=l.subarray(6,12);s+="."+b+A,s+="."+M.toString(16).toUpperCase(),s+="."+W+ee;let oe="";for(let he=le.length;he--;){const me=le[he];(me||oe)&&(oe="."+me.toString(16).toUpperCase()+oe)}s+=oe;break}case"dvh1":case"dvhe":{const l=Ee(t,["dvcC"])[0],p=l[2]>>1&127,b=l[2]<<5&32|l[3]>>3&31;s+="."+Le(p)+"."+Le(b);break}case"vp09":{const l=Ee(t,["vpcC"])[0],p=l[4],b=l[5],A=l[6]>>4&15;s+="."+Le(p)+"."+Le(b)+"."+Le(A);break}case"av01":{const l=Ee(t,["av1C"])[0],p=l[1]>>>5,b=l[1]&31,A=l[2]>>>7?"H":"M",M=(l[2]&64)>>6,W=(l[2]&32)>>5,ee=p===2&&M?W?12:10:M?10:8,le=(l[2]&16)>>4,oe=(l[2]&8)>>3,he=(l[2]&4)>>2,me=l[2]&3;s+="."+p+"."+Le(b)+A+"."+Le(ee)+"."+le+"."+oe+he+me+"."+Le(1)+"."+Le(1)+"."+Le(1)+"."+0;break}}return{codec:s,encrypted:a}}function de(c,e){const t=e+5;for(;c[e++]&128&&e<t;);return e}function we(c){return("0"+c.toString(16).toUpperCase()).slice(-2)}function Le(c){return(c<10?"0":"")+c}function ne(c,e){if(!c||!e)return c;const t=e.keyId;return t&&e.isCommonEncryption&&Ee(c,["moov","trak"]).forEach(s=>{const l=Ee(s,["mdia","minf","stbl","stsd"])[0].subarray(8);let p=Ee(l,["enca"]);const b=p.length>0;b||(p=Ee(l,["encv"])),p.forEach(A=>{const M=b?A.subarray(28):A.subarray(78);Ee(M,["sinf"]).forEach(ee=>{const le=dt(ee);if(le){const oe=le.subarray(8,24);oe.some(he=>he!==0)||(x.log(`[eme] Patching keyId in 'enc${b?"a":"v"}>sinf>>tenc' box: ${_t.hexDump(oe)} -> ${_t.hexDump(t)}`),le.set(t,8))}})})}),c}function dt(c){const e=Ee(c,["schm"])[0];if(e){const t=bt(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return Ee(c,["schi","tenc"])[0]}return null}function Se(c,e){return Ee(e,["moof","traf"]).reduce((t,r)=>{const s=Ee(r,["tfdt"])[0],a=s[0],l=Ee(r,["tfhd"]).reduce((p,b)=>{const A=G(b,4),M=c[A];if(M){let W=G(s,4);if(a===1){if(W===wt)return x.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),p;W*=wt+1,W+=G(s,8)}const ee=M.timescale||9e4,le=W/ee;if(v(le)&&(p===null||le<p))return le}return p},null);return l!==null&&v(l)&&(t===null||l<t)?l:t},null)}function Dt(c,e){let t=0,r=0,s=0;const a=Ee(c,["moof","traf"]);for(let l=0;l<a.length;l++){const p=a[l],b=Ee(p,["tfhd"])[0],A=G(b,4),M=e[A];if(!M)continue;const W=M.default,ee=G(b,0)|(W==null?void 0:W.flags);let le=W==null?void 0:W.duration;ee&8&&(ee&2?le=G(b,12):le=G(b,8));const oe=M.timescale||9e4,he=Ee(p,["trun"]);for(let me=0;me<he.length;me++){if(t=Pt(he[me]),!t&&le){const De=G(he[me],4);t=le*De}M.type===se.VIDEO?r+=t/oe:M.type===se.AUDIO&&(s+=t/oe)}}if(r===0&&s===0){let l=1/0,p=0,b=0;const A=Ee(c,["sidx"]);for(let M=0;M<A.length;M++){const W=Pe(A[M]);if(W!=null&&W.references){l=Math.min(l,W.earliestPresentationTime/W.timescale);const ee=W.references.reduce((le,oe)=>le+oe.info.duration||0,0);p=Math.max(p,ee+W.earliestPresentationTime/W.timescale),b=p-l}}if(b&&v(b))return b}return r||s}function Pt(c){const e=G(c,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let r=0;const s=G(c,4);for(let a=0;a<s;a++){if(e&256){const l=G(c,t);r+=l,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return r}function Ht(c,e,t){Ee(e,["moof","traf"]).forEach(r=>{Ee(r,["tfhd"]).forEach(s=>{const a=G(s,4),l=c[a];if(!l)return;const p=l.timescale||9e4;Ee(r,["tfdt"]).forEach(b=>{const A=b[0],M=t*p;if(M){let W=G(b,4);if(A===0)W-=M,W=Math.max(W,0),be(b,4,W);else{W*=Math.pow(2,32),W+=G(b,8),W-=M,W=Math.max(W,0);const ee=Math.floor(W/(wt+1)),le=Math.floor(W%(wt+1));be(b,4,ee),be(b,8,le)}}})})})}function sr(c){const e={valid:null,remainder:null},t=Ee(c,["moof"]);if(t.length<2)return e.remainder=c,e;const r=t[t.length-1];return e.valid=Ie(c,0,r.byteOffset-8),e.remainder=Ie(c,r.byteOffset-8),e}function St(c,e){const t=new Uint8Array(c.length+e.length);return t.set(c),t.set(e,c.length),t}function Et(c,e){const t=[],r=e.samples,s=e.timescale,a=e.id;let l=!1;return Ee(r,["moof"]).map(b=>{const A=b.byteOffset-8;Ee(b,["traf"]).map(W=>{const ee=Ee(W,["tfdt"]).map(le=>{const oe=le[0];let he=G(le,4);return oe===1&&(he*=Math.pow(2,32),he+=G(le,8)),he/s})[0];return ee!==void 0&&(c=ee),Ee(W,["tfhd"]).map(le=>{const oe=G(le,4),he=G(le,0)&16777215,me=(he&1)!==0,De=(he&2)!==0,We=(he&8)!==0;let je=0;const ot=(he&16)!==0;let Ye=0;const pt=(he&32)!==0;let at=8;oe===a&&(me&&(at+=8),De&&(at+=4),We&&(je=G(le,at),at+=4),ot&&(Ye=G(le,at),at+=4),pt&&(at+=4),e.type==="video"&&(l=ur(e.codec)),Ee(W,["trun"]).map(Ct=>{const Bt=Ct[0],ct=G(Ct,0)&16777215,At=(ct&1)!==0;let or=0;const $t=(ct&4)!==0,ar=(ct&256)!==0;let nr=0;const Jt=(ct&512)!==0;let Er=0;const Ur=(ct&1024)!==0,Vt=(ct&2048)!==0;let jt=0;const Dr=G(Ct,4);let gr=8;At&&(or=G(Ct,gr),gr+=4),$t&&(gr+=4);let Br=or+A;for(let li=0;li<Dr;li++){if(ar?(nr=G(Ct,gr),gr+=4):nr=je,Jt?(Er=G(Ct,gr),gr+=4):Er=Ye,Ur&&(gr+=4),Vt&&(Bt===0?jt=G(Ct,gr):jt=ae(Ct,gr),gr+=4),e.type===se.VIDEO){let bi=0;for(;bi<Er;){const Ci=G(r,Br);if(Br+=4,Rr(l,r[Br])){const sn=r.subarray(Br,Br+Ci);$r(sn,l?2:1,c+jt/s,t)}Br+=Ci,bi+=Ci+4}}c+=nr/s}}))})})}),t}function ur(c){if(!c)return!1;const e=c.indexOf("."),t=e<0?c:c.substring(0,e);return t==="hvc1"||t==="hev1"||t==="dvh1"||t==="dvhe"}function Rr(c,e){if(c){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function $r(c,e,t,r){const s=zr(c);let a=0;a+=e;let l=0,p=0,b=0;for(;a<s.length;){l=0;do{if(a>=s.length)break;b=s[a++],l+=b}while(b===255);p=0;do{if(a>=s.length)break;b=s[a++],p+=b}while(b===255);const A=s.length-a;let M=a;if(p<A)a+=p;else if(p>A){x.error(`Malformed SEI payload. ${p} is too small, only ${A} bytes left to parse.`);break}if(l===4){if(s[M++]===181){const ee=$(s,M);if(M+=2,ee===49){const le=G(s,M);if(M+=4,le===1195456820){const oe=s[M++];if(oe===3){const he=s[M++],me=31&he,De=64&he,We=De?2+me*3:0,je=new Uint8Array(We);if(De){je[0]=he;for(let ot=1;ot<We;ot++)je[ot]=s[M++]}r.push({type:oe,payloadType:l,pts:t,bytes:je})}}}}}else if(l===5&&p>16){const W=[];for(let oe=0;oe<16;oe++){const he=s[M++].toString(16);W.push(he.length==1?"0"+he:he),(oe===3||oe===5||oe===7||oe===9)&&W.push("-")}const ee=p-16,le=new Uint8Array(ee);for(let oe=0;oe<ee;oe++)le[oe]=s[M++];r.push({payloadType:l,pts:t,uuid:W.join(""),userData:lt(le),userDataBytes:le})}}}function zr(c){const e=c.byteLength,t=[];let r=1;for(;r<e-2;)c[r]===0&&c[r+1]===0&&c[r+2]===3?(t.push(r+2),r+=2):r++;if(t.length===0)return c;const s=e-t.length,a=new Uint8Array(s);let l=0;for(r=0;r<s;l++,r++)l===t[0]&&(l++,t.shift()),a[r]=c[l];return a}function Rt(c){const e=c[0];let t="",r="",s=0,a=0,l=0,p=0,b=0,A=0;if(e===0){for(;bt(c.subarray(A,A+1))!=="\0";)t+=bt(c.subarray(A,A+1)),A+=1;for(t+=bt(c.subarray(A,A+1)),A+=1;bt(c.subarray(A,A+1))!=="\0";)r+=bt(c.subarray(A,A+1)),A+=1;r+=bt(c.subarray(A,A+1)),A+=1,s=G(c,12),a=G(c,16),p=G(c,20),b=G(c,24),A=28}else if(e===1){A+=4,s=G(c,A),A+=4;const W=G(c,A);A+=4;const ee=G(c,A);for(A+=4,l=Yo(2,32)*W+ee,f(l)||(l=Number.MAX_SAFE_INTEGER,x.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),p=G(c,A),A+=4,b=G(c,A),A+=4;bt(c.subarray(A,A+1))!=="\0";)t+=bt(c.subarray(A,A+1)),A+=1;for(t+=bt(c.subarray(A,A+1)),A+=1;bt(c.subarray(A,A+1))!=="\0";)r+=bt(c.subarray(A,A+1)),A+=1;r+=bt(c.subarray(A,A+1)),A+=1}const M=c.subarray(A,c.byteLength);return{schemeIdUri:t,value:r,timeScale:s,presentationTime:l,presentationTimeDelta:a,eventDuration:p,id:b,payload:M}}function Zt(c,...e){const t=e.length;let r=8,s=t;for(;s--;)r+=e[s].byteLength;const a=new Uint8Array(r);for(a[0]=r>>24&255,a[1]=r>>16&255,a[2]=r>>8&255,a[3]=r&255,a.set(c,4),s=0,r=8;s<t;s++)a.set(e[s],r),r+=e[s].byteLength;return a}function _r(c,e,t){if(c.byteLength!==16)throw new RangeError("Invalid system id");let r,s;if(e){r=1,s=new Uint8Array(e.length*16);for(let p=0;p<e.length;p++){const b=e[p];if(b.byteLength!==16)throw new RangeError("Invalid key");s.set(b,p*16)}}else r=0,s=new Uint8Array;let a;r>0?(a=new Uint8Array(4),e.length>0&&new DataView(a.buffer).setUint32(0,e.length,!1)):a=new Uint8Array;const l=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(l.buffer).setUint32(0,t.byteLength,!1),Zt([112,115,115,104],new Uint8Array([r,0,0,0]),c,a,s,l,t||new Uint8Array)}function jr(c){const e=[];if(c instanceof ArrayBuffer){const t=c.byteLength;let r=0;for(;r+32<t;){const s=new DataView(c,r),a=Or(s);e.push(a),r+=a.size}}return e}function Or(c){const e=c.getUint32(0),t=c.byteOffset,r=c.byteLength;if(r<e)return{offset:t,size:r};if(c.getUint32(4)!==1886614376)return{offset:t,size:e};const a=c.getUint32(8)>>>24;if(a!==0&&a!==1)return{offset:t,size:e};const l=c.buffer,p=_t.hexDump(new Uint8Array(l,t+12,16)),b=c.getUint32(28);let A=null,M=null;if(a===0){if(e-32<b||b<22)return{offset:t,size:e};M=new Uint8Array(l,t+32,b)}else if(a===1){if(!b||r<t+32+b*16+16)return{offset:t,size:e};A=[];for(let W=0;W<b;W++)A.push(new Uint8Array(l,t+32+W*16,16))}return{version:a,systemId:p,kids:A,data:M,offset:t,size:e}}let ti={};class cr{static clearKeyUriToKeyIdMap(){ti={}}constructor(e,t,r,s=[1],a=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=r,this.keyFormatVersions=s,this.iv=a,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&e!=="AES-128"}isSupported(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case ke.FAIRPLAY:case ke.WIDEVINE:case ke.PLAYREADY:case ke.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof e!="number"&&(this.method==="AES-128"&&!this.iv&&x.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const r=xi(e);return new cr(this.method,this.uri,"identity",this.keyFormatVersions,r)}const t=pe(this.uri);if(t)switch(this.keyFormat){case ke.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case ke.PLAYREADY:{const r=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=_r(r,null,t),this.keyId=Ft(t);break}default:{let r=t.subarray(0,16);if(r.length!==16){const s=new Uint8Array(16);s.set(r,16-r.length),r=s}this.keyId=r;break}}if(!this.keyId||this.keyId.byteLength!==16){let r=ti[this.uri];if(!r){const s=Object.keys(ti).length%Number.MAX_SAFE_INTEGER;r=new Uint8Array(16),new DataView(r.buffer,12,4).setUint32(0,s),ti[this.uri]=r}this.keyId=r}return this}}function xi(c){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=c>>8*(15-t)&255;return e}const ri=/\{\$([a-zA-Z0-9-_]+)\}/g;function zt(c){return ri.test(c)}function Tt(c,e,t){if(c.variableList!==null||c.hasVariableRefs)for(let r=t.length;r--;){const s=t[r],a=e[s];a&&(e[s]=Qt(c,a))}}function Qt(c,e){if(c.variableList!==null||c.hasVariableRefs){const t=c.variableList;return e.replace(ri,r=>{const s=r.substring(2,r.length-1),a=t==null?void 0:t[s];return a===void 0?(c.playlistParsingError||(c.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${s}"`)),r):a})}return e}function Sr(c,e,t){let r=c.variableList;r||(c.variableList=r={});let s,a;if("QUERYPARAM"in e){s=e.QUERYPARAM;try{const l=new self.URL(t).searchParams;if(l.has(s))a=l.get(s);else throw new Error(`"${s}" does not match any query parameter in URI: "${t}"`)}catch(l){c.playlistParsingError||(c.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${l.message}`))}}else s=e.NAME,a=e.VALUE;s in r?c.playlistParsingError||(c.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${s}"`)):r[s]=a||""}function yr(c,e,t){const r=e.IMPORT;if(t&&r in t){let s=c.variableList;s||(c.variableList=s={}),s[r]=t[r]}else c.playlistParsingError||(c.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${r}"`))}function Kr(c=!0){return typeof self=="undefined"?void 0:(c||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Mi(c){return typeof self!="undefined"&&c===self.ManagedMediaSource}const Vr={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,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 Cr(c,e){const t=Vr[e];return!!t&&!!t[c.slice(0,4)]}function Pr(c,e,t=!0){return!c.split(",").some(r=>!dr(r,e,t))}function dr(c,e,t=!0){var r;const s=Kr(t);return(r=s==null?void 0:s.isTypeSupported(ii(c,e)))!=null?r:!1}function ii(c,e){return`${e}/mp4;codecs="${c}"`}function hi(c){if(c){const e=c.substring(0,4);return Vr.video[e]}return 2}function Wr(c){return c.split(",").reduce((e,t)=>{const r=Vr.video[t];return r?(r*2+e)/(e?3:2):(Vr.audio[t]+e)/(e?2:1)},0)}const rr={};function hr(c,e=!0){if(rr[c])return rr[c];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[c];for(let r=0;r<t.length;r++)if(dr(t[r],"audio",e))return rr[c]=t[r],t[r];return c}const Ar=/flac|opus/i;function Lr(c,e=!0){return c.replace(Ar,t=>hr(t.toLowerCase(),e))}function wr(c,e){return c&&c!=="mp4a"?c:e&&e.split(",")[0]}function si(c){const e=c.split(",");for(let t=0;t<e.length;t++){const r=e[t].split(".");if(r.length>2){let s=r.shift()+".";s+=parseInt(r.shift()).toString(16),s+=("000"+parseInt(r.shift()).toString(16)).slice(-4),e[t]=s}}return e.join(",")}const yn=/#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,Li=/#EXT-X-MEDIA:(.*)/g,pr=/^#EXT(?:INF|-X-TARGETDURATION):/m,vr=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),Fi=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(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 Jr{static findGroup(e,t){for(let r=0;r<e.length;r++){const s=e[r];if(s.id===t)return s}}static resolve(e,t){return V.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return pr.test(e)}static parseMasterPlaylist(e,t){const r=zt(e),s={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:r},a=[];yn.lastIndex=0;let l;for(;(l=yn.exec(e))!=null;)if(l[1]){var p;const A=new z(l[1]);Tt(s,A,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const M=Qt(s,l[2]),W={attrs:A,bitrate:A.decimalInteger("BANDWIDTH")||A.decimalInteger("AVERAGE-BANDWIDTH"),name:A.NAME,url:Jr.resolve(M,t)},ee=A.decimalResolution("RESOLUTION");ee&&(W.width=ee.width,W.height=ee.height),Rn(A.CODECS,W),(p=W.unknownCodecs)!=null&&p.length||a.push(W),s.levels.push(W)}else if(l[3]){const A=l[3],M=l[4];switch(A){case"SESSION-DATA":{const W=new z(M);Tt(s,W,["DATA-ID","LANGUAGE","VALUE","URI"]);const ee=W["DATA-ID"];ee&&(s.sessionData===null&&(s.sessionData={}),s.sessionData[ee]=W);break}case"SESSION-KEY":{const W=ji(M,t,s);W.encrypted&&W.isSupported()?(s.sessionKeys===null&&(s.sessionKeys=[]),s.sessionKeys.push(W)):x.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${M}"`);break}case"DEFINE":{{const W=new z(M);Tt(s,W,["NAME","VALUE","QUERYPARAM"]),Sr(s,W,t)}break}case"CONTENT-STEERING":{const W=new z(M);Tt(s,W,["SERVER-URI","PATHWAY-ID"]),s.contentSteering={uri:Jr.resolve(W["SERVER-URI"],t),pathwayId:W["PATHWAY-ID"]||"."};break}case"START":{s.startTimeOffset=bn(M);break}}}const b=a.length>0&&a.length<s.levels.length;return s.levels=b?a:s.levels,s.levels.length===0&&(s.playlistParsingError=new Error("no levels found in manifest")),s}static parseMasterPlaylistMedia(e,t,r){let s;const a={},l=r.levels,p={AUDIO:l.map(A=>({id:A.attrs.AUDIO,audioCodec:A.audioCodec})),SUBTITLES:l.map(A=>({id:A.attrs.SUBTITLES,textCodec:A.textCodec})),"CLOSED-CAPTIONS":[]};let b=0;for(Li.lastIndex=0;(s=Li.exec(e))!==null;){const A=new z(s[1]),M=A.TYPE;if(M){const W=p[M],ee=a[M]||[];a[M]=ee,Tt(r,A,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const le=A.LANGUAGE,oe=A["ASSOC-LANGUAGE"],he=A.CHANNELS,me=A.CHARACTERISTICS,De=A["INSTREAM-ID"],We={attrs:A,bitrate:0,id:b++,groupId:A["GROUP-ID"]||"",name:A.NAME||le||"",type:M,default:A.bool("DEFAULT"),autoselect:A.bool("AUTOSELECT"),forced:A.bool("FORCED"),lang:le,url:A.URI?Jr.resolve(A.URI,t):""};if(oe&&(We.assocLang=oe),he&&(We.channels=he),me&&(We.characteristics=me),De&&(We.instreamId=De),W!=null&&W.length){const je=Jr.findGroup(W,We.groupId)||W[0];xn(We,je,"audioCodec"),xn(We,je,"textCodec")}ee.push(We)}}return a}static parseLevelPlaylist(e,t,r,s,a,l){const p=new K(t),b=p.fragments;let A=null,M=0,W=0,ee=0,le=0,oe=null,he=new ie(s,t),me,De,We,je=-1,ot=!1,Ye=null;for(vr.lastIndex=0,p.m3u8=e,p.hasVariableRefs=zt(e);(me=vr.exec(e))!==null;){ot&&(ot=!1,he=new ie(s,t),he.start=ee,he.sn=M,he.cc=le,he.level=r,A&&(he.initSegment=A,he.rawProgramDateTime=A.rawProgramDateTime,A.rawProgramDateTime=null,Ye&&(he.setByteRange(Ye),Ye=null)));const Bt=me[1];if(Bt){he.duration=parseFloat(Bt);const ct=(" "+me[2]).slice(1);he.title=ct||null,he.tagList.push(ct?["INF",Bt,ct]:["INF",Bt])}else if(me[3]){if(v(he.duration)){he.start=ee,We&&Ji(he,We,p),he.sn=M,he.level=r,he.cc=le,b.push(he);const ct=(" "+me[3]).slice(1);he.relurl=Qt(p,ct),an(he,oe),oe=he,ee+=he.duration,M++,W=0,ot=!0}}else if(me[4]){const ct=(" "+me[4]).slice(1);oe?he.setByteRange(ct,oe):he.setByteRange(ct)}else if(me[5])he.rawProgramDateTime=(" "+me[5]).slice(1),he.tagList.push(["PROGRAM-DATE-TIME",he.rawProgramDateTime]),je===-1&&(je=b.length);else{if(me=me[0].match(Fi),!me){x.warn("No matches on slow regex match for level playlist!");continue}for(De=1;De<me.length&&typeof me[De]=="undefined";De++);const ct=(" "+me[De]).slice(1),At=(" "+me[De+1]).slice(1),or=me[De+2]?(" "+me[De+2]).slice(1):"";switch(ct){case"PLAYLIST-TYPE":p.type=At.toUpperCase();break;case"MEDIA-SEQUENCE":M=p.startSN=parseInt(At);break;case"SKIP":{const $t=new z(At);Tt(p,$t,["RECENTLY-REMOVED-DATERANGES"]);const ar=$t.decimalInteger("SKIPPED-SEGMENTS");if(v(ar)){p.skippedSegments=ar;for(let Jt=ar;Jt--;)b.unshift(null);M+=ar}const nr=$t.enumeratedString("RECENTLY-REMOVED-DATERANGES");nr&&(p.recentlyRemovedDateranges=nr.split(" "));break}case"TARGETDURATION":p.targetduration=Math.max(parseInt(At),1);break;case"VERSION":p.version=parseInt(At);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":p.live=!1;break;case"#":(At||or)&&he.tagList.push(or?[At,or]:[At]);break;case"DISCONTINUITY":le++,he.tagList.push(["DIS"]);break;case"GAP":he.gap=!0,he.tagList.push([ct]);break;case"BITRATE":he.tagList.push([ct,At]);break;case"DATERANGE":{const $t=new z(At);Tt(p,$t,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),Tt(p,$t,$t.clientAttrs);const ar=new ge($t,p.dateRanges[$t.ID]);ar.isValid||p.skippedSegments?p.dateRanges[ar.id]=ar:x.warn(`Ignoring invalid DATERANGE tag: "${At}"`),he.tagList.push(["EXT-X-DATERANGE",At]);break}case"DEFINE":{{const $t=new z(At);Tt(p,$t,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in $t?yr(p,$t,l):Sr(p,$t,t)}break}case"DISCONTINUITY-SEQUENCE":le=parseInt(At);break;case"KEY":{const $t=ji(At,t,p);if($t.isSupported()){if($t.method==="NONE"){We=void 0;break}We||(We={}),We[$t.keyFormat]&&(We=i({},We)),We[$t.keyFormat]=$t}else x.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${At}"`);break}case"START":p.startTimeOffset=bn(At);break;case"MAP":{const $t=new z(At);if(Tt(p,$t,["BYTERANGE","URI"]),he.duration){const ar=new ie(s,t);Sn(ar,$t,r,We),A=ar,he.initSegment=A,A.rawProgramDateTime&&!he.rawProgramDateTime&&(he.rawProgramDateTime=A.rawProgramDateTime)}else{const ar=he.byteRangeEndOffset;if(ar){const nr=he.byteRangeStartOffset;Ye=`${ar-nr}@${nr}`}else Ye=null;Sn(he,$t,r,We),A=he,ot=!0}break}case"SERVER-CONTROL":{const $t=new z(At);p.canBlockReload=$t.bool("CAN-BLOCK-RELOAD"),p.canSkipUntil=$t.optionalFloat("CAN-SKIP-UNTIL",0),p.canSkipDateRanges=p.canSkipUntil>0&&$t.bool("CAN-SKIP-DATERANGES"),p.partHoldBack=$t.optionalFloat("PART-HOLD-BACK",0),p.holdBack=$t.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const $t=new z(At);p.partTarget=$t.decimalFloatingPoint("PART-TARGET");break}case"PART":{let $t=p.partList;$t||($t=p.partList=[]);const ar=W>0?$t[$t.length-1]:void 0,nr=W++,Jt=new z(At);Tt(p,Jt,["BYTERANGE","URI"]);const Er=new U(Jt,he,t,nr,ar);$t.push(Er),he.duration+=Er.duration;break}case"PRELOAD-HINT":{const $t=new z(At);Tt(p,$t,["URI"]),p.preloadHint=$t;break}case"RENDITION-REPORT":{const $t=new z(At);Tt(p,$t,["URI"]),p.renditionReports=p.renditionReports||[],p.renditionReports.push($t);break}default:x.warn(`line parsed but not handled: ${me}`);break}}}oe&&!oe.relurl?(b.pop(),ee-=oe.duration,p.partList&&(p.fragmentHint=oe)):p.partList&&(an(he,oe),he.cc=le,p.fragmentHint=he,We&&Ji(he,We,p));const pt=b.length,at=b[0],Ct=b[pt-1];if(ee+=p.skippedSegments*p.targetduration,ee>0&&pt&&Ct){p.averagetargetduration=ee/pt;const Bt=Ct.sn;p.endSN=Bt!=="initSegment"?Bt:0,p.live||(Ct.endList=!0),at&&(p.startCC=at.cc)}else p.endSN=0,p.startCC=0;return p.fragmentHint&&(ee+=p.fragmentHint.duration),p.totalduration=ee,p.endCC=le,je>0&&fi(b,je),p}}function ji(c,e,t){var r,s;const a=new z(c);Tt(t,a,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const l=(r=a.METHOD)!=null?r:"",p=a.URI,b=a.hexadecimalInteger("IV"),A=a.KEYFORMATVERSIONS,M=(s=a.KEYFORMAT)!=null?s:"identity";p&&a.IV&&!b&&x.error(`Invalid IV: ${a.IV}`);const W=p?Jr.resolve(p,e):"",ee=(A||"1").split("/").map(Number).filter(Number.isFinite);return new cr(l,W,M,ee,b)}function bn(c){const t=new z(c).decimalFloatingPoint("TIME-OFFSET");return v(t)?t:null}function Rn(c,e){let t=(c||"").split(/[ ,]+/).filter(r=>r);["video","audio","text"].forEach(r=>{const s=t.filter(a=>Cr(a,r));s.length&&(e[`${r}Codec`]=s.join(","),t=t.filter(a=>s.indexOf(a)===-1))}),e.unknownCodecs=t}function xn(c,e,t){const r=e[t];r&&(c[t]=r)}function fi(c,e){let t=c[e];for(let r=e;r--;){const s=c[r];if(!s)return;s.programDateTime=t.programDateTime-s.duration*1e3,t=s}}function an(c,e){c.rawProgramDateTime?c.programDateTime=Date.parse(c.rawProgramDateTime):e!=null&&e.programDateTime&&(c.programDateTime=e.endProgramDateTime),v(c.programDateTime)||(c.programDateTime=null,c.rawProgramDateTime=null)}function Sn(c,e,t,r){c.relurl=e.URI,e.BYTERANGE&&c.setByteRange(e.BYTERANGE),c.level=t,c.sn="initSegment",r&&(c.levelkeys=r),c.initSegment=null}function Ji(c,e,t){c.levelkeys=e;const{encryptedFragments:r}=t;(!r.length||r[r.length-1].levelkeys!==e)&&Object.keys(e).some(s=>e[s].isCommonEncryption)&&r.push(c)}var lr={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},Ue={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Xt(c){const{type:e}=c;switch(e){case lr.AUDIO_TRACK:return Ue.AUDIO;case lr.SUBTITLE_TRACK:return Ue.SUBTITLE;default:return Ue.MAIN}}function Mr(c,e){let t=c.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class Wi{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.LEVEL_LOADING,this.onLevelLoading,this),e.on(n.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(n.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.LEVEL_LOADING,this.onLevelLoading,this),e.off(n.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(n.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,r=t.pLoader,s=t.loader,a=r||s,l=new a(t);return this.loaders[e.type]=l,l}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:r}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:lr.MANIFEST,url:r,deliveryDirectives:null})}onLevelLoading(e,t){const{id:r,level:s,pathwayId:a,url:l,deliveryDirectives:p}=t;this.load({id:r,level:s,pathwayId:a,responseType:"text",type:lr.LEVEL,url:l,deliveryDirectives:p})}onAudioTrackLoading(e,t){const{id:r,groupId:s,url:a,deliveryDirectives:l}=t;this.load({id:r,groupId:s,level:null,responseType:"text",type:lr.AUDIO_TRACK,url:a,deliveryDirectives:l})}onSubtitleTrackLoading(e,t){const{id:r,groupId:s,url:a,deliveryDirectives:l}=t;this.load({id:r,groupId:s,level:null,responseType:"text",type:lr.SUBTITLE_TRACK,url:a,deliveryDirectives:l})}load(e){var t;const r=this.hls.config;let s=this.getInternalLoader(e);if(s){const A=s.context;if(A&&A.url===e.url&&A.level===e.level){x.trace("[playlist-loader]: playlist request ongoing");return}x.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),s.abort()}let a;if(e.type===lr.MANIFEST?a=r.manifestLoadPolicy.default:a=i({},r.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),s=this.createInternalLoader(e),v((t=e.deliveryDirectives)==null?void 0:t.part)){let A;if(e.type===lr.LEVEL&&e.level!==null?A=this.hls.levels[e.level].details:e.type===lr.AUDIO_TRACK&&e.id!==null?A=this.hls.audioTracks[e.id].details:e.type===lr.SUBTITLE_TRACK&&e.id!==null&&(A=this.hls.subtitleTracks[e.id].details),A){const M=A.partTarget,W=A.targetduration;if(M&&W){const ee=Math.max(M*3,W*.8)*1e3;a=i({},a,{maxTimeToFirstByteMs:Math.min(ee,a.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(ee,a.maxTimeToFirstByteMs)})}}}const l=a.errorRetry||a.timeoutRetry||{},p={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},b={onSuccess:(A,M,W,ee)=>{const le=this.getInternalLoader(W);this.resetInternalLoader(W.type);const oe=A.data;if(oe.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(A,W,new Error("no EXTM3U delimiter"),ee||null,M);return}M.parsing.start=performance.now(),Jr.isMediaPlaylist(oe)?this.handleTrackOrLevelPlaylist(A,M,W,ee||null,le):this.handleMasterPlaylist(A,M,W,ee)},onError:(A,M,W,ee)=>{this.handleNetworkError(M,W,!1,A,ee)},onTimeout:(A,M,W)=>{this.handleNetworkError(M,W,!0,void 0,A)}};s.load(e,p,b)}handleMasterPlaylist(e,t,r,s){const a=this.hls,l=e.data,p=Mr(e,r),b=Jr.parseMasterPlaylist(l,p);if(b.playlistParsingError){this.handleManifestParsingError(e,r,b.playlistParsingError,s,t);return}const{contentSteering:A,levels:M,sessionData:W,sessionKeys:ee,startTimeOffset:le,variableList:oe}=b;this.variableList=oe;const{AUDIO:he=[],SUBTITLES:me,"CLOSED-CAPTIONS":De}=Jr.parseMasterPlaylistMedia(l,p,b);he.length&&!he.some(je=>!je.url)&&M[0].audioCodec&&!M[0].attrs.AUDIO&&(x.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),he.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new z({}),bitrate:0,url:""})),a.trigger(n.MANIFEST_LOADED,{levels:M,audioTracks:he,subtitles:me,captions:De,contentSteering:A,url:p,stats:t,networkDetails:s,sessionData:W,sessionKeys:ee,startTimeOffset:le,variableList:oe})}handleTrackOrLevelPlaylist(e,t,r,s,a){const l=this.hls,{id:p,level:b,type:A}=r,M=Mr(e,r),W=0,ee=v(b)?b:v(p)?p:0,le=Xt(r),oe=Jr.parseLevelPlaylist(e.data,M,ee,le,W,this.variableList);if(A===lr.MANIFEST){const he={attrs:new z({}),bitrate:0,details:oe,name:"",url:M};l.trigger(n.MANIFEST_LOADED,{levels:[he],audioTracks:[],url:M,stats:t,networkDetails:s,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),r.levelDetails=oe,this.handlePlaylistLoaded(oe,e,t,r,s,a)}handleManifestParsingError(e,t,r,s,a){this.hls.trigger(n.ERROR,{type:o.NETWORK_ERROR,details:u.MANIFEST_PARSING_ERROR,fatal:t.type===lr.MANIFEST,url:e.url,err:r,error:r,reason:r.message,response:e,context:t,networkDetails:s,stats:a})}handleNetworkError(e,t,r=!1,s,a){let l=`A network ${r?"timeout":"error"+(s?" (status "+s.code+")":"")} occurred while loading ${e.type}`;e.type===lr.LEVEL?l+=`: ${e.level} id: ${e.id}`:(e.type===lr.AUDIO_TRACK||e.type===lr.SUBTITLE_TRACK)&&(l+=` id: ${e.id} group-id: "${e.groupId}"`);const p=new Error(l);x.warn(`[playlist-loader]: ${l}`);let b=u.UNKNOWN,A=!1;const M=this.getInternalLoader(e);switch(e.type){case lr.MANIFEST:b=r?u.MANIFEST_LOAD_TIMEOUT:u.MANIFEST_LOAD_ERROR,A=!0;break;case lr.LEVEL:b=r?u.LEVEL_LOAD_TIMEOUT:u.LEVEL_LOAD_ERROR,A=!1;break;case lr.AUDIO_TRACK:b=r?u.AUDIO_TRACK_LOAD_TIMEOUT:u.AUDIO_TRACK_LOAD_ERROR,A=!1;break;case lr.SUBTITLE_TRACK:b=r?u.SUBTITLE_TRACK_LOAD_TIMEOUT:u.SUBTITLE_LOAD_ERROR,A=!1;break}M&&this.resetInternalLoader(e.type);const W={type:o.NETWORK_ERROR,details:b,fatal:A,url:e.url,loader:M,context:e,error:p,networkDetails:t,stats:a};if(s){const ee=(t==null?void 0:t.url)||e.url;W.response=F({url:ee,data:void 0},s)}this.hls.trigger(n.ERROR,W)}handlePlaylistLoaded(e,t,r,s,a,l){const p=this.hls,{type:b,level:A,id:M,groupId:W,deliveryDirectives:ee}=s,le=Mr(t,s),oe=Xt(s),he=typeof s.level=="number"&&oe===Ue.MAIN?A:void 0;if(!e.fragments.length){const De=new Error("No Segments found in Playlist");p.trigger(n.ERROR,{type:o.NETWORK_ERROR,details:u.LEVEL_EMPTY_ERROR,fatal:!1,url:le,error:De,reason:De.message,response:t,context:s,level:he,parent:oe,networkDetails:a,stats:r});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const me=e.playlistParsingError;if(me){p.trigger(n.ERROR,{type:o.NETWORK_ERROR,details:u.LEVEL_PARSING_ERROR,fatal:!1,url:le,error:me,reason:me.message,response:t,context:s,level:he,parent:oe,networkDetails:a,stats:r});return}switch(e.live&&l&&(l.getCacheAge&&(e.ageHeader=l.getCacheAge()||0),(!l.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),b){case lr.MANIFEST:case lr.LEVEL:p.trigger(n.LEVEL_LOADED,{details:e,level:he||0,id:M||0,stats:r,networkDetails:a,deliveryDirectives:ee});break;case lr.AUDIO_TRACK:p.trigger(n.AUDIO_TRACK_LOADED,{details:e,id:M||0,groupId:W||"",stats:r,networkDetails:a,deliveryDirectives:ee});break;case lr.SUBTITLE_TRACK:p.trigger(n.SUBTITLE_TRACK_LOADED,{details:e,id:M||0,groupId:W||"",stats:r,networkDetails:a,deliveryDirectives:ee});break}}}function on(c,e){let t;try{t=new Event("addtrack")}catch(r){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=c,e.dispatchEvent(t)}function ln(c,e){const t=c.mode;if(t==="disabled"&&(c.mode="hidden"),c.cues&&!c.cues.getCueById(e.id))try{if(c.addCue(e),!c.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(r){x.debug(`[texttrack-utils]: ${r}`);try{const s=new self.TextTrackCue(e.startTime,e.endTime,e.text);s.id=e.id,c.addCue(s)}catch(s){x.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${s}`)}}t==="disabled"&&(c.mode=t)}function Si(c){const e=c.mode;if(e==="disabled"&&(c.mode="hidden"),c.cues)for(let t=c.cues.length;t--;)c.removeCue(c.cues[t]);e==="disabled"&&(c.mode=e)}function br(c,e,t,r){const s=c.mode;if(s==="disabled"&&(c.mode="hidden"),c.cues&&c.cues.length>0){const a=ki(c.cues,e,t);for(let l=0;l<a.length;l++)(!r||r(a[l]))&&c.removeCue(a[l])}s==="disabled"&&(c.mode=s)}function wi(c,e){if(e<c[0].startTime)return 0;const t=c.length-1;if(e>c[t].endTime)return-1;let r=0,s=t;for(;r<=s;){const a=Math.floor((s+r)/2);if(e<c[a].startTime)s=a-1;else if(e>c[a].startTime&&r<t)r=a+1;else return a}return c[r].startTime-e<e-c[s].startTime?r:s}function ki(c,e,t){const r=[],s=wi(c,e);if(s>-1)for(let a=s,l=c.length;a<l;a++){const p=c[a];if(p.startTime>=e&&p.endTime<=t)r.push(p);else if(p.startTime>t)return r}return r}function qr(c){const e=[];for(let t=0;t<c.length;t++){const r=c[t];(r.kind==="subtitles"||r.kind==="captions")&&r.label&&e.push(c[t])}return e}var di={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const Hn=.25;function Gi(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function Qi(c,e,t,r,s){let a=new c(e,t,"");try{a.value=r,s&&(a.type=s)}catch(l){a=new c(e,t,JSON.stringify(s?F({type:s},r):r))}return a}const Nt=(()=>{const c=Gi();try{c&&new c(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Ai(c,e){return c.getTime()/1e3-e}function Qr(c){return Uint8Array.from(c.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class pi{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(n.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(n.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(n.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(n.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(n.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(n.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(Si(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const r=e[t];if(r.kind==="metadata"&&r.label==="id3")return on(r,this.media),r}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:r,enableID3MetadataCues:s}}}=this;if(!r&&!s)return;const{samples:a}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const l=Gi();if(l)for(let p=0;p<a.length;p++){const b=a[p].type;if(b===di.emsg&&!r||!s)continue;const A=Me(a[p].data);if(A){const M=a[p].pts;let W=M+a[p].duration;W>Nt&&(W=Nt),W-M<=0&&(W=M+Hn);for(let le=0;le<A.length;le++){const oe=A[le];if(!Te(oe)){this.updateId3CueEnds(M,b);const he=Qi(l,M,W,oe,b);he&&this.id3Track.addCue(he)}}}}}updateId3CueEnds(e,t){var r;const s=(r=this.id3Track)==null?void 0:r.cues;if(s)for(let a=s.length;a--;){const l=s[a];l.type===t&&l.startTime<e&&l.endTime===Nt&&(l.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:r,type:s}){const{id3Track:a,hls:l}=this;if(!l)return;const{config:{enableEmsgMetadataCues:p,enableID3MetadataCues:b}}=l;if(a&&(p||b)){let A;s==="audio"?A=M=>M.type===di.audioId3&&b:s==="video"?A=M=>M.type===di.emsg&&p:A=M=>M.type===di.audioId3&&b||M.type===di.emsg&&p,br(a,t,r,A)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:r,id3Track:s}=this,{dateRanges:a}=t,l=Object.keys(a);if(s){const M=Object.keys(r).filter(W=>!l.includes(W));for(let W=M.length;W--;){const ee=M[W];Object.keys(r[ee].cues).forEach(le=>{s.removeCue(r[ee].cues[le])}),delete r[ee]}}const p=t.fragments[t.fragments.length-1];if(l.length===0||!v(p==null?void 0:p.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const b=p.programDateTime/1e3-p.start,A=Gi();for(let M=0;M<l.length;M++){const W=l[M],ee=a[W],le=Ai(ee.startDate,b),oe=r[W],he=(oe==null?void 0:oe.cues)||{};let me=(oe==null?void 0:oe.durationKnown)||!1,De=Nt;const We=ee.endDate;if(We)De=Ai(We,b),me=!0;else if(ee.endOnNext&&!me){const ot=l.reduce((Ye,pt)=>{if(pt!==ee.id){const at=a[pt];if(at.class===ee.class&&at.startDate>ee.startDate&&(!Ye||ee.startDate<Ye.startDate))return at}return Ye},null);ot&&(De=Ai(ot.startDate,b),me=!0)}const je=Object.keys(ee.attr);for(let ot=0;ot<je.length;ot++){const Ye=je[ot];if(!te(Ye))continue;const pt=he[Ye];if(pt)me&&!oe.durationKnown&&(pt.endTime=De);else if(A){let at=ee.attr[Ye];J(Ye)&&(at=Qr(at));const Ct=Qi(A,le,De,{key:Ye,data:at},di.dateRange);Ct&&(Ct.id=W,this.id3Track.addCue(Ct),he[Ye]=Ct)}}r[W]={cues:he,dateRange:ee,durationKnown:me}}}}class $n{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return e.liveMaxLatencyDuration!==void 0?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(e===null)return null;const{holdBack:t,partHoldBack:r,targetduration:s}=e,{liveSyncDuration:a,liveSyncDurationCount:l,lowLatencyMode:p}=this.config,b=this.hls.userConfig;let A=p&&r||t;(b.liveSyncDuration||b.liveSyncDurationCount||A===0)&&(A=a!==void 0?a:l*s);const M=s;return A+Math.min(this.stallCount*1,M)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,r=this.levelDetails;if(e===null||t===null||r===null)return null;const s=r.edge,a=e-t-this.edgeStalled,l=s-r.totalduration,p=s-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(l,a),p)}get drift(){const{levelDetails:e}=this;return e===null?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;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,levelDetails:t}=this;if(!e||!t)return 0;const r=e.buffered.length;return(r?e.buffered.end(r-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(n.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(n.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(n.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(n.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(n.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(n.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(n.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(n.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(n.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(n.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var r;t.details===u.BUFFER_STALLED_ERROR&&(this.stallCount++,(r=this.levelDetails)!=null&&r.live&&x.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const r=this.computeLatency();if(r===null)return;this._latency=r;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:a}=this.config;if(!s||a===1||!t.live)return;const l=this.targetLatency;if(l===null)return;const p=r-l,b=Math.min(this.maxLatency,l+t.targetduration);if(p<b&&p>.05&&this.forwardBufferLength>1){const M=Math.min(2,Math.max(1,a)),W=Math.round(2/(1+Math.exp(-.75*p-this.edgeStalled))*20)/20;e.playbackRate=Math.min(M,Math.max(1,W))}else e.playbackRate!==1&&e.playbackRate!==0&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}const en=["NONE","TYPE-0","TYPE-1",null];function Ki(c){return en.indexOf(c)>-1}const Bi=["SDR","PQ","HLG"];function Yr(c){return!!c&&Bi.indexOf(c)>-1}var Ni={No:"",Yes:"YES",v2:"v2"};function Ii(c){const{canSkipUntil:e,canSkipDateRanges:t,age:r}=c,s=r<e/2;return e&&s?t?Ni.v2:Ni.Yes:Ni.No}class Ln{constructor(e,t,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=r}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class mi{constructor(e){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.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(t=>!!t).map(t=>t.substring(0,4)).join(","),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 Ei(this._audioGroups,e)}hasSubtitleGroup(e){return Ei(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let r=this._audioGroups;r||(r=this._audioGroups=[]),r.indexOf(t)===-1&&r.push(t)}else if(e==="text"){let r=this._subtitleGroups;r||(r=this._subtitleGroups=[]),r.indexOf(t)===-1&&r.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function Ei(c,e){return!e||!c?!1:c.indexOf(e)!==-1}function fr(c,e){const t=e.startPTS;if(v(t)){let r=0,s;e.sn>c.sn?(r=t-c.start,s=c):(r=c.start-t,s=e),s.duration!==r&&(s.duration=r)}else e.sn>c.sn?c.cc===e.cc&&c.minEndPTS?e.start=c.start+(c.minEndPTS-c.start):e.start=c.start+c.duration:e.start=Math.max(c.start-e.duration,0)}function un(c,e,t,r,s,a){r-t<=0&&(x.warn("Fragment should have a positive duration",e),r=t+e.duration,a=s+e.duration);let p=t,b=r;const A=e.startPTS,M=e.endPTS;if(v(A)){const me=Math.abs(A-t);v(e.deltaPTS)?e.deltaPTS=Math.max(me,e.deltaPTS):e.deltaPTS=me,p=Math.max(t,A),t=Math.min(t,A),s=Math.min(s,e.startDTS),b=Math.min(r,M),r=Math.max(r,M),a=Math.max(a,e.endDTS)}const W=t-e.start;e.start!==0&&(e.start=t),e.duration=r-e.start,e.startPTS=t,e.maxStartPTS=p,e.startDTS=s,e.endPTS=r,e.minEndPTS=b,e.endDTS=a;const ee=e.sn;if(!c||ee<c.startSN||ee>c.endSN)return 0;let le;const oe=ee-c.startSN,he=c.fragments;for(he[oe]=e,le=oe;le>0;le--)fr(he[le],he[le-1]);for(le=oe;le<he.length-1;le++)fr(he[le],he[le+1]);return c.fragmentHint&&fr(he[he.length-1],c.fragmentHint),c.PTSKnown=c.alignedSliding=!0,W}function kn(c,e){let t=null;const r=c.fragments;for(let p=r.length-1;p>=0;p--){const b=r[p].initSegment;if(b){t=b;break}}c.fragmentHint&&delete c.fragmentHint.endPTS;let s;cn(c,e,(p,b,A,M)=>{if(e.skippedSegments&&b.cc!==p.cc){const W=p.cc-b.cc;for(let ee=A;ee<M.length;ee++)M[ee].cc+=W}v(p.startPTS)&&v(p.endPTS)&&(b.start=b.startPTS=p.startPTS,b.startDTS=p.startDTS,b.maxStartPTS=p.maxStartPTS,b.endPTS=p.endPTS,b.endDTS=p.endDTS,b.minEndPTS=p.minEndPTS,b.duration=p.endPTS-p.startPTS,b.duration&&(s=b),e.PTSKnown=e.alignedSliding=!0),b.elementaryStreams=p.elementaryStreams,b.loader=p.loader,b.stats=p.stats,p.initSegment&&(b.initSegment=p.initSegment,t=p.initSegment)});const a=e.fragments;if(t&&(e.fragmentHint?a.concat(e.fragmentHint):a).forEach(b=>{var A;b&&(!b.initSegment||b.initSegment.relurl===((A=t)==null?void 0:A.relurl))&&(b.initSegment=t)}),e.skippedSegments){if(e.deltaUpdateFailed=a.some(p=>!p),e.deltaUpdateFailed){x.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let p=e.skippedSegments;p--;)a.shift();e.startSN=a[0].sn}else e.canSkipDateRanges&&(e.dateRanges=In(c.dateRanges,e.dateRanges,e.recentlyRemovedDateranges));e.startCC=e.fragments[0].cc,e.endCC=a[a.length-1].cc}gi(c.partList,e.partList,(p,b)=>{b.elementaryStreams=p.elementaryStreams,b.stats=p.stats}),s?un(e,s,s.startPTS,s.endPTS,s.startDTS,s.endDTS):jn(c,e),a.length&&(e.totalduration=e.edge-a[0].start),e.driftStartTime=c.driftStartTime,e.driftStart=c.driftStart;const l=e.advancedDateTime;if(e.advanced&&l){const p=e.edge;e.driftStart||(e.driftStartTime=l,e.driftStart=p),e.driftEndTime=l,e.driftEnd=p}else e.driftEndTime=c.driftEndTime,e.driftEnd=c.driftEnd,e.advancedDateTime=c.advancedDateTime}function In(c,e,t){const r=i({},c);return t&&t.forEach(s=>{delete r[s]}),Object.keys(e).forEach(s=>{const a=new ge(e[s].attr,r[s]);a.isValid?r[s]=a:x.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(e[s].attr)}"`)}),r}function gi(c,e,t){if(c&&e){let r=0;for(let s=0,a=c.length;s<=a;s++){const l=c[s],p=e[s+r];l&&p&&l.index===p.index&&l.fragment.sn===p.fragment.sn?t(l,p):r--}}}function cn(c,e,t){const r=e.skippedSegments,s=Math.max(c.startSN,e.startSN)-e.startSN,a=(c.fragmentHint?1:0)+(r?e.endSN:Math.min(c.endSN,e.endSN))-e.startSN,l=e.startSN-c.startSN,p=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,b=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments;for(let A=s;A<=a;A++){const M=b[l+A];let W=p[A];r&&!W&&A<r&&(W=e.fragments[A]=M),M&&W&&t(M,W,A,p)}}function jn(c,e){const t=e.startSN+e.skippedSegments-c.startSN,r=c.fragments;t<0||t>=r.length||yt(e,r[t].start)}function yt(c,e){if(e){const t=c.fragments;for(let r=c.skippedSegments;r<t.length;r++)t[r].start+=e;c.fragmentHint&&(c.fragmentHint.start+=e)}}function _i(c,e=1/0){let t=1e3*c.targetduration;if(c.updated){const r=c.fragments;if(r.length&&t*4>e){const a=r[r.length-1].duration*1e3;a<t&&(t=a)}}else t/=2;return Math.round(t)}function On(c,e,t){if(!(c!=null&&c.details))return null;const r=c.details;let s=r.fragments[e-r.startSN];return s||(s=r.fragmentHint,s&&s.sn===e)?s:e<r.startSN&&t&&t.sn===e?t:null}function hn(c,e,t){var r;return c!=null&&c.details?ui((r=c.details)==null?void 0:r.partList,e,t):null}function ui(c,e,t){if(c)for(let r=c.length;r--;){const s=c[r];if(s.index===t&&s.fragment.sn===e)return s}return null}function ei(c){c.forEach((e,t)=>{const{details:r}=e;r!=null&&r.fragments&&r.fragments.forEach(s=>{s.level=t})})}function xr(c){switch(c.details){case u.FRAG_LOAD_TIMEOUT:case u.KEY_LOAD_TIMEOUT:case u.LEVEL_LOAD_TIMEOUT:case u.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Oi(c,e){const t=xr(e);return c.default[`${t?"timeout":"error"}Retry`]}function Ui(c,e){const t=c.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*c.retryDelayMs,c.maxRetryDelayMs)}function tn(c){return F(F({},c),{errorRetry:null,timeoutRetry:null})}function zi(c,e,t,r){if(!c)return!1;const s=r==null?void 0:r.code,a=e<c.maxNumRetry&&(Pn(s)||!!t);return c.shouldRetry?c.shouldRetry(c,e,t,r,a):a}function Pn(c){return c===0&&navigator.onLine===!1||!!c&&(c<400||c>499)}const Mn={search:function(c,e){let t=0,r=c.length-1,s=null,a=null;for(;t<=r;){s=(t+r)/2|0,a=c[s];const l=e(a);if(l>0)t=s+1;else if(l<0)r=s-1;else return a}return null}};function Wn(c,e,t){if(e===null||!Array.isArray(c)||!c.length||!v(e))return null;const r=c[0].programDateTime;if(e<(r||0))return null;const s=c[c.length-1].endProgramDateTime;if(e>=(s||0))return null;t=t||0;for(let a=0;a<c.length;++a){const l=c[a];if(ts(e,t,l))return l}return null}function wn(c,e,t=0,r=0,s=.005){let a=null;if(c){a=e[c.sn-e[0].sn+1]||null;const p=c.endDTS-t;p>0&&p<15e-7&&(t+=15e-7)}else t===0&&e[0].start===0&&(a=e[0]);if(a&&((!c||c.level===a.level)&&Fn(t,r,a)===0||es(a,c,Math.min(s,r))))return a;const l=Mn.search(e,Fn.bind(null,t,r));return l&&(l!==c||!a)?l:a}function es(c,e,t){if(e&&e.start===0&&e.level<c.level&&(e.endPTS||0)>0){const r=e.tagList.reduce((s,a)=>(a[0]==="INF"&&(s+=parseFloat(a[1])),s),t);return c.start<=r}return!1}function Fn(c=0,e=0,t){if(t.start<=c&&t.start+t.duration>c)return 0;const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-r<=c?1:t.start-r>c&&t.start?-1:0}function ts(c,e,t){const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-r>c}function Gt(c,e){return Mn.search(c,t=>t.cc<e?1:t.cc>e?-1:0)}var Mt={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},mr={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class Zr{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=x.log.bind(x,"[info]:"),this.warn=x.warn.bind(x,"[warning]:"),this.error=x.error.bind(x,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(n.ERROR,this.onError,this),e.on(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(n.ERROR,this.onError,this),e.off(n.ERROR,this.onErrorOut,this),e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===Ue.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var r,s;if(t.fatal)return;const a=this.hls,l=t.context;switch(t.details){case u.FRAG_LOAD_ERROR:case u.FRAG_LOAD_TIMEOUT:case u.KEY_LOAD_ERROR:case u.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case u.FRAG_PARSING_ERROR:if((r=t.frag)!=null&&r.gap){t.errorAction={action:Mt.DoNothing,flags:mr.None};return}case u.FRAG_GAP:case u.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=Mt.SendAlternateToPenaltyBox;return}case u.LEVEL_EMPTY_ERROR:case u.LEVEL_PARSING_ERROR:{var p,b;const A=t.parent===Ue.MAIN?t.level:a.loadLevel;t.details===u.LEVEL_EMPTY_ERROR&&((p=t.context)!=null&&(b=p.levelDetails)!=null&&b.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,A):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,A))}return;case u.LEVEL_LOAD_ERROR:case u.LEVEL_LOAD_TIMEOUT:typeof(l==null?void 0:l.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,l.level));return;case u.AUDIO_TRACK_LOAD_ERROR:case u.AUDIO_TRACK_LOAD_TIMEOUT:case u.SUBTITLE_LOAD_ERROR:case u.SUBTITLE_TRACK_LOAD_TIMEOUT:if(l){const A=a.levels[a.loadLevel];if(A&&(l.type===lr.AUDIO_TRACK&&A.hasAudioGroup(l.groupId)||l.type===lr.SUBTITLE_TRACK&&A.hasSubtitleGroup(l.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a.loadLevel),t.errorAction.action=Mt.SendAlternateToPenaltyBox,t.errorAction.flags=mr.MoveAllAlternatesMatchingHost;return}}return;case u.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const A=a.levels[a.loadLevel],M=A==null?void 0:A.attrs["HDCP-LEVEL"];M?t.errorAction={action:Mt.SendAlternateToPenaltyBox,flags:mr.MoveAllAlternatesMatchingHDCP,hdcpLevel:M}:this.keySystemError(t)}return;case u.BUFFER_ADD_CODEC_ERROR:case u.REMUX_ALLOC_ERROR:case u.BUFFER_APPEND_ERROR:t.errorAction=this.getLevelSwitchAction(t,(s=t.level)!=null?s:a.loadLevel);return;case u.INTERNAL_EXCEPTION:case u.BUFFER_APPENDING_ERROR:case u.BUFFER_FULL_ERROR:case u.LEVEL_SWITCH_ERROR:case u.BUFFER_STALLED_ERROR:case u.BUFFER_SEEK_OVER_HOLE:case u.BUFFER_NUDGE_ON_STALL:t.errorAction={action:Mt.DoNothing,flags:mr.None};return}t.type===o.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const r=this.hls,s=Oi(r.config.playlistLoadPolicy,e),a=this.playlistError++;if(zi(s,a,xr(e),e.response))return{action:Mt.RetryRequest,flags:mr.None,retryConfig:s,retryCount:a};const p=this.getLevelSwitchAction(e,t);return s&&(p.retryConfig=s,p.retryCount=a),p}getFragRetryOrSwitchAction(e){const t=this.hls,r=this.getVariantLevelIndex(e.frag),s=t.levels[r],{fragLoadPolicy:a,keyLoadPolicy:l}=t.config,p=Oi(e.details.startsWith("key")?l:a,e),b=t.levels.reduce((M,W)=>M+W.fragmentError,0);if(s&&(e.details!==u.FRAG_GAP&&s.fragmentError++,zi(p,b,xr(e),e.response)))return{action:Mt.RetryRequest,flags:mr.None,retryConfig:p,retryCount:b};const A=this.getLevelSwitchAction(e,r);return p&&(A.retryConfig=p,A.retryCount=b),A}getLevelSwitchAction(e,t){const r=this.hls;t==null&&(t=r.loadLevel);const s=this.hls.levels[t];if(s){var a,l;const A=e.details;s.loadError++,A===u.BUFFER_APPEND_ERROR&&s.fragmentError++;let M=-1;const{levels:W,loadLevel:ee,minAutoLevel:le,maxAutoLevel:oe}=r;r.autoLevelEnabled||(r.loadLevel=-1);const he=(a=e.frag)==null?void 0:a.type,De=(he===Ue.AUDIO&&A===u.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(A===u.BUFFER_ADD_CODEC_ERROR||A===u.BUFFER_APPEND_ERROR))&&W.some(({audioCodec:pt})=>s.audioCodec!==pt),je=e.sourceBufferName==="video"&&(A===u.BUFFER_ADD_CODEC_ERROR||A===u.BUFFER_APPEND_ERROR)&&W.some(({codecSet:pt,audioCodec:at})=>s.codecSet!==pt&&s.audioCodec===at),{type:ot,groupId:Ye}=(l=e.context)!=null?l:{};for(let pt=W.length;pt--;){const at=(pt+ee)%W.length;if(at!==ee&&at>=le&&at<=oe&&W[at].loadError===0){var p,b;const Ct=W[at];if(A===u.FRAG_GAP&&he===Ue.MAIN&&e.frag){const Bt=W[at].details;if(Bt){const ct=wn(e.frag,Bt.fragments,e.frag.start);if(ct!=null&&ct.gap)continue}}else{if(ot===lr.AUDIO_TRACK&&Ct.hasAudioGroup(Ye)||ot===lr.SUBTITLE_TRACK&&Ct.hasSubtitleGroup(Ye))continue;if(he===Ue.AUDIO&&(p=s.audioGroups)!=null&&p.some(Bt=>Ct.hasAudioGroup(Bt))||he===Ue.SUBTITLE&&(b=s.subtitleGroups)!=null&&b.some(Bt=>Ct.hasSubtitleGroup(Bt))||De&&s.audioCodec===Ct.audioCodec||!De&&s.audioCodec!==Ct.audioCodec||je&&s.codecSet===Ct.codecSet)continue}M=at;break}}if(M>-1&&r.loadLevel!==M)return e.levelRetry=!0,this.playlistError=0,{action:Mt.SendAlternateToPenaltyBox,flags:mr.None,nextAutoLevel:M}}return{action:Mt.SendAlternateToPenaltyBox,flags:mr.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var r;switch((r=t.errorAction)==null?void 0:r.action){case Mt.DoNothing:break;case Mt.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==u.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 Mt.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,r=e.errorAction;if(!r)return;const{flags:s,hdcpLevel:a,nextAutoLevel:l}=r;switch(s){case mr.None:this.switchLevel(e,l);break;case mr.MoveAllAlternatesMatchingHDCP:a&&(t.maxHdcpLevel=en[en.indexOf(a)-1],r.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}r.resolved||this.switchLevel(e,l)}switchLevel(e,t){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)}}class Nr{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=x.log.bind(x,`${t}:`),this.warn=x.warn.bind(x,`${t}:`),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.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,r){const s=t==null?void 0:t.renditionReports;if(s){let a=-1;for(let l=0;l<s.length;l++){const p=s[l];let b;try{b=new self.URL(p.URI,t.url).href}catch(A){x.warn(`Could not construct new URL for Rendition Report: ${A}`),b=p.URI||""}if(b===e){a=l;break}else b===e.substring(0,b.length)&&(a=l)}if(a!==-1){const l=s[a],p=parseInt(l["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let b=parseInt(l["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const M=Math.min(t.age-t.partTarget,t.targetduration);b>=0&&M>t.partTarget&&(b+=1)}const A=r&&Ii(r);return new Ln(p,b>=0?b:void 0,A)}}}loadPlaylist(e){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,r){const{details:s,stats:a}=t,l=self.performance.now(),p=a.loading.first?Math.max(0,l-a.loading.first):0;if(s.advancedDateTime=Date.now()-p,s.live||r!=null&&r.live){if(s.reloaded(r),r&&this.log(`live playlist ${e} ${s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:s.updated?"UPDATED":"MISSED"}`),r&&s.fragments.length>0&&kn(r,s),!this.canLoad||!s.live)return;let b,A,M;if(s.canBlockReload&&s.endSN&&s.advanced){const me=this.hls.config.lowLatencyMode,De=s.lastPartSn,We=s.endSN,je=s.lastPartIndex,ot=je!==-1,Ye=De===We,pt=me?0:je;ot?(A=Ye?We+1:De,M=Ye?pt:je+1):A=We+1;const at=s.age,Ct=at+s.ageHeader;let Bt=Math.min(Ct-s.partTarget,s.targetduration*1.5);if(Bt>0){if(r&&Bt>r.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${r.tuneInGoal} to: ${Bt} with playlist age: ${s.age}`),Bt=0;else{const ct=Math.floor(Bt/s.targetduration);if(A+=ct,M!==void 0){const At=Math.round(Bt%s.targetduration/s.partTarget);M+=At}this.log(`CDN Tune-in age: ${s.ageHeader}s last advanced ${at.toFixed(2)}s goal: ${Bt} skip sn ${ct} to part ${M}`)}s.tuneInGoal=Bt}if(b=this.getDeliveryDirectives(s,t.deliveryDirectives,A,M),me||!Ye){this.loadPlaylist(b);return}}else(s.canBlockReload||s.canSkipUntil)&&(b=this.getDeliveryDirectives(s,t.deliveryDirectives,A,M));const W=this.hls.mainForwardBufferInfo,ee=W?W.end-W.len:0,le=(s.edge-ee)*1e3,oe=_i(s,le);s.updated&&l>this.requestScheduled+oe&&(this.requestScheduled=a.loading.start),A!==void 0&&s.canBlockReload?this.requestScheduled=a.loading.first+oe-(s.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+oe<l?this.requestScheduled=l:this.requestScheduled-l<=0&&(this.requestScheduled+=oe);let he=this.requestScheduled-l;he=Math.max(0,he),this.log(`reload live playlist ${e} in ${Math.round(he)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(b),he)}else this.clearTimer()}getDeliveryDirectives(e,t,r,s){let a=Ii(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(r=t.msn,s=t.part,a=Ni.No),new Ln(r,s,a)}checkRetry(e){const t=e.details,r=xr(e),s=e.errorAction,{action:a,retryCount:l=0,retryConfig:p}=s||{},b=!!s&&!!p&&(a===Mt.RetryRequest||!s.resolved&&a===Mt.SendAlternateToPenaltyBox);if(b){var A;if(this.requestScheduled=-1,l>=p.maxNumRetry)return!1;if(r&&(A=e.context)!=null&&A.deliveryDirectives)this.warn(`Retrying playlist loading ${l+1}/${p.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const M=Ui(p,l);this.timer=self.setTimeout(()=>this.loadPlaylist(),M),this.warn(`Retrying playlist loading ${l+1}/${p.maxNumRetry} after "${t}" in ${M}ms`)}e.levelRetry=!0,s.resolved=!0}return b}}class Ti{constructor(e,t=0,r=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=r}sample(e,t){const r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class Gn{constructor(e,t,r,s=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Ti(e),this.fast_=new Ti(t),this.defaultTTFB_=s,this.ttfb_=new Ti(e)}update(e,t){const{slow_:r,fast_:s,ttfb_:a}=this;r.halfLife!==e&&(this.slow_=new Ti(e,r.getEstimate(),r.getTotalWeight())),s.halfLife!==t&&(this.fast_=new Ti(t,s.getEstimate(),s.getTotalWeight())),a.halfLife!==e&&(this.ttfb_=new Ti(e,a.getEstimate(),a.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const r=8*t,s=e/1e3,a=r/s;this.fast_.sample(s,a),this.slow_.sample(s,a)}sampleTTFB(e){const t=e/1e3,r=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(r,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const Kn={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},Vi={};function ks(c,e,t,r,s,a){const l=c.audioCodec?c.audioGroups:null,p=a==null?void 0:a.audioCodec,b=a==null?void 0:a.channels,A=b?parseInt(b):p?1/0:2;let M=null;if(l!=null&&l.length)try{l.length===1&&l[0]?M=e.groups[l[0]].channels:M=l.reduce((W,ee)=>{if(ee){const le=e.groups[ee];if(!le)throw new Error(`Audio track group ${ee} not found`);Object.keys(le.channels).forEach(oe=>{W[oe]=(W[oe]||0)+le.channels[oe]})}return W},{2:0})}catch(W){return!0}return c.videoCodec!==void 0&&(c.width>1920&&c.height>1088||c.height>1920&&c.width>1088||c.frameRate>Math.max(r,30)||c.videoRange!=="SDR"&&c.videoRange!==t||c.bitrate>Math.max(s,8e6))||!!M&&v(A)&&Object.keys(M).some(W=>parseInt(W)>A)}function ra(c,e,t){const r=c.videoCodec,s=c.audioCodec;if(!r||!s||!t)return Promise.resolve(Kn);const a={width:c.width,height:c.height,bitrate:Math.ceil(Math.max(c.bitrate*.9,c.averageBitrate)),framerate:c.frameRate||30},l=c.videoRange;l!=="SDR"&&(a.transferFunction=l.toLowerCase());const p=r.split(",").map(b=>({type:"media-source",video:F(F({},a),{},{contentType:ii(b,"video")})}));return s&&c.audioGroups&&c.audioGroups.forEach(b=>{var A;b&&((A=e.groups[b])==null||A.tracks.forEach(M=>{if(M.groupId===b){const W=M.channels||"",ee=parseFloat(W);v(ee)&&ee>2&&p.push.apply(p,s.split(",").map(le=>({type:"media-source",audio:{contentType:ii(le,"audio"),channels:""+ee}})))}}))}),Promise.all(p.map(b=>{const A=Pa(b);return Vi[A]||(Vi[A]=t.decodingInfo(b))})).then(b=>({supported:!b.some(A=>!A.supported),configurations:p,decodingInfoResults:b})).catch(b=>({supported:!1,configurations:p,decodingInfoResults:[],error:b}))}function Pa(c){const{audio:e,video:t}=c,r=t||e;if(r){const s=r.contentType.split('"')[1];if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${s}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${s}`}return""}function Ma(){if(typeof matchMedia=="function"){const c=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(c.media!==e.media)return c.matches===!0}return!1}function ia(c,e){let t=!1,r=[];return c&&(t=c!=="SDR",r=[c]),e&&(r=e.allowedVideoRanges||Bi.slice(0),t=e.preferHDR!==void 0?e.preferHDR:Ma(),t?r=r.filter(s=>s!=="SDR"):r=["SDR"]),{preferHDR:t,allowedVideoRanges:r}}function En(c,e,t,r,s){const a=Object.keys(c),l=r==null?void 0:r.channels,p=r==null?void 0:r.audioCodec,b=l&&parseInt(l)===2;let A=!0,M=!1,W=1/0,ee=1/0,le=1/0,oe=0,he=[];const{preferHDR:me,allowedVideoRanges:De}=ia(e,s);for(let Ye=a.length;Ye--;){const pt=c[a[Ye]];A=pt.channels[2]>0,W=Math.min(W,pt.minHeight),ee=Math.min(ee,pt.minFramerate),le=Math.min(le,pt.minBitrate);const at=De.filter(Ct=>pt.videoRanges[Ct]>0);at.length>0&&(M=!0,he=at)}W=v(W)?W:0,ee=v(ee)?ee:0;const We=Math.max(1080,W),je=Math.max(30,ee);return le=v(le)?le:t,t=Math.max(le,t),M||(e=void 0,he=[]),{codecSet:a.reduce((Ye,pt)=>{const at=c[pt];if(pt===Ye)return Ye;if(at.minBitrate>t)return Pi(pt,`min bitrate of ${at.minBitrate} > current estimate of ${t}`),Ye;if(!at.hasDefaultAudio)return Pi(pt,"no renditions with default or auto-select sound found"),Ye;if(p&&pt.indexOf(p.substring(0,4))%5!==0)return Pi(pt,`audio codec preference "${p}" not found`),Ye;if(l&&!b){if(!at.channels[l])return Pi(pt,`no renditions with ${l} channel sound found (channels options: ${Object.keys(at.channels)})`),Ye}else if((!p||b)&&A&&at.channels[2]===0)return Pi(pt,"no renditions with stereo sound found"),Ye;return at.minHeight>We?(Pi(pt,`min resolution of ${at.minHeight} > maximum of ${We}`),Ye):at.minFramerate>je?(Pi(pt,`min framerate of ${at.minFramerate} > maximum of ${je}`),Ye):he.some(Ct=>at.videoRanges[Ct]>0)?at.maxScore<oe?(Pi(pt,`max score of ${at.maxScore} < selected max of ${oe}`),Ye):Ye&&(Wr(pt)>=Wr(Ye)||at.fragmentError>c[Ye].fragmentError)?Ye:(oe=at.maxScore,pt):(Pi(pt,`no variants with VIDEO-RANGE of ${JSON.stringify(he)} found`),Ye)},void 0),videoRanges:he,preferHDR:me,minFramerate:ee,minBitrate:le}}function Pi(c,e){x.log(`[abr] start candidates with "${c}" ignored because ${e}`)}function na(c){return c.reduce((e,t)=>{let r=e.groups[t.groupId];r||(r=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),r.tracks.push(t);const s=t.channels||"2";return r.channels[s]=(r.channels[s]||0)+1,r.hasDefault=r.hasDefault||t.default,r.hasAutoSelect=r.hasAutoSelect||t.autoselect,r.hasDefault&&(e.hasDefaultAudio=!0),r.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function Is(c,e,t,r){return c.slice(t,r+1).reduce((s,a)=>{if(!a.codecSet)return s;const l=a.audioGroups;let p=s[a.codecSet];p||(s[a.codecSet]=p={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!l,fragmentError:0}),p.minBitrate=Math.min(p.minBitrate,a.bitrate);const b=Math.min(a.height,a.width);return p.minHeight=Math.min(p.minHeight,b),p.minFramerate=Math.min(p.minFramerate,a.frameRate),p.maxScore=Math.max(p.maxScore,a.score),p.fragmentError+=a.fragmentError,p.videoRanges[a.videoRange]=(p.videoRanges[a.videoRange]||0)+1,l&&l.forEach(A=>{if(!A)return;const M=e.groups[A];M&&(p.hasDefaultAudio=p.hasDefaultAudio||e.hasDefaultAudio?M.hasDefault:M.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(M.channels).forEach(W=>{p.channels[W]=(p.channels[W]||0)+M.channels[W]}))}),s},{})}function Hi(c,e,t){if("attrs"in c){const r=e.indexOf(c);if(r!==-1)return r}for(let r=0;r<e.length;r++){const s=e[r];if(fn(c,s,t))return r}return-1}function fn(c,e,t){const{groupId:r,name:s,lang:a,assocLang:l,default:p}=c,b=c.forced;return(r===void 0||e.groupId===r)&&(s===void 0||e.name===s)&&(a===void 0||e.lang===a)&&(a===void 0||e.assocLang===l)&&(p===void 0||e.default===p)&&(b===void 0||e.forced===b)&&(!("characteristics"in c)||Fa(c.characteristics||"",e.characteristics))&&(t===void 0||t(c,e))}function Fa(c,e=""){const t=c.split(","),r=e.split(",");return t.length===r.length&&!t.some(s=>r.indexOf(s)===-1)}function Cn(c,e){const{audioCodec:t,channels:r}=c;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(r===void 0||r===(e.channels||"2"))}function Ba(c,e,t,r,s){const a=e[r],p=e.reduce((ee,le,oe)=>{const he=le.uri;return(ee[he]||(ee[he]=[])).push(oe),ee},{})[a.uri];p.length>1&&(r=Math.max.apply(Math,p));const b=a.videoRange,A=a.frameRate,M=a.codecSet.substring(0,4),W=Os(e,r,ee=>{if(ee.videoRange!==b||ee.frameRate!==A||ee.codecSet.substring(0,4)!==M)return!1;const le=ee.audioGroups,oe=t.filter(he=>!le||le.indexOf(he.groupId)!==-1);return Hi(c,oe,s)>-1});return W>-1?W:Os(e,r,ee=>{const le=ee.audioGroups,oe=t.filter(he=>!le||le.indexOf(he.groupId)!==-1);return Hi(c,oe,s)>-1})}function Os(c,e,t){for(let r=e;r>-1;r--)if(t(c[r]))return r;for(let r=e+1;r<c.length;r++)if(t(c[r]))return r;return-1}class us{constructor(e){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.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:t,partCurrent:r,hls:s}=this,{autoLevelEnabled:a,media:l}=s;if(!t||!l)return;const p=performance.now(),b=r?r.stats:t.stats,A=r?r.duration:t.duration,M=p-b.loading.start,W=s.minAutoLevel;if(b.aborted||b.loaded&&b.loaded===b.total||t.level<=W){this.clearTimer(),this._nextAutoLevel=-1;return}if(!a||l.paused||!l.playbackRate||!l.readyState)return;const ee=s.mainForwardBufferInfo;if(ee===null)return;const le=this.bwEstimator.getEstimateTTFB(),oe=Math.abs(l.playbackRate);if(M<=Math.max(le,1e3*(A/(oe*2))))return;const he=ee.len/oe,me=b.loading.first?b.loading.first-b.loading.start:-1,De=b.loaded&&me>-1,We=this.getBwEstimate(),je=s.levels,ot=je[t.level],Ye=b.total||Math.max(b.loaded,Math.round(A*ot.averageBitrate/8));let pt=De?M-me:M;pt<1&&De&&(pt=Math.min(M,b.loaded*8/We));const at=De?b.loaded*1e3/pt:0,Ct=at?(Ye-b.loaded)/at:Ye*8/We+le/1e3;if(Ct<=he)return;const Bt=at?at*8:We;let ct=Number.POSITIVE_INFINITY,At;for(At=t.level-1;At>W;At--){const $t=je[At].maxBitrate;if(ct=this.getTimeToLoadFrag(le/1e3,Bt,A*$t,!je[At].details),ct<he)break}if(ct>=Ct||ct>A*10)return;s.nextLoadLevel=s.nextAutoLevel=At,De?this.bwEstimator.sample(M-Math.min(le,me),b.loaded):this.bwEstimator.sampleTTFB(M);const or=je[At].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>or&&this.resetEstimator(or),this.clearTimer(),x.warn(`[abr] Fragment ${t.sn}${r?" part "+r.index:""} of level ${t.level} is loading too slowly;
Time to underbuffer: ${he.toFixed(3)} s
Estimated load time for current fragment: ${Ct.toFixed(3)} s
Estimated load time for down switch fragment: ${ct.toFixed(3)} s
TTFB estimate: ${me|0} ms
Current BW estimate: ${v(We)?We|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${At} @ ${or|0} bps`),s.trigger(n.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:r,stats:b})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(x.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 Gn(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.FRAG_LOADING,this.onFragLoading,this),e.on(n.FRAG_LOADED,this.onFragLoaded,this),e.on(n.FRAG_BUFFERED,this.onFragBuffered,this),e.on(n.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(n.LEVEL_LOADED,this.onLevelLoaded,this),e.on(n.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(n.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(n.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.FRAG_LOADING,this.onFragLoading,this),e.off(n.FRAG_LOADED,this.onFragLoaded,this),e.off(n.FRAG_BUFFERED,this.onFragBuffered,this),e.off(n.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(n.LEVEL_LOADED,this.onLevelLoaded,this),e.off(n.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(n.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(n.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const r=t.frag;if(!this.ignoreFragment(r)){if(!r.bitrateTest){var s;this.fragCurrent=r,this.partCurrent=(s=t.part)!=null?s: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 u.BUFFER_ADD_CODEC_ERROR:case u.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case u.FRAG_LOAD_TIMEOUT:{const r=t.frag,{fragCurrent:s,partCurrent:a}=this;if(r&&s&&r.sn===s.sn&&r.level===s.level){const l=performance.now(),p=a?a.stats:r.stats,b=l-p.loading.start,A=p.loading.first?p.loading.first-p.loading.start:-1;if(p.loaded&&A>-1){const W=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(b-Math.min(W,A),p.loaded)}else this.bwEstimator.sampleTTFB(b)}break}}}getTimeToLoadFrag(e,t,r,s){const a=e+r/t,l=s?this.lastLevelLoadSec:0;return a+l}onLevelLoaded(e,t){const r=this.hls.config,{loading:s}=t.stats,a=s.end-s.start;v(a)&&(this.lastLevelLoadSec=a/1e3),t.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD)}onFragLoaded(e,{frag:t,part:r}){const s=r?r.stats:t.stats;if(t.type===Ue.MAIN&&this.bwEstimator.sampleTTFB(s.loading.first-s.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const a=r?r.duration:t.duration,l=this.hls.levels[t.level],p=(l.loaded?l.loaded.bytes:0)+s.loaded,b=(l.loaded?l.loaded.duration:0)+a;l.loaded={bytes:p,duration:b},l.realBitrate=Math.round(8*p/b)}if(t.bitrateTest){const a={stats:s,frag:t,part:r,id:t.type};this.onFragBuffered(n.FRAG_BUFFERED,a),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:r,part:s}=t,a=s!=null&&s.stats.loaded?s.stats:r.stats;if(a.aborted||this.ignoreFragment(r))return;const l=a.parsing.end-a.loading.start-Math.min(a.loading.first-a.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(l,a.loaded),a.bwEstimate=this.getBwEstimate(),r.bitrateTest?this.bitrateTestDelay=l/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==Ue.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,r=this.getBwEstimate(),s=this.hls.config.maxStarvationDelay,a=this.findBestLevel(r,t,e,0,s,1,1);if(a>-1)return a;const l=this.hls.firstLevel,p=Math.min(Math.max(l,t),e);return x.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${l} clamped to ${p}`),p}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,r=this.bwEstimator.canEstimate(),s=this.lastLoadedFragLevel>-1;if(e!==-1&&(!r||!s||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const a=r&&s?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const l=this.hls.levels;if(l.length>Math.max(e,a)&&l[e].loadError<=l[a].loadError)return e}return this._nextAutoLevel=a,this.nextAutoLevelKey=this.getAutoLevelKey(),a}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:r}=this,{maxAutoLevel:s,config:a,minAutoLevel:l}=r,p=t?t.duration:e?e.duration:0,b=this.getBwEstimate(),A=this.getStarvationDelay();let M=a.abrBandWidthFactor,W=a.abrBandWidthUpFactor;if(A){const me=this.findBestLevel(b,l,s,A,0,M,W);if(me>=0)return me}let ee=p?Math.min(p,a.maxStarvationDelay):a.maxStarvationDelay;if(!A){const me=this.bitrateTestDelay;me&&(ee=(p?Math.min(p,a.maxLoadingDelay):a.maxLoadingDelay)-me,x.info(`[abr] bitrate test took ${Math.round(1e3*me)}ms, set first fragment max fetchDuration to ${Math.round(1e3*ee)} ms`),M=W=1)}const le=this.findBestLevel(b,l,s,A,ee,M,W);if(x.info(`[abr] ${A?"rebuffering expected":"buffer is empty"}, optimal quality level ${le}`),le>-1)return le;const oe=r.levels[l],he=r.levels[r.loadLevel];return(oe==null?void 0:oe.bitrate)<(he==null?void 0:he.bitrate)?l:r.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const r=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,s=e.mainForwardBufferInfo;return(s?s.len:0)/r}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,r,s,a,l,p){var b;const A=s+a,M=this.lastLoadedFragLevel,W=M===-1?this.hls.firstLevel:M,{fragCurrent:ee,partCurrent:le}=this,{levels:oe,allAudioTracks:he,loadLevel:me,config:De}=this.hls;if(oe.length===1)return 0;const We=oe[W],je=!!(We!=null&&(b=We.details)!=null&&b.live),ot=me===-1||M===-1;let Ye,pt="SDR",at=(We==null?void 0:We.frameRate)||0;const{audioPreference:Ct,videoPreference:Bt}=De,ct=this.audioTracksByGroup||(this.audioTracksByGroup=na(he));if(ot){if(this.firstSelection!==-1)return this.firstSelection;const nr=this.codecTiers||(this.codecTiers=Is(oe,ct,t,r)),Jt=En(nr,pt,e,Ct,Bt),{codecSet:Er,videoRanges:Ur,minFramerate:Vt,minBitrate:jt,preferHDR:Dr}=Jt;Ye=Er,pt=Dr?Ur[Ur.length-1]:Ur[0],at=Vt,e=Math.max(e,jt),x.log(`[abr] picked start tier ${JSON.stringify(Jt)}`)}else Ye=We==null?void 0:We.codecSet,pt=We==null?void 0:We.videoRange;const At=le?le.duration:ee?ee.duration:0,or=this.bwEstimator.getEstimateTTFB()/1e3,$t=[];for(let nr=r;nr>=t;nr--){var ar;const Jt=oe[nr],Er=nr>W;if(!Jt)continue;if(De.useMediaCapabilities&&!Jt.supportedResult&&!Jt.supportedPromise){const li=navigator.mediaCapabilities;typeof(li==null?void 0:li.decodingInfo)=="function"&&ks(Jt,ct,pt,at,e,Ct)?(Jt.supportedPromise=ra(Jt,ct,li),Jt.supportedPromise.then(bi=>{if(!this.hls)return;Jt.supportedResult=bi;const Ci=this.hls.levels,sn=Ci.indexOf(Jt);bi.error?x.warn(`[abr] MediaCapabilities decodingInfo error: "${bi.error}" for level ${sn} ${JSON.stringify(bi)}`):bi.supported||(x.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${sn} ${JSON.stringify(bi)}`),sn>-1&&Ci.length>1&&(x.log(`[abr] Removing unsupported level ${sn}`),this.hls.removeLevel(sn)))})):Jt.supportedResult=Kn}if(Ye&&Jt.codecSet!==Ye||pt&&Jt.videoRange!==pt||Er&&at>Jt.frameRate||!Er&&at>0&&at<Jt.frameRate||Jt.supportedResult&&!((ar=Jt.supportedResult.decodingInfoResults)!=null&&ar[0].smooth)){$t.push(nr);continue}const Ur=Jt.details,Vt=(le?Ur==null?void 0:Ur.partTarget:Ur==null?void 0:Ur.averagetargetduration)||At;let jt;Er?jt=p*e:jt=l*e;const Dr=At&&s>=At*2&&a===0?oe[nr].averageBitrate:oe[nr].maxBitrate,gr=this.getTimeToLoadFrag(or,jt,Dr*Vt,Ur===void 0);if(jt>=Dr&&(nr===M||Jt.loadError===0&&Jt.fragmentError===0)&&(gr<=or||!v(gr)||je&&!this.bitrateTestDelay||gr<A)){const li=this.forcedAutoLevel;return nr!==me&&(li===-1||li!==me)&&($t.length&&x.trace(`[abr] Skipped level(s) ${$t.join(",")} of ${r} max with CODECS and VIDEO-RANGE:"${oe[$t[0]].codecs}" ${oe[$t[0]].videoRange}; not compatible with "${We.codecs}" ${pt}`),x.info(`[abr] switch candidate:${W}->${nr} adjustedbw(${Math.round(jt)})-bitrate=${Math.round(jt-Dr)} ttfb:${or.toFixed(1)} avgDuration:${Vt.toFixed(1)} maxFetchDuration:${A.toFixed(1)} fetchDuration:${gr.toFixed(1)} firstSelection:${ot} codecSet:${Ye} videoRange:${pt} hls.loadLevel:${me}`)),ot&&(this.firstSelection=nr),nr}}return-1}set nextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:r}=this.hls,s=Math.min(Math.max(e,r),t);this._nextAutoLevel!==s&&(this.nextAutoLevelKey="",this._nextAutoLevel=s)}}class Na{constructor(){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(){}}var ai={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Ua{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(n.BUFFER_APPENDED,this.onBufferAppended,this),e.on(n.FRAG_BUFFERED,this.onFragBuffered,this),e.on(n.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(n.BUFFER_APPENDED,this.onBufferAppended,this),e.off(n.FRAG_BUFFERED,this.onFragBuffered,this),e.off(n.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const r=this.activePartLists[t];if(r)for(let s=r.length;s--;){const a=r[s];if(!a)break;const l=a.end;if(a.start<=e&&l!==null&&e<=l)return a}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){const{fragments:r}=this,s=Object.keys(r);for(let a=s.length;a--;){const l=r[s[a]];if((l==null?void 0:l.body.type)===t&&l.buffered){const p=l.body;if(p.start<=e&&e<=p.end)return p}}return null}detectEvictedFragments(e,t,r,s){this.timeRanges&&(this.timeRanges[e]=t);const a=(s==null?void 0:s.fragment.sn)||-1;Object.keys(this.fragments).forEach(l=>{const p=this.fragments[l];if(!p||a>=p.body.sn)return;if(!p.buffered&&!p.loaded){p.body.type===r&&this.removeFragment(p.body);return}const b=p.range[e];b&&b.time.some(A=>{const M=!this.isTimeBuffered(A.startPTS,A.endPTS,t);return M&&this.removeFragment(p.body),M})})}detectPartialFragments(e){const t=this.timeRanges,{frag:r,part:s}=e;if(!t||r.sn==="initSegment")return;const a=Vn(r),l=this.fragments[a];if(!l||l.buffered&&r.gap)return;const p=!r.relurl;Object.keys(t).forEach(b=>{const A=r.elementaryStreams[b];if(!A)return;const M=t[b],W=p||A.partial===!0;l.range[b]=this.getBufferedTimes(r,s,W,M)}),l.loaded=null,Object.keys(l.range).length?(l.buffered=!0,(l.body.endList=r.endList||l.body.endList)&&(this.endListFragments[l.body.type]=l),rs(l)||this.removeParts(r.sn-1,r.type)):this.removeFragment(l.body)}removeParts(e,t){const r=this.activePartLists[t];r&&(this.activePartLists[t]=r.filter(s=>s.fragment.sn>=e))}fragBuffered(e,t){const r=Vn(e);let s=this.fragments[r];!s&&t&&(s=this.fragments[r]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),s&&(s.loaded=null,s.buffered=!0)}getBufferedTimes(e,t,r,s){const a={time:[],partial:r},l=e.start,p=e.end,b=e.minEndPTS||p,A=e.maxStartPTS||l;for(let M=0;M<s.length;M++){const W=s.start(M)-this.bufferPadding,ee=s.end(M)+this.bufferPadding;if(A>=W&&b<=ee){a.time.push({startPTS:Math.max(l,s.start(M)),endPTS:Math.min(p,s.end(M))});break}else if(l<ee&&p>W){const le=Math.max(l,s.start(M)),oe=Math.min(p,s.end(M));oe>le&&(a.partial=!0,a.time.push({startPTS:le,endPTS:oe}))}else if(p<=W)break}return a}getPartialFragment(e){let t=null,r,s,a,l=0;const{bufferPadding:p,fragments:b}=this;return Object.keys(b).forEach(A=>{const M=b[A];M&&rs(M)&&(s=M.body.start-p,a=M.body.end+p,e>=s&&e<=a&&(r=Math.min(e-s,a-e),l<=r&&(t=M.body,l=r)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||rs(t))}getState(e){const t=Vn(e),r=this.fragments[t];return r?r.buffered?rs(r)?ai.PARTIAL:ai.OK:ai.APPENDING:ai.NOT_LOADED}isTimeBuffered(e,t,r){let s,a;for(let l=0;l<r.length;l++){if(s=r.start(l)-this.bufferPadding,a=r.end(l)+this.bufferPadding,e>=s&&t<=a)return!0;if(t<=s)return!1}return!1}onFragLoaded(e,t){const{frag:r,part:s}=t;if(r.sn==="initSegment"||r.bitrateTest)return;const a=s?null:t,l=Vn(r);this.fragments[l]={body:r,appendedPTS:null,loaded:a,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:r,part:s,timeRanges:a}=t;if(r.sn==="initSegment")return;const l=r.type;if(s){let p=this.activePartLists[l];p||(this.activePartLists[l]=p=[]),p.push(s)}this.timeRanges=a,Object.keys(a).forEach(p=>{const b=a[p];this.detectEvictedFragments(p,b,l,s)})}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Vn(e);return!!this.fragments[t]}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,r,s,a){s&&!this.hasGaps||Object.keys(this.fragments).forEach(l=>{const p=this.fragments[l];if(!p)return;const b=p.body;b.type!==r||s&&!b.gap||b.start<t&&b.end>e&&(p.buffered||a)&&this.removeFragment(b)})}removeFragment(e){const t=Vn(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const r=this.activePartLists[e.type];if(r){const s=e.sn;this.activePartLists[e.type]=r.filter(a=>a.fragment.sn!==s)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function rs(c){var e,t,r;return c.buffered&&(c.body.gap||((e=c.range.video)==null?void 0:e.partial)||((t=c.range.audio)==null?void 0:t.partial)||((r=c.range.audiovideo)==null?void 0:r.partial))}function Vn(c){return`${c.type}_${c.level}_${c.sn}`}const sa={length:0,start:()=>0,end:()=>0};class Fr{static isBuffered(e,t){try{if(e){const r=Fr.getBuffered(e);for(let s=0;s<r.length;s++)if(t>=r.start(s)&&t<=r.end(s))return!0}}catch(r){}return!1}static bufferInfo(e,t,r){try{if(e){const s=Fr.getBuffered(e),a=[];let l;for(l=0;l<s.length;l++)a.push({start:s.start(l),end:s.end(l)});return this.bufferedInfo(a,t,r)}}catch(s){}return{len:0,start:t,end:t,nextStart:void 0}}static bufferedInfo(e,t,r){t=Math.max(0,t),e.sort(function(A,M){const W=A.start-M.start;return W||M.end-A.end});let s=[];if(r)for(let A=0;A<e.length;A++){const M=s.length;if(M){const W=s[M-1].end;e[A].start-W<r?e[A].end>W&&(s[M-1].end=e[A].end):s.push(e[A])}else s.push(e[A])}else s=e;let a=0,l,p=t,b=t;for(let A=0;A<s.length;A++){const M=s[A].start,W=s[A].end;if(t+r>=M&&t<W)p=M,b=W,a=b-t;else if(t+r<M){l=M;break}}return{len:a,start:p||0,end:b||0,nextStart:l}}static getBuffered(e){try{return e.buffered}catch(t){return x.log("failed to get media.buffered",t),sa}}}class Ps{constructor(e,t,r,s=0,a=-1,l=!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=qi(),this.buffering={audio:qi(),video:qi(),audiovideo:qi()},this.level=e,this.sn=t,this.id=r,this.size=s,this.part=a,this.partial=l}}function qi(){return{start:0,executeStart:0,executeEnd:0,end:0}}function is(c,e){for(let r=0,s=c.length;r<s;r++){var t;if(((t=c[r])==null?void 0:t.cc)===e)return c[r]}return null}function za(c,e,t){return!!(e&&(t.endCC>t.startCC||c&&c.cc<t.startCC))}function cs(c,e){const t=c.fragments,r=e.fragments;if(!r.length||!t.length){x.log("No fragments to align");return}const s=is(t,r[0].cc);if(!s||s&&!s.startPTS){x.log("No frag in previous level to align on");return}return s}function Ms(c,e){if(c){const t=c.start+e;c.start=c.startPTS=t,c.endPTS=t+c.duration}}function hs(c,e){const t=e.fragments;for(let r=0,s=t.length;r<s;r++)Ms(t[r],c);e.fragmentHint&&Ms(e.fragmentHint,c),e.alignedSliding=!0}function Fs(c,e,t){e&&(aa(c,t,e),!t.alignedSliding&&e&&Yi(t,e),!t.alignedSliding&&e&&!t.skippedSegments&&jn(e,t))}function aa(c,e,t){if(za(c,t,e)){const r=cs(t,e);r&&v(r.start)&&(x.log(`Adjusting PTS using last level due to CC increase within current level ${e.url}`),hs(r.start,e))}}function Yi(c,e){if(!c.hasProgramDateTime||!e.hasProgramDateTime)return;const t=c.fragments,r=e.fragments;if(!t.length||!r.length)return;let s,a;const l=Math.min(e.endCC,c.endCC);e.startCC<l&&c.startCC<l&&(s=is(r,l),a=is(t,l)),(!s||!a)&&(s=r[Math.floor(r.length/2)],a=is(t,s.cc)||t[Math.floor(t.length/2)]);const p=s.programDateTime,b=a.programDateTime;if(!p||!b)return;const A=(b-p)/1e3-(a.start-s.start);hs(A,c)}const Bs=Math.pow(2,17);class Bn{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const r=e.url;if(!r)return Promise.reject(new pn({type:o.NETWORK_ERROR,details:u.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${r?"part list":"url"}`),networkDetails:null}));this.abort();const s=this.config,a=s.fLoader,l=s.loader;return new Promise((p,b)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(le=>le[0]==="GAP")){b(dn(e));return}else e.gap=!1;const A=this.loader=e.loader=a?new a(s):new l(s),M=fs(e),W=tn(s.fragLoadPolicy.default),ee={loadPolicy:W,timeout:W.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Bs};e.stats=A.stats,A.load(M,ee,{onSuccess:(le,oe,he,me)=>{this.resetLoader(e,A);let De=le.data;he.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(De.slice(0,16)),De=De.slice(16)),p({frag:e,part:null,payload:De,networkDetails:me})},onError:(le,oe,he,me)=>{this.resetLoader(e,A),b(new pn({type:o.NETWORK_ERROR,details:u.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:F({url:r,data:void 0},le),error:new Error(`HTTP Error ${le.code} ${le.text}`),networkDetails:he,stats:me}))},onAbort:(le,oe,he)=>{this.resetLoader(e,A),b(new pn({type:o.NETWORK_ERROR,details:u.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:he,stats:le}))},onTimeout:(le,oe,he)=>{this.resetLoader(e,A),b(new pn({type:o.NETWORK_ERROR,details:u.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${ee.timeout}ms`),networkDetails:he,stats:le}))},onProgress:(le,oe,he,me)=>{t&&t({frag:e,part:null,payload:he,networkDetails:me})}})})}loadPart(e,t,r){this.abort();const s=this.config,a=s.fLoader,l=s.loader;return new Promise((p,b)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){b(dn(e,t));return}const A=this.loader=e.loader=a?new a(s):new l(s),M=fs(e,t),W=tn(s.fragLoadPolicy.default),ee={loadPolicy:W,timeout:W.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Bs};t.stats=A.stats,A.load(M,ee,{onSuccess:(le,oe,he,me)=>{this.resetLoader(e,A),this.updateStatsFromPart(e,t);const De={frag:e,part:t,payload:le.data,networkDetails:me};r(De),p(De)},onError:(le,oe,he,me)=>{this.resetLoader(e,A),b(new pn({type:o.NETWORK_ERROR,details:u.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:F({url:M.url,data:void 0},le),error:new Error(`HTTP Error ${le.code} ${le.text}`),networkDetails:he,stats:me}))},onAbort:(le,oe,he)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,A),b(new pn({type:o.NETWORK_ERROR,details:u.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:he,stats:le}))},onTimeout:(le,oe,he)=>{this.resetLoader(e,A),b(new pn({type:o.NETWORK_ERROR,details:u.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${ee.timeout}ms`),networkDetails:he,stats:le}))}})})}updateStatsFromPart(e,t){const r=e.stats,s=t.stats,a=s.total;if(r.loaded+=s.loaded,a){const b=Math.round(e.duration/t.duration),A=Math.min(Math.round(r.loaded/a),b),W=(b-A)*Math.round(r.loaded/A);r.total=r.loaded+W}else r.total=Math.max(r.loaded,r.total);const l=r.loading,p=s.loading;l.start?l.first+=p.first-p.start:(l.start=p.start,l.first=p.first),l.end=p.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function fs(c,e=null){const t=e||c,r={frag:c,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},s=t.byteRangeStartOffset,a=t.byteRangeEndOffset;if(v(s)&&v(a)){var l;let p=s,b=a;if(c.sn==="initSegment"&&((l=c.decryptdata)==null?void 0:l.method)==="AES-128"){const A=a-s;A%16&&(b=a+(16-A%16)),s!==0&&(r.resetIV=!0,p=s-16)}r.rangeStart=p,r.rangeEnd=b}return r}function dn(c,e){const t=new Error(`GAP ${c.gap?"tag":"attribute"} found`),r={type:o.MEDIA_ERROR,details:u.FRAG_GAP,fatal:!1,frag:c,error:t,networkDetails:null};return e&&(r.part=e),(e||c).stats.aborted=!0,new pn(r)}class pn extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class An{constructor(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}decrypt(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)}}class oa{constructor(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}function Ha(c){const e=c.byteLength,t=e&&new DataView(c.buffer).getUint8(e-1);return t?Ie(c,0,e-t):c}class la{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),r=new Uint32Array(4);for(let s=0;s<4;s++)r[s]=t.getUint32(s*4);return r}initTable(){const e=this.sBox,t=this.invSBox,r=this.subMix,s=r[0],a=r[1],l=r[2],p=r[3],b=this.invSubMix,A=b[0],M=b[1],W=b[2],ee=b[3],le=new Uint32Array(256);let oe=0,he=0,me=0;for(me=0;me<256;me++)me<128?le[me]=me<<1:le[me]=me<<1^283;for(me=0;me<256;me++){let De=he^he<<1^he<<2^he<<3^he<<4;De=De>>>8^De&255^99,e[oe]=De,t[De]=oe;const We=le[oe],je=le[We],ot=le[je];let Ye=le[De]*257^De*16843008;s[oe]=Ye<<24|Ye>>>8,a[oe]=Ye<<16|Ye>>>16,l[oe]=Ye<<8|Ye>>>24,p[oe]=Ye,Ye=ot*16843009^je*65537^We*257^oe*16843008,A[De]=Ye<<24|Ye>>>8,M[De]=Ye<<16|Ye>>>16,W[De]=Ye<<8|Ye>>>24,ee[De]=Ye,oe?(oe=We^le[le[le[ot^We]]],he^=le[le[he]]):oe=he=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let r=!0,s=0;for(;s<t.length&&r;)r=t[s]===this.key[s],s++;if(r)return;this.key=t;const a=this.keySize=t.length;if(a!==4&&a!==6&&a!==8)throw new Error("Invalid aes key size="+a);const l=this.ksRows=(a+6+1)*4;let p,b;const A=this.keySchedule=new Uint32Array(l),M=this.invKeySchedule=new Uint32Array(l),W=this.sBox,ee=this.rcon,le=this.invSubMix,oe=le[0],he=le[1],me=le[2],De=le[3];let We,je;for(p=0;p<l;p++){if(p<a){We=A[p]=t[p];continue}je=We,p%a===0?(je=je<<8|je>>>24,je=W[je>>>24]<<24|W[je>>>16&255]<<16|W[je>>>8&255]<<8|W[je&255],je^=ee[p/a|0]<<24):a>6&&p%a===4&&(je=W[je>>>24]<<24|W[je>>>16&255]<<16|W[je>>>8&255]<<8|W[je&255]),A[p]=We=(A[p-a]^je)>>>0}for(b=0;b<l;b++)p=l-b,b&3?je=A[p]:je=A[p-4],b<4||p<=4?M[b]=je:M[b]=oe[W[je>>>24]]^he[W[je>>>16&255]]^me[W[je>>>8&255]]^De[W[je&255]],M[b]=M[b]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,r){const s=this.keySize+6,a=this.invKeySchedule,l=this.invSBox,p=this.invSubMix,b=p[0],A=p[1],M=p[2],W=p[3],ee=this.uint8ArrayToUint32Array_(r);let le=ee[0],oe=ee[1],he=ee[2],me=ee[3];const De=new Int32Array(e),We=new Int32Array(De.length);let je,ot,Ye,pt,at,Ct,Bt,ct,At,or,$t,ar,nr,Jt;const Er=this.networkToHostOrderSwap;for(;t<De.length;){for(At=Er(De[t]),or=Er(De[t+1]),$t=Er(De[t+2]),ar=Er(De[t+3]),at=At^a[0],Ct=ar^a[1],Bt=$t^a[2],ct=or^a[3],nr=4,Jt=1;Jt<s;Jt++)je=b[at>>>24]^A[Ct>>16&255]^M[Bt>>8&255]^W[ct&255]^a[nr],ot=b[Ct>>>24]^A[Bt>>16&255]^M[ct>>8&255]^W[at&255]^a[nr+1],Ye=b[Bt>>>24]^A[ct>>16&255]^M[at>>8&255]^W[Ct&255]^a[nr+2],pt=b[ct>>>24]^A[at>>16&255]^M[Ct>>8&255]^W[Bt&255]^a[nr+3],at=je,Ct=ot,Bt=Ye,ct=pt,nr=nr+4;je=l[at>>>24]<<24^l[Ct>>16&255]<<16^l[Bt>>8&255]<<8^l[ct&255]^a[nr],ot=l[Ct>>>24]<<24^l[Bt>>16&255]<<16^l[ct>>8&255]<<8^l[at&255]^a[nr+1],Ye=l[Bt>>>24]<<24^l[ct>>16&255]<<16^l[at>>8&255]<<8^l[Ct&255]^a[nr+2],pt=l[ct>>>24]<<24^l[at>>16&255]<<16^l[Ct>>8&255]<<8^l[Bt&255]^a[nr+3],We[t]=Er(je^le),We[t+1]=Er(pt^oe),We[t+2]=Er(Ye^he),We[t+3]=Er(ot^me),le=At,oe=or,he=$t,me=ar,t=t+4}return We.buffer}}const $a=16;class ds{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.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const r=self.crypto;r&&(this.subtle=r.subtle||r.webkitSubtle)}catch(r){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const r=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Ha(r):r}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,r){return this.useSoftware?new Promise((s,a)=>{this.softwareDecrypt(new Uint8Array(e),t,r);const l=this.flush();l?s(l.buffer):a(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,r)}softwareDecrypt(e,t,r){const{currentIV:s,currentResult:a,remainderData:l}=this;this.logOnce("JS AES decrypt"),l&&(e=St(l,e),this.remainderData=null);const p=this.getValidChunk(e);if(!p.length)return null;s&&(r=s);let b=this.softwareDecrypter;b||(b=this.softwareDecrypter=new la),b.expandKey(t);const A=a;return this.currentResult=b.decrypt(p.buffer,0,r),this.currentIV=Ie(p,-16).buffer,A||null}webCryptoDecrypt(e,t,r){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,r));this.key=t,this.fastAesKey=new oa(this.subtle,t)}return this.fastAesKey.expandKey().then(s=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new An(this.subtle,new Uint8Array(r)).decrypt(e.buffer,s)):Promise.reject(new Error("web crypto not initialized"))).catch(s=>(x.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`),this.onWebCryptoError(e,t,r)))}onWebCryptoError(e,t,r){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,r);const s=this.flush();if(s)return s.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const r=e.length-e.length%$a;return r!==e.length&&(t=Ie(e,0,r),this.remainderData=Ie(e,r)),t}logOnce(e){this.logEnabled&&(x.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const ua={toString:function(c){let e="";const t=c.length;for(let r=0;r<t;r++)e+=`[${c.start(r).toFixed(3)}-${c.end(r).toFixed(3)}]`;return e}},ht={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 ps extends Na{constructor(e,t,r,s,a){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=ht.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.loadedmetadata=!1,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.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=a,this.logPrefix=s,this.log=x.log.bind(x,`${s}:`),this.warn=x.warn.bind(x,`${s}:`),this.hls=e,this.fragmentLoader=new Bn(e.config),this.keyLoader=r,this.fragmentTracker=t,this.config=e.config,this.decrypter=new ds(e.config),e.on(n.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){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=ht.STOPPED}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}_streamEnded(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;const r=t.partList;if(r!=null&&r.length){const a=r[r.length-1];return Fr.isBuffered(this.media,a.start+a.duration/2)}const s=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(s)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levelLastLoaded)==null?void 0:e.details}}onMediaAttached(e,t){const r=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),r.addEventListener("seeking",this.onvseeking),r.addEventListener("ended",this.onvended);const s=this.config;this.levels&&s.autoStartLoad&&this.state===ht.STOPPED&&this.startLoad(s.startPosition)}onMediaDetaching(){const e=this.media;e!=null&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:e,fragCurrent:t,media:r,mediaBuffer:s,state:a}=this,l=r?r.currentTime:0,p=Fr.bufferInfo(s||r,l,e.maxBufferHole);if(this.log(`media seeking to ${v(l)?l.toFixed(3):l}, state: ${a}`),this.state===ht.ENDED)this.resetLoadingState();else if(t){const b=e.maxFragLookUpTolerance,A=t.start-b,M=t.start+t.duration+b;if(!p.len||M<p.start||A>p.end){const W=l>M;(l<A||W)&&(W&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}r&&(this.fragmentTracker.removeFragmentsInRange(l,1/0,this.playlistType,!0),this.lastCurrentTime=l),!this.loadedmetadata&&!p.len&&(this.nextLoadPosition=this.startPosition=l),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.hls.off(n.MANIFEST_LOADED,this.onManifestLoaded,this),this.stopLoad(),super.onHandlerDestroying(),this.hls=null}onHandlerDestroyed(){this.state=ht.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,r){this._loadFragForPlayback(e,t,r)}_loadFragForPlayback(e,t,r){const s=a=>{if(this.fragContextChanged(e)){this.warn(`Fragment ${e.sn}${a.part?" p: "+a.part.index:""} of level ${e.level} was dropped during download.`),this.fragmentTracker.removeFragment(e);return}e.stats.chunkCount++,this._handleFragmentLoadProgress(a)};this._doFragLoad(e,t,r,s).then(a=>{if(!a)return;const l=this.state;if(this.fragContextChanged(e)){(l===ht.FRAG_LOADING||!this.fragCurrent&&l===ht.PARSING)&&(this.fragmentTracker.removeFragment(e),this.state=ht.IDLE);return}"payload"in a&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(n.FRAG_LOADED,a)),this._handleFragmentLoadComplete(a)}).catch(a=>{this.state===ht.STOPPED||this.state===ht.ERROR||(this.warn(`Frag error: ${(a==null?void 0:a.message)||a}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:r}=this;if(r.getState(e)===ai.APPENDING){const a=e.type,l=this.getFwdBufferInfo(this.mediaBuffer,a),p=Math.max(e.duration,l?l.len:this.config.maxBufferLength),b=this.backtrackFragment;((b?e.sn-b.sn:0)===1||this.reduceMaxBufferLength(p,e.duration))&&r.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?r.removeAllFragments():r.hasParts(e.type)&&(r.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),r.getState(e)===ai.PARTIAL&&r.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,t,r=null){if(!(e-t))return;const s={startOffset:e,endOffset:t,type:r};this.hls.trigger(n.BUFFER_FLUSHING,s)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(r=>{if(!r||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return r}).then(r=>{const{hls:s}=this,{payload:a}=r,l=e.decryptdata;if(a&&a.byteLength>0&&l!=null&&l.key&&l.iv&&l.method==="AES-128"){const p=self.performance.now();return this.decrypter.decrypt(new Uint8Array(a),l.key.buffer,l.iv.buffer).catch(b=>{throw s.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.FRAG_DECRYPT_ERROR,fatal:!1,error:b,reason:b.message,frag:e}),b}).then(b=>{const A=self.performance.now();return s.trigger(n.FRAG_DECRYPTED,{frag:e,payload:b,stats:{tstart:p,tdecrypt:A}}),r.payload=b,this.completeInitSegmentLoad(r)})}return this.completeInitSegmentLoad(r)}).catch(r=>{this.state===ht.STOPPED||this.state===ht.ERROR||(this.warn(r),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const r=e.frag.stats;this.state=ht.IDLE,e.frag.data=new Uint8Array(e.payload),r.parsing.start=r.buffering.start=self.performance.now(),r.parsing.end=r.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){var r,s,a,l;const p=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===Ue.MAIN?"level":"track"} ${e.level} (frag:[${((r=e.startPTS)!=null?r:NaN).toFixed(3)}-${((s=e.endPTS)!=null?s:NaN).toFixed(3)}] > buffer:${p?ua.toString(Fr.getBuffered(p)):"(detached)"})`),e.sn!=="initSegment"){var b;if(e.type!==Ue.SUBTITLE){const M=e.elementaryStreams;if(!Object.keys(M).some(W=>!!M[W])){this.state=ht.IDLE;return}}const A=(b=this.levels)==null?void 0:b[e.level];A!=null&&A.fragmentError&&(this.log(`Resetting level fragment error count of ${A.fragmentError} on frag buffered`),A.fragmentError=0)}this.state=ht.IDLE,p&&(!this.loadedmetadata&&e.type==Ue.MAIN&&p.buffered.length&&((a=this.fragCurrent)==null?void 0:a.sn)===((l=this.fragPrevious)==null?void 0:l.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:r,part:s,partsLoaded:a}=e,l=!a||a.length===0||a.some(b=>!b),p=new Ps(r.level,r.sn,r.stats.chunkCount+1,0,s?s.index:-1,!l);t.flush(p)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,r=null,s){var a;const l=t==null?void 0:t.details;if(!this.levels||!l)throw new Error(`frag load aborted, missing level${l?"":" detail"}s`);let p=null;if(e.encrypted&&!((a=e.decryptdata)!=null&&a.key)?(this.log(`Loading key for ${e.sn} of [${l.startSN}-${l.endSN}], ${this.logPrefix==="[stream-controller]"?"level":"track"} ${e.level}`),this.state=ht.KEY_LOADING,this.fragCurrent=e,p=this.keyLoader.load(e).then(M=>{if(!this.fragContextChanged(M.frag))return this.hls.trigger(n.KEY_LOADED,M),this.state===ht.KEY_LOADING&&(this.state=ht.IDLE),M}),this.hls.trigger(n.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(p=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&l.encryptedFragments.length&&this.keyLoader.loadClear(e,l.encryptedFragments),r=Math.max(e.start,r||0),this.config.lowLatencyMode&&e.sn!=="initSegment"){const M=l.partList;if(M&&s){r>e.end&&l.fragmentHint&&(e=l.fragmentHint);const W=this.getNextPart(M,e,r);if(W>-1){const ee=M[W];this.log(`Loading part sn: ${e.sn} p: ${ee.index} cc: ${e.cc} of playlist [${l.startSN}-${l.endSN}] parts [0-${W}-${M.length-1}] ${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(r.toFixed(3))}`),this.nextLoadPosition=ee.start+ee.duration,this.state=ht.FRAG_LOADING;let le;return p?le=p.then(oe=>!oe||this.fragContextChanged(oe.frag)?null:this.doFragPartsLoad(e,ee,t,s)).catch(oe=>this.handleFragLoadError(oe)):le=this.doFragPartsLoad(e,ee,t,s).catch(oe=>this.handleFragLoadError(oe)),this.hls.trigger(n.FRAG_LOADING,{frag:e,part:ee,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):le}else if(!e.url||this.loadedEndOfParts(M,r))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${l?"of ["+l.startSN+"-"+l.endSN+"] ":""}${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(r.toFixed(3))}`),v(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=ht.FRAG_LOADING;const b=this.config.progressive;let A;return b&&p?A=p.then(M=>!M||this.fragContextChanged(M==null?void 0:M.frag)?null:this.fragmentLoader.load(e,s)).catch(M=>this.handleFragLoadError(M)):A=Promise.all([this.fragmentLoader.load(e,b?s:void 0),p]).then(([M])=>(!b&&M&&s&&s(M),M)).catch(M=>this.handleFragLoadError(M)),this.hls.trigger(n.FRAG_LOADING,{frag:e,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):A}doFragPartsLoad(e,t,r,s){return new Promise((a,l)=>{var p;const b=[],A=(p=r.details)==null?void 0:p.partList,M=W=>{this.fragmentLoader.loadPart(e,W,s).then(ee=>{b[W.index]=ee;const le=ee.part;this.hls.trigger(n.FRAG_LOADED,ee);const oe=hn(r,e.sn,W.index+1)||ui(A,e.sn,W.index+1);if(oe)M(oe);else return a({frag:e,part:le,partsLoaded:b})}).catch(l)};M(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===u.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(n.ERROR,t)}else this.hls.trigger(n.ERROR,{type:o.OTHER_ERROR,details:u.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==ht.PARSING){!this.fragCurrent&&this.state!==ht.STOPPED&&this.state!==ht.ERROR&&(this.state=ht.IDLE);return}const{frag:r,part:s,level:a}=t,l=self.performance.now();r.stats.parsing.end=l,s&&(s.stats.parsing.end=l),this.updateLevelTiming(r,s,a,e.partial)}getCurrentContext(e){const{levels:t,fragCurrent:r}=this,{level:s,sn:a,part:l}=e;if(!(t!=null&&t[s]))return this.warn(`Levels object was unset while buffering fragment ${a} of level ${s}. The current chunk will not be buffered.`),null;const p=t[s],b=l>-1?hn(p,a,l):null,A=b?b.fragment:On(p,a,r);return A?(r&&r!==A&&(A.stats=r.stats),{frag:A,part:b,level:p}):null}bufferFragmentData(e,t,r,s,a){var l;if(!e||this.state!==ht.PARSING)return;const{data1:p,data2:b}=e;let A=p;if(p&&b&&(A=St(p,b)),!((l=A)!=null&&l.length))return;const M={type:e.type,frag:t,part:r,chunkMeta:s,parent:t.type,data:A};if(this.hls.trigger(n.BUFFER_APPENDING,M),e.dropped&&e.independent&&!r){if(a)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!Fr.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const r=t.currentTime,s=Fr.bufferInfo(t,r,0),a=e.duration,l=Math.min(this.config.maxFragLookUpTolerance*2,a*.25),p=Math.max(Math.min(e.start-l,s.end-l),r+l);e.start-p>l&&this.flushMainBuffer(p,e.start)}getFwdBufferInfo(e,t){const r=this.getLoadPosition();return v(r)?this.getFwdBufferInfoAtPos(e,r,t):null}getFwdBufferInfoAtPos(e,t,r){const{config:{maxBufferHole:s}}=this,a=Fr.bufferInfo(e,t,s);if(a.len===0&&a.nextStart!==void 0){const l=this.fragmentTracker.getBufferedFrag(t,r);if(l&&a.nextStart<l.end)return Fr.bufferInfo(e,t,Math.max(a.nextStart,s))}return a}getMaxBufferLength(e){const{config:t}=this;let r;return e?r=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):r=t.maxBufferLength,Math.min(r,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const r=this.config,s=Math.max(Math.min(e-t,r.maxBufferLength),t),a=Math.max(e-t*3,r.maxMaxBufferLength/2,s);return a>=s?(r.maxMaxBufferLength=a,this.warn(`Reduce max buffer length to ${a}s`),!0):!1}getAppendedFrag(e,t=Ue.MAIN){const r=this.fragmentTracker.getAppendedFrag(e,Ue.MAIN);return r&&"fragment"in r?r.fragment:r}getNextFragment(e,t){const r=t.fragments,s=r.length;if(!s)return null;const{config:a}=this,l=r[0].start;let p;if(t.live){const b=a.initialLiveManifestSize;if(s<b)return this.warn(`Not enough fragments to start playback (have: ${s}, need: ${b})`),null;(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<l)&&(p=this.getInitialLiveFragment(t,r),this.startPosition=this.nextLoadPosition=p?this.hls.liveSyncPosition||p.start:e)}else e<=l&&(p=r[0]);if(!p){const b=a.lowLatencyMode?t.partEnd:t.fragmentEnd;p=this.getFragmentAtPosition(e,b,t)}return this.mapToInitFragWhenRequired(p)}isLoopLoading(e,t){const r=this.fragmentTracker.getState(e);return(r===ai.OK||r===ai.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,r,s,a){const l=e.gap,p=this.getNextFragment(this.nextLoadPosition,t);if(p===null)return p;if(e=p,l&&e&&!e.gap&&r.nextStart){const b=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,r.nextStart,s);if(b!==null&&r.len+b.len>=a)return this.log(`buffer full after gaps in "${s}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,r){let s=-1,a=!1,l=!0;for(let p=0,b=e.length;p<b;p++){const A=e[p];if(l=l&&!A.independent,s>-1&&r<A.start)break;const M=A.loaded;M?s=-1:(a||A.independent||l)&&A.fragment===t&&(s=p),a=M}return s}loadedEndOfParts(e,t){const r=e[e.length-1];return r&&t>r.start&&r.loaded}getInitialLiveFragment(e,t){const r=this.fragPrevious;let s=null;if(r){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${r.programDateTime}`),s=Wn(t,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!s){const a=r.sn+1;if(a>=e.startSN&&a<=e.endSN){const l=t[a-e.startSN];r.cc===l.cc&&(s=l,this.log(`Live playlist, switching playlist, load frag with next SN: ${s.sn}`))}s||(s=Gt(t,r.cc),s&&this.log(`Live playlist, switching playlist, load frag with same CC: ${s.sn}`))}}else{const a=this.hls.liveSyncPosition;a!==null&&(s=this.getFragmentAtPosition(a,this.bitrateTest?e.fragmentEnd:e.edge,e))}return s}getFragmentAtPosition(e,t,r){const{config:s}=this;let{fragPrevious:a}=this,{fragments:l,endSN:p}=r;const{fragmentHint:b}=r,{maxFragLookUpTolerance:A}=s,M=r.partList,W=!!(s.lowLatencyMode&&M!=null&&M.length&&b);W&&b&&!this.bitrateTest&&(l=l.concat(b),p=b.sn);let ee;if(e<t){const le=e>t-A?0:A;ee=wn(a,l,e,le)}else ee=l[l.length-1];if(ee){const le=ee.sn-r.startSN,oe=this.fragmentTracker.getState(ee);if((oe===ai.OK||oe===ai.PARTIAL&&ee.gap)&&(a=ee),a&&ee.sn===a.sn&&(!W||M[0].fragment.sn>ee.sn)&&a&&ee.level===a.level){const me=l[le+1];ee.sn<p&&this.fragmentTracker.getState(me)!==ai.OK?ee=me:ee=null}}return ee}synchronizeToLiveEdge(e){const{config:t,media:r}=this;if(!r)return;const s=this.hls.liveSyncPosition,a=r.currentTime,l=e.fragments[0].start,p=e.edge,b=a>=l-t.maxFragLookUpTolerance&&a<=p;if(s!==null&&r.duration>s&&(a<s||!b)){const A=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!b&&r.readyState<4||a<p-A)&&(this.loadedmetadata||(this.nextLoadPosition=s),r.readyState&&(this.warn(`Playback: ${a.toFixed(3)} is located too far from the end of live sliding playlist: ${p}, reset currentTime to : ${s.toFixed(3)}`),r.currentTime=s))}}alignPlaylists(e,t,r){const s=e.fragments.length;if(!s)return this.warn("No fragments in live playlist"),0;const a=e.fragments[0].start,l=!t,p=e.alignedSliding&&v(a);if(l||!p&&!a){const{fragPrevious:b}=this;Fs(b,r,e);const A=e.fragments[0].start;return this.log(`Live playlist sliding: ${A.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} prev-sn: ${b?b.sn:"na"} fragments: ${s}`),A}return a}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let r=this.startPosition;if(r<t&&(r=-1),r===-1||this.lastCurrentTime===-1){const s=this.startTimeOffset!==null,a=s?this.startTimeOffset:e.startTimeOffset;a!==null&&v(a)?(r=t+a,a<0&&(r+=e.totalduration),r=Math.min(Math.max(t,r),t+e.totalduration),this.log(`Start time offset ${a} found in ${s?"multivariant":"media"} playlist, adjust startPosition to ${r}`),this.startPosition=r):e.live?r=this.hls.liveSyncPosition||t:this.startPosition=r=0,this.lastCurrentTime=r}this.nextLoadPosition=r}getLoadPosition(){const{media:e}=this;let t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t}handleFragLoadAborted(e,t){this.transmuxer&&e.sn!=="initSegment"&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==ht.FRAG_LOADING_WAITING_RETRY)&&(this.state=ht.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const M=this.getCurrentContext(t.chunkMeta);M&&(t.frag=M.frag)}const r=t.frag;if(!r||r.type!==e||!this.levels)return;if(this.fragContextChanged(r)){var s;this.warn(`Frag load error must match current frag to retry ${r.url} > ${(s=this.fragCurrent)==null?void 0:s.url}`);return}const a=t.details===u.FRAG_GAP;a&&this.fragmentTracker.fragBuffered(r,!0);const l=t.errorAction,{action:p,retryCount:b=0,retryConfig:A}=l||{};if(l&&p===Mt.RetryRequest&&A){this.resetStartWhenNotLoaded(this.levelLastLoaded);const M=Ui(A,b);this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${b+1}/${A.maxNumRetry} in ${M}ms`),l.resolved=!0,this.retryDate=self.performance.now()+M,this.state=ht.FRAG_LOADING_WAITING_RETRY}else if(A&&l)if(this.resetFragmentErrors(e),b<A.maxNumRetry)!a&&p!==Mt.RemoveAlternatePermanently&&(l.resolved=!0);else{x.warn(`${t.details} reached or exceeded max retry (${b})`);return}else(l==null?void 0:l.action)===Mt.SendAlternateToPenaltyBox?this.state=ht.WAITING_LEVEL:this.state=ht.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===ht.PARSING||this.state===ht.PARSED){const t=e.frag,r=e.parent,s=this.getFwdBufferInfo(this.mediaBuffer,r),a=s&&s.len>.5;a&&this.reduceMaxBufferLength(s.len,(t==null?void 0:t.duration)||10);const l=!a;return l&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${r} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),l}return!1}resetFragmentErrors(e){e===Ue.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==ht.STOPPED&&(this.state=ht.IDLE)}afterBufferFlushed(e,t,r){if(!e)return;const s=Fr.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,s,r),this.state===ht.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=ht.IDLE}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=e?e.details:null;t!=null&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,r,s){var a;const l=r.details;if(!l){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((b,A)=>{const M=e.elementaryStreams[A];if(M){const W=M.endPTS-M.startPTS;if(W<=0)return this.warn(`Could not parse fragment ${e.sn} ${A} duration reliably (${W})`),b||!1;const ee=s?0:un(l,e,M.startPTS,M.endPTS,M.startDTS,M.endDTS);return this.hls.trigger(n.LEVEL_PTS_UPDATED,{details:l,level:r,drift:ee,type:A,frag:e,start:M.startPTS,end:M.endPTS}),!0}return b},!1)&&((a=this.transmuxer)==null?void 0:a.error)===null){const b=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(r.fragmentError===0&&(r.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(b.message),this.hls.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.FRAG_PARSING_ERROR,fatal:!1,error:b,frag:e,reason:`Found no media in msn ${e.sn} of level "${r.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=ht.PARSED,this.hls.trigger(n.FRAG_PARSED,{frag:e,part:t})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}class Ns{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let r;if(e.length)e.length===1?r=e[0]:r=ca(e,t);else return new Uint8Array(0);return this.reset(),r}reset(){this.chunks.length=0,this.dataLength=0}}function ca(c,e){const t=new Uint8Array(e);let r=0;for(let s=0;s<c.length;s++){const a=c[s];t.set(a,r),r+=a.length}return t}function ha(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Us(){const c=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),e=self.URL.createObjectURL(c);return{worker:new self.Worker(e),objectURL:e}}function zs(c){const e=new self.URL(c,self.location.href).href;return{worker:new self.Worker(e),scriptURL:e}}function Zi(c="",e=9e4){return{type:c,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class ms{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,r,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,r){}demux(e,t){this.cachedData&&(e=St(this.cachedData,e),this.cachedData=null);let r=it(e,0),s=r?r.length:0,a;const l=this._audioTrack,p=this._id3Track,b=r?ye(r):void 0,A=e.length;for((this.basePTS===null||this.frameIndex===0&&v(b))&&(this.basePTS=fa(b,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),r&&r.length>0&&p.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:di.audioId3,duration:Number.POSITIVE_INFINITY});s<A;){if(this.canParse(e,s)){const M=this.appendFrame(l,e,s);M?(this.frameIndex++,this.lastPTS=M.sample.pts,s+=M.length,a=s):s=A}else ue(e,s)?(r=it(e,s),p.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:di.audioId3,duration:Number.POSITIVE_INFINITY}),s+=r.length,a=s):s++;if(s===A&&a!==A){const M=Ie(e,a);this.cachedData?this.cachedData=St(this.cachedData,M):this.cachedData=M}}return{audioTrack:l,videoTrack:Zi(),id3Track:p,textTrack:Zi()}}demuxSampleAes(e,t,r){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:Zi(),id3Track:this._id3Track,textTrack:Zi()}}destroy(){}}const fa=(c,e,t)=>{if(v(c))return c*90;const r=t?t.baseTime*9e4/t.timescale:0;return e*9e4+r};function ja(c,e,t,r){let s,a,l,p;const b=navigator.userAgent.toLowerCase(),A=r,M=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=((e[t+2]&192)>>>6)+1;const W=(e[t+2]&60)>>>2;if(W>M.length-1){const ee=new Error(`invalid ADTS sampling index:${W}`);c.emit(n.ERROR,n.ERROR,{type:o.MEDIA_ERROR,details:u.FRAG_PARSING_ERROR,fatal:!0,error:ee,reason:ee.message});return}return l=(e[t+2]&1)<<2,l|=(e[t+3]&192)>>>6,x.log(`manifest codec:${r}, ADTS type:${s}, samplingIndex:${W}`),/firefox/i.test(b)?W>=6?(s=5,p=new Array(4),a=W-3):(s=2,p=new Array(2),a=W):b.indexOf("android")!==-1?(s=2,p=new Array(2),a=W):(s=5,p=new Array(4),r&&(r.indexOf("mp4a.40.29")!==-1||r.indexOf("mp4a.40.5")!==-1)||!r&&W>=6?a=W-3:((r&&r.indexOf("mp4a.40.2")!==-1&&(W>=6&&l===1||/vivaldi/i.test(b))||!r&&l===1)&&(s=2,p=new Array(2)),a=W)),p[0]=s<<3,p[0]|=(W&14)>>1,p[1]|=(W&1)<<7,p[1]|=l<<3,s===5&&(p[1]|=(a&14)>>1,p[2]=(a&1)<<7,p[2]|=8,p[3]=0),{config:p,samplerate:M[W],channelCount:l,codec:"mp4a.40."+s,manifestCodec:A}}function gs(c,e){return c[e]===255&&(c[e+1]&246)===240}function Hs(c,e){return c[e+1]&1?7:9}function _s(c,e){return(c[e+3]&3)<<11|c[e+4]<<3|(c[e+5]&224)>>>5}function da(c,e){return e+5<c.length}function mn(c,e){return e+1<c.length&&gs(c,e)}function ns(c,e){return da(c,e)&&gs(c,e)&&_s(c,e)<=c.length-e}function Wa(c,e){if(mn(c,e)){const t=Hs(c,e);if(e+t>=c.length)return!1;const r=_s(c,e);if(r<=t)return!1;const s=e+r;return s===c.length||mn(c,s)}return!1}function pa(c,e,t,r,s){if(!c.samplerate){const a=ja(e,t,r,s);if(!a)return;c.config=a.config,c.samplerate=a.samplerate,c.channelCount=a.channelCount,c.codec=a.codec,c.manifestCodec=a.manifestCodec,x.log(`parsed codec:${c.codec}, rate:${a.samplerate}, channels:${a.channelCount}`)}}function $s(c){return 1024*9e4/c}function Ga(c,e){const t=Hs(c,e);if(e+t<=c.length){const r=_s(c,e)-t;if(r>0)return{headerLength:t,frameLength:r}}}function js(c,e,t,r,s){const a=$s(c.samplerate),l=r+s*a,p=Ga(e,t);let b;if(p){const{frameLength:W,headerLength:ee}=p,le=ee+W,oe=Math.max(0,t+le-e.length);oe?(b=new Uint8Array(le-ee),b.set(e.subarray(t+ee,e.length),0)):b=e.subarray(t+ee,t+le);const he={unit:b,pts:l};return oe||c.samples.push(he),{sample:he,length:le,missing:oe}}const A=e.length-t;return b=new Uint8Array(A),b.set(e.subarray(t,e.length),0),{sample:{unit:b,pts:l},length:A,missing:-1}}let ss=null;const Ka=[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],ma=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Va=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],ga=[0,1,1,4];function vs(c,e,t,r,s){if(t+24>e.length)return;const a=ys(e,t);if(a&&t+a.frameLength<=e.length){const l=a.samplesPerFrame*9e4/a.sampleRate,p=r+s*l,b={unit:e.subarray(t,t+a.frameLength),pts:p,dts:p};return c.config=[],c.channelCount=a.channelCount,c.samplerate=a.sampleRate,c.samples.push(b),{sample:b,length:a.frameLength,missing:0}}}function ys(c,e){const t=c[e+1]>>3&3,r=c[e+1]>>1&3,s=c[e+2]>>4&15,a=c[e+2]>>2&3;if(t!==1&&s!==0&&s!==15&&a!==3){const l=c[e+2]>>1&1,p=c[e+3]>>6,b=t===3?3-r:r===3?3:4,A=Ka[b*14+s-1]*1e3,W=ma[(t===3?0:t===2?1:2)*3+a],ee=p===3?1:2,le=Va[t][r],oe=ga[r],he=le*8*oe,me=Math.floor(le*A/W+l)*oe;if(ss===null){const je=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ss=je?parseInt(je[1]):0}return!!ss&&ss<=87&&r===2&&A>=224e3&&p===0&&(c[e+3]=c[e+3]|128),{sampleRate:W,channelCount:ee,frameLength:me,samplesPerFrame:he}}}function bs(c,e){return c[e]===255&&(c[e+1]&224)===224&&(c[e+1]&6)!==0}function Ws(c,e){return e+1<c.length&&bs(c,e)}function _a(c,e){return bs(c,e)&&4<=c.length-e}function va(c,e){if(e+1<c.length&&bs(c,e)){const r=ys(c,e);let s=4;r!=null&&r.frameLength&&(s=r.frameLength);const a=e+s;return a===c.length||Ws(c,a)}return!1}class ya extends ms{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,r,s){super.resetInitSegment(e,t,r,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=it(e,0);let r=(t==null?void 0:t.length)||0;if(va(e,r))return!1;for(let s=e.length;r<s;r++)if(Wa(e,r))return x.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return ns(e,t)}appendFrame(e,t,r){pa(e,this.observer,t,r,e.manifestCodec);const s=js(e,t,r,this.basePTS,this.frameIndex);if(s&&s.missing===0)return s}}const ba=/\/emsg[-/]ID3/i;class qa{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,r,s){const a=this.videoTrack=Zi("video",1),l=this.audioTrack=Zi("audio",1),p=this.txtTrack=Zi("text",1);if(this.id3Track=Zi("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const b=Ne(e);if(b.video){const{id:A,timescale:M,codec:W}=b.video;a.id=A,a.timescale=p.timescale=M,a.codec=W}if(b.audio){const{id:A,timescale:M,codec:W}=b.audio;l.id=A,l.timescale=M,l.codec=W}p.id=kt.text,a.sampleDuration=0,a.duration=l.duration=s}resetContiguity(){this.remainderData=null}static probe(e){return Kt(e)}demux(e,t){this.timeOffset=t;let r=e;const s=this.videoTrack,a=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=St(this.remainderData,e));const p=sr(r);this.remainderData=p.remainder,s.samples=p.valid||new Uint8Array}else s.samples=r;const l=this.extractID3Track(s,t);return a.samples=Et(t,s),{videoTrack:s,audioTrack:this.audioTrack,id3Track:l,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,r=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const s=this.extractID3Track(t,this.timeOffset);return r.samples=Et(e,t),{videoTrack:t,audioTrack:Zi(),id3Track:s,textTrack:Zi()}}extractID3Track(e,t){const r=this.id3Track;if(e.samples.length){const s=Ee(e.samples,["emsg"]);s&&s.forEach(a=>{const l=Rt(a);if(ba.test(l.schemeIdUri)){const p=v(l.presentationTime)?l.presentationTime/l.timeScale:t+l.presentationTimeDelta/l.timeScale;let b=l.eventDuration===4294967295?Number.POSITIVE_INFINITY:l.eventDuration/l.timeScale;b<=.001&&(b=Number.POSITIVE_INFINITY);const A=l.payload;r.samples.push({data:A,len:A.byteLength,dts:p,pts:p,type:di.emsg,duration:b})}})}return r}demuxSampleAes(e,t,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}}const qn=(c,e)=>{let t=0,r=5;e+=r;const s=new Uint32Array(1),a=new Uint32Array(1),l=new Uint8Array(1);for(;r>0;){l[0]=c[e];const p=Math.min(r,8),b=8-p;a[0]=4278190080>>>24+b<<b,s[0]=(l[0]&a[0])>>b,t=t?t<<p|s[0]:s[0],e+=1,r-=p}return t};class Gs extends ms{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,r,s){super.resetInitSegment(e,t,r,s),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,r){const s=Ks(e,t,r,this.basePTS,this.frameIndex);if(s!==-1)return{sample:e.samples[e.samples.length-1],length:s,missing:0}}static probe(e){if(!e)return!1;const t=it(e,0);if(!t)return!1;const r=t.length;return e[r]===11&&e[r+1]===119&&ye(t)!==void 0&&qn(e,r)<16}}function Ks(c,e,t,r,s){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const a=e[t+4]>>6;if(a>=3)return-1;const p=[48e3,44100,32e3][a],b=e[t+4]&63,M=[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][b*3+a]*2;if(t+M>e.length)return-1;const W=e[t+6]>>5;let ee=0;W===2?ee+=2:(W&1&&W!==1&&(ee+=2),W&4&&(ee+=2));const le=(e[t+6]<<8|e[t+7])>>12-ee&1,he=[2,1,2,3,3,4,4,5][W]+le,me=e[t+5]>>3,De=e[t+5]&7,We=new Uint8Array([a<<6|me<<1|De>>2,(De&3)<<6|W<<3|le<<2|b>>4,b<<4&224]),je=1536/p*9e4,ot=r+s*je,Ye=e.subarray(t,t+M);return c.config=We,c.channelCount=he,c.samplerate=p,c.samples.push({unit:Ye,pts:ot}),M}class Ya{constructor(){this.VideoSample=null}createVideoSample(e,t,r,s){return{key:e,frame:!1,pts:t,dts:r,units:[],debug:s,length:0}}getLastNalUnit(e){var t;let r=this.VideoSample,s;if((!r||r.units.length===0)&&(r=e[e.length-1]),(t=r)!=null&&t.units){const a=r.units;s=a[a.length-1]}return s}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const r=t.samples,s=r.length;if(s){const a=r[s-1];e.pts=a.pts,e.dts=a.dts}else{t.dropped++;return}}t.samples.push(e)}e.debug.length&&x.log(e.pts+"/"+e.dts+":"+e.debug)}}class xa{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,r=e.byteLength-t,s=new Uint8Array(4),a=Math.min(4,t);if(a===0)throw new Error("no bytes available");s.set(e.subarray(r,r+a)),this.word=new DataView(s.buffer).getUint32(0),this.bitsAvailable=a*8,this.bytesAvailable-=a}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const r=this.word>>>32-t;if(e>32&&x.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?r<<t|this.readBits(t):r}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(e){let t=8,r=8,s;for(let a=0;a<e;a++)r!==0&&(s=this.readEG(),r=(t+s+256)%256),t=r===0?t:r}readSPS(){let e=0,t=0,r=0,s=0,a,l,p;const b=this.readUByte.bind(this),A=this.readBits.bind(this),M=this.readUEG.bind(this),W=this.readBoolean.bind(this),ee=this.skipBits.bind(this),le=this.skipEG.bind(this),oe=this.skipUEG.bind(this),he=this.skipScalingList.bind(this);b();const me=b();if(A(5),ee(3),b(),oe(),me===100||me===110||me===122||me===244||me===44||me===83||me===86||me===118||me===128){const pt=M();if(pt===3&&ee(1),oe(),oe(),ee(1),W())for(l=pt!==3?8:12,p=0;p<l;p++)W()&&(p<6?he(16):he(64))}oe();const De=M();if(De===0)M();else if(De===1)for(ee(1),le(),le(),a=M(),p=0;p<a;p++)le();oe(),ee(1);const We=M(),je=M(),ot=A(1);ot===0&&ee(1),ee(1),W()&&(e=M(),t=M(),r=M(),s=M());let Ye=[1,1];if(W()&&W())switch(b()){case 1:Ye=[1,1];break;case 2:Ye=[12,11];break;case 3:Ye=[10,11];break;case 4:Ye=[16,11];break;case 5:Ye=[40,33];break;case 6:Ye=[24,11];break;case 7:Ye=[20,11];break;case 8:Ye=[32,11];break;case 9:Ye=[80,33];break;case 10:Ye=[18,11];break;case 11:Ye=[15,11];break;case 12:Ye=[64,33];break;case 13:Ye=[160,99];break;case 14:Ye=[4,3];break;case 15:Ye=[3,2];break;case 16:Ye=[2,1];break;case 255:{Ye=[b()<<8|b(),b()<<8|b()];break}}return{width:Math.ceil((We+1)*16-e*2-t*2),height:(2-ot)*(je+1)*16-(ot?2:4)*(r+s),pixelRatio:Ye}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class Za extends Ya{parseAVCPES(e,t,r,s,a){const l=this.parseAVCNALu(e,r.data);let p=this.VideoSample,b,A=!1;r.data=null,p&&l.length&&!e.audFound&&(this.pushAccessUnit(p,e),p=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts,"")),l.forEach(M=>{var W;switch(M.type){case 1:{let he=!1;b=!0;const me=M.data;if(A&&me.length>4){const De=new xa(me).readSliceType();(De===2||De===4||De===7||De===9)&&(he=!0)}if(he){var ee;(ee=p)!=null&&ee.frame&&!p.key&&(this.pushAccessUnit(p,e),p=this.VideoSample=null)}p||(p=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts,"")),p.frame=!0,p.key=he;break}case 5:b=!0,(W=p)!=null&&W.frame&&!p.key&&(this.pushAccessUnit(p,e),p=this.VideoSample=null),p||(p=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts,"")),p.key=!0,p.frame=!0;break;case 6:{b=!0,$r(M.data,1,r.pts,t.samples);break}case 7:{var le,oe;b=!0,A=!0;const he=M.data,De=new xa(he).readSPS();if(!e.sps||e.width!==De.width||e.height!==De.height||((le=e.pixelRatio)==null?void 0:le[0])!==De.pixelRatio[0]||((oe=e.pixelRatio)==null?void 0:oe[1])!==De.pixelRatio[1]){e.width=De.width,e.height=De.height,e.pixelRatio=De.pixelRatio,e.sps=[he],e.duration=a;const We=he.subarray(1,4);let je="avc1.";for(let ot=0;ot<3;ot++){let Ye=We[ot].toString(16);Ye.length<2&&(Ye="0"+Ye),je+=Ye}e.codec=je}break}case 8:b=!0,e.pps=[M.data];break;case 9:b=!0,e.audFound=!0,p&&this.pushAccessUnit(p,e),p=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts,"");break;case 12:b=!0;break;default:b=!1,p&&(p.debug+="unknown NAL "+M.type+" ");break}p&&b&&p.units.push(M)}),s&&p&&(this.pushAccessUnit(p,e),this.VideoSample=null)}parseAVCNALu(e,t){const r=t.byteLength;let s=e.naluState||0;const a=s,l=[];let p=0,b,A,M,W=-1,ee=0;for(s===-1&&(W=0,ee=t[0]&31,s=0,p=1);p<r;){if(b=t[p++],!s){s=b?0:1;continue}if(s===1){s=b?0:2;continue}if(!b)s=3;else if(b===1){if(A=p-s-1,W>=0){const le={data:t.subarray(W,A),type:ee};l.push(le)}else{const le=this.getLastNalUnit(e.samples);le&&(a&&p<=4-a&&le.state&&(le.data=le.data.subarray(0,le.data.byteLength-a)),A>0&&(le.data=St(le.data,t.subarray(0,A)),le.state=0))}p<r?(M=t[p]&31,W=p,ee=M,s=0):s=-1}else s=0}if(W>=0&&s>=0){const le={data:t.subarray(W,r),type:ee,state:s};l.push(le)}if(l.length===0){const le=this.getLastNalUnit(e.samples);le&&(le.data=St(le.data,t))}return e.naluState=s,l}}class Vs{constructor(e,t,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new ds(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(e,t,r){const s=e[t].unit;if(s.length<=16)return;const a=s.subarray(16,s.length-s.length%16),l=a.buffer.slice(a.byteOffset,a.byteOffset+a.length);this.decryptBuffer(l).then(p=>{const b=new Uint8Array(p);s.set(b,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,r)})}decryptAacSamples(e,t,r){for(;;t++){if(t>=e.length){r();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,r),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,r=new Int8Array(t);let s=0;for(let a=32;a<e.length-16;a+=160,s+=16)r.set(e.subarray(a,a+16),s);return r}getAvcDecryptedUnit(e,t){const r=new Uint8Array(t);let s=0;for(let a=32;a<e.length-16;a+=160,s+=16)e.set(r.subarray(s,s+16),a);return e}decryptAvcSample(e,t,r,s,a){const l=zr(a.data),p=this.getAvcEncryptedData(l);this.decryptBuffer(p.buffer).then(b=>{a.data=this.getAvcDecryptedUnit(l,b),this.decrypter.isSync()||this.decryptAvcSamples(e,t,r+1,s)})}decryptAvcSamples(e,t,r,s){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,r=0){if(t>=e.length){s();return}const a=e[t].units;for(;!(r>=a.length);r++){const l=a[r];if(!(l.data.length<=48||l.type!==1&&l.type!==5)&&(this.decryptAvcSample(e,t,r,s,l),!this.decrypter.isSync()))return}}}}const oi=188;class Tn{constructor(e,t,r){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._duration=0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=r,this.videoParser=new Za}static probe(e){const t=Tn.syncOffset(e);return t>0&&x.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`),t!==-1}static syncOffset(e){const t=e.length;let r=Math.min(oi*5,t-oi)+1,s=0;for(;s<r;){let a=!1,l=-1,p=0;for(let b=s;b<t;b+=oi)if(e[b]===71&&(t-b===oi||e[b+oi]===71)){if(p++,l===-1&&(l=b,l!==0&&(r=Math.min(l+oi*99,e.length-oi)+1)),a||(a=xs(e,b)===0),a&&p>1&&(l===0&&p>2||b+oi>r))return l}else{if(p)return-1;break}s++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:kt[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,r,s){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=Tn.createTrack("video"),this._audioTrack=Tn.createTrack("audio",s),this._id3Track=Tn.createTrack("id3"),this._txtTrack=Tn.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=r,this._duration=s}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:r}=this;e&&(e.pesData=null),t&&(t.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,r=!1,s=!1){r||(this.sampleAes=null);let a;const l=this._videoTrack,p=this._audioTrack,b=this._id3Track,A=this._txtTrack;let M=l.pid,W=l.pesData,ee=p.pid,le=b.pid,oe=p.pesData,he=b.pesData,me=null,De=this.pmtParsed,We=this._pmtId,je=e.length;if(this.remainderData&&(e=St(this.remainderData,e),je=e.length,this.remainderData=null),je<oi&&!s)return this.remainderData=e,{audioTrack:p,videoTrack:l,id3Track:b,textTrack:A};const ot=Math.max(0,Tn.syncOffset(e));je-=(je-ot)%oi,je<e.byteLength&&!s&&(this.remainderData=new Uint8Array(e.buffer,je,e.buffer.byteLength-je));let Ye=0;for(let at=ot;at<je;at+=oi)if(e[at]===71){const Ct=!!(e[at+1]&64),Bt=xs(e,at),ct=(e[at+3]&48)>>4;let At;if(ct>1){if(At=at+5+e[at+4],At===at+oi)continue}else At=at+4;switch(Bt){case M:Ct&&(W&&(a=Nn(W))&&this.videoParser.parseAVCPES(l,A,a,!1,this._duration),W={data:[],size:0}),W&&(W.data.push(e.subarray(At,at+oi)),W.size+=at+oi-At);break;case ee:if(Ct){if(oe&&(a=Nn(oe)))switch(p.segmentCodec){case"aac":this.parseAACPES(p,a);break;case"mp3":this.parseMPEGPES(p,a);break;case"ac3":this.parseAC3PES(p,a);break}oe={data:[],size:0}}oe&&(oe.data.push(e.subarray(At,at+oi)),oe.size+=at+oi-At);break;case le:Ct&&(he&&(a=Nn(he))&&this.parseID3PES(b,a),he={data:[],size:0}),he&&(he.data.push(e.subarray(At,at+oi)),he.size+=at+oi-At);break;case 0:Ct&&(At+=e[At]+1),We=this._pmtId=Xa(e,At);break;case We:{Ct&&(At+=e[At]+1);const or=Sa(e,At,this.typeSupported,r,this.observer);M=or.videoPid,M>0&&(l.pid=M,l.segmentCodec=or.segmentVideoCodec),ee=or.audioPid,ee>0&&(p.pid=ee,p.segmentCodec=or.segmentAudioCodec),le=or.id3Pid,le>0&&(b.pid=le),me!==null&&!De&&(x.warn(`MPEG-TS PMT found at ${at} after unknown PID '${me}'. Backtracking to sync byte @${ot} to parse all TS packets.`),me=null,at=ot-188),De=this.pmtParsed=!0;break}case 17:case 8191:break;default:me=Bt;break}}else Ye++;Ye>0&&Ss(this.observer,new Error(`Found ${Ye} TS packet/s that do not start with 0x47`)),l.pesData=W,p.pesData=oe,b.pesData=he;const pt={audioTrack:p,videoTrack:l,id3Track:b,textTrack:A};return s&&this.extractRemainingSamples(pt),pt}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:r,id3Track:s,textTrack:a}=e,l=r.pesData,p=t.pesData,b=s.pesData;let A;if(l&&(A=Nn(l))?(this.videoParser.parseAVCPES(r,a,A,!0,this._duration),r.pesData=null):r.pesData=l,p&&(A=Nn(p))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,A);break;case"mp3":this.parseMPEGPES(t,A);break;case"ac3":this.parseAC3PES(t,A);break}t.pesData=null}else p!=null&&p.size&&x.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=p;b&&(A=Nn(b))?(this.parseID3PES(s,A),s.pesData=null):s.pesData=b}demuxSampleAes(e,t,r){const s=this.demux(e,r,!0,!this.config.progressive),a=this.sampleAes=new Vs(this.observer,this.config,t);return this.decrypt(s,a)}decrypt(e,t){return new Promise(r=>{const{audioTrack:s,videoTrack:a}=e;s.samples&&s.segmentCodec==="aac"?t.decryptAacSamples(s.samples,0,()=>{a.samples?t.decryptAvcSamples(a.samples,0,0,()=>{r(e)}):r(e)}):a.samples&&t.decryptAvcSamples(a.samples,0,0,()=>{r(e)})})}destroy(){this._duration=0}parseAACPES(e,t){let r=0;const s=this.aacOverFlow;let a=t.data;if(s){this.aacOverFlow=null;const W=s.missing,ee=s.sample.unit.byteLength;if(W===-1)a=St(s.sample.unit,a);else{const le=ee-W;s.sample.unit.set(a.subarray(0,W),le),e.samples.push(s.sample),r=s.missing}}let l,p;for(l=r,p=a.length;l<p-1&&!mn(a,l);l++);if(l!==r){let W;const ee=l<p-1;if(ee?W=`AAC PES did not start with ADTS header,offset:${l}`:W="No ADTS header found in AAC PES",Ss(this.observer,new Error(W),ee),!ee)return}pa(e,this.observer,a,l,this.audioCodec);let b;if(t.pts!==void 0)b=t.pts;else if(s){const W=$s(e.samplerate);b=s.sample.pts+W}else{x.warn("[tsdemuxer]: AAC PES unknown PTS");return}let A=0,M;for(;l<p;)if(M=js(e,a,l,b,A),l+=M.length,M.missing){this.aacOverFlow=M;break}else for(A++;l<p-1&&!mn(a,l);l++);}parseMPEGPES(e,t){const r=t.data,s=r.length;let a=0,l=0;const p=t.pts;if(p===void 0){x.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;l<s;)if(Ws(r,l)){const b=vs(e,r,l,p,a);if(b)l+=b.length,a++;else break}else l++}parseAC3PES(e,t){{const r=t.data,s=t.pts;if(s===void 0){x.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const a=r.length;let l=0,p=0,b;for(;p<a&&(b=Ks(e,r,p,s,l++))>0;)p+=b}}parseID3PES(e,t){if(t.pts===void 0){x.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const r=i({},t,{type:this._videoTrack?di.emsg:di.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(r)}}function xs(c,e){return((c[e+1]&31)<<8)+c[e+2]}function Xa(c,e){return(c[e+10]&31)<<8|c[e+11]}function Sa(c,e,t,r,s){const a={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},l=(c[e+1]&15)<<8|c[e+2],p=e+3+l-4,b=(c[e+10]&15)<<8|c[e+11];for(e+=12+b;e<p;){const A=xs(c,e),M=(c[e+3]&15)<<8|c[e+4];switch(c[e]){case 207:if(!r){xe("ADTS AAC");break}case 15:a.audioPid===-1&&(a.audioPid=A);break;case 21:a.id3Pid===-1&&(a.id3Pid=A);break;case 219:if(!r){xe("H.264");break}case 27:a.videoPid===-1&&(a.videoPid=A,a.segmentVideoCodec="avc");break;case 3:case 4:!t.mpeg&&!t.mp3?x.log("MPEG audio found, not supported in this browser"):a.audioPid===-1&&(a.audioPid=A,a.segmentAudioCodec="mp3");break;case 193:if(!r){xe("AC-3");break}case 129:t.ac3?a.audioPid===-1&&(a.audioPid=A,a.segmentAudioCodec="ac3"):x.log("AC-3 audio found, not supported in this browser");break;case 6:if(a.audioPid===-1&&M>0){let W=e+5,ee=M;for(;ee>2;){switch(c[W]){case 106:t.ac3!==!0?x.log("AC-3 audio found, not supported in this browser for now"):(a.audioPid=A,a.segmentAudioCodec="ac3");break}const oe=c[W+1]+2;W+=oe,ee-=oe}}break;case 194:case 135:return Ss(s,new Error("Unsupported EC-3 in M2TS found")),a;case 36:return Ss(s,new Error("Unsupported HEVC in M2TS found")),a}e+=M+5}return a}function Ss(c,e,t){x.warn(`parsing error: ${e.message}`),c.emit(n.ERROR,n.ERROR,{type:o.MEDIA_ERROR,details:u.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function xe(c){x.log(`${c} with AES-128-CBC encryption found in unencrypted stream`)}function Nn(c){let e=0,t,r,s,a,l;const p=c.data;if(!c||c.size===0)return null;for(;p[0].length<19&&p.length>1;)p[0]=St(p[0],p[1]),p.splice(1,1);if(t=p[0],(t[0]<<16)+(t[1]<<8)+t[2]===1){if(r=(t[4]<<8)+t[5],r&&r>c.size-6)return null;const A=t[7];A&192&&(a=(t[9]&14)*536870912+(t[10]&255)*4194304+(t[11]&254)*16384+(t[12]&255)*128+(t[13]&254)/2,A&64?(l=(t[14]&14)*536870912+(t[15]&255)*4194304+(t[16]&254)*16384+(t[17]&255)*128+(t[18]&254)/2,a-l>60*9e4&&(x.warn(`${Math.round((a-l)/9e4)}s delta between PTS and DTS, align them`),a=l)):l=a),s=t[8];let M=s+9;if(c.size<=M)return null;c.size-=M;const W=new Uint8Array(c.size);for(let ee=0,le=p.length;ee<le;ee++){t=p[ee];let oe=t.byteLength;if(M)if(M>oe){M-=oe;continue}else t=t.subarray(M),oe-=M,M=0;W.set(t,e),e+=oe}return r&&(r-=s+3),{data:W,pts:a,dts:l,len:r}}return null}class qs extends ms{resetInitSegment(e,t,r,s){super.resetInitSegment(e,t,r,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=it(e,0);let r=(t==null?void 0:t.length)||0;if(t&&e[r]===11&&e[r+1]===119&&ye(t)!==void 0&&qn(e,r)<=16)return!1;for(let s=e.length;r<s;r++)if(va(e,r))return x.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return _a(e,t)}appendFrame(e,t,r){if(this.basePTS!==null)return vs(e,t,r,this.basePTS,this.frameIndex)}}class ws{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 gn=Math.pow(2,32)-1;class Je{static init(){Je.types={avc1:[],avcC:[],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 Je.types)Je.types.hasOwnProperty(e)&&(Je.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);Je.HDLR_TYPES={video:t,audio:r};const s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);Je.STTS=Je.STSC=Je.STCO=a,Je.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Je.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Je.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Je.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const l=new Uint8Array([105,115,111,109]),p=new Uint8Array([97,118,99,49]),b=new Uint8Array([0,0,0,1]);Je.FTYP=Je.box(Je.types.ftyp,l,b,l,p),Je.DINF=Je.box(Je.types.dinf,Je.box(Je.types.dref,s))}static box(e,...t){let r=8,s=t.length;const a=s;for(;s--;)r+=t[s].byteLength;const l=new Uint8Array(r);for(l[0]=r>>24&255,l[1]=r>>16&255,l[2]=r>>8&255,l[3]=r&255,l.set(e,4),s=0,r=8;s<a;s++)l.set(t[s],r),r+=t[s].byteLength;return l}static hdlr(e){return Je.box(Je.types.hdlr,Je.HDLR_TYPES[e])}static mdat(e){return Je.box(Je.types.mdat,e)}static mdhd(e,t){t*=e;const r=Math.floor(t/(gn+1)),s=Math.floor(t%(gn+1));return Je.box(Je.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,r>>24,r>>16&255,r>>8&255,r&255,s>>24,s>>16&255,s>>8&255,s&255,85,196,0,0]))}static mdia(e){return Je.box(Je.types.mdia,Je.mdhd(e.timescale,e.duration),Je.hdlr(e.type),Je.minf(e))}static mfhd(e){return Je.box(Je.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"?Je.box(Je.types.minf,Je.box(Je.types.smhd,Je.SMHD),Je.DINF,Je.stbl(e)):Je.box(Je.types.minf,Je.box(Je.types.vmhd,Je.VMHD),Je.DINF,Je.stbl(e))}static moof(e,t,r){return Je.box(Je.types.moof,Je.mfhd(e),Je.traf(r,t))}static moov(e){let t=e.length;const r=[];for(;t--;)r[t]=Je.trak(e[t]);return Je.box.apply(null,[Je.types.moov,Je.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(Je.mvex(e)))}static mvex(e){let t=e.length;const r=[];for(;t--;)r[t]=Je.trex(e[t]);return Je.box.apply(null,[Je.types.mvex,...r])}static mvhd(e,t){t*=e;const r=Math.floor(t/(gn+1)),s=Math.floor(t%(gn+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,r>>24,r>>16&255,r>>8&255,r&255,s>>24,s>>16&255,s>>8&255,s&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 Je.box(Je.types.mvhd,a)}static sdtp(e){const t=e.samples||[],r=new Uint8Array(4+t.length);let s,a;for(s=0;s<t.length;s++)a=t[s].flags,r[s+4]=a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy;return Je.box(Je.types.sdtp,r)}static stbl(e){return Je.box(Je.types.stbl,Je.stsd(e),Je.box(Je.types.stts,Je.STTS),Je.box(Je.types.stsc,Je.STSC),Je.box(Je.types.stsz,Je.STSZ),Je.box(Je.types.stco,Je.STCO))}static avc1(e){let t=[],r=[],s,a,l;for(s=0;s<e.sps.length;s++)a=e.sps[s],l=a.byteLength,t.push(l>>>8&255),t.push(l&255),t=t.concat(Array.prototype.slice.call(a));for(s=0;s<e.pps.length;s++)a=e.pps[s],l=a.byteLength,r.push(l>>>8&255),r.push(l&255),r=r.concat(Array.prototype.slice.call(a));const p=Je.box(Je.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(r))),b=e.width,A=e.height,M=e.pixelRatio[0],W=e.pixelRatio[1];return Je.box(Je.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,b>>8&255,b&255,A>>8&255,A&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]),p,Je.box(Je.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Je.box(Je.types.pasp,new Uint8Array([M>>24,M>>16&255,M>>8&255,M&255,W>>24,W>>16&255,W>>8&255,W&255])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static audioStsd(e){const t=e.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return Je.box(Je.types.mp4a,Je.audioStsd(e),Je.box(Je.types.esds,Je.esds(e)))}static mp3(e){return Je.box(Je.types[".mp3"],Je.audioStsd(e))}static ac3(e){return Je.box(Je.types["ac-3"],Je.audioStsd(e),Je.box(Je.types.dac3,e.config))}static stsd(e){return e.type==="audio"?e.segmentCodec==="mp3"&&e.codec==="mp3"?Je.box(Je.types.stsd,Je.STSD,Je.mp3(e)):e.segmentCodec==="ac3"?Je.box(Je.types.stsd,Je.STSD,Je.ac3(e)):Je.box(Je.types.stsd,Je.STSD,Je.mp4a(e)):Je.box(Je.types.stsd,Je.STSD,Je.avc1(e))}static tkhd(e){const t=e.id,r=e.duration*e.timescale,s=e.width,a=e.height,l=Math.floor(r/(gn+1)),p=Math.floor(r%(gn+1));return Je.box(Je.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,l>>24,l>>16&255,l>>8&255,l&255,p>>24,p>>16&255,p>>8&255,p&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,s>>8&255,s&255,0,0,a>>8&255,a&255,0,0]))}static traf(e,t){const r=Je.sdtp(e),s=e.id,a=Math.floor(t/(gn+1)),l=Math.floor(t%(gn+1));return Je.box(Je.types.traf,Je.box(Je.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255])),Je.box(Je.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,a&255,l>>24,l>>16&255,l>>8&255,l&255])),Je.trun(e,r.length+16+20+8+16+8+8),r)}static trak(e){return e.duration=e.duration||4294967295,Je.box(Je.types.trak,Je.tkhd(e),Je.mdia(e))}static trex(e){const t=e.id;return Je.box(Je.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const r=e.samples||[],s=r.length,a=12+16*s,l=new Uint8Array(a);let p,b,A,M,W,ee;for(t+=8+a,l.set([e.type==="video"?1:0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,s&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),p=0;p<s;p++)b=r[p],A=b.duration,M=b.size,W=b.flags,ee=b.cts,l.set([A>>>24&255,A>>>16&255,A>>>8&255,A&255,M>>>24&255,M>>>16&255,M>>>8&255,M&255,W.isLeading<<2|W.dependsOn,W.isDependedOn<<6|W.hasRedundancy<<4|W.paddingValue<<1|W.isNonSync,W.degradPrio&61440,W.degradPrio&15,ee>>>24&255,ee>>>16&255,ee>>>8&255,ee&255],12+16*p);return Je.box(Je.types.trun,l)}static initSegment(e){Je.types||Je.init();const t=Je.moov(e);return St(Je.FTYP,t)}}Je.types=void 0,Je.HDLR_TYPES=void 0,Je.STTS=void 0,Je.STSC=void 0,Je.STCO=void 0,Je.STSZ=void 0,Je.VMHD=void 0,Je.SMHD=void 0,Je.STSD=void 0,Je.FTYP=void 0,Je.DINF=void 0;const Ys=9e4;function Es(c,e,t=1,r=!1){const s=c*e*t;return r?Math.round(s):s}function Ja(c,e,t=1,r=!1){return Es(c,e,1/t,r)}function Yn(c,e=!1){return Es(c,1e3,1/Ys,e)}function wa(c,e=1){return Es(c,Ys,1/e)}const Cs=10*1e3,Ea=1024,Zs=1152,Ca=1536;let Zn=null,Xs=null;class as{constructor(e,t,r,s=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=r,this.ISGenerated=!1,Zn===null){const l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Zn=l?parseInt(l[1]):0}if(Xs===null){const a=navigator.userAgent.match(/Safari\/(\d+)/i);Xs=a?parseInt(a[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){x.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){x.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){x.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const r=e[0].pts,s=e.reduce((a,l)=>{let p=l.pts,b=p-a;return b<-4294967296&&(t=!0,p=Di(p,r),b=p-a),b>0?a:p},r);return t&&x.debug("PTS rollover detected"),s}remux(e,t,r,s,a,l,p,b){let A,M,W,ee,le,oe,he=a,me=a;const De=e.pid>-1,We=t.pid>-1,je=t.samples.length,ot=e.samples.length>0,Ye=p&&je>0||je>1;if((!De||ot)&&(!We||Ye)||this.ISGenerated||p){if(this.ISGenerated){var at,Ct,Bt,ct;const ar=this.videoTrackConfig;ar&&(t.width!==ar.width||t.height!==ar.height||((at=t.pixelRatio)==null?void 0:at[0])!==((Ct=ar.pixelRatio)==null?void 0:Ct[0])||((Bt=t.pixelRatio)==null?void 0:Bt[1])!==((ct=ar.pixelRatio)==null?void 0:ct[1]))&&this.resetInitSegment()}else W=this.generateIS(e,t,a,l);const At=this.isVideoContiguous;let or=-1,$t;if(Ye&&(or=Qa(t.samples),!At&&this.config.forceKeyFrameOnDiscontinuity))if(oe=!0,or>0){x.warn(`[mp4-remuxer]: Dropped ${or} out of ${je} video samples due to a missing keyframe`);const ar=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(or),t.dropped+=or,me+=(t.samples[0].pts-ar)/t.inputTimeScale,$t=me}else or===-1&&(x.warn(`[mp4-remuxer]: No keyframe found out of ${je} video samples`),oe=!1);if(this.ISGenerated){if(ot&&Ye){const ar=this.getVideoStartPts(t.samples),Jt=(Di(e.samples[0].pts,ar)-ar)/t.inputTimeScale;he+=Math.max(0,Jt),me+=Math.max(0,-Jt)}if(ot){if(e.samplerate||(x.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),W=this.generateIS(e,t,a,l)),M=this.remuxAudio(e,he,this.isAudioContiguous,l,We||Ye||b===Ue.AUDIO?me:void 0),Ye){const ar=M?M.endPTS-M.startPTS:0;t.inputTimeScale||(x.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),W=this.generateIS(e,t,a,l)),A=this.remuxVideo(t,me,At,ar)}}else Ye&&(A=this.remuxVideo(t,me,At,0));A&&(A.firstKeyFrame=or,A.independent=or!==-1,A.firstKeyFramePTS=$t)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(le=Aa(r,a,this._initPTS,this._initDTS)),s.samples.length&&(ee=eo(s,a,this._initPTS))),{audio:M,video:A,initSegment:W,independent:oe,text:ee,id3:le}}generateIS(e,t,r,s){const a=e.samples,l=t.samples,p=this.typeSupported,b={},A=this._initPTS;let M=!A||s,W="audio/mp4",ee,le,oe;if(M&&(ee=le=1/0),e.config&&a.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":p.mpeg?(W="audio/mpeg",e.codec=""):p.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}b.audio={id:"audio",container:W,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&p.mpeg?new Uint8Array(0):Je.initSegment([e]),metadata:{channelCount:e.channelCount}},M&&(oe=e.inputTimeScale,!A||oe!==A.timescale?ee=le=a[0].pts-Math.round(oe*r):M=!1)}if(t.sps&&t.pps&&l.length){if(t.timescale=t.inputTimeScale,b.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Je.initSegment([t]),metadata:{width:t.width,height:t.height}},M)if(oe=t.inputTimeScale,!A||oe!==A.timescale){const he=this.getVideoStartPts(l),me=Math.round(oe*r);le=Math.min(le,Di(l[0].dts,he)-me),ee=Math.min(ee,he-me)}else M=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(b).length)return this.ISGenerated=!0,M?(this._initPTS={baseTime:ee,timescale:oe},this._initDTS={baseTime:le,timescale:oe}):ee=oe=void 0,{tracks:b,initPTS:ee,timescale:oe}}remuxVideo(e,t,r,s){const a=e.inputTimeScale,l=e.samples,p=[],b=l.length,A=this._initPTS;let M=this.nextAvcDts,W=8,ee=this.videoSampleDuration,le,oe,he=Number.POSITIVE_INFINITY,me=Number.NEGATIVE_INFINITY,De=!1;if(!r||M===null){const Vt=t*a,jt=l[0].pts-Di(l[0].dts,l[0].pts);Zn&&M!==null&&Math.abs(Vt-jt-M)<15e3?r=!0:M=Vt-jt}const We=A.baseTime*a/A.timescale;for(let Vt=0;Vt<b;Vt++){const jt=l[Vt];jt.pts=Di(jt.pts-We,M),jt.dts=Di(jt.dts-We,M),jt.dts<l[Vt>0?Vt-1:Vt].dts&&(De=!0)}De&&l.sort(function(Vt,jt){const Dr=Vt.dts-jt.dts,gr=Vt.pts-jt.pts;return Dr||gr}),le=l[0].dts,oe=l[l.length-1].dts;const je=oe-le,ot=je?Math.round(je/(b-1)):ee||e.inputTimeScale/30;if(r){const Vt=le-M,jt=Vt>ot,Dr=Vt<-1;if((jt||Dr)&&(jt?x.warn(`AVC: ${Yn(Vt,!0)} ms (${Vt}dts) hole between fragments detected at ${t.toFixed(3)}`):x.warn(`AVC: ${Yn(-Vt,!0)} ms (${Vt}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Dr||M>=l[0].pts||Zn)){le=M;const gr=l[0].pts-Vt;if(jt)l[0].dts=le,l[0].pts=gr;else for(let Br=0;Br<l.length&&!(l[Br].dts>gr);Br++)l[Br].dts-=Vt,l[Br].pts-=Vt;x.log(`Video: Initial PTS/DTS adjusted: ${Yn(gr,!0)}/${Yn(le,!0)}, delta: ${Yn(Vt,!0)} ms`)}}le=Math.max(0,le);let Ye=0,pt=0,at=le;for(let Vt=0;Vt<b;Vt++){const jt=l[Vt],Dr=jt.units,gr=Dr.length;let Br=0;for(let li=0;li<gr;li++)Br+=Dr[li].data.length;pt+=Br,Ye+=gr,jt.length=Br,jt.dts<at?(jt.dts=at,at+=ot/4|0||1):at=jt.dts,he=Math.min(jt.pts,he),me=Math.max(jt.pts,me)}oe=l[b-1].dts;const Ct=pt+4*Ye+8;let Bt;try{Bt=new Uint8Array(Ct)}catch(Vt){this.observer.emit(n.ERROR,n.ERROR,{type:o.MUX_ERROR,details:u.REMUX_ALLOC_ERROR,fatal:!1,error:Vt,bytes:Ct,reason:`fail allocating video mdat ${Ct}`});return}const ct=new DataView(Bt.buffer);ct.setUint32(0,Ct),Bt.set(Je.types.mdat,4);let At=!1,or=Number.POSITIVE_INFINITY,$t=Number.POSITIVE_INFINITY,ar=Number.NEGATIVE_INFINITY,nr=Number.NEGATIVE_INFINITY;for(let Vt=0;Vt<b;Vt++){const jt=l[Vt],Dr=jt.units;let gr=0;for(let bi=0,Ci=Dr.length;bi<Ci;bi++){const sn=Dr[bi],ta=sn.data,bo=sn.data.byteLength;ct.setUint32(W,bo),W+=4,Bt.set(ta,W),W+=bo,gr+=4+bo}let Br;if(Vt<b-1)ee=l[Vt+1].dts-jt.dts,Br=l[Vt+1].pts-jt.pts;else{const bi=this.config,Ci=Vt>0?jt.dts-l[Vt-1].dts:ot;if(Br=Vt>0?jt.pts-l[Vt-1].pts:ot,bi.stretchShortVideoTrack&&this.nextAudioPts!==null){const sn=Math.floor(bi.maxBufferHole*a),ta=(s?he+s*a:this.nextAudioPts)-jt.pts;ta>sn?(ee=ta-Ci,ee<0?ee=Ci:At=!0,x.log(`[mp4-remuxer]: It is approximately ${ta/90} ms to the next segment; using duration ${ee/90} ms for the last video frame.`)):ee=Ci}else ee=Ci}const li=Math.round(jt.pts-jt.dts);or=Math.min(or,ee),ar=Math.max(ar,ee),$t=Math.min($t,Br),nr=Math.max(nr,Br),p.push(new Q(jt.key,ee,gr,li))}if(p.length){if(Zn){if(Zn<70){const Vt=p[0].flags;Vt.dependsOn=2,Vt.isNonSync=0}}else if(Xs&&nr-$t<ar-or&&ot/ar<.025&&p[0].cts===0){x.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Vt=le;for(let jt=0,Dr=p.length;jt<Dr;jt++){const gr=Vt+p[jt].duration,Br=Vt+p[jt].cts;if(jt<Dr-1){const li=gr+p[jt+1].cts;p[jt].duration=li-Br}else p[jt].duration=jt?p[jt-1].duration:ot;p[jt].cts=0,Vt=gr}}}ee=At||!ee?ot:ee,this.nextAvcDts=M=oe+ee,this.videoSampleDuration=ee,this.isVideoContiguous=!0;const Ur={data1:Je.moof(e.sequenceNumber++,le,i({},e,{samples:p})),data2:Bt,startPTS:he/a,endPTS:(me+ee)/a,startDTS:le/a,endDTS:M/a,type:"video",hasAudio:!1,hasVideo:!0,nb:p.length,dropped:e.dropped};return e.samples=[],e.dropped=0,Ur}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Zs;case"ac3":return Ca;default:return Ea}}remuxAudio(e,t,r,s,a){const l=e.inputTimeScale,p=e.samplerate?e.samplerate:l,b=l/p,A=this.getSamplesPerFrame(e),M=A*b,W=this._initPTS,ee=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,le=[],oe=a!==void 0;let he=e.samples,me=ee?0:8,De=this.nextAudioPts||-1;const We=t*l,je=W.baseTime*l/W.timescale;if(this.isAudioContiguous=r=r||he.length&&De>0&&(s&&Math.abs(We-De)<9e3||Math.abs(Di(he[0].pts-je,We)-De)<20*M),he.forEach(function(Jt){Jt.pts=Di(Jt.pts-je,We)}),!r||De<0){if(he=he.filter(Jt=>Jt.pts>=0),!he.length)return;a===0?De=0:s&&!oe?De=Math.max(0,We):De=he[0].pts}if(e.segmentCodec==="aac"){const Jt=this.config.maxAudioFramesDrift;for(let Er=0,Ur=De;Er<he.length;Er++){const Vt=he[Er],jt=Vt.pts,Dr=jt-Ur,gr=Math.abs(1e3*Dr/l);if(Dr<=-Jt*M&&oe)Er===0&&(x.warn(`Audio frame @ ${(jt/l).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*Dr/l)} ms.`),this.nextAudioPts=De=Ur=jt);else if(Dr>=Jt*M&&gr<Cs&&oe){let Br=Math.round(Dr/M);Ur=jt-Br*M,Ur<0&&(Br--,Ur+=M),Er===0&&(this.nextAudioPts=De=Ur),x.warn(`[mp4-remuxer]: Injecting ${Br} audio frame @ ${(Ur/l).toFixed(3)}s due to ${Math.round(1e3*Dr/l)} ms gap.`);for(let li=0;li<Br;li++){const bi=Math.max(Ur,0);let Ci=ws.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);Ci||(x.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Ci=Vt.unit.subarray()),he.splice(Er,0,{unit:Ci,pts:bi}),Ur+=M,Er++}}Vt.pts=Ur,Ur+=M}}let ot=null,Ye=null,pt,at=0,Ct=he.length;for(;Ct--;)at+=he[Ct].unit.byteLength;for(let Jt=0,Er=he.length;Jt<Er;Jt++){const Ur=he[Jt],Vt=Ur.unit;let jt=Ur.pts;if(Ye!==null){const gr=le[Jt-1];gr.duration=Math.round((jt-Ye)/b)}else if(r&&e.segmentCodec==="aac"&&(jt=De),ot=jt,at>0){at+=me;try{pt=new Uint8Array(at)}catch(gr){this.observer.emit(n.ERROR,n.ERROR,{type:o.MUX_ERROR,details:u.REMUX_ALLOC_ERROR,fatal:!1,error:gr,bytes:at,reason:`fail allocating audio mdat ${at}`});return}ee||(new DataView(pt.buffer).setUint32(0,at),pt.set(Je.types.mdat,4))}else return;pt.set(Vt,me);const Dr=Vt.byteLength;me+=Dr,le.push(new Q(!0,A,Dr,0)),Ye=jt}const Bt=le.length;if(!Bt)return;const ct=le[le.length-1];this.nextAudioPts=De=Ye+b*ct.duration;const At=ee?new Uint8Array(0):Je.moof(e.sequenceNumber++,ot/b,i({},e,{samples:le}));e.samples=[];const or=ot/l,$t=De/l,nr={data1:At,data2:pt,startPTS:or,endPTS:$t,startDTS:or,endDTS:$t,type:"audio",hasAudio:!0,hasVideo:!1,nb:Bt};return this.isAudioContiguous=!0,nr}remuxEmptyAudio(e,t,r,s){const a=e.inputTimeScale,l=e.samplerate?e.samplerate:a,p=a/l,b=this.nextAudioPts,A=this._initDTS,M=A.baseTime*9e4/A.timescale,W=(b!==null?b:s.startDTS*a)+M,ee=s.endDTS*a+M,le=p*Ea,oe=Math.ceil((ee-W)/le),he=ws.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(x.warn("[mp4-remuxer]: remux empty Audio"),!he){x.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}const me=[];for(let De=0;De<oe;De++){const We=W+De*le;me.push({unit:he,pts:We,dts:We})}return e.samples=me,this.remuxAudio(e,t,r,!1)}}function Di(c,e){let t;if(e===null)return c;for(e<c?t=-8589934592:t=8589934592;Math.abs(c-e)>4294967296;)c+=t;return c}function Qa(c){for(let e=0;e<c.length;e++)if(c[e].key)return e;return-1}function Aa(c,e,t,r){const s=c.samples.length;if(!s)return;const a=c.inputTimeScale;for(let p=0;p<s;p++){const b=c.samples[p];b.pts=Di(b.pts-t.baseTime*a/t.timescale,e*a)/a,b.dts=Di(b.dts-r.baseTime*a/r.timescale,e*a)/a}const l=c.samples;return c.samples=[],{samples:l}}function eo(c,e,t){const r=c.samples.length;if(!r)return;const s=c.inputTimeScale;for(let l=0;l<r;l++){const p=c.samples[l];p.pts=Di(p.pts-t.baseTime*s/t.timescale,e*s)/s}c.samples.sort((l,p)=>l.pts-p.pts);const a=c.samples;return c.samples=[],{samples:a}}class Q{constructor(e,t,r,s){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=r,this.cts=s,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}class d{constructor(){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}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,r,s){this.audioCodec=t,this.videoCodec=r,this.generateInitSegment(ne(e,s)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:r}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const s=this.initData=Ne(e);s.audio&&(t=g(s.audio,se.AUDIO)),s.video&&(r=g(s.video,se.VIDEO));const a={};s.audio&&s.video?a.audiovideo={container:"video/mp4",codec:t+","+r,initSegment:e,id:"main"}:s.audio?a.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:s.video?a.video={container:"video/mp4",codec:r,initSegment:e,id:"main"}:x.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a}remux(e,t,r,s,a,l){var p,b;let{initPTS:A,lastEndTime:M}=this;const W={audio:void 0,video:void 0,text:s,id3:r,initSegment:void 0};v(M)||(M=this.lastEndTime=a||0);const ee=t.samples;if(!(ee!=null&&ee.length))return W;const le={initPTS:void 0,timescale:1};let oe=this.initData;if((p=oe)!=null&&p.length||(this.generateInitSegment(ee),oe=this.initData),!((b=oe)!=null&&b.length))return x.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),W;this.emitInitSegment&&(le.tracks=this.initTracks,this.emitInitSegment=!1);const he=Dt(ee,oe),me=Se(oe,ee),De=me===null?a:me;(m(A,De,a,he)||le.timescale!==A.timescale&&l)&&(le.initPTS=De-a,A&&A.timescale===1&&x.warn(`Adjusting initPTS by ${le.initPTS-A.baseTime}`),this.initPTS=A={baseTime:le.initPTS,timescale:1});const We=e?De-A.baseTime/A.timescale:M,je=We+he;Ht(oe,ee,A.baseTime/A.timescale),he>0?this.lastEndTime=je:(x.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const ot=!!oe.audio,Ye=!!oe.video;let pt="";ot&&(pt+="audio"),Ye&&(pt+="video");const at={data1:ee,startPTS:We,startDTS:We,endPTS:je,endDTS:je,type:pt,hasAudio:ot,hasVideo:Ye,nb:1,dropped:0};return W.audio=at.type==="audio"?at:void 0,W.video=at.type!=="audio"?at:void 0,W.initSegment=le,W.id3=Aa(r,a,A,A),s.samples.length&&(W.text=eo(s,a,A)),W}}function m(c,e,t,r){if(c===null)return!0;const s=Math.max(r,1),a=e-c.baseTime/c.timescale;return Math.abs(a-t)>s}function g(c,e){const t=c==null?void 0:c.codec;if(t&&t.length>4)return t;if(e===se.AUDIO){if(t==="ec-3"||t==="ac-3"||t==="alac")return t;if(t==="fLaC"||t==="Opus")return Lr(t,!1);const r="mp4a.40.5";return x.info(`Parsed audio codec "${t}" or audio object type not handled. Using "${r}"`),r}return x.warn(`Unhandled video codec "${t}"`),t==="hvc1"||t==="hev1"?"hvc1.1.6.L120.90":t==="av01"?"av01.0.04M.08":"avc1.42e01e"}let w;try{w=self.performance.now.bind(self.performance)}catch(c){x.debug("Unable to use Performance API on this environment"),w=$e==null?void 0:$e.Date.now}const q=[{demux:qa,remux:d},{demux:Tn,remux:as},{demux:ya,remux:as},{demux:qs,remux:as}];q.splice(2,0,{demux:Gs,remux:as});class X{constructor(e,t,r,s,a){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=r,this.vendor=s,this.id=a}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,r,s){const a=r.transmuxing;a.executeStart=w();let l=new Uint8Array(e);const{currentTransmuxState:p,transmuxConfig:b}=this;s&&(this.currentTransmuxState=s);const{contiguous:A,discontinuity:M,trackSwitch:W,accurateTimeOffset:ee,timeOffset:le,initSegmentChange:oe}=s||p,{audioCodec:he,videoCodec:me,defaultInitPts:De,duration:We,initSegmentData:je}=b,ot=fe(l,t);if(ot&&ot.method==="AES-128"){const Ct=this.getDecrypter();if(Ct.isSync()){let Bt=Ct.softwareDecrypt(l,ot.key.buffer,ot.iv.buffer);if(r.part>-1&&(Bt=Ct.flush()),!Bt)return a.executeEnd=w(),ve(r);l=new Uint8Array(Bt)}else return this.decryptionPromise=Ct.webCryptoDecrypt(l,ot.key.buffer,ot.iv.buffer).then(Bt=>{const ct=this.push(Bt,null,r);return this.decryptionPromise=null,ct}),this.decryptionPromise}const Ye=this.needsProbing(M,W);if(Ye){const Ct=this.configureTransmuxer(l);if(Ct)return x.warn(`[transmuxer] ${Ct.message}`),this.observer.emit(n.ERROR,n.ERROR,{type:o.MEDIA_ERROR,details:u.FRAG_PARSING_ERROR,fatal:!1,error:Ct,reason:Ct.message}),a.executeEnd=w(),ve(r)}(M||W||oe||Ye)&&this.resetInitSegment(je,he,me,We,t),(M||oe||Ye)&&this.resetInitialTimestamp(De),A||this.resetContiguity();const pt=this.transmux(l,ot,le,ee,r),at=this.currentTransmuxState;return at.contiguous=!0,at.discontinuity=!1,at.trackSwitch=!1,a.executeEnd=w(),pt}flush(e){const t=e.transmuxing;t.executeStart=w();const{decrypter:r,currentTransmuxState:s,decryptionPromise:a}=this;if(a)return a.then(()=>this.flush(e));const l=[],{timeOffset:p}=s;if(r){const W=r.flush();W&&l.push(this.push(W,null,e))}const{demuxer:b,remuxer:A}=this;if(!b||!A)return t.executeEnd=w(),[ve(e)];const M=b.flush(p);return Ce(M)?M.then(W=>(this.flushRemux(l,W,e),l)):(this.flushRemux(l,M,e),l)}flushRemux(e,t,r){const{audioTrack:s,videoTrack:a,id3Track:l,textTrack:p}=t,{accurateTimeOffset:b,timeOffset:A}=this.currentTransmuxState;x.log(`[transmuxer.ts]: Flushed fragment ${r.sn}${r.part>-1?" p: "+r.part:""} of level ${r.level}`);const M=this.remuxer.remux(s,a,l,p,A,b,!0,this.id);e.push({remuxResult:M,chunkMeta:r}),r.transmuxing.executeEnd=w()}resetInitialTimestamp(e){const{demuxer:t,remuxer:r}=this;!t||!r||(t.resetTimeStamp(e),r.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,r,s,a){const{demuxer:l,remuxer:p}=this;!l||!p||(l.resetInitSegment(e,t,r,s),p.resetInitSegment(e,t,r,a))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,r,s,a){let l;return t&&t.method==="SAMPLE-AES"?l=this.transmuxSampleAes(e,t,r,s,a):l=this.transmuxUnencrypted(e,r,s,a),l}transmuxUnencrypted(e,t,r,s){const{audioTrack:a,videoTrack:l,id3Track:p,textTrack:b}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(a,l,p,b,t,r,!1,this.id),chunkMeta:s}}transmuxSampleAes(e,t,r,s,a){return this.demuxer.demuxSampleAes(e,t,r).then(l=>({remuxResult:this.remuxer.remux(l.audioTrack,l.videoTrack,l.id3Track,l.textTrack,r,s,!1,this.id),chunkMeta:a}))}configureTransmuxer(e){const{config:t,observer:r,typeSupported:s,vendor:a}=this;let l;for(let ee=0,le=q.length;ee<le;ee++){var p;if((p=q[ee].demux)!=null&&p.probe(e)){l=q[ee];break}}if(!l)return new Error("Failed to find demuxer by probing fragment data");const b=this.demuxer,A=this.remuxer,M=l.remux,W=l.demux;(!A||!(A instanceof M))&&(this.remuxer=new M(r,t,s,a)),(!b||!(b instanceof W))&&(this.demuxer=new W(r,t,s),this.probe=W.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new ds(this.config)),e}}function fe(c,e){let t=null;return c.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const ve=c=>({remuxResult:{},chunkMeta:c});function Ce(c){return"then"in c&&c.then instanceof Function}class Be{constructor(e,t,r,s,a){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=r,this.duration=s,this.defaultInitPts=a||null}}class Ve{constructor(e,t,r,s,a,l){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=r,this.trackSwitch=s,this.timeOffset=a,this.initSegmentChange=l}}var st={exports:{}};(function(c){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function s(b,A,M){this.fn=b,this.context=A,this.once=M||!1}function a(b,A,M,W,ee){if(typeof M!="function")throw new TypeError("The listener must be a function");var le=new s(M,W||b,ee),oe=t?t+A:A;return b._events[oe]?b._events[oe].fn?b._events[oe]=[b._events[oe],le]:b._events[oe].push(le):(b._events[oe]=le,b._eventsCount++),b}function l(b,A){--b._eventsCount===0?b._events=new r:delete b._events[A]}function p(){this._events=new r,this._eventsCount=0}p.prototype.eventNames=function(){var A=[],M,W;if(this._eventsCount===0)return A;for(W in M=this._events)e.call(M,W)&&A.push(t?W.slice(1):W);return Object.getOwnPropertySymbols?A.concat(Object.getOwnPropertySymbols(M)):A},p.prototype.listeners=function(A){var M=t?t+A:A,W=this._events[M];if(!W)return[];if(W.fn)return[W.fn];for(var ee=0,le=W.length,oe=new Array(le);ee<le;ee++)oe[ee]=W[ee].fn;return oe},p.prototype.listenerCount=function(A){var M=t?t+A:A,W=this._events[M];return W?W.fn?1:W.length:0},p.prototype.emit=function(A,M,W,ee,le,oe){var he=t?t+A:A;if(!this._events[he])return!1;var me=this._events[he],De=arguments.length,We,je;if(me.fn){switch(me.once&&this.removeListener(A,me.fn,void 0,!0),De){case 1:return me.fn.call(me.context),!0;case 2:return me.fn.call(me.context,M),!0;case 3:return me.fn.call(me.context,M,W),!0;case 4:return me.fn.call(me.context,M,W,ee),!0;case 5:return me.fn.call(me.context,M,W,ee,le),!0;case 6:return me.fn.call(me.context,M,W,ee,le,oe),!0}for(je=1,We=new Array(De-1);je<De;je++)We[je-1]=arguments[je];me.fn.apply(me.context,We)}else{var ot=me.length,Ye;for(je=0;je<ot;je++)switch(me[je].once&&this.removeListener(A,me[je].fn,void 0,!0),De){case 1:me[je].fn.call(me[je].context);break;case 2:me[je].fn.call(me[je].context,M);break;case 3:me[je].fn.call(me[je].context,M,W);break;case 4:me[je].fn.call(me[je].context,M,W,ee);break;default:if(!We)for(Ye=1,We=new Array(De-1);Ye<De;Ye++)We[Ye-1]=arguments[Ye];me[je].fn.apply(me[je].context,We)}}return!0},p.prototype.on=function(A,M,W){return a(this,A,M,W,!1)},p.prototype.once=function(A,M,W){return a(this,A,M,W,!0)},p.prototype.removeListener=function(A,M,W,ee){var le=t?t+A:A;if(!this._events[le])return this;if(!M)return l(this,le),this;var oe=this._events[le];if(oe.fn)oe.fn===M&&(!ee||oe.once)&&(!W||oe.context===W)&&l(this,le);else{for(var he=0,me=[],De=oe.length;he<De;he++)(oe[he].fn!==M||ee&&!oe[he].once||W&&oe[he].context!==W)&&me.push(oe[he]);me.length?this._events[le]=me.length===1?me[0]:me:l(this,le)}return this},p.prototype.removeAllListeners=function(A){var M;return A?(M=t?t+A:A,this._events[M]&&l(this,M)):(this._events=new r,this._eventsCount=0),this},p.prototype.off=p.prototype.removeListener,p.prototype.addListener=p.prototype.on,p.prefixed=t,p.EventEmitter=p,c.exports=p})(st);var ut=st.exports,vt=H(ut);class Lt{constructor(e,t,r,s){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const a=e.config;this.hls=e,this.id=t,this.useWorker=!!a.enableWorker,this.onTransmuxComplete=r,this.onFlush=s;const l=(A,M)=>{M=M||{},M.frag=this.frag,M.id=this.id,A===n.ERROR&&(this.error=M.error),this.hls.trigger(A,M)};this.observer=new vt,this.observer.on(n.FRAG_DECRYPTED,l),this.observer.on(n.ERROR,l);const p=Kr(a.preferManagedMediaSource)||{isTypeSupported:()=>!1},b={mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:p.isTypeSupported('audio/mp4; codecs="ac-3"')};if(this.useWorker&&typeof Worker!="undefined"&&(a.workerPath||ha())){try{a.workerPath?(x.log(`loading Web Worker ${a.workerPath} for "${t}"`),this.workerContext=zs(a.workerPath)):(x.log(`injecting Web Worker for "${t}"`),this.workerContext=Us()),this.onwmsg=W=>this.onWorkerMessage(W);const{worker:M}=this.workerContext;M.addEventListener("message",this.onwmsg),M.onerror=W=>{const ee=new Error(`${W.message} (${W.filename}:${W.lineno})`);a.enableWorker=!1,x.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(n.ERROR,{type:o.OTHER_ERROR,details:u.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:ee})},M.postMessage({cmd:"init",typeSupported:b,vendor:"",id:t,config:JSON.stringify(a)})}catch(M){x.warn(`Error setting up "${t}" Web Worker, fallback to inline`,M),this.resetWorker(),this.error=null,this.transmuxer=new X(this.observer,b,a,"",t)}return}this.transmuxer=new X(this.observer,b,a,"",t)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:t}=this.workerContext;t&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,t,r,s,a,l,p,b,A,M){var W,ee;A.transmuxing.start=self.performance.now();const{transmuxer:le}=this,oe=l?l.start:a.start,he=a.decryptdata,me=this.frag,De=!(me&&a.cc===me.cc),We=!(me&&A.level===me.level),je=me?A.sn-me.sn:-1,ot=this.part?A.part-this.part.index:-1,Ye=je===0&&A.id>1&&A.id===(me==null?void 0:me.stats.chunkCount),pt=!We&&(je===1||je===0&&(ot===1||Ye&&ot<=0)),at=self.performance.now();(We||je||a.stats.parsing.start===0)&&(a.stats.parsing.start=at),l&&(ot||!pt)&&(l.stats.parsing.start=at);const Ct=!(me&&((W=a.initSegment)==null?void 0:W.url)===((ee=me.initSegment)==null?void 0:ee.url)),Bt=new Ve(De,pt,b,We,oe,Ct);if(!pt||De||Ct){x.log(`[transmuxer-interface, ${a.type}]: Starting new transmux session for sn: ${A.sn} p: ${A.part} level: ${A.level} id: ${A.id}
discontinuity: ${De}
trackSwitch: ${We}
contiguous: ${pt}
accurateTimeOffset: ${b}
timeOffset: ${oe}
initSegmentChange: ${Ct}`);const ct=new Be(r,s,t,p,M);this.configureTransmuxer(ct)}if(this.frag=a,this.part=l,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:he,chunkMeta:A,state:Bt},e instanceof ArrayBuffer?[e]:[]);else if(le){const ct=le.push(e,he,A,Bt);Ce(ct)?(le.async=!0,ct.then(At=>{this.handleTransmuxComplete(At)}).catch(At=>{this.transmuxerError(At,A,"transmuxer-interface push error")})):(le.async=!1,this.handleTransmuxComplete(ct))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let r=t.flush(e);Ce(r)||t.async?(Ce(r)||(r=Promise.resolve(r)),r.then(a=>{this.handleFlushResult(a,e)}).catch(a=>{this.transmuxerError(a,e,"transmuxer-interface flush error")})):this.handleFlushResult(r,e)}}transmuxerError(e,t,r){this.hls&&(this.error=e,this.hls.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,fatal:!1,error:e,err:e,reason:r}))}handleFlushResult(e,t){e.forEach(r=>{this.handleTransmuxComplete(r)}),this.onFlush(t)}onWorkerMessage(e){const t=e.data;if(!(t!=null&&t.event)){x.warn(`worker message received with no ${t?"event name":"data"}`);return}const r=this.hls;if(this.hls)switch(t.event){case"init":{var s;const a=(s=this.workerContext)==null?void 0:s.objectURL;a&&self.URL.revokeObjectURL(a);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}case"workerLog":x[t.data.logType]&&x[t.data.logType](t.data.message);break;default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,r.trigger(t.event,t.data);break}}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const Wt=100;class er extends ps{constructor(e,t,r){super(e,t,r,"[audio-stream-controller]",Ue.AUDIO),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-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.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:e}=this;e.on(n.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.LEVEL_LOADED,this.onLevelLoaded,this),e.on(n.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(n.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(n.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(n.ERROR,this.onError,this),e.on(n.BUFFER_RESET,this.onBufferReset,this),e.on(n.BUFFER_CREATED,this.onBufferCreated,this),e.on(n.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(n.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(n.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(n.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(n.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.LEVEL_LOADED,this.onLevelLoaded,this),e.off(n.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(n.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(n.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(n.ERROR,this.onError,this),e.off(n.BUFFER_RESET,this.onBufferReset,this),e.off(n.BUFFER_CREATED,this.onBufferCreated,this),e.off(n.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(n.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(n.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(n.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:r,initPTS:s,timescale:a}){if(r==="main"){const l=t.cc;this.initPTS[t.cc]={baseTime:s,timescale:a},this.log(`InitPTS for cc: ${l} found from main: ${s}`),this.videoTrackCC=l,this.state===ht.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels){this.startPosition=e,this.state=ht.STOPPED;return}const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(Wt),t>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=ht.IDLE):(this.loadedmetadata=!1,this.state=ht.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case ht.IDLE:this.doTickIdle();break;case ht.WAITING_TRACK:{var e;const{levels:r,trackId:s}=this,a=r==null||(e=r[s])==null?void 0:e.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=ht.WAITING_INIT_PTS}break}case ht.FRAG_LOADING_WAITING_RETRY:{var t;const r=performance.now(),s=this.retryDate;if(!s||r>=s||(t=this.media)!=null&&t.seeking){const{levels:a,trackId:l}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((a==null?void 0:a[l])||null),this.state=ht.IDLE}break}case ht.WAITING_INIT_PTS:{const r=this.waitingData;if(r){const{frag:s,part:a,cache:l,complete:p}=r;if(this.initPTS[s.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=ht.FRAG_LOADING;const b=l.flush(),A={frag:s,part:a,payload:b,networkDetails:null};this._handleFragmentLoadProgress(A),p&&super._handleFragmentLoadComplete(A)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${s.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const b=this.getLoadPosition(),A=Fr.bufferInfo(this.mediaBuffer,b,this.config.maxBufferHole);Fn(A.end,this.config.maxFragLookUpTolerance,s)<0&&(this.log(`Waiting fragment cc (${s.cc}) @ ${s.start} cancelled because another fragment at ${A.end} is needed`),this.clearWaitingFragment())}}else this.state=ht.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=ht.IDLE)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:t,media:r,trackId:s}=this,a=e.config;if(!this.buffering||!r&&(this.startFragRequested||!a.startFragPrefetch)||!(t!=null&&t[s]))return;const l=t[s],p=l.details;if(!p||p.live&&this.levelLastLoaded!==l||this.waitForCdnTuneIn(p)){this.state=ht.WAITING_TRACK;return}const b=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&b&&(this.bufferFlushed=!1,this.afterBufferFlushed(b,se.AUDIO,Ue.AUDIO));const A=this.getFwdBufferInfo(b,Ue.AUDIO);if(A===null)return;if(!this.switchingTrack&&this._streamEnded(A,p)){e.trigger(n.BUFFER_EOS,{type:"audio"}),this.state=ht.ENDED;return}const M=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,Ue.MAIN),W=A.len,ee=this.getMaxBufferLength(M==null?void 0:M.len),le=p.fragments,oe=le[0].start,he=this.getLoadPosition(),me=this.flushing?he:A.end;if(this.switchingTrack&&r){const ot=he;p.PTSKnown&&ot<oe&&(A.end>oe||A.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=oe+.05)}if(W>=ee&&!this.switchingTrack&&me<le[le.length-1].start)return;let De=this.getNextFragment(me,p),We=!1;if(De&&this.isLoopLoading(De,me)&&(We=!!De.gap,De=this.getNextFragmentLoopLoading(De,p,A,Ue.MAIN,ee)),!De){this.bufferFlushed=!0;return}const je=M&&De.start>M.end+p.targetduration;if(je||!(M!=null&&M.len)&&A.len){const ot=this.getAppendedFrag(De.start,Ue.MAIN);if(ot===null||(We||(We=!!ot.gap||!!je&&M.len===0),je&&!We||We&&A.nextStart&&A.nextStart<ot.end))return}this.loadFragment(De,l,me)}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.min(Math.max(t,e),this.config.maxMaxBufferLength):t}onMediaDetaching(){this.videoBuffer=null,this.bufferFlushed=this.flushing=!1,super.onMediaDetaching()}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(r=>new mi(r))}onAudioTrackSwitching(e,t){const r=!!t.url;this.trackId=t.id;const{fragCurrent:s}=this;s&&(s.abortRequests(),this.removeUnbufferedFrags(s.start)),this.resetLoadingState(),r?this.setInterval(Wt):this.resetTransmuxer(),r?(this.switchingTrack=t,this.state=ht.IDLE,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=ht.STOPPED),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=this.flushing=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,t){this.mainDetails=t.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(n.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var r;if(this.mainDetails==null){this.cachedTrackLoadedData=t;return}const{levels:s}=this,{details:a,id:l}=t;if(!s){this.warn(`Audio tracks were reset while loading level ${l}`);return}this.log(`Audio track ${l} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""},duration:${a.totalduration}`);const p=s[l];let b=0;if(a.live||(r=p.details)!=null&&r.live){this.checkLiveUpdate(a);const M=this.mainDetails;if(a.deltaUpdateFailed||!M)return;if(!p.details&&a.hasProgramDateTime&&M.hasProgramDateTime)Yi(a,M),b=a.fragments[0].start;else{var A;b=this.alignPlaylists(a,p.details,(A=this.levelLastLoaded)==null?void 0:A.details)}}p.details=a,this.levelLastLoaded=p,!this.startFragRequested&&(this.mainDetails||!a.live)&&this.setStartPosition(this.mainDetails||a,b),this.state===ht.WAITING_TRACK&&!this.waitForCdnTuneIn(a)&&(this.state=ht.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:r,part:s,payload:a}=e,{config:l,trackId:p,levels:b}=this;if(!b){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const A=b[p];if(!A){this.warn("Audio track is undefined on fragment load progress");return}const M=A.details;if(!M){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(r.start);return}const W=l.defaultAudioCodec||A.audioCodec||"mp4a.40.2";let ee=this.transmuxer;ee||(ee=this.transmuxer=new Lt(this.hls,Ue.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const le=this.initPTS[r.cc],oe=(t=r.initSegment)==null?void 0:t.data;if(le!==void 0){const me=s?s.index:-1,De=me!==-1,We=new Ps(r.level,r.sn,r.stats.chunkCount,a.byteLength,me,De);ee.push(a,oe,W,"",r,s,M.totalduration,!1,We,le)}else{this.log(`Unknown video PTS for cc ${r.cc}, waiting for video PTS before demuxing audio frag ${r.sn} of [${M.startSN} ,${M.endSN}],track ${p}`);const{cache:he}=this.waitingData=this.waitingData||{frag:r,part:s,cache:new Ns,complete:!1};he.push(new Uint8Array(a)),this.waitingVideoCC=this.videoTrackCC,this.state=ht.WAITING_INIT_PTS}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const r=t.tracks.audio;r&&(this.mediaBuffer=r.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)}onFragBuffered(e,t){const{frag:r,part:s}=t;if(r.type!==Ue.AUDIO){if(!this.loadedmetadata&&r.type===Ue.MAIN){const a=this.videoBuffer||this.media;a&&Fr.getBuffered(a).length&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${s?" p: "+s.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(r.sn!=="initSegment"){this.fragPrevious=r;const a=this.switchingTrack;a&&(this.bufferedTrack=a,this.switchingTrack=null,this.hls.trigger(n.AUDIO_TRACK_SWITCHED,F({},a)))}this.fragBufferedComplete(r,s)}onError(e,t){var r;if(t.fatal){this.state=ht.ERROR;return}switch(t.details){case u.FRAG_GAP:case u.FRAG_PARSING_ERROR:case u.FRAG_DECRYPT_ERROR:case u.FRAG_LOAD_ERROR:case u.FRAG_LOAD_TIMEOUT:case u.KEY_LOAD_ERROR:case u.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Ue.AUDIO,t);break;case u.AUDIO_TRACK_LOAD_ERROR:case u.AUDIO_TRACK_LOAD_TIMEOUT:case u.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===ht.WAITING_TRACK&&((r=t.context)==null?void 0:r.type)===lr.AUDIO_TRACK&&(this.state=ht.IDLE);break;case u.BUFFER_APPEND_ERROR:case u.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="audio")return;if(t.details===u.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case u.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==se.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==se.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===ht.ENDED&&(this.state=ht.IDLE);const r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,t,Ue.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const r="audio",{hls:s}=this,{remuxResult:a,chunkMeta:l}=e,p=this.getCurrentContext(l);if(!p){this.resetWhenMissingContext(l);return}const{frag:b,part:A,level:M}=p,{details:W}=M,{audio:ee,text:le,id3:oe,initSegment:he}=a;if(this.fragContextChanged(b)||!W){this.fragmentTracker.removeFragment(b);return}if(this.state=ht.PARSING,this.switchingTrack&&ee&&this.completeAudioSwitch(this.switchingTrack),he!=null&&he.tracks){const me=b.initSegment||b;this._bufferInitSegment(M,he.tracks,me,l),s.trigger(n.FRAG_PARSING_INIT_SEGMENT,{frag:me,id:r,tracks:he.tracks})}if(ee){const{startPTS:me,endPTS:De,startDTS:We,endDTS:je}=ee;A&&(A.elementaryStreams[se.AUDIO]={startPTS:me,endPTS:De,startDTS:We,endDTS:je}),b.setElementaryStreamInfo(se.AUDIO,me,De,We,je),this.bufferFragmentData(ee,b,A,l)}if(oe!=null&&(t=oe.samples)!=null&&t.length){const me=i({id:r,frag:b,details:W},oe);s.trigger(n.FRAG_PARSING_METADATA,me)}if(le){const me=i({id:r,frag:b,details:W},le);s.trigger(n.FRAG_PARSING_USERDATA,me)}}_bufferInitSegment(e,t,r,s){if(this.state!==ht.PARSING)return;t.video&&delete t.video;const a=t.audio;if(!a)return;a.id="audio";const l=e.audioCodec;this.log(`Init audio buffer, container:${a.container}, codecs[level/parsed]=[${l}/${a.codec}]`),l&&l.split(",").length===1&&(a.levelCodec=l),this.hls.trigger(n.BUFFER_CODECS,t);const p=a.initSegment;if(p!=null&&p.byteLength){const b={type:"audio",frag:r,part:null,chunkMeta:s,parent:r.type,data:p};this.hls.trigger(n.BUFFER_APPENDING,b)}this.tickImmediate()}loadFragment(e,t,r){const s=this.fragmentTracker.getState(e);if(this.fragCurrent=e,this.switchingTrack||s===ai.NOT_LOADED||s===ai.PARTIAL){var a;if(e.sn==="initSegment")this._loadInitSegment(e,t);else if((a=t.details)!=null&&a.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=ht.WAITING_INIT_PTS;const l=this.mainDetails;l&&l.fragments[0].start!==t.details.fragments[0].start&&Yi(t.details,l)}else this.startFragRequested=!0,super.loadFragment(e,t,r)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:r,assocLang:s,characteristics:a,audioCodec:l,channels:p}=this.bufferedTrack;fn({name:t,lang:r,assocLang:s,characteristics:a,audioCodec:l,channels:p},e,Cn)||(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(n.AUDIO_TRACK_SWITCHED,F({},e))}}function ir(c,e){if(c.length!==e.length)return!1;for(let t=0;t<c.length;t++)if(!tr(c[t].attrs,e[t].attrs))return!1;return!0}function tr(c,e,t){const r=c["STABLE-RENDITION-ID"];return r&&!t?r===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(s=>c[s]!==e[s])}function kr(c,e){return e.label.toLowerCase()===c.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(c.lang||"").toLowerCase())}class Ir extends Nr{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(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.MANIFEST_PARSED,this.onManifestParsed,this),e.on(n.LEVEL_LOADING,this.onLevelLoading,this),e.on(n.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(n.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(n.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.MANIFEST_PARSED,this.onManifestParsed,this),e.off(n.LEVEL_LOADING,this.onLevelLoading,this),e.off(n.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(n.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(n.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:r,groupId:s,details:a}=t,l=this.tracksInGroup[r];if(!l||l.groupId!==s){this.warn(`Audio track with id:${r} and group:${s} not found in active group ${l==null?void 0:l.groupId}`);return}const p=l.details;l.details=t.details,this.log(`Audio track ${r} "${l.name}" lang:${l.lang} group:${s} loaded [${a.startSN}-${a.endSN}]`),r===this.trackId&&this.playlistLoaded(r,t,p)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const r=t.audioGroups||null,s=this.groupIds;let a=this.currentTrack;if(!r||(s==null?void 0:s.length)!==(r==null?void 0:r.length)||r!=null&&r.some(p=>(s==null?void 0:s.indexOf(p))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const p=this.tracks.filter(ee=>!r||r.indexOf(ee.groupId)!==-1);if(p.length)this.selectDefaultTrack&&!p.some(ee=>ee.default)&&(this.selectDefaultTrack=!1),p.forEach((ee,le)=>{ee.id=le});else if(!a&&!this.tracksInGroup.length)return;this.tracksInGroup=p;const b=this.hls.config.audioPreference;if(!a&&b){const ee=Hi(b,p,Cn);if(ee>-1)a=p[ee];else{const le=Hi(b,this.tracks);a=this.tracks[le]}}let A=this.findTrackId(a);A===-1&&a&&(A=this.findTrackId(null));const M={audioTracks:p};this.log(`Updating audio tracks, ${p.length} track(s) found in group(s): ${r==null?void 0:r.join(",")}`),this.hls.trigger(n.AUDIO_TRACKS_UPDATED,M);const W=this.trackId;if(A!==-1&&W===-1)this.setAudioTrack(A);else if(p.length&&W===-1){var l;const ee=new Error(`No audio track selected for current audio group-ID(s): ${(l=this.groupIds)==null?void 0:l.join(",")} track count: ${p.length}`);this.warn(ee.message),this.hls.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:ee})}}else this.shouldReloadPlaylist(a)&&this.setAudioTrack(this.trackId)}onError(e,t){t.fatal||!t.context||t.context.type===lr.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&(this.requestScheduled=-1,this.checkRetry(t))}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const r=this.allAudioTracks;if(this.selectDefaultTrack=!1,r.length){const s=this.currentTrack;if(s&&fn(e,s,Cn))return s;const a=Hi(e,this.tracksInGroup,Cn);if(a>-1){const l=this.tracksInGroup[a];return this.setAudioTrack(a),l}else if(s){let l=t.loadLevel;l===-1&&(l=t.firstAutoLevel);const p=Ba(e,t.levels,r,l,Cn);if(p===-1)return null;t.nextLoadLevel=p}if(e.channels||e.audioCodec){const l=Hi(e,r);if(l>-1)return r[l]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.clearTimer(),this.selectDefaultTrack=!1;const r=this.currentTrack,s=t[e],a=s.details&&!s.details.live;if(e===this.trackId&&s===r&&a||(this.log(`Switching to audio-track ${e} "${s.name}" lang:${s.lang} group:${s.groupId} channels:${s.channels}`),this.trackId=e,this.currentTrack=s,this.hls.trigger(n.AUDIO_TRACK_SWITCHING,F({},s)),a))return;const l=this.switchParams(s.url,r==null?void 0:r.details,s.details);this.loadPlaylist(l)}findTrackId(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const s=t[r];if(!(this.selectDefaultTrack&&!s.default)&&(!e||fn(e,s,Cn)))return r}if(e){const{name:r,lang:s,assocLang:a,characteristics:l,audioCodec:p,channels:b}=e;for(let A=0;A<t.length;A++){const M=t[A];if(fn({name:r,lang:s,assocLang:a,characteristics:l,audioCodec:p,channels:b},M,Cn))return A}for(let A=0;A<t.length;A++){const M=t[A];if(tr(e.attrs,M.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return A}for(let A=0;A<t.length;A++){const M=t[A];if(tr(e.attrs,M.attrs,["LANGUAGE"]))return A}}return-1}loadPlaylist(e){const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){super.loadPlaylist();const r=t.id,s=t.groupId;let a=t.url;if(e)try{a=e.addDirectives(a)}catch(l){this.warn(`Could not construct new URL with HLS Delivery Directives: ${l}`)}this.log(`loading audio-track playlist ${r} "${t.name}" lang:${t.lang} group:${s}`),this.clearTimer(),this.hls.trigger(n.AUDIO_TRACK_LOADING,{url:a,id:r,groupId:s,deliveryDirectives:e||null})}}}const Hr=500;class Gr extends ps{constructor(e,t,r){super(e,t,r,"[subtitle-stream-controller]",Ue.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;e.on(n.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.LEVEL_LOADED,this.onLevelLoaded,this),e.on(n.ERROR,this.onError,this),e.on(n.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(n.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(n.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(n.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(n.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(n.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(n.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.LEVEL_LOADED,this.onLevelLoaded,this),e.off(n.ERROR,this.onError,this),e.off(n.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(n.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(n.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(n.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(n.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(n.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=ht.IDLE,this.setInterval(Hr),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:r,success:s}=t;if(this.fragPrevious=r,this.state=ht.IDLE,!s)return;const a=this.tracksBuffered[this.currentTrackId];if(!a)return;let l;const p=r.start;for(let A=0;A<a.length;A++)if(p>=a[A].start&&p<=a[A].end){l=a[A];break}const b=r.start+r.duration;l?l.end=b:(l={start:p,end:b},a.push(l)),this.fragmentTracker.fragBuffered(r),this.fragBufferedComplete(r,null)}onBufferFlushing(e,t){const{startOffset:r,endOffset:s}=t;if(r===0&&s!==Number.POSITIVE_INFINITY){const a=s-1;if(a<=0)return;t.endOffsetSubtitles=Math.max(0,a),this.tracksBuffered.forEach(l=>{for(let p=0;p<l.length;){if(l[p].end<=a){l.shift();continue}else if(l[p].start<a)l[p].start=a;else break;p++}}),this.fragmentTracker.removeFragmentsInRange(r,a,Ue.SUBTITLE)}}onFragBuffered(e,t){if(!this.loadedmetadata&&t.frag.type===Ue.MAIN){var r;(r=this.media)!=null&&r.buffered.length&&(this.loadedmetadata=!0)}}onError(e,t){const r=t.frag;(r==null?void 0:r.type)===Ue.SUBTITLE&&(t.details===u.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==ht.STOPPED&&(this.state=ht.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&ir(this.levels,t)){this.levels=t.map(r=>new mi(r));return}this.tracksBuffered=[],this.levels=t.map(r=>{const s=new mi(r);return this.tracksBuffered[s.id]=[],s}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,Ue.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var r;if(this.currentTrackId=t.id,!((r=this.levels)!=null&&r.length)||this.currentTrackId===-1){this.clearInterval();return}const s=this.levels[this.currentTrackId];s!=null&&s.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,s&&this.setInterval(Hr)}onSubtitleTrackLoaded(e,t){var r;const{currentTrackId:s,levels:a}=this,{details:l,id:p}=t;if(!a){this.warn(`Subtitle tracks were reset while loading level ${p}`);return}const b=a[p];if(p>=a.length||!b)return;this.log(`Subtitle track ${p} loaded [${l.startSN},${l.endSN}]${l.lastPartSn?`[part-${l.lastPartSn}-${l.lastPartIndex}]`:""},duration:${l.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let A=0;if(l.live||(r=b.details)!=null&&r.live){const W=this.mainDetails;if(l.deltaUpdateFailed||!W)return;const ee=W.fragments[0];if(!b.details)l.hasProgramDateTime&&W.hasProgramDateTime?(Yi(l,W),A=l.fragments[0].start):ee&&(A=ee.start,yt(l,A));else{var M;A=this.alignPlaylists(l,b.details,(M=this.levelLastLoaded)==null?void 0:M.details),A===0&&ee&&(A=ee.start,yt(l,A))}}b.details=l,this.levelLastLoaded=b,p===s&&(!this.startFragRequested&&(this.mainDetails||!l.live)&&this.setStartPosition(this.mainDetails||l,A),this.tick(),l.live&&!this.fragCurrent&&this.media&&this.state===ht.IDLE&&(wn(null,l.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),b.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:r}=e,s=t.decryptdata,a=this.hls;if(!this.fragContextChanged(t)&&r&&r.byteLength>0&&s!=null&&s.key&&s.iv&&s.method==="AES-128"){const l=performance.now();this.decrypter.decrypt(new Uint8Array(r),s.key.buffer,s.iv.buffer).catch(p=>{throw a.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.FRAG_DECRYPT_ERROR,fatal:!1,error:p,reason:p.message,frag:t}),p}).then(p=>{const b=performance.now();a.trigger(n.FRAG_DECRYPTED,{frag:t,payload:p,stats:{tstart:l,tdecrypt:b}})}).catch(p=>{this.warn(`${p.name}: ${p.message}`),this.state=ht.IDLE})}}doTick(){if(!this.media){this.state=ht.IDLE;return}if(this.state===ht.IDLE){const{currentTrackId:e,levels:t}=this,r=t==null?void 0:t[e];if(!r||!t.length||!r.details)return;const{config:s}=this,a=this.getLoadPosition(),l=Fr.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],a,s.maxBufferHole),{end:p,len:b}=l,A=this.getFwdBufferInfo(this.media,Ue.MAIN),M=r.details,W=this.getMaxBufferLength(A==null?void 0:A.len)+M.levelTargetDuration;if(b>W)return;const ee=M.fragments,le=ee.length,oe=M.edge;let he=null;const me=this.fragPrevious;if(p<oe){const De=s.maxFragLookUpTolerance,We=p>oe-De?0:De;he=wn(me,ee,Math.max(ee[0].start,p),We),!he&&me&&me.start<ee[0].start&&(he=ee[0])}else he=ee[le-1];if(!he)return;if(he=this.mapToInitFragWhenRequired(he),he.sn!=="initSegment"){const De=he.sn-M.startSN,We=ee[De-1];We&&We.cc===he.cc&&this.fragmentTracker.getState(We)===ai.NOT_LOADED&&(he=We)}this.fragmentTracker.getState(he)===ai.NOT_LOADED&&this.loadFragment(he,r,p)}}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.max(t,e):t}loadFragment(e,t,r){this.fragCurrent=e,e.sn==="initSegment"?this._loadInitSegment(e,t):(this.startFragRequested=!0,super.loadFragment(e,t,r))}get mediaBufferTimeRanges(){return new Xr(this.tracksBuffered[this.currentTrackId]||[])}}class Xr{constructor(e){this.buffered=void 0;const t=(r,s,a)=>{if(s=s>>>0,s>a-1)throw new DOMException(`Failed to execute '${r}' on 'TimeRanges': The index provided (${s}) is greater than the maximum bound (${a})`);return e[s][r]};this.buffered={get length(){return e.length},end(r){return t("end",r,e.length)},start(r){return t("start",r,e.length)}}}}class vi extends Nr{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.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const r=qr(this.media.textTracks);for(let a=0;a<r.length;a++)if(r[a].mode==="hidden")t=r[a];else if(r[a].mode==="showing"){t=r[a];break}const s=this.findTrackForTextTrack(t);this.subtitleTrack!==s&&this.setSubtitleTrack(s)},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(n.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.MANIFEST_PARSED,this.onManifestParsed,this),e.on(n.LEVEL_LOADING,this.onLevelLoading,this),e.on(n.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(n.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(n.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(n.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.MANIFEST_PARSED,this.onManifestParsed,this),e.off(n.LEVEL_LOADING,this.onLevelLoading,this),e.off(n.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(n.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(n.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(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),qr(this.media.textTracks).forEach(t=>{Si(t)}),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:r,groupId:s,details:a}=t,l=this.tracksInGroup[r];if(!l||l.groupId!==s){this.warn(`Subtitle track with id:${r} and group:${s} not found in active group ${l==null?void 0:l.groupId}`);return}const p=l.details;l.details=t.details,this.log(`Subtitle track ${r} "${l.name}" lang:${l.lang} group:${s} loaded [${a.startSN}-${a.endSN}]`),r===this.trackId&&this.playlistLoaded(r,t,p)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const r=t.subtitleGroups||null,s=this.groupIds;let a=this.currentTrack;if(!r||(s==null?void 0:s.length)!==(r==null?void 0:r.length)||r!=null&&r.some(l=>(s==null?void 0:s.indexOf(l))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const l=this.tracks.filter(M=>!r||r.indexOf(M.groupId)!==-1);if(l.length)this.selectDefaultTrack&&!l.some(M=>M.default)&&(this.selectDefaultTrack=!1),l.forEach((M,W)=>{M.id=W});else if(!a&&!this.tracksInGroup.length)return;this.tracksInGroup=l;const p=this.hls.config.subtitlePreference;if(!a&&p){this.selectDefaultTrack=!1;const M=Hi(p,l);if(M>-1)a=l[M];else{const W=Hi(p,this.tracks);a=this.tracks[W]}}let b=this.findTrackId(a);b===-1&&a&&(b=this.findTrackId(null));const A={subtitleTracks:l};this.log(`Updating subtitle tracks, ${l.length} track(s) found in "${r==null?void 0:r.join(",")}" group-id`),this.hls.trigger(n.SUBTITLE_TRACKS_UPDATED,A),b!==-1&&this.trackId===-1&&this.setSubtitleTrack(b)}else this.shouldReloadPlaylist(a)&&this.setSubtitleTrack(this.trackId)}findTrackId(e){const t=this.tracksInGroup,r=this.selectDefaultTrack;for(let s=0;s<t.length;s++){const a=t[s];if(!(r&&!a.default||!r&&!e)&&(!e||fn(a,e)))return s}if(e){for(let s=0;s<t.length;s++){const a=t[s];if(tr(e.attrs,a.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return s}for(let s=0;s<t.length;s++){const a=t[s];if(tr(e.attrs,a.attrs,["LANGUAGE"]))return s}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const s=t[r];if(kr(s,e))return r}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===lr.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){const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const r=this.currentTrack;if(r&&fn(e,r))return r;const s=Hi(e,this.tracksInGroup);if(s>-1){const a=this.tracksInGroup[s];return this.setSubtitleTrack(s),a}else{if(r)return null;{const a=Hi(e,t);if(a>-1)return t[a]}}}}return null}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){const r=t.id,s=t.groupId;let a=t.url;if(e)try{a=e.addDirectives(a)}catch(l){this.warn(`Could not construct new URL with HLS Delivery Directives: ${l}`)}this.log(`Loading subtitle playlist for id ${r}`),this.hls.trigger(n.SUBTITLE_TRACK_LOADING,{url:a,id:r,groupId:s,deliveryDirectives:e||null})}}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=qr(e.textTracks),r=this.currentTrack;let s;if(r&&(s=t.filter(a=>kr(r,a))[0],s||this.warn(`Unable to find subtitle TextTrack with name "${r.name}" and language "${r.lang}"`)),[].slice.call(t).forEach(a=>{a.mode!=="disabled"&&a!==s&&(a.mode="disabled")}),s){const a=this.subtitleDisplay?"showing":"hidden";s.mode!==a&&(s.mode=a)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!v(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.clearTimer(),this.selectDefaultTrack=!1;const r=this.currentTrack,s=t[e]||null;if(this.trackId=e,this.currentTrack=s,this.toggleTrackModes(),!s){this.hls.trigger(n.SUBTITLE_TRACK_SWITCH,{id:e});return}const a=!!s.details&&!s.details.live;if(e===this.trackId&&s===r&&a)return;this.log(`Switching to subtitle-track ${e}`+(s?` "${s.name}" lang:${s.lang} group:${s.groupId}`:""));const{id:l,groupId:p="",name:b,type:A,url:M}=s;this.hls.trigger(n.SUBTITLE_TRACK_SWITCH,{id:l,groupId:p,name:b,type:A,url:M});const W=this.switchParams(s.url,r==null?void 0:r.details,s.details);this.loadPlaylist(W)}}class ci{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,t,r){const s=this.queues[t];s.push(e),s.length===1&&!r&&this.executeNext(t)}insertAbort(e,t){this.queues[t].unshift(e),this.executeNext(t)}appendBlocker(e){let t;const r=new Promise(a=>{t=a}),s={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(s,e),r}executeNext(e){const t=this.queues[e];if(t.length){const r=t[0];try{r.execute()}catch(s){x.warn(`[buffer-operation-queue]: Exception executing "${e}" SourceBuffer operation: ${s}`),r.onError(s);const a=this.buffers[e];a!=null&&a.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const Tr=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;class $i{constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendSource=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this._onEndStreaming=r=>{this.hls&&this.hls.pauseBuffering()},this._onStartStreaming=r=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=()=>{const{media:r,mediaSource:s}=this;this.log("Media source opened"),r&&(r.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(n.MEDIA_ATTACHED,{media:r,mediaSource:s})),s&&s.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:r,_objectUrl:s}=this;r!==s&&x.error(`Media element src was set while attaching MediaSource (${s} > ${r})`)},this.hls=e;const t="[buffer-controller]";this.appendSource=Mi(Kr(e.config.preferManagedMediaSource)),this.log=x.log.bind(x,t),this.warn=x.warn.bind(x,t),this.error=x.error.bind(x,t),this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null,this.hls=null}registerListeners(){const{hls:e}=this;e.on(n.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.MANIFEST_PARSED,this.onManifestParsed,this),e.on(n.BUFFER_RESET,this.onBufferReset,this),e.on(n.BUFFER_APPENDING,this.onBufferAppending,this),e.on(n.BUFFER_CODECS,this.onBufferCodecs,this),e.on(n.BUFFER_EOS,this.onBufferEos,this),e.on(n.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(n.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(n.FRAG_PARSED,this.onFragParsed,this),e.on(n.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(n.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.MANIFEST_PARSED,this.onManifestParsed,this),e.off(n.BUFFER_RESET,this.onBufferReset,this),e.off(n.BUFFER_APPENDING,this.onBufferAppending,this),e.off(n.BUFFER_CODECS,this.onBufferCodecs,this),e.off(n.BUFFER_EOS,this.onBufferEos,this),e.off(n.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(n.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(n.FRAG_PARSED,this.onFragParsed,this),e.off(n.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new ci(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.appendErrors={audio:0,video:0,audiovideo:0},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r,this.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,t){const r=this.media=t.media,s=Kr(this.appendSource);if(r&&s){var a;const l=this.mediaSource=new s;this.log(`created media source: ${(a=l.constructor)==null?void 0:a.name}`),l.addEventListener("sourceopen",this._onMediaSourceOpen),l.addEventListener("sourceended",this._onMediaSourceEnded),l.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(l.addEventListener("startstreaming",this._onStartStreaming),l.addEventListener("endstreaming",this._onEndStreaming));const p=this._objectUrl=self.URL.createObjectURL(l);if(this.appendSource)try{r.removeAttribute("src");const b=self.ManagedMediaSource;r.disableRemotePlayback=r.disableRemotePlayback||b&&l instanceof b,_n(r),Xi(r,p),r.load()}catch(b){r.src=p}else r.src=p;r.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:r}=this;if(t){if(this.log("media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(s){this.warn(`onMediaDetaching: ${s.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming)),e&&(e.removeEventListener("emptied",this._onMediaEmptied),r&&self.URL.revokeObjectURL(r),this.mediaSrc===r?(e.removeAttribute("src"),this.appendSource&&_n(e),e.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(n.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach(e=>{this.resetBuffer(e)}),this._initSourceBuffer(),this.hls.resumeBuffering()}resetBuffer(e){const t=this.sourceBuffer[e];try{if(t){var r;this.removeBufferListeners(e),this.sourceBuffer[e]=void 0,(r=this.mediaSource)!=null&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(t)}}catch(s){this.warn(`onBufferReset ${e}`,s)}}onBufferCodecs(e,t){const r=this.getSourceBufferTypes().length,s=Object.keys(t);if(s.forEach(l=>{if(r){const b=this.tracks[l];if(b&&typeof b.buffer.changeType=="function"){var p;const{id:A,codec:M,levelCodec:W,container:ee,metadata:le}=t[l],oe=wr(b.codec,b.levelCodec),he=oe==null?void 0:oe.replace(Tr,"$1");let me=wr(M,W);const De=(p=me)==null?void 0:p.replace(Tr,"$1");if(me&&he!==De){l.slice(0,5)==="audio"&&(me=Lr(me,this.appendSource));const We=`${ee};codecs=${me}`;this.appendChangeType(l,We),this.log(`switching codec ${oe} to ${me}`),this.tracks[l]={buffer:b.buffer,codec:M,container:ee,levelCodec:W,metadata:le,id:A}}}}else this.pendingTracks[l]=t[l]}),r)return;const a=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==a&&(this.log(`${a} bufferCodec event(s) expected ${s.join(",")}`),this.bufferCodecEventsExpected=a),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()}appendChangeType(e,t){const{operationQueue:r}=this,s={execute:()=>{const a=this.sourceBuffer[e];a&&(this.log(`changing ${e} sourceBuffer type to ${t}`),a.changeType(t)),r.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:a=>{this.warn(`Failed to change ${e} SourceBuffer type`,a)}};r.append(s,e,!!this.pendingTracks[e])}onBufferAppending(e,t){const{hls:r,operationQueue:s,tracks:a}=this,{data:l,type:p,frag:b,part:A,chunkMeta:M}=t,W=M.buffering[p],ee=self.performance.now();W.start=ee;const le=b.stats.buffering,oe=A?A.stats.buffering:null;le.start===0&&(le.start=ee),oe&&oe.start===0&&(oe.start=ee);const he=a.audio;let me=!1;p==="audio"&&(he==null?void 0:he.container)==="audio/mpeg"&&(me=!this.lastMpegAudioChunk||M.id===1||this.lastMpegAudioChunk.sn!==M.sn,this.lastMpegAudioChunk=M);const De=b.start,We={execute:()=>{if(W.executeStart=self.performance.now(),me){const je=this.sourceBuffer[p];if(je){const ot=De-je.timestampOffset;Math.abs(ot)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${De} (delta: ${ot}) sn: ${b.sn})`),je.timestampOffset=De)}}this.appendExecutor(l,p)},onStart:()=>{},onComplete:()=>{const je=self.performance.now();W.executeEnd=W.end=je,le.first===0&&(le.first=je),oe&&oe.first===0&&(oe.first=je);const{sourceBuffer:ot}=this,Ye={};for(const pt in ot)Ye[pt]=Fr.getBuffered(ot[pt]);this.appendErrors[p]=0,p==="audio"||p==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(n.BUFFER_APPENDED,{type:p,frag:b,part:A,chunkMeta:M,parent:b.type,timeRanges:Ye})},onError:je=>{const ot={type:o.MEDIA_ERROR,parent:b.type,details:u.BUFFER_APPEND_ERROR,sourceBufferName:p,frag:b,part:A,chunkMeta:M,error:je,err:je,fatal:!1};if(je.code===DOMException.QUOTA_EXCEEDED_ERR)ot.details=u.BUFFER_FULL_ERROR;else{const Ye=++this.appendErrors[p];ot.details=u.BUFFER_APPEND_ERROR,this.warn(`Failed ${Ye}/${r.config.appendErrorMaxRetry} times to append segment in "${p}" sourceBuffer`),Ye>=r.config.appendErrorMaxRetry&&(ot.fatal=!0)}r.trigger(n.ERROR,ot)}};s.append(We,p,!!this.pendingTracks[p])}onBufferFlushing(e,t){const{operationQueue:r}=this,s=a=>({execute:this.removeExecutor.bind(this,a,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(n.BUFFER_FLUSHED,{type:a})},onError:l=>{this.warn(`Failed to remove from ${a} SourceBuffer`,l)}});t.type?r.append(s(t.type),t.type):this.getSourceBufferTypes().forEach(a=>{r.append(s(a),a)})}onFragParsed(e,t){const{frag:r,part:s}=t,a=[],l=s?s.elementaryStreams:r.elementaryStreams;l[se.AUDIOVIDEO]?a.push("audiovideo"):(l[se.AUDIO]&&a.push("audio"),l[se.VIDEO]&&a.push("video"));const p=()=>{const b=self.performance.now();r.stats.buffering.end=b,s&&(s.stats.buffering.end=b);const A=s?s.stats:r.stats;this.hls.trigger(n.FRAG_BUFFERED,{frag:r,part:s,stats:A,id:r.type})};a.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${r.type} level: ${r.level} sn: ${r.sn}`),this.blockBuffers(p,a)}onFragChanged(e,t){this.trimBuffers()}onBufferEos(e,t){this.getSourceBufferTypes().reduce((s,a)=>{const l=this.sourceBuffer[a];return l&&(!t.type||t.type===a)&&(l.ending=!0,l.ended||(l.ended=!0,this.log(`${a} sourceBuffer now EOS`))),s&&!!(!l||l.ended)},!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers(()=>{this.getSourceBufferTypes().forEach(a=>{const l=this.sourceBuffer[a];l&&(l.ending=!1)});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()}))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}trimBuffers(){const{hls:e,details:t,media:r}=this;if(!r||t===null||!this.getSourceBufferTypes().length)return;const a=e.config,l=r.currentTime,p=t.levelTargetDuration,b=t.live&&a.liveBackBufferLength!==null?a.liveBackBufferLength:a.backBufferLength;if(v(b)&&b>0){const A=Math.max(b,p),M=Math.floor(l/p)*p-A;this.flushBackBuffer(l,p,M)}if(v(a.frontBufferFlushThreshold)&&a.frontBufferFlushThreshold>0){const A=Math.max(a.maxBufferLength,a.frontBufferFlushThreshold),M=Math.max(A,p),W=Math.floor(l/p)*p+M;this.flushFrontBuffer(l,p,W)}}flushBackBuffer(e,t,r){const{details:s,sourceBuffer:a}=this;this.getSourceBufferTypes().forEach(p=>{const b=a[p];if(b){const A=Fr.getBuffered(b);if(A.length>0&&r>A.start(0)){if(this.hls.trigger(n.BACK_BUFFER_REACHED,{bufferEnd:r}),s!=null&&s.live)this.hls.trigger(n.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r});else if(b.ended&&A.end(A.length-1)-e<t*2){this.log(`Cannot flush ${p} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(n.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:p})}}})}flushFrontBuffer(e,t,r){const{sourceBuffer:s}=this;this.getSourceBufferTypes().forEach(l=>{const p=s[l];if(p){const b=Fr.getBuffered(p),A=b.length;if(A<2)return;const M=b.start(A-1),W=b.end(A-1);if(r>M||e>=M&&e<=W)return;if(p.ended&&e-W<2*t){this.log(`Cannot flush ${l} front buffer while SourceBuffer is in ended state`);return}this.hls.trigger(n.BUFFER_FLUSHING,{startOffset:M,endOffset:1/0,type:l})}})}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;const{details:e,hls:t,media:r,mediaSource:s}=this,a=e.fragments[0].start+e.totalduration,l=r.duration,p=v(s.duration)?s.duration:0;e.live&&t.config.liveDurationInfinity?(s.duration=1/0,this.updateSeekableRange(e)):(a>p&&a>l||!v(l))&&(this.log(`Updating Media Source duration to ${a.toFixed(3)}`),s.duration=a)}updateSeekableRange(e){const t=this.mediaSource,r=e.fragments;if(r.length&&e.live&&t!=null&&t.setLiveSeekableRange){const a=Math.max(0,r[0].start),l=Math.max(a,a+e.totalduration);this.log(`Media Source duration is set to ${t.duration}. Setting seekable range to ${a}-${l}.`),t.setLiveSeekableRange(a,l)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:r}=this,s=Object.keys(r).length;if(s&&(!e||s===2||"audiovideo"in r)){this.createSourceBuffers(r),this.pendingTracks={};const a=this.getSourceBufferTypes();if(a.length)this.hls.trigger(n.BUFFER_CREATED,{tracks:this.tracks}),a.forEach(l=>{t.executeNext(l)});else{const l=new Error("could not create source buffer for media codec(s)");this.hls.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:l,reason:l.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:r}=this;if(!r)throw Error("createSourceBuffers called when mediaSource was null");for(const a in e)if(!t[a]){var s;const l=e[a];if(!l)throw Error(`source buffer exists for track ${a}, however track does not`);let p=((s=l.levelCodec)==null?void 0:s.indexOf(","))===-1?l.levelCodec:l.codec;p&&a.slice(0,5)==="audio"&&(p=Lr(p,this.appendSource));const b=`${l.container};codecs=${p}`;this.log(`creating sourceBuffer(${b})`);try{const A=t[a]=r.addSourceBuffer(b),M=a;this.addBufferListener(M,"updatestart",this._onSBUpdateStart),this.addBufferListener(M,"updateend",this._onSBUpdateEnd),this.addBufferListener(M,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(M,"bufferedchange",(W,ee)=>{const le=ee.removedRanges;le!=null&&le.length&&this.hls.trigger(n.BUFFER_FLUSHED,{type:a})}),this.tracks[a]={buffer:A,codec:p,container:l.container,levelCodec:l.levelCodec,metadata:l.metadata,id:l.id}}catch(A){this.error(`error while trying to add sourceBuffer: ${A.message}`),this.hls.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:A,sourceBufferName:a,mimeType:b})}}}get mediaSrc(){var e,t;const r=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return r==null?void 0:r.src}_onSBUpdateStart(e){const{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const{operationQueue:r}=this;r.current(e).onComplete(),r.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){var r;const s=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(r=this.mediaSource)==null?void 0:r.readyState}`);this.error(`${s}`,t),this.hls.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:s,fatal:!1});const a=this.operationQueue.current(e);a&&a.onError(s)}removeExecutor(e,t,r){const{media:s,mediaSource:a,operationQueue:l,sourceBuffer:p}=this,b=p[e];if(!s||!a||!b){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),l.shiftAndExecuteNext(e);return}const A=v(s.duration)?s.duration:1/0,M=v(a.duration)?a.duration:1/0,W=Math.max(0,t),ee=Math.min(r,A,M);ee>W&&(!b.ending||b.ended)?(b.ended=!1,this.log(`Removing [${W},${ee}] from the ${e} SourceBuffer`),b.remove(W,ee)):l.shiftAndExecuteNext(e)}appendExecutor(e,t){const r=this.sourceBuffer[t];if(!r){if(!this.pendingTracks[t])throw new Error(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);return}r.ended=!1,r.appendBuffer(e)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length){this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);return}const{operationQueue:r}=this,s=t.map(a=>r.appendBlocker(a));Promise.all(s).then(()=>{e(),t.forEach(a=>{const l=this.sourceBuffer[a];l!=null&&l.updating||r.shiftAndExecuteNext(a)})})}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,r){const s=this.sourceBuffer[e];if(!s)return;const a=r.bind(this,e);this.listeners[e].push({event:t,listener:a}),s.addEventListener(t,a)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach(r=>{t.removeEventListener(r.event,r.listener)})}}function _n(c){const e=c.querySelectorAll("source");[].slice.call(e).forEach(t=>{c.removeChild(t)})}function Xi(c,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,c.appendChild(t)}const yi={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},vn=c=>String.fromCharCode(yi[c]||c),ni=15,rn=100,to={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Xn={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Jn={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Qn={25:2,26:4,29:6,30:8,31:10,27:13,28:15},As=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Ts{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const r=typeof t=="function"?t():t;x.log(`${this.time} [${e}] ${r}`)}}}const Un=function(e){const t=[];for(let r=0;r<e.length;r++)t.push(e[r].toString(16));return t};class Ta{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let r=0;r<t.length;r++){const s=t[r];e.hasOwnProperty(s)&&(this[s]=e[s])}}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 ro{constructor(){this.uchar=" ",this.penState=new Ta}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 Js{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Ta,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<rn;t++)this.chars.push(new ro);this.logger=e}equals(e){for(let t=0;t<rn;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<rn;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<rn;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>rn&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=rn)}moveCursor(e){const t=this.pos+e;if(e>1)for(let r=this.pos+1;r<t+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=vn(e);if(this.pos>=rn){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<rn;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let r=0;r<rn;r++){const s=this.chars[r].uchar;s!==" "&&(t=!1),e.push(s)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class Ds{constructor(e){this.rows=[],this.currRow=ni-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<ni;t++)this.rows.push(new Js(e));this.logger=e}reset(){for(let e=0;e<ni;e++)this.rows[e].clear();this.currRow=ni-1}equals(e){let t=!0;for(let r=0;r<ni;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t}copy(e){for(let t=0;t<ni;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<ni;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 = "+JSON.stringify(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let p=0;p<ni;p++)this.rows[p].clear();const a=this.currRow+1-this.nrRollUpRows,l=this.lastOutputScreen;if(l){const p=l.rows[a].cueStartTime,b=this.logger.time;if(p!==null&&b!==null&&p<b)for(let A=0;A<this.nrRollUpRows;A++)this.rows[t-this.nrRollUpRows+A+1].copy(l.rows[a+A])}}this.currRow=t;const r=this.rows[this.currRow];if(e.indent!==null){const a=e.indent,l=Math.max(a-1,0);r.setCursor(e.indent),e.color=r.chars[l].penState.foreground}const s={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(s)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let r="",s=-1;for(let a=0;a<ni;a++){const l=this.rows[a].getTextString();l&&(s=a+1,e?t.push("Row "+s+": '"+l+"'"):t.push(l.trim()))}return t.length>0&&(e?r="["+t.join(" | ")+"]":r=t.join(`
`)),r}getTextAndFormat(){return this.rows}}class Qs{constructor(e,t,r){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Ds(r),this.nonDisplayedMemory=new Ds(r),this.lastOutputScreen=new Ds(r),this.currRollUpRow=this.displayedMemory.rows[ni-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[ni-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let r=0;r<e.length;r++)this.writeScreen.insertChar(e[r]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const r=Math.floor(e/2)-16,s=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=s[r]}this.logger.log(2,"MIDROW: "+JSON.stringify(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 ea{constructor(e,t,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Qo(),this.logger=void 0;const s=this.logger=new Ts;this.channels=[null,new Qs(e,t,s),new Qs(e+1,r,s)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let r=0;r<t.length;r+=2){const s=t[r]&127,a=t[r+1]&127;let l=!1,p=null;if(s===0&&a===0)continue;this.logger.log(3,()=>"["+Un([t[r],t[r+1]])+"] -> ("+Un([s,a])+")");const b=this.cmdHistory;if(s>=16&&s<=31){if(Jo(s,a,b)){zn(null,null,b),this.logger.log(3,()=>"Repeated command ("+Un([s,a])+") is dropped");continue}zn(s,a,this.cmdHistory),l=this.parseCmd(s,a),l||(l=this.parseMidrow(s,a)),l||(l=this.parsePAC(s,a)),l||(l=this.parseBackgroundAttributes(s,a))}else zn(null,null,b);if(!l&&(p=this.parseChars(s,a),p)){const M=this.currentChannel;M&&M>0?this.channels[M].insertChars(p):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!l&&!p&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Un([s,a])+" orig: "+Un([t[r],t[r+1]]))}}parseCmd(e,t){const r=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,s=(e===23||e===31)&&t>=33&&t<=35;if(!(r||s))return!1;const a=e===20||e===21||e===23?1:2,l=this.channels[a];return e===20||e===21||e===28||e===29?t===32?l.ccRCL():t===33?l.ccBS():t===34?l.ccAOF():t===35?l.ccAON():t===36?l.ccDER():t===37?l.ccRU(2):t===38?l.ccRU(3):t===39?l.ccRU(4):t===40?l.ccFON():t===41?l.ccRDC():t===42?l.ccTR():t===43?l.ccRTD():t===44?l.ccEDM():t===45?l.ccCR():t===46?l.ccENM():t===47&&l.ccEOC():l.ccTO(t-32),this.currentChannel=a,!0}parseMidrow(e,t){let r=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?r=1:r=2,r!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const s=this.channels[r];return s?(s.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+Un([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let r;const s=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,a=(e===16||e===24)&&t>=64&&t<=95;if(!(s||a))return!1;const l=e<=23?1:2;t>=64&&t<=95?r=l===1?to[e]:Jn[e]:r=l===1?Xn[e]:Qn[e];const p=this.channels[l];return p?(p.setPAC(this.interpretPAC(r,t)),this.currentChannel=l,!0):!1}interpretPAC(e,t){let r;const s={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?r=t-96:r=t-64,s.underline=(r&1)===1,r<=13?s.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(s.italics=!0,s.color="white"):s.indent=Math.floor((r-16)/2)*4,s}parseChars(e,t){let r,s=null,a=null;if(e>=25?(r=2,a=e-8):(r=1,a=e),a>=17&&a<=19){let l;a===17?l=t+80:a===18?l=t+112:l=t+144,this.logger.log(2,()=>"Special char '"+vn(l)+"' in channel "+r),s=[l]}else e>=32&&e<=127&&(s=t===0?[e]:[e,t]);return s&&this.logger.log(3,()=>"Char codes = "+Un(s).join(",")),s}parseBackgroundAttributes(e,t){const r=(e===16||e===24)&&t>=32&&t<=47,s=(e===23||e===31)&&t>=45&&t<=47;if(!(r||s))return!1;let a;const l={};e===16||e===24?(a=Math.floor((t-32)/2),l.background=As[a],t%2===1&&(l.background=l.background+"_semi")):t===45?l.background="transparent":(l.foreground="black",t===47&&(l.underline=!0));const p=e<=23?1:2;return this.channels[p].setBkgData(l),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}zn(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const r=this.channels[t];r&&r.cueSplitAtTime(e)}}}function zn(c,e,t){t.a=c,t.b=e}function Jo(c,e,t){return t.a===c&&t.b===e}function Qo(){return{a:null,b:null}}class Da{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,r){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var io=function(){if($e!=null&&$e.VTTCue)return self.VTTCue;const c=["","lr","rl"],e=["start","middle","end","left","right"];function t(p,b){if(typeof b!="string"||!Array.isArray(p))return!1;const A=b.toLowerCase();return~p.indexOf(A)?A:!1}function r(p){return t(c,p)}function s(p){return t(e,p)}function a(p,...b){let A=1;for(;A<arguments.length;A++){const M=arguments[A];for(const W in M)p[W]=M[W]}return p}function l(p,b,A){const M=this,W={enumerable:!0};M.hasBeenReset=!1;let ee="",le=!1,oe=p,he=b,me=A,De=null,We="",je=!0,ot="auto",Ye="start",pt=50,at="middle",Ct=50,Bt="middle";Object.defineProperty(M,"id",a({},W,{get:function(){return ee},set:function(ct){ee=""+ct}})),Object.defineProperty(M,"pauseOnExit",a({},W,{get:function(){return le},set:function(ct){le=!!ct}})),Object.defineProperty(M,"startTime",a({},W,{get:function(){return oe},set:function(ct){if(typeof ct!="number")throw new TypeError("Start time must be set to a number.");oe=ct,this.hasBeenReset=!0}})),Object.defineProperty(M,"endTime",a({},W,{get:function(){return he},set:function(ct){if(typeof ct!="number")throw new TypeError("End time must be set to a number.");he=ct,this.hasBeenReset=!0}})),Object.defineProperty(M,"text",a({},W,{get:function(){return me},set:function(ct){me=""+ct,this.hasBeenReset=!0}})),Object.defineProperty(M,"region",a({},W,{get:function(){return De},set:function(ct){De=ct,this.hasBeenReset=!0}})),Object.defineProperty(M,"vertical",a({},W,{get:function(){return We},set:function(ct){const At=r(ct);if(At===!1)throw new SyntaxError("An invalid or illegal string was specified.");We=At,this.hasBeenReset=!0}})),Object.defineProperty(M,"snapToLines",a({},W,{get:function(){return je},set:function(ct){je=!!ct,this.hasBeenReset=!0}})),Object.defineProperty(M,"line",a({},W,{get:function(){return ot},set:function(ct){if(typeof ct!="number"&&ct!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");ot=ct,this.hasBeenReset=!0}})),Object.defineProperty(M,"lineAlign",a({},W,{get:function(){return Ye},set:function(ct){const At=s(ct);if(!At)throw new SyntaxError("An invalid or illegal string was specified.");Ye=At,this.hasBeenReset=!0}})),Object.defineProperty(M,"position",a({},W,{get:function(){return pt},set:function(ct){if(ct<0||ct>100)throw new Error("Position must be between 0 and 100.");pt=ct,this.hasBeenReset=!0}})),Object.defineProperty(M,"positionAlign",a({},W,{get:function(){return at},set:function(ct){const At=s(ct);if(!At)throw new SyntaxError("An invalid or illegal string was specified.");at=At,this.hasBeenReset=!0}})),Object.defineProperty(M,"size",a({},W,{get:function(){return Ct},set:function(ct){if(ct<0||ct>100)throw new Error("Size must be between 0 and 100.");Ct=ct,this.hasBeenReset=!0}})),Object.defineProperty(M,"align",a({},W,{get:function(){return Bt},set:function(ct){const At=s(ct);if(!At)throw new SyntaxError("An invalid or illegal string was specified.");Bt=At,this.hasBeenReset=!0}})),M.displayState=void 0}return l.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},l}();class el{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function xo(c){function e(r,s,a,l){return(r|0)*3600+(s|0)*60+(a|0)+parseFloat(l||0)}const t=c.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 tl{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,r){for(let s=0;s<r.length;++s)if(t===r[s]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const r=parseFloat(t);if(r>=0&&r<=100)return this.set(e,r),!0}return!1}}function So(c,e,t,r){const s=r?c.split(r):[c];for(const a in s){if(typeof s[a]!="string")continue;const l=s[a].split(t);if(l.length!==2)continue;const p=l[0],b=l[1];e(p,b)}}const no=new io(0,0,""),Ra=no.align==="middle"?"middle":"center";function rl(c,e,t){const r=c;function s(){const p=xo(c);if(p===null)throw new Error("Malformed timestamp: "+r);return c=c.replace(/^[^\sa-zA-Z-]+/,""),p}function a(p,b){const A=new tl;So(p,function(ee,le){let oe;switch(ee){case"region":for(let he=t.length-1;he>=0;he--)if(t[he].id===le){A.set(ee,t[he].region);break}break;case"vertical":A.alt(ee,le,["rl","lr"]);break;case"line":oe=le.split(","),A.integer(ee,oe[0]),A.percent(ee,oe[0])&&A.set("snapToLines",!1),A.alt(ee,oe[0],["auto"]),oe.length===2&&A.alt("lineAlign",oe[1],["start",Ra,"end"]);break;case"position":oe=le.split(","),A.percent(ee,oe[0]),oe.length===2&&A.alt("positionAlign",oe[1],["start",Ra,"end","line-left","line-right","auto"]);break;case"size":A.percent(ee,le);break;case"align":A.alt(ee,le,["start",Ra,"end","left","right"]);break}},/:/,/\s/),b.region=A.get("region",null),b.vertical=A.get("vertical","");let M=A.get("line","auto");M==="auto"&&no.line===-1&&(M=-1),b.line=M,b.lineAlign=A.get("lineAlign","start"),b.snapToLines=A.get("snapToLines",!0),b.size=A.get("size",100),b.align=A.get("align",Ra);let W=A.get("position","auto");W==="auto"&&no.position===50&&(W=b.align==="start"||b.align==="left"?0:b.align==="end"||b.align==="right"?100:50),b.position=W}function l(){c=c.replace(/^\s+/,"")}if(l(),e.startTime=s(),l(),c.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+r);c=c.slice(3),l(),e.endTime=s(),l(),a(c,e)}function wo(c){return c.replace(/<br(?: \/)?>/gi,`
`)}class il{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new el,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function r(){let a=t.buffer,l=0;for(a=wo(a);l<a.length&&a[l]!=="\r"&&a[l]!==`
`;)++l;const p=a.slice(0,l);return a[l]==="\r"&&++l,a[l]===`
`&&++l,t.buffer=a.slice(l),p}function s(a){So(a,function(l,p){},/:/)}try{let a="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;a=r();const p=a.match(/^()?WEBVTT([ \t].*)?$/);if(!(p!=null&&p[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let l=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(l?l=!1:a=r(),t.state){case"HEADER":/:/.test(a)?s(a):a||(t.state="ID");continue;case"NOTE":a||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(a)){t.state="NOTE";break}if(!a)continue;if(t.cue=new io(0,0,""),t.state="CUE",a.indexOf("-->")===-1){t.cue.id=a;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{rl(a,t.cue,t.regionList)}catch(p){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const p=a.indexOf("-->")!==-1;if(!a||p&&(l=!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+=a}continue;case"BADCUE":a||(t.state="ID")}}}catch(a){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 nl=/\r\n|\n\r|\n|\r/g,so=function(e,t,r=0){return e.slice(r,r+t.length)===t},sl=function(e){let t=parseInt(e.slice(-3));const r=parseInt(e.slice(-6,-4)),s=parseInt(e.slice(-9,-7)),a=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!v(t)||!v(r)||!v(s)||!v(a))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*r,t+=60*1e3*s,t+=60*60*1e3*a,t},ao=function(e){let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return(t>>>0).toString()};function oo(c,e,t){return ao(c.toString())+ao(e.toString())+ao(t)}const al=function(e,t,r){let s=e[t],a=e[s.prevCC];if(!a||!a.new&&s.new){e.ccOffset=e.presentationOffset=s.start,s.new=!1;return}for(;(l=a)!=null&&l.new;){var l;e.ccOffset+=s.start-a.start,s.new=!1,s=a,a=e[s.prevCC]}e.presentationOffset=r};function ol(c,e,t,r,s,a,l){const p=new il,b=lt(new Uint8Array(c)).trim().replace(nl,`
`).split(`
`),A=[],M=e?wa(e.baseTime,e.timescale):0;let W="00:00.000",ee=0,le=0,oe,he=!0;p.oncue=function(me){const De=t[r];let We=t.ccOffset;const je=(ee-M)/9e4;if(De!=null&&De.new&&(le!==void 0?We=t.ccOffset=De.start:al(t,r,je)),je){if(!e){oe=new Error("Missing initPTS for VTT MPEGTS");return}We=je-t.presentationOffset}const ot=me.endTime-me.startTime,Ye=Di((me.startTime+We-le)*9e4,s*9e4)/9e4;me.startTime=Math.max(Ye,0),me.endTime=Math.max(Ye+ot,0);const pt=me.text.trim();me.text=decodeURIComponent(encodeURIComponent(pt)),me.id||(me.id=oo(me.startTime,me.endTime,pt)),me.endTime>0&&A.push(me)},p.onparsingerror=function(me){oe=me},p.onflush=function(){if(oe){l(oe);return}a(A)},b.forEach(me=>{if(he)if(so(me,"X-TIMESTAMP-MAP=")){he=!1,me.slice(16).split(",").forEach(De=>{so(De,"LOCAL:")?W=De.slice(6):so(De,"MPEGTS:")&&(ee=parseInt(De.slice(7)))});try{le=sl(W)/1e3}catch(De){oe=De}return}else me===""&&(he=!1);p.parse(me+`
`)}),p.flush()}const lo="stpp.ttml.im1t",Eo=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Co=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,ll={left:"start",center:"center",right:"end",start:"start",end:"end"};function Ao(c,e,t,r){const s=Ee(new Uint8Array(c),["mdat"]);if(s.length===0){r(new Error("Could not parse IMSC1 mdat"));return}const a=s.map(p=>lt(p)),l=Ja(e.baseTime,1,e.timescale);try{a.forEach(p=>t(ul(p,l)))}catch(p){r(p)}}function ul(c,e){const s=new DOMParser().parseFromString(c,"text/xml").getElementsByTagName("tt")[0];if(!s)throw new Error("Invalid ttml");const a={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},l=Object.keys(a).reduce((W,ee)=>(W[ee]=s.getAttribute(`ttp:${ee}`)||a[ee],W),{}),p=s.getAttribute("xml:space")!=="preserve",b=To(uo(s,"styling","style")),A=To(uo(s,"layout","region")),M=uo(s,"body","[begin]");return[].map.call(M,W=>{const ee=Do(W,p);if(!ee||!W.hasAttribute("begin"))return null;const le=ho(W.getAttribute("begin"),l),oe=ho(W.getAttribute("dur"),l);let he=ho(W.getAttribute("end"),l);if(le===null)throw Ro(W);if(he===null){if(oe===null)throw Ro(W);he=le+oe}const me=new io(le-e,he-e,ee);me.id=oo(me.startTime,me.endTime,me.text);const De=A[W.getAttribute("region")],We=b[W.getAttribute("style")],je=cl(De,We,b),{textAlign:ot}=je;if(ot){const Ye=ll[ot];Ye&&(me.lineAlign=Ye),me.align=ot}return i(me,je),me}).filter(W=>W!==null)}function uo(c,e,t){const r=c.getElementsByTagName(e)[0];return r?[].slice.call(r.querySelectorAll(t)):[]}function To(c){return c.reduce((e,t)=>{const r=t.getAttribute("xml:id");return r&&(e[r]=t),e},{})}function Do(c,e){return[].slice.call(c.childNodes).reduce((t,r,s)=>{var a;return r.nodeName==="br"&&s?t+`
`:(a=r.childNodes)!=null&&a.length?Do(r,e):e?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent},"")}function cl(c,e,t){const r="http://www.w3.org/ns/ttml#styling";let s=null;const a=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],l=c!=null&&c.hasAttribute("style")?c.getAttribute("style"):null;return l&&t.hasOwnProperty(l)&&(s=t[l]),a.reduce((p,b)=>{const A=co(e,r,b)||co(c,r,b)||co(s,r,b);return A&&(p[b]=A),p},{})}function co(c,e,t){return c&&c.hasAttributeNS(e,t)?c.getAttributeNS(e,t):null}function Ro(c){return new Error(`Could not parse ttml timestamp ${c}`)}function ho(c,e){if(!c)return null;let t=xo(c);return t===null&&(Eo.test(c)?t=hl(c,e):Co.test(c)&&(t=fl(c,e))),t}function hl(c,e){const t=Eo.exec(c),r=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+r/e.frameRate}function fl(c,e){const t=Co.exec(c),r=Number(t[1]);switch(t[2]){case"h":return r*3600;case"m":return r*60;case"ms":return r*1e3;case"f":return r/e.frameRate;case"t":return r/e.tickRate}return r}class dl{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=Io(),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(n.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(n.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(n.FRAG_LOADING,this.onFragLoading,this),e.on(n.FRAG_LOADED,this.onFragLoaded,this),e.on(n.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(n.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(n.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(n.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(n.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(n.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(n.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(n.FRAG_LOADING,this.onFragLoading,this),e.off(n.FRAG_LOADED,this.onFragLoaded,this),e.off(n.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(n.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(n.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(n.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(n.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){const e=new Da(this,"textTrack1"),t=new Da(this,"textTrack2"),r=new Da(this,"textTrack3"),s=new Da(this,"textTrack4");this.cea608Parser1=new ea(1,e,t),this.cea608Parser2=new ea(3,r,s)}}addCues(e,t,r,s,a){let l=!1;for(let p=a.length;p--;){const b=a[p],A=pl(b[0],b[1],t,r);if(A>=0&&(b[0]=Math.min(b[0],t),b[1]=Math.max(b[1],r),l=!0,A/(r-t)>.5))return}if(l||a.push([t,r]),this.config.renderTextTracksNatively){const p=this.captionsTracks[e];this.Cues.newCue(p,t,r,s)}else{const p=this.Cues.newCue(null,t,r,s);this.hls.trigger(n.CUES_PARSED,{type:"captions",cues:p,track:e})}}onInitPtsFound(e,{frag:t,id:r,initPTS:s,timescale:a}){const{unparsedVttFrags:l}=this;r==="main"&&(this.initPTS[t.cc]={baseTime:s,timescale:a}),l.length&&(this.unparsedVttFrags=[],l.forEach(p=>{this.onFragLoaded(n.FRAG_LOADED,p)}))}getExistingTrack(e,t){const{media:r}=this;if(r)for(let s=0;s<r.textTracks.length;s++){const a=r.textTracks[s];if(ko(a,{name:e,lang:t,attrs:{}}))return a}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:r,media:s}=this,{label:a,languageCode:l}=t[e],p=this.getExistingTrack(a,l);if(p)r[e]=p,Si(r[e]),on(r[e],s);else{const b=this.createTextTrack("captions",a,l);b&&(b[e]=!0,r[e]=b)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const r=t.label,s={_id:e,label:r,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=s,this.hls.trigger(n.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[s]})}createTextTrack(e,t,r){const s=this.media;if(s)return s.addTextTrack(e,t,r)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach(t=>{Si(e[t]),delete e[t]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Io(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let r=0;r<t.length;r++)Si(t[r])}onSubtitleTracksUpdated(e,t){const r=t.subtitleTracks||[],s=r.some(a=>a.textCodec===lo);if(this.config.enableWebVTT||s&&this.config.enableIMSC1){if(ir(this.tracks,r)){this.tracks=r;return}if(this.textTracks=[],this.tracks=r,this.config.renderTextTracksNatively){const l=this.media,p=l?qr(l.textTracks):null;if(this.tracks.forEach((b,A)=>{let M;if(p){let W=null;for(let ee=0;ee<p.length;ee++)if(p[ee]&&ko(p[ee],b)){W=p[ee],p[ee]=null;break}W&&(M=W)}if(M)Si(M);else{const W=Lo(b);M=this.createTextTrack(W,b.name,b.lang),M&&(M.mode="disabled")}M&&this.textTracks.push(M)}),p!=null&&p.length){const b=p.filter(A=>A!==null).map(A=>A.label);b.length&&x.warn(`Media element contains unused subtitle tracks: ${b.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const l=this.tracks.map(p=>({label:p.name,kind:p.type.toLowerCase(),default:p.default,subtitleTrack:p}));this.hls.trigger(n.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:l})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(r=>{const s=/(?:CC|SERVICE)([1-4])/.exec(r.instreamId);if(!s)return;const a=`textTrack${s[1]}`,l=this.captionsProperties[a];l&&(l.label=r.name,r.lang&&(l.languageCode=r.lang),l.media=r)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===Ue.MAIN){var r,s;const{cea608Parser1:a,cea608Parser2:l,lastSn:p}=this,{cc:b,sn:A}=t.frag,M=(r=(s=t.part)==null?void 0:s.index)!=null?r:-1;a&&l&&(A!==p+1||A===p&&M!==this.lastPartIndex+1||b!==this.lastCc)&&(a.reset(),l.reset()),this.lastCc=b,this.lastSn=A,this.lastPartIndex=M}}onFragLoaded(e,t){const{frag:r,payload:s}=t;if(r.type===Ue.SUBTITLE)if(s.byteLength){const a=r.decryptdata,l="stats"in t;if(a==null||!a.encrypted||l){const p=this.tracks[r.level],b=this.vttCCs;b[r.cc]||(b[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),p&&p.textCodec===lo?this._parseIMSC1(r,s):this._parseVTTs(t)}}else this.hls.trigger(n.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const r=this.hls;Ao(t,this.initPTS[e.cc],s=>{this._appendCues(s,e.level),r.trigger(n.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},s=>{x.log(`Failed to parse IMSC1: ${s}`),r.trigger(n.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:s})})}_parseVTTs(e){var t;const{frag:r,payload:s}=e,{initPTS:a,unparsedVttFrags:l}=this,p=a.length-1;if(!a[r.cc]&&p===-1){l.push(e);return}const b=this.hls,A=(t=r.initSegment)!=null&&t.data?St(r.initSegment.data,new Uint8Array(s)):s;ol(A,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,M=>{this._appendCues(M,r.level),b.trigger(n.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},M=>{const W=M.message==="Missing initPTS for VTT MPEGTS";W?l.push(e):this._fallbackToIMSC1(r,s),x.log(`Failed to parse VTT cue: ${M}`),!(W&&p>r.cc)&&b.trigger(n.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:M})})}_fallbackToIMSC1(e,t){const r=this.tracks[e.level];r.textCodec||Ao(t,this.initPTS[e.cc],()=>{r.textCodec=lo,this._parseIMSC1(e,t)},()=>{r.textCodec="wvtt"})}_appendCues(e,t){const r=this.hls;if(this.config.renderTextTracksNatively){const s=this.textTracks[t];if(!s||s.mode==="disabled")return;e.forEach(a=>ln(s,a))}else{const s=this.tracks[t];if(!s)return;const a=s.default?"default":"subtitles"+t;r.trigger(n.CUES_PARSED,{type:"subtitles",cues:e,track:a})}}onFragDecrypted(e,t){const{frag:r}=t;r.type===Ue.SUBTITLE&&this.onFragLoaded(n.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){this.initCea608Parsers();const{cea608Parser1:r,cea608Parser2:s}=this;if(!this.enabled||!r||!s)return;const{frag:a,samples:l}=t;if(!(a.type===Ue.MAIN&&this.closedCaptionsForLevel(a)==="NONE"))for(let p=0;p<l.length;p++){const b=l[p].bytes;if(b){const A=this.extractCea608Data(b);r.addData(l[p].pts,A[0]),s.addData(l[p].pts,A[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:r,endOffsetSubtitles:s,type:a}){const{media:l}=this;if(!(!l||l.currentTime<r)){if(!a||a==="video"){const{captionsTracks:p}=this;Object.keys(p).forEach(b=>br(p[b],t,r))}if(this.config.renderTextTracksNatively&&t===0&&s!==void 0){const{textTracks:p}=this;Object.keys(p).forEach(b=>br(p[b],t,s))}}}extractCea608Data(e){const t=[[],[]],r=e[0]&31;let s=2;for(let a=0;a<r;a++){const l=e[s++],p=127&e[s++],b=127&e[s++];if(p===0&&b===0)continue;if((4&l)!==0){const M=3&l;(M===0||M===1)&&(t[M].push(p),t[M].push(b))}}return t}}function Lo(c){return c.characteristics&&/transcribes-spoken-dialog/gi.test(c.characteristics)&&/describes-music-and-sound/gi.test(c.characteristics)?"captions":"subtitles"}function ko(c,e){return!!c&&c.kind===Lo(e)&&kr(e,c)}function pl(c,e,t,r){return Math.min(e,r)-Math.max(c,t)}function Io(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}class fo{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(n.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(n.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(n.MANIFEST_PARSED,this.onManifestParsed,this),e.on(n.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(n.BUFFER_CODECS,this.onBufferCodecs,this),e.on(n.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(n.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(n.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(n.MANIFEST_PARSED,this.onManifestParsed,this),e.off(n.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(n.BUFFER_CODECS,this.onBufferCodecs,this),e.off(n.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const r=this.hls.levels[t.droppedLevel];this.isLevelAllowed(r)&&this.restrictedLevels.push({bitrate:r.bitrate,height:r.height,width:r.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const r=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,r.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&v(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,r=this.getMaxLevel(e.length-1);r!==this.autoLevelCapping&&x.log(`Setting autoLevelCapping to ${r}: ${e[r].height}p@${e[r].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=r,t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const r=t.filter((s,a)=>this.isLevelAllowed(s)&&a<=e);return this.clientRect=null,fo.getMaxLevelByMediaSize(r,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const r=e.getBoundingClientRect();t.width=r.width,t.height=r.height,!t.width&&!t.height&&(t.width=r.right-r.left||e.width||0,t.height=r.bottom-r.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return e}isLevelAllowed(e){return!this.restrictedLevels.some(r=>e.bitrate===r.bitrate&&e.width===r.width&&e.height===r.height)}static getMaxLevelByMediaSize(e,t,r){if(!(e!=null&&e.length))return-1;const s=(p,b)=>b?p.width!==b.width||p.height!==b.height:!0;let a=e.length-1;const l=Math.max(t,r);for(let p=0;p<e.length;p+=1){const b=e[p];if((b.width>=l||b.height>=l)&&s(b,e[p+1])){a=p;break}}return a}}class ml{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(n.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(n.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const r=this.hls.config;if(r.capLevelOnFPSDrop){const s=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=s,s&&typeof s.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,r){const s=performance.now();if(t){if(this.lastTime){const a=s-this.lastTime,l=r-this.lastDroppedFrames,p=t-this.lastDecodedFrames,b=1e3*l/a,A=this.hls;if(A.trigger(n.FPS_DROP,{currentDropped:l,currentDecoded:p,totalDroppedFrames:r}),b>0&&l>A.config.fpsDroppedMonitoringThreshold*p){let M=A.currentLevel;x.warn("drop FPS ratio greater than max allowed value for currentLevel: "+M),M>0&&(A.autoLevelCapping===-1||A.autoLevelCapping>=M)&&(M=M-1,A.trigger(n.FPS_DROP_LEVEL_CAPPING,{level:M,droppedLevel:A.currentLevel}),A.autoLevelCapping=M,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=r,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}const La="[eme]";class Rs{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=Rs.CDMCleanupPromise?[Rs.CDMCleanupPromise]:[],this.debug=x.debug.bind(x,La),this.log=x.log.bind(x,La),this.warn=x.warn.bind(x,La),this.error=x.error.bind(x,La),this.onMediaEncrypted=t=>{const{initDataType:r,initData:s}=t,a=`"${t.type}" event: init data type: "${r}"`;if(this.debug(a),s!==null){if(!this.keyFormatPromise){let l=Object.keys(this.keySystemAccessPromises);l.length||(l=Yt(this.config));const p=l.map(It).filter(b=>!!b);this.keyFormatPromise=this.getKeyFormatPromise(p)}this.keyFormatPromise.then(l=>{const p=et(l);let b,A;if(r==="sinf"){if(p!==Ge.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${p}`);return}const oe=bt(new Uint8Array(s));try{const he=k(JSON.parse(oe).sinf),me=dt(he);if(!me)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");b=me.subarray(8,24),A=Ge.FAIRPLAY}catch(he){this.warn(`${a} Failed to parse sinf: ${he}`);return}}else{if(p!==Ge.WIDEVINE&&p!==Ge.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${p}`);return}const oe=jr(s),he=oe.filter(De=>!!De.systemId&&tt(De.systemId)===p);he.length>1&&this.warn(`${a} Using first of ${he.length} pssh found for selected key-system ${p}`);const me=he[0];if(!me){oe.length===0||oe.some(De=>!De.systemId)?this.warn(`${a} contains incomplete or invalid pssh data`):this.log(`ignoring ${a} for ${oe.map(De=>tt(De.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(A=tt(me.systemId),me.version===0&&me.data)if(A===Ge.WIDEVINE){const De=me.data.length-22;b=me.data.subarray(De,De+16)}else A===Ge.PLAYREADY&&(b=Ft(me.data))}if(!A||!b){this.log(`Unable to handle ${a} with key-system ${p}`);return}const M=_t.hexDump(b),{keyIdToKeySessionPromise:W,mediaKeySessions:ee}=this;let le=W[M];for(let oe=0;oe<ee.length;oe++){const he=ee[oe],me=he.decryptdata;if(!me.keyId)continue;const De=_t.hexDump(me.keyId);if(M===De||me.uri.replace(/-/g,"").indexOf(M)!==-1){if(le=W[De],me.pssh)break;delete W[De],me.pssh=new Uint8Array(s),me.keyId=b,le=W[M]=le.then(()=>this.generateRequestWithPreferredKeySession(he,r,s,"encrypted-event-key-match")),le.catch(We=>this.handleError(We));break}}if(!le){if(A!==p){this.log(`Ignoring "${a}" with ${A} init data for selected key-system ${p}`);return}le=W[M]=this.getKeySystemSelectionPromise([A]).then(({keySystem:oe,mediaKeys:he})=>{var me;this.throwIfDestroyed();const De=new cr("ISO-23001-7",M,(me=It(oe))!=null?me:"");return De.pssh=new Uint8Array(s),De.keyId=b,this.attemptSetMediaKeys(oe,he).then(()=>{this.throwIfDestroyed();const We=this.createMediaKeySessionContext({decryptdata:De,keySystem:oe,mediaKeys:he});return this.generateRequestWithPreferredKeySession(We,r,s,"encrypted-event-no-match")})}),le.catch(oe=>this.handleError(oe))}})}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),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(n.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(n.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(n.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(n.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(n.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(n.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(n.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(n.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:r}=this.config,s=t[e];if(s)return s.licenseUrl;if(e===Ge.WIDEVINE&&r)return r}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(t===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,r=t[e];if(r)return r.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,r=(l,p,b)=>!!l&&b.indexOf(l)===p,s=t.map(l=>l.audioCodec).filter(r),a=t.map(l=>l.videoCodec).filter(r);return s.length+a.length===0&&a.push("avc1.42e01e"),new Promise((l,p)=>{const b=A=>{const M=A.shift();this.getMediaKeysPromise(M,s,a).then(W=>l({keySystem:M,mediaKeys:W})).catch(W=>{A.length?b(A):W instanceof nn?p(W):p(new nn({type:o.KEY_SYSTEM_ERROR,details:u.KEY_SYSTEM_NO_ACCESS,error:W,fatal:!0},W.message))})};b(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:r}=this.config;if(typeof r!="function"){let s=`Configured requestMediaKeySystemAccess is not a function ${r}`;return qt===null&&self.location.protocol==="http:"&&(s=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(s))}return r(e,t)}getMediaKeysPromise(e,t,r){const s=Ot(e,t,r,this.config.drmSystemOptions),a=this.keySystemAccessPromises[e];let l=a==null?void 0:a.keySystemAccess;if(!l){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(s)}`),l=this.requestMediaKeySystemAccess(e,s);const p=this.keySystemAccessPromises[e]={keySystemAccess:l};return l.catch(b=>{this.log(`Failed to obtain access to key-system "${e}": ${b}`)}),l.then(b=>{this.log(`Access for key-system "${b.keySystem}" obtained`);const A=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),p.mediaKeys=b.createMediaKeys().then(M=>(this.log(`Media-keys created for "${e}"`),A.then(W=>W?this.setMediaKeysServerCertificate(M,e,W):M))),p.mediaKeys.catch(M=>{this.error(`Failed to create media-keys for "${e}"}: ${M}`)}),p.mediaKeys})}return l.then(()=>a.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:r}){this.log(`Creating key-system session "${t}" keyId: ${_t.hexDump(e.keyId||[])}`);const s=r.createSession(),a={decryptdata:e,keySystem:t,mediaKeys:r,mediaKeysSession:s,keyStatus:"status-pending"};return this.mediaKeySessions.push(a),a}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const r=this.createMediaKeySessionContext(e),s=this.getKeyIdString(t),a="cenc";this.keyIdToKeySessionPromise[s]=this.generateRequestWithPreferredKeySession(r,a,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return _t.hexDump(e.keyId)}updateKeySession(e,t){var r;const s=e.mediaKeysSession;return this.log(`Updating key-session "${s.sessionId}" for keyID ${_t.hexDump(((r=e.decryptdata)==null?void 0:r.keyId)||[])}
} (data length: ${t&&t.byteLength})`),s.update(t)}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){return new Promise((t,r)=>{const s=Yt(this.config),a=e.map(et).filter(l=>!!l&&s.indexOf(l)!==-1);return this.getKeySystemSelectionPromise(a).then(({keySystem:l})=>{const p=It(l);p?t(p):r(new Error(`Unable to find format for key-system "${l}"`))}).catch(r)})}loadKey(e){const t=e.keyInfo.decryptdata,r=this.getKeyIdString(t),s=`(keyId: ${r} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${s}`);let a=this.keyIdToKeySessionPromise[r];return a||(a=this.keyIdToKeySessionPromise[r]=this.getKeySystemForKeyPromise(t).then(({keySystem:l,mediaKeys:p})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${s}`),this.attemptSetMediaKeys(l,p).then(()=>{this.throwIfDestroyed();const b=this.createMediaKeySessionContext({keySystem:l,mediaKeys:p,decryptdata:t});return this.generateRequestWithPreferredKeySession(b,"cenc",t.pssh,"playlist-key")}))),a.catch(l=>this.handleError(l))),a}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof nn?this.hls.trigger(n.ERROR,e.data):this.hls.trigger(n.ERROR,{type:o.KEY_SYSTEM_ERROR,details:u.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),r=this.keyIdToKeySessionPromise[t];if(!r){const s=et(e.keyFormat),a=s?[s]:Yt(this.config);return this.attemptKeySystemAccess(a)}return r}getKeySystemSelectionPromise(e){if(e.length||(e=Yt(this.config)),e.length===0)throw new nn({type:o.KEY_SYSTEM_ERROR,details:u.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){const r=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const s=Promise.all(r).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(s),s.then(()=>{this.log(`Media-keys set for "${e}"`),r.push(s),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(a=>r.indexOf(a)===-1)})}generateRequestWithPreferredKeySession(e,t,r,s){var a,l;const p=(a=this.config.drmSystems)==null||(l=a[e.keySystem])==null?void 0:l.generateRequest;if(p)try{const oe=p.call(this.hls,t,r,e);if(!oe)throw new Error("Invalid response from configured generateRequest filter");t=oe.initDataType,r=e.decryptdata.pssh=oe.initData?new Uint8Array(oe.initData):null}catch(oe){var b;if(this.warn(oe.message),(b=this.hls)!=null&&b.config.debug)throw oe}if(r===null)return this.log(`Skipping key-session request for "${s}" (no initData)`),Promise.resolve(e);const A=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${s}": ${A} (init data type: ${t} length: ${r?r.byteLength:null})`);const M=new vt,W=e._onmessage=oe=>{const he=e.mediaKeysSession;if(!he){M.emit("error",new Error("invalid state"));return}const{messageType:me,message:De}=oe;this.log(`"${me}" message event for session "${he.sessionId}" message size: ${De.byteLength}`),me==="license-request"||me==="license-renewal"?this.renewLicense(e,De).catch(We=>{this.handleError(We),M.emit("error",We)}):me==="license-release"?e.keySystem===Ge.FAIRPLAY&&(this.updateKeySession(e,Oe("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${me}"`)},ee=e._onkeystatuseschange=oe=>{if(!e.mediaKeysSession){M.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const me=e.keyStatus;M.emit("keyStatus",me),me==="expired"&&(this.warn(`${e.keySystem} expired for key ${A}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",W),e.mediaKeysSession.addEventListener("keystatuseschange",ee);const le=new Promise((oe,he)=>{M.on("error",he),M.on("keyStatus",me=>{me.startsWith("usable")?oe():me==="output-restricted"?he(new nn({type:o.KEY_SYSTEM_ERROR,details:u.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):me==="internal-error"?he(new nn({type:o.KEY_SYSTEM_ERROR,details:u.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${me}"`)):me==="expired"?he(new Error("key expired while generating request")):this.warn(`unhandled key status change "${me}"`)})});return e.mediaKeysSession.generateRequest(t,r).then(()=>{var oe;this.log(`Request generated for key-session "${(oe=e.mediaKeysSession)==null?void 0:oe.sessionId}" keyId: ${A}`)}).catch(oe=>{throw new nn({type:o.KEY_SYSTEM_ERROR,details:u.KEY_SYSTEM_NO_SESSION,error:oe,fatal:!1},`Error generating key-session request: ${oe}`)}).then(()=>le).catch(oe=>{throw M.removeAllListeners(),this.removeSession(e),oe}).then(()=>(M.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,r)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${_t.hexDump("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r))} session keyId: ${_t.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,r=t.loader,s=new r(t),a=this.getServerCertificateUrl(e);return a?(this.log(`Fetching server certificate for "${e}"`),new Promise((l,p)=>{const b={responseType:"arraybuffer",url:a},A=t.certLoadPolicy.default,M={loadPolicy:A,timeout:A.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},W={onSuccess:(ee,le,oe,he)=>{l(ee.data)},onError:(ee,le,oe,he)=>{p(new nn({type:o.KEY_SYSTEM_ERROR,details:u.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:oe,response:F({url:b.url,data:void 0},ee)},`"${e}" certificate request failed (${a}). Status: ${ee.code} (${ee.text})`))},onTimeout:(ee,le,oe)=>{p(new nn({type:o.KEY_SYSTEM_ERROR,details:u.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:oe,response:{url:b.url,data:void 0}},`"${e}" certificate request timed out (${a})`))},onAbort:(ee,le,oe)=>{p(new Error("aborted"))}};s.load(b,M,W)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,r){return new Promise((s,a)=>{e.setServerCertificate(r).then(l=>{this.log(`setServerCertificate ${l?"success":"not supported by CDM"} (${r==null?void 0:r.byteLength}) on "${t}"`),s(e)}).catch(l=>{a(new nn({type:o.KEY_SYSTEM_ERROR,details:u.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:l,fatal:!0},l.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(r=>this.updateKeySession(e,new Uint8Array(r)).catch(s=>{throw new nn({type:o.KEY_SYSTEM_ERROR,details:u.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:s,fatal:!0},s.message)}))}unpackPlayReadyKeyMessage(e,t){const r=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!r.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const s=new DOMParser().parseFromString(r,"application/xml"),a=s.querySelectorAll("HttpHeader");if(a.length>0){let M;for(let W=0,ee=a.length;W<ee;W++){var l,p;M=a[W];const le=(l=M.querySelector("name"))==null?void 0:l.textContent,oe=(p=M.querySelector("value"))==null?void 0:p.textContent;le&&oe&&e.setRequestHeader(le,oe)}}const b=s.querySelector("Challenge"),A=b==null?void 0:b.textContent;if(!A)throw new Error("Cannot find <Challenge> in key message");return Oe(atob(A))}setupLicenseXHR(e,t,r,s){const a=this.config.licenseXhrSetup;return a?Promise.resolve().then(()=>{if(!r.decryptdata)throw new Error("Key removed");return a.call(this.hls,e,t,r,s)}).catch(l=>{if(!r.decryptdata)throw l;return e.open("POST",t,!0),a.call(this.hls,e,t,r,s)}).then(l=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:l||s})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:s}))}requestLicense(e,t){const r=this.config.keyLoadPolicy.default;return new Promise((s,a)=>{const l=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${l}`);const p=new XMLHttpRequest;p.responseType="arraybuffer",p.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return a(new Error("invalid state"));if(p.readyState===4)if(p.status===200){this._requestLicenseFailureCount=0;let b=p.response;this.log(`License received ${b instanceof ArrayBuffer?b.byteLength:b}`);const A=this.config.licenseResponseCallback;if(A)try{b=A.call(this.hls,p,l,e)}catch(M){this.error(M)}s(b)}else{const b=r.errorRetry,A=b?b.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>A||p.status>=400&&p.status<500)a(new nn({type:o.KEY_SYSTEM_ERROR,details:u.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:p,response:{url:l,data:void 0,code:p.status,text:p.statusText}},`License Request XHR failed (${l}). Status: ${p.status} (${p.statusText})`));else{const M=A-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${M} attempts left`),this.requestLicense(e,t).then(s,a)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=p,this.setupLicenseXHR(p,l,e,t).then(({xhr:b,licenseChallenge:A})=>{e.keySystem==Ge.PLAYREADY&&(A=this.unpackPlayReadyKeyMessage(b,A)),b.send(A)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const r=t.media;this.media=r,r.removeEventListener("encrypted",this.onMediaEncrypted),r.removeEventListener("waitingforkey",this.onWaitingForKey),r.addEventListener("encrypted",this.onMediaEncrypted),r.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},cr.clearKeyUriToKeyIdMap();const r=t.length;Rs.CDMCleanupPromise=Promise.all(t.map(s=>this.removeSession(s)).concat(e==null?void 0:e.setMediaKeys(null).catch(s=>{this.log(`Could not clear media keys: ${s}`)}))).then(()=>{r&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)}).catch(s=>{this.log(`Could not close sessions and clear media keys: ${s}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const r=t.reduce((s,a)=>(s.indexOf(a.keyFormat)===-1&&s.push(a.keyFormat),s),[]);this.log(`Selecting key-system from session-keys ${r.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(r)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:r}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),r&&r.readyState!==XMLHttpRequest.DONE&&r.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const s=this.mediaKeySessions.indexOf(e);return s>-1&&this.mediaKeySessions.splice(s,1),t.remove().catch(a=>{this.log(`Could not remove session: ${a}`)}).then(()=>t.close()).catch(a=>{this.log(`Could not close session: ${a}`)})}}}Rs.CDMCleanupPromise=void 0;class nn 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}}var Ri;(function(c){c.MANIFEST="m",c.AUDIO="a",c.VIDEO="v",c.MUXED="av",c.INIT="i",c.CAPTION="c",c.TIMED_TEXT="tt",c.KEY="k",c.OTHER="o"})(Ri||(Ri={}));var po;(function(c){c.DASH="d",c.HLS="h",c.SMOOTH="s",c.OTHER="o"})(po||(po={}));var os;(function(c){c.OBJECT="CMCD-Object",c.REQUEST="CMCD-Request",c.SESSION="CMCD-Session",c.STATUS="CMCD-Status"})(os||(os={}));const gl={[os.OBJECT]:["br","d","ot","tb"],[os.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[os.SESSION]:["cid","pr","sf","sid","st","v"],[os.STATUS]:["bs","rtp"]};class Ls{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map(r=>r instanceof Ls?r:new Ls(r))),this.value=e,this.params=t}}class Oo{constructor(e){this.description=void 0,this.description=e}}const _l="Dict";function vl(c){return Array.isArray(c)?JSON.stringify(c):c instanceof Map?"Map{}":c instanceof Set?"Set{}":typeof c=="object"?JSON.stringify(c):String(c)}function yl(c,e,t,r){return new Error(`failed to ${c} "${vl(e)}" as ${t}`,{cause:r})}const Po="Bare Item",bl="Boolean",xl="Byte Sequence",Sl="Decimal",wl="Integer";function El(c){return c<-999999999999999||999999999999999<c}const Cl=/[\x00-\x1f\x7f]+/,Al="Token",Tl="Key";function Dn(c,e,t){return yl("serialize",c,e,t)}function Dl(c){if(typeof c!="boolean")throw Dn(c,bl);return c?"?1":"?0"}function Rl(c){return btoa(String.fromCharCode(...c))}function Ll(c){if(ArrayBuffer.isView(c)===!1)throw Dn(c,xl);return`:${Rl(c)}:`}function Mo(c){if(El(c))throw Dn(c,wl);return c.toString()}function kl(c){return`@${Mo(c.getTime()/1e3)}`}function Fo(c,e){if(c<0)return-Fo(-c,e);const t=Math.pow(10,e);if(Math.abs(c*t%1-.5)<Number.EPSILON){const s=Math.floor(c*t);return(s%2===0?s:s+1)/t}else return Math.round(c*t)/t}function Il(c){const e=Fo(c,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Dn(c,Sl);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Ol="String";function Pl(c){if(Cl.test(c))throw Dn(c,Ol);return`"${c.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Ml(c){return c.description||c.toString().slice(7,-1)}function Bo(c){const e=Ml(c);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Dn(e,Al);return e}function mo(c){switch(typeof c){case"number":if(!v(c))throw Dn(c,Po);return Number.isInteger(c)?Mo(c):Il(c);case"string":return Pl(c);case"symbol":return Bo(c);case"boolean":return Dl(c);case"object":if(c instanceof Date)return kl(c);if(c instanceof Uint8Array)return Ll(c);if(c instanceof Oo)return Bo(c);default:throw Dn(c,Po)}}function go(c){if(/^[a-z*][a-z0-9\-_.*]*$/.test(c)===!1)throw Dn(c,Tl);return c}function _o(c){return c==null?"":Object.entries(c).map(([e,t])=>t===!0?`;${go(e)}`:`;${go(e)}=${mo(t)}`).join("")}function No(c){return c instanceof Ls?`${mo(c.value)}${_o(c.params)}`:mo(c)}function Fl(c){return`(${c.value.map(No).join(" ")})${_o(c.params)}`}function Bl(c,e={whitespace:!0}){if(typeof c!="object")throw Dn(c,_l);const t=c instanceof Map?c.entries():Object.entries(c),r=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([s,a])=>{a instanceof Ls||(a=new Ls(a));let l=go(s);return a.value===!0?l+=_o(a.params):(l+="=",Array.isArray(a.value)?l+=Fl(a):l+=No(a)),l}).join(`,${r}`)}function Nl(c,e){return Bl(c,e)}const Ul=c=>c==="ot"||c==="sf"||c==="st",zl=c=>typeof c=="number"?v(c):c!=null&&c!==""&&c!==!1;function Hl(c,e){const t=new URL(c),r=new URL(e);if(t.origin!==r.origin)return c;const s=t.pathname.split("/").slice(1),a=r.pathname.split("/").slice(1,-1);for(;s[0]===a[0];)s.shift(),a.shift();for(;a.length;)a.shift(),s.unshift("..");return s.join("/")}function $l(){try{return crypto.randomUUID()}catch(c){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,s=>{const a=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(s=="x"?a:a&3|8).toString(16)})}}}const ka=c=>Math.round(c),jl=(c,e)=>(e!=null&&e.baseUrl&&(c=Hl(c,e.baseUrl)),encodeURIComponent(c)),Ia=c=>ka(c/100)*100,Wl={br:ka,d:ka,bl:Ia,dl:Ia,mtp:Ia,nor:jl,rtp:Ia,tb:ka};function Gl(c,e){const t={};if(c==null||typeof c!="object")return t;const r=Object.keys(c).sort(),s=i({},Wl,e==null?void 0:e.formatters),a=e==null?void 0:e.filter;return r.forEach(l=>{if(a!=null&&a(l))return;let p=c[l];const b=s[l];b&&(p=b(p,e)),!(l==="v"&&p===1)&&(l=="pr"&&p===1||zl(p)&&(Ul(l)&&typeof p=="string"&&(p=new Oo(p)),t[l]=p))}),t}function Uo(c,e={}){return c?Nl(Gl(c,e),i({whitespace:!1},e)):""}function Kl(c,e={}){if(!c)return{};const t=Object.entries(c),r=Object.entries(gl).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),s=t.reduce((a,l)=>{var p,b;const[A,M]=l,W=((p=r.find(ee=>ee[1].includes(A)))==null?void 0:p[0])||os.REQUEST;return(b=a[W])!=null||(a[W]={}),a[W][A]=M,a},{});return Object.entries(s).reduce((a,[l,p])=>(a[l]=Uo(p,e),a),{})}function Vl(c,e,t){return i(c,Kl(e,t))}const ql="CMCD";function Yl(c,e={}){if(!c)return"";const t=Uo(c,e);return`${ql}=${encodeURIComponent(t)}`}const zo=/CMCD=[^&#]+/;function Zl(c,e,t){const r=Yl(e,t);if(!r)return c;if(zo.test(c))return c.replace(zo,r);const s=c.includes("?")?"&":"?";return`${c}${s}${r}`}class Xl{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=s=>{try{this.apply(s,{ot:Ri.MANIFEST,su:!this.initialized})}catch(a){x.warn("Could not generate manifest CMCD data.",a)}},this.applyFragmentData=s=>{try{const a=s.frag,l=this.hls.levels[a.level],p=this.getObjectType(a),b={d:a.duration*1e3,ot:p};(p===Ri.VIDEO||p===Ri.AUDIO||p==Ri.MUXED)&&(b.br=l.bitrate/1e3,b.tb=this.getTopBandwidth(p)/1e3,b.bl=this.getBufferLength(p)),this.apply(s,b)}catch(a){x.warn("Could not generate segment CMCD data.",a)}},this.hls=e;const t=this.config=e.config,{cmcd:r}=t;r!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||$l(),this.cid=r.contentId,this.useHeaders=r.useHeaders===!0,this.includeKeys=r.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(n.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.MEDIA_DETACHED,this.onMediaDetached,this),e.on(n.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(n.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.MEDIA_DETACHED,this.onMediaDetached,this),e.off(n.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var r,s;this.audioBuffer=(r=t.tracks.audio)==null?void 0:r.buffer,this.videoBuffer=(s=t.tracks.video)==null?void 0:s.buffer}createData(){var e;return{v:1,sf:po.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){i(t,this.createData());const r=t.ot===Ri.INIT||t.ot===Ri.VIDEO||t.ot===Ri.MUXED;this.starved&&r&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:s}=this;s&&(t=Object.keys(t).reduce((a,l)=>(s.includes(l)&&(a[l]=t[l]),a),{})),this.useHeaders?(e.headers||(e.headers={}),Vl(e.headers,t)):e.url=Zl(e.url,t)}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Ri.TIMED_TEXT;if(e.sn==="initSegment")return Ri.INIT;if(t==="audio")return Ri.AUDIO;if(t==="main")return this.hls.audioTracks.length?Ri.VIDEO:Ri.MUXED}getTopBandwidth(e){let t=0,r;const s=this.hls;if(e===Ri.AUDIO)r=s.audioTracks;else{const a=s.maxAutoLevel,l=a>-1?a+1:s.levels.length;r=s.levels.slice(0,l)}for(const a of r)a.bitrate>t&&(t=a.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.hls.media,r=e===Ri.AUDIO?this.audioBuffer:this.videoBuffer;return!r||!t?NaN:Fr.bufferInfo(r,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,r=e||this.config.loader;return class{constructor(a){this.loader=void 0,this.loader=new r(a)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(a,l,p){t(a),this.loader.load(a,l,p)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,r=e||this.config.loader;return class{constructor(a){this.loader=void 0,this.loader=new r(a)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(a,l,p){t(a),this.loader.load(a,l,p)}}}}const Jl=3e5;class Ql{constructor(e){this.hls=void 0,this.log=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.log=x.log.bind(x,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(n.MANIFEST_PARSED,this.onManifestParsed,this),e.on(n.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(n.MANIFEST_PARSED,this.onManifestParsed,this),e.off(n.ERROR,this.onError,this))}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(r=>r!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:r}=t;r!==null&&(this.pathwayId=r.pathwayId,this.uri=r.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:r}=t;if((r==null?void 0:r.action)===Mt.SendAlternateToPenaltyBox&&r.flags===mr.MoveAllAlternatesMatchingHost){const s=this.levels;let a=this.pathwayPriority,l=this.pathwayId;if(t.context){const{groupId:p,pathwayId:b,type:A}=t.context;p&&s?l=this.getPathwayForGroupId(p,A,l):b&&(l=b)}l in this.penalizedPathways||(this.penalizedPathways[l]=performance.now()),!a&&s&&(a=s.reduce((p,b)=>(p.indexOf(b.pathwayId)===-1&&p.push(b.pathwayId),p),[])),a&&a.length>1&&(this.updatePathwayPriority(a),r.resolved=this.pathwayId!==l),r.resolved||x.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${l} levels: ${s&&s.length} priorities: ${JSON.stringify(a)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const r=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${r}"`),t=this.getLevelsForPathway(r),this.pathwayId=r}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this.pathwayPriority=e;let t;const r=this.penalizedPathways,s=performance.now();Object.keys(r).forEach(a=>{s-r[a]>Jl&&delete r[a]});for(let a=0;a<e.length;a++){const l=e[a];if(l in r)continue;if(l===this.pathwayId)return;const p=this.hls.nextLoadLevel,b=this.hls.levels[p];if(t=this.getLevelsForPathway(l),t.length>0){this.log(`Setting Pathway to "${l}"`),this.pathwayId=l,ei(t),this.hls.trigger(n.LEVELS_UPDATED,{levels:t});const A=this.hls.levels[p];b&&A&&this.levels&&(A.attrs["STABLE-VARIANT-ID"]!==b.attrs["STABLE-VARIANT-ID"]&&A.bitrate!==b.bitrate&&this.log(`Unstable Pathways change from bitrate ${b.bitrate} to ${A.bitrate}`),this.hls.nextLoadLevel=p);break}}}getPathwayForGroupId(e,t,r){const s=this.getLevelsForPathway(r).concat(this.levels||[]);for(let a=0;a<s.length;a++)if(t===lr.AUDIO_TRACK&&s[a].hasAudioGroup(e)||t===lr.SUBTITLE_TRACK&&s[a].hasSubtitleGroup(e))return s[a].pathwayId;return r}clonePathways(e){const t=this.levels;if(!t)return;const r={},s={};e.forEach(a=>{const{ID:l,"BASE-ID":p,"URI-REPLACEMENT":b}=a;if(t.some(M=>M.pathwayId===l))return;const A=this.getLevelsForPathway(p).map(M=>{const W=new z(M.attrs);W["PATHWAY-ID"]=l;const ee=W.AUDIO&&`${W.AUDIO}_clone_${l}`,le=W.SUBTITLES&&`${W.SUBTITLES}_clone_${l}`;ee&&(r[W.AUDIO]=ee,W.AUDIO=ee),le&&(s[W.SUBTITLES]=le,W.SUBTITLES=le);const oe=$o(M.uri,W["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",b),he=new mi({attrs:W,audioCodec:M.audioCodec,bitrate:M.bitrate,height:M.height,name:M.name,url:oe,videoCodec:M.videoCodec,width:M.width});if(M.audioGroups)for(let me=1;me<M.audioGroups.length;me++)he.addGroupId("audio",`${M.audioGroups[me]}_clone_${l}`);if(M.subtitleGroups)for(let me=1;me<M.subtitleGroups.length;me++)he.addGroupId("text",`${M.subtitleGroups[me]}_clone_${l}`);return he});t.push(...A),Ho(this.audioTracks,r,b,l),Ho(this.subtitleTracks,s,b,l)})}loadSteeringManifest(e){const t=this.hls.config,r=t.loader;this.loader&&this.loader.destroy(),this.loader=new r(t);let s;try{s=new self.URL(e)}catch(M){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(s.protocol!=="data:"){const M=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;s.searchParams.set("_HLS_pathway",this.pathwayId),s.searchParams.set("_HLS_throughput",""+M)}const a={responseType:"json",url:s.href},l=t.steeringManifestLoadPolicy.default,p=l.errorRetry||l.timeoutRetry||{},b={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:p.maxNumRetry||0,retryDelay:p.retryDelayMs||0,maxRetryDelay:p.maxRetryDelayMs||0},A={onSuccess:(M,W,ee,le)=>{this.log(`Loaded steering manifest: "${s}"`);const oe=M.data;if(oe.VERSION!==1){this.log(`Steering VERSION ${oe.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=oe.TTL;const{"RELOAD-URI":he,"PATHWAY-CLONES":me,"PATHWAY-PRIORITY":De}=oe;if(he)try{this.uri=new self.URL(he,s).href}catch(je){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${he}`);return}this.scheduleRefresh(this.uri||ee.url),me&&this.clonePathways(me);const We={steeringManifest:oe,url:s.toString()};this.hls.trigger(n.STEERING_MANIFEST_LOADED,We),De&&this.updatePathwayPriority(De)},onError:(M,W,ee,le)=>{if(this.log(`Error loading steering manifest: ${M.code} ${M.text} (${W.url})`),this.stopLoad(),M.code===410){this.enabled=!1,this.log(`Steering manifest ${W.url} no longer available`);return}let oe=this.timeToLoad*1e3;if(M.code===429){const he=this.loader;if(typeof(he==null?void 0:he.getResponseHeader)=="function"){const me=he.getResponseHeader("Retry-After");me&&(oe=parseFloat(me)*1e3)}this.log(`Steering manifest ${W.url} rate limited`);return}this.scheduleRefresh(this.uri||W.url,oe)},onTimeout:(M,W,ee)=>{this.log(`Timeout loading steering manifest (${W.url})`),this.scheduleRefresh(this.uri||W.url)}};this.log(`Requesting steering manifest: ${s}`),this.loader.load(a,b,A)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var r;const s=(r=this.hls)==null?void 0:r.media;if(s&&!s.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function Ho(c,e,t,r){c&&Object.keys(e).forEach(s=>{const a=c.filter(l=>l.groupId===s).map(l=>{const p=i({},l);return p.details=void 0,p.attrs=new z(p.attrs),p.url=p.attrs.URI=$o(l.url,l.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),p.groupId=p.attrs["GROUP-ID"]=e[s],p.attrs["PATHWAY-ID"]=r,p});c.push(...a)})}function $o(c,e,t,r){const{HOST:s,PARAMS:a,[t]:l}=r;let p;e&&(p=l==null?void 0:l[e],p&&(c=p));const b=new self.URL(c);return s&&!p&&(b.host=s),a&&Object.keys(a).sort().forEach(A=>{A&&b.searchParams.set(A,a[A])}),b.href}const eu=/^age:\s*[\d.]+\s*$/im;class jo{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,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=r,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const r=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0,s.aborted=!1;const a=this.xhrSetup;a?Promise.resolve().then(()=>{if(!(this.loader!==r||this.stats.aborted))return a(r,t.url)}).catch(l=>{if(!(this.loader!==r||this.stats.aborted))return r.open("GET",t.url,!0),a(r,t.url)}).then(()=>{this.loader!==r||this.stats.aborted||this.openAndSendXhr(r,t,e)}).catch(l=>{this.callbacks.onError({code:r.status,text:l.message},t,r,s)}):this.openAndSendXhr(r,t,e)}openAndSendXhr(e,t,r){e.readyState||e.open("GET",t.url,!0);const s=t.headers,{maxTimeToFirstByteMs:a,maxLoadTimeMs:l}=r.loadPolicy;if(s)for(const p in s)e.setRequestHeader(p,s[p]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),r.timeout=a&&v(a)?a:l,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:r}=this;if(!e||!t)return;const s=t.readyState,a=this.config;if(!r.aborted&&s>=2&&(r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start),a.timeout!==a.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),a.timeout=a.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.loadPolicy.maxLoadTimeMs-(r.loading.first-r.loading.start)))),s===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const l=t.status,p=t.responseType==="text"?t.responseText:null;if(l>=200&&l<300){const W=p!=null?p:t.response;if(W!=null){r.loading.end=Math.max(self.performance.now(),r.loading.first);const ee=t.responseType==="arraybuffer"?W.byteLength:W.length;if(r.loaded=r.total=ee,r.bwEstimate=r.total*8e3/(r.loading.end-r.loading.first),!this.callbacks)return;const le=this.callbacks.onProgress;if(le&&le(r,e,W,t),!this.callbacks)return;const oe={url:t.responseURL,data:W,code:l};this.callbacks.onSuccess(oe,r,e,t);return}}const b=a.loadPolicy.errorRetry,A=r.retry,M={url:e.url,data:void 0,code:l};zi(b,A,!1,M)?this.retry(b):(x.error(`${l} while loading ${e.url}`),this.callbacks.onError({code:l,text:t.statusText},e,t,r))}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(zi(e,t,!0))this.retry(e);else{var r;x.warn(`timeout while loading ${(r=this.context)==null?void 0:r.url}`);const s=this.callbacks;s&&(this.abortInternal(),s.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:r}=this;this.retryDelay=Ui(e,r.retry),r.retry++,x.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${r.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&eu.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}}function tu(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(c){}return!1}const ru=/(\d+)-(\d+)\/(\d+)/;class Wo{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||au,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,r){const s=this.stats;if(s.loading.start)throw new Error("Loader can only be used once.");s.loading.start=self.performance.now();const a=iu(e,this.controller.signal),l=r.onProgress,p=e.responseType==="arraybuffer",b=p?"byteLength":"length",{maxTimeToFirstByteMs:A,maxLoadTimeMs:M}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,a),self.clearTimeout(this.requestTimeout),t.timeout=A&&v(A)?A:M,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),r.onTimeout(s,e,this.response)},t.timeout),self.fetch(this.request).then(W=>{this.response=this.loader=W;const ee=Math.max(self.performance.now(),s.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=M,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),r.onTimeout(s,e,this.response)},M-(ee-s.loading.start)),!W.ok){const{status:le,statusText:oe}=W;throw new ou(oe||"fetch, bad network response",le,W)}return s.loading.first=ee,s.total=su(W.headers)||s.total,l&&v(t.highWaterMark)?this.loadProgressively(W,s,e,t.highWaterMark,l):p?W.arrayBuffer():e.responseType==="json"?W.json():W.text()}).then(W=>{const ee=this.response;if(!ee)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),s.loading.end=Math.max(self.performance.now(),s.loading.first);const le=W[b];le&&(s.loaded=s.total=le);const oe={url:ee.url,data:W,code:ee.status};l&&!v(t.highWaterMark)&&l(s,e,W,ee),r.onSuccess(oe,s,e,ee)}).catch(W=>{if(self.clearTimeout(this.requestTimeout),s.aborted)return;const ee=W&&W.code||0,le=W?W.message:null;r.onError({code:ee,text:le},e,W?W.details:null,s)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,r,s=0,a){const l=new Ns,p=e.body.getReader(),b=()=>p.read().then(A=>{if(A.done)return l.dataLength&&a(t,r,l.flush(),e),Promise.resolve(new ArrayBuffer(0));const M=A.value,W=M.length;return t.loaded+=W,W<s||l.dataLength?(l.push(M),l.dataLength>=s&&a(t,r,l.flush(),e)):a(t,r,M,e),b()}).catch(()=>Promise.reject());return b()}}function iu(c,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(i({},c.headers))};return c.rangeEnd&&t.headers.set("Range","bytes="+c.rangeStart+"-"+String(c.rangeEnd-1)),t}function nu(c){const e=ru.exec(c);if(e)return parseInt(e[2])-parseInt(e[1])+1}function su(c){const e=c.get("Content-Range");if(e){const r=nu(e);if(v(r))return r}const t=c.get("Content-Length");if(t)return parseInt(t)}function au(c,e){return new self.Request(c.url,e)}class ou extends Error{constructor(e,t,r){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=r}}const lu=/\s/,uu={newCue(c,e,t,r){const s=[];let a,l,p,b,A;const M=self.VTTCue||self.TextTrackCue;for(let ee=0;ee<r.rows.length;ee++)if(a=r.rows[ee],p=!0,b=0,A="",!a.isEmpty()){var W;for(let he=0;he<a.chars.length;he++)lu.test(a.chars[he].uchar)&&p?b++:(A+=a.chars[he].uchar,p=!1);a.cueStartTime=e,e===t&&(t+=1e-4),b>=16?b--:b++;const le=wo(A.trim()),oe=oo(e,t,le);c!=null&&(W=c.cues)!=null&&W.getCueById(oe)||(l=new M(e,t,le),l.id=oe,l.line=ee+1,l.align="left",l.position=10+Math.min(80,Math.floor(b*8/32)*10),s.push(l))}return c&&s.length&&(s.sort((ee,le)=>ee.line==="auto"||le.line==="auto"?0:ee.line>8&&le.line>8?le.line-ee.line:ee.line-le.line),s.forEach(ee=>ln(c,ee))),s}},cu={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Go=F(F({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,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,loader:jo,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:us,bufferController:$i,capLevelController:fo,errorController:Zr,fpsController:ml,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:qt,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:cu},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}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},hu()),{},{subtitleStreamController:Gr,subtitleTrackController:vi,timelineController:dl,audioStreamController:er,audioTrackController:Ir,emeController:Rs,cmcdController:Xl,contentSteeringController:Ql});function hu(){return{cueHandler:uu,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 fu(c,e){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 t=vo(c),r=["manifest","level","frag"],s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(a=>{const l=`${a==="level"?"playlist":a}LoadPolicy`,p=e[l]===void 0,b=[];s.forEach(A=>{const M=`${a}Loading${A}`,W=e[M];if(W!==void 0&&p){b.push(M);const ee=t[l].default;switch(e[l]={default:ee},A){case"TimeOut":ee.maxLoadTimeMs=W,ee.maxTimeToFirstByteMs=W;break;case"MaxRetry":ee.errorRetry.maxNumRetry=W,ee.timeoutRetry.maxNumRetry=W;break;case"RetryDelay":ee.errorRetry.retryDelayMs=W,ee.timeoutRetry.retryDelayMs=W;break;case"MaxRetryTimeout":ee.errorRetry.maxRetryDelayMs=W,ee.timeoutRetry.maxRetryDelayMs=W;break}}}),b.length&&x.warn(`hls.js config: "${b.join('", "')}" setting(s) are deprecated, use "${l}": ${JSON.stringify(e[l])}`)}),F(F({},t),e)}function vo(c){return c&&typeof c=="object"?Array.isArray(c)?c.map(vo):Object.keys(c).reduce((e,t)=>(e[t]=vo(c[t]),e),{}):c}function du(c){const e=c.loader;e!==Wo&&e!==jo?(x.log("[config]: Custom loader detected, cannot enable progressive streaming"),c.progressive=!1):tu()&&(c.loader=Wo,c.progressive=!0,c.enableSoftwareAES=!0,x.log("[config]: Progressive streaming enabled, using FetchLoader"))}let yo;class pu extends Nr{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(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(n.LEVEL_LOADED,this.onLevelLoaded,this),e.on(n.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(n.FRAG_BUFFERED,this.onFragBuffered,this),e.on(n.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(n.LEVEL_LOADED,this.onLevelLoaded,this),e.off(n.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(n.FRAG_BUFFERED,this.onFragBuffered,this),e.off(n.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const r=this.hls.config.preferManagedMediaSource,s=[],a={},l={};let p=!1,b=!1,A=!1;t.levels.forEach(M=>{var W,ee;const le=M.attrs;let{audioCodec:oe,videoCodec:he}=M;((W=oe)==null?void 0:W.indexOf("mp4a.40.34"))!==-1&&(yo||(yo=/chrome|firefox/i.test(navigator.userAgent)),yo&&(M.audioCodec=oe=void 0)),oe&&(M.audioCodec=oe=Lr(oe,r)),((ee=he)==null?void 0:ee.indexOf("avc1"))===0&&(he=M.videoCodec=si(he));const{width:me,height:De,unknownCodecs:We}=M;if(p||(p=!!(me&&De)),b||(b=!!he),A||(A=!!oe),We!=null&&We.length||oe&&!Pr(oe,"audio",r)||he&&!Pr(he,"video",r))return;const{CODECS:je,"FRAME-RATE":ot,"HDCP-LEVEL":Ye,"PATHWAY-ID":pt,RESOLUTION:at,"VIDEO-RANGE":Ct}=le,ct=`${`${pt||"."}-`}${M.bitrate}-${at}-${ot}-${je}-${Ct}-${Ye}`;if(a[ct])if(a[ct].uri!==M.url&&!M.attrs["PATHWAY-ID"]){const At=l[ct]+=1;M.attrs["PATHWAY-ID"]=new Array(At+1).join(".");const or=new mi(M);a[ct]=or,s.push(or)}else a[ct].addGroupId("audio",le.AUDIO),a[ct].addGroupId("text",le.SUBTITLES);else{const At=new mi(M);a[ct]=At,l[ct]=1,s.push(At)}}),this.filterAndSortMediaOptions(s,t,p,b,A)}filterAndSortMediaOptions(e,t,r,s,a){let l=[],p=[],b=e;if((r||s)&&a&&(b=b.filter(({videoCodec:oe,videoRange:he,width:me,height:De})=>(!!oe||!!(me&&De))&&Yr(he))),b.length===0){Promise.resolve().then(()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const oe=new Error("no level with compatible codecs found in manifest");this.hls.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:oe,reason:oe.message})}});return}if(t.audioTracks){const{preferManagedMediaSource:oe}=this.hls.config;l=t.audioTracks.filter(he=>!he.audioCodec||Pr(he.audioCodec,"audio",oe)),Ko(l)}t.subtitles&&(p=t.subtitles,Ko(p));const A=b.slice(0);b.sort((oe,he)=>{if(oe.attrs["HDCP-LEVEL"]!==he.attrs["HDCP-LEVEL"])return(oe.attrs["HDCP-LEVEL"]||"")>(he.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&oe.height!==he.height)return oe.height-he.height;if(oe.frameRate!==he.frameRate)return oe.frameRate-he.frameRate;if(oe.videoRange!==he.videoRange)return Bi.indexOf(oe.videoRange)-Bi.indexOf(he.videoRange);if(oe.videoCodec!==he.videoCodec){const me=hi(oe.videoCodec),De=hi(he.videoCodec);if(me!==De)return De-me}if(oe.uri===he.uri&&oe.codecSet!==he.codecSet){const me=Wr(oe.codecSet),De=Wr(he.codecSet);if(me!==De)return De-me}return oe.averageBitrate!==he.averageBitrate?oe.averageBitrate-he.averageBitrate:0});let M=A[0];if(this.steering&&(b=this.steering.filterParsedLevels(b),b.length!==A.length)){for(let oe=0;oe<A.length;oe++)if(A[oe].pathwayId===b[0].pathwayId){M=A[oe];break}}this._levels=b;for(let oe=0;oe<b.length;oe++)if(b[oe]===M){var W;this._firstLevel=oe;const he=M.bitrate,me=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${b.length} level(s) found, first bitrate: ${he}`),((W=this.hls.userConfig)==null?void 0:W.abrEwmaDefaultEstimate)===void 0){const De=Math.min(he,this.hls.config.abrEwmaDefaultEstimateMax);De>me&&me===Go.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=De)}break}const ee=a&&!s,le={levels:b,audioTracks:l,subtitleTracks:p,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:a,video:s,altAudio:!ee&&l.some(oe=>!!oe.url)};this.hls.trigger(n.MANIFEST_PARSED,le),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return this._levels.length===0?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const M=new Error("invalid level idx"),W=e<0;if(this.hls.trigger(n.ERROR,{type:o.OTHER_ERROR,details:u.LEVEL_SWITCH_ERROR,level:e,fatal:W,error:M,reason:M.message}),W)return;e=Math.min(e,t.length-1)}const r=this.currentLevelIndex,s=this.currentLevel,a=s?s.attrs["PATHWAY-ID"]:void 0,l=t[e],p=l.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=l,r===e&&l.details&&s&&a===p)return;this.log(`Switching to level ${e} (${l.height?l.height+"p ":""}${l.videoRange?l.videoRange+" ":""}${l.codecSet?l.codecSet+" ":""}@${l.bitrate})${p?" with Pathway "+p:""} from level ${r}${a?" with Pathway "+a:""}`);const b={level:e,attrs:l.attrs,details:l.details,bitrate:l.bitrate,averageBitrate:l.averageBitrate,maxBitrate:l.maxBitrate,realBitrate:l.realBitrate,width:l.width,height:l.height,codecSet:l.codecSet,audioCodec:l.audioCodec,videoCodec:l.videoCodec,audioGroups:l.audioGroups,subtitleGroups:l.subtitleGroups,loaded:l.loaded,loadError:l.loadError,fragmentError:l.fragmentError,name:l.name,id:l.id,uri:l.uri,url:l.url,urlId:0,audioGroupIds:l.audioGroupIds,textGroupIds:l.textGroupIds};this.hls.trigger(n.LEVEL_SWITCHING,b);const A=l.details;if(!A||A.live){const M=this.switchParams(l.uri,s==null?void 0:s.details,A);this.loadPlaylist(M)}}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}onError(e,t){t.fatal||!t.context||t.context.type===lr.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===Ue.MAIN){const r=t.elementaryStreams;if(!Object.keys(r).some(a=>!!r[a]))return;const s=this._levels[t.level];s!=null&&s.loadError&&(this.log(`Resetting level error count of ${s.loadError} on frag buffered`),s.loadError=0)}}onLevelLoaded(e,t){var r;const{level:s,details:a}=t,l=this._levels[s];if(!l){var p;this.warn(`Invalid level index ${s}`),(p=t.deliveryDirectives)!=null&&p.skip&&(a.deltaUpdateFailed=!0);return}s===this.currentLevelIndex?(l.fragmentError===0&&(l.loadError=0),this.playlistLoaded(s,t,l.details)):(r=t.deliveryDirectives)!=null&&r.skip&&(a.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,r=this.currentLevel;if(r&&this.shouldLoadPlaylist(r)){let s=r.uri;if(e)try{s=e.addDirectives(s)}catch(l){this.warn(`Could not construct new URL with HLS Delivery Directives: ${l}`)}const a=r.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${(e==null?void 0:e.msn)!==void 0?" at sn "+e.msn+" part "+e.part:""} with${a?" Pathway "+a:""} ${s}`),this.clearTimer(),this.hls.trigger(n.LEVEL_LOADING,{url:s,level:t,pathwayId:r.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||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;const r=this._levels.filter((s,a)=>a!==e?!0:(this.steering&&this.steering.removeLevel(s),s===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,s.details&&s.details.fragments.forEach(l=>l.level=-1)),!1));ei(r),this._levels=r,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(n.LEVELS_UPDATED,{levels:r})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:r}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(n.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:r}))}}function Ko(c){const e={};c.forEach(t=>{const r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++})}class mu{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const r in this.keyUriToKeyInfo){const s=this.keyUriToKeyInfo[r].loader;if(s){var t;if(e&&e!==((t=s.context)==null?void 0:t.frag.type))return;s.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=u.KEY_LOAD_ERROR,r,s,a){return new pn({type:o.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:a,error:r,networkDetails:s})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:r,cc:s}=e;for(let a=0;a<t.length;a++){const l=t[a];if(s<=l.cc&&(r==="initSegment"||l.sn==="initSegment"||r<l.sn)){this.emeController.selectKeySystemFormat(l).then(p=>{l.setKeyFormat(p)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var r,s;t&&e.setKeyFormat(t);const a=e.decryptdata;if(!a){const A=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,u.KEY_LOAD_ERROR,A))}const l=a.uri;if(!l)return Promise.reject(this.createKeyLoadError(e,u.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${l}"`)));let p=this.keyUriToKeyInfo[l];if((r=p)!=null&&r.decryptdata.key)return a.key=p.decryptdata.key,Promise.resolve({frag:e,keyInfo:p});if((s=p)!=null&&s.keyLoadPromise){var b;switch((b=p.mediaKeySessionContext)==null?void 0:b.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return p.keyLoadPromise.then(A=>(a.key=A.keyInfo.decryptdata.key,{frag:e,keyInfo:p}))}}switch(p=this.keyUriToKeyInfo[l]={decryptdata:a,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},a.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return a.keyFormat==="identity"?this.loadKeyHTTP(p,e):this.loadKeyEME(p,e);case"AES-128":return this.loadKeyHTTP(p,e);default:return Promise.reject(this.createKeyLoadError(e,u.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${a.method}"`)))}}loadKeyEME(e,t){const r={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const s=this.emeController.loadKey(r);if(s)return(e.keyLoadPromise=s.then(a=>(e.mediaKeySessionContext=a,r))).catch(a=>{throw e.keyLoadPromise=null,a})}return Promise.resolve(r)}loadKeyHTTP(e,t){const r=this.config,s=r.loader,a=new s(r);return t.keyLoader=e.loader=a,e.keyLoadPromise=new Promise((l,p)=>{const b={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},A=r.keyLoadPolicy.default,M={loadPolicy:A,timeout:A.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},W={onSuccess:(ee,le,oe,he)=>{const{frag:me,keyInfo:De,url:We}=oe;if(!me.decryptdata||De!==this.keyUriToKeyInfo[We])return p(this.createKeyLoadError(me,u.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),he));De.decryptdata.key=me.decryptdata.key=new Uint8Array(ee.data),me.keyLoader=null,De.loader=null,l({frag:me,keyInfo:De})},onError:(ee,le,oe,he)=>{this.resetLoader(le),p(this.createKeyLoadError(t,u.KEY_LOAD_ERROR,new Error(`HTTP Error ${ee.code} loading key ${ee.text}`),oe,F({url:b.url,data:void 0},ee)))},onTimeout:(ee,le,oe)=>{this.resetLoader(le),p(this.createKeyLoadError(t,u.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),oe))},onAbort:(ee,le,oe)=>{this.resetLoader(le),p(this.createKeyLoadError(t,u.INTERNAL_ABORTED,new Error("key loading aborted"),oe))}};a.load(b,M,W)})}resetLoader(e){const{frag:t,keyInfo:r,url:s}=e,a=r.loader;t.keyLoader===a&&(t.keyLoader=null,r.loader=null),delete this.keyUriToKeyInfo[s],a&&a.destroy()}}function Vo(){return self.SourceBuffer||self.WebKitSourceBuffer}function qo(){if(!Kr())return!1;const e=Vo();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function gu(){if(!qo())return!1;const c=Kr();return typeof(c==null?void 0:c.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>c.isTypeSupported(ii(e,"video")))||["mp4a.40.2","fLaC"].some(e=>c.isTypeSupported(ii(e,"audio"))))}function _u(){var c;const e=Vo();return typeof(e==null||(c=e.prototype)==null?void 0:c.changeType)=="function"}const vu=250,Oa=2,yu=.1,bu=.05;class xu{constructor(e,t,r,s){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=r,this.hls=s}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:r,media:s,stalled:a}=this;if(s===null)return;const{currentTime:l,seeking:p}=s,b=this.seeking&&!p,A=!this.seeking&&p;if(this.seeking=p,l!==e){if(this.moved=!0,p||(this.nudgeRetry=0),a!==null){if(this.stallReported){const me=self.performance.now()-a;x.warn(`playback not stuck anymore @${l}, after ${Math.round(me)}ms`),this.stallReported=!1}this.stalled=null}return}if(A||b){this.stalled=null;return}if(s.paused&&!p||s.ended||s.playbackRate===0||!Fr.getBuffered(s).length){this.nudgeRetry=0;return}const M=Fr.bufferInfo(s,l,0),W=M.nextStart||0;if(p){const me=M.len>Oa,De=!W||t&&t.start<=l||W-l>Oa&&!this.fragmentTracker.getPartialFragment(l);if(me||De)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var ee;if(!(M.len>0)&&!W)return;const De=Math.max(W,M.start||0)-l,We=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,ot=(We==null||(ee=We.details)==null?void 0:ee.live)?We.details.targetduration*2:Oa,Ye=this.fragmentTracker.getPartialFragment(l);if(De>0&&(De<=ot||Ye)){s.paused||this._trySkipBufferHole(Ye);return}}const le=self.performance.now();if(a===null){this.stalled=le;return}const oe=le-a;if(!p&&oe>=vu&&(this._reportStall(M),!this.media))return;const he=Fr.bufferInfo(s,l,r.maxBufferHole);this._tryFixBufferStall(he,oe)}_tryFixBufferStall(e,t){const{config:r,fragmentTracker:s,media:a}=this;if(a===null)return;const l=a.currentTime,p=s.getPartialFragment(l);p&&(this._trySkipBufferHole(p)||!this.media)||(e.len>r.maxBufferHole||e.nextStart&&e.nextStart-l<r.maxBufferHole)&&t>r.highBufferWatchdogPeriod*1e3&&(x.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:r,stallReported:s}=this;if(!s&&r){this.stallReported=!0;const a=new Error(`Playback stalling at @${r.currentTime} due to low buffer (${JSON.stringify(e)})`);x.warn(a.message),t.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.BUFFER_STALLED_ERROR,fatal:!1,error:a,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:r,media:s}=this;if(s===null)return 0;const a=s.currentTime,l=Fr.bufferInfo(s,a,0),p=a<l.start?l.start:l.nextStart;if(p){const b=l.len<=t.maxBufferHole,A=l.len>0&&l.len<1&&s.readyState<3,M=p-a;if(M>0&&(b||A)){if(M>t.maxBufferHole){const{fragmentTracker:ee}=this;let le=!1;if(a===0){const oe=ee.getAppendedFrag(0,Ue.MAIN);oe&&p<oe.end&&(le=!0)}if(!le){const oe=e||ee.getAppendedFrag(a,Ue.MAIN);if(oe){let he=!1,me=oe.end;for(;me<p;){const De=ee.getPartialFragment(me);if(De)me+=De.duration;else{he=!0;break}}if(he)return 0}}}const W=Math.max(p+bu,a+yu);if(x.warn(`skipping hole, adjusting currentTime from ${a} to ${W}`),this.moved=!0,this.stalled=null,s.currentTime=W,e&&!e.gap){const ee=new Error(`fragment loaded with buffer holes, seeking from ${a} to ${W}`);r.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:ee,reason:ee.message,frag:e})}return W}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:r,nudgeRetry:s}=this;if(r===null)return;const a=r.currentTime;if(this.nudgeRetry++,s<e.nudgeMaxRetry){const l=a+(s+1)*e.nudgeOffset,p=new Error(`Nudging 'currentTime' from ${a} to ${l}`);x.warn(p.message),r.currentTime=l,t.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.BUFFER_NUDGE_ON_STALL,error:p,fatal:!1})}else{const l=new Error(`Playhead still not moving while enough data buffered @${a} after ${e.nudgeMaxRetry} nudges`);x.error(l.message),t.trigger(n.ERROR,{type:o.MEDIA_ERROR,details:u.BUFFER_STALLED_ERROR,error:l,fatal:!0})}}}const Su=100;class wu extends ps{constructor(e,t,r){super(e,t,r,"[stream-controller]",Ue.MAIN),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(n.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(n.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.MANIFEST_PARSED,this.onManifestParsed,this),e.on(n.LEVEL_LOADING,this.onLevelLoading,this),e.on(n.LEVEL_LOADED,this.onLevelLoaded,this),e.on(n.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(n.ERROR,this.onError,this),e.on(n.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(n.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(n.BUFFER_CREATED,this.onBufferCreated,this),e.on(n.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(n.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(n.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(n.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(n.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.MANIFEST_PARSED,this.onManifestParsed,this),e.off(n.LEVEL_LOADED,this.onLevelLoaded,this),e.off(n.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(n.ERROR,this.onError,this),e.off(n.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(n.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(n.BUFFER_CREATED,this.onBufferCreated,this),e.off(n.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(n.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(n.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:r}=this;if(this.stopLoad(),this.setInterval(Su),this.level=-1,!this.startFragRequested){let s=r.startLevel;s===-1&&(r.config.testBandwidth&&this.levels.length>1?(s=0,this.bitrateTest=!0):s=r.firstAutoLevel),r.nextLoadLevel=s,this.level=r.loadLevel,this.loadedmetadata=!1}t>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=ht.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=ht.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case ht.WAITING_LEVEL:{const{levels:t,level:r}=this,s=t==null?void 0:t[r],a=s==null?void 0:s.details;if(a&&(!a.live||this.levelLastLoaded===s)){if(this.waitForCdnTuneIn(a))break;this.state=ht.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=ht.IDLE;break}break}case ht.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),r=this.retryDate;if(!r||t>=r||(e=this.media)!=null&&e.seeking){const{levels:s,level:a}=this,l=s==null?void 0:s[a];this.resetStartWhenNotLoaded(l||null),this.state=ht.IDLE}}break}this.state===ht.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:r,media:s}=this;if(t===null||!s&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const a=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(r!=null&&r[a]))return;const l=r[a],p=this.getMainFwdBufferInfo();if(p===null)return;const b=this.getLevelDetails();if(b&&this._streamEnded(p,b)){const he={};this.altAudio&&(he.type="video"),this.hls.trigger(n.BUFFER_EOS,he),this.state=ht.ENDED;return}if(!this.buffering)return;e.loadLevel!==a&&e.manualLevel===-1&&this.log(`Adapting to level ${a} from level ${this.level}`),this.level=e.nextLoadLevel=a;const A=l.details;if(!A||this.state===ht.WAITING_LEVEL||A.live&&this.levelLastLoaded!==l){this.level=a,this.state=ht.WAITING_LEVEL;return}const M=p.len,W=this.getMaxBufferLength(l.maxBitrate);if(M>=W)return;this.backtrackFragment&&this.backtrackFragment.start>p.end&&(this.backtrackFragment=null);const ee=this.backtrackFragment?this.backtrackFragment.start:p.end;let le=this.getNextFragment(ee,A);if(this.couldBacktrack&&!this.fragPrevious&&le&&le.sn!=="initSegment"&&this.fragmentTracker.getState(le)!==ai.OK){var oe;const me=((oe=this.backtrackFragment)!=null?oe:le).sn-A.startSN,De=A.fragments[me-1];De&&le.cc===De.cc&&(le=De,this.fragmentTracker.removeFragment(De))}else this.backtrackFragment&&p.len&&(this.backtrackFragment=null);if(le&&this.isLoopLoading(le,ee)){if(!le.gap){const me=this.audioOnly&&!this.altAudio?se.AUDIO:se.VIDEO,De=(me===se.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;De&&this.afterBufferFlushed(De,me,Ue.MAIN)}le=this.getNextFragmentLoopLoading(le,A,p,Ue.MAIN,W)}le&&(le.initSegment&&!le.initSegment.data&&!this.bitrateTest&&(le=le.initSegment),this.loadFragment(le,l,ee))}loadFragment(e,t,r){const s=this.fragmentTracker.getState(e);this.fragCurrent=e,s===ai.NOT_LOADED||s===ai.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e,t):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)):(this.startFragRequested=!0,super.loadFragment(e,t,r)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,Ue.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let r;const s=this.getAppendedFrag(t.currentTime);s&&s.start>1&&this.flushMainBuffer(0,s.start-1);const a=this.getLevelDetails();if(a!=null&&a.live){const p=this.getMainFwdBufferInfo();if(!p||p.len<a.targetduration*2)return}if(!t.paused&&e){const p=this.hls.nextLoadLevel,b=e[p],A=this.fragLastKbps;A&&this.fragCurrent?r=this.fragCurrent.duration*b.maxBitrate/(1e3*A)+1:r=0}else r=0;const l=this.getBufferedFrag(t.currentTime+r);if(l){const p=this.followingBufferedFrag(l);if(p){this.abortCurrentFrag();const b=p.maxStartPTS?p.maxStartPTS:p.start,A=p.duration,M=Math.max(l.end,b+Math.min(Math.max(A-this.config.maxFragLookUpTolerance,A*(this.couldBacktrack?.5:.125)),A*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(M,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 ht.KEY_LOADING:case ht.FRAG_LOADING:case ht.FRAG_LOADING_WAITING_RETRY:case ht.PARSING:case ht.PARSED:this.state=ht.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const r=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new xu(this.config,r,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;v(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const r=this.getMainFwdBufferInfo();if(r===null||r.len===0){this.warn(`Main forward buffer length on "seeked" event ${r?r.len:"empty"})`);return}this.tick()}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(n.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(e,t){let r=!1,s=!1;t.levels.forEach(a=>{const l=a.audioCodec;l&&(r=r||l.indexOf("mp4a.40.2")!==-1,s=s||l.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=r&&s&&!_u(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:r}=this;if(!r||this.state!==ht.IDLE)return;const s=r[t.level];(!s.details||s.details.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(s.details))&&(this.state=ht.WAITING_LEVEL)}onLevelLoaded(e,t){var r;const{levels:s}=this,a=t.level,l=t.details,p=l.totalduration;if(!s){this.warn(`Levels were reset while loading level ${a}`);return}this.log(`Level ${a} loaded [${l.startSN},${l.endSN}]${l.lastPartSn?`[part-${l.lastPartSn}-${l.lastPartIndex}]`:""}, cc [${l.startCC}, ${l.endCC}] duration:${p}`);const b=s[a],A=this.fragCurrent;A&&(this.state===ht.FRAG_LOADING||this.state===ht.FRAG_LOADING_WAITING_RETRY)&&A.level!==t.level&&A.loader&&this.abortCurrentFrag();let M=0;if(l.live||(r=b.details)!=null&&r.live){var W;if(this.checkLiveUpdate(l),l.deltaUpdateFailed)return;M=this.alignPlaylists(l,b.details,(W=this.levelLastLoaded)==null?void 0:W.details)}if(b.details=l,this.levelLastLoaded=b,this.hls.trigger(n.LEVEL_UPDATED,{details:l,level:a}),this.state===ht.WAITING_LEVEL){if(this.waitForCdnTuneIn(l))return;this.state=ht.IDLE}this.startFragRequested?l.live&&this.synchronizeToLiveEdge(l):this.setStartPosition(l,M),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:r,part:s,payload:a}=e,{levels:l}=this;if(!l){this.warn(`Levels were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const p=l[r.level],b=p.details;if(!b){this.warn(`Dropping fragment ${r.sn} of level ${r.level} after level details were reset`),this.fragmentTracker.removeFragment(r);return}const A=p.videoCodec,M=b.PTSKnown||!b.live,W=(t=r.initSegment)==null?void 0:t.data,ee=this._getAudioCodec(p),le=this.transmuxer=this.transmuxer||new Lt(this.hls,Ue.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),oe=s?s.index:-1,he=oe!==-1,me=new Ps(r.level,r.sn,r.stats.chunkCount,a.byteLength,oe,he),De=this.initPTS[r.cc];le.push(a,W,ee,A,r,s,b.totalduration,M,me,De)}onAudioTrackSwitching(e,t){const r=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const l=this.fragCurrent;l&&(this.log("Switching to main audio track, cancel main fragment load"),l.abortRequests(),this.fragmentTracker.removeFragment(l)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const a=this.hls;r&&(a.trigger(n.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),a.trigger(n.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const r=t.id,s=!!this.hls.audioTracks[r].url;if(s){const a=this.videoBuffer;a&&this.mediaBuffer!==a&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=a)}this.altAudio=s,this.tick()}onBufferCreated(e,t){const r=t.tracks;let s,a,l=!1;for(const p in r){const b=r[p];if(b.id==="main"){if(a=p,s=b,p==="video"){const A=r[p];A&&(this.videoBuffer=A.buffer)}}else l=!0}l&&s?(this.log(`Alternate track found, use ${a}.buffered to schedule main fragment loading`),this.mediaBuffer=s.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:r,part:s}=t;if(r&&r.type!==Ue.MAIN)return;if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${s?" p: "+s.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}`),this.state===ht.PARSED&&(this.state=ht.IDLE);return}const a=s?s.stats:r.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),r.sn!=="initSegment"&&(this.fragPrevious=r),this.fragBufferedComplete(r,s)}onError(e,t){var r;if(t.fatal){this.state=ht.ERROR;return}switch(t.details){case u.FRAG_GAP:case u.FRAG_PARSING_ERROR:case u.FRAG_DECRYPT_ERROR:case u.FRAG_LOAD_ERROR:case u.FRAG_LOAD_TIMEOUT:case u.KEY_LOAD_ERROR:case u.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Ue.MAIN,t);break;case u.LEVEL_LOAD_ERROR:case u.LEVEL_LOAD_TIMEOUT:case u.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===ht.WAITING_LEVEL&&((r=t.context)==null?void 0:r.type)===lr.LEVEL&&(this.state=ht.IDLE);break;case u.BUFFER_APPEND_ERROR:case u.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;if(t.details===u.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case u.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(!(!e||!t||!e.readyState)){if(this.loadedmetadata||!Fr.getBuffered(e).length){const r=this.state!==ht.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,r)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=ht.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==se.AUDIO||this.audioOnly&&!this.altAudio){const r=(t===se.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,t,Ue.MAIN),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let r=this.startPosition;if(r>=0&&t<r){if(e.seeking){this.log(`could not seek to ${r}, already seeking at ${t}`);return}const s=Fr.getBuffered(e),l=(s.length?s.start(0):0)-r;l>0&&(l<this.config.maxBufferHole||l<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${l} to match buffer start`),r+=l,this.startPosition=r),this.log(`seek to target start position ${r} from current time ${t}`),e.currentTime=r}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(r=>{const{hls:s}=this;if(!r||this.fragContextChanged(e))return;t.fragmentError=0,this.state=ht.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const a=e.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),s.trigger(n.FRAG_LOADED,r),e.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const r="main",{hls:s}=this,{remuxResult:a,chunkMeta:l}=e,p=this.getCurrentContext(l);if(!p){this.resetWhenMissingContext(l);return}const{frag:b,part:A,level:M}=p,{video:W,text:ee,id3:le,initSegment:oe}=a,{details:he}=M,me=this.altAudio?void 0:a.audio;if(this.fragContextChanged(b)){this.fragmentTracker.removeFragment(b);return}if(this.state=ht.PARSING,oe){if(oe!=null&&oe.tracks){const je=b.initSegment||b;this._bufferInitSegment(M,oe.tracks,je,l),s.trigger(n.FRAG_PARSING_INIT_SEGMENT,{frag:je,id:r,tracks:oe.tracks})}const De=oe.initPTS,We=oe.timescale;v(De)&&(this.initPTS[b.cc]={baseTime:De,timescale:We},s.trigger(n.INIT_PTS_FOUND,{frag:b,id:r,initPTS:De,timescale:We}))}if(W&&he&&b.sn!=="initSegment"){const De=he.fragments[b.sn-1-he.startSN],We=b.sn===he.startSN,je=!De||b.cc>De.cc;if(a.independent!==!1){const{startPTS:ot,endPTS:Ye,startDTS:pt,endDTS:at}=W;if(A)A.elementaryStreams[W.type]={startPTS:ot,endPTS:Ye,startDTS:pt,endDTS:at};else if(W.firstKeyFrame&&W.independent&&l.id===1&&!je&&(this.couldBacktrack=!0),W.dropped&&W.independent){const Ct=this.getMainFwdBufferInfo(),Bt=(Ct?Ct.end:this.getLoadPosition())+this.config.maxBufferHole,ct=W.firstKeyFramePTS?W.firstKeyFramePTS:ot;if(!We&&Bt<ct-this.config.maxBufferHole&&!je){this.backtrack(b);return}else je&&(b.gap=!0);b.setElementaryStreamInfo(W.type,b.start,Ye,b.start,at,!0)}else We&&ot>Oa&&(b.gap=!0);b.setElementaryStreamInfo(W.type,ot,Ye,pt,at),this.backtrackFragment&&(this.backtrackFragment=b),this.bufferFragmentData(W,b,A,l,We||je)}else if(We||je)b.gap=!0;else{this.backtrack(b);return}}if(me){const{startPTS:De,endPTS:We,startDTS:je,endDTS:ot}=me;A&&(A.elementaryStreams[se.AUDIO]={startPTS:De,endPTS:We,startDTS:je,endDTS:ot}),b.setElementaryStreamInfo(se.AUDIO,De,We,je,ot),this.bufferFragmentData(me,b,A,l)}if(he&&le!=null&&(t=le.samples)!=null&&t.length){const De={id:r,frag:b,details:he,samples:le.samples};s.trigger(n.FRAG_PARSING_METADATA,De)}if(he&&ee){const De={id:r,frag:b,details:he,samples:ee.samples};s.trigger(n.FRAG_PARSING_USERDATA,De)}}_bufferInitSegment(e,t,r,s){if(this.state!==ht.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:a,video:l,audiovideo:p}=t;if(a){let b=e.audioCodec;const A=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){b&&(b.indexOf("mp4a.40.5")!==-1?b="mp4a.40.2":b="mp4a.40.5");const M=a.metadata;M&&"channelCount"in M&&(M.channelCount||1)!==1&&A.indexOf("firefox")===-1&&(b="mp4a.40.5")}b&&b.indexOf("mp4a.40.5")!==-1&&A.indexOf("android")!==-1&&a.container!=="audio/mpeg"&&(b="mp4a.40.2",this.log(`Android: force audio codec to ${b}`)),e.audioCodec&&e.audioCodec!==b&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${b}"`),a.levelCodec=b,a.id="main",this.log(`Init audio buffer, container:${a.container}, codecs[selected/level/parsed]=[${b||""}/${e.audioCodec||""}/${a.codec}]`)}l&&(l.levelCodec=e.videoCodec,l.id="main",this.log(`Init video buffer, container:${l.container}, codecs[level/parsed]=[${e.videoCodec||""}/${l.codec}]`)),p&&this.log(`Init audiovideo buffer, container:${p.container}, codecs[level/parsed]=[${e.codecs}/${p.codec}]`),this.hls.trigger(n.BUFFER_CODECS,t),Object.keys(t).forEach(b=>{const M=t[b].initSegment;M!=null&&M.byteLength&&this.hls.trigger(n.BUFFER_APPENDING,{type:b,data:M,frag:r,part:null,chunkMeta:s,parent:r.type})}),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,Ue.MAIN)}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=ht.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const r=e.currentTime;if(Fr.isBuffered(e,r)?t=this.getAppendedFrag(r):Fr.isBuffered(e,r+.1)&&(t=this.getAppendedFrag(r+.1)),t){this.backtrackFragment=null;const s=this.fragPlaying,a=t.level;(!s||t.sn!==s.sn||s.level!==a)&&(this.fragPlaying=t,this.hls.trigger(n.FRAG_CHANGED,{frag:t}),(!s||s.level!==a)&&this.hls.trigger(n.LEVEL_SWITCHED,{level:a}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,r=this.currentFrag;if(r&&v(t)&&v(r.programDateTime)){const s=r.programDateTime+(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 ls{static get version(){return"1.5.20"}static isMSESupported(){return qo()}static isSupported(){return gu()}static getMediaSource(){return Kr()}static get Events(){return n}static get ErrorTypes(){return o}static get ErrorDetails(){return u}static get DefaultConfig(){return ls.defaultConfig?ls.defaultConfig:Go}static set DefaultConfig(e){ls.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new vt,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.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,j(e.debug||!1,"Hls instance");const t=this.config=fu(ls.DefaultConfig,e);this.userConfig=e,t.progressive&&du(t);const{abrController:r,bufferController:s,capLevelController:a,errorController:l,fpsController:p}=t,b=new l(this),A=this.abrController=new r(this),M=this.bufferController=new s(this),W=this.capLevelController=new a(this),ee=new p(this),le=new Wi(this),oe=new pi(this),he=t.contentSteeringController,me=he?new he(this):null,De=this.levelController=new pu(this,me),We=new Ua(this),je=new mu(this.config),ot=this.streamController=new wu(this,We,je);W.setStreamController(ot),ee.setStreamController(ot);const Ye=[le,De,ot];me&&Ye.splice(1,0,me),this.networkControllers=Ye;const pt=[A,M,W,ee,oe,We];this.audioTrackController=this.createController(t.audioTrackController,Ye);const at=t.audioStreamController;at&&Ye.push(new at(this,We,je)),this.subtitleTrackController=this.createController(t.subtitleTrackController,Ye);const Ct=t.subtitleStreamController;Ct&&Ye.push(new Ct(this,We,je)),this.createController(t.timelineController,pt),je.emeController=this.emeController=this.createController(t.emeController,pt),this.cmcdController=this.createController(t.cmcdController,pt),this.latencyController=this.createController($n,pt),this.coreComponents=pt,Ye.push(b);const Bt=b.onErrorOut;typeof Bt=="function"&&this.on(n.ERROR,Bt,b)}createController(e,t){if(e){const r=new e(this);return t&&t.push(r),r}return null}on(e,t,r=this){this._emitter.on(e,t,r)}once(e,t,r=this){this._emitter.once(e,t,r)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,r=this,s){this._emitter.off(e,t,r,s)}listeners(e){return this._emitter.listeners(e)}emit(e,t,r){return this._emitter.emit(e,t,r)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(r){if(x.error("An internal error happened while handling event "+e+'. Error message: "'+r.message+'". Here is a stacktrace:',r),!this.triggeringException){this.triggeringException=!0;const s=e===n.ERROR;this.trigger(n.ERROR,{type:o.OTHER_ERROR,details:u.INTERNAL_EXCEPTION,fatal:s,event:e,error:r}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){x.log("destroy"),this.trigger(n.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){x.log("attachMedia"),this._media=e,this.trigger(n.MEDIA_ATTACHING,{media:e})}detachMedia(){x.log("detachMedia"),this.trigger(n.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,r=this.url,s=this.url=V.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,x.log(`loadSource:${s}`),t&&r&&(r!==s||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(n.MANIFEST_LOADING,{url:e})}startLoad(e=-1){x.log(`startLoad(${e})`),this.started=!0,this.resumeBuffering();for(let t=0;t<this.networkControllers.length&&(this.networkControllers[t].startLoad(e),!(!this.started||!this.networkControllers));t++);}stopLoad(){x.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}resumeBuffering(){x.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()})}pauseBuffering(){x.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()})}swapAudioCodec(){x.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){x.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){x.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){x.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){x.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){x.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){x.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 ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(x.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){Ki(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const r=e.length;for(let s=0;s<r;s++)if(e[s].maxBitrate>=t)return s;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:r}=this;let s;if(t===-1&&e!=null&&e.length?s=e.length-1:s=t,r)for(let a=s;a--;){const l=e[a].attrs["HDCP-LEVEL"];if(l&&l<=r)return a}return s}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()}setAudioOption(e){var t;return(t=this.audioTrackController)==null?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return(t=this.subtitleTrackController)==null||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}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}ls.defaultConfig=void 0}}]);
}());