|
|
!(function(){var Yo=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[7482],{70557:function($t,st,D){"use strict";D.d(st,{Z:function(){return Ee}});var R=D(96663),_e=D(59301),me={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"},Ie=me,fe=D(7657),re=function($,F){return _e.createElement(fe.Z,(0,R.Z)({},$,{ref:F,icon:Ie}))},ve=_e.forwardRef(re),Ee=ve},84105:function($t,st,D){"use strict";D.d(st,{Z:function(){return Ee}});var R=D(96663),_e=D(59301),me={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"},Ie=me,fe=D(7657),re=function($,F){return _e.createElement(fe.Z,(0,R.Z)({},$,{ref:F,icon:Ie}))},ve=_e.forwardRef(re),Ee=ve},73331:function($t,st,D){"use strict";D.d(st,{Z:function(){return Ee}});var R=D(96663),_e=D(59301),me={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"},Ie=me,fe=D(7657),re=function($,F){return _e.createElement(fe.Z,(0,R.Z)({},$,{ref:F,icon:Ie}))},ve=_e.forwardRef(re),Ee=ve},15277:function($t,st,D){"use strict";D.d(st,{Z:function(){return Ee}});var R=D(96663),_e=D(59301),me={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"},Ie=me,fe=D(7657),re=function($,F){return _e.createElement(fe.Z,(0,R.Z)({},$,{ref:F,icon:Ie}))},ve=_e.forwardRef(re),Ee=ve},61485:function($t,st,D){"use strict";D.d(st,{Z:function(){return Ee}});var R=D(96663),_e=D(59301),me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},Ie=me,fe=D(7657),re=function($,F){return _e.createElement(fe.Z,(0,R.Z)({},$,{ref:F,icon:Ie}))},ve=_e.forwardRef(re),Ee=ve},47472:function($t,st,D){"use strict";D.d(st,{Z:function(){return Ee}});var R=D(96663),_e=D(59301),me={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"},Ie=me,fe=D(7657),re=function($,F){return _e.createElement(fe.Z,(0,R.Z)({},$,{ref:F,icon:Ie}))},ve=_e.forwardRef(re),Ee=ve},87395:function($t,st,D){"use strict";D.d(st,{Z:function(){return Ee}});var R=D(96663),_e=D(59301),me={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"},Ie=me,fe=D(7657),re=function($,F){return _e.createElement(fe.Z,(0,R.Z)({},$,{ref:F,icon:Ie}))},ve=_e.forwardRef(re),Ee=ve},35593:function($t,st,D){"use strict";D.d(st,{Z:function(){return Bt}});var R=D(44127),_e=D(72071),me=D(6620),Ie=D(43403),fe=D(92310),re=D.n(fe),ve=D(29301),Ee=D(76846),o=D(96452),$=D(6089),F=D(80402),w=D(34280),f=D(49658),_=D(59301),y=D(96663),U=D(77900),K=D(8654);function O(Oe){var qe=Oe.prefixCls,se=Oe.align,Ne=Oe.arrow,He=Oe.arrowPos,N=Ne||{},ee=N.className,ye=N.content,be=He.x,Le=be===void 0?0:be,Be=He.y,Ve=Be===void 0?0:Be,nt=_.useRef();if(!se||!se.points)return null;var Qe={position:"absolute"};if(se.autoArrow!==!1){var je=se.points[0],bt=se.points[1],Ae=je[0],De=je[1],Ue=bt[0],it=bt[1];Ae===Ue||!["t","b"].includes(Ae)?Qe.top=Ve:Ae==="t"?Qe.top=0:Qe.bottom=0,De===it||!["l","r"].includes(De)?Qe.left=Le:De==="l"?Qe.left=0:Qe.right=0}return _.createElement("div",{ref:nt,className:re()("".concat(qe,"-arrow"),ee),style:Qe},ye)}function I(Oe){var qe=Oe.prefixCls,se=Oe.open,Ne=Oe.zIndex,He=Oe.mask,N=Oe.motion;return He?_.createElement(U.default,(0,y.Z)({},N,{motionAppear:!0,visible:se,removeOnLeave:!0}),function(ee){var ye=ee.className;return _.createElement("div",{style:{zIndex:Ne},className:re()("".concat(qe,"-mask"),ye)})}):null}var H=_.memo(function(Oe){var qe=Oe.children;return qe},function(Oe,qe){return qe.cache}),te=H,S=_.forwardRef(function(Oe,qe){var se=Oe.popup,Ne=Oe.className,He=Oe.prefixCls,N=Oe.style,ee=Oe.target,ye=Oe.onVisibleChanged,be=Oe.open,Le=Oe.keepDom,Be=Oe.fresh,Ve=Oe.onClick,nt=Oe.mask,Qe=Oe.arrow,je=Oe.arrowPos,bt=Oe.align,Ae=Oe.motion,De=Oe.maskMotion,Ue=Oe.forceRender,it=Oe.getPopupContainer,et=Oe.autoDestroy,ft=Oe.portal,_t=Oe.zIndex,v=Oe.onMouseEnter,E=Oe.onMouseLeave,Ye=Oe.onPointerEnter,P=Oe.ready,oe=Oe.offsetX,kt=Oe.offsetY,ge=Oe.offsetR,Pe=Oe.offsetB,Ge=Oe.onAlign,z=Oe.onPrepare,J=Oe.stretch,ce=Oe.targetWidth,Ce=Oe.targetHeight,M=typeof se=="function"?se():se,xt=be||Le,pe=(it==null?void 0:it.length)>0,Lt=_.useState(!it||!pe),It=(0,_e.Z)(Lt,2),Wt=It[0],ur=It[1];if((0,w.Z)(function(){!Wt&&pe&&ee&&ur(!0)},[Wt,pe,ee]),!Wt)return null;var Ct="auto",Ot={left:"-1000vw",top:"-1000vh",right:Ct,bottom:Ct};if(P||!be){var Re,ot=bt.points,dt=bt.dynamicInset||((Re=bt._experimental)===null||Re===void 0?void 0:Re.dynamicInset),mt=dt&&ot[0][1]==="r",ut=dt&&ot[0][0]==="b";mt?(Ot.right=ge,Ot.left=Ct):(Ot.left=oe,Ot.right=Ct),ut?(Ot.bottom=Pe,Ot.top=Ct):(Ot.top=kt,Ot.bottom=Ct)}var Et={};return J&&(J.includes("height")&&Ce?Et.height=Ce:J.includes("minHeight")&&Ce&&(Et.minHeight=Ce),J.includes("width")&&ce?Et.width=ce:J.includes("minWidth")&&ce&&(Et.minWidth=ce)),be||(Et.pointerEvents="none"),_.createElement(ft,{open:Ue||xt,getContainer:it&&function(){return it(ee)},autoDestroy:et},_.createElement(I,{prefixCls:He,open:be,zIndex:_t,mask:nt,motion:De}),_.createElement(ve.Z,{onResize:Ge,disabled:!be},function(Kt){return _.createElement(U.default,(0,y.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Ue,leavedClassName:"".concat(He,"-hidden")},Ae,{onAppearPrepare:z,onEnterPrepare:z,visible:be,onVisibleChanged:function(Xt){var lr;Ae==null||(lr=Ae.onVisibleChanged)===null||lr===void 0||lr.call(Ae,Xt),ye(Xt)}}),function(hr,Xt){var lr=hr.className,Jt=hr.style,xr=re()(He,lr,Ne);return _.createElement("div",{ref:(0,K.sQ)(Kt,qe,Xt),className:xr,style:(0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)({"--arrow-x":"".concat(je.x||0,"px"),"--arrow-y":"".concat(je.y||0,"px")},Ot),Et),Jt),{},{boxSizing:"border-box",zIndex:_t},N),onMouseEnter:v,onMouseLeave:E,onPointerEnter:Ye,onClick:Ve},Qe&&_.createElement(O,{prefixCls:He,arrow:Qe,arrowPos:je,align:bt}),_.createElement(te,{cache:!be&&!Be},M))})}))}),j=S,ae=_.forwardRef(function(Oe,qe){var se=Oe.children,Ne=Oe.getTriggerDOMNode,He=(0,K.Yr)(se),N=_.useCallback(function(ye){(0,K.mH)(qe,Ne?Ne(ye):ye)},[Ne]),ee=(0,K.x1)(N,se.ref);return He?_.cloneElement(se,{ref:ee}):se}),de=ae,Se=_.createContext(null),we=Se;function Me(Oe){return Oe?Array.isArray(Oe)?Oe:[Oe]:[]}function $e(Oe,qe,se,Ne){return _.useMemo(function(){var He=Me(se!=null?se:qe),N=Me(Ne!=null?Ne:qe),ee=new Set(He),ye=new Set(N);return Oe&&(ee.has("hover")&&(ee.delete("hover"),ee.add("click")),ye.has("hover")&&(ye.delete("hover"),ye.add("click"))),[ee,ye]},[Oe,qe,se,Ne])}var Y=D(29194);function B(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],se=arguments.length>2?arguments[2]:void 0;return se?Oe[0]===qe[0]:Oe[0]===qe[0]&&Oe[1]===qe[1]}function Z(Oe,qe,se,Ne){for(var He=se.points,N=Object.keys(Oe),ee=0;ee<N.length;ee+=1){var ye,be=N[ee];if(B((ye=Oe[be])===null||ye===void 0?void 0:ye.points,He,Ne))return"".concat(qe,"-placement-").concat(be)}return""}function X(Oe,qe,se,Ne){return qe||(se?{motionName:"".concat(Oe,"-").concat(se)}:Ne?{motionName:Ne}:null)}function le(Oe){return Oe.ownerDocument.defaultView}function q(Oe){for(var qe=[],se=Oe==null?void 0:Oe.parentElement,Ne=["hidden","scroll","clip","auto"];se;){var He=le(se).getComputedStyle(se),N=He.overflowX,ee=He.overflowY,ye=He.overflow;[N,ee,ye].some(function(be){return Ne.includes(be)})&&qe.push(se),se=se.parentElement}return qe}function b(Oe){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Oe)?qe:Oe}function x(Oe){return b(parseFloat(Oe),0)}function G(Oe,qe){var se=(0,R.Z)({},Oe);return(qe||[]).forEach(function(Ne){if(!(Ne instanceof HTMLBodyElement||Ne instanceof HTMLHtmlElement)){var He=le(Ne).getComputedStyle(Ne),N=He.overflow,ee=He.overflowClipMargin,ye=He.borderTopWidth,be=He.borderBottomWidth,Le=He.borderLeftWidth,Be=He.borderRightWidth,Ve=Ne.getBoundingClientRect(),nt=Ne.offsetHeight,Qe=Ne.clientHeight,je=Ne.offsetWidth,bt=Ne.clientWidth,Ae=x(ye),De=x(be),Ue=x(Le),it=x(Be),et=b(Math.round(Ve.width/je*1e3)/1e3),ft=b(Math.round(Ve.height/nt*1e3)/1e3),_t=(je-bt-Ue-it)*et,v=(nt-Qe-Ae-De)*ft,E=Ae*ft,Ye=De*ft,P=Ue*et,oe=it*et,kt=0,ge=0;if(N==="clip"){var Pe=x(ee);kt=Pe*et,ge=Pe*ft}var Ge=Ve.x+P-kt,z=Ve.y+E-ge,J=Ge+Ve.width+2*kt-P-oe-_t,ce=z+Ve.height+2*ge-E-Ye-v;se.left=Math.max(se.left,Ge),se.top=Math.max(se.top,z),se.right=Math.min(se.right,J),se.bottom=Math.min(se.bottom,ce)}}),se}function ue(Oe){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,se="".concat(qe),Ne=se.match(/^(.*)\%$/);return Ne?Oe*(parseFloat(Ne[1])/100):parseFloat(se)}function ze(Oe,qe){var se=qe||[],Ne=(0,_e.Z)(se,2),He=Ne[0],N=Ne[1];return[ue(Oe.width,He),ue(Oe.height,N)]}function Xe(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Oe[0],Oe[1]]}function Ke(Oe,qe){var se=qe[0],Ne=qe[1],He,N;return se==="t"?N=Oe.y:se==="b"?N=Oe.y+Oe.height:N=Oe.y+Oe.height/2,Ne==="l"?He=Oe.x:Ne==="r"?He=Oe.x+Oe.width:He=Oe.x+Oe.width/2,{x:He,y:N}}function Ze(Oe,qe){var se={t:"b",b:"t",l:"r",r:"l"};return Oe.map(function(Ne,He){return He===qe?se[Ne]||"c":Ne}).join("")}function pt(Oe,qe,se,Ne,He,N,ee){var ye=_.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:He[Ne]||{}}),be=(0,_e.Z)(ye,2),Le=be[0],Be=be[1],Ve=_.useRef(0),nt=_.useMemo(function(){return qe?q(qe):[]},[qe]),Qe=_.useRef({}),je=function(){Qe.current={}};Oe||je();var bt=(0,$.Z)(function(){if(qe&&se&&Oe){let gn=function(Vn,Xn){var ci=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xr,Qn=M.x+Vn,Oi=M.y+Xn,Pi=Qn+Re,ji=Oi+Ot,Si=Math.max(Qn,ci.left),es=Math.max(Oi,ci.top),Mi=Math.min(Pi,ci.right),ts=Math.min(ji,ci.bottom);return Math.max(0,(Mi-Si)*(ts-es))},Hr=function(){Ht=M.y+Cr,ar=Ht+Ot,Wr=M.x+br,En=Wr+Re};var Ue,it,et=qe,ft=et.ownerDocument,_t=le(et),v=_t.getComputedStyle(et),E=v.width,Ye=v.height,P=v.position,oe=et.style.left,kt=et.style.top,ge=et.style.right,Pe=et.style.bottom,Ge=et.style.overflow,z=(0,R.Z)((0,R.Z)({},He[Ne]),N),J=ft.createElement("div");(Ue=et.parentElement)===null||Ue===void 0||Ue.appendChild(J),J.style.left="".concat(et.offsetLeft,"px"),J.style.top="".concat(et.offsetTop,"px"),J.style.position=P,J.style.height="".concat(et.offsetHeight,"px"),J.style.width="".concat(et.offsetWidth,"px"),et.style.left="0",et.style.top="0",et.style.right="auto",et.style.bottom="auto",et.style.overflow="hidden";var ce;if(Array.isArray(se))ce={x:se[0],y:se[1],width:0,height:0};else{var Ce=se.getBoundingClientRect();ce={x:Ce.x,y:Ce.y,width:Ce.width,height:Ce.height}}var M=et.getBoundingClientRect(),xt=ft.documentElement,pe=xt.clientWidth,Lt=xt.clientHeight,It=xt.scrollWidth,Wt=xt.scrollHeight,ur=xt.scrollTop,Ct=xt.scrollLeft,Ot=M.height,Re=M.width,ot=ce.height,dt=ce.width,mt={left:0,top:0,right:pe,bottom:Lt},ut={left:-Ct,top:-ur,right:It-Ct,bottom:Wt-ur},Et=z.htmlRegion,Kt="visible",hr="visibleFirst";Et!=="scroll"&&Et!==hr&&(Et=Kt);var Xt=Et===hr,lr=G(ut,nt),Jt=G(mt,nt),xr=Et===Kt?Jt:lr,Lr=Xt?Jt:xr;et.style.left="auto",et.style.top="auto",et.style.right="0",et.style.bottom="0";var wt=et.getBoundingClientRect();et.style.left=oe,et.style.top=kt,et.style.right=ge,et.style.bottom=Pe,et.style.overflow=Ge,(it=et.parentElement)===null||it===void 0||it.removeChild(J);var Tt=b(Math.round(Re/parseFloat(E)*1e3)/1e3),tr=b(Math.round(Ot/parseFloat(Ye)*1e3)/1e3);if(Tt===0||tr===0||(0,Ee.Sh)(se)&&!(0,Y.Z)(se))return;var vr=z.offset,cr=z.targetOffset,rr=ze(M,vr),Mr=(0,_e.Z)(rr,2),Er=Mr[0],fr=Mr[1],mr=ze(ce,cr),gr=(0,_e.Z)(mr,2),Fr=gr[0],Gr=gr[1];ce.x-=Fr,ce.y-=Gr;var Sr=z.points||[],pr=(0,_e.Z)(Sr,2),_r=pr[0],Pr=pr[1],yr=Xe(Pr),Dr=Xe(_r),jr=Ke(ce,yr),Tn=Ke(M,Dr),Yr=(0,R.Z)({},z),br=jr.x-Tn.x+Er,Cr=jr.y-Tn.y+fr,vn=gn(br,Cr),qr=gn(br,Cr,Jt),Jr=Ke(ce,["t","l"]),zr=Ke(M,["t","l"]),en=Ke(ce,["b","r"]),tn=Ke(M,["b","r"]),rn=z.overflow||{},_n=rn.adjustX,kn=rn.adjustY,Dn=rn.shiftX,Gt=rn.shiftY,ke=function(Xn){return typeof Xn=="boolean"?Xn:Xn>=0},Ht,ar,Wr,En;Hr();var Ln=ke(kn),yn=Dr[0]===yr[0];if(Ln&&Dr[0]==="t"&&(ar>Lr.bottom||Qe.current.bt)){var Nr=Cr;yn?Nr-=Ot-ot:Nr=Jr.y-tn.y-fr;var bn=gn(br,Nr),In=gn(br,Nr,Jt);bn>vn||bn===vn&&(!Xt||In>=qr)?(Qe.current.bt=!0,Cr=Nr,fr=-fr,Yr.points=[Ze(Dr,0),Ze(yr,0)]):Qe.current.bt=!1}if(Ln&&Dr[0]==="b"&&(Ht<Lr.top||Qe.current.tb)){var an=Cr;yn?an+=Ot-ot:an=en.y-zr.y-fr;var pn=gn(br,an),zi=gn(br,an,Jt);pn>vn||pn===vn&&(!Xt||zi>=qr)?(Qe.current.tb=!0,Cr=an,fr=-fr,Yr.points=[Ze(Dr,0),Ze(yr,0)]):Qe.current.tb=!1}var ti=ke(_n),li=Dr[1]===yr[1];if(ti&&Dr[1]==="l"&&(En>Lr.right||Qe.current.rl)){var er=br;li?er-=Re-dt:er=Jr.x-tn.x-Er;var Gn=gn(er,Cr),mn=gn(er,Cr,Jt);Gn>vn||Gn===vn&&(!Xt||mn>=qr)?(Qe.current.rl=!0,br=er,Er=-Er,Yr.points=[Ze(Dr,1),Ze(yr,1)]):Qe.current.rl=!1}if(ti&&Dr[1]==="r"&&(Wr<Lr.left||Qe.current.lr)){var Fn=br;li?Fn+=Re-dt:Fn=en.x-zr.x-Er;var Gi=gn(Fn,Cr),ui=gn(Fn,Cr,Jt);Gi>vn||Gi===vn&&(!Xt||ui>=qr)?(Qe.current.lr=!0,br=Fn,Er=-Er,Yr.points=[Ze(Dr,1),Ze(yr,1)]):Qe.current.lr=!1}Hr();var ri=Dn===!0?0:Dn;typeof ri=="number"&&(Wr<Jt.left&&(br-=Wr-Jt.left-Er,ce.x+dt<Jt.left+ri&&(br+=ce.x-Jt.left+dt-ri)),En>Jt.right&&(br-=En-Jt.right-Er,ce.x>Jt.right-ri&&(br+=ce.x-Jt.right+ri)));var Yn=Gt===!0?0:Gt;typeof Yn=="number"&&(Ht<Jt.top&&(Cr-=Ht-Jt.top-fr,ce.y+ot<Jt.top+Yn&&(Cr+=ce.y-Jt.top+ot-Yn)),ar>Jt.bottom&&(Cr-=ar-Jt.bottom-fr,ce.y>Jt.bottom-Yn&&(Cr+=ce.y-Jt.bottom+Yn)));var hn=M.x+br,qn=hn+Re,Kn=M.y+Cr,ki=Kn+Ot,On=ce.x,Un=On+dt,Br=ce.y,pi=Br+ot,Li=Math.max(hn,On),Ii=Math.min(qn,Un),Pn=(Li+Ii)/2,mi=Pn-hn,Hi=Math.max(Kn,Br),Pt=Math.min(ki,pi),Mn=(Hi+Pt)/2,Fi=Mn-Kn;ee==null||ee(qe,Yr);var gi=wt.right-M.x-(br+M.width),Cn=wt.bottom-M.y-(Cr+M.height);Be({ready:!0,offsetX:br/Tt,offsetY:Cr/tr,offsetR:gi/Tt,offsetB:Cn/tr,arrowX:mi/Tt,arrowY:Fi/tr,scaleX:Tt,scaleY:tr,align:Yr})}}),Ae=function(){Ve.current+=1;var it=Ve.current;Promise.resolve().then(function(){Ve.current===it&&bt()})},De=function(){Be(function(it){return(0,R.Z)((0,R.Z)({},it),{},{ready:!1})})};return(0,w.Z)(De,[Ne]),(0,w.Z)(function(){Oe||De()},[Oe]),[Le.ready,Le.offsetX,Le.offsetY,Le.offsetR,Le.offsetB,Le.arrowX,Le.arrowY,Le.scaleX,Le.scaleY,Le.align,Ae]}var ct=D(19127);function ht(Oe,qe,se,Ne,He){(0,w.Z)(function(){if(Oe&&qe&&se){let Ve=function(){Ne(),He()};var N=qe,ee=se,ye=q(N),be=q(ee),Le=le(ee),Be=new Set([Le].concat((0,ct.Z)(ye),(0,ct.Z)(be)));return Be.forEach(function(nt){nt.addEventListener("scroll",Ve,{passive:!0})}),Le.addEventListener("resize",Ve,{passive:!0}),Ne(),function(){Be.forEach(function(nt){nt.removeEventListener("scroll",Ve),Le.removeEventListener("resize",Ve)})}}},[Oe,qe,se])}var jt=D(48736),Zt=D(16089);function qt(Oe,qe,se,Ne,He,N,ee,ye){var be=_.useRef(Oe),Le=_.useRef(!1);be.current!==Oe&&(Le.current=!0,be.current=Oe),_.useEffect(function(){var Be=(0,Zt.Z)(function(){Le.current=!1});return function(){Zt.Z.cancel(Be)}},[Oe]),_.useEffect(function(){if(qe&&Ne&&(!He||N)){var Be=function(){var P=!1,oe=function(Pe){var Ge=Pe.target;P=ee(Ge)},kt=function(Pe){var Ge=Pe.target;!Le.current&&be.current&&!P&&!ee(Ge)&&ye(!1)};return[oe,kt]},Ve=Be(),nt=(0,_e.Z)(Ve,2),Qe=nt[0],je=nt[1],bt=Be(),Ae=(0,_e.Z)(bt,2),De=Ae[0],Ue=Ae[1],it=le(Ne);it.addEventListener("mousedown",Qe,!0),it.addEventListener("click",je,!0),it.addEventListener("contextmenu",je,!0);var et=(0,o.A)(se);if(et&&(et.addEventListener("mousedown",De,!0),et.addEventListener("click",Ue,!0),et.addEventListener("contextmenu",Ue,!0)),0)var ft,_t,v,E;return function(){it.removeEventListener("mousedown",Qe,!0),it.removeEventListener("click",je,!0),it.removeEventListener("contextmenu",je,!0),et&&(et.removeEventListener("mousedown",De,!0),et.removeEventListener("click",Ue,!0),et.removeEventListener("contextmenu",Ue,!0))}}},[qe,se,Ne,He,N])}var Ut=["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 zt(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ie.Z,qe=_.forwardRef(function(se,Ne){var He=se.prefixCls,N=He===void 0?"rc-trigger-popup":He,ee=se.children,ye=se.action,be=ye===void 0?"hover":ye,Le=se.showAction,Be=se.hideAction,Ve=se.popupVisible,nt=se.defaultPopupVisible,Qe=se.onPopupVisibleChange,je=se.afterPopupVisibleChange,bt=se.mouseEnterDelay,Ae=se.mouseLeaveDelay,De=Ae===void 0?.1:Ae,Ue=se.focusDelay,it=se.blurDelay,et=se.mask,ft=se.maskClosable,_t=ft===void 0?!0:ft,v=se.getPopupContainer,E=se.forceRender,Ye=se.autoDestroy,P=se.destroyPopupOnHide,oe=se.popup,kt=se.popupClassName,ge=se.popupStyle,Pe=se.popupPlacement,Ge=se.builtinPlacements,z=Ge===void 0?{}:Ge,J=se.popupAlign,ce=se.zIndex,Ce=se.stretch,M=se.getPopupClassNameFromAlign,xt=se.fresh,pe=se.alignPoint,Lt=se.onPopupClick,It=se.onPopupAlign,Wt=se.arrow,ur=se.popupMotion,Ct=se.maskMotion,Ot=se.popupTransitionName,Re=se.popupAnimation,ot=se.maskTransitionName,dt=se.maskAnimation,mt=se.className,ut=se.getTriggerDOMNode,Et=(0,me.Z)(se,Ut),Kt=Ye||P||!1,hr=_.useState(!1),Xt=(0,_e.Z)(hr,2),lr=Xt[0],Jt=Xt[1];(0,w.Z)(function(){Jt((0,f.Z)())},[]);var xr=_.useRef({}),Lr=_.useContext(we),wt=_.useMemo(function(){return{registerSubPopup:function(Yt,$r){xr.current[Yt]=$r,Lr==null||Lr.registerSubPopup(Yt,$r)}}},[Lr]),Tt=(0,F.Z)(),tr=_.useState(null),vr=(0,_e.Z)(tr,2),cr=vr[0],rr=vr[1],Mr=(0,$.Z)(function(or){(0,Ee.Sh)(or)&&cr!==or&&rr(or),Lr==null||Lr.registerSubPopup(Tt,or)}),Er=_.useState(null),fr=(0,_e.Z)(Er,2),mr=fr[0],gr=fr[1],Fr=_.useRef(null),Gr=(0,$.Z)(function(or){(0,Ee.Sh)(or)&&mr!==or&&(gr(or),Fr.current=or)}),Sr=_.Children.only(ee),pr=(Sr==null?void 0:Sr.props)||{},_r={},Pr=(0,$.Z)(function(or){var Yt,$r,fn=mr;return(fn==null?void 0:fn.contains(or))||((Yt=(0,o.A)(fn))===null||Yt===void 0?void 0:Yt.host)===or||or===fn||(cr==null?void 0:cr.contains(or))||(($r=(0,o.A)(cr))===null||$r===void 0?void 0:$r.host)===or||or===cr||Object.values(xr.current).some(function(on){return(on==null?void 0:on.contains(or))||or===on})}),yr=X(N,ur,Re,Ot),Dr=X(N,Ct,dt,ot),jr=_.useState(nt||!1),Tn=(0,_e.Z)(jr,2),Yr=Tn[0],br=Tn[1],Cr=Ve!=null?Ve:Yr,vn=(0,$.Z)(function(or){Ve===void 0&&br(or)});(0,w.Z)(function(){br(Ve||!1)},[Ve]);var qr=_.useRef(Cr);qr.current=Cr;var Jr=_.useRef([]);Jr.current=[];var zr=(0,$.Z)(function(or){var Yt;vn(or),((Yt=Jr.current[Jr.current.length-1])!==null&&Yt!==void 0?Yt:Cr)!==or&&(Jr.current.push(or),Qe==null||Qe(or))}),en=_.useRef(),tn=function(){clearTimeout(en.current)},rn=function(Yt){var $r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;tn(),$r===0?zr(Yt):en.current=setTimeout(function(){zr(Yt)},$r*1e3)};_.useEffect(function(){return tn},[]);var _n=_.useState(!1),kn=(0,_e.Z)(_n,2),Dn=kn[0],Gt=kn[1];(0,w.Z)(function(or){(!or||Cr)&&Gt(!0)},[Cr]);var ke=_.useState(null),Ht=(0,_e.Z)(ke,2),ar=Ht[0],Wr=Ht[1],En=_.useState([0,0]),Ln=(0,_e.Z)(En,2),yn=Ln[0],Nr=Ln[1],bn=function(Yt){Nr([Yt.clientX,Yt.clientY])},In=pt(Cr,cr,pe?yn:mr,Pe,z,J,It),an=(0,_e.Z)(In,11),pn=an[0],zi=an[1],ti=an[2],li=an[3],er=an[4],Gn=an[5],mn=an[6],Fn=an[7],Gi=an[8],ui=an[9],ri=an[10],Yn=$e(lr,be,Le,Be),hn=(0,_e.Z)(Yn,2),qn=hn[0],Kn=hn[1],ki=qn.has("click"),On=Kn.has("click")||Kn.has("contextMenu"),Un=(0,$.Z)(function(){Dn||ri()}),Br=function(){qr.current&&pe&&On&&rn(!1)};ht(Cr,mr,cr,Un,Br),(0,w.Z)(function(){Un()},[yn,Pe]),(0,w.Z)(function(){Cr&&!(z!=null&&z[Pe])&&Un()},[JSON.stringify(J)]);var pi=_.useMemo(function(){var or=Z(z,N,ui,pe);return re()(or,M==null?void 0:M(ui))},[ui,M,z,N,pe]);_.useImperativeHandle(Ne,function(){return{nativeElement:Fr.current,forceAlign:Un}});var Li=_.useState(0),Ii=(0,_e.Z)(Li,2),Pn=Ii[0],mi=Ii[1],Hi=_.useState(0),Pt=(0,_e.Z)(Hi,2),Mn=Pt[0],Fi=Pt[1],gi=function(){if(Ce&&mr){var Yt=mr.getBoundingClientRect();mi(Yt.width),Fi(Yt.height)}},Cn=function(){gi(),Un()},gn=function(Yt){Gt(!1),ri(),je==null||je(Yt)},Hr=function(){return new Promise(function(Yt){gi(),Wr(function(){return Yt})})};(0,w.Z)(function(){ar&&(ri(),ar(),Wr(null))},[ar]);function Vn(or,Yt,$r,fn){_r[or]=function(on){var Hn;fn==null||fn(on),rn(Yt,$r);for(var Wi=arguments.length,Ki=new Array(Wi>1?Wi-1:0),ni=1;ni<Wi;ni++)Ki[ni-1]=arguments[ni];(Hn=pr[or])===null||Hn===void 0||Hn.call.apply(Hn,[pr,on].concat(Ki))}}(ki||On)&&(_r.onClick=function(or){var Yt;qr.current&&On?rn(!1):!qr.current&&ki&&(bn(or),rn(!0));for(var $r=arguments.length,fn=new Array($r>1?$r-1:0),on=1;on<$r;on++)fn[on-1]=arguments[on];(Yt=pr.onClick)===null||Yt===void 0||Yt.call.apply(Yt,[pr,or].concat(fn))}),qt(Cr,On,mr,cr,et,_t,Pr,rn);var Xn=qn.has("hover"),ci=Kn.has("hover"),Qn,Oi;Xn&&(Vn("onMouseEnter",!0,bt,function(or){bn(or)}),Vn("onPointerEnter",!0,bt,function(or){bn(or)}),Qn=function(Yt){(Cr||Dn)&&cr!==null&&cr!==void 0&&cr.contains(Yt.target)&&rn(!0,bt)},pe&&(_r.onMouseMove=function(or){var Yt;(Yt=pr.onMouseMove)===null||Yt===void 0||Yt.call(pr,or)})),ci&&(Vn("onMouseLeave",!1,De),Vn("onPointerLeave",!1,De),Oi=function(){rn(!1,De)}),qn.has("focus")&&Vn("onFocus",!0,Ue),Kn.has("focus")&&Vn("onBlur",!1,it),qn.has("contextMenu")&&(_r.onContextMenu=function(or){var Yt;qr.current&&Kn.has("contextMenu")?rn(!1):(bn(or),rn(!0)),or.preventDefault();for(var $r=arguments.length,fn=new Array($r>1?$r-1:0),on=1;on<$r;on++)fn[on-1]=arguments[on];(Yt=pr.onContextMenu)===null||Yt===void 0||Yt.call.apply(Yt,[pr,or].concat(fn))}),mt&&(_r.className=re()(pr.className,mt));var Pi=(0,R.Z)((0,R.Z)({},pr),_r),ji={},Si=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Si.forEach(function(or){Et[or]&&(ji[or]=function(){for(var Yt,$r=arguments.length,fn=new Array($r),on=0;on<$r;on++)fn[on]=arguments[on];(Yt=Pi[or])===null||Yt===void 0||Yt.call.apply(Yt,[Pi].concat(fn)),Et[or].apply(Et,fn)})});var es=_.cloneElement(Sr,(0,R.Z)((0,R.Z)({},Pi),ji)),Mi={x:Gn,y:mn},ts=Wt?(0,R.Z)({},Wt!==!0?Wt:{}):null;return _.createElement(_.Fragment,null,_.createElement(ve.Z,{disabled:!Cr,ref:Gr,onResize:Cn},_.createElement(de,{getTriggerDOMNode:ut},es)),_.createElement(we.Provider,{value:wt},_.createElement(j,{portal:Oe,ref:Mr,prefixCls:N,popup:oe,className:re()(kt,pi),style:ge,target:mr,onMouseEnter:Qn,onMouseLeave:Oi,onPointerEnter:Qn,zIndex:ce,open:Cr,keepDom:Dn,fresh:xt,onClick:Lt,mask:et,motion:yr,maskMotion:Dr,onVisibleChanged:gn,onPrepare:Hr,forceRender:E,autoDestroy:Kt,getPopupContainer:v,align:ui,arrow:ts,arrowPos:Mi,ready:pn,offsetX:zi,offsetY:ti,offsetR:li,offsetB:er,onAlign:Un,stretch:Ce,targetWidth:Pn/Fn,targetHeight:Mn/Gi})))});return qe}var Bt=zt(Ie.Z)},50304:function(){"use strict"},6021:function($t,st,D){"use strict";D.d(st,{Z:function(){return _}});var R=D(3113),_e=D(59301),me=Object.defineProperty,Ie=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,o=(y,U,K)=>U in y?me(y,U,{enumerable:!0,configurable:!0,writable:!0,value:K}):y[U]=K,$=(y,U)=>{for(var K in U||(U={}))ve.call(U,K)&&o(y,K,U[K]);if(re)for(var K of re(U))Ee.call(U,K)&&o(y,K,U[K]);return y},F=(y,U)=>Ie(y,fe(U)),w=(y,U)=>{var K={};for(var O in y)ve.call(y,O)&&U.indexOf(O)<0&&(K[O]=y[O]);if(y!=null&&re)for(var O of re(y))U.indexOf(O)<0&&Ee.call(y,O)&&(K[O]=y[O]);return K},f=(y,U,K)=>new Promise((O,I)=>{var H=j=>{try{S(K.next(j))}catch(ae){I(ae)}},te=j=>{try{S(K.throw(j))}catch(ae){I(ae)}},S=j=>j.done?O(j.value):Promise.resolve(j.value).then(H,te);S((K=K.apply(y,U)).next())});const _=y=>{var U=y,{children:K}=U,O=w(U,["children"]);const[I,H]=(0,_e.useState)(!1);return _e.createElement(R.ZP,F($({},O),{loading:I,onClick:te=>f(void 0,null,function*(){try{H(!0),yield O.onClick(te),H(!1)}catch(S){console.error(S),H(!1)}})}),K)}},8797:function($t,st,D){"use strict";var R=D(59301),_e=D(93314),me=D(3113),Ie=Object.defineProperty,fe=Object.defineProperties,re=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,$=(_,y,U)=>y in _?Ie(_,y,{enumerable:!0,configurable:!0,writable:!0,value:U}):_[y]=U,F=(_,y)=>{for(var U in y||(y={}))Ee.call(y,U)&&$(_,U,y[U]);if(ve)for(var U of ve(y))o.call(y,U)&&$(_,U,y[U]);return _},w=(_,y)=>fe(_,re(y));const f=({img:_,buttonProps:y={},styles:U={},customText:K,ButtonText:O,ButtonClick:I,Buttonclass:H,ButtonTwo:te,imgStyles:S,loading:j=!1})=>R.createElement("section",{className:"tc animated fadeIn",style:F(F({},{color:"#999",margin:"100px auto",visibility:j?"hidden":"visible"}),U)},R.createElement("img",{src:_||_e,style:w(F({},S),{pointerEvents:"none",userSelect:"none"})}),R.createElement("p",{className:"mt20 font14"},K||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),O&&R.createElement(me.ZP,F({className:H,onClick:I},y),O),te&&te);st.Z=f},23210:function($t,st,D){"use strict";D.d(st,{Z:function(){return H}});var R=D(59301),_e={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},me=D(3113),Ie=D(70557),fe=D(23954),re=D(6848),ve=D(955),Ee=D(94941),o=D(8797),$=D(3294),F=D(19381),w=D(59301),f=Object.defineProperty,_=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,K=(te,S,j)=>S in te?f(te,S,{enumerable:!0,configurable:!0,writable:!0,value:j}):te[S]=j,O=(te,S)=>{for(var j in S||(S={}))y.call(S,j)&&K(te,j,S[j]);if(_)for(var j of _(S))U.call(S,j)&&K(te,j,S[j]);return te},I=(te,S,j)=>new Promise((ae,de)=>{var Se=$e=>{try{Me(j.next($e))}catch(Y){de(Y)}},we=$e=>{try{Me(j.throw($e))}catch(Y){de(Y)}},Me=$e=>$e.done?ae($e.value):Promise.resolve($e.value).then(Se,we);Me((j=j.apply(te,S)).next())}),H=({editOffice:te="view",data:S,theme:j,type:ae,filename:de,monacoEditor:Se,className:we,style:Me,close:$e,onClose:Y,hasMask:B,disabledDownload:Z,onImgDimensions:X,showNodata:le,recordInfo:q})=>{const[b,x]=(0,R.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[G,ue]=(0,R.useState)(""),[ze,Xe]=(0,R.useState)(),Ke=window.ENV==="build"?"/react/build":"",Ze=location.host.startsWith("localhost")?$.Z.PROXY_SERVER:$.Z.API_SERVER,ct=10*(1024*1024),ht=(0,R.useRef)();S!=null&&S.startsWith("/api")&&ae!=="txt"&&(S=$.Z.API_SERVER+S);const jt=zt=>zt.substring(zt.lastIndexOf("/")+1).split(".").pop();de&&Se&&(Se.filename=de),(0,R.useEffect)(()=>{var zt,Bt;const Oe=(Bt=(zt=document.cookie)==null?void 0:zt.replace(/\s/g,""))==null?void 0:Bt.split(";");Oe==null||Oe.map(qe=>{let se=qe.split("=");se[0]==="_educoder_session"&&ue(se[1])})},[]),(0,R.useEffect)(()=>{ae==="office"&&(S.indexOf("bigfilescdn.")>-1||S.indexOf("bigfiles1")>-1?Xe({url:S,fileType:jt(S),model:S.indexOf("model=edit")?"edit":"view"}):Zt())},[ae,S]);const Zt=()=>I(void 0,null,function*(){console.log("data:",S);let zt=S;S.startsWith("http")||(zt=location.origin+zt);let Bt=new URL(zt).pathname.split("/").pop();const Oe=yield(0,Ee.gJ)({attachment_id:Bt});Oe.url=Ze+Oe.url,Xe(Oe)}),qt=()=>{if(S.startsWith("http")||S.startsWith("blob:")){Ut();return}(0,ve.Sv)(de||"educoder",S,de)},Ut=()=>{q&&(0,F.fc)({id:q==null?void 0:q.id,watch_type:1,course_id:q==null?void 0:q.course_id}),(0,ve.Nd)(de||"educoder",decodeURIComponent(S))};return w.createElement("div",{style:O({},Me||{}),className:`${B&&_e.bgBlack} ${ae?_e.wrp:"hide"}`},$e&&w.createElement("div",{className:_e.close,ref:ht},!!X&&w.createElement(re.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ht.current},w.createElement("span",{onClick:()=>{Y(),X()}},w.createElement("i",{className:"icon-yulanpizhu"}))),!Z&&w.createElement(re.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ht.current},w.createElement("span",{onClick:Ut},w.createElement("i",{className:"icon-quxiaozhiding"}))),w.createElement(re.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ht.current},w.createElement("span",{className:"",onClick:Y},w.createElement("i",{className:"icon-guanbi1"})))),w.createElement("div",{className:`${_e[we]} ${we} ${_e.monaco} ${ae==="txt"?"show":"hide"}`},ae==="txt"&&w.createElement(w.Fragment,null,w.createElement(fe.ZP,O({},Se)))),ae==="audio"&&w.createElement("audio",{src:`${(S==null?void 0:S.indexOf("http://"))>-1||(S==null?void 0:S.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${S}`,autoPlay:!0}),ae==="video"&&w.createElement(w.Fragment,null,(S==null?void 0:S.indexOf("http"))>-1?w.createElement("video",{controls:!0,src:`${S}`,autoPlay:!0}):w.createElement("video",{controls:!0,src:`data:video/mp4;base64,${S}`,autoPlay:!0})),ae==="office"&&ze&&w.createElement("iframe",{src:`${Ke}/office.html?key=${ze.key}&url=${btoa(ze.url)}&callbackUrl=${Ze+(ze.callbackUrl||"")}&fileType=${ze.fileType}&title=${ze.title||""}&model=${te}&officeServer=${$.Z.ONLYOFFICE}&disabledDownload=${!!Z}`}),ae==="html"&&w.createElement("iframe",{src:S+"&disposition=inline"}),ae==="pdf"&&w.createElement("iframe",{src:`${Ke}/js/pdfview/index.html?filename=${de||"educoder.pdf"}&url=${encodeURIComponent(S)}&disabledDownload=${!!Z}`}),ae==="image"&&w.createElement("img",{src:`${(S==null?void 0:S.indexOf("http://"))>-1||(S==null?void 0:S.indexOf("https://"))>-1?"":"data:image/png;base64,"}${S}`}),(ae==="other"||ae==="download")&&w.createElement(w.Fragment,null,le?w.createElement(o.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:w.createElement(me.ZP,{icon:w.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:qt,disabled:Z},"\u4E0B\u8F7D")}):w.createElement(me.ZP,{type:"primary",size:"middle",onClick:qt,disabled:Z},w.createElement(Ie.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function($t,st,D){"use strict";D.d(st,{z:function(){return ae},Z:function(){return de}});var R=D(59301),_e=D(50304),me=D(24768),Ie=D(64018),fe=D(40846),re=D(3294),ve=D(955),Ee=D(15342),o=D(1012),$=D(23210),F=D(59301),f=({html:Se})=>{const we=(0,R.useRef)(null),Me=(0,R.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,R.useEffect)(()=>{const Y=we.current.attachShadow({mode:"open"});Me.current=document.createElement("div"),Me.current.className="markdown-body",Me.current.innerHTML=Se,Y.appendChild(Me.current);const B=document.createElement("style");return B.textContent=$e,Y.appendChild(B),()=>{Y.innerHTML=""}},[]),(0,R.useEffect)(()=>{Me.current&&(Me.current.innerHTML=Se)},[Se]),F.createElement("div",{ref:we})},_=Object.defineProperty,y=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,O=(Se,we,Me)=>we in Se?_(Se,we,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Se[we]=Me,I=(Se,we)=>{for(var Me in we||(we={}))U.call(we,Me)&&O(Se,Me,we[Me]);if(y)for(var Me of y(we))K.call(we,Me)&&O(Se,Me,we[Me]);return Se};const H="@\u2581\u2581@",te="@\u2581@",S=/<pre[^>]*>/g;function j(Se){let we=document.createElement("div");return we.innerHTML=Se,we.childNodes.length===0?"":we.childNodes[0].nodeValue}const ae=(Se,we)=>{Se=Se||"";const Me=/(?: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,Y=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,B=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return we?Se.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Me,(Z,X,le,q,b,x,G)=>{const ue=X||q||x,ze=le||b||G||"?";return re.Z.API_SERVER+"/api/attachments/"+ue+ze+"&t="+(0,ve.Jn)(ue,Date.now())+(Z.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Se=Se.replace(B,(Z,X,le,q,b,x,G)=>{const ue=X||q||x,ze=le||b||G||"?";return re.Z.API_SERVER+"/attachments/download/"+ue+ze+"&t="+(0,ve.Jn)(ue,Date.now())+(Z.indexOf(")")>-1?")":"&")}).replace(Me,(Z,X,le,q,b,x,G)=>{const ue=X||q||x,ze=le||b||G||"?";return re.Z.API_SERVER+"/api/attachments/"+ue+ze+"&t="+(0,ve.Jn)(ue,Date.now())+(Z.indexOf(")")>-1?")":"&")}).replace($e,(Z,X,le,q,b)=>{const x=X||q,G=le||b||"";return'"'+re.Z.API_SERVER+"/api/attachments/"+x+G+x+G+"&t="+(0,ve.Jn)(x,Date.now())}).replace(Y,(Z,X,le,q,b)=>{const x=X||q,G=le||b||"";return"("+re.Z.API_SERVER+"/files/uploads/"+x+G+x+G+"&t="+(0,ve.Jn)(x,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,`
|
|
|
`),Se)};var de=({value:Se="",className:we,showTextOnly:Me,showLines:$e,style:Y={},stylesPrev:B={},highlightKeywords:Z,showProgramFill:X,isProgramFill:le,disabledFill:q=!1,programFillValue:b,onFillChange:x=ze=>{},onFillBlur:G=()=>{},onFillFocus:ue=()=>{}})=>{let ze=String(Se);const[Xe,Ke]=(0,R.useState)(""),[Ze,pt]=(0,R.useState)("office"),[ct,ht]=(0,R.useState)([]),jt=(0,R.useRef)("a"+(0,o.Z)()),Zt={},qt=(be,Le,Be)=>{const Ve=document.createElement(be===te?"input":"textarea");Ve.style.width="100%",Ve.style.height=be===te?"40px":"151px",Ve.rows=5,Ve.spellcheck=!1,Ve.name="edu-program-fill",Ve.placeholder="\u8BF7\u8F93\u5165",Ve.dataset.id=Le;const nt=Object.keys(Zt).length;return Zt[nt]=Ve,`<span class="edu-program-fill-wrap ${be===te?"":"show"}" style="width:${be===te?"400px":"100%"}" title=${Be||""}><span>${Ve.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ut(be){return be=be.replace(/!\[.*?\]\(.*?\)/g,""),be=be.replace(/\[.*?\]\(.*?\)/g,""),be=be.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),be=be.replace(/<embed.*?>/g,""),be=be.replace(/<img.*?>/g,""),be=be.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),be=be.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),be=be.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),be=be.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),be}const zt=be=>be.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Le,Be){let Ve=Be.replace(/(\n|\r)/g,"").split("}"),nt=[];return Ve.map(Qe=>{Qe!=""&&nt.push(`.${jt.current} ${Qe}`)}),`<style>${nt.join("}")}</style>`}),Bt=(0,R.useMemo)(()=>{try{const Ve=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,nt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Qe=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,je=/\(\/attachments\/download\//g;ze=ze.replace(je,"("+re.Z.API_SERVER+"/attachments/download/").replace(Ve,"("+re.Z.API_SERVER+"/api/attachments/").replace(nt,'"'+re.Z.API_SERVER+"/api/attachments/").replace(Qe,'"'+re.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(Ve){}if(X){let Ve=-1;return ze=ze.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(nt,Qe,je){var bt;return++Ve,qt(nt,Ve,(bt=b==null?void 0:b[Ve])==null?void 0:bt.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${zt(ze||"")}</pre>`}let be=zt(ze);be=(0,me.ZP)(be);const Le=(0,me.ez)();ze.match(/\[TOC\]/)&&(be=be.replace("<p>[TOC]</p>",(0,me.Qv)()),(0,me.Iy)()),be=be.replace(/(__special_katext_id_\d+__)/g,(Ve,nt)=>{const{type:Qe,expression:je}=Le[nt];return(0,Ee.renderToString)(j(je)||"",{displayMode:Qe==="block",throwOnError:!1,output:"html"})}),be=be.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,me.AL)();const Be=document.createElement("div");if(Be.innerHTML=be,Me)return Be.innerText;if(Z){const Ve=Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ne(Be,Ve),Be.innerHTML}return setTimeout(()=>ee(),500),Be.innerHTML},[ze,Z]);(0,R.useEffect)(()=>{He.current&&He.current.querySelectorAll(["input","textarea"]).forEach(Le=>{Le.oninput=Oe,Le.onblur=qe,Le.onfocus=se})},[ct]),(0,R.useEffect)(()=>{var be,Le,Be,Ve,nt;if(b!=null&&b.length)try{const Qe=He.current.querySelectorAll(".edu-program-fill-score"),je=He.current.querySelectorAll('[name="edu-program-fill"]');for(const[bt,Ae]of je.entries())Ae.value=((be=b==null?void 0:b[bt])==null?void 0:be.value)||"",((Le=b==null?void 0:b[bt])==null?void 0:Le.type)==="warning"?Ae.className="program-fill-warning":((Be=b==null?void 0:b[bt])==null?void 0:Be.type)==="success"?Ae.className="program-fill-success":Ae.className="";for(const[bt,Ae]of Qe.entries())Ae.innerHTML=(Ve=b==null?void 0:b[bt])!=null&&Ve.score?`${(nt=b==null?void 0:b[bt])==null?void 0:nt.score}\u5206`:"";ht(b)}catch(Qe){console.log(Qe,"error")}},[b]);const Oe=be=>{ct[be.target.dataset.id]=ct[be.target.dataset.id]||{},ct[be.target.dataset.id].value=be.target.value,ht([...ct]),x(ct,be.target.dataset.id)},qe=be=>{ct[be.target.dataset.id]=ct[be.target.dataset.id]||{},ct[be.target.dataset.id].value=be.target.value,ht([...ct]),G(ct,be.target.dataset.id)},se=be=>{ct[be.target.dataset.id]=ct[be.target.dataset.id]||{},ct[be.target.dataset.id].value=be.target.value,ht([...ct]),ue(ct,be.target.dataset.id)};function Ne(be,Le){return be.childNodes.forEach(Be=>{var Ve;if(Be.childNodes.length>0)Ne(Be,Le);else if(Be.nodeName!=="IMG")if(Be.innerHTML)Be.innerHTML=(Ve=Be.innerHTML)==null?void 0:Ve.replace(new RegExp(Le,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const nt=document.createElement("span");nt.innerHTML=Be.textContent.replace(new RegExp(Le,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Be.replaceWith(nt)}})}const He=(0,R.useRef)();me.jb.WebkitLineClamp=$e,$e&&(Y=I(I({},Y),me.jb));function N(be){let Le=be.target;if(Le.tagName.toUpperCase()==="A"){let Be=Le.getAttribute("href");if(Be.indexOf("office")>-1)be.preventDefault(),Ke(Be),pt("office");else if(Be.indexOf("application/pdf")>-1)be.preventDefault(),Ke(Be),pt("pdf");else if(Be.indexOf("text/html")>-1)be.preventDefault(),Ke(Be),pt("html");else if(Be.startsWith("#")){be.preventDefault();let Ve=document.getElementById(Be.replace("#",""));Ve&&Ve.scrollIntoView(!0)}}}const ee=()=>{var be;const Le=(be=He.current)==null?void 0:be.querySelectorAll("video");Le==null||Le.forEach(Be=>{if(Be.oncontextmenu=()=>!1,Be.src.indexOf(".m3u8")>-1&&!Be.canPlayType("application/vnd.apple.mpegurl")){if(fe.ZP.isSupported()){var Ve=new fe.ZP;Ve.loadSource(Be.src),Ve.attachMedia(Be)}}})};(0,R.useEffect)(()=>{if(He.current&&Bt&&Bt.match(S)&&window.PR.prettyPrint(),He.current)return He.current.addEventListener("click",N),()=>{var be;(be=He.current)==null||be.removeEventListener("click",N),(0,me.AL)(),(0,me.Iy)()}},[Bt,He.current,N]),(0,R.useEffect)(()=>{var be;const Le=Be=>{Be.preventDefault(),Be.clipboardData.setData("text",window.getSelection().toString())};return(be=He.current)==null||be.addEventListener("copy",Le),()=>{var Be;(Be=He.current)==null||Be.removeEventListener("copy",Le)}},[He.current]);const ye=be=>/<style[\s\S]*?>/i.test(be||"");return R.createElement(R.Fragment,null,Me&&R.createElement("div",{ref:He},Bt),!Me&&!ye(Bt)&&R.createElement("div",{ref:He,style:I({},Y),className:`${we||""} ${q?"disabled-fill":""} markdown-body ${jt.current}`,dangerouslySetInnerHTML:{__html:Bt}}),!Me&&ye(Bt)&&R.createElement(f,{html:Bt}),R.createElement($.Z,{close:!0,data:Xe,type:Xe!=null&&Xe.length?Ze:"",style:I({},B),onClose:()=>Ke("")}))}},23954:function($t,st,D){"use strict";D.d(st,{SV:function(){return He},ZP:function(){return Ne}});var R=D(59301),_e=D(76374);const me={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"]},Ie={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"]},fe={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(`
|
|
|
`)}]},re={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(`
|
|
|
`)}]},ve={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
|
`)}]};var Ee=D(53184),o=D.n(Ee),$=Object.defineProperty,F=Object.defineProperties,w=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,U=(N,ee,ye)=>ee in N?$(N,ee,{enumerable:!0,configurable:!0,writable:!0,value:ye}):N[ee]=ye,K=(N,ee)=>{for(var ye in ee||(ee={}))_.call(ee,ye)&&U(N,ye,ee[ye]);if(f)for(var ye of f(ee))y.call(ee,ye)&&U(N,ye,ee[ye]);return N},O=(N,ee)=>F(N,w(ee)),I=(N,ee,ye)=>new Promise((be,Le)=>{var Be=Qe=>{try{nt(ye.next(Qe))}catch(je){Le(je)}},Ve=Qe=>{try{nt(ye.throw(Qe))}catch(je){Le(je)}},nt=Qe=>Qe.done?be(Qe.value):Promise.resolve(Qe.value).then(Be,Ve);nt((ye=ye.apply(N,ee)).next())});const H={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"]}},te=(N,ee)=>ee.map(ye=>({label:ye,kind:N.languages.CompletionItemKind.Keyword,insertText:ye})),S=N=>Object.keys(H.tables).map(ee=>({label:ee,kind:N.languages.CompletionItemKind.Variable,insertText:ee})),j=(N,ee)=>{const ye=H.tables[N];return ye?ye.map(be=>({label:be,kind:ee.languages.CompletionItemKind.Field,insertText:be})):[]};function ae(N,ee,ye,be,Le){let Be=ee.getWordUntilPosition(ye),Ve={startLineNumber:ye.lineNumber,endLineNumber:ye.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},nt=be.map(Qe=>({label:Qe,kind:N.languages.CompletionItemKind.Keyword,insertText:Qe,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ve}));return Le.map(Qe=>{nt.push(O(K({},Qe),{range:Ve}))}),nt}var de=N=>{H.languages.map(Le=>(N.languages.registerDocumentFormattingEditProvider(Le,{provideDocumentFormattingEdits(Be,Ve,nt){return I(this,null,function*(){const Qe=o()(Be.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:Be.getFullModelRange(),text:Qe}]})}}),Le));const ee=fe.quickKey.map(Le=>({label:Le.label,kind:N.languages.CompletionItemKind.Method,insertText:Le.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ye=re.quickKey.map(Le=>({label:Le.label,kind:N.languages.CompletionItemKind.Method,insertText:Le.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet})),be=Ie.quickKey.map(Le=>({label:Le.label,kind:N.languages.CompletionItemKind.Method,insertText:Le.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet}));N.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Le,Be){var Ve=Le.getWordUntilPosition(Be),nt={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn},Qe=Le.getLineContent(Be.lineNumber).substring(Ve.startColumn-2,Ve.endColumn);return{suggestions:[...fe.keywords.map(je=>({label:je,kind:N.languages.CompletionItemKind.Function,documentation:je,insertText:je,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt})),...fe.quickKey.map(je=>({label:je.label,kind:N.languages.CompletionItemKind.Function,documentation:je.content,insertText:Qe.startsWith("#")?je.content.replace(/#/,""):je.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt}))]}}}),N.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Le,Be){var Ve=Le.getWordUntilPosition(Be),nt={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn};return{suggestions:[...me.keywords.map(Qe=>({label:Qe,kind:N.languages.CompletionItemKind.Function,documentation:Qe,insertText:Qe,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt}))]}}}),N.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Le,Be){var Ve=Le.getWordUntilPosition(Be),nt={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn},Qe=Le.getLineContent(Be.lineNumber).substring(Ve.startColumn-2,Ve.endColumn);return{suggestions:[...Ie.keywords.map(je=>({label:je,kind:N.languages.CompletionItemKind.Function,documentation:je,insertText:je,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt})),...Ie.quickKey.map(je=>({label:je.label,kind:N.languages.CompletionItemKind.Function,documentation:je.content,insertText:Qe.startsWith("#")?je.content.replace(/#/,""):je.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt}))]}}}),N.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Le,Be){var Ve=Le.getWordUntilPosition(Be),nt={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn},Qe=Le.getLineContent(Be.lineNumber).substring(Ve.startColumn-2,Ve.endColumn);return{suggestions:[...ve.keywords.map(je=>({label:je,kind:N.languages.CompletionItemKind.Function,documentation:je,insertText:je,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt})),...ve.quickKey.map(je=>({label:je.label,kind:N.languages.CompletionItemKind.Function,documentation:je.content,insertText:Qe.startsWith("#")?je.content.replace(/#/,""):je.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt}))]}}}),N.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Le,Be){var Ve=Le.getWordUntilPosition(Be),nt={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn},Qe=Le.getLineContent(Be.lineNumber).substring(Ve.startColumn-2,Ve.endColumn);return{suggestions:[...re.keywords.map(je=>({label:je,kind:N.languages.CompletionItemKind.Function,documentation:je,insertText:je,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt})),...re.quickKey.map(je=>({label:je.label,kind:N.languages.CompletionItemKind.Function,documentation:je.content,insertText:Qe.startsWith("#")?je.content.replace(/#/,""):je.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt}))]}}})};const Se="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var we=Object.defineProperty,Me=(N,ee,ye)=>ee in N?we(N,ee,{enumerable:!0,configurable:!0,writable:!0,value:ye}):N[ee]=ye,$e=(N,ee,ye)=>Me(N,typeof ee!="symbol"?ee+"":ee,ye);const Y=class qo{constructor(ee,ye,be){this.placeholder=ee,this.editor=ye,this.monaco=be,ye.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return qo.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(Y,"ID","editor.widget.placeholderHint");var Z=Y,X=D(96236),le=D(8591),q=D(6848),b=D(89392),x=D(34604),G=D(56102),ue=Object.defineProperty,ze=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,ct=(N,ee,ye)=>ee in N?ue(N,ee,{enumerable:!0,configurable:!0,writable:!0,value:ye}):N[ee]=ye,ht=(N,ee)=>{for(var ye in ee||(ee={}))Ze.call(ee,ye)&&ct(N,ye,ee[ye]);if(Ke)for(var ye of Ke(ee))pt.call(ee,ye)&&ct(N,ye,ee[ye]);return N},jt=(N,ee)=>ze(N,Xe(ee)),Zt=(N,ee)=>{var ye={};for(var be in N)Ze.call(N,be)&&ee.indexOf(be)<0&&(ye[be]=N[be]);if(N!=null&&Ke)for(var be of Ke(N))ee.indexOf(be)<0&&pt.call(N,be)&&(ye[be]=N[be]);return ye},qt=(N,ee,ye)=>new Promise((be,Le)=>{var Be=Qe=>{try{nt(ye.next(Qe))}catch(je){Le(je)}},Ve=Qe=>{try{nt(ye.throw(Qe))}catch(je){Le(je)}},nt=Qe=>Qe.done?be(Qe.value):Promise.resolve(Qe.value).then(Be,Ve);nt((ye=ye.apply(N,ee)).next())});function Ut(N){return/^\d+$/.test(N)?`${N}px`:N}function zt(){}let Bt=!1;const Oe={"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 qe(N=[]){let ee=N;if(Array.isArray(N)){for(let ye=0;ye<N.length;ye++){let be=Oe[N[ye]];if(be)return be}return ee[0]}return Oe[ee]||ee}let se=null;var Ne=N=>{var ee=N,{width:ye="100%",height:be="100%",value:Le,language:Be="javascript",style:Ve={},options:nt={},overrideServices:Qe={},theme:je="vs-dark",onEditBlur:bt,isCopy:Ae=!1,onSave:De,autoHeight:Ue=!1,forbidCopy:it=!1,onChange:et=zt,editorDidMount:ft=zt,onFocus:_t=zt,onBreakPoint:v=zt,breakPointValue:E=[],filename:Ye="educoder.txt",errorLine:P,errorContent:oe="",highlightLine:kt,openBreakPoint:ge=!1,placeholder:Pe=""}=ee,Ge=Zt(ee,["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 z=(0,R.useRef)(),J=(0,R.useRef)({}),ce=(0,R.useRef)(),Ce=(0,R.useRef)(),M=(0,R.useRef)([]),xt=(0,R.useRef)(!1),pe=(0,R.useRef)(),Lt=(0,R.useRef)(),It=(0,R.useRef)(!1),[Wt,ur]=(0,R.useState)(!1);function Ct(){let wt;return z.current&&(wt=new _e.Z(Tt=>{for(let tr of Tt)(tr.target.offsetHeight>0||tr.target.offsetWidth>0)&&J.current.instance.layout()}),wt.observe(z.current)),wt}function Ot(){le.ZP.warning({content:decodeURIComponent(Se),key:"monaco-editor-tip"})}const Re=()=>{let wt=J.current.instance;if(Le!=null&&wt&&Wt){const Tt=wt.getModel();Tt&&Le!==Tt.getValue()&&(Bt=!0,Tt.setValue(Le),wt.layout(),Bt=!1)}};(0,R.useEffect)(()=>{const wt=x.Z.subscribe("formatDocument",Tt=>{var tr;let vr=J.current.instance;(tr=vr==null?void 0:vr.getAction)==null||tr.call(vr,"editor.action.formatDocument").run()});return window.updateMonacoValue=Tt=>{et(Tt)},wt},[]),(0,R.useEffect)(()=>{var wt;let Tt=J.current.instance;Ce.current&&clearTimeout(Ce.current),Ce.current=setTimeout(()=>{Re()},500),Le&&(Le!=null&&Le.length)&&((wt=Tt==null?void 0:Tt.updateOptions)==null||wt.call(Tt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Le.split(/\r\n|\r|\n/g).length))+3,5)}))},[Le,Wt,J.current]),(0,R.useEffect)(()=>{if(P&&J.current&&J.current.instance){let Tt=J.current.instance;Tt.changeViewZones(function(tr){var vr=document.createElement("div");vr.style.padding="10px 20px",vr.style.width="calc(100% - 20px)",vr.className="my-error-line-wrp",vr.innerHTML=oe,tr.addZone({afterLineNumber:P||11,heightInLines:3,domNode:vr})});var wt={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(wt),Tt.revealPositionInCenter({lineNumber:20,column:1})}},[P,J.current,Wt]);const ot=(wt="",Tt)=>{if(!wt||wt.trim()==="")return!0;const vr=J.current.instance.getModel().getLineTokens(Tt);let cr=!1;for(let rr=0;rr<2;rr++)vr.getStandardTokenType(rr)===1&&(cr=!0);return cr};(0,R.useEffect)(()=>{var wt;const Tt=(wt=J.current)==null?void 0:wt.instance;if(Tt&&Wt&&it){const tr=Tt.onDidBlurEditorWidget(()=>{It.current=!1}),vr=Tt.onDidFocusEditorText(()=>{It.current=!0});return()=>{tr.dispose(),vr.dispose()}}},[J.current,Wt,it]),(0,R.useEffect)(()=>{var wt;if((wt=J.current)!=null&&wt.instance&&Wt&&ge){let Tt=J.current.instance,tr=Tt.getModel();if(!tr)return;(()=>{var pr;let _r=[],Pr=[];const yr=tr.getAllDecorations();for(let jr of yr)jr.options.className==="highlighted-line"&&(_r.push((pr=jr==null?void 0:jr.range)==null?void 0:pr.startLineNumber),Pr.push(jr==null?void 0:jr.id));if(kt===_r[0])return;tr.deltaDecorations(Pr,[]);const Dr=tr.getLineCount();kt&&kt<=Dr&&(Tt.deltaDecorations([],[{range:new se.Range(kt,1,kt,tr.getLineMaxColumn(kt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Tt.revealLineInCenter(kt))})();const cr=(pr=!1)=>{var _r;let Pr=[],yr=[];const Dr=tr.getAllDecorations();for(let jr of Dr)jr.options.linesDecorationsClassName==="breakpoints-select"&&(Pr.push((_r=jr==null?void 0:jr.range)==null?void 0:_r.startLineNumber),yr.push(jr==null?void 0:jr.id));if(pr)return{lines:Pr,ids:yr};v(Pr)},rr=pr=>qt(void 0,null,function*(){let _r={range:new se.Range(pr,1,pr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield tr.deltaDecorations([],[_r]),cr()}),Mr=pr=>qt(void 0,null,function*(){let _r=[];const Pr=Tt.getLineDecorations(pr);for(let yr of Pr)yr.options.linesDecorationsClassName==="breakpoints-select"&&_r.push(yr.id);yield tr.deltaDecorations(_r,[]),cr()}),Er=pr=>{let _r=Tt.getLineDecorations(pr);for(let Pr of _r)if(Pr.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,b.isEqual)(E,cr(!0).lines)){tr.deltaDecorations(cr(!0).ids,[]);const pr=E.map(_r=>({range:new se.Range(_r,1,_r,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));tr.deltaDecorations([],pr)}const fr=Tt.onDidChangeModelContent(pr=>{let _r=Tt.getPosition();if(_r){let Pr=_r.lineNumber;clearTimeout(Lt.current),Lt.current=setTimeout(()=>{ot(tr.getLineContent(Pr),Pr)?Mr(Pr):Er(Pr)?(Mr(Pr),rr(Pr)):cr()},100)}}),mr=Tt.onMouseDown(pr=>{var _r,Pr,yr;if(pr.target.detail&&((yr=(Pr=(_r=pr.target)==null?void 0:_r.element)==null?void 0:Pr.className)!=null&&yr.includes("line-numbers"))){let Dr=pr.target.position.lineNumber;if(ot(tr.getLineContent(Dr),Dr))return;Er(Dr)?Mr(Dr):rr(Dr)}}),gr=pr=>{let _r={range:new se.Range(pr,1,pr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};M.current=Tt.deltaDecorations(M.current,[_r])},Fr=()=>{M.current=Tt.deltaDecorations(M.current,[])},Gr=Tt.onMouseMove(pr=>{var _r,Pr,yr;if(Fr(),pr.target.detail&&((yr=(Pr=(_r=pr.target)==null?void 0:_r.element)==null?void 0:Pr.className)!=null&&yr.includes("line-numbers"))){let Dr=pr.target.position.lineNumber;if(ot(tr.getLineContent(Dr),Dr))return;gr(Dr)}}),Sr=Tt.onMouseLeave(()=>{Fr()});return()=>{fr.dispose(),mr.dispose(),Gr.dispose(),Sr.dispose()}}},[J.current,Wt,E,kt,ge,Be]),(0,R.useEffect)(()=>{var wt;(wt=J.current)!=null&&wt.instance&&ge&&J.current.instance.setPosition({lineNumber:0,column:0})},[kt]);function dt(){let wt=J.current.instance;if(wt){const Tt=wt.getSelection(),tr=J.current.pastePos||{},vr=new se.Range(tr.startLineNumber||Tt.endLineNumber,tr.startColumn||Tt.endColumn,tr.endLineNumber||Tt.endLineNumber,tr.endColumn||Tt.endColumn);setTimeout(()=>{wt.executeEdits("",[{range:vr,text:""}])},300)}}function mt(wt){(window.navigator.platform.match("Mac")?wt.metaKey:wt.ctrlKey)&&wt.keyCode==83&&(wt.preventDefault(),De())}const ut=()=>{if(Ue&&J.current.instance){const wt=J.current.instance.getContentHeight();xr(wt<be?be:wt)}else xr(be)};function Et(wt){var Tt=document.createEvent("MouseEvents");Tt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),wt.dispatchEvent(Tt)}const Kt=wt=>{if(!It.current)return;const{keyCode:Tt,ctrlKey:tr,metaKey:vr,target:cr,type:rr}=wt;return(rr==="paste"||(Tt===67||Tt===86)&&(vr||tr))&&cr.nodeName==="TEXTAREA"&&(Ot(),wt.preventDefault()),!1};function hr(wt,Tt){var tr=window.URL||window.webkitURL||window,vr=new Blob([Tt]),cr=document.createElementNS("http://www.w3.org/1999/xhtml","a");cr.href=tr.createObjectURL(vr),cr.download=wt,Et(cr)}(0,R.useEffect)(()=>{ut()},[ut]),(0,R.useEffect)(()=>{z.current&&!Wt&&Promise.all([D.e(8909),D.e(3267)]).then(D.bind(D,71448)).then(wt=>{try{se=wt,J.current.instance=se.editor.create(z.current,{value:Le,language:qe(Be),theme:je,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Qe);const Tt=J.current.instance;let cr=[...X.BH._menuItems].find(fr=>fr[0]._debugName=="EditorContext")[1],rr=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Mr=(fr,mr)=>{var gr,Fr;let Gr=fr._first;do mr.includes((Fr=(gr=Gr.element)==null?void 0:gr.command)==null?void 0:Fr.id)&&fr._remove(Gr);while(Gr=Gr.next)};if(ft(Tt,se),setTimeout(()=>{ut(),J.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{hr(Ye||"educoder.txt",Tt.getValue())}})},500),J.current.subscription=Tt.onDidChangeModelContent(fr=>{xt.current?clearTimeout(pe.current):(ut(),et(Tt.getValue(),fr)),pe.current=setTimeout(()=>{xt.current=!1},500)}),window.Monaco||de(se,qe(Be)),it&&(Mr(cr,rr),z.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Kt),window.removeEventListener("paste",Kt),window.addEventListener("keydown",Kt),window.addEventListener("paste",Kt)),window.Monaco=se,bt&&Tt.onDidBlurEditorWidget(()=>{bt(Tt.getValue())}),_t&&Tt.onDidFocusEditorText(()=>{_t(Tt.getValue())}),it)try{Tt.onDidPaste(fr=>{const mr=Tt.getSelection(),gr=J.current.pastePos||{},Fr=new se.Range(gr.startLineNumber||mr.endLineNumber,gr.startColumn||mr.endColumn,gr.endLineNumber||mr.endLineNumber,gr.endColumn||mr.endColumn);Tt.executeEdits("",[{range:fr.range,text:""}])})}catch(fr){}let Er=Ct();return Pe&&typeof Pe=="string"&&new Z(Pe,Tt,se),ur(!0),()=>{const fr=J.current.instance;fr.dispose();const mr=fr.getModel();mr&&mr.dispose(),J.current.subscription&&J.current.subscription.dispose(),Er.unobserve(z.current)}}catch(Tt){}})},[]),(0,R.useEffect)(()=>{if(J.current.instance&&Wt)return document.addEventListener("keydown",mt,!1),()=>{document.removeEventListener("keydown",mt)}},[De,Wt]),(0,R.useEffect)(()=>{let wt=J.current.instance;if(wt&&Wt){let Tt=qe(Be);se.editor.setModelLanguage(wt.getModel(),Tt)}},[Be,Wt]),(0,R.useEffect)(()=>{J.current.instance&&Wt&&se.editor.setTheme(je)},[je,Wt]),(0,R.useEffect)(()=>{let wt=J.current.instance;ce.current=nt,wt&&Wt&&(wt.updateOptions(ht({},nt)),setTimeout(()=>{wt.getModel().updateOptions(ht({},nt))},200))},[JSON.stringify(nt),Wt]),(0,R.useEffect)(()=>{let wt=J.current.instance;wt&&Wt&&wt.layout()},[ye,be,Wt]);const[Xt,lr]=(0,R.useState)(Ut(ye)),[Jt,xr]=(0,R.useState)(Ut(be)),Lr=jt(ht({},Ve),{width:Xt,height:Jt,position:"relative"});return R.createElement("div",{className:"my-monaco-editor",ref:z,style:Lr},Ae&&R.createElement(G.CopyToClipboard,{text:Le,onCopy:()=>le.ZP.success("\u590D\u5236\u6210\u529F")},R.createElement(q.Z,{title:"\u590D\u5236\u4EE3\u7801"},R.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},R.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function He({width:N="100%",height:ee="100%",original:ye,modified:be,language:Le,options:Be={}}){const Ve=(0,R.useRef)(),[nt,Qe]=(0,R.useState)(null);function je(Ue){let it;return Ve.current&&(it=new _e.Z(et=>{for(let ft of et)(ft.target.offsetHeight>0||ft.target.offsetWidth>0)&&Ue.layout()}),it.observe(Ve.current)),it}(0,R.useEffect)(()=>(Ve.current&&Promise.all([D.e(8909),D.e(9404)]).then(D.bind(D,2550)).then(Ue=>{se=Ue;const it=se.editor.createDiffEditor(Ve.current,jt(ht({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},Be),{wordWrap:!0}));Qe(it);let et=je(it);return()=>{it.dispose();const ft=it.getModel();ft&&ft.dispose(),et.unobserve(Ve.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,R.useEffect)(()=>{nt&&nt.setModel({original:se.editor.createModel(ye,Le),modified:se.editor.createModel(be,Le)})},[ye,be,Le,nt]);const bt=Ut(N),Ae=Ut(ee),De={width:bt,height:Ae};return R.createElement("div",{className:"my-diff-editor",ref:Ve,style:De})}},74139:function($t,st,D){"use strict";D.r(st),D.d(st,{default:function(){return q}});var R=D(59301),_e=D(95237),me=D(43604),Ie=D(5871),fe=D(78241),re=D(61621),ve=D(3113),Ee=D(6848),o=D(43418),$=D(71418),F=D(8591),w=D(92832),f=D(89070),_={bg:"bg___YVx48",title:"title___NM3xC",textOverflow:"textOverflow___gz3GM",wrap:"wrap___if0Ln",infoTitle:"infoTitle___dk7YF",infoValue:"infoValue___kBWqL",itemTitle:"itemTitle___WP88A",circle:"circle___Rq79V",warnText:"warnText___cpZS0",greyText:"greyText___erT_A",linkText:"linkText___YWy1z",whiteList:"whiteList___NvpGC",num:"num___Dq7FU",fixBottom:"fixBottom___WHsNA",backBtn:"backBtn___swiNH",enterBtn:"enterBtn___pk16U",secureInput:"secureInput___D361C"},y=D(94941),U=D(6021),K=D(955),O=D(61186),I=D.n(O),H=D(99064),te=D(15277),S=D(73331),j=D(83312),ae=D(85149),de=Object.defineProperty,Se=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,$e=(b,x,G)=>x in b?de(b,x,{enumerable:!0,configurable:!0,writable:!0,value:G}):b[x]=G,Y=(b,x)=>{for(var G in x||(x={}))we.call(x,G)&&$e(b,G,x[G]);if(Se)for(var G of Se(x))Me.call(x,G)&&$e(b,G,x[G]);return b},B=(b,x,G)=>new Promise((ue,ze)=>{var Xe=pt=>{try{Ze(G.next(pt))}catch(ct){ze(ct)}},Ke=pt=>{try{Ze(G.throw(pt))}catch(ct){ze(ct)}},Ze=pt=>pt.done?ue(pt.value):Promise.resolve(pt.value).then(Xe,Ke);Ze((G=G.apply(b,x)).next())});const Z=({title:b,content:x})=>R.createElement("div",{className:"mb20"},R.createElement(_e.Z,{align:"middle",style:{marginBottom:12}},R.createElement(me.Z,{flex:"20px"},R.createElement("div",{className:_.circle})),R.createElement(me.Z,null,R.createElement("div",null,b))),R.createElement(_e.Z,{className:"pl20"},x)),X=({value:b,onChange:x,MaxMinutes:G})=>R.createElement(R.Fragment,null,R.createElement("div",{className:"p10 mb20",style:{background:"#F6F7F9"}},"1.\u53EA\u6709\u5F53\u8003\u8BD5\u622A\u6B62\u65F6\u95F4\u665A\u4E8E\u5B66\u751F\u7684\u4EA4\u5377\u622A\u6B62\u65F6\u95F4\u65F6\uFF0C\u624D\u652F\u6301\u5BF9\u5B66\u751F\u8FDB\u884C\u5EF6\u65F6\u64CD\u4F5C\uFF1B",R.createElement("br",null),"2.\u6BCF\u4E2A\u5B66\u751F\u7684\u6700\u5927\u53EF\u5EF6\u65F6\u65F6\u95F4=\u8003\u8BD5\u622A\u6B62\u65F6\u95F4-\u5B66\u751F\u5F53\u524D\u7684\u4EA4\u5377\u622A\u6B62\u65F6\u95F4\u3002",R.createElement("br",null)),R.createElement(Ie.Z,{value:b,min:0,precision:0,max:G,style:{width:"100%"},placeholder:`\u6700\u5927\u53EF\u5EF6\u957F\u65F6\u95F4\u4E3A${G}\u5206\u949F\uFF0C\u5728\u5B66\u751F\u5269\u4F59\u65F6\u95F4\u57FA\u7840\u4E0A\u5EF6\u65F6`,addonAfter:"\u5206\u949F",onChange:x}));console.log("---",performance.navigation.type);const le=({user:b,dispatch:x,globalSetting:G})=>{const ue=(0,f.useParams)(),[ze]=(0,f.useSearchParams)(),[Xe,Ke]=(0,R.useState)(),[Ze,pt]=(0,R.useState)(!1),[ct,ht]=(0,R.useState)(!1),[jt,Zt]=(0,R.useState)(!1),[qt,Ut]=(0,R.useState)(!1),[zt]=fe.default.useForm(),Bt=fe.default.useWatch("time",zt),[,Oe,qe,se]=(0,j.U)(y.n7,{id:ue.categoryId,user_id:ue.login});(0,R.useEffect)(()=>{ze.get("isShowApply")==="true"&&Zt(!0)},[ze.get("isShowApply")]),(0,R.useEffect)(()=>(x({type:"globalSetting/headerFooterToggle",payload:!1}),()=>{x({type:"globalSetting/headerFooterToggle",payload:!0})}),[]),(0,R.useEffect)(()=>{B(void 0,null,function*(){pt(!0);const It=yield(0,y.Cd)(ue);pt(!1),It.status||Ke(It)})},[]);const{exercise_name:Ne,exercise_type:He,user_simulate_num:N,simulate_exercise_num:ee,time:ye,student_id:be,screen_open:Le,screen_num:Be,screen_sec:Ve,real_name:nt,id:Qe,open_camera:je,inner_ip:bt,public_ip:Ae,ip_limit:De,ip_bind:Ue,ip_bind_type:it,open_phone_video_recording:et,identity_verify:ft,user_permission:_t,total_score:v,question_type_count:E,question_count:Ye,screen_shot_open:P,screen_total_num:oe,screen_used_num:kt,end_time:ge,user_end_time:Pe,only_on_client:Ge,forbid_screen:z,use_white_list:J,white_list:ce=[],exercise_description:Ce}=(Xe==null?void 0:Xe.exercise)||{},M=se!=null&&se.user_end_time?I()(se==null?void 0:se.user_end_time).add(1,"minutes"):I()(),xt=I()(se==null?void 0:se.user_total_end_time)>M?Math.round(I().duration(I()(se==null?void 0:se.user_total_end_time).diff(M.startOf("minute"))).asMinutes()):0,pe=((se==null?void 0:se.student_left_minutes)||0)+(Bt||0);(0,R.useEffect)(()=>{B(void 0,null,function*(){kt>oe&&(yield qe({}))})},[kt,oe]);const Lt=()=>{const It=ee-N;return It>=0?It:0};return R.createElement("div",{className:_.bg},R.createElement("div",{className:"edu-container"},R.createElement("div",{className:"pt30"}),R.createElement("div",{className:_.wrap},R.createElement(re.Z,{loading:Ze,active:!0,className:"mt20"},R.createElement("div",{className:_.title},Ne),R.createElement(_e.Z,{justify:"center",gutter:30,className:"mb20"},R.createElement(me.Z,null,R.createElement("span",{className:_.infoTitle},"\u5927\u9898\u6570"),R.createElement("span",{className:_.infoValue},E)),R.createElement(me.Z,null,R.createElement("span",{className:_.infoTitle},"\u5C0F\u9898\u6570"),R.createElement("span",{className:_.infoValue},Ye)),R.createElement(me.Z,null,R.createElement("span",{className:_.infoTitle},"\u6EE1\u5206"),R.createElement("span",{className:_.infoValue},v,"\u5206")),R.createElement(me.Z,null,R.createElement("span",{className:_.infoTitle},"\u8003\u8BD5\u65F6\u957F"),R.createElement("span",{className:_.infoValue},ye===-1?"\u4E0D\u9650\u65F6\u957F":`${ye}\u5206\u949F`))),R.createElement(_e.Z,{className:"mb20",align:"middle"},R.createElement(me.Z,{flex:"20px"},R.createElement("i",{className:"iconfont icon-dangqiankaoshengxinxi font14",style:{color:"#3061D0"}})),R.createElement(me.Z,null,R.createElement("div",{className:_.itemTitle},"\u5F53\u524D\u8003\u751F\u4FE1\u606F"))),R.createElement(_e.Z,{className:"mb30 pl20"},R.createElement(me.Z,{flex:"190px",className:`mr20 ${_.textOverflow}`},R.createElement("span",{className:_.infoTitle},"\u59D3\u540D"),R.createElement("span",{title:nt},nt)),R.createElement(me.Z,null,R.createElement("span",{className:_.infoTitle},"\u5B66\u53F7"),R.createElement("span",null,be||"--"))),R.createElement(_e.Z,{className:"mb20",align:"middle"},R.createElement(me.Z,{flex:"20px"},R.createElement("i",{className:"iconfont icon-chengxinkaoshishengming font14",style:{color:"#3061D0"}})),R.createElement(me.Z,null,R.createElement("div",{className:_.itemTitle},"\u8BDA\u4FE1\u8003\u8BD5\u58F0\u660E"))),R.createElement("div",{className:"mb30 pl20"},R.createElement("p",null,"1.\u8003\u751F\u5728\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u5E94\u81EA\u89C9\u9075\u5B88\u8003\u8BD5\u7EAA\u5F8B\uFF0C\u8BDA\u4FE1\u5E94\u8003\uFF0C\u62D2\u7EDD\u4F5C\u5F0A\u884C\u4E3A\uFF0C\u4FDD\u6301\u826F\u597D\u8003\u8BD5\u79E9\u5E8F\u3002\u5B9E\u65BD\u4F5C\u5F0A\u884C\u4E3A\u4E00\u7ECF\u53D1\u73B0\uFF0C\u5C06\u6309\u5B66\u6821\u8003\u8BD5\u7BA1\u7406\u529E\u6CD5\u4E25\u8083\u5904\u7406\uFF0C\u56E0\u4F5C\u5F0A\u4EA7\u751F\u7684\u4E00\u5207\u540E\u679C\u81EA\u8D1F\u3002"),R.createElement("p",{style:{color:"red"}},"2.\u82E5\u8003\u8BD5\u671F\u95F4\u9047\u5230\u95EE\u9898\uFF0C\u8BF7\u53CA\u65F6\u8DDF\u76D1\u8003\u8001\u5E08\u6C9F\u901A\u89E3\u51B3\uFF0C\u8003\u8BD5\u7ED3\u675F\u4E4B\u540E\u518D\u63D0\u51FA\u95EE\u9898\u89C6\u4E3A\u65E0\u6548\u3002"),R.createElement("p",{style:{color:"red"}},"3.\u5728\u5B8C\u6210\u5B9E\u8BAD\u9898\u3001\u7F16\u7A0B\u9898\u6216\u7A0B\u5E8F\u586B\u7A7A\u9898\u540E\uFF0C\u8BF7\u52A1\u5FC5\u786E\u8BA4\u60A8\u5728\u8003\u8BD5\u9875\u9762\u4E0A\u505C\u7559\u7684\u4EE3\u7801\u662F\u60A8\u6700\u7EC8\u60F3\u8981\u63D0\u4EA4\u7684\u7248\u672C\u3002")),Ce&&R.createElement(R.Fragment,null,R.createElement(_e.Z,{className:"mb20",align:"middle"},R.createElement(me.Z,{flex:"20px"},R.createElement("i",{className:"iconfont icon-kechengxuzhi font14",style:{color:"#3061D0"}})),R.createElement(me.Z,null,R.createElement("div",{className:_.itemTitle},"\u8BD5\u5377\u987B\u77E5"))),R.createElement("div",{className:"mb30"},R.createElement(ae.Z,{style:{fontSize:14,color:"#333",paddingLeft:"20px"},value:Ce}))),(je||Le||De!=="no"||ft)&&R.createElement(_e.Z,{className:"mb20",align:"middle"},R.createElement(me.Z,{flex:"20px"},R.createElement("i",{className:"iconfont icon-yikaiqifangzuobimoshi font14",style:{color:"#3061D0"}})),R.createElement(me.Z,null,R.createElement("div",{className:_.itemTitle},"\u5DF2\u5F00\u542F\u9632\u4F5C\u5F0A\u6A21\u5F0F"))),ft&&R.createElement(Z,{title:"\u5DF2\u5F00\u542F\u8003\u8BD5\u524D\u4EBA\u8138\u8EAB\u4EFD\u6838\u9A8C",content:R.createElement("div",null,R.createElement("span",{className:_.greyText},"\u8FDB\u5165\u8003\u8BD5\u524D\uFF0C\u8BF7\u5141\u8BB8\u6444\u50CF\u5934\u6388\u6743\uFF0C\u6388\u6743\u540E\u9700\u91C7\u96C6\u7167\u7247\u8BA4\u8BC1\uFF0C\u8BA4\u8BC1\u901A\u8FC7\u5E76\u5F00\u542F\u624B\u673A\u5F55\u5236\u624D\u53EF\u4EE5\u8FDB\u5165\u8003\u8BD5\u3002"),R.createElement("span",{className:_.linkText,onClick:()=>(0,K.xg)("https://www.educoder.net/forums/4459")},"\u65E0\u6CD5\u8C03\u7528\u6444\u50CF\u5934?"))}),ft&&R.createElement(Z,{title:"\u5DF2\u5F00\u542F\u8003\u8BD5\u4E2D\u624B\u673A\u89C6\u9891\u5F55\u5236",content:R.createElement("div",null,R.createElement("span",{className:_.greyText},"\u8FDB\u5165\u8003\u8BD5\u540E\uFF0C\u8BF7\u5141\u8BB8\u6444\u50CF\u5934\u6388\u6743\uFF0C\u6388\u6743\u540E\u6253\u5F00\u6444\u50CF\u5934\u65B9\u53EF\u4F5C\u7B54\uFF01"),R.createElement("span",{className:_.linkText,onClick:()=>(0,K.xg)("https://www.educoder.net/forums/4459")},"\u65E0\u6CD5\u8C03\u7528\u6444\u50CF\u5934?"))}),je&&R.createElement(Z,{title:"\u5DF2\u5F00\u542F\u8003\u8BD5\u4E2D\u62CD\u7167\u76D1\u63A7",content:R.createElement("div",null,R.createElement("span",{className:_.greyText},"\u8FDB\u5165\u8003\u8BD5\u540E\uFF0C\u8BF7\u5141\u8BB8\u6444\u50CF\u5934\u6388\u6743\uFF0C\u6388\u6743\u540E\u6253\u5F00\u6444\u50CF\u5934\u65B9\u53EF\u4F5C\u7B54\uFF01"),R.createElement("span",{className:_.linkText,onClick:()=>(0,K.xg)("https://www.educoder.net/forums/4459")},"\u65E0\u6CD5\u8C03\u7528\u6444\u50CF\u5934?"))}),Le&&R.createElement(Z,{title:"\u5DF2\u5F00\u542F\u5207\u5C4F\u540E\u5F3A\u5236\u4EA4\u5377",content:R.createElement("div",null,R.createElement("span",{className:_.greyText},"\u5207\u5C4F\u8D85\u8FC7",R.createElement("span",{className:_.num},Be),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377\uFF0C\u5207\u6362\u5230\u5176\u4ED6\u9875\u9762",R.createElement("span",{className:_.num},Ve),"\u79D2\u540E\u5373\u5224\u5B9A\u4E3A\u4E00\u6B21\u5207\u5C4F\uFF0C",R.createElement("span",{className:_.num},Ve*2),"\u79D2\u5219\u5224\u5B9A\u4E3A",R.createElement("span",{className:_.num},"2"),"\u6B21\u5207\u5C4F\uFF0C\u4EE5\u6B64\u7C7B\u63A8\uFF1B\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u8BF7\u52FF\u5207\u6362\u5230\u5176\u4ED6\u9875\u9762\u6216\u9000\u51FA\u5168\u5C4F\u3002"),R.createElement("span",{className:_.linkText,onClick:()=>(0,K.xg)("https://www.educoder.net/forums/4460")},"\u6D4F\u89C8\u5668\u65E0\u6CD5\u81EA\u52A8\u5168\u5C4F\uFF1F"))}),P&&R.createElement(Z,{title:"\u5DF2\u5F00\u542F\u9000\u51FA\u5168\u5C4F\u6216\u5207\u6362\u9875\u9762\u540E\u81EA\u52A8\u622A\u5C4F",content:R.createElement("div",null,R.createElement("span",{className:_.greyText},"\u8001\u5E08\u5DF2\u5F00\u542F\u9000\u51FA\u5168\u5C4F\u6216\u5207\u6362\u9875\u9762\u540E\u81EA\u52A8\u622A\u5C4F\uFF0C\u8003\u751F\u8FDB\u5165\u8003\u8BD5\u4E4B\u540E\u9700\u8981\u9009\u62E9\u4E3B\u5C4F\u5E55\u8FDB\u884C\u5171\u4EAB\uFF0C\u8003\u8BD5\u4F5C\u7B54\u8FC7\u7A0B\u4E2D\u4E5F\u4E0D\u5141\u8BB8\u5173\u95ED\u5C4F\u5E55\u5171\u4EAB\uFF0C\u5426\u5219\u5C06\u4F1A\u76F4\u63A5\u9000\u51FA\u8003\u8BD5\u3002"))}),De!=="no"&&R.createElement(Z,{title:"\u5DF2\u5F00\u542FIP\u8303\u56F4\u9650\u5B9A",content:R.createElement("div",null,R.createElement("span",{className:_.greyText},"IP\u5730\u5740\u4E0D\u5728\u8303\u56F4\u5185\u4E0D\u53EF\u53C2\u52A0\u8003\u8BD5\u3002"),R.createElement("span",{className:_.warnText},"\uFF08\u53EA\u5141\u8BB8\u5728Chrome\u8C37\u6B4C\u6D4F\u89C8\u5668\u4F5C\u7B54\uFF0C\u5E76\u4E14\u9700\u8981\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6\uFF09"),R.createElement("div",null,R.createElement("span",{className:_.linkText,onClick:()=>(0,K.xg)("https://www.educoder.net/forums/4478")},"\u5982\u4F55\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6?")))}),Ue&&R.createElement(Z,{title:"\u5DF2\u5F00\u542F\u8003\u8BD5\u671F\u95F4IP\u7ED1\u5B9A",content:R.createElement("div",null,R.createElement("span",{className:_.greyText},"\u5F53\u60A8\u5F00\u59CB\u8003\u8BD5\u540E\uFF0C\u5C06\u81EA\u52A8\u7ED1\u5B9AIP\uFF0C\u8003\u8BD5\u671F\u95F4\u53EA\u5141\u8BB8\u4F7F\u7528\u552F\u4E00\u7684IP\u8FDB\u5165\u8003\u8BD5\u3002\u5982\u9047\u7279\u6B8A\u60C5\u51B5\uFF0C\u53EF\u5411\u8001\u5E08\u7533\u8BF7\u89E3\u9664IP\u7ED1\u5B9A\u3002"),R.createElement("span",{className:_.warnText},"\uFF08\u53EA\u5141\u8BB8\u5728Chrome\u8C37\u6B4C\u6D4F\u89C8\u5668\u4F5C\u7B54\uFF0C\u5E76\u4E14\u9700\u8981\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6\uFF09"),R.createElement("div",null,R.createElement("span",{className:_.linkText,onClick:()=>(0,K.xg)("https://www.educoder.net/forums/4478")},"\u5982\u4F55\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6?")))}),(z||J)&&(0,K.WX)()&&R.createElement(R.Fragment,null,R.createElement(_e.Z,{className:"mb20",align:"middle"},R.createElement(me.Z,{flex:"20px"},R.createElement("i",{className:"iconfont icon-tishi11 font14",style:{color:"#3061D0"}})),R.createElement(me.Z,null,R.createElement("div",{className:_.itemTitle},"\u6CE8\u610F\u4E8B\u9879"))),z&&R.createElement(Z,{title:"\u672C\u6B21\u8003\u8BD5\u5DF2\u8BBE\u7F6E\u7981\u6B62\u5207\u5C4F",content:R.createElement("div",null,R.createElement("span",{className:_.greyText},"\u4E00\u65E6\u8FDB\u5165\u8003\u8BD5\u7B54\u9898\u9875\u9762\uFF0C\u4E0D\u53EF\u5207\u5C4F\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5982\u9700\u8981\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C"),R.createElement("span",{className:_.linkText,style:{cursor:"default"}},"\u8BF7\u8054\u7CFB\u76D1\u8003\u8001\u5E08/\u8BD5\u5377\u53D1\u5E03\u8005\u586B\u5199\u89E3\u9664\u5207\u5C4F\u7801\u3002"))}),J&&R.createElement(Z,{title:"\u672C\u6B21\u8003\u8BD5\u5DF2\u7ECF\u8BBE\u7F6E\u6253\u5F00\u767D\u540D\u5355\u7A0B\u5E8F\u9650\u5236",content:R.createElement("div",null,R.createElement("div",{className:_.greyText},"\u8FDB\u5165\u8003\u8BD5\u524D\u8BF7\u5148\u5173\u95ED\u975E\u767D\u540D\u5355\u7A0B\u5E8F\uFF0C\u5426\u5219\u8FDB\u5165\u8003\u8BD5\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u5173\u95ED\u975E",R.createElement("span",{style:{cursor:"default"},className:_.linkText},"\u767D\u540D\u5355"),"\u7A0B\u5E8F\uFF0C\u53EF\u6253\u5F00\u7684\u767D\u540D\u5355\u7A0B\u5E8F\u5982\u4E0B\uFF1A"),R.createElement("div",{className:_.whiteList},ce==null?void 0:ce.map(It=>R.createElement("div",null,It))))})),Ge&&!(0,K.WX)()&&R.createElement("div",{className:"ml20",style:{color:"#E53333"}},R.createElement("i",{className:"iconfont icon-tishi11 font14 mr5"}),"\u672C\u6B21\u8003\u8BD5\u8BBE\u7F6E\u4E3A\u5BA2\u6237\u7AEF\u6A21\u5F0F\uFF0C\u4E0D\u53EF\u5728\u7F51\u9875\u7AEF\u8FDB\u884C\u8003\u8BD5\u7B54\u9898\uFF0C\u8BF7\u8FDB\u5165\u5BA2\u6237\u7AEF\u8FDB\u884C\u8003\u8BD5",R.createElement("a",{onClick:()=>{window.open("/download")}},"\u3010\u4E0B\u8F7D\u5BA2\u6237\u7AEF\u3011")),R.createElement("div",{className:_.fixBottom},R.createElement(ve.ZP,{className:_.backBtn,onClick:()=>{if(ze.get("isShowApply")==="true"){f.history.push(`/classrooms/${ue.coursesId}/exercise/${ue.categoryId}/detail?random=true`);return}f.history.back()}},"\u8FD4\u56DE\u8003\u8BD5\u5217\u8868"),(!Ge||(0,K.WX)())&&R.createElement(Ee.Z,{title:He===2&&R.createElement("span",null,"\u672C\u6B21\u8003\u8BD5\u53EF\u91CD\u590D\u8003\u8BD5",ee,"\u6B21\uFF0C\u5269\u4F59",Lt(),"\u6B21")},R.createElement(U.Z,{type:"primary",className:`${_.enterBtn} ml20`,onClick:()=>B(void 0,null,function*(){var It;if((z||Le)&&(0,K.WX)()&&localStorage.screenNums>1){o.default.info({title:"\u63D0\u793A",icon:null,centered:!0,content:`\u5F53\u524D\u8003\u8BD5\u5F00\u542F\u4E86\u9632\u5207\u5C4F\u6A21\u5F0F\uFF0C\u7CFB\u7EDF\u68C0\u6D4B\u5230\u60A8\u7684\u7535\u8111\u6709${localStorage.screenNums}\u4E2A\u663E\u793A\u5668\uFF0C\u8BF7\u5148\u79FB\u9664\u6389\u5176\u5B83\u7684\u663E\u793A\u5668\u8BBE\u5907\uFF01`,okText:"\u6211\u77E5\u9053\u4E86"});return}if(kt>oe){Zt(!0);return}localStorage.removeItem("Refresh"),yield(0,K.nr)({inner_ip:bt,public_ip:Ae,open_camera:je,ip_limit:De,ip_bind:Ue,ip_bind_type:it,exercise_tips:[""],exerciseId:Qe,screen_open:Le,forbid_screen:z,screen_num:Be,screen_sec:Ve,coursesId:ue.coursesId,login:(It=b.userInfo)==null?void 0:It.login,history:f.history,identity_verify:ft,open_phone_video_recording:et,current_status:_t,unlockClose:!0})})},kt>oe?"\u7ACB\u5373\u7533\u8BF7\u7EE7\u7EED\u8003\u8BD5":"\u6211\u5DF2\u9605\u8BFB\uFF0C\u8FDB\u5165\u8003\u8BD5"," ")))))),R.createElement(o.default,{centered:!0,title:"\u7533\u8BF7\u7EE7\u7EED\u8003\u8BD5",open:jt,onCancel:()=>{Zt(!1)},onOk:()=>{zt.submit()},confirmLoading:ct},R.createElement($.Z,{spinning:Ze||Oe},R.createElement(fe.default,{layout:"vertical",size:"large",form:zt,onFinish:It=>B(void 0,null,function*(){var Wt;let ur=null;if(ht(!0),ur=yield(0,H.ZP)(`/api/exercises/${ue==null?void 0:ue.categoryId}/check_key.json`,{method:"post",body:Y({},It)}),(ur==null?void 0:ur.status)==-1){zt.setFields([{name:"unlock_key",errors:[ur==null?void 0:ur.message]}]),ht(!1);return}ur=yield(0,H.ZP)(`/api/exercises/${ue==null?void 0:ue.categoryId}/continue_exercise.json`,{method:"post",body:Y({},It)}),(ur==null?void 0:ur.status)===0&&(localStorage.removeItem("Refresh"),F.ZP.success("\u64CD\u4F5C\u6210\u529F\uFF01"),yield(0,K.nr)({inner_ip:bt,public_ip:Ae,open_camera:je,ip_limit:De,ip_bind:Ue,ip_bind_type:it,exercise_tips:[""],exerciseId:Qe,screen_open:Le,screen_num:Be,screen_sec:Ve,forbid_screen:z,coursesId:ue.coursesId,login:(Wt=b.userInfo)==null?void 0:Wt.login,history:f.history,identity_verify:ft,open_phone_video_recording:et,current_status:_t,unlockClose:!0})),ht(!1)})},R.createElement(fe.default.Item,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8003\u8BD5\u89E3\u9501\u7801"}],name:"unlock_key",label:"\u7EE7\u7EED\u8003\u8BD5\u9700\u8981\u8F93\u5165\u8003\u8BD5\u89E3\u9501\u7801\uFF08\u76D1\u8003\u8001\u5E08\u63D0\u4F9B\uFF09"},R.createElement(w.default,{autoComplete:"off",className:qt?"":_.secureInput,suffix:R.createElement("span",{className:"current",onClick:()=>Ut(!qt)},qt?R.createElement(te.Z,null):R.createElement(S.Z,null)),placeholder:"\u8BF7\u8F93\u5165\u8003\u8BD5\u89E3\u9501\u7801"})),ye!==-1?R.createElement(R.Fragment,null,R.createElement(fe.default.Item,{name:"time",label:R.createElement("span",null,"\u5EF6\u957F\u65F6\u95F4\uFF08",R.createElement("span",{style:{color:"#9096A3"}},"\u5F53\u524D\u8003\u8BD5\u622A\u6B62\u65F6\u95F4",I()(se==null?void 0:se.user_total_end_time).format("YYYY-MM-DD HH:mm")),"\uFF09")},R.createElement(X,{MaxMinutes:xt})),R.createElement("div",{className:"mb20",style:{color:"#FA6400"}},"\u8BE5\u5B66\u751F\u5269\u4F59\u8003\u8BD5\u65F6\u95F4\uFF1A",R.createElement("span",{className:"ml5"},pe),"\u5206\u949F",pe!==0&&(se==null?void 0:se.user_end_time)&&R.createElement("span",null,"\uFF0C\u4EA4\u5377\u622A\u6B62\u65F6\u95F4\uFF1A",R.createElement("span",{className:"ml5"},I()(se==null?void 0:se.user_end_time).add(Bt||0,"m").format("YYYY-MM-DD HH:mm:ss"))))):R.createElement("span",{style:{color:"#F6A53B"}}," \u5F53\u524D\u8003\u8BD5\u672A\u9650\u5236\u8003\u751F\u7B54\u9898\u65F6\u957F\uFF0C\u8003\u8BD5\u622A\u6B62\u65F6\u95F4\u4E3A ",I()(ge).format("YYYY-MM-DD HH:mm"))))))};var q=(0,f.connect)(({user:b,globalSetting:x})=>({globalSetting:x,user:b}))(le)},83312:function($t,st,D){"use strict";D.d(st,{U:function(){return o}});var R=D(59301),_e=Object.defineProperty,me=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,re=($,F,w)=>F in $?_e($,F,{enumerable:!0,configurable:!0,writable:!0,value:w}):$[F]=w,ve=($,F)=>{for(var w in F||(F={}))Ie.call(F,w)&&re($,w,F[w]);if(me)for(var w of me(F))fe.call(F,w)&&re($,w,F[w]);return $},Ee=($,F,w)=>new Promise((f,_)=>{var y=O=>{try{K(w.next(O))}catch(I){_(I)}},U=O=>{try{K(w.throw(O))}catch(I){_(I)}},K=O=>O.done?f(O.value):Promise.resolve(O.value).then(y,U);K((w=w.apply($,F)).next())});function o($,F){const[w,f]=(0,R.useState)(F),[_,y]=(0,R.useState)(!1),[U,K]=(0,R.useState)();return[w,_,(I,H=!1)=>Ee(this,null,function*(){const te=H?F:ve(ve({},w),I);y(!0),f(te);const S=yield $(te);return y(!1),K(S),S}),U,K]}},24768:function($t,st,D){"use strict";D.d(st,{AL:function(){return te},Iy:function(){return F},Qv:function(){return _},ez:function(){return H},jb:function(){return w}});var R=D(32834),_e=D.n(R),me=D(11690),Ie=D.n(me);let fe=1;function re(Se,we){const Me=Se.match(/^(\s+)(?:```)/);if(Me===null)return we;const $e=Me[1];return we.split(`
|
|
|
`).map(Y=>{const B=Y.match(/^\s+/);if(B===null)return Y;const[Z]=B;return Z.length>=$e.length?Y.slice($e.length):Y}).join(`
|
|
|
`)}let ve=[],Ee=["<ul>"];const o=new(_e()).Renderer,$=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function F(){ve.length=0,Ee=["<ul>"]}const w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function f(Se,we,Me,$e){if(we>=Se.length||Se[we].level<=Me)return we;var Y=Se[we];$e.push("<li><a href='#"+fe+Y.anchor+"'>"+Y.text+"</a>"),we++;var B=[];return we=f(Se,we,Y.level,B),B.length>0&&($e.push("<ul>"),B.forEach(function(Z){$e.push(Z)}),$e.push("</ul>")),$e.push("</li>"),we=f(Se,we,Me,$e),we}function _(){return f(ve,0,0,Ee),Ee.push("</ul>"),Ee.join("")}const y={heading(Se){const we=$.exec(Se);if(fe+=1,we)return{type:"heading",raw:we[0],depth:we[1].length,text:we[2]}},fences(Se){const we=this.rules.block.fences.exec(Se);if(we){const Me=we[0];let $e=re(Me,we[3]||"");const Y=we[2]?we[2].trim():we[2];if(["latex","katex","math"].indexOf(Y)>=0){const B=O(),Z=$e;$e=B,I[B]={type:"block",expression:Z}}return{type:"code",raw:Me,lang:Y,text:$e}}}},U=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let K=0;const O=()=>`__special_katext_id_${K++}__`;let I={};function H(){return I}function te(){K=0,I={}}function S(Se){return Se=Se.replace(U,(we,Me)=>{const $e=O();return I[$e]={type:"inline",expression:Me},$e}),Se}const j=o.listitem;o.listitem=function(Se){return j(S(Se))};const ae=o.paragraph;o.paragraph=function(Se){return ae(S(Se))};const de=o.tablecell;o.tablecell=function(Se,we){return de(S(Se),we)},o.code=function(Se,we,Me){const $e=(we||"").match(/\S*/)[0];return $e?["latex","katex","math"].indexOf($e)>=0?`<p class='editormd-tex'>${Se}</p>`:`<pre class="prettyprint linenums"><code class="language-${we}">${Me?Se:(0,me.escape)(Se,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(Me?Se:(0,me.escape)(Se,!0))+"</code></pre>"},o.heading=function(Se,we,Me){let $e=this.options.headerPrefix+Me.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ve.push({anchor:$e,level:we,text:Se}),"<h"+we+' id="'+fe+$e+'">'+Se+"</h"+we+">"},_e().setOptions({silent:!0,gfm:!0,pedantic:!1}),_e().use({tokenizer:y,renderer:o}),st.ZP=_e()},36785:function($t,st,D){"use strict";D.d(st,{o2:function(){return fe},yT:function(){return re}});var R=D(19127),_e=D(33166);const me=_e.i.map(ve=>`${ve}-inverse`),Ie=["success","processing","error","default","warning"];function fe(ve){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,R.Z)(me),(0,R.Z)(_e.i)).includes(ve):_e.i.includes(ve)}function re(ve){return Ie.includes(ve)}},79676:function($t,st,D){"use strict";D.d(st,{Z:function(){return re}});var R=D(19447);function _e(ve,Ee,o,$){if($===!1)return{adjustX:!1,adjustY:!1};const F=$&&typeof $=="object"?$:{},w={};switch(ve){case"top":case"bottom":w.shiftX=Ee.dropdownArrowOffset*2+o;break;case"left":case"right":w.shiftY=Ee.dropdownArrowOffsetVertical*2+o;break}const f=Object.assign(Object.assign({},w),F);return f.shiftX||(f.adjustX=!0),f.shiftY||(f.adjustY=!0),f}const me={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"]}},Ie={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"]}},fe=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function re(ve){const{arrowWidth:Ee,autoAdjustOverflow:o,arrowPointAtCenter:$,offset:F,borderRadius:w,visibleFirst:f}=ve,_=Ee/2,y={};return Object.keys(me).forEach(U=>{const K=$&&Ie[U]||me[U],O=Object.assign(Object.assign({},K),{offset:[0,0]});switch(y[U]=O,fe.has(U)&&(O.autoArrow=!1),U){case"top":case"topLeft":case"topRight":O.offset[1]=-_-F;break;case"bottom":case"bottomLeft":case"bottomRight":O.offset[1]=_+F;break;case"left":case"leftTop":case"leftBottom":O.offset[0]=-_-F;break;case"right":case"rightTop":case"rightBottom":O.offset[0]=_+F;break}const I=(0,R.fS)({contentRadius:w,limitVerticalRadius:!0});if($)switch(U){case"topLeft":case"bottomLeft":O.offset[0]=-I.dropdownArrowOffset-_;break;case"topRight":case"bottomRight":O.offset[0]=I.dropdownArrowOffset+_;break;case"leftTop":case"rightTop":O.offset[1]=-I.dropdownArrowOffset-_;break;case"leftBottom":case"rightBottom":O.offset[1]=I.dropdownArrowOffset+_;break}O.overflow=_e(U,I,Ee,o),f&&(O.htmlRegion="visibleFirst")}),y}},19080:function($t,st,D){"use strict";D.d(st,{F:function(){return fe},Z:function(){return Ie}});var R=D(92310),_e=D.n(R);const me=null;function Ie(re,ve,Ee){return _e()({[`${re}-status-success`]:ve==="success",[`${re}-status-warning`]:ve==="warning",[`${re}-status-error`]:ve==="error",[`${re}-status-validating`]:ve==="validating",[`${re}-has-feedback`]:Ee})}const fe=(re,ve)=>ve||re},78241:function($t,st,D){"use strict";D.d(st,{default:function(){return Ot}});var R=D(19127),_e=D(92310),me=D.n(_e),Ie=D(77900),fe=D(59301),re=D(62892),ve=D(32441);function Ee(Re){const[ot,dt]=fe.useState(Re);return fe.useEffect(()=>{const mt=setTimeout(()=>{dt(Re)},Re.length?0:10);return()=>{clearTimeout(mt)}},[Re]),ot}var o=D(17313),$=D(29878),F=D(8378),w=D(37613),f=D(83116),y=Re=>{const{componentCls:ot}=Re,dt=`${ot}-show-help`,mt=`${ot}-show-help-item`;return{[dt]:{transition:`opacity ${Re.motionDurationSlow} ${Re.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[mt]:{overflow:"hidden",transition:`height ${Re.motionDurationSlow} ${Re.motionEaseInOut},
|
|
|
opacity ${Re.motionDurationSlow} ${Re.motionEaseInOut},
|
|
|
transform ${Re.motionDurationSlow} ${Re.motionEaseInOut} !important`,[`&${mt}-appear, &${mt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${mt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const U=Re=>({legend:{display:"block",width:"100%",marginBottom:Re.marginLG,padding:0,color:Re.colorTextDescription,fontSize:Re.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Re.lineWidth}px ${Re.lineType} ${Re.colorBorder}`},label:{fontSize:Re.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Re.controlOutlineWidth}px ${Re.controlOutline}`},output:{display:"block",paddingTop:15,color:Re.colorText,fontSize:Re.fontSize,lineHeight:Re.lineHeight}}),K=(Re,ot)=>{const{formItemCls:dt}=Re;return{[dt]:{[`${dt}-label > label`]:{height:ot},[`${dt}-control-input`]:{minHeight:ot}}}},O=Re=>{const{componentCls:ot}=Re;return{[Re.componentCls]:Object.assign(Object.assign(Object.assign({},(0,o.Wf)(Re)),U(Re)),{[`${ot}-text`]:{display:"inline-block",paddingInlineEnd:Re.paddingSM},"&-small":Object.assign({},K(Re,Re.controlHeightSM)),"&-large":Object.assign({},K(Re,Re.controlHeightLG))})}},I=Re=>{const{formItemCls:ot,iconCls:dt,componentCls:mt,rootPrefixCls:ut,labelRequiredMarkColor:Et,labelColor:Kt,labelFontSize:hr,labelHeight:Xt,labelColonMarginInlineStart:lr,labelColonMarginInlineEnd:Jt,itemMarginBottom:xr}=Re;return{[ot]:Object.assign(Object.assign({},(0,o.Wf)(Re)),{marginBottom:xr,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${ut}-row`]:{display:"none"},"&-has-warning":{[`${ot}-split`]:{color:Re.colorError}},"&-has-error":{[`${ot}-split`]:{color:Re.colorWarning}},[`${ot}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Re.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Xt,color:Kt,fontSize:hr,[`> ${dt}`]:{fontSize:Re.fontSize,verticalAlign:"top"},[`&${ot}-required:not(${ot}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Re.marginXXS,color:Et,fontSize:Re.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${mt}-hide-required-mark &`]:{display:"none"}},[`${ot}-optional`]:{display:"inline-block",marginInlineStart:Re.marginXXS,color:Re.colorTextDescription,[`${mt}-hide-required-mark &`]:{display:"none"}},[`${ot}-tooltip`]:{color:Re.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Re.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:lr,marginInlineEnd:Jt},[`&${ot}-no-colon::after`]:{content:'"\\a0"'}}},[`${ot}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${ut}-col-'"]):not([class*="' ${ut}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Re.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[ot]:{"&-explain, &-extra":{clear:"both",color:Re.colorTextDescription,fontSize:Re.fontSize,lineHeight:Re.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Re.controlHeightSM,transition:`color ${Re.motionDurationMid} ${Re.motionEaseOut}`},"&-explain":{"&-error":{color:Re.colorError},"&-warning":{color:Re.colorWarning}}},[`&-with-help ${ot}-explain`]:{height:"auto",opacity:1},[`${ot}-feedback-icon`]:{fontSize:Re.fontSize,textAlign:"center",visibility:"visible",animationName:$.kr,animationDuration:Re.motionDurationMid,animationTimingFunction:Re.motionEaseOutBack,pointerEvents:"none","&-success":{color:Re.colorSuccess},"&-error":{color:Re.colorError},"&-warning":{color:Re.colorWarning},"&-validating":{color:Re.colorPrimary}}})}},H=Re=>{const{componentCls:ot,formItemCls:dt}=Re;return{[`${ot}-horizontal`]:{[`${dt}-label`]:{flexGrow:0},[`${dt}-control`]:{flex:"1 1 0",minWidth:0},[`${dt}-label[class$='-24'], ${dt}-label[class*='-24 ']`]:{[`& + ${dt}-control`]:{minWidth:"unset"}}}}},te=Re=>{const{componentCls:ot,formItemCls:dt}=Re;return{[`${ot}-inline`]:{display:"flex",flexWrap:"wrap",[dt]:{flex:"none",marginInlineEnd:Re.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${dt}-label,
|
|
|
> ${dt}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${dt}-label`]:{flex:"none"},[`${ot}-text`]:{display:"inline-block"},[`${dt}-has-feedback`]:{display:"inline-block"}}}}},S=Re=>({padding:Re.verticalLabelPadding,margin:Re.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),j=Re=>{const{componentCls:ot,formItemCls:dt,rootPrefixCls:mt}=Re;return{[`${dt} ${dt}-label`]:S(Re),[ot]:{[dt]:{flexWrap:"wrap",[`${dt}-label, ${dt}-control`]:{[`&:not([class*=" ${mt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},ae=Re=>{const{componentCls:ot,formItemCls:dt,rootPrefixCls:mt}=Re;return{[`${ot}-vertical`]:{[dt]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${ot}-item-control`]:{width:"100%"}}},[`${ot}-vertical ${dt}-label,
|
|
|
.${mt}-col-24${dt}-label,
|
|
|
.${mt}-col-xl-24${dt}-label`]:S(Re),[`@media (max-width: ${Re.screenXSMax}px)`]:[j(Re),{[ot]:{[`.${mt}-col-xs-24${dt}-label`]:S(Re)}}],[`@media (max-width: ${Re.screenSMMax}px)`]:{[ot]:{[`.${mt}-col-sm-24${dt}-label`]:S(Re)}},[`@media (max-width: ${Re.screenMDMax}px)`]:{[ot]:{[`.${mt}-col-md-24${dt}-label`]:S(Re)}},[`@media (max-width: ${Re.screenLGMax}px)`]:{[ot]:{[`.${mt}-col-lg-24${dt}-label`]:S(Re)}}}},de=(Re,ot)=>(0,w.TS)(Re,{formItemCls:`${Re.componentCls}-item`,rootPrefixCls:ot});var Se=(0,f.Z)("Form",(Re,ot)=>{let{rootPrefixCls:dt}=ot;const mt=de(Re,dt);return[O(mt),I(mt),y(mt),H(mt),te(mt),ae(mt),(0,F.Z)(mt),$.kr]},Re=>({labelRequiredMarkColor:Re.colorError,labelColor:Re.colorTextHeading,labelFontSize:Re.fontSize,labelHeight:Re.controlHeight,labelColonMarginInlineStart:Re.marginXXS/2,labelColonMarginInlineEnd:Re.marginXS,itemMarginBottom:Re.marginLG,verticalLabelPadding:`0 0 ${Re.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const we=[];function Me(Re,ot,dt){let mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Re=="string"?Re:`${ot}-${mt}`,error:Re,errorStatus:dt}}var Y=Re=>{let{help:ot,helpStatus:dt,errors:mt=we,warnings:ut=we,className:Et,fieldId:Kt,onVisibleChanged:hr}=Re;const{prefixCls:Xt}=fe.useContext(ve.Rk),lr=`${Xt}-item-explain`,[,Jt]=Se(Xt),xr=(0,fe.useMemo)(()=>(0,re.Z)(Xt),[Xt]),Lr=Ee(mt),wt=Ee(ut),Tt=fe.useMemo(()=>ot!=null?[Me(ot,"help",dt)]:[].concat((0,R.Z)(Lr.map((vr,cr)=>Me(vr,"error","error",cr))),(0,R.Z)(wt.map((vr,cr)=>Me(vr,"warning","warning",cr)))),[ot,dt,Lr,wt]),tr={};return Kt&&(tr.id=`${Kt}_help`),fe.createElement(Ie.default,{motionDeadline:xr.motionDeadline,motionName:`${Xt}-show-help`,visible:!!Tt.length,onVisibleChanged:hr},vr=>{const{className:cr,style:rr}=vr;return fe.createElement("div",Object.assign({},tr,{className:me()(lr,cr,Et,Jt),style:rr,role:"alert"}),fe.createElement(Ie.CSSMotionList,Object.assign({keys:Tt},(0,re.Z)(Xt),{motionName:`${Xt}-show-help-item`,component:!1}),Mr=>{const{key:Er,error:fr,errorStatus:mr,className:gr,style:Fr}=Mr;return fe.createElement("div",{key:Er,className:me()(gr,{[`${lr}-${mr}`]:mr}),style:Fr},fr)}))})},B=D(95013),Z=D(36355),X=D(1684),le=D(52946),q=D(19716),b=D(16722);const x=["parentNode"],G="form_item";function ue(Re){return Re===void 0||Re===!1?[]:Array.isArray(Re)?Re:[Re]}function ze(Re,ot){if(!Re.length)return;const dt=Re.join("_");return ot?`${ot}_${dt}`:x.includes(dt)?`${G}_${dt}`:dt}function Xe(Re,ot,dt,mt,ut,Et){let Kt=mt;return Et!==void 0?Kt=Et:dt.validating?Kt="validating":Re.length?Kt="error":ot.length?Kt="warning":(dt.touched||ut&&dt.validated)&&(Kt="success"),Kt}function Ke(Re){return ue(Re).join("_")}function Ze(Re){const[ot]=(0,B.useForm)(),dt=fe.useRef({}),mt=fe.useMemo(()=>Re!=null?Re:Object.assign(Object.assign({},ot),{__INTERNAL__:{itemRef:ut=>Et=>{const Kt=Ke(ut);Et?dt.current[Kt]=Et:delete dt.current[Kt]}},scrollToField:function(ut){let Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Kt=ue(ut),hr=ze(Kt,mt.__INTERNAL__.name),Xt=hr?document.getElementById(hr):null;Xt&&(0,b.Z)(Xt,Object.assign({scrollMode:"if-needed",block:"nearest"},Et))},getFieldInstance:ut=>{const Et=Ke(ut);return dt.current[Et]}}),[Re,ot]);return[mt]}var pt=D(28726),ct=function(Re,ot){var dt={};for(var mt in Re)Object.prototype.hasOwnProperty.call(Re,mt)&&ot.indexOf(mt)<0&&(dt[mt]=Re[mt]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,mt=Object.getOwnPropertySymbols(Re);ut<mt.length;ut++)ot.indexOf(mt[ut])<0&&Object.prototype.propertyIsEnumerable.call(Re,mt[ut])&&(dt[mt[ut]]=Re[mt[ut]]);return dt};const ht=(Re,ot)=>{const dt=fe.useContext(X.Z),{getPrefixCls:mt,direction:ut,form:Et}=fe.useContext(Z.E_),{prefixCls:Kt,className:hr,rootClassName:Xt,size:lr,disabled:Jt=dt,form:xr,colon:Lr,labelAlign:wt,labelWrap:Tt,labelCol:tr,wrapperCol:vr,hideRequiredMark:cr,layout:rr="horizontal",scrollToFirstError:Mr,requiredMark:Er,onFinishFailed:fr,name:mr,style:gr,feedbackIcons:Fr}=Re,Gr=ct(Re,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Sr=(0,q.Z)(lr),pr=fe.useContext(pt.Z),_r=(0,fe.useMemo)(()=>Er!==void 0?Er:Et&&Et.requiredMark!==void 0?Et.requiredMark:!cr,[cr,Er,Et]),Pr=Lr!=null?Lr:Et==null?void 0:Et.colon,yr=mt("form",Kt),[Dr,jr]=Se(yr),Tn=me()(yr,`${yr}-${rr}`,{[`${yr}-hide-required-mark`]:_r===!1,[`${yr}-rtl`]:ut==="rtl",[`${yr}-${Sr}`]:Sr},jr,Et==null?void 0:Et.className,hr,Xt),[Yr]=Ze(xr),{__INTERNAL__:br}=Yr;br.name=mr;const Cr=(0,fe.useMemo)(()=>({name:mr,labelAlign:wt,labelCol:tr,labelWrap:Tt,wrapperCol:vr,vertical:rr==="vertical",colon:Pr,requiredMark:_r,itemRef:br.itemRef,form:Yr,feedbackIcons:Fr}),[mr,wt,tr,vr,rr,Pr,_r,Yr,Fr]);fe.useImperativeHandle(ot,()=>Yr);const vn=(Jr,zr)=>{if(Jr){let en={block:"nearest"};typeof Jr=="object"&&(en=Jr),Yr.scrollToField(zr,en)}},qr=Jr=>{if(fr==null||fr(Jr),Jr.errorFields.length){const zr=Jr.errorFields[0].name;if(Mr!==void 0){vn(Mr,zr);return}Et&&Et.scrollToFirstError!==void 0&&vn(Et.scrollToFirstError,zr)}};return Dr(fe.createElement(X.n,{disabled:Jt},fe.createElement(le.q,{size:Sr},fe.createElement(ve.RV,Object.assign({},{validateMessages:pr}),fe.createElement(ve.q3.Provider,{value:Cr},fe.createElement(B.default,Object.assign({id:mr},Gr,{name:mr,onFinishFailed:qr,form:Yr,style:Object.assign(Object.assign({},Et==null?void 0:Et.style),gr),className:Tn})))))))};var Zt=fe.forwardRef(ht),qt=D(41799),Ut=D(8654),zt=D(92343),Bt=D(11592);function Oe(Re){if(typeof Re=="function")return Re;const ot=(0,Bt.Z)(Re);return ot.length<=1?ot[0]:ot}const qe=()=>{const{status:Re,errors:ot=[],warnings:dt=[]}=(0,fe.useContext)(ve.aM);return{status:Re,errors:ot,warnings:dt}};qe.Context=ve.aM;var se=qe,Ne=D(16089);function He(Re){const[ot,dt]=fe.useState(Re),mt=(0,fe.useRef)(null),ut=(0,fe.useRef)([]),Et=(0,fe.useRef)(!1);fe.useEffect(()=>(Et.current=!1,()=>{Et.current=!0,Ne.Z.cancel(mt.current),mt.current=null}),[]);function Kt(hr){Et.current||(mt.current===null&&(ut.current=[],mt.current=(0,Ne.Z)(()=>{mt.current=null,dt(Xt=>{let lr=Xt;return ut.current.forEach(Jt=>{lr=Jt(lr)}),lr})})),ut.current.push(hr))}return[ot,Kt]}function N(){const{itemRef:Re}=fe.useContext(ve.q3),ot=fe.useRef({});function dt(mt,ut){const Et=ut&&typeof ut=="object"&&ut.ref,Kt=mt.join("_");return(ot.current.name!==Kt||ot.current.originRef!==Et)&&(ot.current.name=Kt,ot.current.originRef=Et,ot.current.ref=(0,Ut.sQ)(Re(mt),Et)),ot.current.ref}return dt}var ee=D(29194),ye=D(34280),be=D(2738),Le=D(27382),Be=D(37028);const Ve=Re=>{const{formItemCls:ot}=Re;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${ot}-control`]:{display:"flex"}}}};var nt=(0,f.b)(["Form","item-item"],(Re,ot)=>{let{rootPrefixCls:dt}=ot;const mt=de(Re,dt);return[Ve(mt)]}),je=Re=>{const{prefixCls:ot,status:dt,wrapperCol:mt,children:ut,errors:Et,warnings:Kt,_internalItemRender:hr,extra:Xt,help:lr,fieldId:Jt,marginBottom:xr,onErrorVisibleChanged:Lr}=Re,wt=`${ot}-item`,Tt=fe.useContext(ve.q3),tr=mt||Tt.wrapperCol||{},vr=me()(`${wt}-control`,tr.className),cr=fe.useMemo(()=>Object.assign({},Tt),[Tt]);delete cr.labelCol,delete cr.wrapperCol;const rr=fe.createElement("div",{className:`${wt}-control-input`},fe.createElement("div",{className:`${wt}-control-input-content`},ut)),Mr=fe.useMemo(()=>({prefixCls:ot,status:dt}),[ot,dt]),Er=xr!==null||Et.length||Kt.length?fe.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},fe.createElement(ve.Rk.Provider,{value:Mr},fe.createElement(Y,{fieldId:Jt,errors:Et,warnings:Kt,help:lr,helpStatus:dt,className:`${wt}-explain-connected`,onVisibleChanged:Lr})),!!xr&&fe.createElement("div",{style:{width:0,height:xr}})):null,fr={};Jt&&(fr.id=`${Jt}_extra`);const mr=Xt?fe.createElement("div",Object.assign({},fr,{className:`${wt}-extra`}),Xt):null,gr=hr&&hr.mark==="pro_table_render"&&hr.render?hr.render(Re,{input:rr,errorList:Er,extra:mr}):fe.createElement(fe.Fragment,null,rr,Er,mr);return fe.createElement(ve.q3.Provider,{value:cr},fe.createElement(Be.Z,Object.assign({},tr,{className:vr}),gr),fe.createElement(nt,{prefixCls:ot}))},bt=D(61485),Ae=D(31724),De=D(9763),Ue=D(6848),it=function(Re,ot){var dt={};for(var mt in Re)Object.prototype.hasOwnProperty.call(Re,mt)&&ot.indexOf(mt)<0&&(dt[mt]=Re[mt]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,mt=Object.getOwnPropertySymbols(Re);ut<mt.length;ut++)ot.indexOf(mt[ut])<0&&Object.prototype.propertyIsEnumerable.call(Re,mt[ut])&&(dt[mt[ut]]=Re[mt[ut]]);return dt};function et(Re){return Re?typeof Re=="object"&&!fe.isValidElement(Re)?Re:{title:Re}:null}var _t=Re=>{let{prefixCls:ot,label:dt,htmlFor:mt,labelCol:ut,labelAlign:Et,colon:Kt,required:hr,requiredMark:Xt,tooltip:lr}=Re;var Jt;const[xr]=(0,De.Z)("Form"),{vertical:Lr,labelAlign:wt,labelCol:Tt,labelWrap:tr,colon:vr}=fe.useContext(ve.q3);if(!dt)return null;const cr=ut||Tt||{},rr=Et||wt,Mr=`${ot}-item-label`,Er=me()(Mr,rr==="left"&&`${Mr}-left`,cr.className,{[`${Mr}-wrap`]:!!tr});let fr=dt;const mr=Kt===!0||vr!==!1&&Kt!==!1;mr&&!Lr&&typeof dt=="string"&&dt.trim()!==""&&(fr=dt.replace(/[:|:]\s*$/,""));const Fr=et(lr);if(Fr){const{icon:_r=fe.createElement(bt.Z,null)}=Fr,Pr=it(Fr,["icon"]),yr=fe.createElement(Ue.Z,Object.assign({},Pr),fe.cloneElement(_r,{className:`${ot}-item-tooltip`,title:""}));fr=fe.createElement(fe.Fragment,null,fr,yr)}const Gr=Xt==="optional",Sr=typeof Xt=="function";Sr?fr=Xt(fr,{required:!!hr}):Gr&&!hr&&(fr=fe.createElement(fe.Fragment,null,fr,fe.createElement("span",{className:`${ot}-item-optional`,title:""},(xr==null?void 0:xr.optional)||((Jt=Ae.Z.Form)===null||Jt===void 0?void 0:Jt.optional))));const pr=me()({[`${ot}-item-required`]:hr,[`${ot}-item-required-mark-optional`]:Gr||Sr,[`${ot}-item-no-colon`]:!mr});return fe.createElement(Be.Z,Object.assign({},cr,{className:Er}),fe.createElement("label",{htmlFor:mt,className:pr,title:typeof dt=="string"?dt:""},fr))},v=D(29679),E=D(19248),Ye=D(96512),P=D(58617);const oe={success:v.Z,warning:Ye.Z,error:E.Z,validating:P.Z};function kt(Re){let{children:ot,errors:dt,warnings:mt,hasFeedback:ut,validateStatus:Et,prefixCls:Kt,meta:hr,noStyle:Xt}=Re;const lr=`${Kt}-item`,{feedbackIcons:Jt}=fe.useContext(ve.q3),xr=Xe(dt,mt,hr,null,!!ut,Et),{isFormItemInput:Lr,status:wt}=fe.useContext(ve.aM),Tt=fe.useMemo(()=>{var tr;let vr;if(ut){const Mr=ut!==!0&&ut.icons||Jt,Er=xr&&((tr=Mr==null?void 0:Mr({status:xr,errors:dt,warnings:mt}))===null||tr===void 0?void 0:tr[xr]),fr=xr&&oe[xr];vr=Er!==!1&&fr?fe.createElement("span",{className:me()(`${lr}-feedback-icon`,`${lr}-feedback-icon-${xr}`)},Er||fe.createElement(fr,null)):null}let cr=!0,rr=xr||"";return Xt&&(cr=Lr,rr=(xr!=null?xr:wt)||""),{status:rr,errors:dt,warnings:mt,hasFeedback:!!ut,feedbackIcon:vr,isFormItemInput:cr}},[xr,ut,Xt,Lr,wt]);return fe.createElement(ve.aM.Provider,{value:Tt},ot)}var ge=function(Re,ot){var dt={};for(var mt in Re)Object.prototype.hasOwnProperty.call(Re,mt)&&ot.indexOf(mt)<0&&(dt[mt]=Re[mt]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,mt=Object.getOwnPropertySymbols(Re);ut<mt.length;ut++)ot.indexOf(mt[ut])<0&&Object.prototype.propertyIsEnumerable.call(Re,mt[ut])&&(dt[mt[ut]]=Re[mt[ut]]);return dt};function Pe(Re){const{prefixCls:ot,className:dt,rootClassName:mt,style:ut,help:Et,errors:Kt,warnings:hr,validateStatus:Xt,meta:lr,hasFeedback:Jt,hidden:xr,children:Lr,fieldId:wt,required:Tt,isRequired:tr,onSubItemMetaChange:vr}=Re,cr=ge(Re,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),rr=`${ot}-item`,{requiredMark:Mr}=fe.useContext(ve.q3),Er=fe.useRef(null),fr=Ee(Kt),mr=Ee(hr),gr=Et!=null,Fr=!!(gr||Kt.length||hr.length),Gr=!!Er.current&&(0,ee.Z)(Er.current),[Sr,pr]=fe.useState(null);(0,ye.Z)(()=>{if(Fr&&Er.current){const jr=getComputedStyle(Er.current);pr(parseInt(jr.marginBottom,10))}},[Fr,Gr]);const _r=jr=>{jr||pr(null)},yr=function(){let jr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Tn=jr?fr:lr.errors,Yr=jr?mr:lr.warnings;return Xe(Tn,Yr,lr,"",!!Jt,Xt)}(),Dr=me()(rr,dt,mt,{[`${rr}-with-help`]:gr||fr.length||mr.length,[`${rr}-has-feedback`]:yr&&Jt,[`${rr}-has-success`]:yr==="success",[`${rr}-has-warning`]:yr==="warning",[`${rr}-has-error`]:yr==="error",[`${rr}-is-validating`]:yr==="validating",[`${rr}-hidden`]:xr});return fe.createElement("div",{className:Dr,style:ut,ref:Er},fe.createElement(Le.Z,Object.assign({className:`${rr}-row`},(0,be.Z)(cr,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),fe.createElement(_t,Object.assign({htmlFor:wt},Re,{requiredMark:Mr,required:Tt!=null?Tt:tr,prefixCls:ot})),fe.createElement(je,Object.assign({},Re,lr,{errors:fr,warnings:mr,prefixCls:ot,status:yr,help:Et,marginBottom:Sr,onErrorVisibleChanged:_r}),fe.createElement(ve.qI.Provider,{value:vr},fe.createElement(kt,{prefixCls:ot,meta:lr,errors:lr.errors,warnings:lr.warnings,hasFeedback:Jt,validateStatus:yr},Lr)))),!!Sr&&fe.createElement("div",{className:`${rr}-margin-offset`,style:{marginBottom:-Sr}}))}const Ge="__SPLIT__",z=null,J=fe.memo(Re=>{let{children:ot}=Re;return ot},(Re,ot)=>Re.value===ot.value&&Re.update===ot.update&&Re.childProps.length===ot.childProps.length&&Re.childProps.every((dt,mt)=>dt===ot.childProps[mt]));function ce(Re){return Re!=null}function Ce(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function M(Re){const{name:ot,noStyle:dt,className:mt,dependencies:ut,prefixCls:Et,shouldUpdate:Kt,rules:hr,children:Xt,required:lr,label:Jt,messageVariables:xr,trigger:Lr="onChange",validateTrigger:wt,hidden:Tt,help:tr}=Re,{getPrefixCls:vr}=fe.useContext(Z.E_),{name:cr}=fe.useContext(ve.q3),rr=Oe(Xt),Mr=typeof rr=="function",Er=fe.useContext(ve.qI),{validateTrigger:fr}=fe.useContext(B.FieldContext),mr=wt!==void 0?wt:fr,gr=ce(ot),Fr=vr("form",Et),[Gr,Sr]=Se(Fr),pr=fe.useContext(B.ListContext),_r=fe.useRef(),[Pr,yr]=He({}),[Dr,jr]=(0,qt.Z)(()=>Ce()),Tn=zr=>{const en=pr==null?void 0:pr.getKey(zr.name);if(jr(zr.destroy?Ce():zr,!0),dt&&tr!==!1&&Er){let tn=zr.name;if(zr.destroy)tn=_r.current||tn;else if(en!==void 0){const[rn,_n]=en;tn=[rn].concat((0,R.Z)(_n)),_r.current=tn}Er(zr,tn)}},Yr=(zr,en)=>{yr(tn=>{const rn=Object.assign({},tn),kn=[].concat((0,R.Z)(zr.name.slice(0,-1)),(0,R.Z)(en)).join(Ge);return zr.destroy?delete rn[kn]:rn[kn]=zr,rn})},[br,Cr]=fe.useMemo(()=>{const zr=(0,R.Z)(Dr.errors),en=(0,R.Z)(Dr.warnings);return Object.values(Pr).forEach(tn=>{zr.push.apply(zr,(0,R.Z)(tn.errors||[])),en.push.apply(en,(0,R.Z)(tn.warnings||[]))}),[zr,en]},[Pr,Dr.errors,Dr.warnings]),vn=N();function qr(zr,en,tn){return dt&&!Tt?fe.createElement(kt,{prefixCls:Fr,hasFeedback:Re.hasFeedback,validateStatus:Re.validateStatus,meta:Dr,errors:br,warnings:Cr,noStyle:!0},zr):fe.createElement(Pe,Object.assign({key:"row"},Re,{className:me()(mt,Sr),prefixCls:Fr,fieldId:en,isRequired:tn,errors:br,warnings:Cr,meta:Dr,onSubItemMetaChange:Yr}),zr)}if(!gr&&!Mr&&!ut)return Gr(qr(rr));let Jr={};return typeof Jt=="string"?Jr.label=Jt:ot&&(Jr.label=String(ot)),xr&&(Jr=Object.assign(Object.assign({},Jr),xr)),Gr(fe.createElement(B.Field,Object.assign({},Re,{messageVariables:Jr,trigger:Lr,validateTrigger:mr,onMetaChange:Tn}),(zr,en,tn)=>{const rn=ue(ot).length&&en?en.name:[],_n=ze(rn,cr),kn=lr!==void 0?lr:!!(hr&&hr.some(ke=>{if(ke&&typeof ke=="object"&&ke.required&&!ke.warningOnly)return!0;if(typeof ke=="function"){const Ht=ke(tn);return Ht&&Ht.required&&!Ht.warningOnly}return!1})),Dn=Object.assign({},zr);let Gt=null;if(Array.isArray(rr)&&gr)Gt=rr;else if(!(Mr&&(!(Kt||ut)||gr))){if(!(ut&&!Mr&&!gr))if((0,zt.l$)(rr)){const ke=Object.assign(Object.assign({},rr.props),Dn);if(ke.id||(ke.id=_n),tr||br.length>0||Cr.length>0||Re.extra){const Wr=[];(tr||br.length>0)&&Wr.push(`${_n}_help`),Re.extra&&Wr.push(`${_n}_extra`),ke["aria-describedby"]=Wr.join(" ")}br.length>0&&(ke["aria-invalid"]="true"),kn&&(ke["aria-required"]="true"),(0,Ut.Yr)(rr)&&(ke.ref=vn(rn,rr)),new Set([].concat((0,R.Z)(ue(Lr)),(0,R.Z)(ue(mr)))).forEach(Wr=>{ke[Wr]=function(){for(var En,Ln,yn,Nr,bn,In=arguments.length,an=new Array(In),pn=0;pn<In;pn++)an[pn]=arguments[pn];(yn=Dn[Wr])===null||yn===void 0||(En=yn).call.apply(En,[Dn].concat(an)),(bn=(Nr=rr.props)[Wr])===null||bn===void 0||(Ln=bn).call.apply(Ln,[Nr].concat(an))}});const ar=[ke["aria-required"],ke["aria-invalid"],ke["aria-describedby"]];Gt=fe.createElement(J,{value:Dn[Re.valuePropName||"value"],update:rr,childProps:ar},(0,zt.Tm)(rr,ke))}else Mr&&(Kt||ut)&&!gr?Gt=rr(tn):Gt=rr}return qr(Gt,_n,kn)}))}const xt=M;xt.useStatus=se;var pe=xt,Lt=function(Re,ot){var dt={};for(var mt in Re)Object.prototype.hasOwnProperty.call(Re,mt)&&ot.indexOf(mt)<0&&(dt[mt]=Re[mt]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,mt=Object.getOwnPropertySymbols(Re);ut<mt.length;ut++)ot.indexOf(mt[ut])<0&&Object.prototype.propertyIsEnumerable.call(Re,mt[ut])&&(dt[mt[ut]]=Re[mt[ut]]);return dt},Wt=Re=>{var{prefixCls:ot,children:dt}=Re,mt=Lt(Re,["prefixCls","children"]);const{getPrefixCls:ut}=fe.useContext(Z.E_),Et=ut("form",ot),Kt=fe.useMemo(()=>({prefixCls:Et,status:"error"}),[Et]);return fe.createElement(B.List,Object.assign({},mt),(hr,Xt,lr)=>fe.createElement(ve.Rk.Provider,{value:Kt},dt(hr.map(Jt=>Object.assign(Object.assign({},Jt),{fieldKey:Jt.key})),Xt,{errors:lr.errors,warnings:lr.warnings})))};function ur(){const{form:Re}=(0,fe.useContext)(ve.q3);return Re}const Ct=Zt;Ct.Item=pe,Ct.List=Wt,Ct.ErrorList=Y,Ct.useForm=Ze,Ct.useFormInstance=ur,Ct.useWatch=B.useWatch,Ct.Provider=ve.RV,Ct.create=()=>{};var Ot=Ct},5871:function($t,st,D){"use strict";D.d(st,{Z:function(){return bt}});var R=D(84105),_e=D(87395),me=D(92310),Ie=D.n(me),fe=D(96663),re=D(90493),ve=D(20135),Ee=D(72071),o=D(6620),$=D(52884),F=D(95727);function w(){return typeof BigInt=="function"}function f(Ae){return!Ae&&Ae!==0&&!Number.isNaN(Ae)||!String(Ae).trim()}function _(Ae){var De=Ae.trim(),Ue=De.startsWith("-");Ue&&(De=De.slice(1)),De=De.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),De.startsWith(".")&&(De="0".concat(De));var it=De||"0",et=it.split("."),ft=et[0]||"0",_t=et[1]||"0";ft==="0"&&_t==="0"&&(Ue=!1);var v=Ue?"-":"";return{negative:Ue,negativeStr:v,trimStr:it,integerStr:ft,decimalStr:_t,fullStr:"".concat(v).concat(it)}}function y(Ae){var De=String(Ae);return!Number.isNaN(Number(De))&&De.includes("e")}function U(Ae){var De=String(Ae);if(y(Ae)){var Ue=Number(De.slice(De.indexOf("e-")+2)),it=De.match(/\.(\d+)/);return it!=null&&it[1]&&(Ue+=it[1].length),Ue}return De.includes(".")&&O(De)?De.length-De.indexOf(".")-1:0}function K(Ae){var De=String(Ae);if(y(Ae)){if(Ae>Number.MAX_SAFE_INTEGER)return String(w()?BigInt(Ae).toString():Number.MAX_SAFE_INTEGER);if(Ae<Number.MIN_SAFE_INTEGER)return String(w()?BigInt(Ae).toString():Number.MIN_SAFE_INTEGER);De=Ae.toFixed(U(De))}return _(De).fullStr}function O(Ae){return typeof Ae=="number"?!Number.isNaN(Ae):Ae?/^\s*-?\d+(\.\d+)?\s*$/.test(Ae)||/^\s*-?\d+\.\s*$/.test(Ae)||/^\s*-?\.\d+\s*$/.test(Ae):!1}var I=function(){function Ae(De){if((0,$.Z)(this,Ae),(0,re.Z)(this,"origin",""),(0,re.Z)(this,"negative",void 0),(0,re.Z)(this,"integer",void 0),(0,re.Z)(this,"decimal",void 0),(0,re.Z)(this,"decimalLen",void 0),(0,re.Z)(this,"empty",void 0),(0,re.Z)(this,"nan",void 0),f(De)){this.empty=!0;return}if(this.origin=String(De),De==="-"||Number.isNaN(De)){this.nan=!0;return}var Ue=De;if(y(Ue)&&(Ue=Number(Ue)),Ue=typeof Ue=="string"?Ue:K(Ue),O(Ue)){var it=_(Ue);this.negative=it.negative;var et=it.trimStr.split(".");this.integer=BigInt(et[0]);var ft=et[1]||"0";this.decimal=BigInt(ft),this.decimalLen=ft.length}else this.nan=!0}return(0,F.Z)(Ae,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(Ue){var it="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Ue,"0"));return BigInt(it)}},{key:"negate",value:function(){var Ue=new Ae(this.toString());return Ue.negative=!Ue.negative,Ue}},{key:"cal",value:function(Ue,it,et){var ft=Math.max(this.getDecimalStr().length,Ue.getDecimalStr().length),_t=this.alignDecimal(ft),v=Ue.alignDecimal(ft),E=it(_t,v).toString(),Ye=et(ft),P=_(E),oe=P.negativeStr,kt=P.trimStr,ge="".concat(oe).concat(kt.padStart(Ye+1,"0"));return new Ae("".concat(ge.slice(0,-Ye),".").concat(ge.slice(-Ye)))}},{key:"add",value:function(Ue){if(this.isInvalidate())return new Ae(Ue);var it=new Ae(Ue);return it.isInvalidate()?this:this.cal(it,function(et,ft){return et+ft},function(et){return et})}},{key:"multi",value:function(Ue){var it=new Ae(Ue);return this.isInvalidate()||it.isInvalidate()?new Ae(NaN):this.cal(it,function(et,ft){return et*ft},function(et){return et*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Ue){return this.toString()===(Ue==null?void 0:Ue.toString())}},{key:"lessEquals",value:function(Ue){return this.add(Ue.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ue?this.isInvalidate()?"":_("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Ae}(),H=function(){function Ae(De){if((0,$.Z)(this,Ae),(0,re.Z)(this,"origin",""),(0,re.Z)(this,"number",void 0),(0,re.Z)(this,"empty",void 0),f(De)){this.empty=!0;return}this.origin=String(De),this.number=Number(De)}return(0,F.Z)(Ae,[{key:"negate",value:function(){return new Ae(-this.toNumber())}},{key:"add",value:function(Ue){if(this.isInvalidate())return new Ae(Ue);var it=Number(Ue);if(Number.isNaN(it))return this;var et=this.number+it;if(et>Number.MAX_SAFE_INTEGER)return new Ae(Number.MAX_SAFE_INTEGER);if(et<Number.MIN_SAFE_INTEGER)return new Ae(Number.MIN_SAFE_INTEGER);var ft=Math.max(U(this.number),U(it));return new Ae(et.toFixed(ft))}},{key:"multi",value:function(Ue){var it=Number(Ue);if(this.isInvalidate()||Number.isNaN(it))return new Ae(NaN);var et=this.number*it;if(et>Number.MAX_SAFE_INTEGER)return new Ae(Number.MAX_SAFE_INTEGER);if(et<Number.MIN_SAFE_INTEGER)return new Ae(Number.MIN_SAFE_INTEGER);var ft=Math.max(U(this.number),U(it));return new Ae(et.toFixed(ft))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Ue){return this.toNumber()===(Ue==null?void 0:Ue.toNumber())}},{key:"lessEquals",value:function(Ue){return this.add(Ue.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ue?this.isInvalidate()?"":K(this.number):this.origin}}]),Ae}();function te(Ae){return w()?new I(Ae):new H(Ae)}function S(Ae,De,Ue){var it=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Ae==="")return"";var et=_(Ae),ft=et.negativeStr,_t=et.integerStr,v=et.decimalStr,E="".concat(De).concat(v),Ye="".concat(ft).concat(_t);if(Ue>=0){var P=Number(v[Ue]);if(P>=5&&!it){var oe=te(Ae).add("".concat(ft,"0.").concat("0".repeat(Ue)).concat(10-P));return S(oe.toString(),De,Ue,it)}return Ue===0?Ye:"".concat(Ye).concat(De).concat(v.padEnd(Ue,"0").slice(0,Ue))}return E===".0"?Ye:"".concat(Ye).concat(E)}var j=te,ae=D(93681),de=D(34280),Se=D(8654),we=D(59301),Me=D(48736);function $e(Ae,De){var Ue=(0,we.useRef)(null);function it(){try{var ft=Ae.selectionStart,_t=Ae.selectionEnd,v=Ae.value,E=v.substring(0,ft),Ye=v.substring(_t);Ue.current={start:ft,end:_t,value:v,beforeTxt:E,afterTxt:Ye}}catch(P){}}function et(){if(Ae&&Ue.current&&De)try{var ft=Ae.value,_t=Ue.current,v=_t.beforeTxt,E=_t.afterTxt,Ye=_t.start,P=ft.length;if(ft.endsWith(E))P=ft.length-Ue.current.afterTxt.length;else if(ft.startsWith(v))P=v.length;else{var oe=v[Ye-1],kt=ft.indexOf(oe,Ye-1);kt!==-1&&(P=kt+1)}Ae.setSelectionRange(P,P)}catch(ge){(0,Me.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(ge.message))}}return[it,et]}var Y=D(49658),B=function(){var De=(0,we.useState)(!1),Ue=(0,Ee.Z)(De,2),it=Ue[0],et=Ue[1];return(0,de.Z)(function(){et((0,Y.Z)())},[]),it},Z=B,X=D(16089),le=200,q=600;function b(Ae){var De=Ae.prefixCls,Ue=Ae.upNode,it=Ae.downNode,et=Ae.upDisabled,ft=Ae.downDisabled,_t=Ae.onStep,v=we.useRef(),E=we.useRef([]),Ye=we.useRef();Ye.current=_t;var P=function(){clearTimeout(v.current)},oe=function(Ce,M){Ce.preventDefault(),P(),Ye.current(M);function xt(){Ye.current(M),v.current=setTimeout(xt,le)}v.current=setTimeout(xt,q)};we.useEffect(function(){return function(){P(),E.current.forEach(function(ce){return X.Z.cancel(ce)})}},[]);var kt=Z();if(kt)return null;var ge="".concat(De,"-handler"),Pe=Ie()(ge,"".concat(ge,"-up"),(0,re.Z)({},"".concat(ge,"-up-disabled"),et)),Ge=Ie()(ge,"".concat(ge,"-down"),(0,re.Z)({},"".concat(ge,"-down-disabled"),ft)),z=function(){return E.current.push((0,X.Z)(P))},J={unselectable:"on",role:"button",onMouseUp:z,onMouseLeave:z};return we.createElement("div",{className:"".concat(ge,"-wrap")},we.createElement("span",(0,fe.Z)({},J,{onMouseDown:function(Ce){oe(Ce,!0)},"aria-label":"Increase Value","aria-disabled":et,className:Pe}),Ue||we.createElement("span",{unselectable:"on",className:"".concat(De,"-handler-up-inner")})),we.createElement("span",(0,fe.Z)({},J,{onMouseDown:function(Ce){oe(Ce,!1)},"aria-label":"Decrease Value","aria-disabled":ft,className:Ge}),it||we.createElement("span",{unselectable:"on",className:"".concat(De,"-handler-down-inner")})))}function x(Ae){var De=typeof Ae=="number"?K(Ae):_(Ae).fullStr,Ue=De.includes(".");return Ue?_(De.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Ae+"0"}var G=D(5643),ue=function(){var Ae=(0,we.useRef)(0),De=function(){X.Z.cancel(Ae.current)};return(0,we.useEffect)(function(){return De},[]),function(Ue){De(),Ae.current=(0,X.Z)(function(){Ue()})}},ze=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Xe=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],Ke=function(De,Ue){return De||Ue.isEmpty()?Ue.toString():Ue.toNumber()},Ze=function(De){var Ue=j(De);return Ue.isInvalidate()?null:Ue},pt=we.forwardRef(function(Ae,De){var Ue,it=Ae.prefixCls,et=it===void 0?"rc-input-number":it,ft=Ae.className,_t=Ae.style,v=Ae.min,E=Ae.max,Ye=Ae.step,P=Ye===void 0?1:Ye,oe=Ae.defaultValue,kt=Ae.value,ge=Ae.disabled,Pe=Ae.readOnly,Ge=Ae.upHandler,z=Ae.downHandler,J=Ae.keyboard,ce=Ae.controls,Ce=ce===void 0?!0:ce,M=Ae.classNames,xt=Ae.stringMode,pe=Ae.parser,Lt=Ae.formatter,It=Ae.precision,Wt=Ae.decimalSeparator,ur=Ae.onChange,Ct=Ae.onInput,Ot=Ae.onPressEnter,Re=Ae.onStep,ot=(0,o.Z)(Ae,ze),dt="".concat(et,"-input"),mt=we.useRef(null),ut=we.useState(!1),Et=(0,Ee.Z)(ut,2),Kt=Et[0],hr=Et[1],Xt=we.useRef(!1),lr=we.useRef(!1),Jt=we.useRef(!1),xr=we.useState(function(){return j(kt!=null?kt:oe)}),Lr=(0,Ee.Z)(xr,2),wt=Lr[0],Tt=Lr[1];function tr(Gt){kt===void 0&&Tt(Gt)}var vr=we.useCallback(function(Gt,ke){if(!ke)return It>=0?It:Math.max(U(Gt),U(P))},[It,P]),cr=we.useCallback(function(Gt){var ke=String(Gt);if(pe)return pe(ke);var Ht=ke;return Wt&&(Ht=Ht.replace(Wt,".")),Ht.replace(/[^\w.-]+/g,"")},[pe,Wt]),rr=we.useRef(""),Mr=we.useCallback(function(Gt,ke){if(Lt)return Lt(Gt,{userTyping:ke,input:String(rr.current)});var Ht=typeof Gt=="number"?K(Gt):Gt;if(!ke){var ar=vr(Ht,ke);if(O(Ht)&&(Wt||ar>=0)){var Wr=Wt||".";Ht=S(Ht,Wr,ar)}}return Ht},[Lt,vr,Wt]),Er=we.useState(function(){var Gt=oe!=null?oe:kt;return wt.isInvalidate()&&["string","number"].includes((0,ve.Z)(Gt))?Number.isNaN(Gt)?"":Gt:Mr(wt.toString(),!1)}),fr=(0,Ee.Z)(Er,2),mr=fr[0],gr=fr[1];rr.current=mr;function Fr(Gt,ke){gr(Mr(Gt.isInvalidate()?Gt.toString(!1):Gt.toString(!ke),ke))}var Gr=we.useMemo(function(){return Ze(E)},[E,It]),Sr=we.useMemo(function(){return Ze(v)},[v,It]),pr=we.useMemo(function(){return!Gr||!wt||wt.isInvalidate()?!1:Gr.lessEquals(wt)},[Gr,wt]),_r=we.useMemo(function(){return!Sr||!wt||wt.isInvalidate()?!1:wt.lessEquals(Sr)},[Sr,wt]),Pr=$e(mt.current,Kt),yr=(0,Ee.Z)(Pr,2),Dr=yr[0],jr=yr[1],Tn=function(ke){return Gr&&!ke.lessEquals(Gr)?Gr:Sr&&!Sr.lessEquals(ke)?Sr:null},Yr=function(ke){return!Tn(ke)},br=function(ke,Ht){var ar=ke,Wr=Yr(ar)||ar.isEmpty();if(!ar.isEmpty()&&!Ht&&(ar=Tn(ar)||ar,Wr=!0),!Pe&&!ge&&Wr){var En=ar.toString(),Ln=vr(En,Ht);return Ln>=0&&(ar=j(S(En,".",Ln)),Yr(ar)||(ar=j(S(En,".",Ln,!0)))),ar.equals(wt)||(tr(ar),ur==null||ur(ar.isEmpty()?null:Ke(xt,ar)),kt===void 0&&Fr(ar,Ht)),ar}return wt},Cr=ue(),vn=function Gt(ke){if(Dr(),rr.current=ke,gr(ke),!lr.current){var Ht=cr(ke),ar=j(Ht);ar.isNaN()||br(ar,!0)}Ct==null||Ct(ke),Cr(function(){var Wr=ke;pe||(Wr=ke.replace(/。/g,".")),Wr!==ke&&Gt(Wr)})},qr=function(){lr.current=!0},Jr=function(){lr.current=!1,vn(mt.current.value)},zr=function(ke){vn(ke.target.value)},en=function(ke){var Ht;if(!(ke&&pr||!ke&&_r)){Xt.current=!1;var ar=j(Jt.current?x(P):P);ke||(ar=ar.negate());var Wr=(wt||j(0)).add(ar.toString()),En=br(Wr,!1);Re==null||Re(Ke(xt,En),{offset:Jt.current?x(P):P,type:ke?"up":"down"}),(Ht=mt.current)===null||Ht===void 0||Ht.focus()}},tn=function(ke){var Ht=j(cr(mr)),ar=Ht;Ht.isNaN()?ar=br(wt,ke):ar=br(Ht,ke),kt!==void 0?Fr(wt,!1):ar.isNaN()||Fr(ar,!1)},rn=function(){Xt.current=!0},_n=function(ke){var Ht=ke.key,ar=ke.shiftKey;Xt.current=!0,Jt.current=ar,Ht==="Enter"&&(lr.current||(Xt.current=!1),tn(!1),Ot==null||Ot(ke)),J!==!1&&!lr.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Ht)&&(en(Ht==="Up"||Ht==="ArrowUp"),ke.preventDefault())},kn=function(){Xt.current=!1,Jt.current=!1},Dn=function(){tn(!1),hr(!1),Xt.current=!1};return(0,de.o)(function(){wt.isInvalidate()||Fr(wt,!1)},[It]),(0,de.o)(function(){var Gt=j(kt);Tt(Gt);var ke=j(cr(mr));(!Gt.equals(ke)||!Xt.current||Lt)&&Fr(Gt,Xt.current)},[kt]),(0,de.o)(function(){Lt&&jr()},[mr]),we.createElement("div",{className:Ie()(et,M==null?void 0:M.input,ft,(Ue={},(0,re.Z)(Ue,"".concat(et,"-focused"),Kt),(0,re.Z)(Ue,"".concat(et,"-disabled"),ge),(0,re.Z)(Ue,"".concat(et,"-readonly"),Pe),(0,re.Z)(Ue,"".concat(et,"-not-a-number"),wt.isNaN()),(0,re.Z)(Ue,"".concat(et,"-out-of-range"),!wt.isInvalidate()&&!Yr(wt)),Ue)),style:_t,onFocus:function(){hr(!0)},onBlur:Dn,onKeyDown:_n,onKeyUp:kn,onCompositionStart:qr,onCompositionEnd:Jr,onBeforeInput:rn},Ce&&we.createElement(b,{prefixCls:et,upNode:Ge,downNode:z,upDisabled:pr,downDisabled:_r,onStep:en}),we.createElement("div",{className:"".concat(dt,"-wrap")},we.createElement("input",(0,fe.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":v,"aria-valuemax":E,"aria-valuenow":wt.isInvalidate()?null:wt.toString(),step:P},ot,{ref:(0,Se.sQ)(mt,De),className:dt,value:mr,onChange:zr,disabled:ge,readOnly:Pe}))))}),ct=we.forwardRef(function(Ae,De){var Ue=Ae.disabled,it=Ae.style,et=Ae.prefixCls,ft=Ae.value,_t=Ae.prefix,v=Ae.suffix,E=Ae.addonBefore,Ye=Ae.addonAfter,P=Ae.classes,oe=Ae.className,kt=Ae.classNames,ge=(0,o.Z)(Ae,Xe),Pe=we.useRef(null),Ge=function(J){Pe.current&&(0,G.nH)(Pe.current,J)};return we.createElement(ae.BaseInput,{inputElement:we.createElement(pt,(0,fe.Z)({prefixCls:et,disabled:Ue,classNames:kt,ref:(0,Se.sQ)(Pe,De)},ge)),className:oe,triggerFocus:Ge,prefixCls:et,value:ft,disabled:Ue,style:it,prefix:_t,suffix:v,addonAfter:Ye,addonBefore:E,classes:P,classNames:kt,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});ct.displayName="InputNumber";var ht=ct,jt=ht,Zt=D(19080),qt=D(36355),Ut=D(92736),zt=D(1684),Bt=D(19716),Oe=D(32441),qe=D(33234),se=D(9937),Ne=D(17313),He=D(74207),N=D(83116),ee=D(37613);const ye=(Ae,De)=>{let{componentCls:Ue,borderRadiusSM:it,borderRadiusLG:et}=Ae;const ft=De==="lg"?et:it;return{[`&-${De}`]:{[`${Ue}-handler-wrap`]:{borderStartEndRadius:ft,borderEndEndRadius:ft},[`${Ue}-handler-up`]:{borderStartEndRadius:ft},[`${Ue}-handler-down`]:{borderEndEndRadius:ft}}}},be=Ae=>{const{componentCls:De,lineWidth:Ue,lineType:it,colorBorder:et,borderRadius:ft,fontSizeLG:_t,controlHeightLG:v,controlHeightSM:E,colorError:Ye,paddingInlineSM:P,colorTextDescription:oe,motionDurationMid:kt,handleHoverColor:ge,paddingInline:Pe,paddingBlock:Ge,handleBg:z,handleActiveBg:J,colorTextDisabled:ce,borderRadiusSM:Ce,borderRadiusLG:M,controlWidth:xt,handleVisible:pe,handleBorderColor:Lt}=Ae;return[{[De]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ne.Wf)(Ae)),(0,se.ik)(Ae)),(0,se.bi)(Ae,De)),{display:"inline-block",width:xt,margin:0,padding:0,border:`${Ue}px ${it} ${et}`,borderRadius:ft,"&-rtl":{direction:"rtl",[`${De}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:_t,borderRadius:M,[`input${De}-input`]:{height:v-2*Ue}},"&-sm":{padding:0,borderRadius:Ce,[`input${De}-input`]:{height:E-2*Ue,padding:`0 ${P}px`}},"&:hover":Object.assign({},(0,se.pU)(Ae)),"&-focused":Object.assign({},(0,se.M1)(Ae)),"&-out-of-range":{[`${De}-input-wrap`]:{input:{color:Ye}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Ne.Wf)(Ae)),(0,se.s7)(Ae)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${De}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${De}-group-addon`]:{borderRadius:M,fontSize:Ae.fontSizeLG}},"&-sm":{[`${De}-group-addon`]:{borderRadius:Ce}},[`${De}-wrapper-disabled > ${De}-group-addon`]:Object.assign({},(0,se.Xy)(Ae))}}),[`&-disabled ${De}-input`]:{cursor:"not-allowed"},[De]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ne.Wf)(Ae)),{width:"100%",padding:`${Ge}px ${Pe}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:ft,outline:0,transition:`all ${kt} linear`,appearance:"textfield",fontSize:"inherit"}),(0,se.nz)(Ae.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[De]:Object.assign(Object.assign(Object.assign({[`&:hover ${De}-handler-wrap, &-focused ${De}-handler-wrap`]:{opacity:1},[`${De}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:Ae.handleWidth,height:"100%",background:z,borderStartStartRadius:0,borderStartEndRadius:ft,borderEndEndRadius:ft,borderEndStartRadius:0,opacity:pe===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${kt} linear ${kt}`,[`${De}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${De}-handler-up-inner,
|
|
|
${De}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:Ae.handleFontSize}}},[`${De}-handler`]:{height:"50%",overflow:"hidden",color:oe,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${Ue}px ${it} ${Lt}`,transition:`all ${kt} linear`,"&:active":{background:J},"&:hover":{height:"60%",[`
|
|
|
${De}-handler-up-inner,
|
|
|
${De}-handler-down-inner
|
|
|
`]:{color:ge}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Ne.Ro)()),{color:oe,transition:`all ${kt} linear`,userSelect:"none"})},[`${De}-handler-up`]:{borderStartEndRadius:ft},[`${De}-handler-down`]:{borderBlockStart:`${Ue}px ${it} ${Lt}`,borderEndEndRadius:ft}},ye(Ae,"lg")),ye(Ae,"sm")),{"&-disabled, &-readonly":{[`${De}-handler-wrap`]:{display:"none"},[`${De}-input`]:{color:"inherit"}},[`
|
|
|
${De}-handler-up-disabled,
|
|
|
${De}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${De}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${De}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:ce}})},{[`${De}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${De}-handler-down`]:{borderBlockStartWidth:0}}}]},Le=Ae=>{const{componentCls:De,paddingBlock:Ue,paddingInline:it,inputAffixPadding:et,controlWidth:ft,borderRadiusLG:_t,borderRadiusSM:v}=Ae;return{[`${De}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,se.ik)(Ae)),(0,se.bi)(Ae,`${De}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:ft,padding:0,paddingInlineStart:it,"&-lg":{borderRadius:_t},"&-sm":{borderRadius:v},[`&:not(${De}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,se.pU)(Ae)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${De}-disabled`]:{background:"transparent"},[`> div${De}`]:{width:"100%",border:"none",outline:"none",[`&${De}-focused`]:{boxShadow:"none !important"}},[`input${De}-input`]:{padding:`${Ue}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${De}-handler-wrap`]:{zIndex:2},[De]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:et},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:it,marginInlineStart:et}}})}};var Be=(0,N.Z)("InputNumber",Ae=>{const De=(0,ee.TS)(Ae,(0,se.e5)(Ae));return[be(De),Le(De),(0,He.c)(De)]},Ae=>Object.assign(Object.assign({},(0,se.TM)(Ae)),{controlWidth:90,handleWidth:Ae.controlHeightSM-Ae.lineWidth*2,handleFontSize:Ae.fontSize/2,handleVisible:"auto",handleActiveBg:Ae.colorFillAlter,handleBg:Ae.colorBgContainer,handleHoverColor:Ae.colorPrimary,handleBorderColor:Ae.colorBorder})),Ve=function(Ae,De){var Ue={};for(var it in Ae)Object.prototype.hasOwnProperty.call(Ae,it)&&De.indexOf(it)<0&&(Ue[it]=Ae[it]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,it=Object.getOwnPropertySymbols(Ae);et<it.length;et++)De.indexOf(it[et])<0&&Object.prototype.propertyIsEnumerable.call(Ae,it[et])&&(Ue[it[et]]=Ae[it[et]]);return Ue};const nt=we.forwardRef((Ae,De)=>{const{getPrefixCls:Ue,direction:it}=we.useContext(qt.E_),et=we.useRef(null);we.useImperativeHandle(De,()=>et.current);const{className:ft,rootClassName:_t,size:v,disabled:E,prefixCls:Ye,addonBefore:P,addonAfter:oe,prefix:kt,bordered:ge=!0,readOnly:Pe,status:Ge,controls:z}=Ae,J=Ve(Ae,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),ce=Ue("input-number",Ye),[Ce,M]=Be(ce),{compactSize:xt,compactItemClassnames:pe}=(0,qe.ri)(ce,it);let Lt=we.createElement(_e.Z,{className:`${ce}-handler-up-inner`}),It=we.createElement(R.Z,{className:`${ce}-handler-down-inner`});const Wt=typeof z=="boolean"?z:void 0;typeof z=="object"&&(Lt=typeof z.upIcon=="undefined"?Lt:we.createElement("span",{className:`${ce}-handler-up-inner`},z.upIcon),It=typeof z.downIcon=="undefined"?It:we.createElement("span",{className:`${ce}-handler-down-inner`},z.downIcon));const{hasFeedback:ur,status:Ct,isFormItemInput:Ot,feedbackIcon:Re}=we.useContext(Oe.aM),ot=(0,Zt.F)(Ct,Ge),dt=(0,Bt.Z)(Xt=>{var lr;return(lr=v!=null?v:xt)!==null&&lr!==void 0?lr:Xt}),mt=we.useContext(zt.Z),ut=E!=null?E:mt,Et=Ie()({[`${ce}-lg`]:dt==="large",[`${ce}-sm`]:dt==="small",[`${ce}-rtl`]:it==="rtl",[`${ce}-borderless`]:!ge,[`${ce}-in-form-item`]:Ot},(0,Zt.Z)(ce,ot),pe,M),Kt=`${ce}-group`,hr=we.createElement(jt,Object.assign({ref:et,disabled:ut,className:Ie()(ft,_t),upHandler:Lt,downHandler:It,prefixCls:ce,readOnly:Pe,controls:Wt,prefix:kt,suffix:ur&&Re,addonAfter:oe&&we.createElement(qe.BR,null,we.createElement(Oe.Ux,{override:!0,status:!0},oe)),addonBefore:P&&we.createElement(qe.BR,null,we.createElement(Oe.Ux,{override:!0,status:!0},P)),classNames:{input:Et},classes:{affixWrapper:Ie()((0,Zt.Z)(`${ce}-affix-wrapper`,ot,ur),{[`${ce}-affix-wrapper-sm`]:dt==="small",[`${ce}-affix-wrapper-lg`]:dt==="large",[`${ce}-affix-wrapper-rtl`]:it==="rtl",[`${ce}-affix-wrapper-borderless`]:!ge},M),wrapper:Ie()({[`${Kt}-rtl`]:it==="rtl",[`${ce}-wrapper-disabled`]:ut},M),group:Ie()({[`${ce}-group-wrapper-sm`]:dt==="small",[`${ce}-group-wrapper-lg`]:dt==="large",[`${ce}-group-wrapper-rtl`]:it==="rtl"},(0,Zt.Z)(`${ce}-group-wrapper`,ot,ur),M)}},J));return Ce(hr)}),Qe=nt,je=Ae=>we.createElement(Ut.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},we.createElement(nt,Object.assign({},Ae)));Qe._InternalPanelDoNotUseOrYouWillBeFired=je;var bt=Qe},9432:function($t,st,D){"use strict";D.d(st,{Z:function(){return I},n:function(){return K}});var R=D(19248),_e=D(92310),me=D.n(_e),Ie=D(93681),fe=D(8654),re=D(59301),ve=D(19080),Ee=D(36355),o=D(1684),$=D(19716),F=D(32441),w=D(33234),f=D(59412),_=D(9937);function y(H){return!!(H.prefix||H.suffix||H.allowClear)}var U=function(H,te){var S={};for(var j in H)Object.prototype.hasOwnProperty.call(H,j)&&te.indexOf(j)<0&&(S[j]=H[j]);if(H!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,j=Object.getOwnPropertySymbols(H);ae<j.length;ae++)te.indexOf(j[ae])<0&&Object.prototype.propertyIsEnumerable.call(H,j[ae])&&(S[j[ae]]=H[j[ae]]);return S};function K(H,te){if(!H)return;H.focus(te);const{cursor:S}=te||{};if(S){const j=H.value.length;switch(S){case"start":H.setSelectionRange(0,0);break;case"end":H.setSelectionRange(j,j);break;default:H.setSelectionRange(0,j);break}}}var I=(0,re.forwardRef)((H,te)=>{var S;const{prefixCls:j,bordered:ae=!0,status:de,size:Se,disabled:we,onBlur:Me,onFocus:$e,suffix:Y,allowClear:B,addonAfter:Z,addonBefore:X,className:le,style:q,styles:b,rootClassName:x,onChange:G,classNames:ue}=H,ze=U(H,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Xe,direction:Ke,input:Ze}=re.useContext(Ee.E_),pt=Xe("input",j),ct=(0,re.useRef)(null),[ht,jt]=(0,_.ZP)(pt),{compactSize:Zt,compactItemClassnames:qt}=(0,w.ri)(pt,Ke),Ut=(0,$.Z)(nt=>{var Qe;return(Qe=Se!=null?Se:Zt)!==null&&Qe!==void 0?Qe:nt}),zt=re.useContext(o.Z),Bt=we!=null?we:zt,{status:Oe,hasFeedback:qe,feedbackIcon:se}=(0,re.useContext)(F.aM),Ne=(0,ve.F)(Oe,de),He=y(H)||!!qe,N=(0,re.useRef)(He);(0,re.useEffect)(()=>{var nt;He&&N.current,N.current=He},[He]);const ee=(0,f.Z)(ct,!0),ye=nt=>{ee(),Me==null||Me(nt)},be=nt=>{ee(),$e==null||$e(nt)},Le=nt=>{ee(),G==null||G(nt)},Be=(qe||Y)&&re.createElement(re.Fragment,null,Y,qe&&se);let Ve;return typeof B=="object"&&(B!=null&&B.clearIcon)?Ve=B:B&&(Ve={clearIcon:re.createElement(R.Z,null)}),ht(re.createElement(Ie.default,Object.assign({ref:(0,fe.sQ)(te,ct),prefixCls:pt,autoComplete:Ze==null?void 0:Ze.autoComplete},ze,{disabled:Bt,onBlur:ye,onFocus:be,style:Object.assign(Object.assign({},Ze==null?void 0:Ze.style),q),styles:Object.assign(Object.assign({},Ze==null?void 0:Ze.styles),b),suffix:Be,allowClear:Ve,className:me()(le,x,qt,Ze==null?void 0:Ze.className),onChange:Le,addonAfter:Z&&re.createElement(w.BR,null,re.createElement(F.Ux,{override:!0,status:!0},Z)),addonBefore:X&&re.createElement(w.BR,null,re.createElement(F.Ux,{override:!0,status:!0},X)),classNames:Object.assign(Object.assign(Object.assign({},ue),Ze==null?void 0:Ze.classNames),{input:me()({[`${pt}-sm`]:Ut==="small",[`${pt}-lg`]:Ut==="large",[`${pt}-rtl`]:Ke==="rtl",[`${pt}-borderless`]:!ae},!He&&(0,ve.Z)(pt,Ne),ue==null?void 0:ue.input,(S=Ze==null?void 0:Ze.classNames)===null||S===void 0?void 0:S.input,jt)}),classes:{affixWrapper:me()({[`${pt}-affix-wrapper-sm`]:Ut==="small",[`${pt}-affix-wrapper-lg`]:Ut==="large",[`${pt}-affix-wrapper-rtl`]:Ke==="rtl",[`${pt}-affix-wrapper-borderless`]:!ae},(0,ve.Z)(`${pt}-affix-wrapper`,Ne,qe),jt),wrapper:me()({[`${pt}-group-rtl`]:Ke==="rtl"},jt),group:me()({[`${pt}-group-wrapper-sm`]:Ut==="small",[`${pt}-group-wrapper-lg`]:Ut==="large",[`${pt}-group-wrapper-rtl`]:Ke==="rtl",[`${pt}-group-wrapper-disabled`]:Bt},(0,ve.Z)(`${pt}-group-wrapper`,Ne,qe),jt)}})))})},1643:function($t,st,D){"use strict";var R=D(19248),_e=D(92310),me=D.n(_e),Ie=D(9296),fe=D(59301),re=D(19080),ve=D(36355),Ee=D(1684),o=D(19716),$=D(32441),F=D(9432),w=D(9937),f=function(y,U){var K={};for(var O in y)Object.prototype.hasOwnProperty.call(y,O)&&U.indexOf(O)<0&&(K[O]=y[O]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,O=Object.getOwnPropertySymbols(y);I<O.length;I++)U.indexOf(O[I])<0&&Object.prototype.propertyIsEnumerable.call(y,O[I])&&(K[O[I]]=y[O[I]]);return K};const _=(0,fe.forwardRef)((y,U)=>{const{prefixCls:K,bordered:O=!0,size:I,disabled:H,status:te,allowClear:S,showCount:j,classNames:ae,rootClassName:de,className:Se}=y,we=f(y,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Me,direction:$e}=fe.useContext(ve.E_),Y=(0,o.Z)(I),B=fe.useContext(Ee.Z),Z=H!=null?H:B,{status:X,hasFeedback:le,feedbackIcon:q}=fe.useContext($.aM),b=(0,re.F)(X,te),x=fe.useRef(null);fe.useImperativeHandle(U,()=>{var Ke;return{resizableTextArea:(Ke=x.current)===null||Ke===void 0?void 0:Ke.resizableTextArea,focus:Ze=>{var pt,ct;(0,F.n)((ct=(pt=x.current)===null||pt===void 0?void 0:pt.resizableTextArea)===null||ct===void 0?void 0:ct.textArea,Ze)},blur:()=>{var Ze;return(Ze=x.current)===null||Ze===void 0?void 0:Ze.blur()}}});const G=Me("input",K);let ue;typeof S=="object"&&(S!=null&&S.clearIcon)?ue=S:S&&(ue={clearIcon:fe.createElement(R.Z,null)});const[ze,Xe]=(0,w.ZP)(G);return ze(fe.createElement(Ie.default,Object.assign({},we,{disabled:Z,allowClear:ue,className:me()(Se,de),classes:{affixWrapper:me()(`${G}-textarea-affix-wrapper`,{[`${G}-affix-wrapper-rtl`]:$e==="rtl",[`${G}-affix-wrapper-borderless`]:!O,[`${G}-affix-wrapper-sm`]:Y==="small",[`${G}-affix-wrapper-lg`]:Y==="large",[`${G}-textarea-show-count`]:j},(0,re.Z)(`${G}-affix-wrapper`,b),Xe)},classNames:Object.assign(Object.assign({},ae),{textarea:me()({[`${G}-borderless`]:!O,[`${G}-sm`]:Y==="small",[`${G}-lg`]:Y==="large"},(0,re.Z)(G,b),Xe,ae==null?void 0:ae.textarea)}),prefixCls:G,suffix:le&&fe.createElement("span",{className:`${G}-textarea-suffix`},q),showCount:j,ref:x})))});st.Z=_},59412:function($t,st,D){"use strict";D.d(st,{Z:function(){return _e}});var R=D(59301);function _e(me,Ie){const fe=(0,R.useRef)([]),re=()=>{fe.current.push(setTimeout(()=>{var ve,Ee,o,$;!((ve=me.current)===null||ve===void 0)&&ve.input&&((Ee=me.current)===null||Ee===void 0?void 0:Ee.input.getAttribute("type"))==="password"&&(!((o=me.current)===null||o===void 0)&&o.input.hasAttribute("value"))&&(($=me.current)===null||$===void 0||$.input.removeAttribute("value"))}))};return(0,R.useEffect)(()=>(Ie&&re(),()=>fe.current.forEach(ve=>{ve&&clearTimeout(ve)})),[]),re}},92832:function($t,st,D){"use strict";D.d(st,{default:function(){return Y}});var R=D(92310),_e=D.n(R),me=D(59301),Ie=D(36355),fe=D(32441),re=D(9937),Ee=B=>{const{getPrefixCls:Z,direction:X}=(0,me.useContext)(Ie.E_),{prefixCls:le,className:q}=B,b=Z("input-group",le),x=Z("input"),[G,ue]=(0,re.ZP)(x),ze=_e()(b,{[`${b}-lg`]:B.size==="large",[`${b}-sm`]:B.size==="small",[`${b}-compact`]:B.compact,[`${b}-rtl`]:X==="rtl"},ue,q),Xe=(0,me.useContext)(fe.aM),Ke=(0,me.useMemo)(()=>Object.assign(Object.assign({},Xe),{isFormItemInput:!1}),[Xe]);return G(me.createElement("span",{className:ze,style:B.style,onMouseEnter:B.onMouseEnter,onMouseLeave:B.onMouseLeave,onFocus:B.onFocus,onBlur:B.onBlur},me.createElement(fe.aM.Provider,{value:Ke},B.children)))},o=D(9432),$=D(73331),F=D(15277),w=D(2738),f=D(8654),_=D(59412),y=function(B,Z){var X={};for(var le in B)Object.prototype.hasOwnProperty.call(B,le)&&Z.indexOf(le)<0&&(X[le]=B[le]);if(B!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,le=Object.getOwnPropertySymbols(B);q<le.length;q++)Z.indexOf(le[q])<0&&Object.prototype.propertyIsEnumerable.call(B,le[q])&&(X[le[q]]=B[le[q]]);return X};const U=B=>B?me.createElement(F.Z,null):me.createElement($.Z,null),K={click:"onClick",hover:"onMouseOver"};var I=me.forwardRef((B,Z)=>{const{visibilityToggle:X=!0}=B,le=typeof X=="object"&&X.visible!==void 0,[q,b]=(0,me.useState)(()=>le?X.visible:!1),x=(0,me.useRef)(null);me.useEffect(()=>{le&&b(X.visible)},[le,X]);const G=(0,_.Z)(x),ue=()=>{const{disabled:Bt}=B;Bt||(q&&G(),b(Oe=>{var qe;const se=!Oe;return typeof X=="object"&&((qe=X.onVisibleChange)===null||qe===void 0||qe.call(X,se)),se}))},ze=Bt=>{const{action:Oe="click",iconRender:qe=U}=B,se=K[Oe]||"",Ne=qe(q),He={[se]:ue,className:`${Bt}-icon`,key:"passwordIcon",onMouseDown:N=>{N.preventDefault()},onMouseUp:N=>{N.preventDefault()}};return me.cloneElement(me.isValidElement(Ne)?Ne:me.createElement("span",null,Ne),He)},{className:Xe,prefixCls:Ke,inputPrefixCls:Ze,size:pt}=B,ct=y(B,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:ht}=me.useContext(Ie.E_),jt=ht("input",Ze),Zt=ht("input-password",Ke),qt=X&&ze(Zt),Ut=_e()(Zt,Xe,{[`${Zt}-${pt}`]:!!pt}),zt=Object.assign(Object.assign({},(0,w.Z)(ct,["suffix","iconRender","visibilityToggle"])),{type:q?"text":"password",className:Ut,prefixCls:jt,suffix:qt});return pt&&(zt.size=pt),me.createElement(o.Z,Object.assign({ref:(0,f.sQ)(Z,x)},zt))}),H=D(47472),te=D(92343),S=D(3113),j=D(19716),ae=D(33234),de=function(B,Z){var X={};for(var le in B)Object.prototype.hasOwnProperty.call(B,le)&&Z.indexOf(le)<0&&(X[le]=B[le]);if(B!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,le=Object.getOwnPropertySymbols(B);q<le.length;q++)Z.indexOf(le[q])<0&&Object.prototype.propertyIsEnumerable.call(B,le[q])&&(X[le[q]]=B[le[q]]);return X},we=me.forwardRef((B,Z)=>{const{prefixCls:X,inputPrefixCls:le,className:q,size:b,suffix:x,enterButton:G=!1,addonAfter:ue,loading:ze,disabled:Xe,onSearch:Ke,onChange:Ze,onCompositionStart:pt,onCompositionEnd:ct}=B,ht=de(B,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:jt,direction:Zt}=me.useContext(Ie.E_),qt=me.useRef(!1),Ut=jt("input-search",X),zt=jt("input",le),{compactSize:Bt}=(0,ae.ri)(Ut,Zt),Oe=(0,j.Z)(je=>{var bt;return(bt=b!=null?b:Bt)!==null&&bt!==void 0?bt:je}),qe=me.useRef(null),se=je=>{je&&je.target&&je.type==="click"&&Ke&&Ke(je.target.value,je,{source:"clear"}),Ze&&Ze(je)},Ne=je=>{var bt;document.activeElement===((bt=qe.current)===null||bt===void 0?void 0:bt.input)&&je.preventDefault()},He=je=>{var bt,Ae;Ke&&Ke((Ae=(bt=qe.current)===null||bt===void 0?void 0:bt.input)===null||Ae===void 0?void 0:Ae.value,je,{source:"input"})},N=je=>{qt.current||ze||He(je)},ee=typeof G=="boolean"?me.createElement(H.Z,null):null,ye=`${Ut}-button`;let be;const Le=G||{},Be=Le.type&&Le.type.__ANT_BUTTON===!0;Be||Le.type==="button"?be=(0,te.Tm)(Le,Object.assign({onMouseDown:Ne,onClick:je=>{var bt,Ae;(Ae=(bt=Le==null?void 0:Le.props)===null||bt===void 0?void 0:bt.onClick)===null||Ae===void 0||Ae.call(bt,je),He(je)},key:"enterButton"},Be?{className:ye,size:Oe}:{})):be=me.createElement(S.ZP,{className:ye,type:G?"primary":void 0,size:Oe,disabled:Xe,key:"enterButton",onMouseDown:Ne,onClick:He,loading:ze,icon:ee},G),ue&&(be=[be,(0,te.Tm)(ue,{key:"addonAfter"})]);const Ve=_e()(Ut,{[`${Ut}-rtl`]:Zt==="rtl",[`${Ut}-${Oe}`]:!!Oe,[`${Ut}-with-button`]:!!G},q),nt=je=>{qt.current=!0,pt==null||pt(je)},Qe=je=>{qt.current=!1,ct==null||ct(je)};return me.createElement(o.Z,Object.assign({ref:(0,f.sQ)(qe,Z),onPressEnter:N},ht,{size:Oe,onCompositionStart:nt,onCompositionEnd:Qe,prefixCls:zt,addonAfter:be,suffix:x,onChange:se,className:Ve,disabled:Xe}))}),Me=D(1643);const $e=o.Z;$e.Group=Ee,$e.Search=we,$e.TextArea=Me.Z,$e.Password=I;var Y=$e},9937:function($t,st,D){"use strict";D.d(st,{M1:function(){return ve},TM:function(){return te},Xy:function(){return Ee},bi:function(){return F},e5:function(){return H},ik:function(){return w},nz:function(){return fe},pU:function(){return re},s7:function(){return f},x0:function(){return $}});var R=D(17313),_e=D(74207),me=D(37613),Ie=D(83116);const fe=S=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:S,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),re=S=>({borderColor:S.hoverBorderColor}),ve=S=>({borderColor:S.activeBorderColor,boxShadow:S.activeShadow,outline:0}),Ee=S=>({color:S.colorTextDisabled,backgroundColor:S.colorBgContainerDisabled,borderColor:S.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},re((0,me.TS)(S,{hoverBorderColor:S.colorBorder})))}),o=S=>{const{paddingBlockLG:j,fontSizeLG:ae,lineHeightLG:de,borderRadiusLG:Se,paddingInlineLG:we}=S;return{padding:`${j}px ${we}px`,fontSize:ae,lineHeight:de,borderRadius:Se}},$=S=>({padding:`${S.paddingBlockSM}px ${S.paddingInlineSM}px`,borderRadius:S.borderRadiusSM}),F=(S,j)=>{const{componentCls:ae,colorError:de,colorWarning:Se,errorActiveShadow:we,warningActiveShadow:Me,colorErrorBorderHover:$e,colorWarningBorderHover:Y}=S;return{[`&-status-error:not(${j}-disabled):not(${j}-borderless)${j}`]:{borderColor:de,"&:hover":{borderColor:$e},"&:focus, &-focused":Object.assign({},ve((0,me.TS)(S,{activeBorderColor:de,activeShadow:we}))),[`${ae}-prefix, ${ae}-suffix`]:{color:de}},[`&-status-warning:not(${j}-disabled):not(${j}-borderless)${j}`]:{borderColor:Se,"&:hover":{borderColor:Y},"&:focus, &-focused":Object.assign({},ve((0,me.TS)(S,{activeBorderColor:Se,activeShadow:Me}))),[`${ae}-prefix, ${ae}-suffix`]:{color:Se}}}},w=S=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${S.paddingBlock}px ${S.paddingInline}px`,color:S.colorText,fontSize:S.fontSize,lineHeight:S.lineHeight,backgroundColor:S.colorBgContainer,backgroundImage:"none",borderWidth:S.lineWidth,borderStyle:S.lineType,borderColor:S.colorBorder,borderRadius:S.borderRadius,transition:`all ${S.motionDurationMid}`},fe(S.colorTextPlaceholder)),{"&:hover":Object.assign({},re(S)),"&:focus, &-focused":Object.assign({},ve(S)),"&-disabled, &[disabled]":Object.assign({},Ee(S)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:S.controlHeight,lineHeight:S.lineHeight,verticalAlign:"bottom",transition:`all ${S.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},o(S)),"&-sm":Object.assign({},$(S)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),f=S=>{const{componentCls:j,antCls:ae}=S;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:S.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${j}, &-lg > ${j}-group-addon`]:Object.assign({},o(S)),[`&-sm ${j}, &-sm > ${j}-group-addon`]:Object.assign({},$(S)),[`&-lg ${ae}-select-single ${ae}-select-selector`]:{height:S.controlHeightLG},[`&-sm ${ae}-select-single ${ae}-select-selector`]:{height:S.controlHeightSM},[`> ${j}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${j}-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 ${S.paddingInline}px`,color:S.colorText,fontWeight:"normal",fontSize:S.fontSize,textAlign:"center",backgroundColor:S.colorFillAlter,border:`${S.lineWidth}px ${S.lineType} ${S.colorBorder}`,borderRadius:S.borderRadius,transition:`all ${S.motionDurationSlow}`,lineHeight:1,[`${ae}-select`]:{margin:`-${S.paddingBlock+1}px -${S.paddingInline}px`,[`&${ae}-select-single:not(${ae}-select-customize-input)`]:{[`${ae}-select-selector`]:{backgroundColor:"inherit",border:`${S.lineWidth}px ${S.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${ae}-select-selector`]:{color:S.colorPrimary}}},[`${ae}-cascader-picker`]:{margin:`-9px -${S.paddingInline}px`,backgroundColor:"transparent",[`${ae}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${j}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${j}-search-with-button &`]:{zIndex:0}}},[`> ${j}:first-child, ${j}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${ae}-select ${ae}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${j}-affix-wrapper`]:{[`&:not(:first-child) ${j}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${j}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${j}:last-child, ${j}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${ae}-select ${ae}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${j}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${j}-search &`]:{borderStartStartRadius:S.borderRadius,borderEndStartRadius:S.borderRadius}},[`&:not(:first-child), ${j}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${j}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,R.dF)()),{[`${j}-group-addon, ${j}-group-wrap, > ${j}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:S.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${j}-affix-wrapper,
|
|
|
& > ${j}-number-affix-wrapper,
|
|
|
& > ${ae}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-S.lineWidth,borderInlineEndWidth:S.lineWidth},[`${j}`]:{float:"none"},[`& > ${ae}-select > ${ae}-select-selector,
|
|
|
& > ${ae}-select-auto-complete ${j},
|
|
|
& > ${ae}-cascader-picker ${j},
|
|
|
& > ${j}-group-wrapper ${j}`]:{borderInlineEndWidth:S.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${ae}-select-focused`]:{zIndex:1},[`& > ${ae}-select > ${ae}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${ae}-select:first-child > ${ae}-select-selector,
|
|
|
& > ${ae}-select-auto-complete:first-child ${j},
|
|
|
& > ${ae}-cascader-picker:first-child ${j}`]:{borderStartStartRadius:S.borderRadius,borderEndStartRadius:S.borderRadius},[`& > *:last-child,
|
|
|
& > ${ae}-select:last-child > ${ae}-select-selector,
|
|
|
& > ${ae}-cascader-picker:last-child ${j},
|
|
|
& > ${ae}-cascader-picker-focused:last-child ${j}`]:{borderInlineEndWidth:S.lineWidth,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius},[`& > ${ae}-select-auto-complete ${j}`]:{verticalAlign:"top"},[`${j}-group-wrapper + ${j}-group-wrapper`]:{marginInlineStart:-S.lineWidth,[`${j}-affix-wrapper`]:{borderRadius:0}},[`${j}-group-wrapper:not(:last-child)`]:{[`&${j}-search > ${j}-group`]:{[`& > ${j}-group-addon > ${j}-search-button`]:{borderRadius:0},[`& > ${j}`]:{borderStartStartRadius:S.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:S.borderRadius}}}})}},_=S=>{const{componentCls:j,controlHeightSM:ae,lineWidth:de}=S,we=(ae-de*2-16)/2;return{[j]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,R.Wf)(S)),w(S)),F(S,j)),{'&[type="color"]':{height:S.controlHeight,[`&${j}-lg`]:{height:S.controlHeightLG},[`&${j}-sm`]:{height:ae,paddingTop:we,paddingBottom:we}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},y=S=>{const{componentCls:j}=S;return{[`${j}-clear-icon`]:{margin:0,color:S.colorTextQuaternary,fontSize:S.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${S.motionDurationSlow}`,"&:hover":{color:S.colorTextTertiary},"&:active":{color:S.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${S.inputAffixPadding}px`}}}},U=S=>{const{componentCls:j,inputAffixPadding:ae,colorTextDescription:de,motionDurationSlow:Se,colorIcon:we,colorIconHover:Me,iconCls:$e}=S;return{[`${j}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},w(S)),{display:"inline-flex",[`&:not(${j}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},re(S)),{zIndex:1,[`${j}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${j}[disabled]`]:{background:"transparent"}},[`> input${j}`]:{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"'},[`${j}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:S.paddingXS}},"&-show-count-suffix":{color:de},"&-show-count-has-suffix":{marginInlineEnd:S.paddingXXS},"&-prefix":{marginInlineEnd:ae},"&-suffix":{marginInlineStart:ae}}}),y(S)),{[`${$e}${j}-password-icon`]:{color:we,cursor:"pointer",transition:`all ${Se}`,"&:hover":{color:Me}}}),F(S,`${j}-affix-wrapper`))}},K=S=>{const{componentCls:j,colorError:ae,colorWarning:de,borderRadiusLG:Se,borderRadiusSM:we}=S;return{[`${j}-group`]:Object.assign(Object.assign(Object.assign({},(0,R.Wf)(S)),f(S)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${j}-group-addon`]:{borderRadius:Se,fontSize:S.fontSizeLG}},"&-sm":{[`${j}-group-addon`]:{borderRadius:we}},"&-status-error":{[`${j}-group-addon`]:{color:ae,borderColor:ae}},"&-status-warning":{[`${j}-group-addon`]:{color:de,borderColor:de}},"&-disabled":{[`${j}-group-addon`]:Object.assign({},Ee(S))},[`&:not(${j}-compact-first-item):not(${j}-compact-last-item)${j}-compact-item`]:{[`${j}, ${j}-group-addon`]:{borderRadius:0}},[`&:not(${j}-compact-last-item)${j}-compact-first-item`]:{[`${j}, ${j}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${j}-compact-first-item)${j}-compact-last-item`]:{[`${j}, ${j}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},O=S=>{const{componentCls:j,antCls:ae}=S,de=`${j}-search`;return{[de]:{[`${j}`]:{"&:hover, &:focus":{borderColor:S.colorPrimaryHover,[`+ ${j}-group-addon ${de}-button:not(${ae}-btn-primary)`]:{borderInlineStartColor:S.colorPrimaryHover}}},[`${j}-affix-wrapper`]:{borderRadius:0},[`${j}-lg`]:{lineHeight:S.lineHeightLG-2e-4},[`> ${j}-group`]:{[`> ${j}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${de}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${de}-button:not(${ae}-btn-primary)`]:{color:S.colorTextDescription,"&:hover":{color:S.colorPrimaryHover},"&:active":{color:S.colorPrimaryActive},[`&${ae}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${de}-button`]:{height:S.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${de}-button`]:{height:S.controlHeightLG},[`&-small ${de}-button`]:{height:S.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${j}-compact-item`]:{[`&:not(${j}-compact-last-item)`]:{[`${j}-group-addon`]:{[`${j}-search-button`]:{marginInlineEnd:-S.lineWidth,borderRadius:0}}},[`&:not(${j}-compact-first-item)`]:{[`${j},${j}-affix-wrapper`]:{borderRadius:0}},[`> ${j}-group-addon ${j}-search-button,
|
|
|
> ${j},
|
|
|
${j}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${j}-affix-wrapper-focused`]:{zIndex:2}}}}},I=S=>{const{componentCls:j,paddingLG:ae}=S,de=`${j}-textarea`;return{[de]:{position:"relative","&-show-count":{[`> ${j}`]:{height:"100%"},[`${j}-data-count`]:{position:"absolute",bottom:-S.fontSize*S.lineHeight,insetInlineEnd:0,color:S.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${j}`]:{paddingInlineEnd:ae}},[`&-affix-wrapper${de}-has-feedback`]:{[`${j}`]:{paddingInlineEnd:ae}},[`&-affix-wrapper${j}-affix-wrapper`]:{padding:0,[`> textarea${j}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${j}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${j}-clear-icon`]:{position:"absolute",insetInlineEnd:S.paddingXS,insetBlockStart:S.paddingXS},[`${de}-suffix`]:{position:"absolute",top:0,insetInlineEnd:S.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function H(S){return(0,me.TS)(S,{inputAffixPadding:S.paddingXXS})}const te=S=>{const{controlHeight:j,fontSize:ae,lineHeight:de,lineWidth:Se,controlHeightSM:we,controlHeightLG:Me,fontSizeLG:$e,lineHeightLG:Y,paddingSM:B,controlPaddingHorizontalSM:Z,controlPaddingHorizontal:X,colorFillAlter:le,colorPrimaryHover:q,controlOutlineWidth:b,controlOutline:x,colorErrorOutline:G,colorWarningOutline:ue}=S;return{paddingBlock:Math.max(Math.round((j-ae*de)/2*10)/10-Se,3),paddingBlockSM:Math.max(Math.round((we-ae*de)/2*10)/10-Se,0),paddingBlockLG:Math.ceil((Me-$e*Y)/2*10)/10-Se,paddingInline:B-Se,paddingInlineSM:Z-Se,paddingInlineLG:X-Se,addonBg:le,activeBorderColor:q,hoverBorderColor:q,activeShadow:`0 0 0 ${b}px ${x}`,errorActiveShadow:`0 0 0 ${b}px ${G}`,warningActiveShadow:`0 0 0 ${b}px ${ue}`}};st.ZP=(0,Ie.Z)("Input",S=>{const j=(0,me.TS)(S,H(S));return[_(j),I(j),U(j),K(j),O(j),(0,_e.c)(j)]},te)},61621:function($t,st,D){"use strict";D.d(st,{Z:function(){return qe}});var R=D(92310),_e=D.n(R),me=D(59301),Ie=D(36355),fe=D(2738),ve=se=>{const{prefixCls:Ne,className:He,style:N,size:ee,shape:ye}=se,be=_e()({[`${Ne}-lg`]:ee==="large",[`${Ne}-sm`]:ee==="small"}),Le=_e()({[`${Ne}-circle`]:ye==="circle",[`${Ne}-square`]:ye==="square",[`${Ne}-round`]:ye==="round"}),Be=me.useMemo(()=>typeof ee=="number"?{width:ee,height:ee,lineHeight:`${ee}px`}:{},[ee]);return me.createElement("span",{className:_e()(Ne,be,Le,He),style:Object.assign(Object.assign({},Be),N)})},Ee=D(93083),o=D(83116),$=D(37613);const F=new Ee.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),w=se=>({height:se,lineHeight:`${se}px`}),f=se=>Object.assign({width:se},w(se)),_=se=>({background:se.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:F,animationDuration:se.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),y=se=>Object.assign({width:se*5,minWidth:se*5},w(se)),U=se=>{const{skeletonAvatarCls:Ne,gradientFromColor:He,controlHeight:N,controlHeightLG:ee,controlHeightSM:ye}=se;return{[`${Ne}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:He},f(N)),[`${Ne}${Ne}-circle`]:{borderRadius:"50%"},[`${Ne}${Ne}-lg`]:Object.assign({},f(ee)),[`${Ne}${Ne}-sm`]:Object.assign({},f(ye))}},K=se=>{const{controlHeight:Ne,borderRadiusSM:He,skeletonInputCls:N,controlHeightLG:ee,controlHeightSM:ye,gradientFromColor:be}=se;return{[`${N}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:be,borderRadius:He},y(Ne)),[`${N}-lg`]:Object.assign({},y(ee)),[`${N}-sm`]:Object.assign({},y(ye))}},O=se=>Object.assign({width:se},w(se)),I=se=>{const{skeletonImageCls:Ne,imageSizeBase:He,gradientFromColor:N,borderRadiusSM:ee}=se;return{[`${Ne}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:N,borderRadius:ee},O(He*2)),{[`${Ne}-path`]:{fill:"#bfbfbf"},[`${Ne}-svg`]:Object.assign(Object.assign({},O(He)),{maxWidth:He*4,maxHeight:He*4}),[`${Ne}-svg${Ne}-svg-circle`]:{borderRadius:"50%"}}),[`${Ne}${Ne}-circle`]:{borderRadius:"50%"}}},H=(se,Ne,He)=>{const{skeletonButtonCls:N}=se;return{[`${He}${N}-circle`]:{width:Ne,minWidth:Ne,borderRadius:"50%"},[`${He}${N}-round`]:{borderRadius:Ne}}},te=se=>Object.assign({width:se*2,minWidth:se*2},w(se)),S=se=>{const{borderRadiusSM:Ne,skeletonButtonCls:He,controlHeight:N,controlHeightLG:ee,controlHeightSM:ye,gradientFromColor:be}=se;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${He}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:be,borderRadius:Ne,width:N*2,minWidth:N*2},te(N))},H(se,N,He)),{[`${He}-lg`]:Object.assign({},te(ee))}),H(se,ee,`${He}-lg`)),{[`${He}-sm`]:Object.assign({},te(ye))}),H(se,ye,`${He}-sm`))},j=se=>{const{componentCls:Ne,skeletonAvatarCls:He,skeletonTitleCls:N,skeletonParagraphCls:ee,skeletonButtonCls:ye,skeletonInputCls:be,skeletonImageCls:Le,controlHeight:Be,controlHeightLG:Ve,controlHeightSM:nt,gradientFromColor:Qe,padding:je,marginSM:bt,borderRadius:Ae,titleHeight:De,blockRadius:Ue,paragraphLiHeight:it,controlHeightXS:et,paragraphMarginTop:ft}=se;return{[`${Ne}`]:{display:"table",width:"100%",[`${Ne}-header`]:{display:"table-cell",paddingInlineEnd:je,verticalAlign:"top",[`${He}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Qe},f(Be)),[`${He}-circle`]:{borderRadius:"50%"},[`${He}-lg`]:Object.assign({},f(Ve)),[`${He}-sm`]:Object.assign({},f(nt))},[`${Ne}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${N}`]:{width:"100%",height:De,background:Qe,borderRadius:Ue,[`+ ${ee}`]:{marginBlockStart:nt}},[`${ee}`]:{padding:0,"> li":{width:"100%",height:it,listStyle:"none",background:Qe,borderRadius:Ue,"+ li":{marginBlockStart:et}}},[`${ee}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${Ne}-content`]:{[`${N}, ${ee} > li`]:{borderRadius:Ae}}},[`${Ne}-with-avatar ${Ne}-content`]:{[`${N}`]:{marginBlockStart:bt,[`+ ${ee}`]:{marginBlockStart:ft}}},[`${Ne}${Ne}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},S(se)),U(se)),K(se)),I(se)),[`${Ne}${Ne}-block`]:{width:"100%",[`${ye}`]:{width:"100%"},[`${be}`]:{width:"100%"}},[`${Ne}${Ne}-active`]:{[`
|
|
|
${N},
|
|
|
${ee} > li,
|
|
|
${He},
|
|
|
${ye},
|
|
|
${be},
|
|
|
${Le}
|
|
|
`]:Object.assign({},_(se))}}};var ae=(0,o.Z)("Skeleton",se=>{const{componentCls:Ne}=se,He=(0,$.TS)(se,{skeletonAvatarCls:`${Ne}-avatar`,skeletonTitleCls:`${Ne}-title`,skeletonParagraphCls:`${Ne}-paragraph`,skeletonButtonCls:`${Ne}-button`,skeletonInputCls:`${Ne}-input`,skeletonImageCls:`${Ne}-image`,imageSizeBase:se.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${se.gradientFromColor} 25%, ${se.gradientToColor} 37%, ${se.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[j(He)]},se=>{const{colorFillContent:Ne,colorFill:He}=se,N=Ne,ee=He;return{color:N,colorGradientEnd:ee,gradientFromColor:N,gradientToColor:ee,titleHeight:se.controlHeight/2,blockRadius:se.borderRadiusSM,paragraphMarginTop:se.marginLG+se.marginXXS,paragraphLiHeight:se.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Se=se=>{const{prefixCls:Ne,className:He,rootClassName:N,active:ee,shape:ye="circle",size:be="default"}=se,{getPrefixCls:Le}=me.useContext(Ie.E_),Be=Le("skeleton",Ne),[Ve,nt]=ae(Be),Qe=(0,fe.Z)(se,["prefixCls","className"]),je=_e()(Be,`${Be}-element`,{[`${Be}-active`]:ee},He,N,nt);return Ve(me.createElement("div",{className:je},me.createElement(ve,Object.assign({prefixCls:`${Be}-avatar`,shape:ye,size:be},Qe))))},Me=se=>{const{prefixCls:Ne,className:He,rootClassName:N,active:ee,block:ye=!1,size:be="default"}=se,{getPrefixCls:Le}=me.useContext(Ie.E_),Be=Le("skeleton",Ne),[Ve,nt]=ae(Be),Qe=(0,fe.Z)(se,["prefixCls"]),je=_e()(Be,`${Be}-element`,{[`${Be}-active`]:ee,[`${Be}-block`]:ye},He,N,nt);return Ve(me.createElement("div",{className:je},me.createElement(ve,Object.assign({prefixCls:`${Be}-button`,size:be},Qe))))};const $e="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z";var B=se=>{const{prefixCls:Ne,className:He,rootClassName:N,style:ee,active:ye}=se,{getPrefixCls:be}=me.useContext(Ie.E_),Le=be("skeleton",Ne),[Be,Ve]=ae(Le),nt=_e()(Le,`${Le}-element`,{[`${Le}-active`]:ye},He,N,Ve);return Be(me.createElement("div",{className:nt},me.createElement("div",{className:_e()(`${Le}-image`,He),style:ee},me.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Le}-image-svg`},me.createElement("path",{d:$e,className:`${Le}-image-path`})))))},X=se=>{const{prefixCls:Ne,className:He,rootClassName:N,active:ee,block:ye,size:be="default"}=se,{getPrefixCls:Le}=me.useContext(Ie.E_),Be=Le("skeleton",Ne),[Ve,nt]=ae(Be),Qe=(0,fe.Z)(se,["prefixCls"]),je=_e()(Be,`${Be}-element`,{[`${Be}-active`]:ee,[`${Be}-block`]:ye},He,N,nt);return Ve(me.createElement("div",{className:je},me.createElement(ve,Object.assign({prefixCls:`${Be}-input`,size:be},Qe))))},le=D(96663),q={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},b=q,x=D(7657),G=function(Ne,He){return me.createElement(x.Z,(0,le.Z)({},Ne,{ref:He,icon:b}))},ue=me.forwardRef(G),ze=ue,Ke=se=>{const{prefixCls:Ne,className:He,rootClassName:N,style:ee,active:ye,children:be}=se,{getPrefixCls:Le}=me.useContext(Ie.E_),Be=Le("skeleton",Ne),[Ve,nt]=ae(Be),Qe=_e()(Be,`${Be}-element`,{[`${Be}-active`]:ye},nt,He,N),je=be!=null?be:me.createElement(ze,null);return Ve(me.createElement("div",{className:Qe},me.createElement("div",{className:_e()(`${Be}-image`,He),style:ee},je)))},Ze=D(19127),ct=se=>{const Ne=Le=>{const{width:Be,rows:Ve=2}=se;if(Array.isArray(Be))return Be[Le];if(Ve-1===Le)return Be},{prefixCls:He,className:N,style:ee,rows:ye}=se,be=(0,Ze.Z)(Array(ye)).map((Le,Be)=>me.createElement("li",{key:Be,style:{width:Ne(Be)}}));return me.createElement("ul",{className:_e()(He,N),style:ee},be)},jt=se=>{let{prefixCls:Ne,className:He,width:N,style:ee}=se;return me.createElement("h3",{className:_e()(Ne,He),style:Object.assign({width:N},ee)})};function Zt(se){return se&&typeof se=="object"?se:{}}function qt(se,Ne){return se&&!Ne?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Ut(se,Ne){return!se&&Ne?{width:"38%"}:se&&Ne?{width:"50%"}:{}}function zt(se,Ne){const He={};return(!se||!Ne)&&(He.width="61%"),!se&&Ne?He.rows=3:He.rows=2,He}const Bt=se=>{const{prefixCls:Ne,loading:He,className:N,rootClassName:ee,style:ye,children:be,avatar:Le=!1,title:Be=!0,paragraph:Ve=!0,active:nt,round:Qe}=se,{getPrefixCls:je,direction:bt,skeleton:Ae}=me.useContext(Ie.E_),De=je("skeleton",Ne),[Ue,it]=ae(De);if(He||!("loading"in se)){const et=!!Le,ft=!!Be,_t=!!Ve;let v;if(et){const P=Object.assign(Object.assign({prefixCls:`${De}-avatar`},qt(ft,_t)),Zt(Le));v=me.createElement("div",{className:`${De}-header`},me.createElement(ve,Object.assign({},P)))}let E;if(ft||_t){let P;if(ft){const kt=Object.assign(Object.assign({prefixCls:`${De}-title`},Ut(et,_t)),Zt(Be));P=me.createElement(jt,Object.assign({},kt))}let oe;if(_t){const kt=Object.assign(Object.assign({prefixCls:`${De}-paragraph`},zt(et,ft)),Zt(Ve));oe=me.createElement(ct,Object.assign({},kt))}E=me.createElement("div",{className:`${De}-content`},P,oe)}const Ye=_e()(De,{[`${De}-with-avatar`]:et,[`${De}-active`]:nt,[`${De}-rtl`]:bt==="rtl",[`${De}-round`]:Qe},Ae==null?void 0:Ae.className,N,ee,it);return Ue(me.createElement("div",{className:Ye,style:Object.assign(Object.assign({},Ae==null?void 0:Ae.style),ye)},v,E))}return typeof be!="undefined"?be:null};Bt.Button=Me,Bt.Avatar=Se,Bt.Input=X,Bt.Image=B,Bt.Node=Ke;var Oe=Bt,qe=Oe},8378:function($t,st){"use strict";const D=R=>({[R.componentCls]:{[`${R.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${R.motionDurationMid} ${R.motionEaseInOut},
|
|
|
opacity ${R.motionDurationMid} ${R.motionEaseInOut} !important`}},[`${R.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${R.motionDurationMid} ${R.motionEaseInOut},
|
|
|
opacity ${R.motionDurationMid} ${R.motionEaseInOut} !important`}}});st.Z=D},19447:function($t,st,D){"use strict";D.d(st,{ZP:function(){return fe},fS:function(){return me},qN:function(){return _e}});var R=D(47585);const _e=8;function me(re){const ve=_e,{contentRadius:Ee,limitVerticalRadius:o}=re,$=Ee>12?Ee+2:12;return{dropdownArrowOffset:$,dropdownArrowOffsetVertical:o?ve:$}}function Ie(re,ve){return re?ve:{}}function fe(re,ve){const{componentCls:Ee,sizePopupArrow:o,borderRadiusXS:$,borderRadiusOuter:F,boxShadowPopoverArrow:w}=re,{colorBg:f,contentRadius:_=re.borderRadiusLG,limitVerticalRadius:y,arrowDistance:U=0,arrowPlacement:K={left:!0,right:!0,top:!0,bottom:!0}}=ve,{dropdownArrowOffsetVertical:O,dropdownArrowOffset:I}=me({contentRadius:_,limitVerticalRadius:y});return{[Ee]:Object.assign(Object.assign(Object.assign(Object.assign({[`${Ee}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,R.r)(o,$,F,f,w)),{"&:before":{background:f}})]},Ie(!!K.top,{[[`&-placement-top ${Ee}-arrow`,`&-placement-topLeft ${Ee}-arrow`,`&-placement-topRight ${Ee}-arrow`].join(",")]:{bottom:U,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${Ee}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${Ee}-arrow`]:{left:{_skip_check_:!0,value:I}},[`&-placement-topRight ${Ee}-arrow`]:{right:{_skip_check_:!0,value:I}}})),Ie(!!K.bottom,{[[`&-placement-bottom ${Ee}-arrow`,`&-placement-bottomLeft ${Ee}-arrow`,`&-placement-bottomRight ${Ee}-arrow`].join(",")]:{top:U,transform:"translateY(-100%)"},[`&-placement-bottom ${Ee}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${Ee}-arrow`]:{left:{_skip_check_:!0,value:I}},[`&-placement-bottomRight ${Ee}-arrow`]:{right:{_skip_check_:!0,value:I}}})),Ie(!!K.left,{[[`&-placement-left ${Ee}-arrow`,`&-placement-leftTop ${Ee}-arrow`,`&-placement-leftBottom ${Ee}-arrow`].join(",")]:{right:{_skip_check_:!0,value:U},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${Ee}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${Ee}-arrow`]:{top:O},[`&-placement-leftBottom ${Ee}-arrow`]:{bottom:O}})),Ie(!!K.right,{[[`&-placement-right ${Ee}-arrow`,`&-placement-rightTop ${Ee}-arrow`,`&-placement-rightBottom ${Ee}-arrow`].join(",")]:{left:{_skip_check_:!0,value:U},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${Ee}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${Ee}-arrow`]:{top:O},[`&-placement-rightBottom ${Ee}-arrow`]:{bottom:O}}))}}},47585:function($t,st,D){"use strict";D.d(st,{r:function(){return R}});const R=(_e,me,Ie,fe,re)=>{const ve=_e/2,Ee=0,o=ve,$=Ie*1/Math.sqrt(2),F=ve-Ie*(1-1/Math.sqrt(2)),w=ve-me*(1/Math.sqrt(2)),f=Ie*(Math.sqrt(2)-1)+me*(1/Math.sqrt(2)),_=2*ve-w,y=f,U=2*ve-$,K=F,O=2*ve-Ee,I=o,H=ve*Math.sqrt(2)+Ie*(Math.sqrt(2)-2),te=Ie*(Math.sqrt(2)-1);return{pointerEvents:"none",width:_e,height:_e,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:_e,height:_e/2,background:fe,clipPath:{_multi_value_:!0,value:[`polygon(${te}px 100%, 50% ${te}px, ${2*ve-te}px 100%, ${te}px 100%)`,`path('M ${Ee} ${o} A ${Ie} ${Ie} 0 0 0 ${$} ${F} L ${w} ${f} A ${me} ${me} 0 0 1 ${_} ${y} L ${U} ${K} A ${Ie} ${Ie} 0 0 0 ${O} ${I} Z')`]},content:'""'},"&::after":{content:'""',position:"absolute",width:H,height:H,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${me}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:re,zIndex:0,background:"transparent"}}}},33166:function($t,st,D){"use strict";D.d(st,{i:function(){return R}});const R=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"]},45157:function($t,st,D){"use strict";D.d(st,{Z:function(){return _e}});var R=D(33166);function _e(me,Ie){return R.i.reduce((fe,re)=>{const ve=me[`${re}1`],Ee=me[`${re}3`],o=me[`${re}6`],$=me[`${re}7`];return Object.assign(Object.assign({},fe),Ie(re,{lightColor:ve,lightBorderColor:Ee,darkColor:o,textColor:$}))},{})}},6848:function($t,st,D){"use strict";D.d(st,{Z:function(){return Me}});var R=D(59301),_e=D(92310),me=D.n(_e),Ie=D(55477),fe=D(18929),re=D(62892),ve=D(79676),Ee=D(92343),o=D(36355),$=D(33234),F=D(88088),w=D(17313),f=D(29878),_=D(19447),y=D(45157),U=D(37613),K=D(83116);const O=$e=>{const{componentCls:Y,tooltipMaxWidth:B,tooltipColor:Z,tooltipBg:X,tooltipBorderRadius:le,zIndexPopup:q,controlHeight:b,boxShadowSecondary:x,paddingSM:G,paddingXS:ue,tooltipRadiusOuter:ze}=$e;return[{[Y]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,w.Wf)($e)),{position:"absolute",zIndex:q,display:"block",width:"max-content",maxWidth:B,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":X,[`${Y}-inner`]:{minWidth:b,minHeight:b,padding:`${G/2}px ${ue}px`,color:Z,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:X,borderRadius:le,boxShadow:x,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${Y}-inner`]:{borderRadius:Math.min(le,_.qN)}},[`${Y}-content`]:{position:"relative"}}),(0,y.Z)($e,(Xe,Ke)=>{let{darkColor:Ze}=Ke;return{[`&${Y}-${Xe}`]:{[`${Y}-inner`]:{backgroundColor:Ze},[`${Y}-arrow`]:{"--antd-arrow-background-color":Ze}}}})),{"&-rtl":{direction:"rtl"}})},(0,_.ZP)((0,U.TS)($e,{borderRadiusOuter:ze}),{colorBg:"var(--antd-arrow-background-color)",contentRadius:le,limitVerticalRadius:!0}),{[`${Y}-pure`]:{position:"relative",maxWidth:"none",margin:$e.sizePopupArrow}}]};var I=($e,Y)=>(0,K.Z)("Tooltip",Z=>{if(Y===!1)return[];const{borderRadius:X,colorTextLightSolid:le,colorBgDefault:q,borderRadiusOuter:b}=Z,x=(0,U.TS)(Z,{tooltipMaxWidth:250,tooltipColor:le,tooltipBorderRadius:X,tooltipBg:q,tooltipRadiusOuter:b>4?4:b});return[O(x),(0,f._y)(Z,"zoom-big-fast")]},Z=>{let{zIndexPopupBase:X,colorBgSpotlight:le}=Z;return{zIndexPopup:X+70,colorBgDefault:le}},{resetStyle:!1})($e),H=D(36785);function te($e,Y){const B=(0,H.o2)(Y),Z=me()({[`${$e}-${Y}`]:Y&&B}),X={},le={};return Y&&!B&&(X.background=Y,le["--antd-arrow-background-color"]=Y),{className:Z,overlayStyle:X,arrowStyle:le}}var j=$e=>{const{prefixCls:Y,className:B,placement:Z="top",title:X,color:le,overlayInnerStyle:q}=$e,{getPrefixCls:b}=R.useContext(o.E_),x=b("tooltip",Y),[G,ue]=I(x,!0),ze=te(x,le),Xe=ze.arrowStyle,Ke=Object.assign(Object.assign({},q),ze.overlayStyle),Ze=me()(ue,x,`${x}-pure`,`${x}-placement-${Z}`,B,ze.className);return G(R.createElement("div",{className:Ze,style:Xe},R.createElement("div",{className:`${x}-arrow`}),R.createElement(Ie.G,Object.assign({},$e,{className:ue,prefixCls:x,overlayInnerStyle:Ke}),X)))},ae=function($e,Y){var B={};for(var Z in $e)Object.prototype.hasOwnProperty.call($e,Z)&&Y.indexOf(Z)<0&&(B[Z]=$e[Z]);if($e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var X=0,Z=Object.getOwnPropertySymbols($e);X<Z.length;X++)Y.indexOf(Z[X])<0&&Object.prototype.propertyIsEnumerable.call($e,Z[X])&&(B[Z[X]]=$e[Z[X]]);return B};const de=($e,Y)=>{const B={},Z=Object.assign({},$e);return Y.forEach(X=>{$e&&X in $e&&(B[X]=$e[X],delete Z[X])}),{picked:B,omitted:Z}};function Se($e,Y){const B=$e.type;if((B.__ANT_BUTTON===!0||$e.type==="button")&&$e.props.disabled||B.__ANT_SWITCH===!0&&($e.props.disabled||$e.props.loading)||B.__ANT_RADIO===!0&&$e.props.disabled){const{picked:Z,omitted:X}=de($e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),le=Object.assign(Object.assign({display:"inline-block"},Z),{cursor:"not-allowed",width:$e.props.block?"100%":void 0}),q=Object.assign(Object.assign({},X),{pointerEvents:"none"}),b=(0,Ee.Tm)($e,{style:q,className:null});return R.createElement("span",{style:le,className:me()($e.props.className,`${Y}-disabled-compatible-wrapper`)},b)}return $e}const we=R.forwardRef(($e,Y)=>{var B,Z;const{prefixCls:X,openClassName:le,getTooltipContainer:q,overlayClassName:b,color:x,overlayInnerStyle:G,children:ue,afterOpenChange:ze,afterVisibleChange:Xe,destroyTooltipOnHide:Ke,arrow:Ze=!0,title:pt,overlay:ct,builtinPlacements:ht,arrowPointAtCenter:jt=!1,autoAdjustOverflow:Zt=!0}=$e,qt=!!Ze,[,Ut]=(0,F.Z)(),{getPopupContainer:zt,getPrefixCls:Bt,direction:Oe}=R.useContext(o.E_),qe=R.useRef(null),se=()=>{var Pe;(Pe=qe.current)===null||Pe===void 0||Pe.forceAlign()};R.useImperativeHandle(Y,()=>({forceAlign:se,forcePopupAlign:()=>{se()}}));const[Ne,He]=(0,fe.Z)(!1,{value:(B=$e.open)!==null&&B!==void 0?B:$e.visible,defaultValue:(Z=$e.defaultOpen)!==null&&Z!==void 0?Z:$e.defaultVisible}),N=!pt&&!ct&&pt!==0,ee=Pe=>{var Ge,z;He(N?!1:Pe),N||((Ge=$e.onOpenChange)===null||Ge===void 0||Ge.call($e,Pe),(z=$e.onVisibleChange)===null||z===void 0||z.call($e,Pe))},ye=R.useMemo(()=>{var Pe,Ge;let z=jt;return typeof Ze=="object"&&(z=(Ge=(Pe=Ze.pointAtCenter)!==null&&Pe!==void 0?Pe:Ze.arrowPointAtCenter)!==null&&Ge!==void 0?Ge:jt),ht||(0,ve.Z)({arrowPointAtCenter:z,autoAdjustOverflow:Zt,arrowWidth:qt?Ut.sizePopupArrow:0,borderRadius:Ut.borderRadius,offset:Ut.marginXXS,visibleFirst:!0})},[jt,Ze,ht,Ut]),be=R.useMemo(()=>pt===0?pt:ct||pt||"",[ct,pt]),Le=R.createElement($.BR,null,typeof be=="function"?be():be),{getPopupContainer:Be,placement:Ve="top",mouseEnterDelay:nt=.1,mouseLeaveDelay:Qe=.1,overlayStyle:je,rootClassName:bt}=$e,Ae=ae($e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),De=Bt("tooltip",X),Ue=Bt(),it=$e["data-popover-inject"];let et=Ne;!("open"in $e)&&!("visible"in $e)&&N&&(et=!1);const ft=Se((0,Ee.l$)(ue)&&!(0,Ee.M2)(ue)?ue:R.createElement("span",null,ue),De),_t=ft.props,v=!_t.className||typeof _t.className=="string"?me()(_t.className,le||`${De}-open`):_t.className,[E,Ye]=I(De,!it),P=te(De,x),oe=P.arrowStyle,kt=Object.assign(Object.assign({},G),P.overlayStyle),ge=me()(b,{[`${De}-rtl`]:Oe==="rtl"},P.className,bt,Ye);return E(R.createElement(Ie.Z,Object.assign({},Ae,{showArrow:qt,placement:Ve,mouseEnterDelay:nt,mouseLeaveDelay:Qe,prefixCls:De,overlayClassName:ge,overlayStyle:Object.assign(Object.assign({},oe),je),getTooltipContainer:Be||q||zt,ref:qe,builtinPlacements:ye,overlay:Le,visible:et,onVisibleChange:ee,afterVisibleChange:ze!=null?ze:Xe,overlayInnerStyle:kt,arrowContent:R.createElement("span",{className:`${De}-arrow-content`}),motion:{motionName:(0,re.m)(Ue,"zoom-big-fast",$e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!Ke}),et?(0,Ee.Tm)(ft,{className:v}):ft))});we._InternalPanelDoNotUseOrYouWillBeFired=j;var Me=we},64018:function(){var $t,st,D,R=!1,_e,me;window.PR_SHOULD_USE_CONTINUATION=!0;var Ie,fe;(function(){var re=window,ve=["break,continue,do,else,for,if,return,while"],Ee=[ve,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],o=[Ee,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],$=[o,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],F=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],w=[o,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],f="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,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],y="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",U=[ve,"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"],K=[ve,"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"],O=[ve,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],I=[$,w,F,_,y,U,K,O],H=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,te="str",S="kwd",j="com",ae="typ",de="lit",Se="pun",we="pln",Me="tag",$e="dec",Y="src",B="atn",Z="atv",X="nocode",le="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function q(Oe){for(var qe=0,se=!1,Ne=!1,He=0,N=Oe.length;He<N;++He){var ee=Oe[He];if(ee.ignoreCase)Ne=!0;else if(/[a-z]/i.test(ee.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){se=!0,Ne=!1;break}}var ye={b:8,t:9,n:10,v:11,f:12,r:13};function be(Qe){var je=Qe.charCodeAt(0);if(je!==92)return je;var bt=Qe.charAt(1);return je=ye[bt],je||("0"<=bt&&bt<="7"?parseInt(Qe.substring(1),8):bt==="u"||bt==="x"?parseInt(Qe.substring(2),16):Qe.charCodeAt(1))}function Le(Qe){if(Qe<32)return(Qe<16?"\\x0":"\\x")+Qe.toString(16);var je=String.fromCharCode(Qe);return je==="\\"||je==="-"||je==="]"||je==="^"?"\\"+je:je}function Be(Qe){var je=Qe.substring(1,Qe.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")),bt=[],Ae=je[0]==="^",De=["["];Ae&&De.push("^");for(var Ue=Ae?1:0,it=je.length;Ue<it;++Ue){var et=je[Ue];if(/\\[bdsw]/i.test(et))De.push(et);else{var ft=be(et),_t;Ue+2<it&&je[Ue+1]==="-"?(_t=be(je[Ue+2]),Ue+=2):_t=ft,bt.push([ft,_t]),_t<65||ft>122||(_t<65||ft>90||bt.push([Math.max(65,ft)|32,Math.min(_t,90)|32]),_t<97||ft>122||bt.push([Math.max(97,ft)&-33,Math.min(_t,122)&-33]))}}bt.sort(function(P,oe){return P[0]-oe[0]||oe[1]-P[1]});for(var v=[],E=[],Ue=0;Ue<bt.length;++Ue){var Ye=bt[Ue];Ye[0]<=E[1]+1?E[1]=Math.max(E[1],Ye[1]):v.push(E=Ye)}for(var Ue=0;Ue<v.length;++Ue){var Ye=v[Ue];De.push(Le(Ye[0])),Ye[1]>Ye[0]&&(Ye[1]+1>Ye[0]&&De.push("-"),De.push(Le(Ye[1])))}return De.push("]"),De.join("")}function Ve(Qe){for(var je=Qe.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")),bt=je.length,Ae=[],De=0,Ue=0;De<bt;++De){var it=je[De];if(it==="(")++Ue;else if(it.charAt(0)==="\\"){var et=+it.substring(1);et&&(et<=Ue?Ae[et]=-1:je[De]=Le(et))}}for(var De=1;De<Ae.length;++De)Ae[De]===-1&&(Ae[De]=++qe);for(var De=0,Ue=0;De<bt;++De){var it=je[De];if(it==="(")++Ue,Ae[Ue]||(je[De]="(?:");else if(it.charAt(0)==="\\"){var et=+it.substring(1);et&&et<=Ue&&(je[De]="\\"+Ae[et])}}for(var De=0;De<bt;++De)je[De]==="^"&&je[De+1]!=="^"&&(je[De]="");if(Qe.ignoreCase&&se)for(var De=0;De<bt;++De){var it=je[De],ft=it.charAt(0);it.length>=2&&ft==="["?je[De]=Be(it):ft!=="\\"&&(je[De]=it.replace(/[a-zA-Z]/g,function(E){var Ye=E.charCodeAt(0);return"["+String.fromCharCode(Ye&-33,Ye|32)+"]"}))}return je.join("")}for(var nt=[],He=0,N=Oe.length;He<N;++He){var ee=Oe[He];if(ee.global||ee.multiline)throw new Error(""+ee);nt.push("(?:"+Ve(ee)+")")}return new RegExp(nt.join("|"),Ne?"gi":"g")}function b(Oe,qe){var se=/(?:^|\s)nocode(?:\s|$)/,Ne=[],He=0,N=[],ee=0;function ye(be){var Le=be.nodeType;if(Le==1){if(se.test(be.className))return;for(var Be=be.firstChild;Be;Be=Be.nextSibling)ye(Be);var Ve=be.nodeName.toLowerCase();(Ve==="br"||Ve==="li")&&(Ne[ee]=`
|
|
|
`,N[ee<<1]=He++,N[ee++<<1|1]=be)}else if(Le==3||Le==4){var nt=be.nodeValue;nt.length&&(qe?nt=nt.replace(/\r\n?/g,`
|
|
|
`):nt=nt.replace(/[ \t\r\n]+/g," "),Ne[ee]=nt,N[ee<<1]=He,He+=nt.length,N[ee++<<1|1]=be)}}return ye(Oe),{sourceCode:Ne.join("").replace(/\n$/,""),spans:N}}function x(Oe,qe,se,Ne,He){if(se){var N={sourceNode:Oe,pre:1,langExtension:null,numberLines:null,sourceCode:se,spans:null,basePos:qe,decorations:null};Ne(N),He.push.apply(He,N.decorations)}}var G=/\S/;function ue(Oe){for(var qe=void 0,se=Oe.firstChild;se;se=se.nextSibling){var Ne=se.nodeType;qe=Ne===1?qe?Oe:se:Ne===3&&G.test(se.nodeValue)?Oe:qe}return qe===Oe?void 0:qe}function ze(Oe,qe){var se={},Ne;(function(){for(var ee=Oe.concat(qe),ye=[],be={},Le=0,Be=ee.length;Le<Be;++Le){var Ve=ee[Le],nt=Ve[3];if(nt)for(var Qe=nt.length;--Qe>=0;)se[nt.charAt(Qe)]=Ve;var je=Ve[1],bt=""+je;be.hasOwnProperty(bt)||(ye.push(je),be[bt]=null)}ye.push(/[\0-\uffff]/),Ne=q(ye)})();var He=qe.length,N=function(ee){for(var ye=ee.sourceCode,be=ee.basePos,Le=ee.sourceNode,Be=[be,we],Ve=0,nt=ye.match(Ne)||[],Qe={},je=0,bt=nt.length;je<bt;++je){var Ae=nt[je],De=Qe[Ae],Ue=void 0,it;if(typeof De=="string")it=!1;else{var et=se[Ae.charAt(0)];if(et)Ue=Ae.match(et[1]),De=et[0];else{for(var ft=0;ft<He;++ft)if(et=qe[ft],Ue=Ae.match(et[1]),Ue){De=et[0];break}Ue||(De=we)}it=De.length>=5&&De.substring(0,5)==="lang-",it&&!(Ue&&typeof Ue[1]=="string")&&(it=!1,De=Y),it||(Qe[Ae]=De)}var _t=Ve;if(Ve+=Ae.length,!it)Be.push(be+_t,De);else{var v=Ue[1],E=Ae.indexOf(v),Ye=E+v.length;Ue[2]&&(Ye=Ae.length-Ue[2].length,E=Ye-v.length);var P=De.substring(5);x(Le,be+_t,Ae.substring(0,E),N,Be),x(Le,be+_t+E,v,jt(P,v),Be),x(Le,be+_t+Ye,Ae.substring(Ye),N,Be)}}ee.decorations=Be};return N}function Xe(Oe){var qe=[],se=[];Oe.tripleQuotedStrings?qe.push([te,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Oe.multiLineStrings?qe.push([te,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):qe.push([te,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Oe.verbatimStrings&&se.push([te,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ne=Oe.hashComments;Ne&&(Oe.cStyleComments?(Ne>1?qe.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):qe.push([j,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),se.push([te,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):qe.push([j,/^#[^\r\n]*/,null,"#"])),Oe.cStyleComments&&(se.push([j,/^\/\/[^\r\n]*/,null]),se.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var He=Oe.regexLiterals;if(He){var N=He>1?"":`
|
|
|
\r`,ee=N?".":"[\\S\\s]",ye="/(?=[^/*"+N+"])(?:[^/\\x5B\\x5C"+N+"]|\\x5C"+ee+"|\\x5B(?:[^\\x5C\\x5D"+N+"]|\\x5C"+ee+")*(?:\\x5D|$))+/";se.push(["lang-regex",RegExp("^"+le+"("+ye+")")])}var be=Oe.types;be&&se.push([ae,be]);var Le=(""+Oe.keywords).replace(/^ | $/g,"");Le.length&&se.push([S,new RegExp("^(?:"+Le.replace(/[\s,]+/g,"|")+")\\b"),null]),qe.push([we,/^\s+/,null,` \r
|
|
|
\xA0`]);var Be="^.[^\\s\\w.$@'\"`/\\\\]*";return Oe.regexLiterals&&(Be+="(?!s*/)"),se.push([de,/^@[a-z_$][a-z_$@0-9]*/i,null],[ae,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[we,/^[a-z_$][a-z_$@0-9]*/i,null],[de,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[we,/^\\[\s\S]?/,null],[Se,new RegExp(Be),null]),ze(qe,se)}var Ke=Xe({keywords:I,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ze(Oe,qe,se){for(var Ne=/(?:^|\s)nocode(?:\s|$)/,He=/\r\n?|\n/,N=Oe.ownerDocument,ee=N.createElement("li");Oe.firstChild;)ee.appendChild(Oe.firstChild);var ye=[ee];function be(je){var bt=je.nodeType;if(bt==1&&!Ne.test(je.className))if(je.nodeName==="br")Le(je),je.parentNode&&je.parentNode.removeChild(je);else for(var Ae=je.firstChild;Ae;Ae=Ae.nextSibling)be(Ae);else if((bt==3||bt==4)&&se){var De=je.nodeValue,Ue=De.match(He);if(Ue){var it=De.substring(0,Ue.index);je.nodeValue=it;var et=De.substring(Ue.index+Ue[0].length);if(et){var ft=je.parentNode;ft.insertBefore(N.createTextNode(et),je.nextSibling)}Le(je),it||je.parentNode.removeChild(je)}}}function Le(je){for(;!je.nextSibling;)if(je=je.parentNode,!je)return;function bt(Ue,it){var et=it?Ue.cloneNode(!1):Ue,ft=Ue.parentNode;if(ft){var _t=bt(ft,1),v=Ue.nextSibling;_t.appendChild(et);for(var E=v;E;E=v)v=E.nextSibling,_t.appendChild(E)}return et}for(var Ae=bt(je.nextSibling,0),De;(De=Ae.parentNode)&&De.nodeType===1;)Ae=De;ye.push(Ae)}for(var Be=0;Be<ye.length;++Be)be(ye[Be]);qe===(qe|0)&&ye[0].setAttribute("value",qe);var Ve=N.createElement("ol");Ve.className="linenums";for(var nt=Math.max(0,qe-1|0)||0,Be=0,Qe=ye.length;Be<Qe;++Be)ee=ye[Be],ee.className="L"+(Be+nt)%10,ee.firstChild||ee.appendChild(N.createTextNode("\xA0")),Ve.appendChild(ee);Oe.appendChild(Ve)}function pt(Oe){var qe=/\bMSIE\s(\d+)/.exec(navigator.userAgent);qe=qe&&+qe[1]<=8;var se=/\n/g,Ne=Oe.sourceCode,He=Ne.length,N=0,ee=Oe.spans,ye=ee.length,be=0,Le=Oe.decorations,Be=Le.length,Ve=0;Le[Be]=He;var nt,Qe;for(Qe=nt=0;Qe<Be;)Le[Qe]!==Le[Qe+2]?(Le[nt++]=Le[Qe++],Le[nt++]=Le[Qe++]):Qe+=2;for(Be=nt,Qe=nt=0;Qe<Be;){for(var je=Le[Qe],bt=Le[Qe+1],Ae=Qe+2;Ae+2<=Be&&Le[Ae+1]===bt;)Ae+=2;Le[nt++]=je,Le[nt++]=bt,Qe=Ae}Be=Le.length=nt;var De=Oe.sourceNode,Ue="";De&&(Ue=De.style.display,De.style.display="none");try{for(var it=null;be<ye;){var et=ee[be],ft=ee[be+2]||He,_t=Le[Ve+2]||He,Ae=Math.min(ft,_t),v=ee[be+1],E;if(v.nodeType!==1&&(E=Ne.substring(N,Ae))){qe&&(E=E.replace(se,"\r")),v.nodeValue=E;var Ye=v.ownerDocument,P=Ye.createElement("span");P.className=Le[Ve+1];var oe=v.parentNode;oe.replaceChild(P,v),P.appendChild(v),N<ft&&(ee[be+1]=v=Ye.createTextNode(Ne.substring(Ae,ft)),oe.insertBefore(v,P.nextSibling))}N=Ae,N>=ft&&(be+=2),N>=_t&&(Ve+=2)}}finally{De&&(De.style.display=Ue)}}var ct={};function ht(Oe,qe){for(var se=qe.length;--se>=0;){var Ne=qe[se];ct.hasOwnProperty(Ne)?re.console&&console.warn("cannot override language handler %s",Ne):ct[Ne]=Oe}}function jt(Oe,qe){return Oe&&ct.hasOwnProperty(Oe)||(Oe=/^\s*</.test(qe)?"default-markup":"default-code"),ct[Oe]}ht(Ke,["default-code"]),ht(ze([],[[we,/^[^<?]+/],[$e,/^<!\w[^>]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Se,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),ht(ze([[we,/^[\s]+/,null,` \r
|
|
|
`],[Z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Me,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[B,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Se,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),ht(ze([],[[Z,/^[\s\S]+/]]),["uq.val"]),ht(Xe({keywords:$,hashComments:!0,cStyleComments:!0,types:H}),["c","cc","cpp","cxx","cyc","m"]),ht(Xe({keywords:"null,true,false"}),["json"]),ht(Xe({keywords:w,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:H}),["cs"]),ht(Xe({keywords:F,cStyleComments:!0}),["java"]),ht(Xe({keywords:O,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ht(Xe({keywords:U,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ht(Xe({keywords:y,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ht(Xe({keywords:K,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ht(Xe({keywords:_,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ht(Xe({keywords:f,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ht(ze([],[[te,/^[\s\S]+/]]),["regex"]);function Zt(Oe){var qe=Oe.langExtension;try{var se=b(Oe.sourceNode,Oe.pre),Ne=se.sourceCode;Oe.sourceCode=Ne,Oe.spans=se.spans,Oe.basePos=0,jt(qe,Ne)(Oe),pt(Oe)}catch(He){re.console&&console.log(He&&He.stack||He)}}function qt(Oe,qe,se){var Ne=se||!1,He=qe||null,N=document.createElement("div");N.innerHTML="<pre>"+Oe+"</pre>",N=N.firstChild,Ne&&Ze(N,Ne,!0);var ee={langExtension:He,numberLines:Ne,sourceNode:N,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Zt(ee),N.innerHTML}function Ut(Oe,qe){var se=qe||document.body,Ne=se.ownerDocument||document;function He(et){return se.getElementsByTagName(et)}for(var N=[He("pre"),He("code"),He("xmp")],ee=[],ye=0;ye<N.length;++ye)for(var be=0,Le=N[ye].length;be<Le;++be)ee.push(N[ye][be]);N=null;var Be=Date;Be.now||(Be={now:function(){return+new Date}});var Ve=0,nt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Qe=/\bprettyprint\b/,je=/\bprettyprinted\b/,bt=/pre|xmp/i,Ae=/^code$/i,De=/^(?:pre|code|xmp)$/i,Ue={};function it(){for(var et=re.PR_SHOULD_USE_CONTINUATION?Be.now()+250:1/0;Ve<ee.length&&Be.now()<et;Ve++){for(var ft=ee[Ve],_t=Ue,v=ft;v=v.previousSibling;){var E=v.nodeType,Ye=(E===7||E===8)&&v.nodeValue;if(Ye?!/^\??prettify\b/.test(Ye):E!==3||/\S/.test(v.nodeValue))break;if(Ye){_t={},Ye.replace(/\b(\w+)=([\w:.%+-]+)/g,function(pe,Lt,It){_t[Lt]=It});break}}var P=ft.className;if((_t!==Ue||Qe.test(P))&&!je.test(P)){for(var oe=!1,kt=ft.parentNode;kt;kt=kt.parentNode){var ge=kt.tagName;if(De.test(ge)&&kt.className&&Qe.test(kt.className)){oe=!0;break}}if(!oe){ft.className+=" prettyprinted";var Pe=_t.lang;if(!Pe){Pe=P.match(nt);var Ge;!Pe&&(Ge=ue(ft))&&Ae.test(Ge.tagName)&&(Pe=Ge.className.match(nt)),Pe&&(Pe=Pe[1])}var z;if(bt.test(ft.tagName))z=1;else{var J=ft.currentStyle,ce=Ne.defaultView,Ce=J?J.whiteSpace:ce&&ce.getComputedStyle?ce.getComputedStyle(ft,null).getPropertyValue("white-space"):0;z=Ce&&Ce.substring(0,3)==="pre"}var M=_t.linenums;(M=M==="true"||+M)||(M=P.match(/\blinenums\b(?::(\d+))?/),M=M?M[1]&&M[1].length?+M[1]:!0:!1),M&&Ze(ft,M,z);var xt={langExtension:Pe,sourceNode:ft,numberLines:M,pre:z,sourceCode:null,basePos:null,spans:null,decorations:null};Zt(xt)}}}Ve<ee.length?re.setTimeout(it,250):typeof Oe=="function"&&Oe()}it()}var zt=re.PR={createSimpleLexer:ze,registerLangHandler:ht,sourceDecorator:Xe,PR_ATTRIB_NAME:B,PR_ATTRIB_VALUE:Z,PR_COMMENT:j,PR_DECLARATION:$e,PR_KEYWORD:S,PR_LITERAL:de,PR_NOCODE:X,PR_PLAIN:we,PR_PUNCTUATION:Se,PR_SOURCE:Y,PR_STRING:te,PR_TAG:Me,PR_TYPE:ae,prettyPrintOne:R?re.prettyPrintOne=qt:Ie=qt,prettyPrint:fe=R?re.prettyPrint=Ut:fe=Ut},Bt=re.define;typeof Bt=="function"&&Bt.amd&&Bt("google-code-prettify",[],function(){return zt})})()},25769:function($t,st,D){"use strict";var R=D(98040),_e={"text/plain":"Text","text/html":"Url",default:"Text"},me="Copy to clipboard: #{key}, Enter";function Ie(re){var ve=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return re.replace(/#{\s*key\s*}/g,ve)}function fe(re,ve){var Ee,o,$,F,w,f,_=!1;ve||(ve={}),Ee=ve.debug||!1;try{$=R(),F=document.createRange(),w=document.getSelection(),f=document.createElement("span"),f.textContent=re,f.ariaHidden="true",f.style.all="unset",f.style.position="fixed",f.style.top=0,f.style.clip="rect(0, 0, 0, 0)",f.style.whiteSpace="pre",f.style.webkitUserSelect="text",f.style.MozUserSelect="text",f.style.msUserSelect="text",f.style.userSelect="text",f.addEventListener("copy",function(U){if(U.stopPropagation(),ve.format)if(U.preventDefault(),typeof U.clipboardData=="undefined"){Ee&&console.warn("unable to use e.clipboardData"),Ee&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var K=_e[ve.format]||_e.default;window.clipboardData.setData(K,re)}else U.clipboardData.clearData(),U.clipboardData.setData(ve.format,re);ve.onCopy&&(U.preventDefault(),ve.onCopy(U.clipboardData))}),document.body.appendChild(f),F.selectNodeContents(f),w.addRange(F);var y=document.execCommand("copy");if(!y)throw new Error("copy command was unsuccessful");_=!0}catch(U){Ee&&console.error("unable to copy using execCommand: ",U),Ee&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(ve.format||"text",re),ve.onCopy&&ve.onCopy(window.clipboardData),_=!0}catch(K){Ee&&console.error("unable to copy using clipboardData: ",K),Ee&&console.error("falling back to prompt"),o=Ie("message"in ve?ve.message:me),window.prompt(o,re)}}finally{w&&(typeof w.removeRange=="function"?w.removeRange(F):w.removeAllRanges()),f&&document.body.removeChild(f),$()}return _}$t.exports=fe},53184:function($t,st,D){"use strict";var R,_e;function me(Ie,fe,re){var ve=function(Ee,o){return Ie.js_beautify(Ee,o)};return ve.js=Ie.js_beautify,ve.css=fe.css_beautify,ve.html=re.html_beautify,ve.js_beautify=Ie.js_beautify,ve.css_beautify=fe.css_beautify,ve.html_beautify=re.html_beautify,ve}R=[D(58553),D(87804),D(40998)],_e=function(Ie,fe,re){return me(Ie,fe,re)}.apply(st,R),_e!==void 0&&($t.exports=_e)},87804:function($t,st){var D,R;(function(){var _e;(function(){"use strict";var Ie=[,,function(Ee){function o(w){this.__parent=w,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var w=new o(this.__parent);return w.set_indent(this.__indent_count,this.__alignment_count),w},o.prototype.item=function(w){return w<0?this.__items[this.__items.length+w]:this.__items[w]},o.prototype.has_match=function(w){for(var f=this.__items.length-1;f>=0;f--)if(this.__items[f].match(w))return!0;return!1},o.prototype.set_indent=function(w,f){this.is_empty()&&(this.__indent_count=w||0,this.__alignment_count=f||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var w=this.__parent.current_line;return w.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),w.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),w.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,w.__items[0]===" "&&(w.__items.splice(0,1),w.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(w){this.__items.push(w);var f=w.lastIndexOf(`
|
|
|
`);f!==-1?this.__character_count=w.length-f:this.__character_count+=w.length},o.prototype.pop=function(){var w=null;return this.is_empty()||(w=this.__items.pop(),this.__character_count-=w.length),w},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var w="";return this.is_empty()?this.__parent.indent_empty_lines&&(w=this.__parent.get_indent_string(this.__indent_count)):(w=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),w+=this.__items.join("")),w};function $(w,f){this.__cache=[""],this.__indent_size=w.indent_size,this.__indent_string=w.indent_char,w.indent_with_tabs||(this.__indent_string=new Array(w.indent_size+1).join(w.indent_char)),f=f||"",w.indent_level>0&&(f=new Array(w.indent_level+1).join(this.__indent_string)),this.__base_string=f,this.__base_string_length=f.length}$.prototype.get_indent_size=function(w,f){var _=this.__base_string_length;return f=f||0,w<0&&(_=0),_+=w*this.__indent_size,_+=f,_},$.prototype.get_indent_string=function(w,f){var _=this.__base_string;return f=f||0,w<0&&(w=0,_=""),f+=w*this.__indent_size,this.__ensure_cache(f),_+=this.__cache[f],_},$.prototype.__ensure_cache=function(w){for(;w>=this.__cache.length;)this.__add_column()},$.prototype.__add_column=function(){var w=this.__cache.length,f=0,_="";this.__indent_size&&w>=this.__indent_size&&(f=Math.floor(w/this.__indent_size),w-=f*this.__indent_size,_=new Array(f+1).join(this.__indent_string)),w&&(_+=new Array(w+1).join(" ")),this.__cache.push(_)};function F(w,f){this.__indent_cache=new $(w,f),this.raw=!1,this._end_with_newline=w.end_with_newline,this.indent_size=w.indent_size,this.wrap_line_length=w.wrap_line_length,this.indent_empty_lines=w.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}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(w,f){return this.__indent_cache.get_indent_string(w,f)},F.prototype.get_indent_size=function(w,f){return this.__indent_cache.get_indent_size(w,f)},F.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},F.prototype.add_new_line=function(w){return this.is_empty()||!w&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},F.prototype.get_code=function(w){this.trim(!0);var f=this.current_line.pop();f&&(f[f.length-1]===`
|
|
|
`&&(f=f.replace(/\n+$/g,"")),this.current_line.push(f)),this._end_with_newline&&this.__add_outputline();var _=this.__lines.join(`
|
|
|
`);return w!==`
|
|
|
`&&(_=_.replace(/[\n]/g,w)),_},F.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},F.prototype.set_indent=function(w,f){return w=w||0,f=f||0,this.next_line.set_indent(w,f),this.__lines.length>1?(this.current_line.set_indent(w,f),!0):(this.current_line.set_indent(),!1)},F.prototype.add_raw_token=function(w){for(var f=0;f<w.newlines;f++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(w.whitespace_before),this.current_line.push(w.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},F.prototype.add_token=function(w){this.__add_space_before_token(),this.current_line.push(w),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(w){for(var f=this.__lines.length;w<f;)this.__lines[w]._remove_indent(),w++;this.current_line._remove_wrap_indent()},F.prototype.trim=function(w){for(w=w===void 0?!1:w,this.current_line.trim();w&&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(w,f){for(var _=this.__lines.length-2;_>=0;){var y=this.__lines[_];if(y.is_empty())break;if(y.item(0).indexOf(w)!==0&&y.item(-1)!==f){this.__lines.splice(_+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}_--}},Ee.exports.Output=F},,,,function(Ee){function o(w,f){this.raw_options=$(w,f),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(w,f){var _=this.raw_options[w],y=f||[];return typeof _=="object"?_!==null&&typeof _.concat=="function"&&(y=_.concat()):typeof _=="string"&&(y=_.split(/[^a-zA-Z0-9_\/\-]+/)),y},o.prototype._get_boolean=function(w,f){var _=this.raw_options[w],y=_===void 0?!!f:!!_;return y},o.prototype._get_characters=function(w,f){var _=this.raw_options[w],y=f||"";return typeof _=="string"&&(y=_.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),y},o.prototype._get_number=function(w,f){var _=this.raw_options[w];f=parseInt(f,10),isNaN(f)&&(f=0);var y=parseInt(_,10);return isNaN(y)&&(y=f),y},o.prototype._get_selection=function(w,f,_){var y=this._get_selection_list(w,f,_);if(y.length!==1)throw new Error("Invalid Option Value: The option '"+w+`' can only be one of the following values:
|
|
|
`+f+`
|
|
|
You passed in: '`+this.raw_options[w]+"'");return y[0]},o.prototype._get_selection_list=function(w,f,_){if(!f||f.length===0)throw new Error("Selection list cannot be empty.");if(_=_||[f[0]],!this._is_valid_selection(_,f))throw new Error("Invalid Default Value!");var y=this._get_array(w,_);if(!this._is_valid_selection(y,f))throw new Error("Invalid Option Value: The option '"+w+`' can contain only the following values:
|
|
|
`+f+`
|
|
|
You passed in: '`+this.raw_options[w]+"'");return y},o.prototype._is_valid_selection=function(w,f){return w.length&&f.length&&!w.some(function(_){return f.indexOf(_)===-1})};function $(w,f){var _={};w=F(w);var y;for(y in w)y!==f&&(_[y]=w[y]);if(f&&w[f])for(y in w[f])_[y]=w[f][y];return _}function F(w){var f={},_;for(_ in w){var y=_.replace(/-/g,"_");f[y]=w[_]}return f}Ee.exports.Options=o,Ee.exports.normalizeOpts=F,Ee.exports.mergeOpts=$},,function(Ee){var o=RegExp.prototype.hasOwnProperty("sticky");function $(F){this.__input=F||"",this.__input_length=this.__input.length,this.__position=0}$.prototype.restart=function(){this.__position=0},$.prototype.back=function(){this.__position>0&&(this.__position-=1)},$.prototype.hasNext=function(){return this.__position<this.__input_length},$.prototype.next=function(){var F=null;return this.hasNext()&&(F=this.__input.charAt(this.__position),this.__position+=1),F},$.prototype.peek=function(F){var w=null;return F=F||0,F+=this.__position,F>=0&&F<this.__input_length&&(w=this.__input.charAt(F)),w},$.prototype.__match=function(F,w){F.lastIndex=w;var f=F.exec(this.__input);return f&&!(o&&F.sticky)&&f.index!==w&&(f=null),f},$.prototype.test=function(F,w){return w=w||0,w+=this.__position,w>=0&&w<this.__input_length?!!this.__match(F,w):!1},$.prototype.testChar=function(F,w){var f=this.peek(w);return F.lastIndex=0,f!==null&&F.test(f)},$.prototype.match=function(F){var w=this.__match(F,this.__position);return w?this.__position+=w[0].length:w=null,w},$.prototype.read=function(F,w,f){var _="",y;return F&&(y=this.match(F),y&&(_+=y[0])),w&&(y||!F)&&(_+=this.readUntil(w,f)),_},$.prototype.readUntil=function(F,w){var f="",_=this.__position;F.lastIndex=this.__position;var y=F.exec(this.__input);return y?(_=y.index,w&&(_+=y[0].length)):_=this.__input_length,f=this.__input.substring(this.__position,_),this.__position=_,f},$.prototype.readUntilAfter=function(F){return this.readUntil(F,!0)},$.prototype.get_regexp=function(F,w){var f=null,_="g";return w&&o&&(_="y"),typeof F=="string"&&F!==""?f=new RegExp(F,_):F&&(f=new RegExp(F.source,_)),f},$.prototype.get_literal_regexp=function(F){return RegExp(F.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},$.prototype.peekUntilAfter=function(F){var w=this.__position,f=this.readUntilAfter(F);return this.__position=w,f},$.prototype.lookBack=function(F){var w=this.__position-1;return w>=F.length&&this.__input.substring(w-F.length,w).toLowerCase()===F},Ee.exports.InputScanner=$},,,,,function(Ee){function o($,F){$=typeof $=="string"?$:$.source,F=typeof F=="string"?F:F.source,this.__directives_block_pattern=new RegExp($+/ beautify( \w+[:]\w+)+ /.source+F,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp($+/\sbeautify\signore:end\s/.source+F,"g")}o.prototype.get_directives=function($){if(!$.match(this.__directives_block_pattern))return null;var F={};this.__directive_pattern.lastIndex=0;for(var w=this.__directive_pattern.exec($);w;)F[w[1]]=w[2],w=this.__directive_pattern.exec($);return F},o.prototype.readIgnored=function($){return $.readUntilAfter(this.__directives_end_ignore_pattern)},Ee.exports.Directives=o},,function(Ee,o,$){var F=$(16).Beautifier,w=$(17).Options;function f(_,y){var U=new F(_,y);return U.beautify()}Ee.exports=f,Ee.exports.defaultOptions=function(){return new w}},function(Ee,o,$){var F=$(17).Options,w=$(2).Output,f=$(8).InputScanner,_=$(13).Directives,y=new _(/\/\*/,/\*\//),U=/\r\n|[\r\n]/,K=/\r\n|[\r\n]/g,O=/\s/,I=/(?:\s|\n)+/g,H=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,te=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function S(j,ae){this._source_text=j||"",this._options=new F(ae),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"]}S.prototype.eatString=function(j){var ae="";for(this._ch=this._input.next();this._ch;){if(ae+=this._ch,this._ch==="\\")ae+=this._input.next();else if(j.indexOf(this._ch)!==-1||this._ch===`
|
|
|
`)break;this._ch=this._input.next()}return ae},S.prototype.eatWhitespace=function(j){for(var ae=O.test(this._input.peek()),de=0;O.test(this._input.peek());)this._ch=this._input.next(),j&&this._ch===`
|
|
|
`&&(de===0||de<this._options.max_preserve_newlines)&&(de++,this._output.add_new_line(!0));return ae},S.prototype.foundNestedPseudoClass=function(){for(var j=0,ae=1,de=this._input.peek(ae);de;){if(de==="{")return!0;if(de==="(")j+=1;else if(de===")"){if(j===0)return!1;j-=1}else if(de===";"||de==="}")return!1;ae++,de=this._input.peek(ae)}return!1},S.prototype.print_string=function(j){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(j)},S.prototype.preserveSingleSpace=function(j){j&&(this._output.space_before_token=!0)},S.prototype.indent=function(){this._indentLevel++},S.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},S.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var j=this._source_text,ae=this._options.eol;ae==="auto"&&(ae=`
|
|
|
`,j&&U.test(j||"")&&(ae=j.match(U)[0])),j=j.replace(K,`
|
|
|
`);var de=j.match(/^[\t ]*/)[0];this._output=new w(this._options,de),this._input=new f(j),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var Se=0,we=!1,Me=!1,$e=!1,Y=!1,B=!1,Z=this._ch,X=!1,le,q,b;le=this._input.read(I),q=le!=="",b=Z,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),Z=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var x=this._input.read(H),G=y.get_directives(x);G&&G.ignore==="start"&&(x+=y.readIgnored(this._input)),this.print_string(x),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(te)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(q),this.print_string(this._ch);var ue=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ue.match(/[ :]$/)&&(ue=this.eatString(": ").replace(/\s+$/,""),this.print_string(ue),this._output.space_before_token=!0),Se===0&&ue.indexOf(":")!==-1&&(Me=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(q),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ze=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ze.match(/[ :]$/)&&(ze=this.eatString(": ").replace(/\s+$/,""),this.print_string(ze),this._output.space_before_token=!0),Se===0&&ze.indexOf(":")!==-1?(Me=!0,this.indent()):ze in this.NESTED_AT_RULE?(this._nestedLevel+=1,ze in this.CONDITIONAL_GROUP_RULE&&($e=!0)):Se===0&&!Me&&(Y=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(q),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")Me&&(Me=!1,this.outdent()),Y=!1,$e?($e=!1,we=this._indentLevel>=this._nestedLevel):we=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&we&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(b==="("?this._output.space_before_token=!1:b!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),b==="{"&&this._output.trim(!0),Me&&(this.outdent(),Me=!1),this.print_string(this._ch),we=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var Xe=0;Xe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Xe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Xe])){X=!0;break}(we||$e)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!Y&&Se===0?(this.print_string(":"),Me||(Me=!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 Ke=b==='"'||b==="'";this.preserveSingleSpace(Ke||q),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")X=!1,Se===0?(Me&&(this.outdent(),Me=!1),Y=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),Se++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),Se&&(Se--,this.outdent()));else{var Ze=!1;this._input.lookBack("with")&&(Ze=!0),this.preserveSingleSpace(q||Ze),this.print_string(this._ch),Me&&b==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),B=!0):(this.eatWhitespace(),Se++,this.indent())}else if(this._ch===")")Se&&(Se--,this.outdent()),B&&this._input.peek()===";"&&this._options.selector_separator_newline&&(B=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!Me||B)&&Se===0&&!Y?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!Me&&Se===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&O.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(q),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),O.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 pt=b==='"'||b==="'";this.preserveSingleSpace(pt||q),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
|
`&&X&&this._output.add_new_line()}var ct=this._output.get_code(ae);return ct},Ee.exports.Beautifier=S},function(Ee,o,$){var F=$(6).Options;function w(f){F.call(this,f,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var _=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||_;var y=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var U=0;U<y.length;U++)y[U]!=="expand"?this.brace_style="collapse":this.brace_style=y[U]}w.prototype=new F,Ee.exports.Options=w}],fe={};function re(Ee){var o=fe[Ee];if(o!==void 0)return o.exports;var $=fe[Ee]={exports:{}};return Ie[Ee]($,$.exports,re),$.exports}var ve=re(15);_e=ve})();var me=_e;D=[],R=function(){return{css_beautify:me}}.apply(st,D),R!==void 0&&($t.exports=R)})()},40998:function($t,st,D){var R,_e;(function(){var me;(function(){"use strict";var ve=[,,function(F){function w(y){this.__parent=y,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=[]}w.prototype.clone_empty=function(){var y=new w(this.__parent);return y.set_indent(this.__indent_count,this.__alignment_count),y},w.prototype.item=function(y){return y<0?this.__items[this.__items.length+y]:this.__items[y]},w.prototype.has_match=function(y){for(var U=this.__items.length-1;U>=0;U--)if(this.__items[U].match(y))return!0;return!1},w.prototype.set_indent=function(y,U){this.is_empty()&&(this.__indent_count=y||0,this.__alignment_count=U||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},w.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)},w.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},w.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var y=this.__parent.current_line;return y.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),y.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),y.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,y.__items[0]===" "&&(y.__items.splice(0,1),y.__character_count-=1),!0}return!1},w.prototype.is_empty=function(){return this.__items.length===0},w.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},w.prototype.push=function(y){this.__items.push(y);var U=y.lastIndexOf(`
|
|
|
`);U!==-1?this.__character_count=y.length-U:this.__character_count+=y.length},w.prototype.pop=function(){var y=null;return this.is_empty()||(y=this.__items.pop(),this.__character_count-=y.length),y},w.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},w.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},w.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},w.prototype.toString=function(){var y="";return this.is_empty()?this.__parent.indent_empty_lines&&(y=this.__parent.get_indent_string(this.__indent_count)):(y=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),y+=this.__items.join("")),y};function f(y,U){this.__cache=[""],this.__indent_size=y.indent_size,this.__indent_string=y.indent_char,y.indent_with_tabs||(this.__indent_string=new Array(y.indent_size+1).join(y.indent_char)),U=U||"",y.indent_level>0&&(U=new Array(y.indent_level+1).join(this.__indent_string)),this.__base_string=U,this.__base_string_length=U.length}f.prototype.get_indent_size=function(y,U){var K=this.__base_string_length;return U=U||0,y<0&&(K=0),K+=y*this.__indent_size,K+=U,K},f.prototype.get_indent_string=function(y,U){var K=this.__base_string;return U=U||0,y<0&&(y=0,K=""),U+=y*this.__indent_size,this.__ensure_cache(U),K+=this.__cache[U],K},f.prototype.__ensure_cache=function(y){for(;y>=this.__cache.length;)this.__add_column()},f.prototype.__add_column=function(){var y=this.__cache.length,U=0,K="";this.__indent_size&&y>=this.__indent_size&&(U=Math.floor(y/this.__indent_size),y-=U*this.__indent_size,K=new Array(U+1).join(this.__indent_string)),y&&(K+=new Array(y+1).join(" ")),this.__cache.push(K)};function _(y,U){this.__indent_cache=new f(y,U),this.raw=!1,this._end_with_newline=y.end_with_newline,this.indent_size=y.indent_size,this.wrap_line_length=y.wrap_line_length,this.indent_empty_lines=y.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new w(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}_.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},_.prototype.get_line_number=function(){return this.__lines.length},_.prototype.get_indent_string=function(y,U){return this.__indent_cache.get_indent_string(y,U)},_.prototype.get_indent_size=function(y,U){return this.__indent_cache.get_indent_size(y,U)},_.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},_.prototype.add_new_line=function(y){return this.is_empty()||!y&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},_.prototype.get_code=function(y){this.trim(!0);var U=this.current_line.pop();U&&(U[U.length-1]===`
|
|
|
`&&(U=U.replace(/\n+$/g,"")),this.current_line.push(U)),this._end_with_newline&&this.__add_outputline();var K=this.__lines.join(`
|
|
|
`);return y!==`
|
|
|
`&&(K=K.replace(/[\n]/g,y)),K},_.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},_.prototype.set_indent=function(y,U){return y=y||0,U=U||0,this.next_line.set_indent(y,U),this.__lines.length>1?(this.current_line.set_indent(y,U),!0):(this.current_line.set_indent(),!1)},_.prototype.add_raw_token=function(y){for(var U=0;U<y.newlines;U++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(y.whitespace_before),this.current_line.push(y.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},_.prototype.add_token=function(y){this.__add_space_before_token(),this.current_line.push(y),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},_.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(" "))},_.prototype.remove_indent=function(y){for(var U=this.__lines.length;y<U;)this.__lines[y]._remove_indent(),y++;this.current_line._remove_wrap_indent()},_.prototype.trim=function(y){for(y=y===void 0?!1:y,this.current_line.trim();y&&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},_.prototype.just_added_newline=function(){return this.current_line.is_empty()},_.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},_.prototype.ensure_empty_line_above=function(y,U){for(var K=this.__lines.length-2;K>=0;){var O=this.__lines[K];if(O.is_empty())break;if(O.item(0).indexOf(y)!==0&&O.item(-1)!==U){this.__lines.splice(K+1,0,new w(this)),this.previous_line=this.__lines[this.__lines.length-2];break}K--}},F.exports.Output=_},function(F){function w(f,_,y,U){this.type=f,this.text=_,this.comments_before=null,this.newlines=y||0,this.whitespace_before=U||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}F.exports.Token=w},,,function(F){function w(y,U){this.raw_options=f(y,U),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"])}w.prototype._get_array=function(y,U){var K=this.raw_options[y],O=U||[];return typeof K=="object"?K!==null&&typeof K.concat=="function"&&(O=K.concat()):typeof K=="string"&&(O=K.split(/[^a-zA-Z0-9_\/\-]+/)),O},w.prototype._get_boolean=function(y,U){var K=this.raw_options[y],O=K===void 0?!!U:!!K;return O},w.prototype._get_characters=function(y,U){var K=this.raw_options[y],O=U||"";return typeof K=="string"&&(O=K.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),O},w.prototype._get_number=function(y,U){var K=this.raw_options[y];U=parseInt(U,10),isNaN(U)&&(U=0);var O=parseInt(K,10);return isNaN(O)&&(O=U),O},w.prototype._get_selection=function(y,U,K){var O=this._get_selection_list(y,U,K);if(O.length!==1)throw new Error("Invalid Option Value: The option '"+y+`' can only be one of the following values:
|
|
|
`+U+`
|
|
|
You passed in: '`+this.raw_options[y]+"'");return O[0]},w.prototype._get_selection_list=function(y,U,K){if(!U||U.length===0)throw new Error("Selection list cannot be empty.");if(K=K||[U[0]],!this._is_valid_selection(K,U))throw new Error("Invalid Default Value!");var O=this._get_array(y,K);if(!this._is_valid_selection(O,U))throw new Error("Invalid Option Value: The option '"+y+`' can contain only the following values:
|
|
|
`+U+`
|
|
|
You passed in: '`+this.raw_options[y]+"'");return O},w.prototype._is_valid_selection=function(y,U){return y.length&&U.length&&!y.some(function(K){return U.indexOf(K)===-1})};function f(y,U){var K={};y=_(y);var O;for(O in y)O!==U&&(K[O]=y[O]);if(U&&y[U])for(O in y[U])K[O]=y[U][O];return K}function _(y){var U={},K;for(K in y){var O=K.replace(/-/g,"_");U[O]=y[K]}return U}F.exports.Options=w,F.exports.normalizeOpts=_,F.exports.mergeOpts=f},,function(F){var w=RegExp.prototype.hasOwnProperty("sticky");function f(_){this.__input=_||"",this.__input_length=this.__input.length,this.__position=0}f.prototype.restart=function(){this.__position=0},f.prototype.back=function(){this.__position>0&&(this.__position-=1)},f.prototype.hasNext=function(){return this.__position<this.__input_length},f.prototype.next=function(){var _=null;return this.hasNext()&&(_=this.__input.charAt(this.__position),this.__position+=1),_},f.prototype.peek=function(_){var y=null;return _=_||0,_+=this.__position,_>=0&&_<this.__input_length&&(y=this.__input.charAt(_)),y},f.prototype.__match=function(_,y){_.lastIndex=y;var U=_.exec(this.__input);return U&&!(w&&_.sticky)&&U.index!==y&&(U=null),U},f.prototype.test=function(_,y){return y=y||0,y+=this.__position,y>=0&&y<this.__input_length?!!this.__match(_,y):!1},f.prototype.testChar=function(_,y){var U=this.peek(y);return _.lastIndex=0,U!==null&&_.test(U)},f.prototype.match=function(_){var y=this.__match(_,this.__position);return y?this.__position+=y[0].length:y=null,y},f.prototype.read=function(_,y,U){var K="",O;return _&&(O=this.match(_),O&&(K+=O[0])),y&&(O||!_)&&(K+=this.readUntil(y,U)),K},f.prototype.readUntil=function(_,y){var U="",K=this.__position;_.lastIndex=this.__position;var O=_.exec(this.__input);return O?(K=O.index,y&&(K+=O[0].length)):K=this.__input_length,U=this.__input.substring(this.__position,K),this.__position=K,U},f.prototype.readUntilAfter=function(_){return this.readUntil(_,!0)},f.prototype.get_regexp=function(_,y){var U=null,K="g";return y&&w&&(K="y"),typeof _=="string"&&_!==""?U=new RegExp(_,K):_&&(U=new RegExp(_.source,K)),U},f.prototype.get_literal_regexp=function(_){return RegExp(_.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},f.prototype.peekUntilAfter=function(_){var y=this.__position,U=this.readUntilAfter(_);return this.__position=y,U},f.prototype.lookBack=function(_){var y=this.__position-1;return y>=_.length&&this.__input.substring(y-_.length,y).toLowerCase()===_},F.exports.InputScanner=f},function(F,w,f){var _=f(8).InputScanner,y=f(3).Token,U=f(10).TokenStream,K=f(11).WhitespacePattern,O={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},I=function(H,te){this._input=new _(H),this._options=te||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new K(this._input)};I.prototype.tokenize=function(){this._input.restart(),this.__tokens=new U,this._reset();for(var H,te=new y(O.START,""),S=null,j=[],ae=new U;te.type!==O.EOF;){for(H=this._get_next_token(te,S);this._is_comment(H);)ae.add(H),H=this._get_next_token(te,S);ae.isEmpty()||(H.comments_before=ae,ae=new U),H.parent=S,this._is_opening(H)?(j.push(S),S=H):S&&this._is_closing(H,S)&&(H.opened=S,S.closed=H,S=j.pop(),H.parent=S),H.previous=te,te.next=H,this.__tokens.add(H),te=H}return this.__tokens},I.prototype._is_first_token=function(){return this.__tokens.isEmpty()},I.prototype._reset=function(){},I.prototype._get_next_token=function(H,te){this._readWhitespace();var S=this._input.read(/.+/g);return S?this._create_token(O.RAW,S):this._create_token(O.EOF,"")},I.prototype._is_comment=function(H){return!1},I.prototype._is_opening=function(H){return!1},I.prototype._is_closing=function(H,te){return!1},I.prototype._create_token=function(H,te){var S=new y(H,te,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return S},I.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},F.exports.Tokenizer=I,F.exports.TOKEN=O},function(F){function w(f){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=f}w.prototype.restart=function(){this.__position=0},w.prototype.isEmpty=function(){return this.__tokens_length===0},w.prototype.hasNext=function(){return this.__position<this.__tokens_length},w.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__tokens[this.__position],this.__position+=1),f},w.prototype.peek=function(f){var _=null;return f=f||0,f+=this.__position,f>=0&&f<this.__tokens_length&&(_=this.__tokens[f]),_},w.prototype.add=function(f){this.__parent_token&&(f.parent=this.__parent_token),this.__tokens.push(f),this.__tokens_length+=1},F.exports.TokenStream=w},function(F,w,f){var _=f(12).Pattern;function y(U,K){_.call(this,U,K),K?this._line_regexp=this._input.get_regexp(K._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}y.prototype=new _,y.prototype.__set_whitespace_patterns=function(U,K){U+="\\t ",K+="\\n\\r",this._match_pattern=this._input.get_regexp("["+U+K+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+K+"]")},y.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var U=this._input.read(this._match_pattern);if(U===" ")this.whitespace_before_token=" ";else if(U){var K=this.__split(this._newline_regexp,U);this.newline_count=K.length-1,this.whitespace_before_token=K[this.newline_count]}return U},y.prototype.matching=function(U,K){var O=this._create();return O.__set_whitespace_patterns(U,K),O._update(),O},y.prototype._create=function(){return new y(this._input,this)},y.prototype.__split=function(U,K){U.lastIndex=0;for(var O=0,I=[],H=U.exec(K);H;)I.push(K.substring(O,H.index)),O=H.index+H[0].length,H=U.exec(K);return O<K.length?I.push(K.substring(O,K.length)):I.push(""),I},F.exports.WhitespacePattern=y},function(F){function w(f,_){this._input=f,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,_&&(this._starting_pattern=this._input.get_regexp(_._starting_pattern,!0),this._match_pattern=this._input.get_regexp(_._match_pattern,!0),this._until_pattern=this._input.get_regexp(_._until_pattern),this._until_after=_._until_after)}w.prototype.read=function(){var f=this._input.read(this._starting_pattern);return(!this._starting_pattern||f)&&(f+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),f},w.prototype.read_match=function(){return this._input.match(this._match_pattern)},w.prototype.until_after=function(f){var _=this._create();return _._until_after=!0,_._until_pattern=this._input.get_regexp(f),_._update(),_},w.prototype.until=function(f){var _=this._create();return _._until_after=!1,_._until_pattern=this._input.get_regexp(f),_._update(),_},w.prototype.starting_with=function(f){var _=this._create();return _._starting_pattern=this._input.get_regexp(f,!0),_._update(),_},w.prototype.matching=function(f){var _=this._create();return _._match_pattern=this._input.get_regexp(f,!0),_._update(),_},w.prototype._create=function(){return new w(this._input,this)},w.prototype._update=function(){},F.exports.Pattern=w},function(F){function w(f,_){f=typeof f=="string"?f:f.source,_=typeof _=="string"?_:_.source,this.__directives_block_pattern=new RegExp(f+/ beautify( \w+[:]\w+)+ /.source+_,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(f+/\sbeautify\signore:end\s/.source+_,"g")}w.prototype.get_directives=function(f){if(!f.match(this.__directives_block_pattern))return null;var _={};this.__directive_pattern.lastIndex=0;for(var y=this.__directive_pattern.exec(f);y;)_[y[1]]=y[2],y=this.__directive_pattern.exec(f);return _},w.prototype.readIgnored=function(f){return f.readUntilAfter(this.__directives_end_ignore_pattern)},F.exports.Directives=w},function(F,w,f){var _=f(12).Pattern,y={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function U(K,O){_.call(this,K,O),this.__template_pattern=null,this._disabled=Object.assign({},y),this._excluded=Object.assign({},y),O&&(this.__template_pattern=this._input.get_regexp(O.__template_pattern),this._excluded=Object.assign(this._excluded,O._excluded),this._disabled=Object.assign(this._disabled,O._disabled));var I=new _(K);this.__patterns={handlebars_comment:I.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:I.starting_with(/{{{/).until_after(/}}}/),handlebars:I.starting_with(/{{/).until_after(/}}/),php:I.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:I.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:I.starting_with(/{%/).until_after(/%}/),django_value:I.starting_with(/{{/).until_after(/}}/),django_comment:I.starting_with(/{#/).until_after(/#}/),smarty:I.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:I.starting_with(/{\*/).until_after(/\*}/),smarty_literal:I.starting_with(/{literal}/).until_after(/{\/literal}/)}}U.prototype=new _,U.prototype._create=function(){return new U(this._input,this)},U.prototype._update=function(){this.__set_templated_pattern()},U.prototype.disable=function(K){var O=this._create();return O._disabled[K]=!0,O._update(),O},U.prototype.read_options=function(K){var O=this._create();for(var I in y)O._disabled[I]=K.templating.indexOf(I)===-1;return O._update(),O},U.prototype.exclude=function(K){var O=this._create();return O._excluded[K]=!0,O._update(),O},U.prototype.read=function(){var K="";this._match_pattern?K=this._input.read(this._starting_pattern):K=this._input.read(this._starting_pattern,this.__template_pattern);for(var O=this._read_template();O;)this._match_pattern?O+=this._input.read(this._match_pattern):O+=this._input.readUntil(this.__template_pattern),K+=O,O=this._read_template();return this._until_after&&(K+=this._input.readUntilAfter(this._until_pattern)),K},U.prototype.__set_templated_pattern=function(){var K=[];this._disabled.php||K.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||K.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||K.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||K.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(K.push(this.__patterns.django._starting_pattern.source),K.push(this.__patterns.django_value._starting_pattern.source),K.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||K.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&K.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+K.join("|")+")")},U.prototype._read_template=function(){var K="",O=this._input.peek();if(O==="<"){var I=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&I==="?"&&(K=K||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&I==="%"&&(K=K||this.__patterns.erb.read())}else O==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(K=K||this.__patterns.handlebars_comment.read(),K=K||this.__patterns.handlebars_unescaped.read(),K=K||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(K=K||this.__patterns.django_value.read()),this._excluded.django||(K=K||this.__patterns.django_comment.read(),K=K||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(K=K||this.__patterns.smarty_comment.read(),K=K||this.__patterns.smarty_literal.read(),K=K||this.__patterns.smarty.read()));return K},F.exports.TemplatablePattern=U},,,,function(F,w,f){var _=f(19).Beautifier,y=f(20).Options;function U(K,O,I,H){var te=new _(K,O,I,H);return te.beautify()}F.exports=U,F.exports.defaultOptions=function(){return new y}},function(F,w,f){var _=f(20).Options,y=f(2).Output,U=f(21).Tokenizer,K=f(21).TOKEN,O=/\r\n|[\r\n]/,I=/\r\n|[\r\n]/g,H=function(Y,B){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=Y.max_preserve_newlines,this.preserve_newlines=Y.preserve_newlines,this._output=new y(Y,B)};H.prototype.current_line_has_match=function(Y){return this._output.current_line.has_match(Y)},H.prototype.set_space_before_token=function(Y,B){this._output.space_before_token=Y,this._output.non_breaking_space=B},H.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},H.prototype.add_raw_token=function(Y){this._output.add_raw_token(Y)},H.prototype.print_preserved_newlines=function(Y){var B=0;Y.type!==K.TEXT&&Y.previous.type!==K.TEXT&&(B=Y.newlines?1:0),this.preserve_newlines&&(B=Y.newlines<this.max_preserve_newlines+1?Y.newlines:this.max_preserve_newlines+1);for(var Z=0;Z<B;Z++)this.print_newline(Z>0);return B!==0},H.prototype.traverse_whitespace=function(Y){return Y.whitespace_before||Y.newlines?(this.print_preserved_newlines(Y)||(this._output.space_before_token=!0),!0):!1},H.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},H.prototype.print_newline=function(Y){this._output.add_new_line(Y)},H.prototype.print_token=function(Y){Y.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(Y.text))},H.prototype.indent=function(){this.indent_level++},H.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},H.prototype.get_full_indent=function(Y){return Y=this.indent_level+(Y||0),Y<1?"":this._output.get_indent_string(Y)};var te=function(Y){for(var B=null,Z=Y.next;Z.type!==K.EOF&&Y.closed!==Z;){if(Z.type===K.ATTRIBUTE&&Z.text==="type"){Z.next&&Z.next.type===K.EQUALS&&Z.next.next&&Z.next.next.type===K.VALUE&&(B=Z.next.next.text);break}Z=Z.next}return B},S=function(Y,B){var Z=null,X=null;return B.closed?(Y==="script"?Z="text/javascript":Y==="style"&&(Z="text/css"),Z=te(B)||Z,Z.search("text/css")>-1?X="css":Z.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?X="javascript":Z.search(/(text|application|dojo)\/(x-)?(html)/)>-1?X="html":Z.search(/test\/null/)>-1&&(X="null"),X):null};function j(Y,B){return B.indexOf(Y)!==-1}function ae(Y,B,Z){this.parent=Y||null,this.tag=B?B.tag_name:"",this.indent_level=Z||0,this.parser_token=B||null}function de(Y){this._printer=Y,this._current_frame=null}de.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},de.prototype.record_tag=function(Y){var B=new ae(this._current_frame,Y,this._printer.indent_level);this._current_frame=B},de.prototype._try_pop_frame=function(Y){var B=null;return Y&&(B=Y.parser_token,this._printer.indent_level=Y.indent_level,this._current_frame=Y.parent),B},de.prototype._get_frame=function(Y,B){for(var Z=this._current_frame;Z&&Y.indexOf(Z.tag)===-1;){if(B&&B.indexOf(Z.tag)!==-1){Z=null;break}Z=Z.parent}return Z},de.prototype.try_pop=function(Y,B){var Z=this._get_frame([Y],B);return this._try_pop_frame(Z)},de.prototype.indent_to_tag=function(Y){var B=this._get_frame(Y);B&&(this._printer.indent_level=B.indent_level)};function Se(Y,B,Z,X){this._source_text=Y||"",B=B||{},this._js_beautify=Z,this._css_beautify=X,this._tag_stack=null;var le=new _(B,"html");this._options=le,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}Se.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var Y=this._source_text,B=this._options.eol;this._options.eol==="auto"&&(B=`
|
|
|
`,Y&&O.test(Y)&&(B=Y.match(O)[0])),Y=Y.replace(I,`
|
|
|
`);var Z=Y.match(/^[\t ]*/)[0],X={text:"",type:""},le=new we(this._options),q=new H(this._options,Z),b=new U(Y,this._options).tokenize();this._tag_stack=new de(q);for(var x=null,G=b.next();G.type!==K.EOF;)G.type===K.TAG_OPEN||G.type===K.COMMENT?(x=this._handle_tag_open(q,G,le,X,b),le=x):G.type===K.ATTRIBUTE||G.type===K.EQUALS||G.type===K.VALUE||G.type===K.TEXT&&!le.tag_complete?x=this._handle_inside_tag(q,G,le,X):G.type===K.TAG_CLOSE?x=this._handle_tag_close(q,G,le):G.type===K.TEXT?x=this._handle_text(q,G,le):G.type===K.CONTROL_FLOW_OPEN?x=this._handle_control_flow_open(q,G):G.type===K.CONTROL_FLOW_CLOSE?x=this._handle_control_flow_close(q,G):q.add_raw_token(G),X=x,G=b.next();var ue=q._output.get_code(B);return ue},Se.prototype._handle_control_flow_open=function(Y,B){var Z={text:B.text,type:B.type};return Y.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),B.newlines?Y.print_preserved_newlines(B):Y.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),Y.print_token(B),Y.indent(),Z},Se.prototype._handle_control_flow_close=function(Y,B){var Z={text:B.text,type:B.type};return Y.deindent(),B.newlines?Y.print_preserved_newlines(B):Y.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),Y.print_token(B),Z},Se.prototype._handle_tag_close=function(Y,B,Z){var X={text:B.text,type:B.type};return Y.alignment_size=0,Z.tag_complete=!0,Y.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),Z.is_unformatted?Y.add_raw_token(B):(Z.tag_start_char==="<"&&(Y.set_space_before_token(B.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&Z.has_wrapped_attrs&&Y.print_newline(!1)),Y.print_token(B)),Z.indent_content&&!(Z.is_unformatted||Z.is_content_unformatted)&&(Y.indent(),Z.indent_content=!1),!Z.is_inline_element&&!(Z.is_unformatted||Z.is_content_unformatted)&&Y.set_wrap_point(),X},Se.prototype._handle_inside_tag=function(Y,B,Z,X){var le=Z.has_wrapped_attrs,q={text:B.text,type:B.type};return Y.set_space_before_token(B.newlines||B.whitespace_before!=="",!0),Z.is_unformatted?Y.add_raw_token(B):Z.tag_start_char==="{"&&B.type===K.TEXT?Y.print_preserved_newlines(B)?(B.newlines=0,Y.add_raw_token(B)):Y.print_token(B):(B.type===K.ATTRIBUTE?Y.set_space_before_token(!0):(B.type===K.EQUALS||B.type===K.VALUE&&B.previous.type===K.EQUALS)&&Y.set_space_before_token(!1),B.type===K.ATTRIBUTE&&Z.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(Y.traverse_whitespace(B),le=le||B.newlines!==0),this._is_wrap_attributes_force&&Z.attr_count>=this._options.wrap_attributes_min_attrs&&(X.type!==K.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(Y.print_newline(!1),le=!0)),Y.print_token(B),le=le||Y.previous_token_wrapped(),Z.has_wrapped_attrs=le),q},Se.prototype._handle_text=function(Y,B,Z){var X={text:B.text,type:"TK_CONTENT"};return Z.custom_beautifier_name?this._print_custom_beatifier_text(Y,B,Z):Z.is_unformatted||Z.is_content_unformatted?Y.add_raw_token(B):(Y.traverse_whitespace(B),Y.print_token(B)),X},Se.prototype._print_custom_beatifier_text=function(Y,B,Z){var X=this;if(B.text!==""){var le=B.text,q,b=1,x="",G="";Z.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?q=this._js_beautify:Z.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?q=this._css_beautify:Z.custom_beautifier_name==="html"&&(q=function(pt,ct){var ht=new Se(pt,ct,X._js_beautify,X._css_beautify);return ht.beautify()}),this._options.indent_scripts==="keep"?b=0:this._options.indent_scripts==="separate"&&(b=-Y.indent_level);var ue=Y.get_full_indent(b);if(le=le.replace(/\n[ \t]*$/,""),Z.custom_beautifier_name!=="html"&&le[0]==="<"&&le.match(/^(<!--|<!\[CDATA\[)/)){var ze=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(le);if(!ze){Y.add_raw_token(B);return}x=ue+ze[1]+`
|
|
|
`,le=ze[4],ze[5]&&(G=ue+ze[5]),le=le.replace(/\n[ \t]*$/,""),(ze[2]||ze[3].indexOf(`
|
|
|
`)!==-1)&&(ze=ze[3].match(/[ \t]+$/),ze&&(B.whitespace_before=ze[0]))}if(le)if(q){var Xe=function(){this.eol=`
|
|
|
`};Xe.prototype=this._options.raw_options;var Ke=new Xe;le=q(ue+le,Ke)}else{var Ze=B.whitespace_before;Ze&&(le=le.replace(new RegExp(`
|
|
|
(`+Ze+")?","g"),`
|
|
|
`)),le=ue+le.replace(/\n/g,`
|
|
|
`+ue)}x&&(le?le=x+le+`
|
|
|
`+G:le=x+G),Y.print_newline(!1),le&&(B.text=le,B.whitespace_before="",B.newlines=0,Y.add_raw_token(B),Y.print_newline(!0))}},Se.prototype._handle_tag_open=function(Y,B,Z,X,le){var q=this._get_tag_open_token(B);if((Z.is_unformatted||Z.is_content_unformatted)&&!Z.is_empty_element&&B.type===K.TAG_OPEN&&!q.is_start_tag?(Y.add_raw_token(B),q.start_tag_token=this._tag_stack.try_pop(q.tag_name)):(Y.traverse_whitespace(B),this._set_tag_position(Y,B,q,Z,X),q.is_inline_element||Y.set_wrap_point(),Y.print_token(B)),q.is_start_tag&&this._is_wrap_attributes_force){var b=0,x;do x=le.peek(b),x.type===K.ATTRIBUTE&&(q.attr_count+=1),b+=1;while(x.type!==K.EOF&&x.type!==K.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(q.alignment_size=B.text.length+1),!q.tag_complete&&!q.is_unformatted&&(Y.alignment_size=q.alignment_size),q};var we=function(Y,B,Z){if(this.parent=B||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!Z)this.tag_complete=!0;else{var X;this.tag_start_char=Z.text[0],this.text=Z.text,this.tag_start_char==="<"?(X=Z.text.match(/^<([^\s>]*)/),this.tag_check=X?X[1]:""):(X=Z.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=X?X[1]:"",(Z.text.startsWith("{{#>")||Z.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&Z.next!==null?this.tag_check=Z.next.text.split(" ")[0]:this.tag_check=Z.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),Z.type===K.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||Z.closed&&Z.closed.text==="/>";var le=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(le=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!Y.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(le)))}};Se.prototype._get_tag_open_token=function(Y){var B=new we(this._options,this._tag_stack.get_parser_token(),Y);return B.alignment_size=this._options.wrap_attributes_indent_size,B.is_end_tag=B.is_end_tag||j(B.tag_check,this._options.void_elements),B.is_empty_element=B.tag_complete||B.is_start_tag&&B.is_end_tag,B.is_unformatted=!B.tag_complete&&j(B.tag_check,this._options.unformatted),B.is_content_unformatted=!B.is_empty_element&&j(B.tag_check,this._options.content_unformatted),B.is_inline_element=j(B.tag_name,this._options.inline)||this._options.inline_custom_elements&&B.tag_name.includes("-")||B.tag_start_char==="{",B},Se.prototype._set_tag_position=function(Y,B,Z,X,le){if(Z.is_empty_element||(Z.is_end_tag?Z.start_tag_token=this._tag_stack.try_pop(Z.tag_name):(this._do_optional_end_element(Z)&&(Z.is_inline_element||Y.print_newline(!1)),this._tag_stack.record_tag(Z),(Z.tag_name==="script"||Z.tag_name==="style")&&!(Z.is_unformatted||Z.is_content_unformatted)&&(Z.custom_beautifier_name=S(Z.tag_check,B)))),j(Z.tag_check,this._options.extra_liners)&&(Y.print_newline(!1),Y._output.just_added_blankline()||Y.print_newline(!0)),Z.is_empty_element){if(Z.tag_start_char==="{"&&Z.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),Z.indent_content=!0;var q=Y.current_line_has_match(/{{#if/);q||Y.print_newline(!1)}Z.tag_name==="!--"&&le.type===K.TAG_CLOSE&&X.is_end_tag&&Z.text.indexOf(`
|
|
|
`)===-1||(Z.is_inline_element||Z.is_unformatted||Y.print_newline(!1),this._calcluate_parent_multiline(Y,Z))}else if(Z.is_end_tag){var b=!1;b=Z.start_tag_token&&Z.start_tag_token.multiline_content,b=b||!Z.is_inline_element&&!(X.is_inline_element||X.is_unformatted)&&!(le.type===K.TAG_CLOSE&&Z.start_tag_token===X)&&le.type!=="TK_CONTENT",(Z.is_content_unformatted||Z.is_unformatted)&&(b=!1),b&&Y.print_newline(!1)}else Z.indent_content=!Z.custom_beautifier_name,Z.tag_start_char==="<"&&(Z.tag_name==="html"?Z.indent_content=this._options.indent_inner_html:Z.tag_name==="head"?Z.indent_content=this._options.indent_head_inner_html:Z.tag_name==="body"&&(Z.indent_content=this._options.indent_body_inner_html)),!(Z.is_inline_element||Z.is_unformatted)&&(le.type!=="TK_CONTENT"||Z.is_content_unformatted)&&Y.print_newline(!1),this._calcluate_parent_multiline(Y,Z)},Se.prototype._calcluate_parent_multiline=function(Y,B){B.parent&&Y._output.just_added_newline()&&!((B.is_inline_element||B.is_unformatted)&&B.parent.is_inline_element)&&(B.parent.multiline_content=!0)};var Me=["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"];Se.prototype._do_optional_end_element=function(Y){var B=null;if(!(Y.is_empty_element||!Y.is_start_tag||!Y.parent)){if(Y.tag_name==="body")B=B||this._tag_stack.try_pop("head");else if(Y.tag_name==="li")B=B||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(Y.tag_name==="dd"||Y.tag_name==="dt")B=B||this._tag_stack.try_pop("dt",["dl"]),B=B||this._tag_stack.try_pop("dd",["dl"]);else if(Y.parent.tag_name==="p"&&Me.indexOf(Y.tag_name)!==-1){var Z=Y.parent.parent;(!Z||$e.indexOf(Z.tag_name)===-1)&&(B=B||this._tag_stack.try_pop("p"))}else Y.tag_name==="rp"||Y.tag_name==="rt"?(B=B||this._tag_stack.try_pop("rt",["ruby","rtc"]),B=B||this._tag_stack.try_pop("rp",["ruby","rtc"])):Y.tag_name==="optgroup"?B=B||this._tag_stack.try_pop("optgroup",["select"]):Y.tag_name==="option"?B=B||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):Y.tag_name==="colgroup"?B=B||this._tag_stack.try_pop("caption",["table"]):Y.tag_name==="thead"?(B=B||this._tag_stack.try_pop("caption",["table"]),B=B||this._tag_stack.try_pop("colgroup",["table"])):Y.tag_name==="tbody"||Y.tag_name==="tfoot"?(B=B||this._tag_stack.try_pop("caption",["table"]),B=B||this._tag_stack.try_pop("colgroup",["table"]),B=B||this._tag_stack.try_pop("thead",["table"]),B=B||this._tag_stack.try_pop("tbody",["table"])):Y.tag_name==="tr"?(B=B||this._tag_stack.try_pop("caption",["table"]),B=B||this._tag_stack.try_pop("colgroup",["table"]),B=B||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(Y.tag_name==="th"||Y.tag_name==="td")&&(B=B||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),B=B||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return Y.parent=this._tag_stack.get_parser_token(),B}},F.exports.Beautifier=Se},function(F,w,f){var _=f(6).Options;function y(U){_.call(this,U,"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"])}y.prototype=new _,F.exports.Options=y},function(F,w,f){var _=f(9).Tokenizer,y=f(9).TOKEN,U=f(13).Directives,K=f(14).TemplatablePattern,O=f(12).Pattern,I={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:y.START,RAW:y.RAW,EOF:y.EOF},H=new U(/<\!--/,/-->/),te=function(S,j){_.call(this,S,j),this._current_tag_name="";var ae=new K(this._input).read_options(this._options),de=new O(this._input);if(this.__patterns={word:ae.until(/[\n\r\t <]/),word_control_flow_close_excluded:ae.until(/[\n\r\t <}]/),single_quote:ae.until_after(/'/),double_quote:ae.until_after(/"/),attribute:ae.until(/[\n\r\t =>]|\/>/),element_name:ae.until(/[\n\r\t >\/]/),angular_control_flow_start:de.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:de.starting_with(/{{!--/).until_after(/--}}/),handlebars:de.starting_with(/{{/).until_after(/}}/),handlebars_open:de.until(/[\n\r\t }]/),handlebars_raw_close:de.until(/}}/),comment:de.starting_with(/<!--/).until_after(/-->/),cdata:de.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:de.starting_with(/<!\[/).until_after(/]>/),processing:de.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var Se=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=de.matching(Se).until_after(Se)}};te.prototype=new _,te.prototype._is_comment=function(S){return!1},te.prototype._is_opening=function(S){return S.type===I.TAG_OPEN||S.type===I.CONTROL_FLOW_OPEN},te.prototype._is_closing=function(S,j){return S.type===I.TAG_CLOSE&&j&&((S.text===">"||S.text==="/>")&&j.text[0]==="<"||S.text==="}}"&&j.text[0]==="{"&&j.text[1]==="{")||S.type===I.CONTROL_FLOW_CLOSE&&S.text==="}"&&j.text.endsWith("{")},te.prototype._reset=function(){this._current_tag_name=""},te.prototype._get_next_token=function(S,j){var ae=null;this._readWhitespace();var de=this._input.peek();return de===null?this._create_token(I.EOF,""):(ae=ae||this._read_open_handlebars(de,j),ae=ae||this._read_attribute(de,S,j),ae=ae||this._read_close(de,j),ae=ae||this._read_script_and_style(de,S),ae=ae||this._read_control_flows(de,j),ae=ae||this._read_raw_content(de,S,j),ae=ae||this._read_content_word(de,j),ae=ae||this._read_comment_or_cdata(de),ae=ae||this._read_processing(de),ae=ae||this._read_open(de,j),ae=ae||this._create_token(I.UNKNOWN,this._input.next()),ae)},te.prototype._read_comment_or_cdata=function(S){var j=null,ae=null,de=null;if(S==="<"){var Se=this._input.peek(1);Se==="!"&&(ae=this.__patterns.comment.read(),ae?(de=H.get_directives(ae),de&&de.ignore==="start"&&(ae+=H.readIgnored(this._input))):ae=this.__patterns.cdata.read()),ae&&(j=this._create_token(I.COMMENT,ae),j.directives=de)}return j},te.prototype._read_processing=function(S){var j=null,ae=null,de=null;if(S==="<"){var Se=this._input.peek(1);(Se==="!"||Se==="?")&&(ae=this.__patterns.conditional_comment.read(),ae=ae||this.__patterns.processing.read()),ae&&(j=this._create_token(I.COMMENT,ae),j.directives=de)}return j},te.prototype._read_open=function(S,j){var ae=null,de=null;return(!j||j.type===I.CONTROL_FLOW_OPEN)&&S==="<"&&(ae=this._input.next(),this._input.peek()==="/"&&(ae+=this._input.next()),ae+=this.__patterns.element_name.read(),de=this._create_token(I.TAG_OPEN,ae)),de},te.prototype._read_open_handlebars=function(S,j){var ae=null,de=null;return(!j||j.type===I.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&S==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(ae=this.__patterns.handlebars_comment.read(),ae=ae||this.__patterns.handlebars.read(),de=this._create_token(I.COMMENT,ae)):(ae=this.__patterns.handlebars_open.read(),de=this._create_token(I.TAG_OPEN,ae))),de},te.prototype._read_control_flows=function(S,j){var ae="",de=null;if(!this._options.templating.includes("angular"))return de;if(S==="@"){if(ae=this.__patterns.angular_control_flow_start.read(),ae==="")return de;for(var Se=ae.endsWith("(")?1:0,we=0;!(ae.endsWith("{")&&Se===we);){var Me=this._input.next();if(Me===null)break;Me==="("?Se++:Me===")"&&we++,ae+=Me}de=this._create_token(I.CONTROL_FLOW_OPEN,ae)}else S==="}"&&j&&j.type===I.CONTROL_FLOW_OPEN&&(ae=this._input.next(),de=this._create_token(I.CONTROL_FLOW_CLOSE,ae));return de},te.prototype._read_close=function(S,j){var ae=null,de=null;return j&&j.type===I.TAG_OPEN&&(j.text[0]==="<"&&(S===">"||S==="/"&&this._input.peek(1)===">")?(ae=this._input.next(),S==="/"&&(ae+=this._input.next()),de=this._create_token(I.TAG_CLOSE,ae)):j.text[0]==="{"&&S==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),de=this._create_token(I.TAG_CLOSE,"}}"))),de},te.prototype._read_attribute=function(S,j,ae){var de=null,Se="";if(ae&&ae.text[0]==="<")if(S==="=")de=this._create_token(I.EQUALS,this._input.next());else if(S==='"'||S==="'"){var we=this._input.next();S==='"'?we+=this.__patterns.double_quote.read():we+=this.__patterns.single_quote.read(),de=this._create_token(I.VALUE,we)}else Se=this.__patterns.attribute.read(),Se&&(j.type===I.EQUALS?de=this._create_token(I.VALUE,Se):de=this._create_token(I.ATTRIBUTE,Se));return de},te.prototype._is_content_unformatted=function(S){return this._options.void_elements.indexOf(S)===-1&&(this._options.content_unformatted.indexOf(S)!==-1||this._options.unformatted.indexOf(S)!==-1)},te.prototype._read_raw_content=function(S,j,ae){var de="";if(ae&&ae.text[0]==="{")de=this.__patterns.handlebars_raw_close.read();else if(j.type===I.TAG_CLOSE&&j.opened.text[0]==="<"&&j.text[0]!=="/"){var Se=j.opened.text.substr(1).toLowerCase();this._is_content_unformatted(Se)&&(de=this._input.readUntil(new RegExp("</"+Se+"[\\n\\r\\t ]*?>","ig")))}return de?this._create_token(I.TEXT,de):null},te.prototype._read_script_and_style=function(S,j){if(j.type===I.TAG_CLOSE&&j.opened.text[0]==="<"&&j.text[0]!=="/"){var ae=j.opened.text.substr(1).toLowerCase();if(ae==="script"||ae==="style"){var de=this._read_comment_or_cdata(S);if(de)return de.type=I.TEXT,de;var Se=this._input.readUntil(new RegExp("</"+ae+"[\\n\\r\\t ]*?>","ig"));if(Se)return this._create_token(I.TEXT,Se)}}return null},te.prototype._read_content_word=function(S,j){var ae="";return this._options.unformatted_content_delimiter&&S===this._options.unformatted_content_delimiter[0]&&(ae=this.__patterns.unformatted_content_delimiter.read()),ae||(ae=j&&j.type===I.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),ae?this._create_token(I.TEXT,ae):null},F.exports.Tokenizer=te,F.exports.TOKEN=I}],Ee={};function o(F){var w=Ee[F];if(w!==void 0)return w.exports;var f=Ee[F]={exports:{}};return ve[F](f,f.exports,o),f.exports}var $=o(18);me=$})();var Ie=me;if(1)R=[D,D(58553),D(87804)],_e=function(ve){var Ee=D(58553),o=D(87804);return{html_beautify:function($,F){return Ie($,F,Ee.js_beautify,o.css_beautify)}}}.apply(st,R),_e!==void 0&&($t.exports=_e);else var fe,re})()},58553:function($t,st){var D,R;(function(){var _e;(function(){"use strict";var Ie=[function(Ee,o,$){var F=$(1).Beautifier,w=$(5).Options;function f(_,y){var U=new F(_,y);return U.beautify()}Ee.exports=f,Ee.exports.defaultOptions=function(){return new w}},function(Ee,o,$){var F=$(2).Output,w=$(3).Token,f=$(4),_=$(5).Options,y=$(7).Tokenizer,U=$(7).line_starters,K=$(7).positionable_operators,O=$(7).TOKEN;function I(x,G){return G.indexOf(x)!==-1}function H(x){return x.replace(/^\s+/g,"")}function te(x){for(var G={},ue=0;ue<x.length;ue++)G[x[ue].replace(/-/g,"_")]=x[ue];return G}function S(x,G){return x&&x.type===O.RESERVED&&x.text===G}function j(x,G){return x&&x.type===O.RESERVED&&I(x.text,G)}var ae=["case","return","do","if","throw","else","await","break","continue","async"],de=["before-newline","after-newline","preserve-newline"],Se=te(de),we=[Se.before_newline,Se.preserve_newline],Me={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function $e(x,G){G.multiline_frame||G.mode===Me.ForInitializer||G.mode===Me.Conditional||x.remove_indent(G.start_line_index)}function Y(x){x=x.replace(f.allLineBreaks,`
|
|
|
`);for(var G=[],ue=x.indexOf(`
|
|
|
`);ue!==-1;)G.push(x.substring(0,ue)),x=x.substring(ue+1),ue=x.indexOf(`
|
|
|
`);return x.length&&G.push(x),G}function B(x){return x===Me.ArrayLiteral}function Z(x){return I(x,[Me.Expression,Me.ForInitializer,Me.Conditional])}function X(x,G){for(var ue=0;ue<x.length;ue++){var ze=x[ue].trim();if(ze.charAt(0)!==G)return!1}return!0}function le(x,G){for(var ue=0,ze=x.length,Xe;ue<ze;ue++)if(Xe=x[ue],Xe&&Xe.indexOf(G)!==0)return!1;return!0}function q(x,G){G=G||{},this._source_text=x||"",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 _(G)}q.prototype.create_flags=function(x,G){var ue=0;x&&(ue=x.indentation_level,!this._output.just_added_newline()&&x.line_indent_level>ue&&(ue=x.line_indent_level));var ze={mode:G,parent:x,last_token:x?x.last_token:new w(O.START_BLOCK,""),last_word:x?x.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:ue,alignment:0,line_indent_level:x?x.line_indent_level:ue,start_line_index:this._output.get_line_number(),ternary_depth:0};return ze},q.prototype._reset=function(x){var G=x.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new F(this._options,G),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(Me.BlockStatement);var ue=new y(x,this._options);return this._tokens=ue.tokenize(),x},q.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var x,G=this._reset(this._source_text),ue=this._options.eol;this._options.eol==="auto"&&(ue=`
|
|
|
`,G&&f.lineBreak.test(G||"")&&(ue=G.match(f.lineBreak)[0]));for(var ze=this._tokens.next();ze;)this.handle_token(ze),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ze,ze=this._tokens.next();return x=this._output.get_code(ue),x},q.prototype.handle_token=function(x,G){x.type===O.START_EXPR?this.handle_start_expr(x):x.type===O.END_EXPR?this.handle_end_expr(x):x.type===O.START_BLOCK?this.handle_start_block(x):x.type===O.END_BLOCK?this.handle_end_block(x):x.type===O.WORD?this.handle_word(x):x.type===O.RESERVED?this.handle_word(x):x.type===O.SEMICOLON?this.handle_semicolon(x):x.type===O.STRING?this.handle_string(x):x.type===O.EQUALS?this.handle_equals(x):x.type===O.OPERATOR?this.handle_operator(x):x.type===O.COMMA?this.handle_comma(x):x.type===O.BLOCK_COMMENT?this.handle_block_comment(x,G):x.type===O.COMMENT?this.handle_comment(x,G):x.type===O.DOT?this.handle_dot(x):x.type===O.EOF?this.handle_eof(x):x.type===O.UNKNOWN?this.handle_unknown(x,G):this.handle_unknown(x,G)},q.prototype.handle_whitespace_and_comments=function(x,G){var ue=x.newlines,ze=this._options.keep_array_indentation&&B(this._flags.mode);if(x.comments_before)for(var Xe=x.comments_before.next();Xe;)this.handle_whitespace_and_comments(Xe,G),this.handle_token(Xe,G),Xe=x.comments_before.next();if(ze)for(var Ke=0;Ke<ue;Ke+=1)this.print_newline(Ke>0,G);else if(this._options.max_preserve_newlines&&ue>this._options.max_preserve_newlines&&(ue=this._options.max_preserve_newlines),this._options.preserve_newlines&&ue>1){this.print_newline(!1,G);for(var Ze=1;Ze<ue;Ze+=1)this.print_newline(!0,G)}};var b=["async","break","continue","return","throw","yield"];q.prototype.allow_wrap_or_preserved_newline=function(x,G){if(G=G===void 0?!1:G,!this._output.just_added_newline()){var ue=this._options.preserve_newlines&&x.newlines||G,ze=I(this._flags.last_token.text,K)||I(x.text,K);if(ze){var Xe=I(this._flags.last_token.text,K)&&I(this._options.operator_position,we)||I(x.text,K);ue=ue&&Xe}if(ue)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(j(this._flags.last_token,b))return;this._output.set_wrap_point()}}},q.prototype.print_newline=function(x,G){if(!G&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==O.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var ue=this._tokens.peek();this._flags.mode===Me.Statement&&!(this._flags.if_block&&S(ue,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(x)&&(this._flags.multiline_frame=!0)},q.prototype.print_token_line_indentation=function(x){this._output.just_added_newline()&&(this._options.keep_array_indentation&&x.newlines&&(x.text==="["||B(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(x.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))},q.prototype.print_token=function(x){if(this._output.raw){this._output.add_raw_token(x);return}if(this._options.comma_first&&x.previous&&x.previous.type===O.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var G=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(G),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(x),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(x),this._output.non_breaking_space=!0,this._output.add_token(x.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},q.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},q.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))},q.prototype.set_mode=function(x){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,x),this._flags=this.create_flags(this._previous_flags,x),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},q.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===Me.Statement&&$e(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},q.prototype.start_of_object_property=function(){return this._flags.parent.mode===Me.ObjectLiteral&&this._flags.mode===Me.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||j(this._flags.last_token,["get","set"]))},q.prototype.start_of_statement=function(x){var G=!1;return G=G||j(this._flags.last_token,["var","let","const"])&&x.type===O.WORD,G=G||S(this._flags.last_token,"do"),G=G||!(this._flags.parent.mode===Me.ObjectLiteral&&this._flags.mode===Me.Statement)&&j(this._flags.last_token,b)&&!x.newlines,G=G||S(this._flags.last_token,"else")&&!(S(x,"if")&&!x.comments_before),G=G||this._flags.last_token.type===O.END_EXPR&&(this._previous_flags.mode===Me.ForInitializer||this._previous_flags.mode===Me.Conditional),G=G||this._flags.last_token.type===O.WORD&&this._flags.mode===Me.BlockStatement&&!this._flags.in_case&&!(x.text==="--"||x.text==="++")&&this._last_last_text!=="function"&&x.type!==O.WORD&&x.type!==O.RESERVED,G=G||this._flags.mode===Me.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||j(this._flags.last_token,["get","set"])),G?(this.set_mode(Me.Statement),this.indent(),this.handle_whitespace_and_comments(x,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(x,j(x,["do","for","if","while"])),!0):!1},q.prototype.handle_start_expr=function(x){this.start_of_statement(x)||this.handle_whitespace_and_comments(x);var G=Me.Expression;if(x.text==="["){if(this._flags.last_token.type===O.WORD||this._flags.last_token.text===")"){j(this._flags.last_token,U)&&(this._output.space_before_token=!0),this.print_token(x),this.set_mode(G),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}G=Me.ArrayLiteral,B(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),I(this._flags.last_token.type,[O.START_EXPR,O.END_EXPR,O.WORD,O.OPERATOR,O.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===O.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,G=Me.ForInitializer):I(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,G=Me.Conditional):I(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&x.whitespace_before===""?this._output.space_before_token=!1:(I(this._flags.last_token.text,U)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===O.EQUALS||this._flags.last_token.type===O.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(x);else if(this._flags.last_token.type===O.WORD){this._output.space_before_token=!1;var ue=this._tokens.peek(-3);if(this._options.space_after_named_function&&ue){var ze=this._tokens.peek(-4);j(ue,["async","function"])||ue.text==="*"&&j(ze,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Me.ObjectLiteral?(ue.text==="{"||ue.text===","||ue.text==="*"&&(ze.text==="{"||ze.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(x);(this._flags.last_token.type===O.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(I(this._last_last_text,["function","yield"])||this._flags.mode===Me.ObjectLiteral&&I(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===O.START_BLOCK?this.print_newline():(this._flags.last_token.type===O.END_EXPR||this._flags.last_token.type===O.START_EXPR||this._flags.last_token.type===O.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===O.COMMA)&&this.allow_wrap_or_preserved_newline(x,x.newlines),this.print_token(x),this.set_mode(G),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},q.prototype.handle_end_expr=function(x){for(;this._flags.mode===Me.Statement;)this.restore_mode();this.handle_whitespace_and_comments(x),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(x,x.text==="]"&&B(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===O.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(x),this.restore_mode(),$e(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Me.Conditional&&(this._previous_flags.mode=Me.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},q.prototype.handle_start_block=function(x){this.handle_whitespace_and_comments(x);var G=this._tokens.peek(),ue=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===O.END_EXPR?(this.set_mode(Me.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Me.BlockStatement):ue&&(I(ue.text,[":",","])&&I(G.type,[O.STRING,O.WORD,O.RESERVED])||I(G.text,["get","set","..."])&&I(ue.type,[O.WORD,O.RESERVED]))?I(this._last_last_text,["class","interface"])&&!I(ue.text,[":",","])?this.set_mode(Me.BlockStatement):this.set_mode(Me.ObjectLiteral):this._flags.last_token.type===O.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Me.BlockStatement):I(this._flags.last_token.type,[O.EQUALS,O.START_EXPR,O.COMMA,O.OPERATOR])||j(this._flags.last_token,["return","throw","import","default"])?this.set_mode(Me.ObjectLiteral):this.set_mode(Me.BlockStatement),this._flags.last_token&&j(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var ze=!G.comments_before&&G.text==="}",Xe=ze&&this._flags.last_word==="function"&&this._flags.last_token.type===O.END_EXPR;if(this._options.brace_preserve_inline){var Ke=0,Ze=null;this._flags.inline_frame=!0;do if(Ke+=1,Ze=this._tokens.peek(Ke-1),Ze.newlines){this._flags.inline_frame=!1;break}while(Ze.type!==O.EOF&&!(Ze.type===O.END_BLOCK&&Ze.opened===x))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&x.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==O.OPERATOR&&(Xe||this._flags.last_token.type===O.EQUALS||j(this._flags.last_token,ae)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(B(this._previous_flags.mode)&&(this._flags.last_token.type===O.START_EXPR||this._flags.last_token.type===O.COMMA)&&((this._flags.last_token.type===O.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===O.COMMA||this._flags.last_token.type===O.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(x),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==O.OPERATOR&&this._flags.last_token.type!==O.START_EXPR&&(I(this._flags.last_token.type,[O.START_BLOCK,O.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(x),this.indent(),!ze&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},q.prototype.handle_end_block=function(x){for(this.handle_whitespace_and_comments(x);this._flags.mode===Me.Statement;)this.restore_mode();var G=this._flags.last_token.type===O.START_BLOCK;this._flags.inline_frame&&!G?this._output.space_before_token=!0:this._options.brace_style==="expand"?G||this.print_newline():G||(B(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(x)},q.prototype.handle_word=function(x){if(x.type===O.RESERVED){if(I(x.text,["set","get"])&&this._flags.mode!==Me.ObjectLiteral)x.type=O.WORD;else if(x.text==="import"&&I(this._tokens.peek().text,["(","."]))x.type=O.WORD;else if(I(x.text,["as","from"])&&!this._flags.import_block)x.type=O.WORD;else if(this._flags.mode===Me.ObjectLiteral){var G=this._tokens.peek();G.text===":"&&(x.type=O.WORD)}}if(this.start_of_statement(x)?j(this._flags.last_token,["var","let","const"])&&x.type===O.WORD&&(this._flags.declaration_statement=!0):x.newlines&&!Z(this._flags.mode)&&(this._flags.last_token.type!==O.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==O.EQUALS&&(this._options.preserve_newlines||!j(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(x),this.print_newline()):this.handle_whitespace_and_comments(x),this._flags.do_block&&!this._flags.do_while)if(S(x,"while")){this._output.space_before_token=!0,this.print_token(x),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&&S(x,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===Me.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&j(x,["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(x),this._flags.in_case=!0;return}if((this._flags.last_token.type===O.COMMA||this._flags.last_token.type===O.START_EXPR||this._flags.last_token.type===O.EQUALS||this._flags.last_token.type===O.OPERATOR)&&!this.start_of_object_property()&&!(I(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===Me.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(x),S(x,"function")){(I(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(I(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===O.OPERATOR))&&!this._output.just_added_blankline()&&!x.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===O.RESERVED||this._flags.last_token.type===O.WORD?j(this._flags.last_token,["get","set","new","export"])||j(this._flags.last_token,b)?this._output.space_before_token=!0:S(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===O.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Z(this._flags.mode)||B(this._flags.mode))||this.print_newline(),this.print_token(x),this._flags.last_word=x.text;return}var ue="NONE";if(this._flags.last_token.type===O.END_BLOCK?this._previous_flags.inline_frame?ue="SPACE":j(x,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&x.newlines?ue="NEWLINE":(ue="SPACE",this._output.space_before_token=!0):ue="NEWLINE":this._flags.last_token.type===O.SEMICOLON&&this._flags.mode===Me.BlockStatement?ue="NEWLINE":this._flags.last_token.type===O.SEMICOLON&&Z(this._flags.mode)?ue="SPACE":this._flags.last_token.type===O.STRING?ue="NEWLINE":this._flags.last_token.type===O.RESERVED||this._flags.last_token.type===O.WORD||this._flags.last_token.text==="*"&&(I(this._last_last_text,["function","yield"])||this._flags.mode===Me.ObjectLiteral&&I(this._last_last_text,["{",","]))?ue="SPACE":this._flags.last_token.type===O.START_BLOCK?this._flags.inline_frame?ue="SPACE":ue="NEWLINE":this._flags.last_token.type===O.END_EXPR&&(this._output.space_before_token=!0,ue="NEWLINE"),j(x,U)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ue="SPACE":ue="NEWLINE"),j(x,["else","catch","finally"]))if((!(this._flags.last_token.type===O.END_BLOCK&&this._previous_flags.mode===Me.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&x.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ze=this._output.current_line;ze.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ue==="NEWLINE"?j(this._flags.last_token,ae)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&j(x,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==O.END_EXPR?(this._flags.last_token.type!==O.START_EXPR||!j(x,["var","let","const"]))&&this._flags.last_token.text!==":"&&(S(x,"if")&&S(x.previous,"else")?this._output.space_before_token=!0:this.print_newline()):j(x,U)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&B(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ue==="SPACE"&&(this._output.space_before_token=!0);x.previous&&(x.previous.type===O.WORD||x.previous.type===O.RESERVED)&&(this._output.space_before_token=!0),this.print_token(x),this._flags.last_word=x.text,x.type===O.RESERVED&&(x.text==="do"?this._flags.do_block=!0:x.text==="if"?this._flags.if_block=!0:x.text==="import"?this._flags.import_block=!0:this._flags.import_block&&S(x,"from")&&(this._flags.import_block=!1))},q.prototype.handle_semicolon=function(x){this.start_of_statement(x)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(x);for(var G=this._tokens.peek();this._flags.mode===Me.Statement&&!(this._flags.if_block&&S(G,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(x)},q.prototype.handle_string=function(x){x.text.startsWith("`")&&x.newlines===0&&x.whitespace_before===""&&(x.previous.text===")"||this._flags.last_token.type===O.WORD)||(this.start_of_statement(x)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(x),this._flags.last_token.type===O.RESERVED||this._flags.last_token.type===O.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===O.COMMA||this._flags.last_token.type===O.START_EXPR||this._flags.last_token.type===O.EQUALS||this._flags.last_token.type===O.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(x):x.text.startsWith("`")&&this._flags.last_token.type===O.END_EXPR&&(x.previous.text==="]"||x.previous.text===")")&&x.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(x)},q.prototype.handle_equals=function(x){this.start_of_statement(x)||this.handle_whitespace_and_comments(x),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(x),this._output.space_before_token=!0},q.prototype.handle_comma=function(x){this.handle_whitespace_and_comments(x,!0),this.print_token(x),this._output.space_before_token=!0,this._flags.declaration_statement?(Z(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(x)):this._flags.mode===Me.ObjectLiteral||this._flags.mode===Me.Statement&&this._flags.parent.mode===Me.ObjectLiteral?(this._flags.mode===Me.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(x)},q.prototype.handle_operator=function(x){var G=x.text==="*"&&(j(this._flags.last_token,["function","yield"])||I(this._flags.last_token.type,[O.START_BLOCK,O.COMMA,O.END_BLOCK,O.SEMICOLON])),ue=I(x.text,["-","+"])&&(I(this._flags.last_token.type,[O.START_BLOCK,O.START_EXPR,O.EQUALS,O.OPERATOR])||I(this._flags.last_token.text,U)||this._flags.last_token.text===",");if(!this.start_of_statement(x)){var ze=!G;this.handle_whitespace_and_comments(x,ze)}if(x.text==="*"&&this._flags.last_token.type===O.DOT){this.print_token(x);return}if(x.text==="::"){this.print_token(x);return}if(I(x.text,["-","+"])&&this.start_of_object_property()){this.print_token(x);return}if(this._flags.last_token.type===O.OPERATOR&&I(this._options.operator_position,we)&&this.allow_wrap_or_preserved_newline(x),x.text===":"&&this._flags.in_case){this.print_token(x),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==O.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var Xe=!0,Ke=!0,Ze=!1;if(x.text===":"?this._flags.ternary_depth===0?Xe=!1:(this._flags.ternary_depth-=1,Ze=!0):x.text==="?"&&(this._flags.ternary_depth+=1),!ue&&!G&&this._options.preserve_newlines&&I(x.text,K)){var pt=x.text===":",ct=pt&&Ze,ht=pt&&!Ze;switch(this._options.operator_position){case Se.before_newline:this._output.space_before_token=!ht,this.print_token(x),(!pt||ct)&&this.allow_wrap_or_preserved_newline(x),this._output.space_before_token=!0;return;case Se.after_newline:this._output.space_before_token=!0,!pt||ct?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(x):this._output.space_before_token=!1,this.print_token(x),this._output.space_before_token=!0;return;case Se.preserve_newline:ht||this.allow_wrap_or_preserved_newline(x),Xe=!(this._output.just_added_newline()||ht),this._output.space_before_token=Xe,this.print_token(x),this._output.space_before_token=!0;return}}if(G){this.allow_wrap_or_preserved_newline(x),Xe=!1;var jt=this._tokens.peek();Ke=jt&&I(jt.type,[O.WORD,O.RESERVED])}else if(x.text==="...")this.allow_wrap_or_preserved_newline(x),Xe=this._flags.last_token.type===O.START_BLOCK,Ke=!1;else if(I(x.text,["--","++","!","~"])||ue){if((this._flags.last_token.type===O.COMMA||this._flags.last_token.type===O.START_EXPR)&&this.allow_wrap_or_preserved_newline(x),Xe=!1,Ke=!1,x.newlines&&(x.text==="--"||x.text==="++"||x.text==="~")){var Zt=j(this._flags.last_token,ae)&&x.newlines;Zt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Zt,!0)}this._flags.last_token.text===";"&&Z(this._flags.mode)&&(Xe=!0),this._flags.last_token.type===O.RESERVED?Xe=!0:this._flags.last_token.type===O.END_EXPR?Xe=!(this._flags.last_token.text==="]"&&(x.text==="--"||x.text==="++")):this._flags.last_token.type===O.OPERATOR&&(Xe=I(x.text,["--","-","++","+"])&&I(this._flags.last_token.text,["--","-","++","+"]),I(x.text,["+","-"])&&I(this._flags.last_token.text,["--","++"])&&(Ke=!0)),(this._flags.mode===Me.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Me.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Xe,this.print_token(x),this._output.space_before_token=Ke},q.prototype.handle_block_comment=function(x,G){if(this._output.raw){this._output.add_raw_token(x),x.directives&&x.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(x.directives){this.print_newline(!1,G),this.print_token(x),x.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!f.newline.test(x.text)&&!x.newlines){this._output.space_before_token=!0,this.print_token(x),this._output.space_before_token=!0;return}else this.print_block_commment(x,G)},q.prototype.print_block_commment=function(x,G){var ue=Y(x.text),ze,Xe=!1,Ke=!1,Ze=x.whitespace_before,pt=Ze.length;if(this.print_newline(!1,G),this.print_token_line_indentation(x),this._output.add_token(ue[0]),this.print_newline(!1,G),ue.length>1){for(ue=ue.slice(1),Xe=X(ue,"*"),Ke=le(ue,Ze),Xe&&(this._flags.alignment=1),ze=0;ze<ue.length;ze++)Xe?(this.print_token_line_indentation(x),this._output.add_token(H(ue[ze]))):Ke&&ue[ze]?(this.print_token_line_indentation(x),this._output.add_token(ue[ze].substring(pt))):(this._output.current_line.set_indent(-1),this._output.add_token(ue[ze])),this.print_newline(!1,G);this._flags.alignment=0}},q.prototype.handle_comment=function(x,G){x.newlines?this.print_newline(!1,G):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(x),this.print_newline(!1,G)},q.prototype.handle_dot=function(x){this.start_of_statement(x)||this.handle_whitespace_and_comments(x,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),j(this._flags.last_token,ae)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(x,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(x)},q.prototype.handle_unknown=function(x,G){this.print_token(x),x.text[x.text.length-1]===`
|
|
|
`&&this.print_newline(!1,G)},q.prototype.handle_eof=function(x){for(;this._flags.mode===Me.Statement;)this.restore_mode();this.handle_whitespace_and_comments(x)},Ee.exports.Beautifier=q},function(Ee){function o(w){this.__parent=w,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var w=new o(this.__parent);return w.set_indent(this.__indent_count,this.__alignment_count),w},o.prototype.item=function(w){return w<0?this.__items[this.__items.length+w]:this.__items[w]},o.prototype.has_match=function(w){for(var f=this.__items.length-1;f>=0;f--)if(this.__items[f].match(w))return!0;return!1},o.prototype.set_indent=function(w,f){this.is_empty()&&(this.__indent_count=w||0,this.__alignment_count=f||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var w=this.__parent.current_line;return w.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),w.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),w.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,w.__items[0]===" "&&(w.__items.splice(0,1),w.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(w){this.__items.push(w);var f=w.lastIndexOf(`
|
|
|
`);f!==-1?this.__character_count=w.length-f:this.__character_count+=w.length},o.prototype.pop=function(){var w=null;return this.is_empty()||(w=this.__items.pop(),this.__character_count-=w.length),w},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var w="";return this.is_empty()?this.__parent.indent_empty_lines&&(w=this.__parent.get_indent_string(this.__indent_count)):(w=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),w+=this.__items.join("")),w};function $(w,f){this.__cache=[""],this.__indent_size=w.indent_size,this.__indent_string=w.indent_char,w.indent_with_tabs||(this.__indent_string=new Array(w.indent_size+1).join(w.indent_char)),f=f||"",w.indent_level>0&&(f=new Array(w.indent_level+1).join(this.__indent_string)),this.__base_string=f,this.__base_string_length=f.length}$.prototype.get_indent_size=function(w,f){var _=this.__base_string_length;return f=f||0,w<0&&(_=0),_+=w*this.__indent_size,_+=f,_},$.prototype.get_indent_string=function(w,f){var _=this.__base_string;return f=f||0,w<0&&(w=0,_=""),f+=w*this.__indent_size,this.__ensure_cache(f),_+=this.__cache[f],_},$.prototype.__ensure_cache=function(w){for(;w>=this.__cache.length;)this.__add_column()},$.prototype.__add_column=function(){var w=this.__cache.length,f=0,_="";this.__indent_size&&w>=this.__indent_size&&(f=Math.floor(w/this.__indent_size),w-=f*this.__indent_size,_=new Array(f+1).join(this.__indent_string)),w&&(_+=new Array(w+1).join(" ")),this.__cache.push(_)};function F(w,f){this.__indent_cache=new $(w,f),this.raw=!1,this._end_with_newline=w.end_with_newline,this.indent_size=w.indent_size,this.wrap_line_length=w.wrap_line_length,this.indent_empty_lines=w.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}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(w,f){return this.__indent_cache.get_indent_string(w,f)},F.prototype.get_indent_size=function(w,f){return this.__indent_cache.get_indent_size(w,f)},F.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},F.prototype.add_new_line=function(w){return this.is_empty()||!w&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},F.prototype.get_code=function(w){this.trim(!0);var f=this.current_line.pop();f&&(f[f.length-1]===`
|
|
|
`&&(f=f.replace(/\n+$/g,"")),this.current_line.push(f)),this._end_with_newline&&this.__add_outputline();var _=this.__lines.join(`
|
|
|
`);return w!==`
|
|
|
`&&(_=_.replace(/[\n]/g,w)),_},F.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},F.prototype.set_indent=function(w,f){return w=w||0,f=f||0,this.next_line.set_indent(w,f),this.__lines.length>1?(this.current_line.set_indent(w,f),!0):(this.current_line.set_indent(),!1)},F.prototype.add_raw_token=function(w){for(var f=0;f<w.newlines;f++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(w.whitespace_before),this.current_line.push(w.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},F.prototype.add_token=function(w){this.__add_space_before_token(),this.current_line.push(w),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(w){for(var f=this.__lines.length;w<f;)this.__lines[w]._remove_indent(),w++;this.current_line._remove_wrap_indent()},F.prototype.trim=function(w){for(w=w===void 0?!1:w,this.current_line.trim();w&&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(w,f){for(var _=this.__lines.length-2;_>=0;){var y=this.__lines[_];if(y.is_empty())break;if(y.item(0).indexOf(w)!==0&&y.item(-1)!==f){this.__lines.splice(_+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}_--}},Ee.exports.Output=F},function(Ee){function o($,F,w,f){this.type=$,this.text=F,this.comments_before=null,this.newlines=w||0,this.whitespace_before=f||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}Ee.exports.Token=o},function(Ee,o){var $="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",F="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",w="\\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",f="\\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",_="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",y="(?:"+_+"|["+$+w+"])",U="(?:"+_+"|["+F+w+f+"])*";o.identifier=new RegExp(y+U,"g"),o.identifierStart=new RegExp(y),o.identifierMatch=new RegExp("(?:"+_+"|["+F+w+f+"])+");var K=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;o.newline=/[\n\r\u2028\u2029]/,o.lineBreak=new RegExp(`\r
|
|
|
|`+o.newline.source),o.allLineBreaks=new RegExp(o.lineBreak.source,"g")},function(Ee,o,$){var F=$(6).Options,w=["before-newline","after-newline","preserve-newline"];function f(_){F.call(this,_,"js");var y=this.raw_options.brace_style||null;y==="expand-strict"?this.raw_options.brace_style="expand":y==="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 U=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var K=0;K<U.length;K++)U[K]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=U[K];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",w),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}f.prototype=new F,Ee.exports.Options=f},function(Ee){function o(w,f){this.raw_options=$(w,f),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(w,f){var _=this.raw_options[w],y=f||[];return typeof _=="object"?_!==null&&typeof _.concat=="function"&&(y=_.concat()):typeof _=="string"&&(y=_.split(/[^a-zA-Z0-9_\/\-]+/)),y},o.prototype._get_boolean=function(w,f){var _=this.raw_options[w],y=_===void 0?!!f:!!_;return y},o.prototype._get_characters=function(w,f){var _=this.raw_options[w],y=f||"";return typeof _=="string"&&(y=_.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),y},o.prototype._get_number=function(w,f){var _=this.raw_options[w];f=parseInt(f,10),isNaN(f)&&(f=0);var y=parseInt(_,10);return isNaN(y)&&(y=f),y},o.prototype._get_selection=function(w,f,_){var y=this._get_selection_list(w,f,_);if(y.length!==1)throw new Error("Invalid Option Value: The option '"+w+`' can only be one of the following values:
|
|
|
`+f+`
|
|
|
You passed in: '`+this.raw_options[w]+"'");return y[0]},o.prototype._get_selection_list=function(w,f,_){if(!f||f.length===0)throw new Error("Selection list cannot be empty.");if(_=_||[f[0]],!this._is_valid_selection(_,f))throw new Error("Invalid Default Value!");var y=this._get_array(w,_);if(!this._is_valid_selection(y,f))throw new Error("Invalid Option Value: The option '"+w+`' can contain only the following values:
|
|
|
`+f+`
|
|
|
You passed in: '`+this.raw_options[w]+"'");return y},o.prototype._is_valid_selection=function(w,f){return w.length&&f.length&&!w.some(function(_){return f.indexOf(_)===-1})};function $(w,f){var _={};w=F(w);var y;for(y in w)y!==f&&(_[y]=w[y]);if(f&&w[f])for(y in w[f])_[y]=w[f][y];return _}function F(w){var f={},_;for(_ in w){var y=_.replace(/-/g,"_");f[y]=w[_]}return f}Ee.exports.Options=o,Ee.exports.normalizeOpts=F,Ee.exports.mergeOpts=$},function(Ee,o,$){var F=$(8).InputScanner,w=$(9).Tokenizer,f=$(9).TOKEN,_=$(13).Directives,y=$(4),U=$(12).Pattern,K=$(14).TemplatablePattern;function O(X,le){return le.indexOf(X)!==-1}var I={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:f.START,RAW:f.RAW,EOF:f.EOF},H=new _(/\/\*/,/\*\//),te=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,S=/[0-9]/,j=/[^\d\.]/,ae=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),de=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";de=de.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),de="\\?\\.(?!\\d) "+de,de=de.replace(/ /g,"|");var Se=new RegExp(de),we="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Me=we.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),$e=new RegExp("^(?:"+Me.join("|")+")$"),Y,B=function(X,le){w.call(this,X,le),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var q=new U(this._input),b=new K(this._input).read_options(this._options);this.__patterns={template:b,identifier:b.starting_with(y.identifier).matching(y.identifierMatch),number:q.matching(te),punct:q.matching(Se),comment:q.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:q.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:q.matching(/<!--/),html_comment_end:q.matching(/-->/),include:q.starting_with(/#include/).until_after(y.lineBreak),shebang:q.starting_with(/#!/).until_after(y.lineBreak),xml:q.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:b.until(/['\\\n\r\u2028\u2029]/),double_quote:b.until(/["\\\n\r\u2028\u2029]/),template_text:b.until(/[`\\$]/),template_expression:b.until(/[`}\\]/)}};B.prototype=new w,B.prototype._is_comment=function(X){return X.type===I.COMMENT||X.type===I.BLOCK_COMMENT||X.type===I.UNKNOWN},B.prototype._is_opening=function(X){return X.type===I.START_BLOCK||X.type===I.START_EXPR},B.prototype._is_closing=function(X,le){return(X.type===I.END_BLOCK||X.type===I.END_EXPR)&&le&&(X.text==="]"&&le.text==="["||X.text===")"&&le.text==="("||X.text==="}"&&le.text==="{")},B.prototype._reset=function(){Y=!1},B.prototype._get_next_token=function(X,le){var q=null;this._readWhitespace();var b=this._input.peek();return b===null?this._create_token(I.EOF,""):(q=q||this._read_non_javascript(b),q=q||this._read_string(b),q=q||this._read_pair(b,this._input.peek(1)),q=q||this._read_word(X),q=q||this._read_singles(b),q=q||this._read_comment(b),q=q||this._read_regexp(b,X),q=q||this._read_xml(b,X),q=q||this._read_punctuation(),q=q||this._create_token(I.UNKNOWN,this._input.next()),q)},B.prototype._read_word=function(X){var le;if(le=this.__patterns.identifier.read(),le!=="")return le=le.replace(y.allLineBreaks,`
|
|
|
`),!(X.type===I.DOT||X.type===I.RESERVED&&(X.text==="set"||X.text==="get"))&&$e.test(le)?(le==="in"||le==="of")&&(X.type===I.WORD||X.type===I.STRING)?this._create_token(I.OPERATOR,le):this._create_token(I.RESERVED,le):this._create_token(I.WORD,le);if(le=this.__patterns.number.read(),le!=="")return this._create_token(I.WORD,le)},B.prototype._read_singles=function(X){var le=null;return X==="("||X==="["?le=this._create_token(I.START_EXPR,X):X===")"||X==="]"?le=this._create_token(I.END_EXPR,X):X==="{"?le=this._create_token(I.START_BLOCK,X):X==="}"?le=this._create_token(I.END_BLOCK,X):X===";"?le=this._create_token(I.SEMICOLON,X):X==="."&&j.test(this._input.peek(1))?le=this._create_token(I.DOT,X):X===","&&(le=this._create_token(I.COMMA,X)),le&&this._input.next(),le},B.prototype._read_pair=function(X,le){var q=null;return X==="#"&&le==="{"&&(q=this._create_token(I.START_BLOCK,X+le)),q&&(this._input.next(),this._input.next()),q},B.prototype._read_punctuation=function(){var X=this.__patterns.punct.read();if(X!=="")return X==="="?this._create_token(I.EQUALS,X):X==="?."?this._create_token(I.DOT,X):this._create_token(I.OPERATOR,X)},B.prototype._read_non_javascript=function(X){var le="";if(X==="#"){if(this._is_first_token()&&(le=this.__patterns.shebang.read(),le))return this._create_token(I.UNKNOWN,le.trim()+`
|
|
|
`);if(le=this.__patterns.include.read(),le)return this._create_token(I.UNKNOWN,le.trim()+`
|
|
|
`);X=this._input.next();var q="#";if(this._input.hasNext()&&this._input.testChar(S)){do X=this._input.next(),q+=X;while(this._input.hasNext()&&X!=="#"&&X!=="=");return X==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(q+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(q+="{}",this._input.next(),this._input.next())),this._create_token(I.WORD,q)}this._input.back()}else if(X==="<"&&this._is_first_token()){if(le=this.__patterns.html_comment_start.read(),le){for(;this._input.hasNext()&&!this._input.testChar(y.newline);)le+=this._input.next();return Y=!0,this._create_token(I.COMMENT,le)}}else if(Y&&X==="-"&&(le=this.__patterns.html_comment_end.read(),le))return Y=!1,this._create_token(I.COMMENT,le);return null},B.prototype._read_comment=function(X){var le=null;if(X==="/"){var q="";if(this._input.peek(1)==="*"){q=this.__patterns.block_comment.read();var b=H.get_directives(q);b&&b.ignore==="start"&&(q+=H.readIgnored(this._input)),q=q.replace(y.allLineBreaks,`
|
|
|
`),le=this._create_token(I.BLOCK_COMMENT,q),le.directives=b}else this._input.peek(1)==="/"&&(q=this.__patterns.comment.read(),le=this._create_token(I.COMMENT,q))}return le},B.prototype._read_string=function(X){if(X==="`"||X==="'"||X==='"'){var le=this._input.next();return this.has_char_escapes=!1,X==="`"?le+=this._read_string_recursive("`",!0,"${"):le+=this._read_string_recursive(X),this.has_char_escapes&&this._options.unescape_strings&&(le=Z(le)),this._input.peek()===X&&(le+=this._input.next()),le=le.replace(y.allLineBreaks,`
|
|
|
`),this._create_token(I.STRING,le)}return null},B.prototype._allow_regexp_or_xml=function(X){return X.type===I.RESERVED&&O(X.text,["return","case","throw","else","do","typeof","yield"])||X.type===I.END_EXPR&&X.text===")"&&X.opened.previous.type===I.RESERVED&&O(X.opened.previous.text,["if","while","for"])||O(X.type,[I.COMMENT,I.START_EXPR,I.START_BLOCK,I.START,I.END_BLOCK,I.OPERATOR,I.EQUALS,I.EOF,I.SEMICOLON,I.COMMA])},B.prototype._read_regexp=function(X,le){if(X==="/"&&this._allow_regexp_or_xml(le)){for(var q=this._input.next(),b=!1,x=!1;this._input.hasNext()&&(b||x||this._input.peek()!==X)&&!this._input.testChar(y.newline);)q+=this._input.peek(),b?b=!1:(b=this._input.peek()==="\\",this._input.peek()==="["?x=!0:this._input.peek()==="]"&&(x=!1)),this._input.next();return this._input.peek()===X&&(q+=this._input.next(),q+=this._input.read(y.identifier)),this._create_token(I.STRING,q)}return null},B.prototype._read_xml=function(X,le){if(this._options.e4x&&X==="<"&&this._allow_regexp_or_xml(le)){var q="",b=this.__patterns.xml.read_match();if(b){for(var x=b[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),G=x.indexOf("{")===0,ue=0;b;){var ze=!!b[1],Xe=b[2],Ke=!!b[b.length-1]||Xe.slice(0,8)==="![CDATA[";if(!Ke&&(Xe===x||G&&Xe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ze?--ue:++ue),q+=b[0],ue<=0)break;b=this.__patterns.xml.read_match()}return b||(q+=this._input.match(/[\s\S]*/g)[0]),q=q.replace(y.allLineBreaks,`
|
|
|
`),this._create_token(I.STRING,q)}}return null};function Z(X){for(var le="",q=0,b=new F(X),x=null;b.hasNext();)if(x=b.match(/([\s]|[^\\]|\\\\)+/g),x&&(le+=x[0]),b.peek()==="\\"){if(b.next(),b.peek()==="x")x=b.match(/x([0-9A-Fa-f]{2})/g);else if(b.peek()==="u")x=b.match(/u([0-9A-Fa-f]{4})/g),x||(x=b.match(/u\{([0-9A-Fa-f]+)\}/g));else{le+="\\",b.hasNext()&&(le+=b.next());continue}if(!x||(q=parseInt(x[1],16),q>126&&q<=255&&x[0].indexOf("x")===0))return X;q>=0&&q<32||q>1114111?le+="\\"+x[0]:q===34||q===39||q===92?le+="\\"+String.fromCharCode(q):le+=String.fromCharCode(q)}return le}B.prototype._read_string_recursive=function(X,le,q){var b,x;X==="'"?x=this.__patterns.single_quote:X==='"'?x=this.__patterns.double_quote:X==="`"?x=this.__patterns.template_text:X==="}"&&(x=this.__patterns.template_expression);for(var G=x.read(),ue="";this._input.hasNext();){if(ue=this._input.next(),ue===X||!le&&y.newline.test(ue)){this._input.back();break}else ue==="\\"&&this._input.hasNext()?(b=this._input.peek(),b==="x"||b==="u"?this.has_char_escapes=!0:b==="\r"&&this._input.peek(1)===`
|
|
|
`&&this._input.next(),ue+=this._input.next()):q&&(q==="${"&&ue==="$"&&this._input.peek()==="{"&&(ue+=this._input.next()),q===ue&&(X==="`"?ue+=this._read_string_recursive("}",le,"`"):ue+=this._read_string_recursive("`",le,"${"),this._input.hasNext()&&(ue+=this._input.next())));ue+=x.read(),G+=ue}return G},Ee.exports.Tokenizer=B,Ee.exports.TOKEN=I,Ee.exports.positionable_operators=ae.slice(),Ee.exports.line_starters=we.slice()},function(Ee){var o=RegExp.prototype.hasOwnProperty("sticky");function $(F){this.__input=F||"",this.__input_length=this.__input.length,this.__position=0}$.prototype.restart=function(){this.__position=0},$.prototype.back=function(){this.__position>0&&(this.__position-=1)},$.prototype.hasNext=function(){return this.__position<this.__input_length},$.prototype.next=function(){var F=null;return this.hasNext()&&(F=this.__input.charAt(this.__position),this.__position+=1),F},$.prototype.peek=function(F){var w=null;return F=F||0,F+=this.__position,F>=0&&F<this.__input_length&&(w=this.__input.charAt(F)),w},$.prototype.__match=function(F,w){F.lastIndex=w;var f=F.exec(this.__input);return f&&!(o&&F.sticky)&&f.index!==w&&(f=null),f},$.prototype.test=function(F,w){return w=w||0,w+=this.__position,w>=0&&w<this.__input_length?!!this.__match(F,w):!1},$.prototype.testChar=function(F,w){var f=this.peek(w);return F.lastIndex=0,f!==null&&F.test(f)},$.prototype.match=function(F){var w=this.__match(F,this.__position);return w?this.__position+=w[0].length:w=null,w},$.prototype.read=function(F,w,f){var _="",y;return F&&(y=this.match(F),y&&(_+=y[0])),w&&(y||!F)&&(_+=this.readUntil(w,f)),_},$.prototype.readUntil=function(F,w){var f="",_=this.__position;F.lastIndex=this.__position;var y=F.exec(this.__input);return y?(_=y.index,w&&(_+=y[0].length)):_=this.__input_length,f=this.__input.substring(this.__position,_),this.__position=_,f},$.prototype.readUntilAfter=function(F){return this.readUntil(F,!0)},$.prototype.get_regexp=function(F,w){var f=null,_="g";return w&&o&&(_="y"),typeof F=="string"&&F!==""?f=new RegExp(F,_):F&&(f=new RegExp(F.source,_)),f},$.prototype.get_literal_regexp=function(F){return RegExp(F.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},$.prototype.peekUntilAfter=function(F){var w=this.__position,f=this.readUntilAfter(F);return this.__position=w,f},$.prototype.lookBack=function(F){var w=this.__position-1;return w>=F.length&&this.__input.substring(w-F.length,w).toLowerCase()===F},Ee.exports.InputScanner=$},function(Ee,o,$){var F=$(8).InputScanner,w=$(3).Token,f=$(10).TokenStream,_=$(11).WhitespacePattern,y={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},U=function(K,O){this._input=new F(K),this._options=O||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new _(this._input)};U.prototype.tokenize=function(){this._input.restart(),this.__tokens=new f,this._reset();for(var K,O=new w(y.START,""),I=null,H=[],te=new f;O.type!==y.EOF;){for(K=this._get_next_token(O,I);this._is_comment(K);)te.add(K),K=this._get_next_token(O,I);te.isEmpty()||(K.comments_before=te,te=new f),K.parent=I,this._is_opening(K)?(H.push(I),I=K):I&&this._is_closing(K,I)&&(K.opened=I,I.closed=K,I=H.pop(),K.parent=I),K.previous=O,O.next=K,this.__tokens.add(K),O=K}return this.__tokens},U.prototype._is_first_token=function(){return this.__tokens.isEmpty()},U.prototype._reset=function(){},U.prototype._get_next_token=function(K,O){this._readWhitespace();var I=this._input.read(/.+/g);return I?this._create_token(y.RAW,I):this._create_token(y.EOF,"")},U.prototype._is_comment=function(K){return!1},U.prototype._is_opening=function(K){return!1},U.prototype._is_closing=function(K,O){return!1},U.prototype._create_token=function(K,O){var I=new w(K,O,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return I},U.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},Ee.exports.Tokenizer=U,Ee.exports.TOKEN=y},function(Ee){function o($){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=$}o.prototype.restart=function(){this.__position=0},o.prototype.isEmpty=function(){return this.__tokens_length===0},o.prototype.hasNext=function(){return this.__position<this.__tokens_length},o.prototype.next=function(){var $=null;return this.hasNext()&&($=this.__tokens[this.__position],this.__position+=1),$},o.prototype.peek=function($){var F=null;return $=$||0,$+=this.__position,$>=0&&$<this.__tokens_length&&(F=this.__tokens[$]),F},o.prototype.add=function($){this.__parent_token&&($.parent=this.__parent_token),this.__tokens.push($),this.__tokens_length+=1},Ee.exports.TokenStream=o},function(Ee,o,$){var F=$(12).Pattern;function w(f,_){F.call(this,f,_),_?this._line_regexp=this._input.get_regexp(_._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}w.prototype=new F,w.prototype.__set_whitespace_patterns=function(f,_){f+="\\t ",_+="\\n\\r",this._match_pattern=this._input.get_regexp("["+f+_+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+_+"]")},w.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var f=this._input.read(this._match_pattern);if(f===" ")this.whitespace_before_token=" ";else if(f){var _=this.__split(this._newline_regexp,f);this.newline_count=_.length-1,this.whitespace_before_token=_[this.newline_count]}return f},w.prototype.matching=function(f,_){var y=this._create();return y.__set_whitespace_patterns(f,_),y._update(),y},w.prototype._create=function(){return new w(this._input,this)},w.prototype.__split=function(f,_){f.lastIndex=0;for(var y=0,U=[],K=f.exec(_);K;)U.push(_.substring(y,K.index)),y=K.index+K[0].length,K=f.exec(_);return y<_.length?U.push(_.substring(y,_.length)):U.push(""),U},Ee.exports.WhitespacePattern=w},function(Ee){function o($,F){this._input=$,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)}o.prototype.read=function(){var $=this._input.read(this._starting_pattern);return(!this._starting_pattern||$)&&($+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),$},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function($){var F=this._create();return F._until_after=!0,F._until_pattern=this._input.get_regexp($),F._update(),F},o.prototype.until=function($){var F=this._create();return F._until_after=!1,F._until_pattern=this._input.get_regexp($),F._update(),F},o.prototype.starting_with=function($){var F=this._create();return F._starting_pattern=this._input.get_regexp($,!0),F._update(),F},o.prototype.matching=function($){var F=this._create();return F._match_pattern=this._input.get_regexp($,!0),F._update(),F},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},Ee.exports.Pattern=o},function(Ee){function o($,F){$=typeof $=="string"?$:$.source,F=typeof F=="string"?F:F.source,this.__directives_block_pattern=new RegExp($+/ beautify( \w+[:]\w+)+ /.source+F,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp($+/\sbeautify\signore:end\s/.source+F,"g")}o.prototype.get_directives=function($){if(!$.match(this.__directives_block_pattern))return null;var F={};this.__directive_pattern.lastIndex=0;for(var w=this.__directive_pattern.exec($);w;)F[w[1]]=w[2],w=this.__directive_pattern.exec($);return F},o.prototype.readIgnored=function($){return $.readUntilAfter(this.__directives_end_ignore_pattern)},Ee.exports.Directives=o},function(Ee,o,$){var F=$(12).Pattern,w={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function f(_,y){F.call(this,_,y),this.__template_pattern=null,this._disabled=Object.assign({},w),this._excluded=Object.assign({},w),y&&(this.__template_pattern=this._input.get_regexp(y.__template_pattern),this._excluded=Object.assign(this._excluded,y._excluded),this._disabled=Object.assign(this._disabled,y._disabled));var U=new F(_);this.__patterns={handlebars_comment:U.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:U.starting_with(/{{{/).until_after(/}}}/),handlebars:U.starting_with(/{{/).until_after(/}}/),php:U.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:U.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:U.starting_with(/{%/).until_after(/%}/),django_value:U.starting_with(/{{/).until_after(/}}/),django_comment:U.starting_with(/{#/).until_after(/#}/),smarty:U.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:U.starting_with(/{\*/).until_after(/\*}/),smarty_literal:U.starting_with(/{literal}/).until_after(/{\/literal}/)}}f.prototype=new F,f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){this.__set_templated_pattern()},f.prototype.disable=function(_){var y=this._create();return y._disabled[_]=!0,y._update(),y},f.prototype.read_options=function(_){var y=this._create();for(var U in w)y._disabled[U]=_.templating.indexOf(U)===-1;return y._update(),y},f.prototype.exclude=function(_){var y=this._create();return y._excluded[_]=!0,y._update(),y},f.prototype.read=function(){var _="";this._match_pattern?_=this._input.read(this._starting_pattern):_=this._input.read(this._starting_pattern,this.__template_pattern);for(var y=this._read_template();y;)this._match_pattern?y+=this._input.read(this._match_pattern):y+=this._input.readUntil(this.__template_pattern),_+=y,y=this._read_template();return this._until_after&&(_+=this._input.readUntilAfter(this._until_pattern)),_},f.prototype.__set_templated_pattern=function(){var _=[];this._disabled.php||_.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||_.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||_.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||_.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(_.push(this.__patterns.django._starting_pattern.source),_.push(this.__patterns.django_value._starting_pattern.source),_.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||_.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&_.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+_.join("|")+")")},f.prototype._read_template=function(){var _="",y=this._input.peek();if(y==="<"){var U=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&U==="?"&&(_=_||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&U==="%"&&(_=_||this.__patterns.erb.read())}else y==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(_=_||this.__patterns.handlebars_comment.read(),_=_||this.__patterns.handlebars_unescaped.read(),_=_||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(_=_||this.__patterns.django_value.read()),this._excluded.django||(_=_||this.__patterns.django_comment.read(),_=_||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(_=_||this.__patterns.smarty_comment.read(),_=_||this.__patterns.smarty_literal.read(),_=_||this.__patterns.smarty.read()));return _},Ee.exports.TemplatablePattern=f}],fe={};function re(Ee){var o=fe[Ee];if(o!==void 0)return o.exports;var $=fe[Ee]={exports:{}};return Ie[Ee]($,$.exports,re),$.exports}var ve=re(0);_e=ve})();var me=_e;D=[],R=function(){return{js_beautify:me}}.apply(st,D),R!==void 0&&($t.exports=R)})()},15342:function($t){(function(D,R){$t.exports=R()})(typeof self!="undefined"?self:this,function(){return function(st){var D={};function R(_e){if(D[_e])return D[_e].exports;var me=D[_e]={i:_e,l:!1,exports:{}};return st[_e].call(me.exports,me,me.exports,R),me.l=!0,me.exports}return R.m=st,R.c=D,R.d=function(_e,me,Ie){R.o(_e,me)||Object.defineProperty(_e,me,{enumerable:!0,get:Ie})},R.r=function(_e){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_e,"__esModule",{value:!0})},R.t=function(_e,me){if(me&1&&(_e=R(_e)),me&8||me&4&&typeof _e=="object"&&_e&&_e.__esModule)return _e;var Ie=Object.create(null);if(R.r(Ie),Object.defineProperty(Ie,"default",{enumerable:!0,value:_e}),me&2&&typeof _e!="string")for(var fe in _e)R.d(Ie,fe,function(re){return _e[re]}.bind(null,fe));return Ie},R.n=function(_e){var me=_e&&_e.__esModule?function(){return _e.default}:function(){return _e};return R.d(me,"a",me),me},R.o=function(_e,me){return Object.prototype.hasOwnProperty.call(_e,me)},R.p="",R(R.s=1)}([function(st,D,R){},function(st,D,R){"use strict";R.r(D);var _e=R(0),me=function(){function k(l,c,h){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=l,this.start=c,this.end=h}return k.range=function(c,h){return h?!c||!c.loc||!h.loc||c.loc.lexer!==h.loc.lexer?null:new k(c.loc.lexer,c.loc.start,h.loc.end):c&&c.loc},k}(),Ie=function(){function k(c,h){this.text=void 0,this.loc=void 0,this.text=c,this.loc=h}var l=k.prototype;return l.range=function(h,p){return new k(p,me.range(this,h))},k}(),fe=function k(l,c){this.position=void 0;var h="KaTeX parse error: "+l,p,T=c&&c.loc;if(T&&T.start<=T.end){var C=T.lexer.input;p=T.start;var ne=T.end;p===C.length?h+=" at end of input: ":h+=" at position "+(p+1)+": ";var he=C.slice(p,ne).replace(/[^]/g,"$&\u0332"),Te;p>15?Te="\u2026"+C.slice(p-15,p):Te=C.slice(0,p);var We;ne+15<C.length?We=C.slice(ne,ne+15)+"\u2026":We=C.slice(ne),h+=Te+he+We}var rt=new Error(h);return rt.name="ParseError",rt.__proto__=k.prototype,rt.position=p,rt};fe.prototype.__proto__=Error.prototype;var re=fe,ve=function(l,c){return l.indexOf(c)!==-1},Ee=function(l,c){return l===void 0?c:l},o=/([A-Z])/g,$=function(l){return l.replace(o,"-$1").toLowerCase()},F={"&":"&",">":">","<":"<",'"':""","'":"'"},w=/[&><"']/g;function f(k){return String(k).replace(w,function(l){return F[l]})}var _=function k(l){return l.type==="ordgroup"||l.type==="color"?l.body.length===1?k(l.body[0]):l:l.type==="font"?k(l.body):l},y=function(l){var c=_(l);return c.type==="mathord"||c.type==="textord"||c.type==="atom"},U=function(l){if(!l)throw new Error("Expected non-null, but got "+String(l));return l},K=function(l){var c=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(l);return c!=null?c[1]:"_relative"},O={contains:ve,deflt:Ee,escape:f,hyphenate:$,getBaseElem:_,isCharacterBox:y,protocolFromUrl:K},I=function(){function k(c){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,c=c||{},this.displayMode=O.deflt(c.displayMode,!1),this.output=O.deflt(c.output,"htmlAndMathml"),this.leqno=O.deflt(c.leqno,!1),this.fleqn=O.deflt(c.fleqn,!1),this.throwOnError=O.deflt(c.throwOnError,!0),this.errorColor=O.deflt(c.errorColor,"#cc0000"),this.macros=c.macros||{},this.minRuleThickness=Math.max(0,O.deflt(c.minRuleThickness,0)),this.colorIsTextColor=O.deflt(c.colorIsTextColor,!1),this.strict=O.deflt(c.strict,"warn"),this.trust=O.deflt(c.trust,!1),this.maxSize=Math.max(0,O.deflt(c.maxSize,1/0)),this.maxExpand=Math.max(0,O.deflt(c.maxExpand,1e3))}var l=k.prototype;return l.reportNonstrict=function(h,p,T){var C=this.strict;if(typeof C=="function"&&(C=C(h,p,T)),!(!C||C==="ignore")){if(C===!0||C==="error")throw new re("LaTeX-incompatible input and strict mode is set to 'error': "+(p+" ["+h+"]"),T);C==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(p+" ["+h+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+C+"': "+p+" ["+h+"]"))}},l.useStrictBehavior=function(h,p,T){var C=this.strict;if(typeof C=="function")try{C=C(h,p,T)}catch(ne){C="error"}return!C||C==="ignore"?!1:C===!0||C==="error"?!0:C==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(p+" ["+h+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+C+"': "+p+" ["+h+"]")),!1)},l.isTrusted=function(h){h.url&&!h.protocol&&(h.protocol=O.protocolFromUrl(h.url));var p=typeof this.trust=="function"?this.trust(h):this.trust;return!!p},k}(),H=function(){function k(c,h,p){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=c,this.size=h,this.cramped=p}var l=k.prototype;return l.sup=function(){return $e[Y[this.id]]},l.sub=function(){return $e[B[this.id]]},l.fracNum=function(){return $e[Z[this.id]]},l.fracDen=function(){return $e[X[this.id]]},l.cramp=function(){return $e[le[this.id]]},l.text=function(){return $e[q[this.id]]},l.isTight=function(){return this.size>=2},k}(),te=0,S=1,j=2,ae=3,de=4,Se=5,we=6,Me=7,$e=[new H(te,0,!1),new H(S,0,!0),new H(j,1,!1),new H(ae,1,!0),new H(de,2,!1),new H(Se,2,!0),new H(we,3,!1),new H(Me,3,!0)],Y=[de,Se,de,Se,we,Me,we,Me],B=[Se,Se,Se,Se,Me,Me,Me,Me],Z=[j,ae,de,Se,we,Me,we,Me],X=[ae,ae,Se,Se,Me,Me,Me,Me],le=[S,S,ae,ae,Se,Se,Me,Me],q=[te,S,j,ae,j,ae,j,ae],b={DISPLAY:$e[te],TEXT:$e[j],SCRIPT:$e[de],SCRIPTSCRIPT:$e[we]},x=[{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 G(k){for(var l=0;l<x.length;l++)for(var c=x[l],h=0;h<c.blocks.length;h++){var p=c.blocks[h];if(k>=p[0]&&k<=p[1])return c.name}return null}var ue=[];x.forEach(function(k){return k.blocks.forEach(function(l){return ue.push.apply(ue,l)})});function ze(k){for(var l=0;l<ue.length;l+=2)if(k>=ue[l]&&k<=ue[l+1])return!0;return!1}var Xe=80,Ke=function(l,c){return"M95,"+(622+l+c)+`
|
|
|
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`+l/2.075+" -"+l+`
|
|
|
c5.3,-9.3,12,-14,20,-14
|
|
|
H400000v`+(40+l)+`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+l)+" "+c+"h400000v"+(40+l)+"h-400000z"},Ze=function(l,c){return"M263,"+(601+l+c)+`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`+l/2.084+" -"+l+`
|
|
|
c4.7,-7.3,11,-11,19,-11
|
|
|
H40000v`+(40+l)+`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+l)+" "+c+"h400000v"+(40+l)+"h-400000z"},pt=function(l,c){return"M983 "+(10+l+c)+`
|
|
|
l`+l/3.13+" -"+l+`
|
|
|
c4,-6.7,10,-10,18,-10 H400000v`+(40+l)+`
|
|
|
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+l)+" "+c+"h400000v"+(40+l)+"h-400000z"},ct=function(l,c){return"M424,"+(2398+l+c)+`
|
|
|
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`+l/4.223+" -"+l+`c4,-6.7,10,-10,18,-10 H400000
|
|
|
v`+(40+l)+`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+l)+" "+c+`
|
|
|
h400000v`+(40+l)+"h-400000z"},ht=function(l,c){return"M473,"+(2713+l+c)+`
|
|
|
c339.3,-1799.3,509.3,-2700,510,-2702 l`+l/5.298+" -"+l+`
|
|
|
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+l)+`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+l)+" "+c+"h400000v"+(40+l)+"H1017.7z"},jt=function(l,c,h){var p=h-54-c-l;return"M702 "+(l+c)+"H400000"+(40+l)+`
|
|
|
H742v`+p+`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 `+c+"H400000v"+(40+l)+"H742z"},Zt=function(l,c,h){c=1e3*c;var p="";switch(l){case"sqrtMain":p=Ke(c,Xe);break;case"sqrtSize1":p=Ze(c,Xe);break;case"sqrtSize2":p=pt(c,Xe);break;case"sqrtSize3":p=ct(c,Xe);break;case"sqrtSize4":p=ht(c,Xe);break;case"sqrtTall":p=jt(c,Xe,h)}return p},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`},Ut=function(){function k(c){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=c,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var l=k.prototype;return l.hasClass=function(h){return O.contains(this.classes,h)},l.toNode=function(){for(var h=document.createDocumentFragment(),p=0;p<this.children.length;p++)h.appendChild(this.children[p].toNode());return h},l.toMarkup=function(){for(var h="",p=0;p<this.children.length;p++)h+=this.children[p].toMarkup();return h},l.toText=function(){var h=function(T){return T.toText()};return this.children.map(h).join("")},k}(),zt=function(l){return l.filter(function(c){return c}).join(" ")},Bt=function(l,c,h){if(this.classes=l||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=h||{},c){c.style.isTight()&&this.classes.push("mtight");var p=c.getColor();p&&(this.style.color=p)}},Oe=function(l){var c=document.createElement(l);c.className=zt(this.classes);for(var h in this.style)this.style.hasOwnProperty(h)&&(c.style[h]=this.style[h]);for(var p in this.attributes)this.attributes.hasOwnProperty(p)&&c.setAttribute(p,this.attributes[p]);for(var T=0;T<this.children.length;T++)c.appendChild(this.children[T].toNode());return c},qe=function(l){var c="<"+l;this.classes.length&&(c+=' class="'+O.escape(zt(this.classes))+'"');var h="";for(var p in this.style)this.style.hasOwnProperty(p)&&(h+=O.hyphenate(p)+":"+this.style[p]+";");h&&(c+=' style="'+O.escape(h)+'"');for(var T in this.attributes)this.attributes.hasOwnProperty(T)&&(c+=" "+T+'="'+O.escape(this.attributes[T])+'"');c+=">";for(var C=0;C<this.children.length;C++)c+=this.children[C].toMarkup();return c+="</"+l+">",c},se=function(){function k(c,h,p,T){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,Bt.call(this,c,p,T),this.children=h||[]}var l=k.prototype;return l.setAttribute=function(h,p){this.attributes[h]=p},l.hasClass=function(h){return O.contains(this.classes,h)},l.toNode=function(){return Oe.call(this,"span")},l.toMarkup=function(){return qe.call(this,"span")},k}(),Ne=function(){function k(c,h,p,T){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,Bt.call(this,h,T),this.children=p||[],this.setAttribute("href",c)}var l=k.prototype;return l.setAttribute=function(h,p){this.attributes[h]=p},l.hasClass=function(h){return O.contains(this.classes,h)},l.toNode=function(){return Oe.call(this,"a")},l.toMarkup=function(){return qe.call(this,"a")},k}(),He=function(){function k(c,h,p){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=h,this.src=c,this.classes=["mord"],this.style=p}var l=k.prototype;return l.hasClass=function(h){return O.contains(this.classes,h)},l.toNode=function(){var h=document.createElement("img");h.src=this.src,h.alt=this.alt,h.className="mord";for(var p in this.style)this.style.hasOwnProperty(p)&&(h.style[p]=this.style[p]);return h},l.toMarkup=function(){var h="<img src='"+this.src+" 'alt='"+this.alt+"' ",p="";for(var T in this.style)this.style.hasOwnProperty(T)&&(p+=O.hyphenate(T)+":"+this.style[T]+";");return p&&(h+=' style="'+O.escape(p)+'"'),h+="'/>",h},k}(),N={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},ee=function(){function k(c,h,p,T,C,ne,he,Te){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=c,this.height=h||0,this.depth=p||0,this.italic=T||0,this.skew=C||0,this.width=ne||0,this.classes=he||[],this.style=Te||{},this.maxFontSize=0;var We=G(this.text.charCodeAt(0));We&&this.classes.push(We+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=N[this.text])}var l=k.prototype;return l.hasClass=function(h){return O.contains(this.classes,h)},l.toNode=function(){var h=document.createTextNode(this.text),p=null;this.italic>0&&(p=document.createElement("span"),p.style.marginRight=this.italic+"em"),this.classes.length>0&&(p=p||document.createElement("span"),p.className=zt(this.classes));for(var T in this.style)this.style.hasOwnProperty(T)&&(p=p||document.createElement("span"),p.style[T]=this.style[T]);return p?(p.appendChild(h),p):h},l.toMarkup=function(){var h=!1,p="<span";this.classes.length&&(h=!0,p+=' class="',p+=O.escape(zt(this.classes)),p+='"');var T="";this.italic>0&&(T+="margin-right:"+this.italic+"em;");for(var C in this.style)this.style.hasOwnProperty(C)&&(T+=O.hyphenate(C)+":"+this.style[C]+";");T&&(h=!0,p+=' style="'+O.escape(T)+'"');var ne=O.escape(this.text);return h?(p+=">",p+=ne,p+="</span>",p):ne},k}(),ye=function(){function k(c,h){this.children=void 0,this.attributes=void 0,this.children=c||[],this.attributes=h||{}}var l=k.prototype;return l.toNode=function(){var h="http://www.w3.org/2000/svg",p=document.createElementNS(h,"svg");for(var T in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,T)&&p.setAttribute(T,this.attributes[T]);for(var C=0;C<this.children.length;C++)p.appendChild(this.children[C].toNode());return p},l.toMarkup=function(){var h="<svg";for(var p in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,p)&&(h+=" "+p+"='"+this.attributes[p]+"'");h+=">";for(var T=0;T<this.children.length;T++)h+=this.children[T].toMarkup();return h+="</svg>",h},k}(),be=function(){function k(c,h){this.pathName=void 0,this.alternate=void 0,this.pathName=c,this.alternate=h}var l=k.prototype;return l.toNode=function(){var h="http://www.w3.org/2000/svg",p=document.createElementNS(h,"path");return this.alternate?p.setAttribute("d",this.alternate):p.setAttribute("d",qt[this.pathName]),p},l.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+qt[this.pathName]+"'/>"},k}(),Le=function(){function k(c){this.attributes=void 0,this.attributes=c||{}}var l=k.prototype;return l.toNode=function(){var h="http://www.w3.org/2000/svg",p=document.createElementNS(h,"line");for(var T in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,T)&&p.setAttribute(T,this.attributes[T]);return p},l.toMarkup=function(){var h="<line";for(var p in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,p)&&(h+=" "+p+"='"+this.attributes[p]+"'");return h+="/>",h},k}();function Be(k){if(k instanceof ee)return k;throw new Error("Expected symbolNode but got "+String(k)+".")}function Ve(k){if(k instanceof se)return k;throw new Error("Expected span<HtmlDomNode> but got "+String(k)+".")}var nt={"AMS-Regular":{65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473]},"Fraktur-Regular":{33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],163:[0,.69444,0,0,.86853],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],163:[0,.69444,0,0,.76909],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],305:[0,.43056,0,.02778,.32246],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],567:[.19444,.43056,0,.08334,.38403],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,1],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.67,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.744,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.744,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333]},"Math-Italic":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"Math-Regular":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"SansSerif-Bold":{33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212]},"Size1-Regular":{40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Qe={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]},je={\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 bt(k,l){nt[k]=l}function Ae(k,l,c){if(!nt[l])throw new Error("Font metrics not found for font: "+l+".");var h=k.charCodeAt(0),p=nt[l][h];if(!p&&k[0]in je&&(h=je[k[0]].charCodeAt(0),p=nt[l][h]),!p&&c==="text"&&ze(h)&&(p=nt[l][77]),p)return{depth:p[0],height:p[1],italic:p[2],skew:p[3],width:p[4]}}var De={};function Ue(k){var l;if(k>=5?l=0:k>=3?l=1:l=2,!De[l]){var c=De[l]={cssEmPerMu:Qe.quad[l]/18};for(var h in Qe)Qe.hasOwnProperty(h)&&(c[h]=Qe[h][l])}return De[l]}var it={bin:1,close:1,inner:1,open:1,punct:1,rel:1},et={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ft={math:{},text:{}},_t=ft;function v(k,l,c,h,p,T){ft[k][p]={font:l,group:c,replace:h},T&&h&&(ft[k][h]=ft[k][p])}var E="math",Ye="text",P="main",oe="ams",kt="accent-token",ge="bin",Pe="close",Ge="inner",z="mathord",J="op-token",ce="open",Ce="punct",M="rel",xt="spacing",pe="textord";v(E,P,M,"\u2261","\\equiv",!0),v(E,P,M,"\u227A","\\prec",!0),v(E,P,M,"\u227B","\\succ",!0),v(E,P,M,"\u223C","\\sim",!0),v(E,P,M,"\u22A5","\\perp"),v(E,P,M,"\u2AAF","\\preceq",!0),v(E,P,M,"\u2AB0","\\succeq",!0),v(E,P,M,"\u2243","\\simeq",!0),v(E,P,M,"\u2223","\\mid",!0),v(E,P,M,"\u226A","\\ll",!0),v(E,P,M,"\u226B","\\gg",!0),v(E,P,M,"\u224D","\\asymp",!0),v(E,P,M,"\u2225","\\parallel"),v(E,P,M,"\u22C8","\\bowtie",!0),v(E,P,M,"\u2323","\\smile",!0),v(E,P,M,"\u2291","\\sqsubseteq",!0),v(E,P,M,"\u2292","\\sqsupseteq",!0),v(E,P,M,"\u2250","\\doteq",!0),v(E,P,M,"\u2322","\\frown",!0),v(E,P,M,"\u220B","\\ni",!0),v(E,P,M,"\u221D","\\propto",!0),v(E,P,M,"\u22A2","\\vdash",!0),v(E,P,M,"\u22A3","\\dashv",!0),v(E,P,M,"\u220B","\\owns"),v(E,P,Ce,".","\\ldotp"),v(E,P,Ce,"\u22C5","\\cdotp"),v(E,P,pe,"#","\\#"),v(Ye,P,pe,"#","\\#"),v(E,P,pe,"&","\\&"),v(Ye,P,pe,"&","\\&"),v(E,P,pe,"\u2135","\\aleph",!0),v(E,P,pe,"\u2200","\\forall",!0),v(E,P,pe,"\u210F","\\hbar",!0),v(E,P,pe,"\u2203","\\exists",!0),v(E,P,pe,"\u2207","\\nabla",!0),v(E,P,pe,"\u266D","\\flat",!0),v(E,P,pe,"\u2113","\\ell",!0),v(E,P,pe,"\u266E","\\natural",!0),v(E,P,pe,"\u2663","\\clubsuit",!0),v(E,P,pe,"\u2118","\\wp",!0),v(E,P,pe,"\u266F","\\sharp",!0),v(E,P,pe,"\u2662","\\diamondsuit",!0),v(E,P,pe,"\u211C","\\Re",!0),v(E,P,pe,"\u2661","\\heartsuit",!0),v(E,P,pe,"\u2111","\\Im",!0),v(E,P,pe,"\u2660","\\spadesuit",!0),v(Ye,P,pe,"\xA7","\\S",!0),v(Ye,P,pe,"\xB6","\\P",!0),v(E,P,pe,"\u2020","\\dag"),v(Ye,P,pe,"\u2020","\\dag"),v(Ye,P,pe,"\u2020","\\textdagger"),v(E,P,pe,"\u2021","\\ddag"),v(Ye,P,pe,"\u2021","\\ddag"),v(Ye,P,pe,"\u2021","\\textdaggerdbl"),v(E,P,Pe,"\u23B1","\\rmoustache",!0),v(E,P,ce,"\u23B0","\\lmoustache",!0),v(E,P,Pe,"\u27EF","\\rgroup",!0),v(E,P,ce,"\u27EE","\\lgroup",!0),v(E,P,ge,"\u2213","\\mp",!0),v(E,P,ge,"\u2296","\\ominus",!0),v(E,P,ge,"\u228E","\\uplus",!0),v(E,P,ge,"\u2293","\\sqcap",!0),v(E,P,ge,"\u2217","\\ast"),v(E,P,ge,"\u2294","\\sqcup",!0),v(E,P,ge,"\u25EF","\\bigcirc"),v(E,P,ge,"\u2219","\\bullet"),v(E,P,ge,"\u2021","\\ddagger"),v(E,P,ge,"\u2240","\\wr",!0),v(E,P,ge,"\u2A3F","\\amalg"),v(E,P,ge,"&","\\And"),v(E,P,M,"\u27F5","\\longleftarrow",!0),v(E,P,M,"\u21D0","\\Leftarrow",!0),v(E,P,M,"\u27F8","\\Longleftarrow",!0),v(E,P,M,"\u27F6","\\longrightarrow",!0),v(E,P,M,"\u21D2","\\Rightarrow",!0),v(E,P,M,"\u27F9","\\Longrightarrow",!0),v(E,P,M,"\u2194","\\leftrightarrow",!0),v(E,P,M,"\u27F7","\\longleftrightarrow",!0),v(E,P,M,"\u21D4","\\Leftrightarrow",!0),v(E,P,M,"\u27FA","\\Longleftrightarrow",!0),v(E,P,M,"\u21A6","\\mapsto",!0),v(E,P,M,"\u27FC","\\longmapsto",!0),v(E,P,M,"\u2197","\\nearrow",!0),v(E,P,M,"\u21A9","\\hookleftarrow",!0),v(E,P,M,"\u21AA","\\hookrightarrow",!0),v(E,P,M,"\u2198","\\searrow",!0),v(E,P,M,"\u21BC","\\leftharpoonup",!0),v(E,P,M,"\u21C0","\\rightharpoonup",!0),v(E,P,M,"\u2199","\\swarrow",!0),v(E,P,M,"\u21BD","\\leftharpoondown",!0),v(E,P,M,"\u21C1","\\rightharpoondown",!0),v(E,P,M,"\u2196","\\nwarrow",!0),v(E,P,M,"\u21CC","\\rightleftharpoons",!0),v(E,oe,M,"\u226E","\\nless",!0),v(E,oe,M,"\uE010","\\@nleqslant"),v(E,oe,M,"\uE011","\\@nleqq"),v(E,oe,M,"\u2A87","\\lneq",!0),v(E,oe,M,"\u2268","\\lneqq",!0),v(E,oe,M,"\uE00C","\\@lvertneqq"),v(E,oe,M,"\u22E6","\\lnsim",!0),v(E,oe,M,"\u2A89","\\lnapprox",!0),v(E,oe,M,"\u2280","\\nprec",!0),v(E,oe,M,"\u22E0","\\npreceq",!0),v(E,oe,M,"\u22E8","\\precnsim",!0),v(E,oe,M,"\u2AB9","\\precnapprox",!0),v(E,oe,M,"\u2241","\\nsim",!0),v(E,oe,M,"\uE006","\\@nshortmid"),v(E,oe,M,"\u2224","\\nmid",!0),v(E,oe,M,"\u22AC","\\nvdash",!0),v(E,oe,M,"\u22AD","\\nvDash",!0),v(E,oe,M,"\u22EA","\\ntriangleleft"),v(E,oe,M,"\u22EC","\\ntrianglelefteq",!0),v(E,oe,M,"\u228A","\\subsetneq",!0),v(E,oe,M,"\uE01A","\\@varsubsetneq"),v(E,oe,M,"\u2ACB","\\subsetneqq",!0),v(E,oe,M,"\uE017","\\@varsubsetneqq"),v(E,oe,M,"\u226F","\\ngtr",!0),v(E,oe,M,"\uE00F","\\@ngeqslant"),v(E,oe,M,"\uE00E","\\@ngeqq"),v(E,oe,M,"\u2A88","\\gneq",!0),v(E,oe,M,"\u2269","\\gneqq",!0),v(E,oe,M,"\uE00D","\\@gvertneqq"),v(E,oe,M,"\u22E7","\\gnsim",!0),v(E,oe,M,"\u2A8A","\\gnapprox",!0),v(E,oe,M,"\u2281","\\nsucc",!0),v(E,oe,M,"\u22E1","\\nsucceq",!0),v(E,oe,M,"\u22E9","\\succnsim",!0),v(E,oe,M,"\u2ABA","\\succnapprox",!0),v(E,oe,M,"\u2246","\\ncong",!0),v(E,oe,M,"\uE007","\\@nshortparallel"),v(E,oe,M,"\u2226","\\nparallel",!0),v(E,oe,M,"\u22AF","\\nVDash",!0),v(E,oe,M,"\u22EB","\\ntriangleright"),v(E,oe,M,"\u22ED","\\ntrianglerighteq",!0),v(E,oe,M,"\uE018","\\@nsupseteqq"),v(E,oe,M,"\u228B","\\supsetneq",!0),v(E,oe,M,"\uE01B","\\@varsupsetneq"),v(E,oe,M,"\u2ACC","\\supsetneqq",!0),v(E,oe,M,"\uE019","\\@varsupsetneqq"),v(E,oe,M,"\u22AE","\\nVdash",!0),v(E,oe,M,"\u2AB5","\\precneqq",!0),v(E,oe,M,"\u2AB6","\\succneqq",!0),v(E,oe,M,"\uE016","\\@nsubseteqq"),v(E,oe,ge,"\u22B4","\\unlhd"),v(E,oe,ge,"\u22B5","\\unrhd"),v(E,oe,M,"\u219A","\\nleftarrow",!0),v(E,oe,M,"\u219B","\\nrightarrow",!0),v(E,oe,M,"\u21CD","\\nLeftarrow",!0),v(E,oe,M,"\u21CF","\\nRightarrow",!0),v(E,oe,M,"\u21AE","\\nleftrightarrow",!0),v(E,oe,M,"\u21CE","\\nLeftrightarrow",!0),v(E,oe,M,"\u25B3","\\vartriangle"),v(E,oe,pe,"\u210F","\\hslash"),v(E,oe,pe,"\u25BD","\\triangledown"),v(E,oe,pe,"\u25CA","\\lozenge"),v(E,oe,pe,"\u24C8","\\circledS"),v(E,oe,pe,"\xAE","\\circledR"),v(Ye,oe,pe,"\xAE","\\circledR"),v(E,oe,pe,"\u2221","\\measuredangle",!0),v(E,oe,pe,"\u2204","\\nexists"),v(E,oe,pe,"\u2127","\\mho"),v(E,oe,pe,"\u2132","\\Finv",!0),v(E,oe,pe,"\u2141","\\Game",!0),v(E,oe,pe,"\u2035","\\backprime"),v(E,oe,pe,"\u25B2","\\blacktriangle"),v(E,oe,pe,"\u25BC","\\blacktriangledown"),v(E,oe,pe,"\u25A0","\\blacksquare"),v(E,oe,pe,"\u29EB","\\blacklozenge"),v(E,oe,pe,"\u2605","\\bigstar"),v(E,oe,pe,"\u2222","\\sphericalangle",!0),v(E,oe,pe,"\u2201","\\complement",!0),v(E,oe,pe,"\xF0","\\eth",!0),v(E,oe,pe,"\u2571","\\diagup"),v(E,oe,pe,"\u2572","\\diagdown"),v(E,oe,pe,"\u25A1","\\square"),v(E,oe,pe,"\u25A1","\\Box"),v(E,oe,pe,"\u25CA","\\Diamond"),v(E,oe,pe,"\xA5","\\yen",!0),v(Ye,oe,pe,"\xA5","\\yen",!0),v(E,oe,pe,"\u2713","\\checkmark",!0),v(Ye,oe,pe,"\u2713","\\checkmark"),v(E,oe,pe,"\u2136","\\beth",!0),v(E,oe,pe,"\u2138","\\daleth",!0),v(E,oe,pe,"\u2137","\\gimel",!0),v(E,oe,pe,"\u03DD","\\digamma",!0),v(E,oe,pe,"\u03F0","\\varkappa"),v(E,oe,ce,"\u250C","\\ulcorner",!0),v(E,oe,Pe,"\u2510","\\urcorner",!0),v(E,oe,ce,"\u2514","\\llcorner",!0),v(E,oe,Pe,"\u2518","\\lrcorner",!0),v(E,oe,M,"\u2266","\\leqq",!0),v(E,oe,M,"\u2A7D","\\leqslant",!0),v(E,oe,M,"\u2A95","\\eqslantless",!0),v(E,oe,M,"\u2272","\\lesssim",!0),v(E,oe,M,"\u2A85","\\lessapprox",!0),v(E,oe,M,"\u224A","\\approxeq",!0),v(E,oe,ge,"\u22D6","\\lessdot"),v(E,oe,M,"\u22D8","\\lll",!0),v(E,oe,M,"\u2276","\\lessgtr",!0),v(E,oe,M,"\u22DA","\\lesseqgtr",!0),v(E,oe,M,"\u2A8B","\\lesseqqgtr",!0),v(E,oe,M,"\u2251","\\doteqdot"),v(E,oe,M,"\u2253","\\risingdotseq",!0),v(E,oe,M,"\u2252","\\fallingdotseq",!0),v(E,oe,M,"\u223D","\\backsim",!0),v(E,oe,M,"\u22CD","\\backsimeq",!0),v(E,oe,M,"\u2AC5","\\subseteqq",!0),v(E,oe,M,"\u22D0","\\Subset",!0),v(E,oe,M,"\u228F","\\sqsubset",!0),v(E,oe,M,"\u227C","\\preccurlyeq",!0),v(E,oe,M,"\u22DE","\\curlyeqprec",!0),v(E,oe,M,"\u227E","\\precsim",!0),v(E,oe,M,"\u2AB7","\\precapprox",!0),v(E,oe,M,"\u22B2","\\vartriangleleft"),v(E,oe,M,"\u22B4","\\trianglelefteq"),v(E,oe,M,"\u22A8","\\vDash",!0),v(E,oe,M,"\u22AA","\\Vvdash",!0),v(E,oe,M,"\u2323","\\smallsmile"),v(E,oe,M,"\u2322","\\smallfrown"),v(E,oe,M,"\u224F","\\bumpeq",!0),v(E,oe,M,"\u224E","\\Bumpeq",!0),v(E,oe,M,"\u2267","\\geqq",!0),v(E,oe,M,"\u2A7E","\\geqslant",!0),v(E,oe,M,"\u2A96","\\eqslantgtr",!0),v(E,oe,M,"\u2273","\\gtrsim",!0),v(E,oe,M,"\u2A86","\\gtrapprox",!0),v(E,oe,ge,"\u22D7","\\gtrdot"),v(E,oe,M,"\u22D9","\\ggg",!0),v(E,oe,M,"\u2277","\\gtrless",!0),v(E,oe,M,"\u22DB","\\gtreqless",!0),v(E,oe,M,"\u2A8C","\\gtreqqless",!0),v(E,oe,M,"\u2256","\\eqcirc",!0),v(E,oe,M,"\u2257","\\circeq",!0),v(E,oe,M,"\u225C","\\triangleq",!0),v(E,oe,M,"\u223C","\\thicksim"),v(E,oe,M,"\u2248","\\thickapprox"),v(E,oe,M,"\u2AC6","\\supseteqq",!0),v(E,oe,M,"\u22D1","\\Supset",!0),v(E,oe,M,"\u2290","\\sqsupset",!0),v(E,oe,M,"\u227D","\\succcurlyeq",!0),v(E,oe,M,"\u22DF","\\curlyeqsucc",!0),v(E,oe,M,"\u227F","\\succsim",!0),v(E,oe,M,"\u2AB8","\\succapprox",!0),v(E,oe,M,"\u22B3","\\vartriangleright"),v(E,oe,M,"\u22B5","\\trianglerighteq"),v(E,oe,M,"\u22A9","\\Vdash",!0),v(E,oe,M,"\u2223","\\shortmid"),v(E,oe,M,"\u2225","\\shortparallel"),v(E,oe,M,"\u226C","\\between",!0),v(E,oe,M,"\u22D4","\\pitchfork",!0),v(E,oe,M,"\u221D","\\varpropto"),v(E,oe,M,"\u25C0","\\blacktriangleleft"),v(E,oe,M,"\u2234","\\therefore",!0),v(E,oe,M,"\u220D","\\backepsilon"),v(E,oe,M,"\u25B6","\\blacktriangleright"),v(E,oe,M,"\u2235","\\because",!0),v(E,oe,M,"\u22D8","\\llless"),v(E,oe,M,"\u22D9","\\gggtr"),v(E,oe,ge,"\u22B2","\\lhd"),v(E,oe,ge,"\u22B3","\\rhd"),v(E,oe,M,"\u2242","\\eqsim",!0),v(E,P,M,"\u22C8","\\Join"),v(E,oe,M,"\u2251","\\Doteq",!0),v(E,oe,ge,"\u2214","\\dotplus",!0),v(E,oe,ge,"\u2216","\\smallsetminus"),v(E,oe,ge,"\u22D2","\\Cap",!0),v(E,oe,ge,"\u22D3","\\Cup",!0),v(E,oe,ge,"\u2A5E","\\doublebarwedge",!0),v(E,oe,ge,"\u229F","\\boxminus",!0),v(E,oe,ge,"\u229E","\\boxplus",!0),v(E,oe,ge,"\u22C7","\\divideontimes",!0),v(E,oe,ge,"\u22C9","\\ltimes",!0),v(E,oe,ge,"\u22CA","\\rtimes",!0),v(E,oe,ge,"\u22CB","\\leftthreetimes",!0),v(E,oe,ge,"\u22CC","\\rightthreetimes",!0),v(E,oe,ge,"\u22CF","\\curlywedge",!0),v(E,oe,ge,"\u22CE","\\curlyvee",!0),v(E,oe,ge,"\u229D","\\circleddash",!0),v(E,oe,ge,"\u229B","\\circledast",!0),v(E,oe,ge,"\u22C5","\\centerdot"),v(E,oe,ge,"\u22BA","\\intercal",!0),v(E,oe,ge,"\u22D2","\\doublecap"),v(E,oe,ge,"\u22D3","\\doublecup"),v(E,oe,ge,"\u22A0","\\boxtimes",!0),v(E,oe,M,"\u21E2","\\dashrightarrow",!0),v(E,oe,M,"\u21E0","\\dashleftarrow",!0),v(E,oe,M,"\u21C7","\\leftleftarrows",!0),v(E,oe,M,"\u21C6","\\leftrightarrows",!0),v(E,oe,M,"\u21DA","\\Lleftarrow",!0),v(E,oe,M,"\u219E","\\twoheadleftarrow",!0),v(E,oe,M,"\u21A2","\\leftarrowtail",!0),v(E,oe,M,"\u21AB","\\looparrowleft",!0),v(E,oe,M,"\u21CB","\\leftrightharpoons",!0),v(E,oe,M,"\u21B6","\\curvearrowleft",!0),v(E,oe,M,"\u21BA","\\circlearrowleft",!0),v(E,oe,M,"\u21B0","\\Lsh",!0),v(E,oe,M,"\u21C8","\\upuparrows",!0),v(E,oe,M,"\u21BF","\\upharpoonleft",!0),v(E,oe,M,"\u21C3","\\downharpoonleft",!0),v(E,oe,M,"\u22B8","\\multimap",!0),v(E,oe,M,"\u21AD","\\leftrightsquigarrow",!0),v(E,oe,M,"\u21C9","\\rightrightarrows",!0),v(E,oe,M,"\u21C4","\\rightleftarrows",!0),v(E,oe,M,"\u21A0","\\twoheadrightarrow",!0),v(E,oe,M,"\u21A3","\\rightarrowtail",!0),v(E,oe,M,"\u21AC","\\looparrowright",!0),v(E,oe,M,"\u21B7","\\curvearrowright",!0),v(E,oe,M,"\u21BB","\\circlearrowright",!0),v(E,oe,M,"\u21B1","\\Rsh",!0),v(E,oe,M,"\u21CA","\\downdownarrows",!0),v(E,oe,M,"\u21BE","\\upharpoonright",!0),v(E,oe,M,"\u21C2","\\downharpoonright",!0),v(E,oe,M,"\u21DD","\\rightsquigarrow",!0),v(E,oe,M,"\u21DD","\\leadsto"),v(E,oe,M,"\u21DB","\\Rrightarrow",!0),v(E,oe,M,"\u21BE","\\restriction"),v(E,P,pe,"\u2018","`"),v(E,P,pe,"$","\\$"),v(Ye,P,pe,"$","\\$"),v(Ye,P,pe,"$","\\textdollar"),v(E,P,pe,"%","\\%"),v(Ye,P,pe,"%","\\%"),v(E,P,pe,"_","\\_"),v(Ye,P,pe,"_","\\_"),v(Ye,P,pe,"_","\\textunderscore"),v(E,P,pe,"\u2220","\\angle",!0),v(E,P,pe,"\u221E","\\infty",!0),v(E,P,pe,"\u2032","\\prime"),v(E,P,pe,"\u25B3","\\triangle"),v(E,P,pe,"\u0393","\\Gamma",!0),v(E,P,pe,"\u0394","\\Delta",!0),v(E,P,pe,"\u0398","\\Theta",!0),v(E,P,pe,"\u039B","\\Lambda",!0),v(E,P,pe,"\u039E","\\Xi",!0),v(E,P,pe,"\u03A0","\\Pi",!0),v(E,P,pe,"\u03A3","\\Sigma",!0),v(E,P,pe,"\u03A5","\\Upsilon",!0),v(E,P,pe,"\u03A6","\\Phi",!0),v(E,P,pe,"\u03A8","\\Psi",!0),v(E,P,pe,"\u03A9","\\Omega",!0),v(E,P,pe,"A","\u0391"),v(E,P,pe,"B","\u0392"),v(E,P,pe,"E","\u0395"),v(E,P,pe,"Z","\u0396"),v(E,P,pe,"H","\u0397"),v(E,P,pe,"I","\u0399"),v(E,P,pe,"K","\u039A"),v(E,P,pe,"M","\u039C"),v(E,P,pe,"N","\u039D"),v(E,P,pe,"O","\u039F"),v(E,P,pe,"P","\u03A1"),v(E,P,pe,"T","\u03A4"),v(E,P,pe,"X","\u03A7"),v(E,P,pe,"\xAC","\\neg",!0),v(E,P,pe,"\xAC","\\lnot"),v(E,P,pe,"\u22A4","\\top"),v(E,P,pe,"\u22A5","\\bot"),v(E,P,pe,"\u2205","\\emptyset"),v(E,oe,pe,"\u2205","\\varnothing"),v(E,P,z,"\u03B1","\\alpha",!0),v(E,P,z,"\u03B2","\\beta",!0),v(E,P,z,"\u03B3","\\gamma",!0),v(E,P,z,"\u03B4","\\delta",!0),v(E,P,z,"\u03F5","\\epsilon",!0),v(E,P,z,"\u03B6","\\zeta",!0),v(E,P,z,"\u03B7","\\eta",!0),v(E,P,z,"\u03B8","\\theta",!0),v(E,P,z,"\u03B9","\\iota",!0),v(E,P,z,"\u03BA","\\kappa",!0),v(E,P,z,"\u03BB","\\lambda",!0),v(E,P,z,"\u03BC","\\mu",!0),v(E,P,z,"\u03BD","\\nu",!0),v(E,P,z,"\u03BE","\\xi",!0),v(E,P,z,"\u03BF","\\omicron",!0),v(E,P,z,"\u03C0","\\pi",!0),v(E,P,z,"\u03C1","\\rho",!0),v(E,P,z,"\u03C3","\\sigma",!0),v(E,P,z,"\u03C4","\\tau",!0),v(E,P,z,"\u03C5","\\upsilon",!0),v(E,P,z,"\u03D5","\\phi",!0),v(E,P,z,"\u03C7","\\chi",!0),v(E,P,z,"\u03C8","\\psi",!0),v(E,P,z,"\u03C9","\\omega",!0),v(E,P,z,"\u03B5","\\varepsilon",!0),v(E,P,z,"\u03D1","\\vartheta",!0),v(E,P,z,"\u03D6","\\varpi",!0),v(E,P,z,"\u03F1","\\varrho",!0),v(E,P,z,"\u03C2","\\varsigma",!0),v(E,P,z,"\u03C6","\\varphi",!0),v(E,P,ge,"\u2217","*"),v(E,P,ge,"+","+"),v(E,P,ge,"\u2212","-"),v(E,P,ge,"\u22C5","\\cdot",!0),v(E,P,ge,"\u2218","\\circ"),v(E,P,ge,"\xF7","\\div",!0),v(E,P,ge,"\xB1","\\pm",!0),v(E,P,ge,"\xD7","\\times",!0),v(E,P,ge,"\u2229","\\cap",!0),v(E,P,ge,"\u222A","\\cup",!0),v(E,P,ge,"\u2216","\\setminus"),v(E,P,ge,"\u2227","\\land"),v(E,P,ge,"\u2228","\\lor"),v(E,P,ge,"\u2227","\\wedge",!0),v(E,P,ge,"\u2228","\\vee",!0),v(E,P,pe,"\u221A","\\surd"),v(E,P,ce,"(","("),v(E,P,ce,"[","["),v(E,P,ce,"\u27E8","\\langle",!0),v(E,P,ce,"\u2223","\\lvert"),v(E,P,ce,"\u2225","\\lVert"),v(E,P,Pe,")",")"),v(E,P,Pe,"]","]"),v(E,P,Pe,"?","?"),v(E,P,Pe,"!","!"),v(E,P,Pe,"\u27E9","\\rangle",!0),v(E,P,Pe,"\u2223","\\rvert"),v(E,P,Pe,"\u2225","\\rVert"),v(E,P,M,"=","="),v(E,P,M,"<","<"),v(E,P,M,">",">"),v(E,P,M,":",":"),v(E,P,M,"\u2248","\\approx",!0),v(E,P,M,"\u2245","\\cong",!0),v(E,P,M,"\u2265","\\ge"),v(E,P,M,"\u2265","\\geq",!0),v(E,P,M,"\u2190","\\gets"),v(E,P,M,">","\\gt"),v(E,P,M,"\u2208","\\in",!0),v(E,P,M,"\uE020","\\@not"),v(E,P,M,"\u2282","\\subset",!0),v(E,P,M,"\u2283","\\supset",!0),v(E,P,M,"\u2286","\\subseteq",!0),v(E,P,M,"\u2287","\\supseteq",!0),v(E,oe,M,"\u2288","\\nsubseteq",!0),v(E,oe,M,"\u2289","\\nsupseteq",!0),v(E,P,M,"\u22A8","\\models"),v(E,P,M,"\u2190","\\leftarrow",!0),v(E,P,M,"\u2264","\\le"),v(E,P,M,"\u2264","\\leq",!0),v(E,P,M,"<","\\lt"),v(E,P,M,"\u2192","\\rightarrow",!0),v(E,P,M,"\u2192","\\to"),v(E,oe,M,"\u2271","\\ngeq",!0),v(E,oe,M,"\u2270","\\nleq",!0),v(E,P,xt,"\xA0","\\ "),v(E,P,xt,"\xA0","~"),v(E,P,xt,"\xA0","\\space"),v(E,P,xt,"\xA0","\\nobreakspace"),v(Ye,P,xt,"\xA0","\\ "),v(Ye,P,xt,"\xA0","~"),v(Ye,P,xt,"\xA0","\\space"),v(Ye,P,xt,"\xA0","\\nobreakspace"),v(E,P,xt,null,"\\nobreak"),v(E,P,xt,null,"\\allowbreak"),v(E,P,Ce,",",","),v(E,P,Ce,";",";"),v(E,oe,ge,"\u22BC","\\barwedge",!0),v(E,oe,ge,"\u22BB","\\veebar",!0),v(E,P,ge,"\u2299","\\odot",!0),v(E,P,ge,"\u2295","\\oplus",!0),v(E,P,ge,"\u2297","\\otimes",!0),v(E,P,pe,"\u2202","\\partial",!0),v(E,P,ge,"\u2298","\\oslash",!0),v(E,oe,ge,"\u229A","\\circledcirc",!0),v(E,oe,ge,"\u22A1","\\boxdot",!0),v(E,P,ge,"\u25B3","\\bigtriangleup"),v(E,P,ge,"\u25BD","\\bigtriangledown"),v(E,P,ge,"\u2020","\\dagger"),v(E,P,ge,"\u22C4","\\diamond"),v(E,P,ge,"\u22C6","\\star"),v(E,P,ge,"\u25C3","\\triangleleft"),v(E,P,ge,"\u25B9","\\triangleright"),v(E,P,ce,"{","\\{"),v(Ye,P,pe,"{","\\{"),v(Ye,P,pe,"{","\\textbraceleft"),v(E,P,Pe,"}","\\}"),v(Ye,P,pe,"}","\\}"),v(Ye,P,pe,"}","\\textbraceright"),v(E,P,ce,"{","\\lbrace"),v(E,P,Pe,"}","\\rbrace"),v(E,P,ce,"[","\\lbrack"),v(Ye,P,pe,"[","\\lbrack"),v(E,P,Pe,"]","\\rbrack"),v(Ye,P,pe,"]","\\rbrack"),v(E,P,ce,"(","\\lparen"),v(E,P,Pe,")","\\rparen"),v(Ye,P,pe,"<","\\textless"),v(Ye,P,pe,">","\\textgreater"),v(E,P,ce,"\u230A","\\lfloor",!0),v(E,P,Pe,"\u230B","\\rfloor",!0),v(E,P,ce,"\u2308","\\lceil",!0),v(E,P,Pe,"\u2309","\\rceil",!0),v(E,P,pe,"\\","\\backslash"),v(E,P,pe,"\u2223","|"),v(E,P,pe,"\u2223","\\vert"),v(Ye,P,pe,"|","\\textbar"),v(E,P,pe,"\u2225","\\|"),v(E,P,pe,"\u2225","\\Vert"),v(Ye,P,pe,"\u2225","\\textbardbl"),v(Ye,P,pe,"~","\\textasciitilde"),v(Ye,P,pe,"\\","\\textbackslash"),v(Ye,P,pe,"^","\\textasciicircum"),v(E,P,M,"\u2191","\\uparrow",!0),v(E,P,M,"\u21D1","\\Uparrow",!0),v(E,P,M,"\u2193","\\downarrow",!0),v(E,P,M,"\u21D3","\\Downarrow",!0),v(E,P,M,"\u2195","\\updownarrow",!0),v(E,P,M,"\u21D5","\\Updownarrow",!0),v(E,P,J,"\u2210","\\coprod"),v(E,P,J,"\u22C1","\\bigvee"),v(E,P,J,"\u22C0","\\bigwedge"),v(E,P,J,"\u2A04","\\biguplus"),v(E,P,J,"\u22C2","\\bigcap"),v(E,P,J,"\u22C3","\\bigcup"),v(E,P,J,"\u222B","\\int"),v(E,P,J,"\u222B","\\intop"),v(E,P,J,"\u222C","\\iint"),v(E,P,J,"\u222D","\\iiint"),v(E,P,J,"\u220F","\\prod"),v(E,P,J,"\u2211","\\sum"),v(E,P,J,"\u2A02","\\bigotimes"),v(E,P,J,"\u2A01","\\bigoplus"),v(E,P,J,"\u2A00","\\bigodot"),v(E,P,J,"\u222E","\\oint"),v(E,P,J,"\u222F","\\oiint"),v(E,P,J,"\u2230","\\oiiint"),v(E,P,J,"\u2A06","\\bigsqcup"),v(E,P,J,"\u222B","\\smallint"),v(Ye,P,Ge,"\u2026","\\textellipsis"),v(E,P,Ge,"\u2026","\\mathellipsis"),v(Ye,P,Ge,"\u2026","\\ldots",!0),v(E,P,Ge,"\u2026","\\ldots",!0),v(E,P,Ge,"\u22EF","\\@cdots",!0),v(E,P,Ge,"\u22F1","\\ddots",!0),v(E,P,pe,"\u22EE","\\varvdots"),v(E,P,kt,"\u02CA","\\acute"),v(E,P,kt,"\u02CB","\\grave"),v(E,P,kt,"\xA8","\\ddot"),v(E,P,kt,"~","\\tilde"),v(E,P,kt,"\u02C9","\\bar"),v(E,P,kt,"\u02D8","\\breve"),v(E,P,kt,"\u02C7","\\check"),v(E,P,kt,"^","\\hat"),v(E,P,kt,"\u20D7","\\vec"),v(E,P,kt,"\u02D9","\\dot"),v(E,P,kt,"\u02DA","\\mathring"),v(E,P,z,"\u0131","\\imath",!0),v(E,P,z,"\u0237","\\jmath",!0),v(Ye,P,pe,"\u0131","\\i",!0),v(Ye,P,pe,"\u0237","\\j",!0),v(Ye,P,pe,"\xDF","\\ss",!0),v(Ye,P,pe,"\xE6","\\ae",!0),v(Ye,P,pe,"\xE6","\\ae",!0),v(Ye,P,pe,"\u0153","\\oe",!0),v(Ye,P,pe,"\xF8","\\o",!0),v(Ye,P,pe,"\xC6","\\AE",!0),v(Ye,P,pe,"\u0152","\\OE",!0),v(Ye,P,pe,"\xD8","\\O",!0),v(Ye,P,kt,"\u02CA","\\'"),v(Ye,P,kt,"\u02CB","\\`"),v(Ye,P,kt,"\u02C6","\\^"),v(Ye,P,kt,"\u02DC","\\~"),v(Ye,P,kt,"\u02C9","\\="),v(Ye,P,kt,"\u02D8","\\u"),v(Ye,P,kt,"\u02D9","\\."),v(Ye,P,kt,"\u02DA","\\r"),v(Ye,P,kt,"\u02C7","\\v"),v(Ye,P,kt,"\xA8",'\\"'),v(Ye,P,kt,"\u02DD","\\H"),v(Ye,P,kt,"\u25EF","\\textcircled");var Lt={"--":!0,"---":!0,"``":!0,"''":!0};v(Ye,P,pe,"\u2013","--"),v(Ye,P,pe,"\u2013","\\textendash"),v(Ye,P,pe,"\u2014","---"),v(Ye,P,pe,"\u2014","\\textemdash"),v(Ye,P,pe,"\u2018","`"),v(Ye,P,pe,"\u2018","\\textquoteleft"),v(Ye,P,pe,"\u2019","'"),v(Ye,P,pe,"\u2019","\\textquoteright"),v(Ye,P,pe,"\u201C","``"),v(Ye,P,pe,"\u201C","\\textquotedblleft"),v(Ye,P,pe,"\u201D","''"),v(Ye,P,pe,"\u201D","\\textquotedblright"),v(E,P,pe,"\xB0","\\degree",!0),v(Ye,P,pe,"\xB0","\\degree"),v(Ye,P,pe,"\xB0","\\textdegree",!0),v(E,P,z,"\xA3","\\pounds"),v(E,P,z,"\xA3","\\mathsterling",!0),v(Ye,P,z,"\xA3","\\pounds"),v(Ye,P,z,"\xA3","\\textsterling",!0),v(E,oe,pe,"\u2720","\\maltese"),v(Ye,oe,pe,"\u2720","\\maltese"),v(Ye,P,xt,"\xA0","\\ "),v(Ye,P,xt,"\xA0"," "),v(Ye,P,xt,"\xA0","~");for(var It='0123456789/@."',Wt=0;Wt<It.length;Wt++){var ur=It.charAt(Wt);v(E,P,pe,ur,ur)}for(var Ct='0123456789!@*()-=+[]<>|";:?/.,',Ot=0;Ot<Ct.length;Ot++){var Re=Ct.charAt(Ot);v(Ye,P,pe,Re,Re)}for(var ot="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",dt=0;dt<ot.length;dt++){var mt=ot.charAt(dt);v(E,P,z,mt,mt),v(Ye,P,pe,mt,mt)}v(E,oe,pe,"C","\u2102"),v(Ye,oe,pe,"C","\u2102"),v(E,oe,pe,"H","\u210D"),v(Ye,oe,pe,"H","\u210D"),v(E,oe,pe,"N","\u2115"),v(Ye,oe,pe,"N","\u2115"),v(E,oe,pe,"P","\u2119"),v(Ye,oe,pe,"P","\u2119"),v(E,oe,pe,"Q","\u211A"),v(Ye,oe,pe,"Q","\u211A"),v(E,oe,pe,"R","\u211D"),v(Ye,oe,pe,"R","\u211D"),v(E,oe,pe,"Z","\u2124"),v(Ye,oe,pe,"Z","\u2124"),v(E,P,z,"h","\u210E"),v(Ye,P,z,"h","\u210E");for(var ut="",Et=0;Et<ot.length;Et++){var Kt=ot.charAt(Et);ut=String.fromCharCode(55349,56320+Et),v(E,P,z,Kt,ut),v(Ye,P,pe,Kt,ut),ut=String.fromCharCode(55349,56372+Et),v(E,P,z,Kt,ut),v(Ye,P,pe,Kt,ut),ut=String.fromCharCode(55349,56424+Et),v(E,P,z,Kt,ut),v(Ye,P,pe,Kt,ut),ut=String.fromCharCode(55349,56580+Et),v(E,P,z,Kt,ut),v(Ye,P,pe,Kt,ut),ut=String.fromCharCode(55349,56736+Et),v(E,P,z,Kt,ut),v(Ye,P,pe,Kt,ut),ut=String.fromCharCode(55349,56788+Et),v(E,P,z,Kt,ut),v(Ye,P,pe,Kt,ut),ut=String.fromCharCode(55349,56840+Et),v(E,P,z,Kt,ut),v(Ye,P,pe,Kt,ut),ut=String.fromCharCode(55349,56944+Et),v(E,P,z,Kt,ut),v(Ye,P,pe,Kt,ut),Et<26&&(ut=String.fromCharCode(55349,56632+Et),v(E,P,z,Kt,ut),v(Ye,P,pe,Kt,ut),ut=String.fromCharCode(55349,56476+Et),v(E,P,z,Kt,ut),v(Ye,P,pe,Kt,ut))}ut="\u{1D55C}",v(E,P,z,"k",ut),v(Ye,P,pe,"k",ut);for(var hr=0;hr<10;hr++){var Xt=hr.toString();ut=String.fromCharCode(55349,57294+hr),v(E,P,z,Xt,ut),v(Ye,P,pe,Xt,ut),ut=String.fromCharCode(55349,57314+hr),v(E,P,z,Xt,ut),v(Ye,P,pe,Xt,ut),ut=String.fromCharCode(55349,57324+hr),v(E,P,z,Xt,ut),v(Ye,P,pe,Xt,ut),ut=String.fromCharCode(55349,57334+hr),v(E,P,z,Xt,ut),v(Ye,P,pe,Xt,ut)}for(var lr="\xC7\xD0\xDE\xE7\xFE",Jt=0;Jt<lr.length;Jt++){var xr=lr.charAt(Jt);v(E,P,z,xr,xr),v(Ye,P,pe,xr,xr)}v(Ye,P,pe,"\xF0","\xF0"),v(Ye,P,pe,"\u2013","\u2013"),v(Ye,P,pe,"\u2014","\u2014"),v(Ye,P,pe,"\u2018","\u2018"),v(Ye,P,pe,"\u2019","\u2019"),v(Ye,P,pe,"\u201C","\u201C"),v(Ye,P,pe,"\u201D","\u201D");var Lr=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathdefault","textit","Math-Italic"],["mathdefault","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],wt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Tt=function(l,c){var h=l.charCodeAt(0),p=l.charCodeAt(1),T=(h-55296)*1024+(p-56320)+65536,C=c==="math"?0:1;if(119808<=T&&T<120484){var ne=Math.floor((T-119808)/26);return[Lr[ne][2],Lr[ne][C]]}else if(120782<=T&&T<=120831){var he=Math.floor((T-120782)/10);return[wt[he][2],wt[he][C]]}else{if(T===120485||T===120486)return[Lr[0][2],Lr[0][C]];if(120486<T&&T<120782)return["",""];throw new re("Unsupported character: "+l)}},tr=[[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]],vr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],cr=function(l,c){return c.size<2?l:tr[l-1][c.size-1]},rr=function(){function k(c){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=c.style,this.color=c.color,this.size=c.size||k.BASESIZE,this.textSize=c.textSize||this.size,this.phantom=!!c.phantom,this.font=c.font||"",this.fontFamily=c.fontFamily||"",this.fontWeight=c.fontWeight||"",this.fontShape=c.fontShape||"",this.sizeMultiplier=vr[this.size-1],this.maxSize=c.maxSize,this.minRuleThickness=c.minRuleThickness,this._fontMetrics=void 0}var l=k.prototype;return l.extend=function(h){var p={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 T in h)h.hasOwnProperty(T)&&(p[T]=h[T]);return new k(p)},l.havingStyle=function(h){return this.style===h?this:this.extend({style:h,size:cr(this.textSize,h)})},l.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},l.havingSize=function(h){return this.size===h&&this.textSize===h?this:this.extend({style:this.style.text(),size:h,textSize:h,sizeMultiplier:vr[h-1]})},l.havingBaseStyle=function(h){h=h||this.style.text();var p=cr(k.BASESIZE,h);return this.size===p&&this.textSize===k.BASESIZE&&this.style===h?this:this.extend({style:h,size:p})},l.havingBaseSizing=function(){var h;switch(this.style.id){case 4:case 5:h=3;break;case 6:case 7:h=1;break;default:h=6}return this.extend({style:this.style.text(),size:h})},l.withColor=function(h){return this.extend({color:h})},l.withPhantom=function(){return this.extend({phantom:!0})},l.withFont=function(h){return this.extend({font:h})},l.withTextFontFamily=function(h){return this.extend({fontFamily:h,font:""})},l.withTextFontWeight=function(h){return this.extend({fontWeight:h,font:""})},l.withTextFontShape=function(h){return this.extend({fontShape:h,font:""})},l.sizingClasses=function(h){return h.size!==this.size?["sizing","reset-size"+h.size,"size"+this.size]:[]},l.baseSizingClasses=function(){return this.size!==k.BASESIZE?["sizing","reset-size"+this.size,"size"+k.BASESIZE]:[]},l.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=Ue(this.size)),this._fontMetrics},l.getColor=function(){return this.phantom?"transparent":this.color},k}();rr.BASESIZE=6;var Mr=rr,Er={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},fr={ex:!0,em:!0,mu:!0},mr=function(l){return typeof l!="string"&&(l=l.unit),l in Er||l in fr||l==="ex"},gr=function(l,c){var h;if(l.unit in Er)h=Er[l.unit]/c.fontMetrics().ptPerEm/c.sizeMultiplier;else if(l.unit==="mu")h=c.fontMetrics().cssEmPerMu;else{var p;if(c.style.isTight()?p=c.havingStyle(c.style.text()):p=c,l.unit==="ex")h=p.fontMetrics().xHeight;else if(l.unit==="em")h=p.fontMetrics().quad;else throw new re("Invalid unit: '"+l.unit+"'");p!==c&&(h*=p.sizeMultiplier/c.sizeMultiplier)}return Math.min(l.number*h,c.maxSize)},Fr=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],Gr=function(l,c,h){return _t[h][l]&&_t[h][l].replace&&(l=_t[h][l].replace),{value:l,metrics:Ae(l,c,h)}},Sr=function(l,c,h,p,T){var C=Gr(l,c,h),ne=C.metrics;l=C.value;var he;if(ne){var Te=ne.italic;(h==="text"||p&&p.font==="mathit")&&(Te=0),he=new ee(l,ne.height,ne.depth,Te,ne.skew,ne.width,T)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+l+"' in style '"+c+"' and mode '"+h+"'")),he=new ee(l,0,0,0,0,0,T);if(p){he.maxFontSize=p.sizeMultiplier,p.style.isTight()&&he.classes.push("mtight");var We=p.getColor();We&&(he.style.color=We)}return he},pr=function(l,c,h,p){return p===void 0&&(p=[]),h.font==="boldsymbol"&&Gr(l,"Main-Bold",c).metrics?Sr(l,"Main-Bold",c,h,p.concat(["mathbf"])):l==="\\"||_t[c][l].font==="main"?Sr(l,"Main-Regular",c,h,p):Sr(l,"AMS-Regular",c,h,p.concat(["amsrm"]))},_r=function(l,c,h,p){return/[0-9]/.test(l.charAt(0))||O.contains(Fr,l)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Pr=function(l,c,h,p){return O.contains(Fr,l)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(l.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},yr=function(l,c,h,p){return Gr(l,"Math-BoldItalic",c).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Dr=function(l,c,h){var p=l.mode,T=l.text,C=["mord"],ne=p==="math"||p==="text"&&c.font,he=ne?c.font:c.fontFamily;if(T.charCodeAt(0)===55349){var Te=Tt(T,p),We=Te[0],rt=Te[1];return Sr(T,We,p,c,C.concat(rt))}else if(he){var gt,St;if(he==="boldsymbol"||he==="mathnormal"){var Ft=he==="boldsymbol"?yr(T,p,c,C):Pr(T,p,c,C);gt=Ft.fontName,St=[Ft.fontClass]}else O.contains(Fr,T)?(gt="Main-Italic",St=["mathit"]):ne?(gt=kn[he].fontName,St=[he]):(gt=_n(he,c.fontWeight,c.fontShape),St=[he,c.fontWeight,c.fontShape]);if(Gr(T,gt,p).metrics)return Sr(T,gt,p,c,C.concat(St));if(Lt.hasOwnProperty(T)&>.substr(0,10)==="Typewriter"){for(var Vt=[],sr=0;sr<T.length;sr++)Vt.push(Sr(T[sr],gt,p,c,C.concat(St)));return Jr(Vt)}}if(h==="mathord"){var Ar=_r(T,p,c,C);return Sr(T,Ar.fontName,p,c,C.concat([Ar.fontClass]))}else if(h==="textord"){var Rr=_t[p][T]&&_t[p][T].font;if(Rr==="ams"){var Tr=_n("amsrm",c.fontWeight,c.fontShape);return Sr(T,Tr,p,c,C.concat("amsrm",c.fontWeight,c.fontShape))}else if(Rr==="main"||!Rr){var Xr=_n("textrm",c.fontWeight,c.fontShape);return Sr(T,Xr,p,c,C.concat(c.fontWeight,c.fontShape))}else{var Qr=_n(Rr,c.fontWeight,c.fontShape);return Sr(T,Qr,p,c,C.concat(Qr,c.fontWeight,c.fontShape))}}else throw new Error("unexpected type: "+h+" in makeOrd")},jr=function(l,c){if(zt(l.classes)!==zt(c.classes)||l.skew!==c.skew||l.maxFontSize!==c.maxFontSize)return!1;for(var h in l.style)if(l.style.hasOwnProperty(h)&&l.style[h]!==c.style[h])return!1;for(var p in c.style)if(c.style.hasOwnProperty(p)&&l.style[p]!==c.style[p])return!1;return!0},Tn=function(l){for(var c=0;c<l.length-1;c++){var h=l[c],p=l[c+1];h instanceof ee&&p instanceof ee&&jr(h,p)&&(h.text+=p.text,h.height=Math.max(h.height,p.height),h.depth=Math.max(h.depth,p.depth),h.italic=p.italic,l.splice(c+1,1),c--)}return l},Yr=function(l){for(var c=0,h=0,p=0,T=0;T<l.children.length;T++){var C=l.children[T];C.height>c&&(c=C.height),C.depth>h&&(h=C.depth),C.maxFontSize>p&&(p=C.maxFontSize)}l.height=c,l.depth=h,l.maxFontSize=p},br=function(l,c,h,p){var T=new se(l,c,h,p);return Yr(T),T},Cr=function(l,c,h,p){return new se(l,c,h,p)},vn=function(l,c,h){var p=br([l],[],c);return p.height=Math.max(h||c.fontMetrics().defaultRuleThickness,c.minRuleThickness),p.style.borderBottomWidth=p.height+"em",p.maxFontSize=1,p},qr=function(l,c,h,p){var T=new Ne(l,c,h,p);return Yr(T),T},Jr=function(l){var c=new Ut(l);return Yr(c),c},zr=function(l,c){return l instanceof Ut?br([],[l],c):l},en=function(l){if(l.positionType==="individualShift"){for(var c=l.children,h=[c[0]],p=-c[0].shift-c[0].elem.depth,T=p,C=1;C<c.length;C++){var ne=-c[C].shift-T-c[C].elem.depth,he=ne-(c[C-1].elem.height+c[C-1].elem.depth);T=T+ne,h.push({type:"kern",size:he}),h.push(c[C])}return{children:h,depth:p}}var Te;if(l.positionType==="top"){for(var We=l.positionData,rt=0;rt<l.children.length;rt++){var gt=l.children[rt];We-=gt.type==="kern"?gt.size:gt.elem.height+gt.elem.depth}Te=We}else if(l.positionType==="bottom")Te=-l.positionData;else{var St=l.children[0];if(St.type!=="elem")throw new Error('First child must have type "elem".');if(l.positionType==="shift")Te=-St.elem.depth-l.positionData;else if(l.positionType==="firstBaseline")Te=-St.elem.depth;else throw new Error("Invalid positionType "+l.positionType+".")}return{children:l.children,depth:Te}},tn=function(l,c){for(var h=en(l),p=h.children,T=h.depth,C=0,ne=0;ne<p.length;ne++){var he=p[ne];if(he.type==="elem"){var Te=he.elem;C=Math.max(C,Te.maxFontSize,Te.height)}}C+=2;var We=br(["pstrut"],[]);We.style.height=C+"em";for(var rt=[],gt=T,St=T,Ft=T,Vt=0;Vt<p.length;Vt++){var sr=p[Vt];if(sr.type==="kern")Ft+=sr.size;else{var Ar=sr.elem,Rr=sr.wrapperClasses||[],Tr=sr.wrapperStyle||{},Xr=br(Rr,[We,Ar],void 0,Tr);Xr.style.top=-C-Ft-Ar.depth+"em",sr.marginLeft&&(Xr.style.marginLeft=sr.marginLeft),sr.marginRight&&(Xr.style.marginRight=sr.marginRight),rt.push(Xr),Ft+=Ar.height+Ar.depth}gt=Math.min(gt,Ft),St=Math.max(St,Ft)}var Qr=br(["vlist"],rt);Qr.style.height=St+"em";var un;if(gt<0){var cn=br([],[]),dn=br(["vlist"],[cn]);dn.style.height=-gt+"em";var Bn=br(["vlist-s"],[new ee("\u200B")]);un=[br(["vlist-r"],[Qr,Bn]),br(["vlist-r"],[dn])]}else un=[br(["vlist-r"],[Qr])];var Rn=br(["vlist-t"],un);return un.length===2&&Rn.classes.push("vlist-t2"),Rn.height=St,Rn.depth=-gt,Rn},rn=function(l,c){var h=br(["mspace"],[],c),p=gr(l,c);return h.style.marginRight=p+"em",h},_n=function(l,c,h){var p="";switch(l){case"amsrm":p="AMS";break;case"textrm":p="Main";break;case"textsf":p="SansSerif";break;case"texttt":p="Typewriter";break;default:p=l}var T;return c==="textbf"&&h==="textit"?T="BoldItalic":c==="textbf"?T="Bold":c==="textit"?T="Italic":T="Regular",p+"-"+T},kn={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"}},Dn={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Gt=function(l,c){var h=Dn[l],p=h[0],T=h[1],C=h[2],ne=new be(p),he=new ye([ne],{width:T+"em",height:C+"em",style:"width:"+T+"em",viewBox:"0 0 "+1e3*T+" "+1e3*C,preserveAspectRatio:"xMinYMin"}),Te=Cr(["overlay"],[he],c);return Te.height=C,Te.style.height=C+"em",Te.style.width=T+"em",Te},ke={fontMap:kn,makeSymbol:Sr,mathsym:pr,makeSpan:br,makeSvgSpan:Cr,makeLineSpan:vn,makeAnchor:qr,makeFragment:Jr,wrapFragment:zr,makeVList:tn,makeOrd:Dr,makeGlue:rn,staticSvg:Gt,svgData:Dn,tryCombineChars:Tn};function Ht(k,l){var c=ar(k,l);if(!c)throw new Error("Expected node of type "+l+", but got "+(k?"node of type "+k.type:String(k)));return c}function ar(k,l){return k&&k.type===l?k:null}function Wr(k,l){var c=En(k,l);if(!c)throw new Error('Expected node of type "atom" and family "'+l+'", but got '+(k?k.type==="atom"?"atom of family "+k.family:"node of type "+k.type:String(k)));return c}function En(k,l){return k&&k.type==="atom"&&k.family===l?k:null}function Ln(k){var l=yn(k);if(!l)throw new Error("Expected node of symbol group type, but got "+(k?"node of type "+k.type:String(k)));return l}function yn(k){return k&&(k.type==="atom"||et.hasOwnProperty(k.type))?k:null}var Nr={number:3,unit:"mu"},bn={number:4,unit:"mu"},In={number:5,unit:"mu"},an={mord:{mop:Nr,mbin:bn,mrel:In,minner:Nr},mop:{mord:Nr,mop:Nr,mrel:In,minner:Nr},mbin:{mord:bn,mop:bn,mopen:bn,minner:bn},mrel:{mord:In,mop:In,mopen:In,minner:In},mopen:{},mclose:{mop:Nr,mbin:bn,mrel:In,minner:Nr},mpunct:{mord:Nr,mop:Nr,mrel:In,mopen:Nr,mclose:Nr,mpunct:Nr,minner:Nr},minner:{mord:Nr,mop:Nr,mbin:bn,mrel:In,mopen:Nr,mpunct:Nr,minner:Nr}},pn={mord:{mop:Nr},mop:{mord:Nr,mop:Nr},mbin:{},mrel:{},mopen:{},mclose:{mop:Nr},mpunct:{},minner:{mop:Nr}},zi={},ti={},li={};function er(k){for(var l=k.type,c=k.names,h=k.props,p=k.handler,T=k.htmlBuilder,C=k.mathmlBuilder,ne={type:l,numArgs:h.numArgs,argTypes:h.argTypes,greediness:h.greediness===void 0?1:h.greediness,allowedInText:!!h.allowedInText,allowedInMath:h.allowedInMath===void 0?!0:h.allowedInMath,numOptionalArgs:h.numOptionalArgs||0,infix:!!h.infix,handler:p},he=0;he<c.length;++he)zi[c[he]]=ne;l&&(T&&(ti[l]=T),C&&(li[l]=C))}function Gn(k){var l=k.type,c=k.htmlBuilder,h=k.mathmlBuilder;er({type:l,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:c,mathmlBuilder:h})}var mn=function(l){var c=ar(l,"ordgroup");return c?c.body:[l]},Fn=ke.makeSpan,Gi=["leftmost","mbin","mopen","mrel","mop","mpunct"],ui=["rightmost","mrel","mclose","mpunct"],ri={display:b.DISPLAY,text:b.TEXT,script:b.SCRIPT,scriptscript:b.SCRIPTSCRIPT},Yn={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},hn=function(l,c,h,p){p===void 0&&(p=[null,null]);for(var T=[],C=0;C<l.length;C++){var ne=Br(l[C],c);if(ne instanceof Ut){var he=ne.children;T.push.apply(T,he)}else T.push(ne)}if(!h)return T;var Te=c;if(l.length===1){var We=ar(l[0],"sizing")||ar(l[0],"styling");We&&(We.type==="sizing"?Te=c.havingSize(We.size):We.type==="styling"&&(Te=c.havingStyle(ri[We.style])))}var rt=Fn([p[0]||"leftmost"],[],c),gt=Fn([p[1]||"rightmost"],[],c);return qn(T,function(St,Ft){var Vt=Ft.classes[0],sr=St.classes[0];Vt==="mbin"&&O.contains(ui,sr)?Ft.classes[0]="mord":sr==="mbin"&&O.contains(Gi,Vt)&&(St.classes[0]="mord")},{node:rt},gt),qn(T,function(St,Ft){var Vt=On(Ft),sr=On(St),Ar=Vt&&sr?St.hasClass("mtight")?pn[Vt][sr]:an[Vt][sr]:null;if(Ar)return ke.makeGlue(Ar,Te)},{node:rt},gt),T},qn=function k(l,c,h,p){p&&l.push(p);for(var T=0;T<l.length;T++){var C=l[T],ne=Kn(C);if(ne){k(ne.children,c,h);continue}if(C.classes[0]!=="mspace"){var he=c(C,h.node);he&&(h.insertAfter?h.insertAfter(he):(l.unshift(he),T++)),h.node=C,h.insertAfter=function(Te){return function(We){l.splice(Te+1,0,We),T++}}(T)}}p&&l.pop()},Kn=function(l){return l instanceof Ut||l instanceof Ne?l:null},ki=function k(l,c){var h=Kn(l);if(h){var p=h.children;if(p.length){if(c==="right")return k(p[p.length-1],"right");if(c==="left")return k(p[0],"left")}}return l},On=function(l,c){return l?(c&&(l=ki(l,c)),Yn[l.classes[0]]||null):null},Un=function(l,c){var h=["nulldelimiter"].concat(l.baseSizingClasses());return Fn(c.concat(h))},Br=function(l,c,h){if(!l)return Fn();if(ti[l.type]){var p=ti[l.type](l,c);if(h&&c.size!==h.size){p=Fn(c.sizingClasses(h),[p],c);var T=c.sizeMultiplier/h.sizeMultiplier;p.height*=T,p.depth*=T}return p}else throw new re("Got group of unknown type: '"+l.type+"'")};function pi(k,l){var c=Fn(["base"],k,l),h=Fn(["strut"]);return h.style.height=c.height+c.depth+"em",h.style.verticalAlign=-c.depth+"em",c.children.unshift(h),c}function Li(k,l){var c=null;k.length===1&&k[0].type==="tag"&&(c=k[0].tag,k=k[0].body);for(var h=hn(k,l,!0),p=[],T=[],C=0;C<h.length;C++)if(T.push(h[C]),h[C].hasClass("mbin")||h[C].hasClass("mrel")||h[C].hasClass("allowbreak")){for(var ne=!1;C<h.length-1&&h[C+1].hasClass("mspace")&&!h[C+1].hasClass("newline");)C++,T.push(h[C]),h[C].hasClass("nobreak")&&(ne=!0);ne||(p.push(pi(T,l)),T=[])}else h[C].hasClass("newline")&&(T.pop(),T.length>0&&(p.push(pi(T,l)),T=[]),p.push(h[C]));T.length>0&&p.push(pi(T,l));var he;c&&(he=pi(hn(c,l,!0)),he.classes=["tag"],p.push(he));var Te=Fn(["katex-html"],p);if(Te.setAttribute("aria-hidden","true"),he){var We=he.children[0];We.style.height=Te.height+Te.depth+"em",We.style.verticalAlign=-Te.depth+"em"}return Te}function Ii(k){return new Ut(k)}var Pn=function(){function k(c,h){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=c,this.attributes={},this.children=h||[]}var l=k.prototype;return l.setAttribute=function(h,p){this.attributes[h]=p},l.getAttribute=function(h){return this.attributes[h]},l.toNode=function(){var h=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var p in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,p)&&h.setAttribute(p,this.attributes[p]);for(var T=0;T<this.children.length;T++)h.appendChild(this.children[T].toNode());return h},l.toMarkup=function(){var h="<"+this.type;for(var p in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,p)&&(h+=" "+p+'="',h+=O.escape(this.attributes[p]),h+='"');h+=">";for(var T=0;T<this.children.length;T++)h+=this.children[T].toMarkup();return h+="</"+this.type+">",h},l.toText=function(){return this.children.map(function(h){return h.toText()}).join("")},k}(),mi=function(){function k(c){this.text=void 0,this.text=c}var l=k.prototype;return l.toNode=function(){return document.createTextNode(this.text)},l.toMarkup=function(){return O.escape(this.toText())},l.toText=function(){return this.text},k}(),Hi=function(){function k(c){this.width=void 0,this.character=void 0,this.width=c,c>=.05555&&c<=.05556?this.character="\u200A":c>=.1666&&c<=.1667?this.character="\u2009":c>=.2222&&c<=.2223?this.character="\u2005":c>=.2777&&c<=.2778?this.character="\u2005\u200A":c>=-.05556&&c<=-.05555?this.character="\u200A\u2063":c>=-.1667&&c<=-.1666?this.character="\u2009\u2063":c>=-.2223&&c<=-.2222?this.character="\u205F\u2063":c>=-.2778&&c<=-.2777?this.character="\u2005\u2063":this.character=null}var l=k.prototype;return l.toNode=function(){if(this.character)return document.createTextNode(this.character);var h=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return h.setAttribute("width",this.width+"em"),h},l.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+this.width+'em"/>'},l.toText=function(){return this.character?this.character:" "},k}(),Pt={MathNode:Pn,TextNode:mi,SpaceNode:Hi,newDocumentFragment:Ii},Mn=function(l,c,h){return _t[c][l]&&_t[c][l].replace&&l.charCodeAt(0)!==55349&&!(Lt.hasOwnProperty(l)&&h&&(h.fontFamily&&h.fontFamily.substr(4,2)==="tt"||h.font&&h.font.substr(4,2)==="tt"))&&(l=_t[c][l].replace),new Pt.TextNode(l)},Fi=function(l){return l.length===1?l[0]:new Pt.MathNode("mrow",l)},gi=function(l,c){if(c.fontFamily==="texttt")return"monospace";if(c.fontFamily==="textsf")return c.fontShape==="textit"&&c.fontWeight==="textbf"?"sans-serif-bold-italic":c.fontShape==="textit"?"sans-serif-italic":c.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(c.fontShape==="textit"&&c.fontWeight==="textbf")return"bold-italic";if(c.fontShape==="textit")return"italic";if(c.fontWeight==="textbf")return"bold";var h=c.font;if(!h||h==="mathnormal")return null;var p=l.mode;if(h==="mathit")return"italic";if(h==="boldsymbol")return"bold-italic";if(h==="mathbf")return"bold";if(h==="mathbb")return"double-struck";if(h==="mathfrak")return"fraktur";if(h==="mathscr"||h==="mathcal")return"script";if(h==="mathsf")return"sans-serif";if(h==="mathtt")return"monospace";var T=l.text;if(O.contains(["\\imath","\\jmath"],T))return null;_t[p][T]&&_t[p][T].replace&&(T=_t[p][T].replace);var C=ke.fontMap[h].fontName;return Ae(T,C,p)?ke.fontMap[h].variant:null},Cn=function(l,c,h){if(l.length===1){var p=Hr(l[0],c);return h&&p instanceof Pn&&p.type==="mo"&&(p.setAttribute("lspace","0em"),p.setAttribute("rspace","0em")),[p]}for(var T=[],C,ne=0;ne<l.length;ne++){var he=Hr(l[ne],c);if(he instanceof Pn&&C instanceof Pn){if(he.type==="mtext"&&C.type==="mtext"&&he.getAttribute("mathvariant")===C.getAttribute("mathvariant")){var Te;(Te=C.children).push.apply(Te,he.children);continue}else if(he.type==="mn"&&C.type==="mn"){var We;(We=C.children).push.apply(We,he.children);continue}else if(he.type==="mi"&&he.children.length===1&&C.type==="mn"){var rt=he.children[0];if(rt instanceof mi&&rt.text==="."){var gt;(gt=C.children).push.apply(gt,he.children);continue}}else if(C.type==="mi"&&C.children.length===1){var St=C.children[0];if(St instanceof mi&&St.text==="\u0338"&&(he.type==="mo"||he.type==="mi"||he.type==="mn")){var Ft=he.children[0];Ft instanceof mi&&Ft.text.length>0&&(Ft.text=Ft.text.slice(0,1)+"\u0338"+Ft.text.slice(1),T.pop())}}}T.push(he),C=he}return T},gn=function(l,c,h){return Fi(Cn(l,c,h))},Hr=function(l,c){if(!l)return new Pt.MathNode("mrow");if(li[l.type]){var h=li[l.type](l,c);return h}else throw new re("Got group of unknown type: '"+l.type+"'")};function Vn(k,l,c,h){var p=Cn(k,c),T;p.length===1&&p[0]instanceof Pn&&O.contains(["mrow","mtable"],p[0].type)?T=p[0]:T=new Pt.MathNode("mrow",p);var C=new Pt.MathNode("annotation",[new Pt.TextNode(l)]);C.setAttribute("encoding","application/x-tex");var ne=new Pt.MathNode("semantics",[T,C]),he=new Pt.MathNode("math",[ne]);he.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var Te=h?"katex":"katex-mathml";return ke.makeSpan([Te],[he])}var Xn=function(l){return new Mr({style:l.displayMode?b.DISPLAY:b.TEXT,maxSize:l.maxSize,minRuleThickness:l.minRuleThickness})},ci=function(l,c){if(c.displayMode){var h=["katex-display"];c.leqno&&h.push("leqno"),c.fleqn&&h.push("fleqn"),l=ke.makeSpan(h,[l])}return l},Qn=function(l,c,h){var p=Xn(h),T;if(h.output==="mathml")return Vn(l,c,p,!0);if(h.output==="html"){var C=Li(l,p);T=ke.makeSpan(["katex"],[C])}else{var ne=Vn(l,c,p,!1),he=Li(l,p);T=ke.makeSpan(["katex"],[ne,he])}return ci(T,h)},Oi=function(l,c,h){var p=Xn(h),T=Li(l,p),C=ke.makeSpan(["katex"],[T]);return ci(C,h)},Pi=Qn,ji={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB"},Si=function(l){var c=new Pt.MathNode("mo",[new Pt.TextNode(ji[l.substr(1)])]);return c.setAttribute("stretchy","true"),c},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]},Mi=function(l){return l.type==="ordgroup"?l.body.length:1},ts=function(l,c){function h(){var he=4e5,Te=l.label.substr(1);if(O.contains(["widehat","widecheck","widetilde","utilde"],Te)){var We=l,rt=Mi(We.base),gt,St,Ft;if(rt>5)Te==="widehat"||Te==="widecheck"?(gt=420,he=2364,Ft=.42,St=Te+"4"):(gt=312,he=2340,Ft=.34,St="tilde4");else{var Vt=[1,1,2,2,3,3][rt];Te==="widehat"||Te==="widecheck"?(he=[0,1062,2364,2364,2364][Vt],gt=[0,239,300,360,420][Vt],Ft=[0,.24,.3,.3,.36,.42][Vt],St=Te+Vt):(he=[0,600,1033,2339,2340][Vt],gt=[0,260,286,306,312][Vt],Ft=[0,.26,.286,.3,.306,.34][Vt],St="tilde"+Vt)}var sr=new be(St),Ar=new ye([sr],{width:"100%",height:Ft+"em",viewBox:"0 0 "+he+" "+gt,preserveAspectRatio:"none"});return{span:ke.makeSvgSpan([],[Ar],c),minWidth:0,height:Ft}}else{var Rr=[],Tr=es[Te],Xr=Tr[0],Qr=Tr[1],un=Tr[2],cn=un/1e3,dn=Xr.length,Bn,Rn;if(dn===1){var Vr=Tr[3];Bn=["hide-tail"],Rn=[Vr]}else if(dn===2)Bn=["halfarrow-left","halfarrow-right"],Rn=["xMinYMin","xMaxYMin"];else if(dn===3)Bn=["brace-left","brace-center","brace-right"],Rn=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
|
`+dn+" children.");for(var ei=0;ei<dn;ei++){var Ei=new be(Xr[ei]),oi=new ye([Ei],{width:"400em",height:cn+"em",viewBox:"0 0 "+he+" "+un,preserveAspectRatio:Rn[ei]+" slice"}),Nn=ke.makeSvgSpan([Bn[ei]],[oi],c);if(dn===1)return{span:Nn,minWidth:Qr,height:cn};Nn.style.height=cn+"em",Rr.push(Nn)}return{span:ke.makeSpan(["stretchy"],Rr,c),minWidth:Qr,height:cn}}}var p=h(),T=p.span,C=p.minWidth,ne=p.height;return T.height=ne,T.style.height=ne+"em",C>0&&(T.style.minWidth=C+"em"),T},or=function(l,c,h,p){var T,C=l.height+l.depth+2*h;if(/fbox|color/.test(c)){if(T=ke.makeSpan(["stretchy",c],[],p),c==="fbox"){var ne=p.color&&p.getColor();ne&&(T.style.borderColor=ne)}}else{var he=[];/^[bx]cancel$/.test(c)&&he.push(new Le({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(c)&&he.push(new Le({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var Te=new ye(he,{width:"100%",height:C+"em"});T=ke.makeSvgSpan([],[Te],p)}return T.height=C,T.style.height=C+"em",T},Yt={encloseSpan:or,mathMLnode:Si,svgSpan:ts},$r=function(l,c){var h,p,T=ar(l,"supsub"),C;T?(p=Ht(T.base,"accent"),h=p.base,T.base=h,C=Ve(Br(T,c)),T.base=p):(p=Ht(l,"accent"),h=p.base);var ne=Br(h,c.havingCrampedStyle()),he=p.isShifty&&O.isCharacterBox(h),Te=0;if(he){var We=O.getBaseElem(h),rt=Br(We,c.havingCrampedStyle());Te=Be(rt).skew}var gt=Math.min(ne.height,c.fontMetrics().xHeight),St;if(p.isStretchy)St=Yt.svgSpan(p,c),St=ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ne},{type:"elem",elem:St,wrapperClasses:["svg-align"],wrapperStyle:Te>0?{width:"calc(100% - "+2*Te+"em)",marginLeft:2*Te+"em"}:void 0}]},c);else{var Ft,Vt;p.label==="\\vec"?(Ft=ke.staticSvg("vec",c),Vt=ke.svgData.vec[1]):(Ft=ke.makeOrd({mode:p.mode,text:p.label},c,"textord"),Ft=Be(Ft),Ft.italic=0,Vt=Ft.width),St=ke.makeSpan(["accent-body"],[Ft]);var sr=p.label==="\\textcircled";sr&&(St.classes.push("accent-full"),gt=ne.height);var Ar=Te;sr||(Ar-=Vt/2),St.style.left=Ar+"em",p.label==="\\textcircled"&&(St.style.top=".2em"),St=ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ne},{type:"kern",size:-gt},{type:"elem",elem:St}]},c)}var Rr=ke.makeSpan(["mord","accent"],[St],c);return C?(C.children[0]=Rr,C.height=Math.max(Rr.height,C.height),C.classes[0]="mord",C):Rr},fn=function(l,c){var h=l.isStretchy?Yt.mathMLnode(l.label):new Pt.MathNode("mo",[Mn(l.label,l.mode)]),p=new Pt.MathNode("mover",[Hr(l.base,c),h]);return p.setAttribute("accent","true"),p},on=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(k){return"\\"+k}).join("|"));er({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(l,c){var h=c[0],p=!on.test(l.funcName),T=!p||l.funcName==="\\widehat"||l.funcName==="\\widetilde"||l.funcName==="\\widecheck";return{type:"accent",mode:l.parser.mode,label:l.funcName,isStretchy:p,isShifty:T,base:h}},htmlBuilder:$r,mathmlBuilder:fn}),er({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(l,c){var h=c[0];return{type:"accent",mode:l.parser.mode,label:l.funcName,isStretchy:!1,isShifty:!0,base:h}},htmlBuilder:$r,mathmlBuilder:fn}),er({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(l,c){var h=l.parser,p=l.funcName,T=c[0];return{type:"accentUnder",mode:h.mode,label:p,base:T}},htmlBuilder:function(l,c){var h=Br(l.base,c),p=Yt.svgSpan(l,c),T=l.label==="\\utilde"?.12:0,C=ke.makeVList({positionType:"bottom",positionData:p.height+T,children:[{type:"elem",elem:p,wrapperClasses:["svg-align"]},{type:"kern",size:T},{type:"elem",elem:h}]},c);return ke.makeSpan(["mord","accentunder"],[C],c)},mathmlBuilder:function(l,c){var h=Yt.mathMLnode(l.label),p=new Pt.MathNode("munder",[Hr(l.base,c),h]);return p.setAttribute("accentunder","true"),p}});var Hn=function(l){var c=new Pt.MathNode("mpadded",l?[l]:[]);return c.setAttribute("width","+0.6em"),c.setAttribute("lspace","0.3em"),c};er({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(l,c,h){var p=l.parser,T=l.funcName;return{type:"xArrow",mode:p.mode,label:T,body:c[0],below:h[0]}},htmlBuilder:function(l,c){var h=c.style,p=c.havingStyle(h.sup()),T=ke.wrapFragment(Br(l.body,p,c),c);T.classes.push("x-arrow-pad");var C;l.below&&(p=c.havingStyle(h.sub()),C=ke.wrapFragment(Br(l.below,p,c),c),C.classes.push("x-arrow-pad"));var ne=Yt.svgSpan(l,c),he=-c.fontMetrics().axisHeight+.5*ne.height,Te=-c.fontMetrics().axisHeight-.5*ne.height-.111;(T.depth>.25||l.label==="\\xleftequilibrium")&&(Te-=T.depth);var We;if(C){var rt=-c.fontMetrics().axisHeight+C.height+.5*ne.height+.111;We=ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:T,shift:Te},{type:"elem",elem:ne,shift:he},{type:"elem",elem:C,shift:rt}]},c)}else We=ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:T,shift:Te},{type:"elem",elem:ne,shift:he}]},c);return We.children[0].children[0].children[1].classes.push("svg-align"),ke.makeSpan(["mrel","x-arrow"],[We],c)},mathmlBuilder:function(l,c){var h=Yt.mathMLnode(l.label),p;if(l.body){var T=Hn(Hr(l.body,c));if(l.below){var C=Hn(Hr(l.below,c));p=new Pt.MathNode("munderover",[h,C,T])}else p=new Pt.MathNode("mover",[h,T])}else if(l.below){var ne=Hn(Hr(l.below,c));p=new Pt.MathNode("munder",[h,ne])}else p=Hn(),p=new Pt.MathNode("mover",[h,p]);return p}}),er({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(l,c){for(var h=l.parser,p=Ht(c[0],"ordgroup"),T=p.body,C="",ne=0;ne<T.length;ne++){var he=Ht(T[ne],"textord");C+=he.text}var Te=parseInt(C);if(isNaN(Te))throw new re("\\@char has non-numeric argument "+C);return{type:"textord",mode:h.mode,text:String.fromCharCode(Te)}}});var Wi=function(l,c){var h=hn(l.body,c.withColor(l.color),!1);return ke.makeFragment(h)},Ki=function(l,c){var h=Cn(l.body,c.withColor(l.color)),p=new Pt.MathNode("mstyle",h);return p.setAttribute("mathcolor",l.color),p};er({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(l,c){var h=l.parser,p=Ht(c[0],"color-token").color,T=c[1];return{type:"color",mode:h.mode,color:p,body:mn(T)}},htmlBuilder:Wi,mathmlBuilder:Ki}),er({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(l,c){var h=l.parser,p=l.breakOnTokenText,T=Ht(c[0],"color-token").color;h.gullet.macros.set("\\current@color",T);var C=h.parseExpression(!0,p);return{type:"color",mode:h.mode,color:T,body:C}},htmlBuilder:Wi,mathmlBuilder:Ki}),er({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(l,c,h){var p=l.parser,T=l.funcName,C=h[0],ne=T==="\\cr",he=!1;return ne||(p.settings.displayMode&&p.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?he=!1:he=!0),{type:"cr",mode:p.mode,newLine:he,newRow:ne,size:C&&Ht(C,"size").value}},htmlBuilder:function(l,c){if(l.newRow)throw new re("\\cr valid only within a tabular/array environment");var h=ke.makeSpan(["mspace"],[],c);return l.newLine&&(h.classes.push("newline"),l.size&&(h.style.marginTop=gr(l.size,c)+"em")),h},mathmlBuilder:function(l,c){var h=new Pt.MathNode("mspace");return l.newLine&&(h.setAttribute("linebreak","newline"),l.size&&h.setAttribute("height",gr(l.size,c)+"em")),h}});var ni=function(l,c,h){var p=_t.math[l]&&_t.math[l].replace,T=Ae(p||l,c,h);if(!T)throw new Error("Unsupported symbol "+l+" and font size "+c+".");return T},Ls=function(l,c,h,p){var T=h.havingBaseStyle(c),C=ke.makeSpan(p.concat(T.sizingClasses(h)),[l],h),ne=T.sizeMultiplier/h.sizeMultiplier;return C.height*=ne,C.depth*=ne,C.maxFontSize=T.sizeMultiplier,C},ra=function(l,c,h){var p=c.havingBaseStyle(h),T=(1-c.sizeMultiplier/p.sizeMultiplier)*c.fontMetrics().axisHeight;l.classes.push("delimcenter"),l.style.top=T+"em",l.height-=T,l.depth+=T},Oa=function(l,c,h,p,T,C){var ne=ke.makeSymbol(l,"Main-Regular",T,p),he=Ls(ne,c,p,C);return h&&ra(he,p,c),he},Pa=function(l,c,h,p){return ke.makeSymbol(l,"Size"+c+"-Regular",h,p)},na=function(l,c,h,p,T,C){var ne=Pa(l,c,T,p),he=Ls(ke.makeSpan(["delimsizing","size"+c],[ne],p),b.TEXT,p,C);return h&&ra(he,p,b.TEXT),he},Ai=function(l,c,h){var p;c==="Size1-Regular"?p="delim-size1":p="delim-size4";var T=ke.makeSpan(["delimsizinginner",p],[ke.makeSpan([],[ke.makeSymbol(l,c,h)])]);return{type:"elem",elem:T}},Zn={type:"kern",size:-.005},ia=function(l,c,h,p,T,C){var ne,he,Te,We;ne=Te=We=l,he=null;var rt="Size1-Regular";l==="\\uparrow"?Te=We="\u23D0":l==="\\Uparrow"?Te=We="\u2016":l==="\\downarrow"?ne=Te="\u23D0":l==="\\Downarrow"?ne=Te="\u2016":l==="\\updownarrow"?(ne="\\uparrow",Te="\u23D0",We="\\downarrow"):l==="\\Updownarrow"?(ne="\\Uparrow",Te="\u2016",We="\\Downarrow"):l==="["||l==="\\lbrack"?(ne="\u23A1",Te="\u23A2",We="\u23A3",rt="Size4-Regular"):l==="]"||l==="\\rbrack"?(ne="\u23A4",Te="\u23A5",We="\u23A6",rt="Size4-Regular"):l==="\\lfloor"||l==="\u230A"?(Te=ne="\u23A2",We="\u23A3",rt="Size4-Regular"):l==="\\lceil"||l==="\u2308"?(ne="\u23A1",Te=We="\u23A2",rt="Size4-Regular"):l==="\\rfloor"||l==="\u230B"?(Te=ne="\u23A5",We="\u23A6",rt="Size4-Regular"):l==="\\rceil"||l==="\u2309"?(ne="\u23A4",Te=We="\u23A5",rt="Size4-Regular"):l==="("||l==="\\lparen"?(ne="\u239B",Te="\u239C",We="\u239D",rt="Size4-Regular"):l===")"||l==="\\rparen"?(ne="\u239E",Te="\u239F",We="\u23A0",rt="Size4-Regular"):l==="\\{"||l==="\\lbrace"?(ne="\u23A7",he="\u23A8",We="\u23A9",Te="\u23AA",rt="Size4-Regular"):l==="\\}"||l==="\\rbrace"?(ne="\u23AB",he="\u23AC",We="\u23AD",Te="\u23AA",rt="Size4-Regular"):l==="\\lgroup"||l==="\u27EE"?(ne="\u23A7",We="\u23A9",Te="\u23AA",rt="Size4-Regular"):l==="\\rgroup"||l==="\u27EF"?(ne="\u23AB",We="\u23AD",Te="\u23AA",rt="Size4-Regular"):l==="\\lmoustache"||l==="\u23B0"?(ne="\u23A7",We="\u23AD",Te="\u23AA",rt="Size4-Regular"):(l==="\\rmoustache"||l==="\u23B1")&&(ne="\u23AB",We="\u23A9",Te="\u23AA",rt="Size4-Regular");var gt=ni(ne,rt,T),St=gt.height+gt.depth,Ft=ni(Te,rt,T),Vt=Ft.height+Ft.depth,sr=ni(We,rt,T),Ar=sr.height+sr.depth,Rr=0,Tr=1;if(he!==null){var Xr=ni(he,rt,T);Rr=Xr.height+Xr.depth,Tr=2}var Qr=St+Ar+Rr,un=Math.max(0,Math.ceil((c-Qr)/(Tr*Vt))),cn=Qr+un*Tr*Vt,dn=p.fontMetrics().axisHeight;h&&(dn*=p.sizeMultiplier);var Bn=cn/2-dn,Rn=(un+1)*.005-Vt,Vr=[];if(Vr.push(Ai(We,rt,T)),he===null)for(var ei=0;ei<un;ei++)Vr.push(Zn),Vr.push(Ai(Te,rt,T));else{for(var Ei=0;Ei<un;Ei++)Vr.push(Zn),Vr.push(Ai(Te,rt,T));Vr.push({type:"kern",size:Rn}),Vr.push(Ai(Te,rt,T)),Vr.push(Zn),Vr.push(Ai(he,rt,T));for(var oi=0;oi<un;oi++)Vr.push(Zn),Vr.push(Ai(Te,rt,T))}Vr.push({type:"kern",size:Rn}),Vr.push(Ai(Te,rt,T)),Vr.push(Zn),Vr.push(Ai(ne,rt,T));var Nn=p.havingBaseStyle(b.TEXT),wi=ke.makeVList({positionType:"bottom",positionData:Bn,children:Vr},Nn);return Ls(ke.makeSpan(["delimsizing","mult"],[wi],Nn),b.TEXT,p,C)},Is=80,Jn=.08,vi=function(l,c,h,p,T){var C=Zt(l,p,h),ne=new be(l,C),he=new ye([ne],{width:"400em",height:c+"em",viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});return ke.makeSvgSpan(["hide-tail"],[he],T)},Ma=function(l,c){var h=c.havingBaseSizing(),p=sa("\\surd",l*h.sizeMultiplier,rs,h),T=h.sizeMultiplier,C=Math.max(0,c.minRuleThickness-c.fontMetrics().sqrtRuleThickness),ne,he=0,Te=0,We=0,rt;return p.type==="small"?(We=1e3+1e3*C+Is,l<1?T=1:l<1.4&&(T=.7),he=(1+C+Jn)/T,Te=(1+C)/T,ne=vi("sqrtMain",he,We,C,c),ne.style.minWidth="0.853em",rt=.833/T):p.type==="large"?(We=(1e3+Is)*us[p.size],Te=(us[p.size]+C)/T,he=(us[p.size]+C+Jn)/T,ne=vi("sqrtSize"+p.size,he,We,C,c),ne.style.minWidth="1.02em",rt=1/T):(he=l+C+Jn,Te=l+C,We=Math.floor(1e3*l+C)+Is,ne=vi("sqrtTall",he,We,C,c),ne.style.minWidth="0.742em",rt=1.056),ne.height=Te,ne.style.height=he+"em",{span:ne,advanceWidth:rt,ruleWidth:(c.fontMetrics().sqrtRuleThickness+C)*T}},Ti=["(","\\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"],Fs=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],us=[0,1.2,1.8,2.4,3],Na=function(l,c,h,p,T){if(l==="<"||l==="\\lt"||l==="\u27E8"?l="\\langle":(l===">"||l==="\\gt"||l==="\u27E9")&&(l="\\rangle"),O.contains(Ti,l)||O.contains(Fs,l))return na(l,c,!1,h,p,T);if(O.contains(Ba,l))return ia(l,us[c],!1,h,p,T);throw new re("Illegal delimiter: '"+l+"'")},wn=[{type:"small",style:b.SCRIPTSCRIPT},{type:"small",style:b.SCRIPT},{type:"small",style:b.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],$a=[{type:"small",style:b.SCRIPTSCRIPT},{type:"small",style:b.SCRIPT},{type:"small",style:b.TEXT},{type:"stack"}],rs=[{type:"small",style:b.SCRIPTSCRIPT},{type:"small",style:b.SCRIPT},{type:"small",style:b.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Vi=function(l){if(l.type==="small")return"Main-Regular";if(l.type==="large")return"Size"+l.size+"-Regular";if(l.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+l.type+"' here.")},sa=function(l,c,h,p){for(var T=Math.min(2,3-p.style.size),C=T;C<h.length&&h[C].type!=="stack";C++){var ne=ni(l,Vi(h[C]),"math"),he=ne.height+ne.depth;if(h[C].type==="small"){var Te=p.havingBaseStyle(h[C].style);he*=Te.sizeMultiplier}if(he>c)return h[C]}return h[h.length-1]},nn=function(l,c,h,p,T,C){l==="<"||l==="\\lt"||l==="\u27E8"?l="\\langle":(l===">"||l==="\\gt"||l==="\u27E9")&&(l="\\rangle");var ne;O.contains(Fs,l)?ne=wn:O.contains(Ti,l)?ne=rs:ne=$a;var he=sa(l,c,ne,p);return he.type==="small"?Oa(l,he.style,h,p,T,C):he.type==="large"?na(l,he.size,h,p,T,C):ia(l,c,h,p,T,C)},Os=function(l,c,h,p,T,C){var ne=p.fontMetrics().axisHeight*p.sizeMultiplier,he=901,Te=5/p.fontMetrics().ptPerEm,We=Math.max(c-ne,h+ne),rt=Math.max(We/500*he,2*We-Te);return nn(l,rt,!0,p,T,C)},ii={sqrtImage:Ma,sizedDelim:Na,customSizedDelim:nn,leftRightDelim:Os},ns={"\\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}},Ua=["(","\\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(k,l){var c=yn(k);if(c&&O.contains(Ua,c.text))return c;throw new re("Invalid delimiter: '"+(c?c.text:JSON.stringify(k))+"' after '"+l.funcName+"'",k)}er({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1},handler:function(l,c){var h=cs(c[0],l);return{type:"delimsizing",mode:l.parser.mode,size:ns[l.funcName].size,mclass:ns[l.funcName].mclass,delim:h.text}},htmlBuilder:function(l,c){return l.delim==="."?ke.makeSpan([l.mclass]):ii.sizedDelim(l.delim,l.size,c,l.mode,[l.mclass])},mathmlBuilder:function(l){var c=[];l.delim!=="."&&c.push(Mn(l.delim,l.mode));var h=new Pt.MathNode("mo",c);return l.mclass==="mopen"||l.mclass==="mclose"?h.setAttribute("fence","true"):h.setAttribute("fence","false"),h}});function Ps(k){if(!k.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}er({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(l,c){var h=l.parser.gullet.macros.get("\\current@color");if(h&&typeof h!="string")throw new re("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:l.parser.mode,delim:cs(c[0],l).text,color:h}}}),er({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(l,c){var h=cs(c[0],l),p=l.parser;++p.leftrightDepth;var T=p.parseExpression(!1);--p.leftrightDepth,p.expect("\\right",!1);var C=Ht(p.parseFunction(),"leftright-right");return{type:"leftright",mode:p.mode,body:T,left:h.text,right:C.delim,rightColor:C.color}},htmlBuilder:function(l,c){Ps(l);for(var h=hn(l.body,c,!0,["mopen","mclose"]),p=0,T=0,C=!1,ne=0;ne<h.length;ne++)h[ne].isMiddle?C=!0:(p=Math.max(h[ne].height,p),T=Math.max(h[ne].depth,T));p*=c.sizeMultiplier,T*=c.sizeMultiplier;var he;if(l.left==="."?he=Un(c,["mopen"]):he=ii.leftRightDelim(l.left,p,T,c,l.mode,["mopen"]),h.unshift(he),C)for(var Te=1;Te<h.length;Te++){var We=h[Te],rt=We.isMiddle;rt&&(h[Te]=ii.leftRightDelim(rt.delim,p,T,rt.options,l.mode,[]))}var gt;if(l.right===".")gt=Un(c,["mclose"]);else{var St=l.rightColor?c.withColor(l.rightColor):c;gt=ii.leftRightDelim(l.right,p,T,St,l.mode,["mclose"])}return h.push(gt),ke.makeSpan(["minner"],h,c)},mathmlBuilder:function(l,c){Ps(l);var h=Cn(l.body,c);if(l.left!=="."){var p=new Pt.MathNode("mo",[Mn(l.left,l.mode)]);p.setAttribute("fence","true"),h.unshift(p)}if(l.right!=="."){var T=new Pt.MathNode("mo",[Mn(l.right,l.mode)]);T.setAttribute("fence","true"),l.rightColor&&T.setAttribute("mathcolor",l.rightColor),h.push(T)}return Fi(h)}}),er({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(l,c){var h=cs(c[0],l);if(!l.parser.leftrightDepth)throw new re("\\middle without preceding \\left",h);return{type:"middle",mode:l.parser.mode,delim:h.text}},htmlBuilder:function(l,c){var h;if(l.delim===".")h=Un(c,[]);else{h=ii.sizedDelim(l.delim,1,c,l.mode,[]);var p={delim:l.delim,options:c};h.isMiddle=p}return h},mathmlBuilder:function(l,c){var h=l.delim==="\\vert"||l.delim==="|"?Mn("|","text"):Mn(l.delim,l.mode),p=new Pt.MathNode("mo",[h]);return p.setAttribute("fence","true"),p.setAttribute("lspace","0.05em"),p.setAttribute("rspace","0.05em"),p}});var hs=function(l,c){var h=ke.wrapFragment(Br(l.body,c),c),p=l.label.substr(1),T=c.sizeMultiplier,C,ne=0,he=O.isCharacterBox(l.body);if(p==="sout")C=ke.makeSpan(["stretchy","sout"]),C.height=c.fontMetrics().defaultRuleThickness/T,ne=-.5*c.fontMetrics().xHeight;else{/cancel/.test(p)?he||h.classes.push("cancel-pad"):h.classes.push("boxpad");var Te=0,We=0;/box/.test(p)?(We=Math.max(c.fontMetrics().fboxrule,c.minRuleThickness),Te=c.fontMetrics().fboxsep+(p==="colorbox"?0:We)):Te=he?.2:0,C=Yt.encloseSpan(h,p,Te,c),/fbox|boxed|fcolorbox/.test(p)&&(C.style.borderStyle="solid",C.style.borderWidth=We+"em"),ne=h.depth+Te,l.backgroundColor&&(C.style.backgroundColor=l.backgroundColor,l.borderColor&&(C.style.borderColor=l.borderColor))}var rt;return l.backgroundColor?rt=ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:C,shift:ne},{type:"elem",elem:h,shift:0}]},c):rt=ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:0},{type:"elem",elem:C,shift:ne,wrapperClasses:/cancel/.test(p)?["svg-align"]:[]}]},c),/cancel/.test(p)&&(rt.height=h.height,rt.depth=h.depth),/cancel/.test(p)&&!he?ke.makeSpan(["mord","cancel-lap"],[rt],c):ke.makeSpan(["mord"],[rt],c)},Ms=function(l,c){var h=0,p=new Pt.MathNode(l.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Hr(l.body,c)]);switch(l.label){case"\\cancel":p.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":p.setAttribute("notation","downdiagonalstrike");break;case"\\sout":p.setAttribute("notation","horizontalstrike");break;case"\\fbox":p.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(h=c.fontMetrics().fboxsep*c.fontMetrics().ptPerEm,p.setAttribute("width","+"+2*h+"pt"),p.setAttribute("height","+"+2*h+"pt"),p.setAttribute("lspace",h+"pt"),p.setAttribute("voffset",h+"pt"),l.label==="\\fcolorbox"){var T=Math.max(c.fontMetrics().fboxrule,c.minRuleThickness);p.setAttribute("style","border: "+T+"em solid "+String(l.borderColor))}break;case"\\xcancel":p.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return l.backgroundColor&&p.setAttribute("mathbackground",l.backgroundColor),p};er({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(l,c,h){var p=l.parser,T=l.funcName,C=Ht(c[0],"color-token").color,ne=c[1];return{type:"enclose",mode:p.mode,label:T,backgroundColor:C,body:ne}},htmlBuilder:hs,mathmlBuilder:Ms}),er({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(l,c,h){var p=l.parser,T=l.funcName,C=Ht(c[0],"color-token").color,ne=Ht(c[1],"color-token").color,he=c[2];return{type:"enclose",mode:p.mode,label:T,backgroundColor:ne,borderColor:C,body:he}},htmlBuilder:hs,mathmlBuilder:Ms}),er({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(l,c){var h=l.parser;return{type:"enclose",mode:h.mode,label:"\\fbox",body:c[0]}}}),er({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(l,c,h){var p=l.parser,T=l.funcName,C=c[0];return{type:"enclose",mode:p.mode,label:T,body:C}},htmlBuilder:hs,mathmlBuilder:Ms});var aa={};function si(k){for(var l=k.type,c=k.names,h=k.props,p=k.handler,T=k.htmlBuilder,C=k.mathmlBuilder,ne={type:l,numArgs:h.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:p},he=0;he<c.length;++he)aa[c[he]]=ne;T&&(ti[l]=T),C&&(li[l]=C)}function Bs(k){var l=[];k.consumeSpaces();for(var c=k.fetch().text;c==="\\hline"||c==="\\hdashline";)k.consume(),l.push(c==="\\hdashline"),k.consumeSpaces(),c=k.fetch().text;return l}function Bi(k,l,c){var h=l.hskipBeforeAndAfter,p=l.addJot,T=l.cols,C=l.arraystretch,ne=l.colSeparationType;if(k.gullet.beginGroup(),k.gullet.macros.set("\\\\","\\cr"),!C){var he=k.gullet.expandMacroAsText("\\arraystretch");if(he==null)C=1;else if(C=parseFloat(he),!C||C<0)throw new re("Invalid \\arraystretch: "+he)}k.gullet.beginGroup();var Te=[],We=[Te],rt=[],gt=[];for(gt.push(Bs(k));;){var St=k.parseExpression(!1,"\\cr");k.gullet.endGroup(),k.gullet.beginGroup(),St={type:"ordgroup",mode:k.mode,body:St},c&&(St={type:"styling",mode:k.mode,style:c,body:[St]}),Te.push(St);var Ft=k.fetch().text;if(Ft==="&")k.consume();else if(Ft==="\\end"){Te.length===1&&St.type==="styling"&&St.body[0].body.length===0&&We.pop(),gt.length<We.length+1&>.push([]);break}else if(Ft==="\\cr"){var Vt=Ht(k.parseFunction(),"cr");rt.push(Vt.size),gt.push(Bs(k)),Te=[],We.push(Te)}else throw new re("Expected & or \\\\ or \\cr or \\end",k.nextToken)}return k.gullet.endGroup(),k.gullet.endGroup(),{type:"array",mode:k.mode,addJot:p,arraystretch:C,body:We,cols:T,rowGaps:rt,hskipBeforeAndAfter:h,hLinesBeforeRow:gt,colSeparationType:ne}}function fs(k){return k.substr(0,1)==="d"?"display":"text"}var _i=function(l,c){var h,p,T=l.body.length,C=l.hLinesBeforeRow,ne=0,he=new Array(T),Te=[],We=Math.max(c.fontMetrics().arrayRuleWidth,c.minRuleThickness),rt=1/c.fontMetrics().ptPerEm,gt=5*rt;if(l.colSeparationType&&l.colSeparationType==="small"){var St=c.havingStyle(b.SCRIPT).sizeMultiplier;gt=.2778*(St/c.sizeMultiplier)}var Ft=12*rt,Vt=3*rt,sr=l.arraystretch*Ft,Ar=.7*sr,Rr=.3*sr,Tr=0;function Xr(ea){for(var Ui=0;Ui<ea.length;++Ui)Ui>0&&(Tr+=.25),Te.push({pos:Tr,isDashed:ea[Ui]})}for(Xr(C[0]),h=0;h<l.body.length;++h){var Qr=l.body[h],un=Ar,cn=Rr;ne<Qr.length&&(ne=Qr.length);var dn=new Array(Qr.length);for(p=0;p<Qr.length;++p){var Bn=Br(Qr[p],c);cn<Bn.depth&&(cn=Bn.depth),un<Bn.height&&(un=Bn.height),dn[p]=Bn}var Rn=l.rowGaps[h],Vr=0;Rn&&(Vr=gr(Rn,c),Vr>0&&(Vr+=Rr,cn<Vr&&(cn=Vr),Vr=0)),l.addJot&&(cn+=Vt),dn.height=un,dn.depth=cn,Tr+=un,dn.pos=Tr,Tr+=cn+Vr,he[h]=dn,Xr(C[h+1])}var ei=Tr/2+c.fontMetrics().axisHeight,Ei=l.cols||[],oi=[],Nn,wi;for(p=0,wi=0;p<ne||wi<Ei.length;++p,++wi){for(var xn=Ei[wi]||{},hi=!0;xn.type==="separator";){if(hi||(Nn=ke.makeSpan(["arraycolsep"],[]),Nn.style.width=c.fontMetrics().doubleRuleSep+"em",oi.push(Nn)),xn.separator==="|"||xn.separator===":"){var to=xn.separator==="|"?"solid":"dashed",Xi=ke.makeSpan(["vertical-separator"],[],c);Xi.style.height=Tr+"em",Xi.style.borderRightWidth=We+"em",Xi.style.borderRightStyle=to,Xi.style.margin="0 -"+We/2+"em",Xi.style.verticalAlign=-(Tr-ei)+"em",oi.push(Xi)}else throw new re("Invalid separator type: "+xn.separator);wi++,xn=Ei[wi]||{},hi=!1}if(!(p>=ne)){var Qi=void 0;(p>0||l.hskipBeforeAndAfter)&&(Qi=O.deflt(xn.pregap,gt),Qi!==0&&(Nn=ke.makeSpan(["arraycolsep"],[]),Nn.style.width=Qi+"em",oi.push(Nn)));var Ji=[];for(h=0;h<T;++h){var Ts=he[h],Ds=Ts[p];if(Ds){var $i=Ts.pos-ei;Ds.depth=Ts.depth,Ds.height=Ts.height,Ji.push({type:"elem",elem:Ds,shift:$i})}}Ji=ke.makeVList({positionType:"individualShift",children:Ji},c),Ji=ke.makeSpan(["col-align-"+(xn.align||"c")],[Ji]),oi.push(Ji),(p<ne-1||l.hskipBeforeAndAfter)&&(Qi=O.deflt(xn.postgap,gt),Qi!==0&&(Nn=ke.makeSpan(["arraycolsep"],[]),Nn.style.width=Qi+"em",oi.push(Nn)))}}if(he=ke.makeSpan(["mtable"],oi),Te.length>0){for(var Da=ke.makeLineSpan("hline",c,We),ro=ke.makeLineSpan("hdashline",c,We),Qs=[{type:"elem",elem:he,shift:0}];Te.length>0;){var Cs=Te.pop(),Js=Cs.pos-ei;Cs.isDashed?Qs.push({type:"elem",elem:ro,shift:Js}):Qs.push({type:"elem",elem:Da,shift:Js})}he=ke.makeVList({positionType:"individualShift",children:Qs},c)}return ke.makeSpan(["mord"],[he],c)},yi={c:"center ",l:"left ",r:"right "},Di=function(l,c){var h=new Pt.MathNode("mtable",l.body.map(function(Tr){return new Pt.MathNode("mtr",Tr.map(function(Xr){return new Pt.MathNode("mtd",[Hr(Xr,c)])}))})),p=l.arraystretch===.5?.1:.16+l.arraystretch-1+(l.addJot?.09:0);h.setAttribute("rowspacing",p+"em");var T="",C="";if(l.cols){var ne=l.cols,he="",Te=!1,We=0,rt=ne.length;ne[0].type==="separator"&&(T+="top ",We=1),ne[ne.length-1].type==="separator"&&(T+="bottom ",rt-=1);for(var gt=We;gt<rt;gt++)ne[gt].type==="align"?(C+=yi[ne[gt].align],Te&&(he+="none "),Te=!0):ne[gt].type==="separator"&&Te&&(he+=ne[gt].separator==="|"?"solid ":"dashed ",Te=!1);h.setAttribute("columnalign",C.trim()),/[sd]/.test(he)&&h.setAttribute("columnlines",he.trim())}if(l.colSeparationType==="align"){for(var St=l.cols||[],Ft="",Vt=1;Vt<St.length;Vt++)Ft+=Vt%2?"0em ":"1em ";h.setAttribute("columnspacing",Ft.trim())}else l.colSeparationType==="alignat"?h.setAttribute("columnspacing","0em"):l.colSeparationType==="small"?h.setAttribute("columnspacing","0.2778em"):h.setAttribute("columnspacing","1em");var sr="",Ar=l.hLinesBeforeRow;T+=Ar[0].length>0?"left ":"",T+=Ar[Ar.length-1].length>0?"right ":"";for(var Rr=1;Rr<Ar.length-1;Rr++)sr+=Ar[Rr].length===0?"none ":Ar[Rr][0]?"dashed ":"solid ";return/[sd]/.test(sr)&&h.setAttribute("rowlines",sr.trim()),T!==""&&(h=new Pt.MathNode("menclose",[h]),h.setAttribute("notation",T.trim())),l.arraystretch&&l.arraystretch<1&&(h=new Pt.MathNode("mstyle",[h]),h.setAttribute("scriptlevel","1")),h},oa=function(l,c){var h=[],p=Bi(l.parser,{cols:h,addJot:!0},"display"),T,C=0,ne={type:"ordgroup",mode:l.mode,body:[]},he=ar(c[0],"ordgroup");if(he){for(var Te="",We=0;We<he.body.length;We++){var rt=Ht(he.body[We],"textord");Te+=rt.text}T=Number(Te),C=T*2}var gt=!C;p.body.forEach(function(sr){for(var Ar=1;Ar<sr.length;Ar+=2){var Rr=Ht(sr[Ar],"styling"),Tr=Ht(Rr.body[0],"ordgroup");Tr.body.unshift(ne)}if(gt)C<sr.length&&(C=sr.length);else{var Xr=sr.length/2;if(T<Xr)throw new re("Too many math in a row: "+("expected "+T+", but got "+Xr),sr[0])}});for(var St=0;St<C;++St){var Ft="r",Vt=0;St%2===1?Ft="l":St>0&>&&(Vt=1),h[St]={type:"align",align:Ft,pregap:Vt,postgap:0}}return p.colSeparationType=gt?"align":"alignat",p};si({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(l,c){var h=yn(c[0]),p=h?[c[0]]:Ht(c[0],"ordgroup").body,T=p.map(function(ne){var he=Ln(ne),Te=he.text;if("lcr".indexOf(Te)!==-1)return{type:"align",align:Te};if(Te==="|")return{type:"separator",separator:"|"};if(Te===":")return{type:"separator",separator:":"};throw new re("Unknown column alignment: "+Te,ne)}),C={cols:T,hskipBeforeAndAfter:!0};return Bi(l.parser,C,fs(l.envName))},htmlBuilder:_i,mathmlBuilder:Di}),si({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(l){var c={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[l.envName],h={hskipBeforeAndAfter:!1},p=Bi(l.parser,h,fs(l.envName));return c?{type:"leftright",mode:l.mode,body:[p],left:c[0],right:c[1],rightColor:void 0}:p},htmlBuilder:_i,mathmlBuilder:Di}),si({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(l){var c={arraystretch:.5},h=Bi(l.parser,c,"script");return h.colSeparationType="small",h},htmlBuilder:_i,mathmlBuilder:Di}),si({type:"array",names:["subarray"],props:{numArgs:1},handler:function(l,c){var h=yn(c[0]),p=h?[c[0]]:Ht(c[0],"ordgroup").body,T=p.map(function(ne){var he=Ln(ne),Te=he.text;if("lc".indexOf(Te)!==-1)return{type:"align",align:Te};throw new re("Unknown column alignment: "+Te,ne)});if(T.length>1)throw new re("{subarray} can contain only one column");var C={cols:T,hskipBeforeAndAfter:!1,arraystretch:.5};if(C=Bi(l.parser,C,"script"),C.body[0].length>1)throw new re("{subarray} can contain only one column");return C},htmlBuilder:_i,mathmlBuilder:Di}),si({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(l){var c={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},h=Bi(l.parser,c,fs(l.envName));return{type:"leftright",mode:l.mode,body:[h],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:_i,mathmlBuilder:Di}),si({type:"array",names:["aligned"],props:{numArgs:0},handler:oa,htmlBuilder:_i,mathmlBuilder:Di}),si({type:"array",names:["gathered"],props:{numArgs:0},handler:function(l){var c={cols:[{type:"align",align:"c"}],addJot:!0};return Bi(l.parser,c,"display")},htmlBuilder:_i,mathmlBuilder:Di}),si({type:"array",names:["alignedat"],props:{numArgs:1},handler:oa,htmlBuilder:_i,mathmlBuilder:Di}),er({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(l,c){throw new re(l.funcName+" valid only within array environment")}});var za=aa,la=za;er({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(l,c){var h=l.parser,p=l.funcName,T=c[0];if(T.type!=="ordgroup")throw new re("Invalid environment name",T);for(var C="",ne=0;ne<T.body.length;++ne)C+=Ht(T.body[ne],"textord").text;if(p==="\\begin"){if(!la.hasOwnProperty(C))throw new re("No such environment: "+C,T);var he=la[C],Te=h.parseArguments("\\begin{"+C+"}",he),We=Te.args,rt=Te.optArgs,gt={mode:h.mode,envName:C,parser:h},St=he.handler(gt,We,rt);h.expect("\\end",!1);var Ft=h.nextToken,Vt=Ht(h.parseFunction(),"environment");if(Vt.name!==C)throw new re("Mismatch: \\begin{"+C+"} matched by \\end{"+Vt.name+"}",Ft);return St}return{type:"environment",mode:h.mode,name:C,nameGroup:T}}});var Ga=ke.makeSpan;function ds(k,l){var c=hn(k.body,l,!0);return Ga([k.mclass],c,l)}function ua(k,l){var c,h=Cn(k.body,l);return k.mclass==="minner"?Pt.newDocumentFragment(h):(k.mclass==="mord"?k.isCharacterBox?(c=h[0],c.type="mi"):c=new Pt.MathNode("mi",h):(k.isCharacterBox?(c=h[0],c.type="mo"):c=new Pt.MathNode("mo",h),k.mclass==="mbin"?(c.attributes.lspace="0.22em",c.attributes.rspace="0.22em"):k.mclass==="mpunct"?(c.attributes.lspace="0em",c.attributes.rspace="0.17em"):(k.mclass==="mopen"||k.mclass==="mclose")&&(c.attributes.lspace="0em",c.attributes.rspace="0em")),c)}er({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(l,c){var h=l.parser,p=l.funcName,T=c[0];return{type:"mclass",mode:h.mode,mclass:"m"+p.substr(5),body:mn(T),isCharacterBox:O.isCharacterBox(T)}},htmlBuilder:ds,mathmlBuilder:ua});var Dt=function(l){var c=l.type==="ordgroup"&&l.body.length?l.body[0]:l;return c.type==="atom"&&(c.family==="bin"||c.family==="rel")?"m"+c.family:"mord"};er({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(l,c){var h=l.parser;return{type:"mclass",mode:h.mode,mclass:Dt(c[0]),body:[c[1]],isCharacterBox:O.isCharacterBox(c[1])}}}),er({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(l,c){var h=l.parser,p=l.funcName,T=c[1],C=c[0],ne;p!=="\\stackrel"?ne=Dt(T):ne="mrel";var he={type:"op",mode:T.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:p!=="\\stackrel",body:mn(T)},Te={type:"supsub",mode:C.mode,base:he,sup:p==="\\underset"?null:C,sub:p==="\\underset"?C:null};return{type:"mclass",mode:h.mode,mclass:ne,body:[Te],isCharacterBox:O.isCharacterBox(Te)}},htmlBuilder:ds,mathmlBuilder:ua});var ps=function(l,c){var h=l.font,p=c.withFont(h);return Br(l.body,p)},Ns=function(l,c){var h=l.font,p=c.withFont(h);return Hr(l.body,p)},ca={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};er({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(l,c){var h=l.parser,p=l.funcName,T=c[0],C=p;return C in ca&&(C=ca[C]),{type:"font",mode:h.mode,font:C.slice(1),body:T}},htmlBuilder:ps,mathmlBuilder:Ns}),er({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(l,c){var h=l.parser,p=c[0],T=O.isCharacterBox(p);return{type:"mclass",mode:h.mode,mclass:Dt(p),body:[{type:"font",mode:h.mode,font:"boldsymbol",body:p}],isCharacterBox:T}}}),er({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(l,c){var h=l.parser,p=l.funcName,T=l.breakOnTokenText,C=h.mode,ne=h.parseExpression(!0,T),he="math"+p.slice(1);return{type:"font",mode:C,font:he,body:{type:"ordgroup",mode:h.mode,body:ne}}},htmlBuilder:ps,mathmlBuilder:Ns});var ha=function(l,c){var h=c;return l==="display"?h=h.id>=b.SCRIPT.id?h.text():b.DISPLAY:l==="text"&&h.size===b.DISPLAY.size?h=b.TEXT:l==="script"?h=b.SCRIPT:l==="scriptscript"&&(h=b.SCRIPTSCRIPT),h},$s=function(l,c){var h=ha(l.size,c.style),p=h.fracNum(),T=h.fracDen(),C;C=c.havingStyle(p);var ne=Br(l.numer,C,c);if(l.continued){var he=8.5/c.fontMetrics().ptPerEm,Te=3.5/c.fontMetrics().ptPerEm;ne.height=ne.height<he?he:ne.height,ne.depth=ne.depth<Te?Te:ne.depth}C=c.havingStyle(T);var We=Br(l.denom,C,c),rt,gt,St;l.hasBarLine?(l.barSize?(gt=gr(l.barSize,c),rt=ke.makeLineSpan("frac-line",c,gt)):rt=ke.makeLineSpan("frac-line",c),gt=rt.height,St=rt.height):(rt=null,gt=0,St=c.fontMetrics().defaultRuleThickness);var Ft,Vt,sr;h.size===b.DISPLAY.size||l.size==="display"?(Ft=c.fontMetrics().num1,gt>0?Vt=3*St:Vt=7*St,sr=c.fontMetrics().denom1):(gt>0?(Ft=c.fontMetrics().num2,Vt=St):(Ft=c.fontMetrics().num3,Vt=3*St),sr=c.fontMetrics().denom2);var Ar;if(rt){var Tr=c.fontMetrics().axisHeight;Ft-ne.depth-(Tr+.5*gt)<Vt&&(Ft+=Vt-(Ft-ne.depth-(Tr+.5*gt))),Tr-.5*gt-(We.height-sr)<Vt&&(sr+=Vt-(Tr-.5*gt-(We.height-sr)));var Xr=-(Tr-.5*gt);Ar=ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:We,shift:sr},{type:"elem",elem:rt,shift:Xr},{type:"elem",elem:ne,shift:-Ft}]},c)}else{var Rr=Ft-ne.depth-(We.height-sr);Rr<Vt&&(Ft+=.5*(Vt-Rr),sr+=.5*(Vt-Rr)),Ar=ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:We,shift:sr},{type:"elem",elem:ne,shift:-Ft}]},c)}C=c.havingStyle(h),Ar.height*=C.sizeMultiplier/c.sizeMultiplier,Ar.depth*=C.sizeMultiplier/c.sizeMultiplier;var Qr;h.size===b.DISPLAY.size?Qr=c.fontMetrics().delim1:Qr=c.fontMetrics().delim2;var un,cn;return l.leftDelim==null?un=Un(c,["mopen"]):un=ii.customSizedDelim(l.leftDelim,Qr,!0,c.havingStyle(h),l.mode,["mopen"]),l.continued?cn=ke.makeSpan([]):l.rightDelim==null?cn=Un(c,["mclose"]):cn=ii.customSizedDelim(l.rightDelim,Qr,!0,c.havingStyle(h),l.mode,["mclose"]),ke.makeSpan(["mord"].concat(C.sizingClasses(c)),[un,ke.makeSpan(["mfrac"],[Ar]),cn],c)},Us=function(l,c){var h=new Pt.MathNode("mfrac",[Hr(l.numer,c),Hr(l.denom,c)]);if(!l.hasBarLine)h.setAttribute("linethickness","0px");else if(l.barSize){var p=gr(l.barSize,c);h.setAttribute("linethickness",p+"em")}var T=ha(l.size,c.style);if(T.size!==c.style.size){h=new Pt.MathNode("mstyle",[h]);var C=T.size===b.DISPLAY.size?"true":"false";h.setAttribute("displaystyle",C),h.setAttribute("scriptlevel","0")}if(l.leftDelim!=null||l.rightDelim!=null){var ne=[];if(l.leftDelim!=null){var he=new Pt.MathNode("mo",[new Pt.TextNode(l.leftDelim.replace("\\",""))]);he.setAttribute("fence","true"),ne.push(he)}if(ne.push(h),l.rightDelim!=null){var Te=new Pt.MathNode("mo",[new Pt.TextNode(l.rightDelim.replace("\\",""))]);Te.setAttribute("fence","true"),ne.push(Te)}return Fi(ne)}return h};er({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(l,c){var h=l.parser,p=l.funcName,T=c[0],C=c[1],ne,he=null,Te=null,We="auto";switch(p){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":ne=!0;break;case"\\\\atopfrac":ne=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":ne=!1,he="(",Te=")";break;case"\\\\bracefrac":ne=!1,he="\\{",Te="\\}";break;case"\\\\brackfrac":ne=!1,he="[",Te="]";break;default:throw new Error("Unrecognized genfrac command")}switch(p){case"\\cfrac":case"\\dfrac":case"\\dbinom":We="display";break;case"\\tfrac":case"\\tbinom":We="text";break}return{type:"genfrac",mode:h.mode,continued:p==="\\cfrac",numer:T,denom:C,hasBarLine:ne,leftDelim:he,rightDelim:Te,size:We,barSize:null}},htmlBuilder:$s,mathmlBuilder:Us}),er({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(l){var c=l.parser,h=l.funcName,p=l.token,T;switch(h){case"\\over":T="\\frac";break;case"\\choose":T="\\binom";break;case"\\atop":T="\\\\atopfrac";break;case"\\brace":T="\\\\bracefrac";break;case"\\brack":T="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:c.mode,replaceWith:T,token:p}}});var ai=["display","text","script","scriptscript"],ms=function(l){var c=null;return l.length>0&&(c=l,c=c==="."?null:c),c};er({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(l,c){var h=l.parser,p=c[4],T=c[5],C=ar(c[0],"atom");C&&(C=Wr(c[0],"open"));var ne=C?ms(C.text):null,he=ar(c[1],"atom");he&&(he=Wr(c[1],"close"));var Te=he?ms(he.text):null,We=Ht(c[2],"size"),rt,gt=null;We.isBlank?rt=!0:(gt=We.value,rt=gt.number>0);var St="auto",Ft=ar(c[3],"ordgroup");if(Ft){if(Ft.body.length>0){var Vt=Ht(Ft.body[0],"textord");St=ai[Number(Vt.text)]}}else Ft=Ht(c[3],"textord"),St=ai[Number(Ft.text)];return{type:"genfrac",mode:h.mode,numer:p,denom:T,continued:!1,hasBarLine:rt,barSize:gt,leftDelim:ne,rightDelim:Te,size:St}},htmlBuilder:$s,mathmlBuilder:Us}),er({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(l,c){var h=l.parser,p=l.funcName,T=l.token;return{type:"infix",mode:h.mode,replaceWith:"\\\\abovefrac",size:Ht(c[0],"size").value,token:T}}}),er({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(l,c){var h=l.parser,p=l.funcName,T=c[0],C=U(Ht(c[1],"infix").size),ne=c[2],he=C.number>0;return{type:"genfrac",mode:h.mode,numer:T,denom:ne,continued:!1,hasBarLine:he,barSize:C,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:$s,mathmlBuilder:Us});var fa=function(l,c){var h=c.style,p,T,C=ar(l,"supsub");C?(p=C.sup?Br(C.sup,c.havingStyle(h.sup()),c):Br(C.sub,c.havingStyle(h.sub()),c),T=Ht(C.base,"horizBrace")):T=Ht(l,"horizBrace");var ne=Br(T.base,c.havingBaseStyle(b.DISPLAY)),he=Yt.svgSpan(T,c),Te;if(T.isOver?(Te=ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ne},{type:"kern",size:.1},{type:"elem",elem:he}]},c),Te.children[0].children[0].children[1].classes.push("svg-align")):(Te=ke.makeVList({positionType:"bottom",positionData:ne.depth+.1+he.height,children:[{type:"elem",elem:he},{type:"kern",size:.1},{type:"elem",elem:ne}]},c),Te.children[0].children[0].children[0].classes.push("svg-align")),p){var We=ke.makeSpan(["mord",T.isOver?"mover":"munder"],[Te],c);T.isOver?Te=ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:We},{type:"kern",size:.2},{type:"elem",elem:p}]},c):Te=ke.makeVList({positionType:"bottom",positionData:We.depth+.2+p.height+p.depth,children:[{type:"elem",elem:p},{type:"kern",size:.2},{type:"elem",elem:We}]},c)}return ke.makeSpan(["mord",T.isOver?"mover":"munder"],[Te],c)},Ha=function(l,c){var h=Yt.mathMLnode(l.label);return new Pt.MathNode(l.isOver?"mover":"munder",[Hr(l.base,c),h])};er({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(l,c){var h=l.parser,p=l.funcName;return{type:"horizBrace",mode:h.mode,label:p,isOver:/^\\over/.test(p),base:c[0]}},htmlBuilder:fa,mathmlBuilder:Ha}),er({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(l,c){var h=l.parser,p=c[1],T=Ht(c[0],"url").url;return h.settings.isTrusted({command:"\\href",url:T})?{type:"href",mode:h.mode,href:T,body:mn(p)}:h.formatUnsupportedCmd("\\href")},htmlBuilder:function(l,c){var h=hn(l.body,c,!1);return ke.makeAnchor(l.href,[],h,c)},mathmlBuilder:function(l,c){var h=gn(l.body,c);return h instanceof Pn||(h=new Pn("mrow",[h])),h.setAttribute("href",l.href),h}}),er({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(l,c){var h=l.parser,p=Ht(c[0],"url").url;if(!h.settings.isTrusted({command:"\\url",url:p}))return h.formatUnsupportedCmd("\\url");for(var T=[],C=0;C<p.length;C++){var ne=p[C];ne==="~"&&(ne="\\textasciitilde"),T.push({type:"textord",mode:"text",text:ne})}var he={type:"text",mode:h.mode,font:"\\texttt",body:T};return{type:"href",mode:h.mode,href:p,body:mn(he)}}}),er({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(l,c){var h=l.parser;return{type:"htmlmathml",mode:h.mode,html:mn(c[0]),mathml:mn(c[1])}},htmlBuilder:function(l,c){var h=hn(l.html,c,!1);return ke.makeFragment(h)},mathmlBuilder:function(l,c){return gn(l.mathml,c)}});var gs=function(l){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(l))return{number:+l,unit:"bp"};var c=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(l);if(!c)throw new re("Invalid size: '"+l+"' in \\includegraphics");var h={number:+(c[1]+c[2]),unit:c[3]};if(!mr(h))throw new re("Invalid unit: '"+h.unit+"' in \\includegraphics.");return h};er({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(l,c,h){var p=l.parser,T={number:0,unit:"em"},C={number:.9,unit:"em"},ne={number:0,unit:"em"},he="";if(h[0])for(var Te=Ht(h[0],"raw").string,We=Te.split(","),rt=0;rt<We.length;rt++){var gt=We[rt].split("=");if(gt.length===2){var St=gt[1].trim();switch(gt[0].trim()){case"alt":he=St;break;case"width":T=gs(St);break;case"height":C=gs(St);break;case"totalheight":ne=gs(St);break;default:throw new re("Invalid key: '"+gt[0]+"' in \\includegraphics.")}}}var Ft=Ht(c[0],"url").url;return he===""&&(he=Ft,he=he.replace(/^.*[\\/]/,""),he=he.substring(0,he.lastIndexOf("."))),p.settings.isTrusted({command:"\\includegraphics",url:Ft})?{type:"includegraphics",mode:p.mode,alt:he,width:T,height:C,totalheight:ne,src:Ft}:p.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(l,c){var h=gr(l.height,c),p=0;l.totalheight.number>0&&(p=gr(l.totalheight,c)-h,p=Number(p.toFixed(2)));var T=0;l.width.number>0&&(T=gr(l.width,c));var C={height:h+p+"em"};T>0&&(C.width=T+"em"),p>0&&(C.verticalAlign=-p+"em");var ne=new He(l.src,l.alt,C);return ne.height=h,ne.depth=p,ne},mathmlBuilder:function(l,c){var h=new Pt.MathNode("mglyph",[]);h.setAttribute("alt",l.alt);var p=gr(l.height,c),T=0;if(l.totalheight.number>0&&(T=gr(l.totalheight,c)-p,T=T.toFixed(2),h.setAttribute("valign","-"+T+"em")),h.setAttribute("height",p+T+"em"),l.width.number>0){var C=gr(l.width,c);h.setAttribute("width",C+"em")}return h.setAttribute("src",l.src),h}}),er({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(l,c){var h=l.parser,p=l.funcName,T=Ht(c[0],"size");if(h.settings.strict){var C=p[1]==="m",ne=T.value.unit==="mu";C?(ne||h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" supports only mu units, "+("not "+T.value.unit+" units")),h.mode!=="math"&&h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" works only in math mode")):ne&&h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" doesn't support mu units")}return{type:"kern",mode:h.mode,dimension:T.value}},htmlBuilder:function(l,c){return ke.makeGlue(l.dimension,c)},mathmlBuilder:function(l,c){var h=gr(l.dimension,c);return new Pt.SpaceNode(h)}}),er({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(l,c){var h=l.parser,p=l.funcName,T=c[0];return{type:"lap",mode:h.mode,alignment:p.slice(5),body:T}},htmlBuilder:function(l,c){var h;l.alignment==="clap"?(h=ke.makeSpan([],[Br(l.body,c)]),h=ke.makeSpan(["inner"],[h],c)):h=ke.makeSpan(["inner"],[Br(l.body,c)]);var p=ke.makeSpan(["fix"],[]),T=ke.makeSpan([l.alignment],[h,p],c),C=ke.makeSpan(["strut"]);return C.style.height=T.height+T.depth+"em",C.style.verticalAlign=-T.depth+"em",T.children.unshift(C),T=ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:T}]},c),ke.makeSpan(["mord"],[T],c)},mathmlBuilder:function(l,c){var h=new Pt.MathNode("mpadded",[Hr(l.body,c)]);if(l.alignment!=="rlap"){var p=l.alignment==="llap"?"-1":"-0.5";h.setAttribute("lspace",p+"width")}return h.setAttribute("width","0px"),h}}),er({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(l,c){var h=l.funcName,p=l.parser,T=p.mode;p.switchMode("math");var C=h==="\\("?"\\)":"$",ne=p.parseExpression(!1,C);return p.expect(C),p.switchMode(T),{type:"styling",mode:p.mode,style:"text",body:ne}}}),er({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(l,c){throw new re("Mismatched "+l.funcName)}});var zs=function(l,c){switch(c.style.size){case b.DISPLAY.size:return l.display;case b.TEXT.size:return l.text;case b.SCRIPT.size:return l.script;case b.SCRIPTSCRIPT.size:return l.scriptscript;default:return l.text}};er({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(l,c){var h=l.parser;return{type:"mathchoice",mode:h.mode,display:mn(c[0]),text:mn(c[1]),script:mn(c[2]),scriptscript:mn(c[3])}},htmlBuilder:function(l,c){var h=zs(l,c),p=hn(h,c,!1);return ke.makeFragment(p)},mathmlBuilder:function(l,c){var h=zs(l,c);return gn(h,c)}});var vs=function(l,c,h,p,T,C,ne){l=ke.makeSpan([],[l]);var he,Te;if(c){var We=Br(c,p.havingStyle(T.sup()),p);Te={elem:We,kern:Math.max(p.fontMetrics().bigOpSpacing1,p.fontMetrics().bigOpSpacing3-We.depth)}}if(h){var rt=Br(h,p.havingStyle(T.sub()),p);he={elem:rt,kern:Math.max(p.fontMetrics().bigOpSpacing2,p.fontMetrics().bigOpSpacing4-rt.height)}}var gt;if(Te&&he){var St=p.fontMetrics().bigOpSpacing5+he.elem.height+he.elem.depth+he.kern+l.depth+ne;gt=ke.makeVList({positionType:"bottom",positionData:St,children:[{type:"kern",size:p.fontMetrics().bigOpSpacing5},{type:"elem",elem:he.elem,marginLeft:-C+"em"},{type:"kern",size:he.kern},{type:"elem",elem:l},{type:"kern",size:Te.kern},{type:"elem",elem:Te.elem,marginLeft:C+"em"},{type:"kern",size:p.fontMetrics().bigOpSpacing5}]},p)}else if(he){var Ft=l.height-ne;gt=ke.makeVList({positionType:"top",positionData:Ft,children:[{type:"kern",size:p.fontMetrics().bigOpSpacing5},{type:"elem",elem:he.elem,marginLeft:-C+"em"},{type:"kern",size:he.kern},{type:"elem",elem:l}]},p)}else if(Te){var Vt=l.depth+ne;gt=ke.makeVList({positionType:"bottom",positionData:Vt,children:[{type:"elem",elem:l},{type:"kern",size:Te.kern},{type:"elem",elem:Te.elem,marginLeft:C+"em"},{type:"kern",size:p.fontMetrics().bigOpSpacing5}]},p)}else return l;return ke.makeSpan(["mop","op-limits"],[gt],p)},da=["\\smallint"],bi=function(l,c){var h,p,T=!1,C,ne=ar(l,"supsub");ne?(h=ne.sup,p=ne.sub,C=Ht(ne.base,"op"),T=!0):C=Ht(l,"op");var he=c.style,Te=!1;he.size===b.DISPLAY.size&&C.symbol&&!O.contains(da,C.name)&&(Te=!0);var We;if(C.symbol){var rt=Te?"Size2-Regular":"Size1-Regular",gt="";if((C.name==="\\oiint"||C.name==="\\oiiint")&&(gt=C.name.substr(1),C.name=gt==="oiint"?"\\iint":"\\iiint"),We=ke.makeSymbol(C.name,rt,"math",c,["mop","op-symbol",Te?"large-op":"small-op"]),gt.length>0){var St=We.italic,Ft=ke.staticSvg(gt+"Size"+(Te?"2":"1"),c);We=ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:We,shift:0},{type:"elem",elem:Ft,shift:Te?.08:0}]},c),C.name="\\"+gt,We.classes.unshift("mop"),We.italic=St}}else if(C.body){var Vt=hn(C.body,c,!0);Vt.length===1&&Vt[0]instanceof ee?(We=Vt[0],We.classes[0]="mop"):We=ke.makeSpan(["mop"],ke.tryCombineChars(Vt),c)}else{for(var sr=[],Ar=1;Ar<C.name.length;Ar++)sr.push(ke.mathsym(C.name[Ar],C.mode,c));We=ke.makeSpan(["mop"],sr,c)}var Rr=0,Tr=0;return(We instanceof ee||C.name==="\\oiint"||C.name==="\\oiiint")&&!C.suppressBaseShift&&(Rr=(We.height-We.depth)/2-c.fontMetrics().axisHeight,Tr=We.italic),T?vs(We,h,p,c,he,Tr,Rr):(Rr&&(We.style.position="relative",We.style.top=Rr+"em"),We)},is=function(l,c){var h;if(l.symbol)h=new Pn("mo",[Mn(l.name,l.mode)]),O.contains(da,l.name)&&h.setAttribute("largeop","false");else if(l.body)h=new Pn("mo",Cn(l.body,c));else{h=new Pn("mi",[new mi(l.name.slice(1))]);var p=new Pn("mo",[Mn("\u2061","text")]);l.parentIsSupSub?h=new Pn("mo",[h,p]):h=Ii([h,p])}return h},ja={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};er({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(l,c){var h=l.parser,p=l.funcName,T=p;return T.length===1&&(T=ja[T]),{type:"op",mode:h.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:T}},htmlBuilder:bi,mathmlBuilder:is}),er({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(l,c){var h=l.parser,p=c[0];return{type:"op",mode:h.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:mn(p)}},htmlBuilder:bi,mathmlBuilder:is});var pa={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};er({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(l){var c=l.parser,h=l.funcName;return{type:"op",mode:c.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:h}},htmlBuilder:bi,mathmlBuilder:is}),er({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(l){var c=l.parser,h=l.funcName;return{type:"op",mode:c.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:h}},htmlBuilder:bi,mathmlBuilder:is}),er({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(l){var c=l.parser,h=l.funcName,p=h;return p.length===1&&(p=pa[p]),{type:"op",mode:c.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:p}},htmlBuilder:bi,mathmlBuilder:is});var Gs=function(l,c){var h,p,T=!1,C,ne=ar(l,"supsub");ne?(h=ne.sup,p=ne.sub,C=Ht(ne.base,"operatorname"),T=!0):C=Ht(l,"operatorname");var he;if(C.body.length>0){for(var Te=C.body.map(function(St){var Ft=St.text;return typeof Ft=="string"?{type:"textord",mode:St.mode,text:Ft}:St}),We=hn(Te,c.withFont("mathrm"),!0),rt=0;rt<We.length;rt++){var gt=We[rt];gt instanceof ee&&(gt.text=gt.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}he=ke.makeSpan(["mop"],We,c)}else he=ke.makeSpan(["mop"],[],c);return T?vs(he,h,p,c,c.style,0,0):he},Wa=function(l,c){for(var h=Cn(l.body,c.withFont("mathrm")),p=!0,T=0;T<h.length;T++){var C=h[T];if(!(C instanceof Pt.SpaceNode))if(C instanceof Pt.MathNode)switch(C.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var ne=C.children[0];C.children.length===1&&ne instanceof Pt.TextNode?ne.text=ne.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):p=!1;break}default:p=!1}else p=!1}if(p){var he=h.map(function(rt){return rt.toText()}).join("");h=[new Pt.TextNode(he)]}var Te=new Pt.MathNode("mi",h);Te.setAttribute("mathvariant","normal");var We=new Pt.MathNode("mo",[Mn("\u2061","text")]);return l.parentIsSupSub?new Pt.MathNode("mo",[Te,We]):Pt.newDocumentFragment([Te,We])};er({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(l,c){var h=l.parser,p=l.funcName,T=c[0];return{type:"operatorname",mode:h.mode,body:mn(T),alwaysHandleSupSub:p==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:Gs,mathmlBuilder:Wa}),Gn({type:"ordgroup",htmlBuilder:function(l,c){return l.semisimple?ke.makeFragment(hn(l.body,c,!1)):ke.makeSpan(["mord"],hn(l.body,c,!0),c)},mathmlBuilder:function(l,c){return gn(l.body,c,!0)}}),er({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(l,c){var h=l.parser,p=c[0];return{type:"overline",mode:h.mode,body:p}},htmlBuilder:function(l,c){var h=Br(l.body,c.havingCrampedStyle()),p=ke.makeLineSpan("overline-line",c),T=c.fontMetrics().defaultRuleThickness,C=ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:3*T},{type:"elem",elem:p},{type:"kern",size:T}]},c);return ke.makeSpan(["mord","overline"],[C],c)},mathmlBuilder:function(l,c){var h=new Pt.MathNode("mo",[new Pt.TextNode("\u203E")]);h.setAttribute("stretchy","true");var p=new Pt.MathNode("mover",[Hr(l.body,c),h]);return p.setAttribute("accent","true"),p}}),er({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(l,c){var h=l.parser,p=c[0];return{type:"phantom",mode:h.mode,body:mn(p)}},htmlBuilder:function(l,c){var h=hn(l.body,c.withPhantom(),!1);return ke.makeFragment(h)},mathmlBuilder:function(l,c){var h=Cn(l.body,c);return new Pt.MathNode("mphantom",h)}}),er({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(l,c){var h=l.parser,p=c[0];return{type:"hphantom",mode:h.mode,body:p}},htmlBuilder:function(l,c){var h=ke.makeSpan([],[Br(l.body,c.withPhantom())]);if(h.height=0,h.depth=0,h.children)for(var p=0;p<h.children.length;p++)h.children[p].height=0,h.children[p].depth=0;return h=ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h}]},c),ke.makeSpan(["mord"],[h],c)},mathmlBuilder:function(l,c){var h=Cn(mn(l.body),c),p=new Pt.MathNode("mphantom",h),T=new Pt.MathNode("mpadded",[p]);return T.setAttribute("height","0px"),T.setAttribute("depth","0px"),T}}),er({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(l,c){var h=l.parser,p=c[0];return{type:"vphantom",mode:h.mode,body:p}},htmlBuilder:function(l,c){var h=ke.makeSpan(["inner"],[Br(l.body,c.withPhantom())]),p=ke.makeSpan(["fix"],[]);return ke.makeSpan(["mord","rlap"],[h,p],c)},mathmlBuilder:function(l,c){var h=Cn(mn(l.body),c),p=new Pt.MathNode("mphantom",h),T=new Pt.MathNode("mpadded",[p]);return T.setAttribute("width","0px"),T}}),er({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(l,c){var h=l.parser,p=Ht(c[0],"size").value,T=c[1];return{type:"raisebox",mode:h.mode,dy:p,body:T}},htmlBuilder:function(l,c){var h=Br(l.body,c),p=gr(l.dy,c);return ke.makeVList({positionType:"shift",positionData:-p,children:[{type:"elem",elem:h}]},c)},mathmlBuilder:function(l,c){var h=new Pt.MathNode("mpadded",[Hr(l.body,c)]),p=l.dy.number+l.dy.unit;return h.setAttribute("voffset",p),h}}),er({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(l,c,h){var p=l.parser,T=h[0],C=Ht(c[0],"size"),ne=Ht(c[1],"size");return{type:"rule",mode:p.mode,shift:T&&Ht(T,"size").value,width:C.value,height:ne.value}},htmlBuilder:function(l,c){var h=ke.makeSpan(["mord","rule"],[],c),p=gr(l.width,c),T=gr(l.height,c),C=l.shift?gr(l.shift,c):0;return h.style.borderRightWidth=p+"em",h.style.borderTopWidth=T+"em",h.style.bottom=C+"em",h.width=p,h.height=T+C,h.depth=-C,h.maxFontSize=T*1.125*c.sizeMultiplier,h},mathmlBuilder:function(l,c){var h=gr(l.width,c),p=gr(l.height,c),T=l.shift?gr(l.shift,c):0,C=c.color&&c.getColor()||"black",ne=new Pt.MathNode("mspace");ne.setAttribute("mathbackground",C),ne.setAttribute("width",h+"em"),ne.setAttribute("height",p+"em");var he=new Pt.MathNode("mpadded",[ne]);return T>=0?he.setAttribute("height","+"+T+"em"):(he.setAttribute("height",T+"em"),he.setAttribute("depth","+"+-T+"em")),he.setAttribute("voffset",T+"em"),he}});function Hs(k,l,c){for(var h=hn(k,l,!1),p=l.sizeMultiplier/c.sizeMultiplier,T=0;T<h.length;T++){var C=h[T].classes.indexOf("sizing");C<0?Array.prototype.push.apply(h[T].classes,l.sizingClasses(c)):h[T].classes[C+1]==="reset-size"+l.size&&(h[T].classes[C+1]="reset-size"+c.size),h[T].height*=p,h[T].depth*=p}return ke.makeFragment(h)}var ss=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Ka=function(l,c){var h=c.havingSize(l.size);return Hs(l.body,h,c)};er({type:"sizing",names:ss,props:{numArgs:0,allowedInText:!0},handler:function(l,c){var h=l.breakOnTokenText,p=l.funcName,T=l.parser,C=T.parseExpression(!1,h);return{type:"sizing",mode:T.mode,size:ss.indexOf(p)+1,body:C}},htmlBuilder:Ka,mathmlBuilder:function(l,c){var h=c.havingSize(l.size),p=Cn(l.body,h),T=new Pt.MathNode("mstyle",p);return T.setAttribute("mathsize",h.sizeMultiplier+"em"),T}}),er({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(l,c,h){var p=l.parser,T=!1,C=!1,ne=h[0]&&Ht(h[0],"ordgroup");if(ne)for(var he="",Te=0;Te<ne.body.length;++Te){var We=ne.body[Te];if(he=We.text,he==="t")T=!0;else if(he==="b")C=!0;else{T=!1,C=!1;break}}else T=!0,C=!0;var rt=c[0];return{type:"smash",mode:p.mode,body:rt,smashHeight:T,smashDepth:C}},htmlBuilder:function(l,c){var h=ke.makeSpan([],[Br(l.body,c)]);if(!l.smashHeight&&!l.smashDepth)return h;if(l.smashHeight&&(h.height=0,h.children))for(var p=0;p<h.children.length;p++)h.children[p].height=0;if(l.smashDepth&&(h.depth=0,h.children))for(var T=0;T<h.children.length;T++)h.children[T].depth=0;var C=ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h}]},c);return ke.makeSpan(["mord"],[C],c)},mathmlBuilder:function(l,c){var h=new Pt.MathNode("mpadded",[Hr(l.body,c)]);return l.smashHeight&&h.setAttribute("height","0px"),l.smashDepth&&h.setAttribute("depth","0px"),h}}),er({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(l,c,h){var p=l.parser,T=h[0],C=c[0];return{type:"sqrt",mode:p.mode,body:C,index:T}},htmlBuilder:function(l,c){var h=Br(l.body,c.havingCrampedStyle());h.height===0&&(h.height=c.fontMetrics().xHeight),h=ke.wrapFragment(h,c);var p=c.fontMetrics(),T=p.defaultRuleThickness,C=T;c.style.id<b.TEXT.id&&(C=c.fontMetrics().xHeight);var ne=T+C/4,he=h.height+h.depth+ne+T,Te=ii.sqrtImage(he,c),We=Te.span,rt=Te.ruleWidth,gt=Te.advanceWidth,St=We.height-rt;St>h.height+h.depth+ne&&(ne=(ne+St-h.height-h.depth)/2);var Ft=We.height-h.height-ne-rt;h.style.paddingLeft=gt+"em";var Vt=ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:-(h.height+Ft)},{type:"elem",elem:We},{type:"kern",size:rt}]},c);if(l.index){var sr=c.havingStyle(b.SCRIPTSCRIPT),Ar=Br(l.index,sr,c),Rr=.6*(Vt.height-Vt.depth),Tr=ke.makeVList({positionType:"shift",positionData:-Rr,children:[{type:"elem",elem:Ar}]},c),Xr=ke.makeSpan(["root"],[Tr]);return ke.makeSpan(["mord","sqrt"],[Xr,Vt],c)}else return ke.makeSpan(["mord","sqrt"],[Vt],c)},mathmlBuilder:function(l,c){var h=l.body,p=l.index;return p?new Pt.MathNode("mroot",[Hr(h,c),Hr(p,c)]):new Pt.MathNode("msqrt",[Hr(h,c)])}});var ma={display:b.DISPLAY,text:b.TEXT,script:b.SCRIPT,scriptscript:b.SCRIPTSCRIPT};er({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(l,c){var h=l.breakOnTokenText,p=l.funcName,T=l.parser,C=T.parseExpression(!0,h),ne=p.slice(1,p.length-5);return{type:"styling",mode:T.mode,style:ne,body:C}},htmlBuilder:function(l,c){var h=ma[l.style],p=c.havingStyle(h).withFont("");return Hs(l.body,p,c)},mathmlBuilder:function(l,c){var h=ma[l.style],p=c.havingStyle(h),T=Cn(l.body,p),C=new Pt.MathNode("mstyle",T),ne={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},he=ne[l.style];return C.setAttribute("scriptlevel",he[0]),C.setAttribute("displaystyle",he[1]),C}});var Va=function(l,c){var h=l.base;if(h)if(h.type==="op"){var p=h.limits&&(c.style.size===b.DISPLAY.size||h.alwaysHandleSupSub);return p?bi:null}else if(h.type==="operatorname"){var T=h.alwaysHandleSupSub&&(c.style.size===b.DISPLAY.size||h.limits);return T?Gs:null}else{if(h.type==="accent")return O.isCharacterBox(h.base)?$r:null;if(h.type==="horizBrace"){var C=!l.sub;return C===h.isOver?fa:null}else return null}else return null};Gn({type:"supsub",htmlBuilder:function(l,c){var h=Va(l,c);if(h)return h(l,c);var p=l.base,T=l.sup,C=l.sub,ne=Br(p,c),he,Te,We=c.fontMetrics(),rt=0,gt=0,St=p&&O.isCharacterBox(p);if(T){var Ft=c.havingStyle(c.style.sup());he=Br(T,Ft,c),St||(rt=ne.height-Ft.fontMetrics().supDrop*Ft.sizeMultiplier/c.sizeMultiplier)}if(C){var Vt=c.havingStyle(c.style.sub());Te=Br(C,Vt,c),St||(gt=ne.depth+Vt.fontMetrics().subDrop*Vt.sizeMultiplier/c.sizeMultiplier)}var sr;c.style===b.DISPLAY?sr=We.sup1:c.style.cramped?sr=We.sup3:sr=We.sup2;var Ar=c.sizeMultiplier,Rr=.5/We.ptPerEm/Ar+"em",Tr=null;if(Te){var Xr=l.base&&l.base.type==="op"&&l.base.name&&(l.base.name==="\\oiint"||l.base.name==="\\oiiint");(ne instanceof ee||Xr)&&(Tr=-ne.italic+"em")}var Qr;if(he&&Te){rt=Math.max(rt,sr,he.depth+.25*We.xHeight),gt=Math.max(gt,We.sub2);var un=We.defaultRuleThickness,cn=4*un;if(rt-he.depth-(Te.height-gt)<cn){gt=cn-(rt-he.depth)+Te.height;var dn=.8*We.xHeight-(rt-he.depth);dn>0&&(rt+=dn,gt-=dn)}var Bn=[{type:"elem",elem:Te,shift:gt,marginRight:Rr,marginLeft:Tr},{type:"elem",elem:he,shift:-rt,marginRight:Rr}];Qr=ke.makeVList({positionType:"individualShift",children:Bn},c)}else if(Te){gt=Math.max(gt,We.sub1,Te.height-.8*We.xHeight);var Rn=[{type:"elem",elem:Te,marginLeft:Tr,marginRight:Rr}];Qr=ke.makeVList({positionType:"shift",positionData:gt,children:Rn},c)}else if(he)rt=Math.max(rt,sr,he.depth+.25*We.xHeight),Qr=ke.makeVList({positionType:"shift",positionData:-rt,children:[{type:"elem",elem:he,marginRight:Rr}]},c);else throw new Error("supsub must have either sup or sub.");var Vr=On(ne,"right")||"mord";return ke.makeSpan([Vr],[ne,ke.makeSpan(["msupsub"],[Qr])],c)},mathmlBuilder:function(l,c){var h=!1,p,T,C=ar(l.base,"horizBrace");C&&(T=!!l.sup,T===C.isOver&&(h=!0,p=C.isOver)),l.base&&(l.base.type==="op"||l.base.type==="operatorname")&&(l.base.parentIsSupSub=!0);var ne=[Hr(l.base,c)];l.sub&&ne.push(Hr(l.sub,c)),l.sup&&ne.push(Hr(l.sup,c));var he;if(h)he=p?"mover":"munder";else if(l.sub)if(l.sup){var rt=l.base;rt&&rt.type==="op"&&rt.limits&&c.style===b.DISPLAY||rt&&rt.type==="operatorname"&&rt.alwaysHandleSupSub&&(c.style===b.DISPLAY||rt.limits)?he="munderover":he="msubsup"}else{var We=l.base;We&&We.type==="op"&&We.limits&&(c.style===b.DISPLAY||We.alwaysHandleSupSub)||We&&We.type==="operatorname"&&We.alwaysHandleSupSub&&(We.limits||c.style===b.DISPLAY)?he="munder":he="msub"}else{var Te=l.base;Te&&Te.type==="op"&&Te.limits&&(c.style===b.DISPLAY||Te.alwaysHandleSupSub)||Te&&Te.type==="operatorname"&&Te.alwaysHandleSupSub&&(Te.limits||c.style===b.DISPLAY)?he="mover":he="msup"}var gt=new Pt.MathNode(he,ne);return gt}}),Gn({type:"atom",htmlBuilder:function(l,c){return ke.mathsym(l.text,l.mode,c,["m"+l.family])},mathmlBuilder:function(l,c){var h=new Pt.MathNode("mo",[Mn(l.text,l.mode)]);if(l.family==="bin"){var p=gi(l,c);p==="bold-italic"&&h.setAttribute("mathvariant",p)}else l.family==="punct"?h.setAttribute("separator","true"):(l.family==="open"||l.family==="close")&&h.setAttribute("stretchy","false");return h}});var ga={mi:"italic",mn:"normal",mtext:"normal"};Gn({type:"mathord",htmlBuilder:function(l,c){return ke.makeOrd(l,c,"mathord")},mathmlBuilder:function(l,c){var h=new Pt.MathNode("mi",[Mn(l.text,l.mode,c)]),p=gi(l,c)||"italic";return p!==ga[h.type]&&h.setAttribute("mathvariant",p),h}}),Gn({type:"textord",htmlBuilder:function(l,c){return ke.makeOrd(l,c,"textord")},mathmlBuilder:function(l,c){var h=Mn(l.text,l.mode,c),p=gi(l,c)||"normal",T;return l.mode==="text"?T=new Pt.MathNode("mtext",[h]):/[0-9]/.test(l.text)?T=new Pt.MathNode("mn",[h]):l.text==="\\prime"?T=new Pt.MathNode("mo",[h]):T=new Pt.MathNode("mi",[h]),p!==ga[T.type]&&T.setAttribute("mathvariant",p),T}});var _s={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ys={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Gn({type:"spacing",htmlBuilder:function(l,c){if(ys.hasOwnProperty(l.text)){var h=ys[l.text].className||"";if(l.mode==="text"){var p=ke.makeOrd(l,c,"textord");return p.classes.push(h),p}else return ke.makeSpan(["mspace",h],[ke.mathsym(l.text,l.mode,c)],c)}else{if(_s.hasOwnProperty(l.text))return ke.makeSpan(["mspace",_s[l.text]],[],c);throw new re('Unknown type of space "'+l.text+'"')}},mathmlBuilder:function(l,c){var h;if(ys.hasOwnProperty(l.text))h=new Pt.MathNode("mtext",[new Pt.TextNode("\xA0")]);else{if(_s.hasOwnProperty(l.text))return new Pt.MathNode("mspace");throw new re('Unknown type of space "'+l.text+'"')}return h}});var bs=function(){var l=new Pt.MathNode("mtd",[]);return l.setAttribute("width","50%"),l};Gn({type:"tag",mathmlBuilder:function(l,c){var h=new Pt.MathNode("mtable",[new Pt.MathNode("mtr",[bs(),new Pt.MathNode("mtd",[gn(l.body,c)]),bs(),new Pt.MathNode("mtd",[gn(l.tag,c)])])]);return h.setAttribute("width","100%"),h}});var js={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},va={"\\textbf":"textbf","\\textmd":"textmd"},_a={"\\textit":"textit","\\textup":"textup"},ya=function(l,c){var h=l.font;return h?js[h]?c.withTextFontFamily(js[h]):va[h]?c.withTextFontWeight(va[h]):c.withTextFontShape(_a[h]):c};er({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(l,c){var h=l.parser,p=l.funcName,T=c[0];return{type:"text",mode:h.mode,body:mn(T),font:p}},htmlBuilder:function(l,c){var h=ya(l,c),p=hn(l.body,h,!0);return ke.makeSpan(["mord","text"],ke.tryCombineChars(p),h)},mathmlBuilder:function(l,c){var h=ya(l,c);return gn(l.body,h)}}),er({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(l,c){var h=l.parser;return{type:"underline",mode:h.mode,body:c[0]}},htmlBuilder:function(l,c){var h=Br(l.body,c),p=ke.makeLineSpan("underline-line",c),T=c.fontMetrics().defaultRuleThickness,C=ke.makeVList({positionType:"top",positionData:h.height,children:[{type:"kern",size:T},{type:"elem",elem:p},{type:"kern",size:3*T},{type:"elem",elem:h}]},c);return ke.makeSpan(["mord","underline"],[C],c)},mathmlBuilder:function(l,c){var h=new Pt.MathNode("mo",[new Pt.TextNode("\u203E")]);h.setAttribute("stretchy","true");var p=new Pt.MathNode("munder",[Hr(l.body,c),h]);return p.setAttribute("accentunder","true"),p}}),er({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(l,c,h){throw new re("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(l,c){for(var h=ba(l),p=[],T=c.havingStyle(c.style.text()),C=0;C<h.length;C++){var ne=h[C];ne==="~"&&(ne="\\textasciitilde"),p.push(ke.makeSymbol(ne,"Typewriter-Regular",l.mode,T,["mord","texttt"]))}return ke.makeSpan(["mord","text"].concat(T.sizingClasses(c)),ke.tryCombineChars(p),T)},mathmlBuilder:function(l,c){var h=new Pt.TextNode(ba(l)),p=new Pt.MathNode("mtext",[h]);return p.setAttribute("mathvariant","monospace"),p}});var ba=function(l){return l.body.replace(/ /g,l.star?"\u2423":"\xA0")},Za=zi,Zi=Za,Ws=`[ \r
|
|
|
]`,Ks="\\\\[a-zA-Z@]+",Ya="\\\\[^\uD800-\uDFFF]",xa=""+Ks+Ws+"*",qa=new RegExp("^("+Ks+")"+Ws+"*$"),Vs="[\u0300-\u036F]",Sn=new RegExp(Vs+"+$"),Ci="("+Ws+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(Vs+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Vs+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+xa)+("|"+Ya+")"),xs=function(){function k(c,h){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=c,this.settings=h,this.tokenRegex=new RegExp(Ci,"g"),this.catcodes={"%":14}}var l=k.prototype;return l.setCatcode=function(h,p){this.catcodes[h]=p},l.lex=function(){var h=this.input,p=this.tokenRegex.lastIndex;if(p===h.length)return new Ie("EOF",new me(this,p,p));var T=this.tokenRegex.exec(h);if(T===null||T.index!==p)throw new re("Unexpected character: '"+h[p]+"'",new Ie(h[p],new me(this,p,p+1)));var C=T[2]||" ";if(this.catcodes[C]===14){var ne=h.indexOf(`
|
|
|
`,this.tokenRegex.lastIndex);return ne===-1?(this.tokenRegex.lastIndex=h.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=ne+1,this.lex()}var he=C.match(qa);return he&&(C=he[1]),new Ie(C,new me(this,p,this.tokenRegex.lastIndex))},k}(),Xa=function(){function k(c,h){c===void 0&&(c={}),h===void 0&&(h={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=h,this.builtins=c,this.undefStack=[]}var l=k.prototype;return l.beginGroup=function(){this.undefStack.push({})},l.endGroup=function(){if(this.undefStack.length===0)throw new re("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var h=this.undefStack.pop();for(var p in h)h.hasOwnProperty(p)&&(h[p]===void 0?delete this.current[p]:this.current[p]=h[p])},l.has=function(h){return this.current.hasOwnProperty(h)||this.builtins.hasOwnProperty(h)},l.get=function(h){return this.current.hasOwnProperty(h)?this.current[h]:this.builtins[h]},l.set=function(h,p,T){if(T===void 0&&(T=!1),T){for(var C=0;C<this.undefStack.length;C++)delete this.undefStack[C][h];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][h]=p)}else{var ne=this.undefStack[this.undefStack.length-1];ne&&!ne.hasOwnProperty(h)&&(ne[h]=this.current[h])}this.current[h]=p},k}(),Ea={},Es=Ea;function xe(k,l){Ea[k]=l}xe("\\@firstoftwo",function(k){var l=k.consumeArgs(2);return{tokens:l[0],numArgs:0}}),xe("\\@secondoftwo",function(k){var l=k.consumeArgs(2);return{tokens:l[1],numArgs:0}}),xe("\\@ifnextchar",function(k){var l=k.consumeArgs(3),c=k.future();return l[0].length===1&&l[0][0].text===c.text?{tokens:l[1],numArgs:0}:{tokens:l[2],numArgs:0}}),xe("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),xe("\\TextOrMath",function(k){var l=k.consumeArgs(2);return k.mode==="text"?{tokens:l[0],numArgs:0}:{tokens:l[1],numArgs:0}});var Ni={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(k){var l=k.popToken(),c,h="";if(l.text==="'")c=8,l=k.popToken();else if(l.text==='"')c=16,l=k.popToken();else if(l.text==="`")if(l=k.popToken(),l.text[0]==="\\")h=l.text.charCodeAt(1);else{if(l.text==="EOF")throw new re("\\char` missing argument");h=l.text.charCodeAt(0)}else c=10;if(c){if(h=Ni[l.text],h==null||h>=c)throw new re("Invalid base-"+c+" digit "+l.text);for(var p;(p=Ni[k.future().text])!=null&&p<c;)h*=c,h+=p,k.popToken()}return"\\@char{"+h+"}"});var Zs=function(l,c){var h=l.consumeArgs(1)[0];if(h.length!==1)throw new re("\\gdef's first argument must be a macro name");var p=h[0].text,T=0;for(h=l.consumeArgs(1)[0];h.length===1&&h[0].text==="#";){if(h=l.consumeArgs(1)[0],h.length!==1)throw new re('Invalid argument number length "'+h.length+'"');if(!/^[1-9]$/.test(h[0].text))throw new re('Invalid argument number "'+h[0].text+'"');if(T++,parseInt(h[0].text)!==T)throw new re('Argument number "'+h[0].text+'" out of order');h=l.consumeArgs(1)[0]}return l.macros.set(p,{tokens:h,numArgs:T},c),""};xe("\\gdef",function(k){return Zs(k,!0)}),xe("\\def",function(k){return Zs(k,!1)}),xe("\\global",function(k){var l=k.consumeArgs(1)[0];if(l.length!==1)throw new re("Invalid command after \\global");var c=l[0].text;if(c==="\\def")return Zs(k,!0);throw new re("Invalid command '"+c+"' after \\global")});var ws=function(l,c,h){var p=l.consumeArgs(1)[0];if(p.length!==1)throw new re("\\newcommand's first argument must be a macro name");var T=p[0].text,C=l.isDefined(T);if(C&&!c)throw new re("\\newcommand{"+T+"} attempting to redefine "+(T+"; use \\renewcommand"));if(!C&&!h)throw new re("\\renewcommand{"+T+"} when command "+T+" does not yet exist; use \\newcommand");var ne=0;if(p=l.consumeArgs(1)[0],p.length===1&&p[0].text==="["){for(var he="",Te=l.expandNextToken();Te.text!=="]"&&Te.text!=="EOF";)he+=Te.text,Te=l.expandNextToken();if(!he.match(/^\s*[0-9]+\s*$/))throw new re("Invalid number of arguments: "+he);ne=parseInt(he),p=l.consumeArgs(1)[0]}return l.macros.set(T,{tokens:p,numArgs:ne}),""};xe("\\newcommand",function(k){return ws(k,!1,!0)}),xe("\\renewcommand",function(k){return ws(k,!0,!1)}),xe("\\providecommand",function(k){return ws(k,!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 xi={",":"\\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(k){var l="\\dotso",c=k.expandAfterFuture().text;return c in xi?l=xi[c]:(c.substr(0,4)==="\\not"||c in _t.math&&O.contains(["bin","rel"],_t.math[c].group))&&(l="\\dotsb"),l});var lt={")":!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(k){var l=k.future().text;return l in lt?"\\ldots\\,":"\\ldots"}),xe("\\dotsc",function(k){var l=k.future().text;return l in lt&&l!==","?"\\ldots\\,":"\\ldots"}),xe("\\cdots",function(k){var l=k.future().text;return l in lt?"\\@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(k){if(k.macros.get("\\df@tag"))throw new re("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=nt["Main-Regular"][84][1]-.7*nt["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 Ss={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Qa=function(){function k(c,h,p){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=h,this.expansionCount=0,this.feed(c),this.macros=new Xa(Es,h.macros),this.mode=p,this.stack=[]}var l=k.prototype;return l.feed=function(h){this.lexer=new xs(h,this.settings)},l.switchMode=function(h){this.mode=h},l.beginGroup=function(){this.macros.beginGroup()},l.endGroup=function(){this.macros.endGroup()},l.future=function(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},l.popToken=function(){return this.future(),this.stack.pop()},l.pushToken=function(h){this.stack.push(h)},l.pushTokens=function(h){var p;(p=this.stack).push.apply(p,h)},l.consumeSpaces=function(){for(;;){var h=this.future();if(h.text===" ")this.stack.pop();else break}},l.consumeArgs=function(h){for(var p=[],T=0;T<h;++T){this.consumeSpaces();var C=this.popToken();if(C.text==="{"){for(var ne=[],he=1;he!==0;){var Te=this.popToken();if(ne.push(Te),Te.text==="{")++he;else if(Te.text==="}")--he;else if(Te.text==="EOF")throw new re("End of input in macro argument",C)}ne.pop(),ne.reverse(),p[T]=ne}else{if(C.text==="EOF")throw new re("End of input expecting macro argument");p[T]=[C]}}return p},l.expandOnce=function(){var h=this.popToken(),p=h.text,T=this._getExpansion(p);if(T==null)return this.pushToken(h),h;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new re("Too many expansions: infinite loop or need to increase maxExpand setting");var C=T.tokens;if(T.numArgs){var ne=this.consumeArgs(T.numArgs);C=C.slice();for(var he=C.length-1;he>=0;--he){var Te=C[he];if(Te.text==="#"){if(he===0)throw new re("Incomplete placeholder at end of macro body",Te);if(Te=C[--he],Te.text==="#")C.splice(he+1,1);else if(/^[1-9]$/.test(Te.text)){var We;(We=C).splice.apply(We,[he,2].concat(ne[+Te.text-1]))}else throw new re("Not a valid argument number",Te)}}}return this.pushTokens(C),C},l.expandAfterFuture=function(){return this.expandOnce(),this.future()},l.expandNextToken=function(){for(;;){var h=this.expandOnce();if(h instanceof Ie)if(h.text==="\\relax")this.stack.pop();else return this.stack.pop()}throw new Error},l.expandMacro=function(h){if(this.macros.get(h)){var p=[],T=this.stack.length;for(this.pushToken(new Ie(h));this.stack.length>T;){var C=this.expandOnce();C instanceof Ie&&p.push(this.stack.pop())}return p}},l.expandMacroAsText=function(h){var p=this.expandMacro(h);return p&&p.map(function(T){return T.text}).join("")},l._getExpansion=function(h){var p=this.macros.get(h);if(p==null)return p;var T=typeof p=="function"?p(this):p;if(typeof T=="string"){var C=0;if(T.indexOf("#")!==-1)for(var ne=T.replace(/##/g,"");ne.indexOf("#"+(C+1))!==-1;)++C;for(var he=new xs(T,this.settings),Te=[],We=he.lex();We.text!=="EOF";)Te.push(We),We=he.lex();Te.reverse();var rt={tokens:Te,numArgs:C};return rt}return T},l.isDefined=function(h){return this.macros.has(h)||Zi.hasOwnProperty(h)||_t.math.hasOwnProperty(h)||_t.text.hasOwnProperty(h)||Ss.hasOwnProperty(h)},k}(),Yi={"\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"},As=function(){function k(c,h){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 Qa(c,h,this.mode),this.settings=h,this.leftrightDepth=0}var l=k.prototype;return l.expect=function(h,p){if(p===void 0&&(p=!0),this.fetch().text!==h)throw new re("Expected '"+h+"', got '"+this.fetch().text+"'",this.fetch());p&&this.consume()},l.consume=function(){this.nextToken=null},l.fetch=function(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},l.switchMode=function(h){this.mode=h,this.gullet.switchMode(h)},l.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var h=this.parseExpression(!1);return this.expect("EOF"),this.gullet.endGroup(),h},l.parseExpression=function(h,p){for(var T=[];;){this.mode==="math"&&this.consumeSpaces();var C=this.fetch();if(k.endOfExpression.indexOf(C.text)!==-1||p&&C.text===p||h&&Zi[C.text]&&Zi[C.text].infix)break;var ne=this.parseAtom(p);if(!ne)break;T.push(ne)}return this.mode==="text"&&this.formLigatures(T),this.handleInfixNodes(T)},l.handleInfixNodes=function(h){for(var p=-1,T,C=0;C<h.length;C++){var ne=ar(h[C],"infix");if(ne){if(p!==-1)throw new re("only one infix operator per group",ne.token);p=C,T=ne.replaceWith}}if(p!==-1&&T){var he,Te,We=h.slice(0,p),rt=h.slice(p+1);We.length===1&&We[0].type==="ordgroup"?he=We[0]:he={type:"ordgroup",mode:this.mode,body:We},rt.length===1&&rt[0].type==="ordgroup"?Te=rt[0]:Te={type:"ordgroup",mode:this.mode,body:rt};var gt;return T==="\\\\abovefrac"?gt=this.callFunction(T,[he,h[p],Te],[]):gt=this.callFunction(T,[he,Te],[]),[gt]}else return h},l.handleSupSubscript=function(h){var p=this.fetch(),T=p.text;this.consume();var C=this.parseGroup(h,!1,k.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!C)throw new re("Expected group after '"+T+"'",p);return C},l.formatUnsupportedCmd=function(h){for(var p=[],T=0;T<h.length;T++)p.push({type:"textord",mode:"text",text:h[T]});var C={type:"text",mode:this.mode,body:p},ne={type:"color",mode:this.mode,color:this.settings.errorColor,body:[C]};return ne},l.parseAtom=function(h){var p=this.parseGroup("atom",!1,null,h);if(this.mode==="text")return p;for(var T,C;;){this.consumeSpaces();var ne=this.fetch();if(ne.text==="\\limits"||ne.text==="\\nolimits"){var he=ar(p,"op");if(he){var Te=ne.text==="\\limits";he.limits=Te,he.alwaysHandleSupSub=!0}else if(he=ar(p,"operatorname"),he&&he.alwaysHandleSupSub){var We=ne.text==="\\limits";he.limits=We}else throw new re("Limit controls must follow a math operator",ne);this.consume()}else if(ne.text==="^"){if(T)throw new re("Double superscript",ne);T=this.handleSupSubscript("superscript")}else if(ne.text==="_"){if(C)throw new re("Double subscript",ne);C=this.handleSupSubscript("subscript")}else if(ne.text==="'"){if(T)throw new re("Double superscript",ne);var rt={type:"textord",mode:this.mode,text:"\\prime"},gt=[rt];for(this.consume();this.fetch().text==="'";)gt.push(rt),this.consume();this.fetch().text==="^"&>.push(this.handleSupSubscript("superscript")),T={type:"ordgroup",mode:this.mode,body:gt}}else break}return T||C?{type:"supsub",mode:this.mode,base:p,sup:T,sub:C}:p},l.parseFunction=function(h,p,T){var C=this.fetch(),ne=C.text,he=Zi[ne];if(!he)return null;if(this.consume(),T!=null&&he.greediness<=T)throw new re("Got function '"+ne+"' with no arguments"+(p?" as "+p:""),C);if(this.mode==="text"&&!he.allowedInText)throw new re("Can't use function '"+ne+"' in text mode",C);if(this.mode==="math"&&he.allowedInMath===!1)throw new re("Can't use function '"+ne+"' in math mode",C);var Te=this.parseArguments(ne,he),We=Te.args,rt=Te.optArgs;return this.callFunction(ne,We,rt,C,h)},l.callFunction=function(h,p,T,C,ne){var he={funcName:h,parser:this,token:C,breakOnTokenText:ne},Te=Zi[h];if(Te&&Te.handler)return Te.handler(he,p,T);throw new re("No function handler for "+h)},l.parseArguments=function(h,p){var T=p.numArgs+p.numOptionalArgs;if(T===0)return{args:[],optArgs:[]};for(var C=p.greediness,ne=[],he=[],Te=0;Te<T;Te++){var We=p.argTypes&&p.argTypes[Te],rt=Te<p.numOptionalArgs,gt=Te>0&&!rt||Te===0&&!rt&&this.mode==="math",St=this.parseGroupOfType("argument to '"+h+"'",We,rt,C,gt);if(!St){if(rt){he.push(null);continue}throw new re("Expected group after '"+h+"'",this.fetch())}(rt?he:ne).push(St)}return{args:ne,optArgs:he}},l.parseGroupOfType=function(h,p,T,C,ne){switch(p){case"color":return ne&&this.consumeSpaces(),this.parseColorGroup(T);case"size":return ne&&this.consumeSpaces(),this.parseSizeGroup(T);case"url":return this.parseUrlGroup(T,ne);case"math":case"text":return this.parseGroup(h,T,C,void 0,p,ne);case"hbox":{var he=this.parseGroup(h,T,C,void 0,"text",ne);if(!he)return he;var Te={type:"styling",mode:he.mode,body:[he],style:"text"};return Te}case"raw":{if(ne&&this.consumeSpaces(),T&&this.fetch().text==="{")return null;var We=this.parseStringGroup("raw",T,!0);if(We)return{type:"raw",mode:"text",string:We.text};throw new re("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(h,T,C,void 0,void 0,ne);default:throw new re("Unknown group type as "+h,this.fetch())}},l.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},l.parseStringGroup=function(h,p,T){var C=p?"[":"{",ne=p?"]":"}",he=this.fetch();if(he.text!==C){if(p)return null;if(T&&he.text!=="EOF"&&/[^{}[\]]/.test(he.text))return this.consume(),he}var Te=this.mode;this.mode="text",this.expect(C);for(var We="",rt=this.fetch(),gt=0,St=rt,Ft;(Ft=this.fetch()).text!==ne||T&>>0;){switch(Ft.text){case"EOF":throw new re("Unexpected end of input in "+h,rt.range(St,We));case C:gt++;break;case ne:gt--;break}St=Ft,We+=St.text,this.consume()}return this.expect(ne),this.mode=Te,rt.range(St,We)},l.parseRegexGroup=function(h,p){var T=this.mode;this.mode="text";for(var C=this.fetch(),ne=C,he="",Te;(Te=this.fetch()).text!=="EOF"&&h.test(he+Te.text);)ne=Te,he+=ne.text,this.consume();if(he==="")throw new re("Invalid "+p+": '"+C.text+"'",C);return this.mode=T,C.range(ne,he)},l.parseColorGroup=function(h){var p=this.parseStringGroup("color",h);if(!p)return null;var T=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(p.text);if(!T)throw new re("Invalid color: '"+p.text+"'",p);var C=T[0];return/^[0-9a-f]{6}$/i.test(C)&&(C="#"+C),{type:"color-token",mode:this.mode,color:C}},l.parseSizeGroup=function(h){var p,T=!1;if(!h&&this.fetch().text!=="{"?p=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):p=this.parseStringGroup("size",h),!p)return null;!h&&p.text.length===0&&(p.text="0pt",T=!0);var C=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(p.text);if(!C)throw new re("Invalid size: '"+p.text+"'",p);var ne={number:+(C[1]+C[2]),unit:C[3]};if(!mr(ne))throw new re("Invalid unit: '"+ne.unit+"'",p);return{type:"size",mode:this.mode,value:ne,isBlank:T}},l.parseUrlGroup=function(h,p){this.gullet.lexer.setCatcode("%",13);var T=this.parseStringGroup("url",h,!0);if(this.gullet.lexer.setCatcode("%",14),!T)return null;var C=T.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:C}},l.parseGroup=function(h,p,T,C,ne,he){var Te=this.mode;ne&&this.switchMode(ne),he&&this.consumeSpaces();var We=this.fetch(),rt=We.text,gt;if(p?rt==="[":rt==="{"||rt==="\\begingroup"){this.consume();var St=k.endOfGroup[rt];this.gullet.beginGroup();var Ft=this.parseExpression(!1,St),Vt=this.fetch();this.expect(St),this.gullet.endGroup(),gt={type:"ordgroup",mode:this.mode,loc:me.range(We,Vt),body:Ft,semisimple:rt==="\\begingroup"||void 0}}else if(p)gt=null;else if(gt=this.parseFunction(C,h,T)||this.parseSymbol(),gt==null&&rt[0]==="\\"&&!Ss.hasOwnProperty(rt)){if(this.settings.throwOnError)throw new re("Undefined control sequence: "+rt,We);gt=this.formatUnsupportedCmd(rt),this.consume()}return ne&&this.switchMode(Te),gt},l.formLigatures=function(h){for(var p=h.length-1,T=0;T<p;++T){var C=h[T],ne=C.text;ne==="-"&&h[T+1].text==="-"&&(T+1<p&&h[T+2].text==="-"?(h.splice(T,3,{type:"textord",mode:"text",loc:me.range(C,h[T+2]),text:"---"}),p-=2):(h.splice(T,2,{type:"textord",mode:"text",loc:me.range(C,h[T+1]),text:"--"}),p-=1)),(ne==="'"||ne==="`")&&h[T+1].text===ne&&(h.splice(T,2,{type:"textord",mode:"text",loc:me.range(C,h[T+1]),text:ne+ne}),p-=1)}},l.parseSymbol=function(){var h=this.fetch(),p=h.text;if(/^\\verb[^a-zA-Z]/.test(p)){this.consume();var T=p.slice(5),C=T.charAt(0)==="*";if(C&&(T=T.slice(1)),T.length<2||T.charAt(0)!==T.slice(-1))throw new re(`\\verb assertion failed --
|
|
|
please report what input caused this bug`);return T=T.slice(1,-1),{type:"verb",mode:"text",body:T,star:C}}wa.hasOwnProperty(p[0])&&!_t[this.mode][p[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+p[0]+'" used in math mode',h),p=wa[p[0]]+p.substr(1));var ne=Sn.exec(p);ne&&(p=p.substring(0,ne.index),p==="i"?p="\u0131":p==="j"&&(p="\u0237"));var he;if(_t[this.mode][p]){this.settings.strict&&this.mode==="math"&&lr.indexOf(p)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+p[0]+'" used in math mode',h);var Te=_t[this.mode][p].group,We=me.range(h),rt;if(it.hasOwnProperty(Te)){var gt=Te;rt={type:"atom",mode:this.mode,family:gt,loc:We,text:p}}else rt={type:Te,mode:this.mode,loc:We,text:p};he=rt}else if(p.charCodeAt(0)>=128)this.settings.strict&&(ze(p.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+p[0]+'" used in math mode',h):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+p[0]+'"'+(" ("+p.charCodeAt(0)+")"),h)),he={type:"textord",mode:"text",loc:me.range(h),text:p};else return null;if(this.consume(),ne)for(var St=0;St<ne[0].length;St++){var Ft=ne[0][St];if(!Yi[Ft])throw new re("Unknown accent ' "+Ft+"'",h);var Vt=Yi[Ft][this.mode];if(!Vt)throw new re("Accent "+Ft+" unsupported in "+this.mode+" mode",h);he={type:"accent",mode:this.mode,loc:me.range(h),label:Vt,isStretchy:!1,isShifty:!0,base:he}}return he},k}();As.endOfExpression=["}","\\endgroup","\\end","\\right","&"],As.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},As.SUPSUB_GREEDINESS=1;var Sa=function(l,c){if(!(typeof l=="string"||l instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var h=new As(l,c);delete h.gullet.macros.current["\\df@tag"];var p=h.parse();if(h.gullet.macros.get("\\df@tag")){if(!c.displayMode)throw new re("\\tag works only in display equations");h.gullet.feed("\\df@tag"),p=[{type:"tag",mode:"text",body:p,tag:h.parse()}]}return p},qs=Sa,Aa=function(l,c,h){c.textContent="";var p=jn(l,h).toNode();c.appendChild(p)};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."),Aa=function(){throw new re("KaTeX doesn't work in quirks mode.")});var qi=function(l,c){var h=jn(l,c).toMarkup();return h},Xs=function(l,c){var h=new I(c);return qs(l,h)},as=function(l,c,h){if(h.throwOnError||!(l instanceof re))throw l;var p=ke.makeSpan(["katex-error"],[new ee(c)]);return p.setAttribute("title",l.toString()),p.setAttribute("style","color:"+h.errorColor),p},jn=function(l,c){var h=new I(c);try{var p=qs(l,h);return Qn(p,l,h)}catch(T){return as(T,l,h)}},Ja=function(l,c){var h=new I(c);try{var p=qs(l,h);return Oi(p,l,h)}catch(T){return as(T,l,h)}},Ta={version:"0.11.1",render:Aa,renderToString:qi,ParseError:re,__parse:Xs,__renderToDomTree:jn,__renderToHTMLTree:Ja,__setFontMetrics:bt,__defineSymbol:v,__defineMacro:xe,__domTree:{Span:se,Anchor:Ne,SymbolNode:ee,SvgNode:ye,PathNode:be,LineNode:Le}},eo=D.default=Ta}]).default})},32834:function($t){(function(st,D){$t.exports=D()})(this,function(){"use strict";function st(ge,Pe){for(var Ge=0;Ge<Pe.length;Ge++){var z=Pe[Ge];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(ge,z.key,z)}}function D(ge,Pe,Ge){return Pe&&st(ge.prototype,Pe),Ge&&st(ge,Ge),ge}function R(ge,Pe){if(ge){if(typeof ge=="string")return _e(ge,Pe);var Ge=Object.prototype.toString.call(ge).slice(8,-1);if(Ge==="Object"&&ge.constructor&&(Ge=ge.constructor.name),Ge==="Map"||Ge==="Set")return Array.from(ge);if(Ge==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ge))return _e(ge,Pe)}}function _e(ge,Pe){(Pe==null||Pe>ge.length)&&(Pe=ge.length);for(var Ge=0,z=new Array(Pe);Ge<Pe;Ge++)z[Ge]=ge[Ge];return z}function me(ge,Pe){var Ge=typeof Symbol!="undefined"&&ge[Symbol.iterator]||ge["@@iterator"];if(Ge)return(Ge=Ge.call(ge)).next.bind(Ge);if(Array.isArray(ge)||(Ge=R(ge))||Pe&&ge&&typeof ge.length=="number"){Ge&&(ge=Ge);var z=0;return function(){return z>=ge.length?{done:!0}:{done:!1,value:ge[z++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ie={exports:{}};function fe(){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 re(ge){Ie.exports.defaults=ge}Ie.exports={defaults:fe(),getDefaults:fe,changeDefaults:re};var ve=/[&<>"']/,Ee=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,$=/[<>"']|&(?!#?\w+;)/g,F={"&":"&","<":"<",">":">",'"':""","'":"'"},w=function(Pe){return F[Pe]};function f(ge,Pe){if(Pe){if(ve.test(ge))return ge.replace(Ee,w)}else if(o.test(ge))return ge.replace($,w);return ge}var _=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function y(ge){return ge.replace(_,function(Pe,Ge){return Ge=Ge.toLowerCase(),Ge==="colon"?":":Ge.charAt(0)==="#"?Ge.charAt(1)==="x"?String.fromCharCode(parseInt(Ge.substring(2),16)):String.fromCharCode(+Ge.substring(1)):""})}var U=/(^|[^\[])\^/g;function K(ge,Pe){ge=ge.source||ge,Pe=Pe||"";var Ge={replace:function(J,ce){return ce=ce.source||ce,ce=ce.replace(U,"$1"),ge=ge.replace(J,ce),Ge},getRegex:function(){return new RegExp(ge,Pe)}};return Ge}var O=/[^\w:]/g,I=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function H(ge,Pe,Ge){if(ge){var z;try{z=decodeURIComponent(y(Ge)).replace(O,"").toLowerCase()}catch(J){return null}if(z.indexOf("javascript:")===0||z.indexOf("vbscript:")===0||z.indexOf("data:")===0)return null}Pe&&!I.test(Ge)&&(Ge=de(Pe,Ge));try{Ge=encodeURI(Ge).replace(/%25/g,"%")}catch(J){return null}return Ge}var te={},S=/^[^:]+:\/*[^/]*$/,j=/^([^:]+:)[\s\S]*$/,ae=/^([^:]+:\/*[^/]*)[\s\S]*$/;function de(ge,Pe){te[" "+ge]||(S.test(ge)?te[" "+ge]=ge+"/":te[" "+ge]=$e(ge,"/",!0)),ge=te[" "+ge];var Ge=ge.indexOf(":")===-1;return Pe.substring(0,2)==="//"?Ge?Pe:ge.replace(j,"$1")+Pe:Pe.charAt(0)==="/"?Ge?Pe:ge.replace(ae,"$1")+Pe:ge+Pe}var Se={exec:function(){}};function we(ge){for(var Pe=1,Ge,z;Pe<arguments.length;Pe++){Ge=arguments[Pe];for(z in Ge)Object.prototype.hasOwnProperty.call(Ge,z)&&(ge[z]=Ge[z])}return ge}function Me(ge,Pe){var Ge=ge.replace(/\|/g,function(ce,Ce,M){for(var xt=!1,pe=Ce;--pe>=0&&M[pe]==="\\";)xt=!xt;return xt?"|":" |"}),z=Ge.split(/ \|/),J=0;if(z.length>Pe)z.splice(Pe);else for(;z.length<Pe;)z.push("");for(;J<z.length;J++)z[J]=z[J].trim().replace(/\\\|/g,"|");return z}function $e(ge,Pe,Ge){var z=ge.length;if(z===0)return"";for(var J=0;J<z;){var ce=ge.charAt(z-J-1);if(ce===Pe&&!Ge)J++;else if(ce!==Pe&&Ge)J++;else break}return ge.substr(0,z-J)}function Y(ge,Pe){if(ge.indexOf(Pe[1])===-1)return-1;for(var Ge=ge.length,z=0,J=0;J<Ge;J++)if(ge[J]==="\\")J++;else if(ge[J]===Pe[0])z++;else if(ge[J]===Pe[1]&&(z--,z<0))return J;return-1}function B(ge){ge&&ge.sanitize&&!ge.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 Z(ge,Pe){if(Pe<1)return"";for(var Ge="";Pe>1;)Pe&1&&(Ge+=ge),Pe>>=1,ge+=ge;return Ge+ge}var X={escape:f,unescape:y,edit:K,cleanUrl:H,resolveUrl:de,noopTest:Se,merge:we,splitCells:Me,rtrim:$e,findClosingBracket:Y,checkSanitizeDeprecation:B,repeatString:Z},le=Ie.exports.defaults,q=X.rtrim,b=X.splitCells,x=X.escape,G=X.findClosingBracket;function ue(ge,Pe,Ge){var z=Pe.href,J=Pe.title?x(Pe.title):null,ce=ge[1].replace(/\\([\[\]])/g,"$1");return ge[0].charAt(0)!=="!"?{type:"link",raw:Ge,href:z,title:J,text:ce}:{type:"image",raw:Ge,href:z,title:J,text:x(ce)}}function ze(ge,Pe){var Ge=ge.match(/^(\s+)(?:```)/);if(Ge===null)return Pe;var z=Ge[1];return Pe.split(`
|
|
|
`).map(function(J){var ce=J.match(/^\s+/);if(ce===null)return J;var Ce=ce[0];return Ce.length>=z.length?J.slice(z.length):J}).join(`
|
|
|
`)}var Xe=function(){function ge(Ge){this.options=Ge||le}var Pe=ge.prototype;return Pe.space=function(z){var J=this.rules.block.newline.exec(z);if(J)return J[0].length>1?{type:"space",raw:J[0]}:{raw:`
|
|
|
`}},Pe.code=function(z){var J=this.rules.block.code.exec(z);if(J){var ce=J[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:J[0],codeBlockStyle:"indented",text:this.options.pedantic?ce:q(ce,`
|
|
|
`)}}},Pe.fences=function(z){var J=this.rules.block.fences.exec(z);if(J){var ce=J[0],Ce=ze(ce,J[3]||"");return{type:"code",raw:ce,lang:J[2]?J[2].trim():J[2],text:Ce}}},Pe.heading=function(z){var J=this.rules.block.heading.exec(z);if(J){var ce=J[2].trim();if(/#$/.test(ce)){var Ce=q(ce,"#");(this.options.pedantic||!Ce||/ $/.test(Ce))&&(ce=Ce.trim())}return{type:"heading",raw:J[0],depth:J[1].length,text:ce}}},Pe.nptable=function(z){var J=this.rules.block.nptable.exec(z);if(J){var ce={type:"table",header:b(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:J[0]};if(ce.header.length===ce.align.length){var Ce=ce.align.length,M;for(M=0;M<Ce;M++)/^ *-+: *$/.test(ce.align[M])?ce.align[M]="right":/^ *:-+: *$/.test(ce.align[M])?ce.align[M]="center":/^ *:-+ *$/.test(ce.align[M])?ce.align[M]="left":ce.align[M]=null;for(Ce=ce.cells.length,M=0;M<Ce;M++)ce.cells[M]=b(ce.cells[M],ce.header.length);return ce}}},Pe.hr=function(z){var J=this.rules.block.hr.exec(z);if(J)return{type:"hr",raw:J[0]}},Pe.blockquote=function(z){var J=this.rules.block.blockquote.exec(z);if(J){var ce=J[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:J[0],text:ce}}},Pe.list=function(z){var J=this.rules.block.list.exec(z);if(J){var ce=J[0],Ce=J[2],M=Ce.length>1,xt={type:"list",raw:ce,ordered:M,start:M?+Ce.slice(0,-1):"",loose:!1,items:[]},pe=J[0].match(this.rules.block.item),Lt=!1,It,Wt,ur,Ct,Ot,Re,ot,dt,mt,ut=pe.length;ur=this.rules.block.listItemStart.exec(pe[0]);for(var Et=0;Et<ut;Et++){if(It=pe[Et],ce=It,this.options.pedantic||(mt=It.match(new RegExp("\\n\\s*\\n {0,"+(ur[0].length-1)+"}\\S")),mt&&(Ot=It.length-mt.index+pe.slice(Et+1).join(`
|
|
|
`).length,xt.raw=xt.raw.substring(0,xt.raw.length-Ot),It=It.substring(0,mt.index),ce=It,ut=Et+1)),Et!==ut-1){if(Ct=this.rules.block.listItemStart.exec(pe[Et+1]),this.options.pedantic?Ct[1].length>ur[1].length:Ct[1].length>=ur[0].length||Ct[1].length>3){pe.splice(Et,2,pe[Et]+(!this.options.pedantic&&Ct[1].length<ur[0].length&&!pe[Et].match(/\n$/)?"":`
|
|
|
`)+pe[Et+1]),Et--,ut--;continue}else(!this.options.pedantic||this.options.smartLists?Ct[2][Ct[2].length-1]!==Ce[Ce.length-1]:M===(Ct[2].length===1))&&(Ot=pe.slice(Et+1).join(`
|
|
|
`).length,xt.raw=xt.raw.substring(0,xt.raw.length-Ot),Et=ut-1);ur=Ct}Wt=It.length,It=It.replace(/^ *([*+-]|\d+[.)]) ?/,""),~It.indexOf(`
|
|
|
`)&&(Wt-=It.length,It=this.options.pedantic?It.replace(/^ {1,4}/gm,""):It.replace(new RegExp("^ {1,"+Wt+"}","gm"),"")),It=q(It,`
|
|
|
`),Et!==ut-1&&(ce=ce+`
|
|
|
`),Re=Lt||/\n\n(?!\s*$)/.test(ce),Et!==ut-1&&(Lt=ce.slice(-2)===`
|
|
|
|
|
|
`,Re||(Re=Lt)),Re&&(xt.loose=!0),this.options.gfm&&(ot=/^\[[ xX]\] /.test(It),dt=void 0,ot&&(dt=It[1]!==" ",It=It.replace(/^\[[ xX]\] +/,""))),xt.items.push({type:"list_item",raw:ce,task:ot,checked:dt,loose:Re,text:It})}return xt}},Pe.html=function(z){var J=this.rules.block.html.exec(z);if(J)return{type:this.options.sanitize?"paragraph":"html",raw:J[0],pre:!this.options.sanitizer&&(J[1]==="pre"||J[1]==="script"||J[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(J[0]):x(J[0]):J[0]}},Pe.def=function(z){var J=this.rules.block.def.exec(z);if(J){J[3]&&(J[3]=J[3].substring(1,J[3].length-1));var ce=J[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:ce,raw:J[0],href:J[2],title:J[3]}}},Pe.table=function(z){var J=this.rules.block.table.exec(z);if(J){var ce={type:"table",header:b(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(ce.header.length===ce.align.length){ce.raw=J[0];var Ce=ce.align.length,M;for(M=0;M<Ce;M++)/^ *-+: *$/.test(ce.align[M])?ce.align[M]="right":/^ *:-+: *$/.test(ce.align[M])?ce.align[M]="center":/^ *:-+ *$/.test(ce.align[M])?ce.align[M]="left":ce.align[M]=null;for(Ce=ce.cells.length,M=0;M<Ce;M++)ce.cells[M]=b(ce.cells[M].replace(/^ *\| *| *\| *$/g,""),ce.header.length);return ce}}},Pe.lheading=function(z){var J=this.rules.block.lheading.exec(z);if(J)return{type:"heading",raw:J[0],depth:J[2].charAt(0)==="="?1:2,text:J[1]}},Pe.paragraph=function(z){var J=this.rules.block.paragraph.exec(z);if(J)return{type:"paragraph",raw:J[0],text:J[1].charAt(J[1].length-1)===`
|
|
|
`?J[1].slice(0,-1):J[1]}},Pe.text=function(z){var J=this.rules.block.text.exec(z);if(J)return{type:"text",raw:J[0],text:J[0]}},Pe.escape=function(z){var J=this.rules.inline.escape.exec(z);if(J)return{type:"escape",raw:J[0],text:x(J[1])}},Pe.tag=function(z,J,ce){var Ce=this.rules.inline.tag.exec(z);if(Ce)return!J&&/^<a /i.test(Ce[0])?J=!0:J&&/^<\/a>/i.test(Ce[0])&&(J=!1),!ce&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ce[0])?ce=!0:ce&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ce[0])&&(ce=!1),{type:this.options.sanitize?"text":"html",raw:Ce[0],inLink:J,inRawBlock:ce,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ce[0]):x(Ce[0]):Ce[0]}},Pe.link=function(z){var J=this.rules.inline.link.exec(z);if(J){var ce=J[2].trim();if(!this.options.pedantic&&/^</.test(ce)){if(!/>$/.test(ce))return;var Ce=q(ce.slice(0,-1),"\\");if((ce.length-Ce.length)%2===0)return}else{var M=G(J[2],"()");if(M>-1){var xt=J[0].indexOf("!")===0?5:4,pe=xt+J[1].length+M;J[2]=J[2].substring(0,M),J[0]=J[0].substring(0,pe).trim(),J[3]=""}}var Lt=J[2],It="";if(this.options.pedantic){var Wt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Lt);Wt&&(Lt=Wt[1],It=Wt[3])}else It=J[3]?J[3].slice(1,-1):"";return Lt=Lt.trim(),/^</.test(Lt)&&(this.options.pedantic&&!/>$/.test(ce)?Lt=Lt.slice(1):Lt=Lt.slice(1,-1)),ue(J,{href:Lt&&Lt.replace(this.rules.inline._escapes,"$1"),title:It&&It.replace(this.rules.inline._escapes,"$1")},J[0])}},Pe.reflink=function(z,J){var ce;if((ce=this.rules.inline.reflink.exec(z))||(ce=this.rules.inline.nolink.exec(z))){var Ce=(ce[2]||ce[1]).replace(/\s+/g," ");if(Ce=J[Ce.toLowerCase()],!Ce||!Ce.href){var M=ce[0].charAt(0);return{type:"text",raw:M,text:M}}return ue(ce,Ce,ce[0])}},Pe.emStrong=function(z,J,ce){ce===void 0&&(ce="");var Ce=this.rules.inline.emStrong.lDelim.exec(z);if(Ce&&!(Ce[3]&&ce.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 M=Ce[1]||Ce[2]||"";if(!M||M&&(ce===""||this.rules.inline.punctuation.exec(ce))){var xt=Ce[0].length-1,pe,Lt,It=xt,Wt=0,ur=Ce[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(ur.lastIndex=0,J=J.slice(-1*z.length+xt);(Ce=ur.exec(J))!=null;)if(pe=Ce[1]||Ce[2]||Ce[3]||Ce[4]||Ce[5]||Ce[6],!!pe){if(Lt=pe.length,Ce[3]||Ce[4]){It+=Lt;continue}else if((Ce[5]||Ce[6])&&xt%3&&!((xt+Lt)%3)){Wt+=Lt;continue}if(It-=Lt,!(It>0))return Lt=Math.min(Lt,Lt+It+Wt),Math.min(xt,Lt)%2?{type:"em",raw:z.slice(0,xt+Ce.index+Lt+1),text:z.slice(1,xt+Ce.index+Lt)}:{type:"strong",raw:z.slice(0,xt+Ce.index+Lt+1),text:z.slice(2,xt+Ce.index+Lt-1)}}}}},Pe.codespan=function(z){var J=this.rules.inline.code.exec(z);if(J){var ce=J[2].replace(/\n/g," "),Ce=/[^ ]/.test(ce),M=/^ /.test(ce)&&/ $/.test(ce);return Ce&&M&&(ce=ce.substring(1,ce.length-1)),ce=x(ce,!0),{type:"codespan",raw:J[0],text:ce}}},Pe.br=function(z){var J=this.rules.inline.br.exec(z);if(J)return{type:"br",raw:J[0]}},Pe.del=function(z){var J=this.rules.inline.del.exec(z);if(J)return{type:"del",raw:J[0],text:J[2]}},Pe.autolink=function(z,J){var ce=this.rules.inline.autolink.exec(z);if(ce){var Ce,M;return ce[2]==="@"?(Ce=x(this.options.mangle?J(ce[1]):ce[1]),M="mailto:"+Ce):(Ce=x(ce[1]),M=Ce),{type:"link",raw:ce[0],text:Ce,href:M,tokens:[{type:"text",raw:Ce,text:Ce}]}}},Pe.url=function(z,J){var ce;if(ce=this.rules.inline.url.exec(z)){var Ce,M;if(ce[2]==="@")Ce=x(this.options.mangle?J(ce[0]):ce[0]),M="mailto:"+Ce;else{var xt;do xt=ce[0],ce[0]=this.rules.inline._backpedal.exec(ce[0])[0];while(xt!==ce[0]);Ce=x(ce[0]),ce[1]==="www."?M="http://"+Ce:M=Ce}return{type:"link",raw:ce[0],text:Ce,href:M,tokens:[{type:"text",raw:Ce,text:Ce}]}}},Pe.inlineText=function(z,J,ce){var Ce=this.rules.inline.text.exec(z);if(Ce){var M;return J?M=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ce[0]):x(Ce[0]):Ce[0]:M=x(this.options.smartypants?ce(Ce[0]):Ce[0]),{type:"text",raw:Ce[0],text:M}}},ge}(),Ke=X.noopTest,Ze=X.edit,pt=X.merge,ct={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:Ke,table:Ke,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};ct._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ct._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ct.def=Ze(ct.def).replace("label",ct._label).replace("title",ct._title).getRegex(),ct.bullet=/(?:[*+-]|\d{1,9}[.)])/,ct.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,ct.item=Ze(ct.item,"gm").replace(/bull/g,ct.bullet).getRegex(),ct.listItemStart=Ze(/^( *)(bull) */).replace("bull",ct.bullet).getRegex(),ct.list=Ze(ct.list).replace(/bull/g,ct.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ct.def.source+")").getRegex(),ct._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",ct._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,ct.html=Ze(ct.html,"i").replace("comment",ct._comment).replace("tag",ct._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ct.paragraph=Ze(ct._paragraph).replace("hr",ct.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",ct._tag).getRegex(),ct.blockquote=Ze(ct.blockquote).replace("paragraph",ct.paragraph).getRegex(),ct.normal=pt({},ct),ct.gfm=pt({},ct.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*|$)"}),ct.gfm.nptable=Ze(ct.gfm.nptable).replace("hr",ct.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",ct._tag).getRegex(),ct.gfm.table=Ze(ct.gfm.table).replace("hr",ct.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",ct._tag).getRegex(),ct.pedantic=pt({},ct.normal,{html:Ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ct._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:Ke,paragraph:Ze(ct.normal._paragraph).replace("hr",ct.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",ct.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ht={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ke,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:Ke,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};ht._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ht.punctuation=Ze(ht.punctuation).replace(/punctuation/g,ht._punctuation).getRegex(),ht.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,ht.escapedEmSt=/\\\*|\\_/g,ht._comment=Ze(ct._comment).replace("(?:-->|$)","-->").getRegex(),ht.emStrong.lDelim=Ze(ht.emStrong.lDelim).replace(/punct/g,ht._punctuation).getRegex(),ht.emStrong.rDelimAst=Ze(ht.emStrong.rDelimAst,"g").replace(/punct/g,ht._punctuation).getRegex(),ht.emStrong.rDelimUnd=Ze(ht.emStrong.rDelimUnd,"g").replace(/punct/g,ht._punctuation).getRegex(),ht._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ht._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ht._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])?)+(?![-_])/,ht.autolink=Ze(ht.autolink).replace("scheme",ht._scheme).replace("email",ht._email).getRegex(),ht._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ht.tag=Ze(ht.tag).replace("comment",ht._comment).replace("attribute",ht._attribute).getRegex(),ht._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ht._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,ht._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ht.link=Ze(ht.link).replace("label",ht._label).replace("href",ht._href).replace("title",ht._title).getRegex(),ht.reflink=Ze(ht.reflink).replace("label",ht._label).getRegex(),ht.reflinkSearch=Ze(ht.reflinkSearch,"g").replace("reflink",ht.reflink).replace("nolink",ht.nolink).getRegex(),ht.normal=pt({},ht),ht.pedantic=pt({},ht.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Ze(/^!?\[(label)\]\((.*?)\)/).replace("label",ht._label).getRegex(),reflink:Ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ht._label).getRegex()}),ht.gfm=pt({},ht.normal,{escape:Ze(ht.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ht.gfm.url=Ze(ht.gfm.url,"i").replace("email",ht.gfm._extended_email).getRegex(),ht.breaks=pt({},ht.gfm,{br:Ze(ht.br).replace("{2,}","*").getRegex(),text:Ze(ht.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var jt={block:ct,inline:ht},Zt=Xe,qt=Ie.exports.defaults,Ut=jt.block,zt=jt.inline,Bt=X.repeatString;function Oe(ge){return ge.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 qe(ge){var Pe="",Ge,z,J=ge.length;for(Ge=0;Ge<J;Ge++)z=ge.charCodeAt(Ge),Math.random()>.5&&(z="x"+z.toString(16)),Pe+="&#"+z+";";return Pe}var se=function(){function ge(Ge){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ge||qt,this.options.tokenizer=this.options.tokenizer||new Zt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var z={block:Ut.normal,inline:zt.normal};this.options.pedantic?(z.block=Ut.pedantic,z.inline=zt.pedantic):this.options.gfm&&(z.block=Ut.gfm,this.options.breaks?z.inline=zt.breaks:z.inline=zt.gfm),this.tokenizer.rules=z}ge.lex=function(z,J){var ce=new ge(J);return ce.lex(z)},ge.lexInline=function(z,J){var ce=new ge(J);return ce.inlineTokens(z)};var Pe=ge.prototype;return Pe.lex=function(z){return z=z.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(z,this.tokens,!0),this.inline(this.tokens),this.tokens},Pe.blockTokens=function(z,J,ce){J===void 0&&(J=[]),ce===void 0&&(ce=!0),this.options.pedantic&&(z=z.replace(/^ +$/gm,""));for(var Ce,M,xt,pe;z;){if(Ce=this.tokenizer.space(z)){z=z.substring(Ce.raw.length),Ce.type&&J.push(Ce);continue}if(Ce=this.tokenizer.code(z)){z=z.substring(Ce.raw.length),pe=J[J.length-1],pe&&pe.type==="paragraph"?(pe.raw+=`
|
|
|
`+Ce.raw,pe.text+=`
|
|
|
`+Ce.text):J.push(Ce);continue}if(Ce=this.tokenizer.fences(z)){z=z.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.heading(z)){z=z.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.nptable(z)){z=z.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.hr(z)){z=z.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.blockquote(z)){z=z.substring(Ce.raw.length),Ce.tokens=this.blockTokens(Ce.text,[],ce),J.push(Ce);continue}if(Ce=this.tokenizer.list(z)){for(z=z.substring(Ce.raw.length),xt=Ce.items.length,M=0;M<xt;M++)Ce.items[M].tokens=this.blockTokens(Ce.items[M].text,[],!1);J.push(Ce);continue}if(Ce=this.tokenizer.html(z)){z=z.substring(Ce.raw.length),J.push(Ce);continue}if(ce&&(Ce=this.tokenizer.def(z))){z=z.substring(Ce.raw.length),this.tokens.links[Ce.tag]||(this.tokens.links[Ce.tag]={href:Ce.href,title:Ce.title});continue}if(Ce=this.tokenizer.table(z)){z=z.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.lheading(z)){z=z.substring(Ce.raw.length),J.push(Ce);continue}if(ce&&(Ce=this.tokenizer.paragraph(z))){z=z.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.text(z)){z=z.substring(Ce.raw.length),pe=J[J.length-1],pe&&pe.type==="text"?(pe.raw+=`
|
|
|
`+Ce.raw,pe.text+=`
|
|
|
`+Ce.text):J.push(Ce);continue}if(z){var Lt="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(Lt);break}else throw new Error(Lt)}}return J},Pe.inline=function(z){var J,ce,Ce,M,xt,pe,Lt=z.length;for(J=0;J<Lt;J++)switch(pe=z[J],pe.type){case"paragraph":case"text":case"heading":{pe.tokens=[],this.inlineTokens(pe.text,pe.tokens);break}case"table":{for(pe.tokens={header:[],cells:[]},M=pe.header.length,ce=0;ce<M;ce++)pe.tokens.header[ce]=[],this.inlineTokens(pe.header[ce],pe.tokens.header[ce]);for(M=pe.cells.length,ce=0;ce<M;ce++)for(xt=pe.cells[ce],pe.tokens.cells[ce]=[],Ce=0;Ce<xt.length;Ce++)pe.tokens.cells[ce][Ce]=[],this.inlineTokens(xt[Ce],pe.tokens.cells[ce][Ce]);break}case"blockquote":{this.inline(pe.tokens);break}case"list":{for(M=pe.items.length,ce=0;ce<M;ce++)this.inline(pe.items[ce].tokens);break}}return z},Pe.inlineTokens=function(z,J,ce,Ce){J===void 0&&(J=[]),ce===void 0&&(ce=!1),Ce===void 0&&(Ce=!1);var M,xt,pe=z,Lt,It,Wt;if(this.tokens.links){var ur=Object.keys(this.tokens.links);if(ur.length>0)for(;(Lt=this.tokenizer.rules.inline.reflinkSearch.exec(pe))!=null;)ur.includes(Lt[0].slice(Lt[0].lastIndexOf("[")+1,-1))&&(pe=pe.slice(0,Lt.index)+"["+Bt("a",Lt[0].length-2)+"]"+pe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Lt=this.tokenizer.rules.inline.blockSkip.exec(pe))!=null;)pe=pe.slice(0,Lt.index)+"["+Bt("a",Lt[0].length-2)+"]"+pe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Lt=this.tokenizer.rules.inline.escapedEmSt.exec(pe))!=null;)pe=pe.slice(0,Lt.index)+"++"+pe.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;z;){if(It||(Wt=""),It=!1,M=this.tokenizer.escape(z)){z=z.substring(M.raw.length),J.push(M);continue}if(M=this.tokenizer.tag(z,ce,Ce)){z=z.substring(M.raw.length),ce=M.inLink,Ce=M.inRawBlock;var Ct=J[J.length-1];Ct&&M.type==="text"&&Ct.type==="text"?(Ct.raw+=M.raw,Ct.text+=M.text):J.push(M);continue}if(M=this.tokenizer.link(z)){z=z.substring(M.raw.length),M.type==="link"&&(M.tokens=this.inlineTokens(M.text,[],!0,Ce)),J.push(M);continue}if(M=this.tokenizer.reflink(z,this.tokens.links)){z=z.substring(M.raw.length);var Ot=J[J.length-1];M.type==="link"?(M.tokens=this.inlineTokens(M.text,[],!0,Ce),J.push(M)):Ot&&M.type==="text"&&Ot.type==="text"?(Ot.raw+=M.raw,Ot.text+=M.text):J.push(M);continue}if(M=this.tokenizer.emStrong(z,pe,Wt)){z=z.substring(M.raw.length),M.tokens=this.inlineTokens(M.text,[],ce,Ce),J.push(M);continue}if(M=this.tokenizer.codespan(z)){z=z.substring(M.raw.length),J.push(M);continue}if(M=this.tokenizer.br(z)){z=z.substring(M.raw.length),J.push(M);continue}if(M=this.tokenizer.del(z)){z=z.substring(M.raw.length),M.tokens=this.inlineTokens(M.text,[],ce,Ce),J.push(M);continue}if(M=this.tokenizer.autolink(z,qe)){z=z.substring(M.raw.length),J.push(M);continue}if(!ce&&(M=this.tokenizer.url(z,qe))){z=z.substring(M.raw.length),J.push(M);continue}if(M=this.tokenizer.inlineText(z,Ce,Oe)){z=z.substring(M.raw.length),M.raw.slice(-1)!=="_"&&(Wt=M.raw.slice(-1)),It=!0,xt=J[J.length-1],xt&&xt.type==="text"?(xt.raw+=M.raw,xt.text+=M.text):J.push(M);continue}if(z){var Re="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(Re);break}else throw new Error(Re)}}return J},D(ge,null,[{key:"rules",get:function(){return{block:Ut,inline:zt}}}]),ge}(),Ne=Ie.exports.defaults,He=X.cleanUrl,N=X.escape,ee=function(){function ge(Ge){this.options=Ge||Ne}var Pe=ge.prototype;return Pe.code=function(z,J,ce){var Ce=(J||"").match(/\S*/)[0];if(this.options.highlight){var M=this.options.highlight(z,Ce);M!=null&&M!==z&&(ce=!0,z=M)}return z=z.replace(/\n$/,"")+`
|
|
|
`,Ce?'<pre><code class="'+this.options.langPrefix+N(Ce,!0)+'">'+(ce?z:N(z,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(ce?z:N(z,!0))+`</code></pre>
|
|
|
`},Pe.blockquote=function(z){return`<blockquote>
|
|
|
`+z+`</blockquote>
|
|
|
`},Pe.html=function(z){return z},Pe.heading=function(z,J,ce,Ce){return this.options.headerIds?"<h"+J+' id="'+this.options.headerPrefix+Ce.slug(ce)+'">'+z+"</h"+J+`>
|
|
|
`:"<h"+J+">"+z+"</h"+J+`>
|
|
|
`},Pe.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Pe.list=function(z,J,ce){var Ce=J?"ol":"ul",M=J&&ce!==1?' start="'+ce+'"':"";return"<"+Ce+M+`>
|
|
|
`+z+"</"+Ce+`>
|
|
|
`},Pe.listitem=function(z){return"<li>"+z+`</li>
|
|
|
`},Pe.checkbox=function(z){return"<input "+(z?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Pe.paragraph=function(z){return"<p>"+z+`</p>
|
|
|
`},Pe.table=function(z,J){return J&&(J="<tbody>"+J+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+z+`</thead>
|
|
|
`+J+`</table>
|
|
|
`},Pe.tablerow=function(z){return`<tr>
|
|
|
`+z+`</tr>
|
|
|
`},Pe.tablecell=function(z,J){var ce=J.header?"th":"td",Ce=J.align?"<"+ce+' align="'+J.align+'">':"<"+ce+">";return Ce+z+"</"+ce+`>
|
|
|
`},Pe.strong=function(z){return"<strong>"+z+"</strong>"},Pe.em=function(z){return"<em>"+z+"</em>"},Pe.codespan=function(z){return"<code>"+z+"</code>"},Pe.br=function(){return this.options.xhtml?"<br/>":"<br>"},Pe.del=function(z){return"<del>"+z+"</del>"},Pe.link=function(z,J,ce){if(z=He(this.options.sanitize,this.options.baseUrl,z),z===null)return ce;var Ce='<a href="'+N(z)+'"';return J&&(Ce+=' title="'+J+'"'),Ce+=">"+ce+"</a>",Ce},Pe.image=function(z,J,ce){if(z=He(this.options.sanitize,this.options.baseUrl,z),z===null)return ce;var Ce='<img src="'+z+'" alt="'+ce+'"';return J&&(Ce+=' title="'+J+'"'),Ce+=this.options.xhtml?"/>":">",Ce},Pe.text=function(z){return z},ge}(),ye=function(){function ge(){}var Pe=ge.prototype;return Pe.strong=function(z){return z},Pe.em=function(z){return z},Pe.codespan=function(z){return z},Pe.del=function(z){return z},Pe.html=function(z){return z},Pe.text=function(z){return z},Pe.link=function(z,J,ce){return""+ce},Pe.image=function(z,J,ce){return""+ce},Pe.br=function(){return""},ge}(),be=function(){function ge(){this.seen={}}var Pe=ge.prototype;return Pe.serialize=function(z){return z.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Pe.getNextSafeSlug=function(z,J){var ce=z,Ce=0;if(this.seen.hasOwnProperty(ce)){Ce=this.seen[z];do Ce++,ce=z+"-"+Ce;while(this.seen.hasOwnProperty(ce))}return J||(this.seen[z]=Ce,this.seen[ce]=0),ce},Pe.slug=function(z,J){J===void 0&&(J={});var ce=this.serialize(z);return this.getNextSafeSlug(ce,J.dryrun)},ge}(),Le=ee,Be=ye,Ve=be,nt=Ie.exports.defaults,Qe=X.unescape,je=function(){function ge(Ge){this.options=Ge||nt,this.options.renderer=this.options.renderer||new Le,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Be,this.slugger=new Ve}ge.parse=function(z,J){var ce=new ge(J);return ce.parse(z)},ge.parseInline=function(z,J){var ce=new ge(J);return ce.parseInline(z)};var Pe=ge.prototype;return Pe.parse=function(z,J){J===void 0&&(J=!0);var ce="",Ce,M,xt,pe,Lt,It,Wt,ur,Ct,Ot,Re,ot,dt,mt,ut,Et,Kt,hr,Xt=z.length;for(Ce=0;Ce<Xt;Ce++)switch(Ot=z[Ce],Ot.type){case"space":continue;case"hr":{ce+=this.renderer.hr();continue}case"heading":{ce+=this.renderer.heading(this.parseInline(Ot.tokens),Ot.depth,Qe(this.parseInline(Ot.tokens,this.textRenderer)),this.slugger);continue}case"code":{ce+=this.renderer.code(Ot.text,Ot.lang,Ot.escaped);continue}case"table":{for(ur="",Wt="",pe=Ot.header.length,M=0;M<pe;M++)Wt+=this.renderer.tablecell(this.parseInline(Ot.tokens.header[M]),{header:!0,align:Ot.align[M]});for(ur+=this.renderer.tablerow(Wt),Ct="",pe=Ot.cells.length,M=0;M<pe;M++){for(It=Ot.tokens.cells[M],Wt="",Lt=It.length,xt=0;xt<Lt;xt++)Wt+=this.renderer.tablecell(this.parseInline(It[xt]),{header:!1,align:Ot.align[xt]});Ct+=this.renderer.tablerow(Wt)}ce+=this.renderer.table(ur,Ct);continue}case"blockquote":{Ct=this.parse(Ot.tokens),ce+=this.renderer.blockquote(Ct);continue}case"list":{for(Re=Ot.ordered,ot=Ot.start,dt=Ot.loose,pe=Ot.items.length,Ct="",M=0;M<pe;M++)ut=Ot.items[M],Et=ut.checked,Kt=ut.task,mt="",ut.task&&(hr=this.renderer.checkbox(Et),dt?ut.tokens.length>0&&ut.tokens[0].type==="text"?(ut.tokens[0].text=hr+" "+ut.tokens[0].text,ut.tokens[0].tokens&&ut.tokens[0].tokens.length>0&&ut.tokens[0].tokens[0].type==="text"&&(ut.tokens[0].tokens[0].text=hr+" "+ut.tokens[0].tokens[0].text)):ut.tokens.unshift({type:"text",text:hr}):mt+=hr),mt+=this.parse(ut.tokens,dt),Ct+=this.renderer.listitem(mt,Kt,Et);ce+=this.renderer.list(Ct,Re,ot);continue}case"html":{ce+=this.renderer.html(Ot.text);continue}case"paragraph":{ce+=this.renderer.paragraph(this.parseInline(Ot.tokens));continue}case"text":{for(Ct=Ot.tokens?this.parseInline(Ot.tokens):Ot.text;Ce+1<Xt&&z[Ce+1].type==="text";)Ot=z[++Ce],Ct+=`
|
|
|
`+(Ot.tokens?this.parseInline(Ot.tokens):Ot.text);ce+=J?this.renderer.paragraph(Ct):Ct;continue}default:{var lr='Token with "'+Ot.type+'" type was not found.';if(this.options.silent){console.error(lr);return}else throw new Error(lr)}}return ce},Pe.parseInline=function(z,J){J=J||this.renderer;var ce="",Ce,M,xt=z.length;for(Ce=0;Ce<xt;Ce++)switch(M=z[Ce],M.type){case"escape":{ce+=J.text(M.text);break}case"html":{ce+=J.html(M.text);break}case"link":{ce+=J.link(M.href,M.title,this.parseInline(M.tokens,J));break}case"image":{ce+=J.image(M.href,M.title,M.text);break}case"strong":{ce+=J.strong(this.parseInline(M.tokens,J));break}case"em":{ce+=J.em(this.parseInline(M.tokens,J));break}case"codespan":{ce+=J.codespan(M.text);break}case"br":{ce+=J.br();break}case"del":{ce+=J.del(this.parseInline(M.tokens,J));break}case"text":{ce+=J.text(M.text);break}default:{var pe='Token with "'+M.type+'" type was not found.';if(this.options.silent){console.error(pe);return}else throw new Error(pe)}}return ce},ge}(),bt=se,Ae=je,De=Xe,Ue=ee,it=ye,et=be,ft=X.merge,_t=X.checkSanitizeDeprecation,v=X.escape,E=Ie.exports.getDefaults,Ye=Ie.exports.changeDefaults,P=Ie.exports.defaults;function oe(ge,Pe,Ge){if(typeof ge=="undefined"||ge===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ge!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ge)+", string expected");if(typeof Pe=="function"&&(Ge=Pe,Pe=null),Pe=ft({},oe.defaults,Pe||{}),_t(Pe),Ge){var z=Pe.highlight,J;try{J=bt.lex(ge,Pe)}catch(xt){return Ge(xt)}var ce=function(pe){var Lt;if(!pe)try{Pe.walkTokens&&oe.walkTokens(J,Pe.walkTokens),Lt=Ae.parse(J,Pe)}catch(It){pe=It}return Pe.highlight=z,pe?Ge(pe):Ge(null,Lt)};if(!z||z.length<3||(delete Pe.highlight,!J.length))return ce();var Ce=0;oe.walkTokens(J,function(xt){xt.type==="code"&&(Ce++,setTimeout(function(){z(xt.text,xt.lang,function(pe,Lt){if(pe)return ce(pe);Lt!=null&&Lt!==xt.text&&(xt.text=Lt,xt.escaped=!0),Ce--,Ce===0&&ce()})},0))}),Ce===0&&ce();return}try{var M=bt.lex(ge,Pe);return Pe.walkTokens&&oe.walkTokens(M,Pe.walkTokens),Ae.parse(M,Pe)}catch(xt){if(xt.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Pe.silent)return"<p>An error occurred:</p><pre>"+v(xt.message+"",!0)+"</pre>";throw xt}}oe.options=oe.setOptions=function(ge){return ft(oe.defaults,ge),Ye(oe.defaults),oe},oe.getDefaults=E,oe.defaults=P,oe.use=function(ge){var Pe=ft({},ge);if(ge.renderer&&function(){var z=oe.defaults.renderer||new Ue,J=function(M){var xt=z[M];z[M]=function(){for(var pe=arguments.length,Lt=new Array(pe),It=0;It<pe;It++)Lt[It]=arguments[It];var Wt=ge.renderer[M].apply(z,Lt);return Wt===!1&&(Wt=xt.apply(z,Lt)),Wt}};for(var ce in ge.renderer)J(ce);Pe.renderer=z}(),ge.tokenizer&&function(){var z=oe.defaults.tokenizer||new De,J=function(M){var xt=z[M];z[M]=function(){for(var pe=arguments.length,Lt=new Array(pe),It=0;It<pe;It++)Lt[It]=arguments[It];var Wt=ge.tokenizer[M].apply(z,Lt);return Wt===!1&&(Wt=xt.apply(z,Lt)),Wt}};for(var ce in ge.tokenizer)J(ce);Pe.tokenizer=z}(),ge.walkTokens){var Ge=oe.defaults.walkTokens;Pe.walkTokens=function(z){ge.walkTokens(z),Ge&&Ge(z)}}oe.setOptions(Pe)},oe.walkTokens=function(ge,Pe){for(var Ge=me(ge),z;!(z=Ge()).done;){var J=z.value;switch(Pe(J),J.type){case"table":{for(var ce=me(J.tokens.header),Ce;!(Ce=ce()).done;){var M=Ce.value;oe.walkTokens(M,Pe)}for(var xt=me(J.tokens.cells),pe;!(pe=xt()).done;)for(var Lt=pe.value,It=me(Lt),Wt;!(Wt=It()).done;){var ur=Wt.value;oe.walkTokens(ur,Pe)}break}case"list":{oe.walkTokens(J.items,Pe);break}default:J.tokens&&oe.walkTokens(J.tokens,Pe)}}},oe.parseInline=function(ge,Pe){if(typeof ge=="undefined"||ge===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ge!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ge)+", string expected");Pe=ft({},oe.defaults,Pe||{}),_t(Pe);try{var Ge=bt.lexInline(ge,Pe);return Pe.walkTokens&&oe.walkTokens(Ge,Pe.walkTokens),Ae.parseInline(Ge,Pe)}catch(z){if(z.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Pe.silent)return"<p>An error occurred:</p><pre>"+v(z.message+"",!0)+"</pre>";throw z}},oe.Parser=Ae,oe.parser=Ae.parse,oe.Renderer=Ue,oe.TextRenderer=it,oe.Lexer=bt,oe.lexer=bt.lex,oe.Tokenizer=De,oe.Slugger=et,oe.parse=oe;var kt=oe;return kt})},11690:function($t){const st=/[&<>"']/,D=/[&<>"']/g,R=/[<>"']|&(?!#?\w+;)/,_e=/[<>"']|&(?!#?\w+;)/g,me={"&":"&","<":"<",">":">",'"':""","'":"'"},Ie=de=>me[de];function fe(de,Se){if(Se){if(st.test(de))return de.replace(D,Ie)}else if(R.test(de))return de.replace(_e,Ie);return de}const re=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ve(de){return de.replace(re,(Se,we)=>(we=we.toLowerCase(),we==="colon"?":":we.charAt(0)==="#"?we.charAt(1)==="x"?String.fromCharCode(parseInt(we.substring(2),16)):String.fromCharCode(+we.substring(1)):""))}const Ee=/(^|[^\[])\^/g;function o(de,Se){de=de.source||de,Se=Se||"";const we={replace:(Me,$e)=>($e=$e.source||$e,$e=$e.replace(Ee,"$1"),de=de.replace(Me,$e),we),getRegex:()=>new RegExp(de,Se)};return we}const $=/[^\w:]/g,F=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function w(de,Se,we){if(de){let Me;try{Me=decodeURIComponent(ve(we)).replace($,"").toLowerCase()}catch($e){return null}if(Me.indexOf("javascript:")===0||Me.indexOf("vbscript:")===0||Me.indexOf("data:")===0)return null}Se&&!F.test(we)&&(we=K(Se,we));try{we=encodeURI(we).replace(/%25/g,"%")}catch(Me){return null}return we}const f={},_=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,U=/^([^:]+:\/*[^/]*)[\s\S]*$/;function K(de,Se){f[" "+de]||(_.test(de)?f[" "+de]=de+"/":f[" "+de]=te(de,"/",!0)),de=f[" "+de];const we=de.indexOf(":")===-1;return Se.substring(0,2)==="//"?we?Se:de.replace(y,"$1")+Se:Se.charAt(0)==="/"?we?Se:de.replace(U,"$1")+Se:de+Se}const O={exec:function(){}};function I(de){let Se=1,we,Me;for(;Se<arguments.length;Se++){we=arguments[Se];for(Me in we)Object.prototype.hasOwnProperty.call(we,Me)&&(de[Me]=we[Me])}return de}function H(de,Se){const we=de.replace(/\|/g,(Y,B,Z)=>{let X=!1,le=B;for(;--le>=0&&Z[le]==="\\";)X=!X;return X?"|":" |"}),Me=we.split(/ \|/);let $e=0;if(Me.length>Se)Me.splice(Se);else for(;Me.length<Se;)Me.push("");for(;$e<Me.length;$e++)Me[$e]=Me[$e].trim().replace(/\\\|/g,"|");return Me}function te(de,Se,we){const Me=de.length;if(Me===0)return"";let $e=0;for(;$e<Me;){const Y=de.charAt(Me-$e-1);if(Y===Se&&!we)$e++;else if(Y!==Se&&we)$e++;else break}return de.substr(0,Me-$e)}function S(de,Se){if(de.indexOf(Se[1])===-1)return-1;const we=de.length;let Me=0,$e=0;for(;$e<we;$e++)if(de[$e]==="\\")$e++;else if(de[$e]===Se[0])Me++;else if(de[$e]===Se[1]&&(Me--,Me<0))return $e;return-1}function j(de){de&&de.sanitize&&!de.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 ae(de,Se){if(Se<1)return"";let we="";for(;Se>1;)Se&1&&(we+=de),Se>>=1,de+=de;return we+de}$t.exports={escape:fe,unescape:ve,edit:o,cleanUrl:w,resolveUrl:K,noopTest:O,merge:I,splitCells:H,rtrim:te,findClosingBracket:S,checkSanitizeDeprecation:j,repeatString:ae}},75918:function($t,st,D){"use strict";D.d(st,{Wi:function(){return re},Z0:function(){return ve},aU:function(){return fe},eZ:function(){return o},wY:function(){return Ee}});var R=D(4348),_e=D(69323),me=D(13268),Ie=function($,F,w,f){function _(y){return y instanceof w?y:new w(function(U){U(y)})}return new(w||(w=Promise))(function(y,U){function K(H){try{I(f.next(H))}catch(te){U(te)}}function O(H){try{I(f.throw(H))}catch(te){U(te)}}function I(H){H.done?y(H.value):_(H.value).then(K,O)}I((f=f.apply($,F||[])).next())})};class fe extends _e.JT{constructor(F,w="",f="",_=!0,y){super(),this._onDidChange=this._register(new R.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=F,this._label=w,this._cssClass=f,this._enabled=_,this._actionCallback=y}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,w){return Ie(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(F))})}}class re extends _e.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new R.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new R.Q5),this.onDidRun=this._onDidRun.event}run(F,w){return Ie(this,void 0,void 0,function*(){if(!F.enabled)return;this._onBeforeRun.fire({action:F});let f;try{yield this.runAction(F,w)}catch(_){f=_}this._onDidRun.fire({action:F,error:f})})}runAction(F,w){return Ie(this,void 0,void 0,function*(){yield F.run(w)})}}class ve extends fe{constructor(F){super(ve.ID,F,F?"separator text":"separator"),this.checked=!1,this.enabled=!1}}ve.ID="vs.actions.separator";class Ee{constructor(F,w,f,_){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=F,this.label=w,this.class=_,this._actions=f}get actions(){return this._actions}dispose(){}run(){return Ie(this,void 0,void 0,function*(){})}}class o extends fe{constructor(){super(o.ID,me.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function($t,st,D){"use strict";D.d(st,{ok:function(){return R}});function R(_e,me){if(!_e)throw new Error(me?`Assertion failed (${me})`:"Assertion Failed")}},52615:function($t,st,D){"use strict";D.d(st,{CM:function(){return fe},JL:function(){return re},dT:function(){return Ee},fK:function(){return Ie},lA:function(){return ve}});var R=D(4348);class _e{constructor(){this._icons=new Map,this._onDidRegister=new R.Q5}add($){const F=this._icons.get($.id);F?$.description?F.description=$.description:console.error(`Duplicate registration of codicon ${$.id}`):(this._icons.set($.id,$),this._onDidRegister.fire($))}get($){return this._icons.get($)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const me=new _e,Ie=me;function fe(o,$){return new ve(o,$)}function re(o){return o?o.replace(/\$\((.*?)\)/g,($,F)=>` ${F} `).trim():""}class ve{constructor($,F,w){this.id=$,this.definition=F,this.description=w,me.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var Ee;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const $=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function F(_){if(_ instanceof ve)return["codicon","codicon-"+_.id];const y=$.exec(_.id);if(!y)return F(ve.error);let[,U,K]=y;const O=["codicon","codicon-"+U];return K&&O.push("codicon-modifier-"+K.substr(1)),O}o.asClassNameArray=F;function w(_){return F(_).join(" ")}o.asClassName=w;function f(_){return"."+F(_).join(".")}o.asCSSSelector=f})(Ee||(Ee={})),function(o){o.add=new o("add",{fontCharacter:"\\ea60"}),o.plus=new o("plus",o.add.definition),o.gistNew=new o("gist-new",o.add.definition),o.repoCreate=new o("repo-create",o.add.definition),o.lightbulb=new o("lightbulb",{fontCharacter:"\\ea61"}),o.lightBulb=new o("light-bulb",{fontCharacter:"\\ea61"}),o.repo=new o("repo",{fontCharacter:"\\ea62"}),o.repoDelete=new o("repo-delete",{fontCharacter:"\\ea62"}),o.gistFork=new o("gist-fork",{fontCharacter:"\\ea63"}),o.repoForked=new o("repo-forked",{fontCharacter:"\\ea63"}),o.gitPullRequest=new o("git-pull-request",{fontCharacter:"\\ea64"}),o.gitPullRequestAbandoned=new o("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),o.recordKeys=new o("record-keys",{fontCharacter:"\\ea65"}),o.keyboard=new o("keyboard",{fontCharacter:"\\ea65"}),o.tag=new o("tag",{fontCharacter:"\\ea66"}),o.tagAdd=new o("tag-add",{fontCharacter:"\\ea66"}),o.tagRemove=new o("tag-remove",{fontCharacter:"\\ea66"}),o.person=new o("person",{fontCharacter:"\\ea67"}),o.personFollow=new o("person-follow",{fontCharacter:"\\ea67"}),o.personOutline=new o("person-outline",{fontCharacter:"\\ea67"}),o.personFilled=new o("person-filled",{fontCharacter:"\\ea67"}),o.gitBranch=new o("git-branch",{fontCharacter:"\\ea68"}),o.gitBranchCreate=new o("git-branch-create",{fontCharacter:"\\ea68"}),o.gitBranchDelete=new o("git-branch-delete",{fontCharacter:"\\ea68"}),o.sourceControl=new o("source-control",{fontCharacter:"\\ea68"}),o.mirror=new o("mirror",{fontCharacter:"\\ea69"}),o.mirrorPublic=new o("mirror-public",{fontCharacter:"\\ea69"}),o.star=new o("star",{fontCharacter:"\\ea6a"}),o.starAdd=new o("star-add",{fontCharacter:"\\ea6a"}),o.starDelete=new o("star-delete",{fontCharacter:"\\ea6a"}),o.starEmpty=new o("star-empty",{fontCharacter:"\\ea6a"}),o.comment=new o("comment",{fontCharacter:"\\ea6b"}),o.commentAdd=new o("comment-add",{fontCharacter:"\\ea6b"}),o.alert=new o("alert",{fontCharacter:"\\ea6c"}),o.warning=new o("warning",{fontCharacter:"\\ea6c"}),o.search=new o("search",{fontCharacter:"\\ea6d"}),o.searchSave=new o("search-save",{fontCharacter:"\\ea6d"}),o.logOut=new o("log-out",{fontCharacter:"\\ea6e"}),o.signOut=new o("sign-out",{fontCharacter:"\\ea6e"}),o.logIn=new o("log-in",{fontCharacter:"\\ea6f"}),o.signIn=new o("sign-in",{fontCharacter:"\\ea6f"}),o.eye=new o("eye",{fontCharacter:"\\ea70"}),o.eyeUnwatch=new o("eye-unwatch",{fontCharacter:"\\ea70"}),o.eyeWatch=new o("eye-watch",{fontCharacter:"\\ea70"}),o.circleFilled=new o("circle-filled",{fontCharacter:"\\ea71"}),o.primitiveDot=new o("primitive-dot",{fontCharacter:"\\ea71"}),o.closeDirty=new o("close-dirty",{fontCharacter:"\\ea71"}),o.debugBreakpoint=new o("debug-breakpoint",{fontCharacter:"\\ea71"}),o.debugBreakpointDisabled=new o("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),o.debugHint=new o("debug-hint",{fontCharacter:"\\ea71"}),o.primitiveSquare=new o("primitive-square",{fontCharacter:"\\ea72"}),o.edit=new o("edit",{fontCharacter:"\\ea73"}),o.pencil=new o("pencil",{fontCharacter:"\\ea73"}),o.info=new o("info",{fontCharacter:"\\ea74"}),o.issueOpened=new o("issue-opened",{fontCharacter:"\\ea74"}),o.gistPrivate=new o("gist-private",{fontCharacter:"\\ea75"}),o.gitForkPrivate=new o("git-fork-private",{fontCharacter:"\\ea75"}),o.lock=new o("lock",{fontCharacter:"\\ea75"}),o.mirrorPrivate=new o("mirror-private",{fontCharacter:"\\ea75"}),o.close=new o("close",{fontCharacter:"\\ea76"}),o.removeClose=new o("remove-close",{fontCharacter:"\\ea76"}),o.x=new o("x",{fontCharacter:"\\ea76"}),o.repoSync=new o("repo-sync",{fontCharacter:"\\ea77"}),o.sync=new o("sync",{fontCharacter:"\\ea77"}),o.clone=new o("clone",{fontCharacter:"\\ea78"}),o.desktopDownload=new o("desktop-download",{fontCharacter:"\\ea78"}),o.beaker=new o("beaker",{fontCharacter:"\\ea79"}),o.microscope=new o("microscope",{fontCharacter:"\\ea79"}),o.vm=new o("vm",{fontCharacter:"\\ea7a"}),o.deviceDesktop=new o("device-desktop",{fontCharacter:"\\ea7a"}),o.file=new o("file",{fontCharacter:"\\ea7b"}),o.fileText=new o("file-text",{fontCharacter:"\\ea7b"}),o.more=new o("more",{fontCharacter:"\\ea7c"}),o.ellipsis=new o("ellipsis",{fontCharacter:"\\ea7c"}),o.kebabHorizontal=new o("kebab-horizontal",{fontCharacter:"\\ea7c"}),o.mailReply=new o("mail-reply",{fontCharacter:"\\ea7d"}),o.reply=new o("reply",{fontCharacter:"\\ea7d"}),o.organization=new o("organization",{fontCharacter:"\\ea7e"}),o.organizationFilled=new o("organization-filled",{fontCharacter:"\\ea7e"}),o.organizationOutline=new o("organization-outline",{fontCharacter:"\\ea7e"}),o.newFile=new o("new-file",{fontCharacter:"\\ea7f"}),o.fileAdd=new o("file-add",{fontCharacter:"\\ea7f"}),o.newFolder=new o("new-folder",{fontCharacter:"\\ea80"}),o.fileDirectoryCreate=new o("file-directory-create",{fontCharacter:"\\ea80"}),o.trash=new o("trash",{fontCharacter:"\\ea81"}),o.trashcan=new o("trashcan",{fontCharacter:"\\ea81"}),o.history=new o("history",{fontCharacter:"\\ea82"}),o.clock=new o("clock",{fontCharacter:"\\ea82"}),o.folder=new o("folder",{fontCharacter:"\\ea83"}),o.fileDirectory=new o("file-directory",{fontCharacter:"\\ea83"}),o.symbolFolder=new o("symbol-folder",{fontCharacter:"\\ea83"}),o.logoGithub=new o("logo-github",{fontCharacter:"\\ea84"}),o.markGithub=new o("mark-github",{fontCharacter:"\\ea84"}),o.github=new o("github",{fontCharacter:"\\ea84"}),o.terminal=new o("terminal",{fontCharacter:"\\ea85"}),o.console=new o("console",{fontCharacter:"\\ea85"}),o.repl=new o("repl",{fontCharacter:"\\ea85"}),o.zap=new o("zap",{fontCharacter:"\\ea86"}),o.symbolEvent=new o("symbol-event",{fontCharacter:"\\ea86"}),o.error=new o("error",{fontCharacter:"\\ea87"}),o.stop=new o("stop",{fontCharacter:"\\ea87"}),o.variable=new o("variable",{fontCharacter:"\\ea88"}),o.symbolVariable=new o("symbol-variable",{fontCharacter:"\\ea88"}),o.array=new o("array",{fontCharacter:"\\ea8a"}),o.symbolArray=new o("symbol-array",{fontCharacter:"\\ea8a"}),o.symbolModule=new o("symbol-module",{fontCharacter:"\\ea8b"}),o.symbolPackage=new o("symbol-package",{fontCharacter:"\\ea8b"}),o.symbolNamespace=new o("symbol-namespace",{fontCharacter:"\\ea8b"}),o.symbolObject=new o("symbol-object",{fontCharacter:"\\ea8b"}),o.symbolMethod=new o("symbol-method",{fontCharacter:"\\ea8c"}),o.symbolFunction=new o("symbol-function",{fontCharacter:"\\ea8c"}),o.symbolConstructor=new o("symbol-constructor",{fontCharacter:"\\ea8c"}),o.symbolBoolean=new o("symbol-boolean",{fontCharacter:"\\ea8f"}),o.symbolNull=new o("symbol-null",{fontCharacter:"\\ea8f"}),o.symbolNumeric=new o("symbol-numeric",{fontCharacter:"\\ea90"}),o.symbolNumber=new o("symbol-number",{fontCharacter:"\\ea90"}),o.symbolStructure=new o("symbol-structure",{fontCharacter:"\\ea91"}),o.symbolStruct=new o("symbol-struct",{fontCharacter:"\\ea91"}),o.symbolParameter=new o("symbol-parameter",{fontCharacter:"\\ea92"}),o.symbolTypeParameter=new o("symbol-type-parameter",{fontCharacter:"\\ea92"}),o.symbolKey=new o("symbol-key",{fontCharacter:"\\ea93"}),o.symbolText=new o("symbol-text",{fontCharacter:"\\ea93"}),o.symbolReference=new o("symbol-reference",{fontCharacter:"\\ea94"}),o.goToFile=new o("go-to-file",{fontCharacter:"\\ea94"}),o.symbolEnum=new o("symbol-enum",{fontCharacter:"\\ea95"}),o.symbolValue=new o("symbol-value",{fontCharacter:"\\ea95"}),o.symbolRuler=new o("symbol-ruler",{fontCharacter:"\\ea96"}),o.symbolUnit=new o("symbol-unit",{fontCharacter:"\\ea96"}),o.activateBreakpoints=new o("activate-breakpoints",{fontCharacter:"\\ea97"}),o.archive=new o("archive",{fontCharacter:"\\ea98"}),o.arrowBoth=new o("arrow-both",{fontCharacter:"\\ea99"}),o.arrowDown=new o("arrow-down",{fontCharacter:"\\ea9a"}),o.arrowLeft=new o("arrow-left",{fontCharacter:"\\ea9b"}),o.arrowRight=new o("arrow-right",{fontCharacter:"\\ea9c"}),o.arrowSmallDown=new o("arrow-small-down",{fontCharacter:"\\ea9d"}),o.arrowSmallLeft=new o("arrow-small-left",{fontCharacter:"\\ea9e"}),o.arrowSmallRight=new o("arrow-small-right",{fontCharacter:"\\ea9f"}),o.arrowSmallUp=new o("arrow-small-up",{fontCharacter:"\\eaa0"}),o.arrowUp=new o("arrow-up",{fontCharacter:"\\eaa1"}),o.bell=new o("bell",{fontCharacter:"\\eaa2"}),o.bold=new o("bold",{fontCharacter:"\\eaa3"}),o.book=new o("book",{fontCharacter:"\\eaa4"}),o.bookmark=new o("bookmark",{fontCharacter:"\\eaa5"}),o.debugBreakpointConditionalUnverified=new o("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),o.debugBreakpointConditional=new o("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),o.debugBreakpointConditionalDisabled=new o("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),o.debugBreakpointDataUnverified=new o("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),o.debugBreakpointData=new o("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),o.debugBreakpointDataDisabled=new o("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),o.debugBreakpointLogUnverified=new o("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),o.debugBreakpointLog=new o("debug-breakpoint-log",{fontCharacter:"\\eaab"}),o.debugBreakpointLogDisabled=new o("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),o.briefcase=new o("briefcase",{fontCharacter:"\\eaac"}),o.broadcast=new o("broadcast",{fontCharacter:"\\eaad"}),o.browser=new o("browser",{fontCharacter:"\\eaae"}),o.bug=new o("bug",{fontCharacter:"\\eaaf"}),o.calendar=new o("calendar",{fontCharacter:"\\eab0"}),o.caseSensitive=new o("case-sensitive",{fontCharacter:"\\eab1"}),o.check=new o("check",{fontCharacter:"\\eab2"}),o.checklist=new o("checklist",{fontCharacter:"\\eab3"}),o.chevronDown=new o("chevron-down",{fontCharacter:"\\eab4"}),o.dropDownButton=new o("drop-down-button",o.chevronDown.definition),o.chevronLeft=new o("chevron-left",{fontCharacter:"\\eab5"}),o.chevronRight=new o("chevron-right",{fontCharacter:"\\eab6"}),o.chevronUp=new o("chevron-up",{fontCharacter:"\\eab7"}),o.chromeClose=new o("chrome-close",{fontCharacter:"\\eab8"}),o.chromeMaximize=new o("chrome-maximize",{fontCharacter:"\\eab9"}),o.chromeMinimize=new o("chrome-minimize",{fontCharacter:"\\eaba"}),o.chromeRestore=new o("chrome-restore",{fontCharacter:"\\eabb"}),o.circleOutline=new o("circle-outline",{fontCharacter:"\\eabc"}),o.debugBreakpointUnverified=new o("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),o.circleSlash=new o("circle-slash",{fontCharacter:"\\eabd"}),o.circuitBoard=new o("circuit-board",{fontCharacter:"\\eabe"}),o.clearAll=new o("clear-all",{fontCharacter:"\\eabf"}),o.clippy=new o("clippy",{fontCharacter:"\\eac0"}),o.closeAll=new o("close-all",{fontCharacter:"\\eac1"}),o.cloudDownload=new o("cloud-download",{fontCharacter:"\\eac2"}),o.cloudUpload=new o("cloud-upload",{fontCharacter:"\\eac3"}),o.code=new o("code",{fontCharacter:"\\eac4"}),o.collapseAll=new o("collapse-all",{fontCharacter:"\\eac5"}),o.colorMode=new o("color-mode",{fontCharacter:"\\eac6"}),o.commentDiscussion=new o("comment-discussion",{fontCharacter:"\\eac7"}),o.compareChanges=new o("compare-changes",{fontCharacter:"\\eafd"}),o.creditCard=new o("credit-card",{fontCharacter:"\\eac9"}),o.dash=new o("dash",{fontCharacter:"\\eacc"}),o.dashboard=new o("dashboard",{fontCharacter:"\\eacd"}),o.database=new o("database",{fontCharacter:"\\eace"}),o.debugContinue=new o("debug-continue",{fontCharacter:"\\eacf"}),o.debugDisconnect=new o("debug-disconnect",{fontCharacter:"\\ead0"}),o.debugPause=new o("debug-pause",{fontCharacter:"\\ead1"}),o.debugRestart=new o("debug-restart",{fontCharacter:"\\ead2"}),o.debugStart=new o("debug-start",{fontCharacter:"\\ead3"}),o.debugStepInto=new o("debug-step-into",{fontCharacter:"\\ead4"}),o.debugStepOut=new o("debug-step-out",{fontCharacter:"\\ead5"}),o.debugStepOver=new o("debug-step-over",{fontCharacter:"\\ead6"}),o.debugStop=new o("debug-stop",{fontCharacter:"\\ead7"}),o.debug=new o("debug",{fontCharacter:"\\ead8"}),o.deviceCameraVideo=new o("device-camera-video",{fontCharacter:"\\ead9"}),o.deviceCamera=new o("device-camera",{fontCharacter:"\\eada"}),o.deviceMobile=new o("device-mobile",{fontCharacter:"\\eadb"}),o.diffAdded=new o("diff-added",{fontCharacter:"\\eadc"}),o.diffIgnored=new o("diff-ignored",{fontCharacter:"\\eadd"}),o.diffModified=new o("diff-modified",{fontCharacter:"\\eade"}),o.diffRemoved=new o("diff-removed",{fontCharacter:"\\eadf"}),o.diffRenamed=new o("diff-renamed",{fontCharacter:"\\eae0"}),o.diff=new o("diff",{fontCharacter:"\\eae1"}),o.discard=new o("discard",{fontCharacter:"\\eae2"}),o.editorLayout=new o("editor-layout",{fontCharacter:"\\eae3"}),o.emptyWindow=new o("empty-window",{fontCharacter:"\\eae4"}),o.exclude=new o("exclude",{fontCharacter:"\\eae5"}),o.extensions=new o("extensions",{fontCharacter:"\\eae6"}),o.eyeClosed=new o("eye-closed",{fontCharacter:"\\eae7"}),o.fileBinary=new o("file-binary",{fontCharacter:"\\eae8"}),o.fileCode=new o("file-code",{fontCharacter:"\\eae9"}),o.fileMedia=new o("file-media",{fontCharacter:"\\eaea"}),o.filePdf=new o("file-pdf",{fontCharacter:"\\eaeb"}),o.fileSubmodule=new o("file-submodule",{fontCharacter:"\\eaec"}),o.fileSymlinkDirectory=new o("file-symlink-directory",{fontCharacter:"\\eaed"}),o.fileSymlinkFile=new o("file-symlink-file",{fontCharacter:"\\eaee"}),o.fileZip=new o("file-zip",{fontCharacter:"\\eaef"}),o.files=new o("files",{fontCharacter:"\\eaf0"}),o.filter=new o("filter",{fontCharacter:"\\eaf1"}),o.flame=new o("flame",{fontCharacter:"\\eaf2"}),o.foldDown=new o("fold-down",{fontCharacter:"\\eaf3"}),o.foldUp=new o("fold-up",{fontCharacter:"\\eaf4"}),o.fold=new o("fold",{fontCharacter:"\\eaf5"}),o.folderActive=new o("folder-active",{fontCharacter:"\\eaf6"}),o.folderOpened=new o("folder-opened",{fontCharacter:"\\eaf7"}),o.gear=new o("gear",{fontCharacter:"\\eaf8"}),o.gift=new o("gift",{fontCharacter:"\\eaf9"}),o.gistSecret=new o("gist-secret",{fontCharacter:"\\eafa"}),o.gist=new o("gist",{fontCharacter:"\\eafb"}),o.gitCommit=new o("git-commit",{fontCharacter:"\\eafc"}),o.gitCompare=new o("git-compare",{fontCharacter:"\\eafd"}),o.gitMerge=new o("git-merge",{fontCharacter:"\\eafe"}),o.githubAction=new o("github-action",{fontCharacter:"\\eaff"}),o.githubAlt=new o("github-alt",{fontCharacter:"\\eb00"}),o.globe=new o("globe",{fontCharacter:"\\eb01"}),o.grabber=new o("grabber",{fontCharacter:"\\eb02"}),o.graph=new o("graph",{fontCharacter:"\\eb03"}),o.gripper=new o("gripper",{fontCharacter:"\\eb04"}),o.heart=new o("heart",{fontCharacter:"\\eb05"}),o.home=new o("home",{fontCharacter:"\\eb06"}),o.horizontalRule=new o("horizontal-rule",{fontCharacter:"\\eb07"}),o.hubot=new o("hubot",{fontCharacter:"\\eb08"}),o.inbox=new o("inbox",{fontCharacter:"\\eb09"}),o.issueClosed=new o("issue-closed",{fontCharacter:"\\eba4"}),o.issueReopened=new o("issue-reopened",{fontCharacter:"\\eb0b"}),o.issues=new o("issues",{fontCharacter:"\\eb0c"}),o.italic=new o("italic",{fontCharacter:"\\eb0d"}),o.jersey=new o("jersey",{fontCharacter:"\\eb0e"}),o.json=new o("json",{fontCharacter:"\\eb0f"}),o.kebabVertical=new o("kebab-vertical",{fontCharacter:"\\eb10"}),o.key=new o("key",{fontCharacter:"\\eb11"}),o.law=new o("law",{fontCharacter:"\\eb12"}),o.lightbulbAutofix=new o("lightbulb-autofix",{fontCharacter:"\\eb13"}),o.linkExternal=new o("link-external",{fontCharacter:"\\eb14"}),o.link=new o("link",{fontCharacter:"\\eb15"}),o.listOrdered=new o("list-ordered",{fontCharacter:"\\eb16"}),o.listUnordered=new o("list-unordered",{fontCharacter:"\\eb17"}),o.liveShare=new o("live-share",{fontCharacter:"\\eb18"}),o.loading=new o("loading",{fontCharacter:"\\eb19"}),o.location=new o("location",{fontCharacter:"\\eb1a"}),o.mailRead=new o("mail-read",{fontCharacter:"\\eb1b"}),o.mail=new o("mail",{fontCharacter:"\\eb1c"}),o.markdown=new o("markdown",{fontCharacter:"\\eb1d"}),o.megaphone=new o("megaphone",{fontCharacter:"\\eb1e"}),o.mention=new o("mention",{fontCharacter:"\\eb1f"}),o.milestone=new o("milestone",{fontCharacter:"\\eb20"}),o.mortarBoard=new o("mortar-board",{fontCharacter:"\\eb21"}),o.move=new o("move",{fontCharacter:"\\eb22"}),o.multipleWindows=new o("multiple-windows",{fontCharacter:"\\eb23"}),o.mute=new o("mute",{fontCharacter:"\\eb24"}),o.noNewline=new o("no-newline",{fontCharacter:"\\eb25"}),o.note=new o("note",{fontCharacter:"\\eb26"}),o.octoface=new o("octoface",{fontCharacter:"\\eb27"}),o.openPreview=new o("open-preview",{fontCharacter:"\\eb28"}),o.package_=new o("package",{fontCharacter:"\\eb29"}),o.paintcan=new o("paintcan",{fontCharacter:"\\eb2a"}),o.pin=new o("pin",{fontCharacter:"\\eb2b"}),o.play=new o("play",{fontCharacter:"\\eb2c"}),o.run=new o("run",{fontCharacter:"\\eb2c"}),o.plug=new o("plug",{fontCharacter:"\\eb2d"}),o.preserveCase=new o("preserve-case",{fontCharacter:"\\eb2e"}),o.preview=new o("preview",{fontCharacter:"\\eb2f"}),o.project=new o("project",{fontCharacter:"\\eb30"}),o.pulse=new o("pulse",{fontCharacter:"\\eb31"}),o.question=new o("question",{fontCharacter:"\\eb32"}),o.quote=new o("quote",{fontCharacter:"\\eb33"}),o.radioTower=new o("radio-tower",{fontCharacter:"\\eb34"}),o.reactions=new o("reactions",{fontCharacter:"\\eb35"}),o.references=new o("references",{fontCharacter:"\\eb36"}),o.refresh=new o("refresh",{fontCharacter:"\\eb37"}),o.regex=new o("regex",{fontCharacter:"\\eb38"}),o.remoteExplorer=new o("remote-explorer",{fontCharacter:"\\eb39"}),o.remote=new o("remote",{fontCharacter:"\\eb3a"}),o.remove=new o("remove",{fontCharacter:"\\eb3b"}),o.replaceAll=new o("replace-all",{fontCharacter:"\\eb3c"}),o.replace=new o("replace",{fontCharacter:"\\eb3d"}),o.repoClone=new o("repo-clone",{fontCharacter:"\\eb3e"}),o.repoForcePush=new o("repo-force-push",{fontCharacter:"\\eb3f"}),o.repoPull=new o("repo-pull",{fontCharacter:"\\eb40"}),o.repoPush=new o("repo-push",{fontCharacter:"\\eb41"}),o.report=new o("report",{fontCharacter:"\\eb42"}),o.requestChanges=new o("request-changes",{fontCharacter:"\\eb43"}),o.rocket=new o("rocket",{fontCharacter:"\\eb44"}),o.rootFolderOpened=new o("root-folder-opened",{fontCharacter:"\\eb45"}),o.rootFolder=new o("root-folder",{fontCharacter:"\\eb46"}),o.rss=new o("rss",{fontCharacter:"\\eb47"}),o.ruby=new o("ruby",{fontCharacter:"\\eb48"}),o.saveAll=new o("save-all",{fontCharacter:"\\eb49"}),o.saveAs=new o("save-as",{fontCharacter:"\\eb4a"}),o.save=new o("save",{fontCharacter:"\\eb4b"}),o.screenFull=new o("screen-full",{fontCharacter:"\\eb4c"}),o.screenNormal=new o("screen-normal",{fontCharacter:"\\eb4d"}),o.searchStop=new o("search-stop",{fontCharacter:"\\eb4e"}),o.server=new o("server",{fontCharacter:"\\eb50"}),o.settingsGear=new o("settings-gear",{fontCharacter:"\\eb51"}),o.settings=new o("settings",{fontCharacter:"\\eb52"}),o.shield=new o("shield",{fontCharacter:"\\eb53"}),o.smiley=new o("smiley",{fontCharacter:"\\eb54"}),o.sortPrecedence=new o("sort-precedence",{fontCharacter:"\\eb55"}),o.splitHorizontal=new o("split-horizontal",{fontCharacter:"\\eb56"}),o.splitVertical=new o("split-vertical",{fontCharacter:"\\eb57"}),o.squirrel=new o("squirrel",{fontCharacter:"\\eb58"}),o.starFull=new o("star-full",{fontCharacter:"\\eb59"}),o.starHalf=new o("star-half",{fontCharacter:"\\eb5a"}),o.symbolClass=new o("symbol-class",{fontCharacter:"\\eb5b"}),o.symbolColor=new o("symbol-color",{fontCharacter:"\\eb5c"}),o.symbolConstant=new o("symbol-constant",{fontCharacter:"\\eb5d"}),o.symbolEnumMember=new o("symbol-enum-member",{fontCharacter:"\\eb5e"}),o.symbolField=new o("symbol-field",{fontCharacter:"\\eb5f"}),o.symbolFile=new o("symbol-file",{fontCharacter:"\\eb60"}),o.symbolInterface=new o("symbol-interface",{fontCharacter:"\\eb61"}),o.symbolKeyword=new o("symbol-keyword",{fontCharacter:"\\eb62"}),o.symbolMisc=new o("symbol-misc",{fontCharacter:"\\eb63"}),o.symbolOperator=new o("symbol-operator",{fontCharacter:"\\eb64"}),o.symbolProperty=new o("symbol-property",{fontCharacter:"\\eb65"}),o.wrench=new o("wrench",{fontCharacter:"\\eb65"}),o.wrenchSubaction=new o("wrench-subaction",{fontCharacter:"\\eb65"}),o.symbolSnippet=new o("symbol-snippet",{fontCharacter:"\\eb66"}),o.tasklist=new o("tasklist",{fontCharacter:"\\eb67"}),o.telescope=new o("telescope",{fontCharacter:"\\eb68"}),o.textSize=new o("text-size",{fontCharacter:"\\eb69"}),o.threeBars=new o("three-bars",{fontCharacter:"\\eb6a"}),o.thumbsdown=new o("thumbsdown",{fontCharacter:"\\eb6b"}),o.thumbsup=new o("thumbsup",{fontCharacter:"\\eb6c"}),o.tools=new o("tools",{fontCharacter:"\\eb6d"}),o.triangleDown=new o("triangle-down",{fontCharacter:"\\eb6e"}),o.triangleLeft=new o("triangle-left",{fontCharacter:"\\eb6f"}),o.triangleRight=new o("triangle-right",{fontCharacter:"\\eb70"}),o.triangleUp=new o("triangle-up",{fontCharacter:"\\eb71"}),o.twitter=new o("twitter",{fontCharacter:"\\eb72"}),o.unfold=new o("unfold",{fontCharacter:"\\eb73"}),o.unlock=new o("unlock",{fontCharacter:"\\eb74"}),o.unmute=new o("unmute",{fontCharacter:"\\eb75"}),o.unverified=new o("unverified",{fontCharacter:"\\eb76"}),o.verified=new o("verified",{fontCharacter:"\\eb77"}),o.versions=new o("versions",{fontCharacter:"\\eb78"}),o.vmActive=new o("vm-active",{fontCharacter:"\\eb79"}),o.vmOutline=new o("vm-outline",{fontCharacter:"\\eb7a"}),o.vmRunning=new o("vm-running",{fontCharacter:"\\eb7b"}),o.watch=new o("watch",{fontCharacter:"\\eb7c"}),o.whitespace=new o("whitespace",{fontCharacter:"\\eb7d"}),o.wholeWord=new o("whole-word",{fontCharacter:"\\eb7e"}),o.window=new o("window",{fontCharacter:"\\eb7f"}),o.wordWrap=new o("word-wrap",{fontCharacter:"\\eb80"}),o.zoomIn=new o("zoom-in",{fontCharacter:"\\eb81"}),o.zoomOut=new o("zoom-out",{fontCharacter:"\\eb82"}),o.listFilter=new o("list-filter",{fontCharacter:"\\eb83"}),o.listFlat=new o("list-flat",{fontCharacter:"\\eb84"}),o.listSelection=new o("list-selection",{fontCharacter:"\\eb85"}),o.selection=new o("selection",{fontCharacter:"\\eb85"}),o.listTree=new o("list-tree",{fontCharacter:"\\eb86"}),o.debugBreakpointFunctionUnverified=new o("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),o.debugBreakpointFunction=new o("debug-breakpoint-function",{fontCharacter:"\\eb88"}),o.debugBreakpointFunctionDisabled=new o("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),o.debugStackframeActive=new o("debug-stackframe-active",{fontCharacter:"\\eb89"}),o.debugStackframeDot=new o("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),o.debugStackframe=new o("debug-stackframe",{fontCharacter:"\\eb8b"}),o.debugStackframeFocused=new o("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),o.debugBreakpointUnsupported=new o("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),o.symbolString=new o("symbol-string",{fontCharacter:"\\eb8d"}),o.debugReverseContinue=new o("debug-reverse-continue",{fontCharacter:"\\eb8e"}),o.debugStepBack=new o("debug-step-back",{fontCharacter:"\\eb8f"}),o.debugRestartFrame=new o("debug-restart-frame",{fontCharacter:"\\eb90"}),o.callIncoming=new o("call-incoming",{fontCharacter:"\\eb92"}),o.callOutgoing=new o("call-outgoing",{fontCharacter:"\\eb93"}),o.menu=new o("menu",{fontCharacter:"\\eb94"}),o.expandAll=new o("expand-all",{fontCharacter:"\\eb95"}),o.feedback=new o("feedback",{fontCharacter:"\\eb96"}),o.groupByRefType=new o("group-by-ref-type",{fontCharacter:"\\eb97"}),o.ungroupByRefType=new o("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),o.account=new o("account",{fontCharacter:"\\eb99"}),o.bellDot=new o("bell-dot",{fontCharacter:"\\eb9a"}),o.debugConsole=new o("debug-console",{fontCharacter:"\\eb9b"}),o.library=new o("library",{fontCharacter:"\\eb9c"}),o.output=new o("output",{fontCharacter:"\\eb9d"}),o.runAll=new o("run-all",{fontCharacter:"\\eb9e"}),o.syncIgnored=new o("sync-ignored",{fontCharacter:"\\eb9f"}),o.pinned=new o("pinned",{fontCharacter:"\\eba0"}),o.githubInverted=new o("github-inverted",{fontCharacter:"\\eba1"}),o.debugAlt=new o("debug-alt",{fontCharacter:"\\eb91"}),o.serverProcess=new o("server-process",{fontCharacter:"\\eba2"}),o.serverEnvironment=new o("server-environment",{fontCharacter:"\\eba3"}),o.pass=new o("pass",{fontCharacter:"\\eba4"}),o.stopCircle=new o("stop-circle",{fontCharacter:"\\eba5"}),o.playCircle=new o("play-circle",{fontCharacter:"\\eba6"}),o.record=new o("record",{fontCharacter:"\\eba7"}),o.debugAltSmall=new o("debug-alt-small",{fontCharacter:"\\eba8"}),o.vmConnect=new o("vm-connect",{fontCharacter:"\\eba9"}),o.cloud=new o("cloud",{fontCharacter:"\\ebaa"}),o.merge=new o("merge",{fontCharacter:"\\ebab"}),o.exportIcon=new o("export",{fontCharacter:"\\ebac"}),o.graphLeft=new o("graph-left",{fontCharacter:"\\ebad"}),o.magnet=new o("magnet",{fontCharacter:"\\ebae"}),o.notebook=new o("notebook",{fontCharacter:"\\ebaf"}),o.redo=new o("redo",{fontCharacter:"\\ebb0"}),o.checkAll=new o("check-all",{fontCharacter:"\\ebb1"}),o.pinnedDirty=new o("pinned-dirty",{fontCharacter:"\\ebb2"}),o.passFilled=new o("pass-filled",{fontCharacter:"\\ebb3"}),o.circleLargeFilled=new o("circle-large-filled",{fontCharacter:"\\ebb4"}),o.circleLargeOutline=new o("circle-large-outline",{fontCharacter:"\\ebb5"}),o.combine=new o("combine",{fontCharacter:"\\ebb6"}),o.gather=new o("gather",{fontCharacter:"\\ebb6"}),o.table=new o("table",{fontCharacter:"\\ebb7"}),o.variableGroup=new o("variable-group",{fontCharacter:"\\ebb8"}),o.typeHierarchy=new o("type-hierarchy",{fontCharacter:"\\ebb9"}),o.typeHierarchySub=new o("type-hierarchy-sub",{fontCharacter:"\\ebba"}),o.typeHierarchySuper=new o("type-hierarchy-super",{fontCharacter:"\\ebbb"}),o.gitPullRequestCreate=new o("git-pull-request-create",{fontCharacter:"\\ebbc"}),o.runAbove=new o("run-above",{fontCharacter:"\\ebbd"}),o.runBelow=new o("run-below",{fontCharacter:"\\ebbe"}),o.notebookTemplate=new o("notebook-template",{fontCharacter:"\\ebbf"}),o.debugRerun=new o("debug-rerun",{fontCharacter:"\\ebc0"}),o.workspaceTrusted=new o("workspace-trusted",{fontCharacter:"\\ebc1"}),o.workspaceUntrusted=new o("workspace-untrusted",{fontCharacter:"\\ebc2"}),o.workspaceUnspecified=new o("workspace-unspecified",{fontCharacter:"\\ebc3"}),o.terminalCmd=new o("terminal-cmd",{fontCharacter:"\\ebc4"}),o.terminalDebian=new o("terminal-debian",{fontCharacter:"\\ebc5"}),o.terminalLinux=new o("terminal-linux",{fontCharacter:"\\ebc6"}),o.terminalPowershell=new o("terminal-powershell",{fontCharacter:"\\ebc7"}),o.terminalTmux=new o("terminal-tmux",{fontCharacter:"\\ebc8"}),o.terminalUbuntu=new o("terminal-ubuntu",{fontCharacter:"\\ebc9"}),o.terminalBash=new o("terminal-bash",{fontCharacter:"\\ebca"}),o.arrowSwap=new o("arrow-swap",{fontCharacter:"\\ebcb"}),o.copy=new o("copy",{fontCharacter:"\\ebcc"}),o.personAdd=new o("person-add",{fontCharacter:"\\ebcd"}),o.filterFilled=new o("filter-filled",{fontCharacter:"\\ebce"}),o.wand=new o("wand",{fontCharacter:"\\ebcf"}),o.debugLineByLine=new o("debug-line-by-line",{fontCharacter:"\\ebd0"}),o.inspect=new o("inspect",{fontCharacter:"\\ebd1"}),o.layers=new o("layers",{fontCharacter:"\\ebd2"}),o.layersDot=new o("layers-dot",{fontCharacter:"\\ebd3"}),o.layersActive=new o("layers-active",{fontCharacter:"\\ebd4"}),o.compass=new o("compass",{fontCharacter:"\\ebd5"}),o.compassDot=new o("compass-dot",{fontCharacter:"\\ebd6"}),o.compassActive=new o("compass-active",{fontCharacter:"\\ebd7"}),o.azure=new o("azure",{fontCharacter:"\\ebd8"}),o.issueDraft=new o("issue-draft",{fontCharacter:"\\ebd9"}),o.gitPullRequestClosed=new o("git-pull-request-closed",{fontCharacter:"\\ebda"}),o.gitPullRequestDraft=new o("git-pull-request-draft",{fontCharacter:"\\ebdb"}),o.debugAll=new o("debug-all",{fontCharacter:"\\ebdc"}),o.debugCoverage=new o("debug-coverage",{fontCharacter:"\\ebdd"}),o.runErrors=new o("run-errors",{fontCharacter:"\\ebde"}),o.folderLibrary=new o("folder-library",{fontCharacter:"\\ebdf"}),o.debugContinueSmall=new o("debug-continue-small",{fontCharacter:"\\ebe0"}),o.beakerStop=new o("beaker-stop",{fontCharacter:"\\ebe1"}),o.graphLine=new o("graph-line",{fontCharacter:"\\ebe2"}),o.graphScatter=new o("graph-scatter",{fontCharacter:"\\ebe3"}),o.pieChart=new o("pie-chart",{fontCharacter:"\\ebe4"}),o.bracket=new o("bracket",o.json.definition),o.bracketDot=new o("bracket-dot",{fontCharacter:"\\ebe5"}),o.bracketError=new o("bracket-error",{fontCharacter:"\\ebe6"}),o.lockSmall=new o("lock-small",{fontCharacter:"\\ebe7"}),o.azureDevops=new o("azure-devops",{fontCharacter:"\\ebe8"}),o.verifiedFilled=new o("verified-filled",{fontCharacter:"\\ebe9"})}(ve||(ve={}))},79881:function($t,st,D){"use strict";D.d(st,{B8:function(){return F},Cp:function(){return Ie},F0:function(){return Ee},L6:function(){return $},VV:function(){return ve},b1:function(){return o},dL:function(){return me},ri:function(){return fe}});class R{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(f){setTimeout(()=>{throw f.stack?new Error(f.message+`
|
|
|
|
|
|
`+f.stack):f},0)}}emit(f){this.listeners.forEach(_=>{_(f)})}onUnexpectedError(f){this.unexpectedErrorHandler(f),this.emit(f)}onUnexpectedExternalError(f){this.unexpectedErrorHandler(f)}}const _e=new R;function me(w){ve(w)||_e.onUnexpectedError(w)}function Ie(w){ve(w)||_e.onUnexpectedExternalError(w)}function fe(w){if(w instanceof Error){let{name:f,message:_}=w;const y=w.stacktrace||w.stack;return{$isError:!0,name:f,message:_,stack:y}}return w}const re="Canceled";function ve(w){return w instanceof Error&&w.name===re&&w.message===re}function Ee(){const w=new Error(re);return w.name=w.message,w}function o(w){return w?new Error(`Illegal argument: ${w}`):new Error("Illegal argument")}function $(w){return w?new Error(`Illegal state: ${w}`):new Error("Illegal state")}class F extends Error{constructor(f){super("NotSupported"),f&&(this.message=f)}}},4348:function($t,st,D){"use strict";D.d(st,{D0:function(){return F},E7:function(){return w},K3:function(){return $},Q5:function(){return o},ZD:function(){return f},ju:function(){return fe}});var R=D(79881),_e=D(69323),me=D(34502),Ie=D(95830),fe;(function(_){_.None=()=>_e.JT.None;function y(Z){return(X,le=null,q)=>{let b=!1,x;return x=Z(G=>{if(!b)return x?x.dispose():b=!0,X.call(le,G)},null,q),b&&x.dispose(),x}}_.once=y;function U(Z,X){return S((le,q=null,b)=>Z(x=>le.call(q,X(x)),null,b))}_.map=U;function K(Z,X){return S((le,q=null,b)=>Z(x=>{X(x),le.call(q,x)},null,b))}_.forEach=K;function O(Z,X){return S((le,q=null,b)=>Z(x=>X(x)&&le.call(q,x),null,b))}_.filter=O;function I(Z){return Z}_.signal=I;function H(...Z){return(X,le=null,q)=>(0,_e.F8)(...Z.map(b=>b(x=>X.call(le,x),null,q)))}_.any=H;function te(Z,X,le){let q=le;return U(Z,b=>(q=X(q,b),q))}_.reduce=te;function S(Z){let X;const le=new o({onFirstListenerAdd(){X=Z(le.fire,le)},onLastListenerRemove(){X.dispose()}});return le.event}function j(Z,X,le=100,q=!1,b){let x,G,ue,ze=0;const Xe=new o({leakWarningThreshold:b,onFirstListenerAdd(){x=Z(Ke=>{ze++,G=X(G,Ke),q&&!ue&&(Xe.fire(G),G=void 0),clearTimeout(ue),ue=setTimeout(()=>{const Ze=G;G=void 0,ue=void 0,(!q||ze>1)&&Xe.fire(Ze),ze=0},le)})},onLastListenerRemove(){x.dispose()}});return Xe.event}_.debounce=j;function ae(Z,X=(le,q)=>le===q){let le=!0,q;return O(Z,b=>{const x=le||!X(b,q);return le=!1,q=b,x})}_.latch=ae;function de(Z,X){return[_.filter(Z,X),_.filter(Z,le=>!X(le))]}_.split=de;function Se(Z,X=!1,le=[]){let q=le.slice(),b=Z(ue=>{q?q.push(ue):G.fire(ue)});const x=()=>{q&&q.forEach(ue=>G.fire(ue)),q=null},G=new o({onFirstListenerAdd(){b||(b=Z(ue=>G.fire(ue)))},onFirstListenerDidAdd(){q&&(X?setTimeout(x):x())},onLastListenerRemove(){b&&b.dispose(),b=null}});return G.event}_.buffer=Se;class we{constructor(X){this.event=X}map(X){return new we(U(this.event,X))}forEach(X){return new we(K(this.event,X))}filter(X){return new we(O(this.event,X))}reduce(X,le){return new we(te(this.event,X,le))}latch(){return new we(ae(this.event))}debounce(X,le=100,q=!1,b){return new we(j(this.event,X,le,q,b))}on(X,le,q){return this.event(X,le,q)}once(X,le,q){return y(this.event)(X,le,q)}}function Me(Z){return new we(Z)}_.chain=Me;function $e(Z,X,le=q=>q){const q=(...ue)=>G.fire(le(...ue)),b=()=>Z.on(X,q),x=()=>Z.removeListener(X,q),G=new o({onFirstListenerAdd:b,onLastListenerRemove:x});return G.event}_.fromNodeEventEmitter=$e;function Y(Z,X,le=q=>q){const q=(...ue)=>G.fire(le(...ue)),b=()=>Z.addEventListener(X,q),x=()=>Z.removeEventListener(X,q),G=new o({onFirstListenerAdd:b,onLastListenerRemove:x});return G.event}_.fromDOMEventEmitter=Y;function B(Z){return new Promise(X=>y(Z)(X))}_.toPromise=B})(fe||(fe={}));class re{constructor(y){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${y}_${re._idPool++}`}start(y){this._stopWatch=new Ie.G(!0),this._listenerCount=y}stop(){if(this._stopWatch){const y=this._stopWatch.elapsed();this._elapsedOverall+=y,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${y.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}re._idPool=0;let ve=-1;class Ee{constructor(y,U=Math.random().toString(18).slice(2,5)){this.customThreshold=y,this.name=U,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(y){let U=ve;if(typeof this.customThreshold=="number"&&(U=this.customThreshold),U<=0||y<U)return;this._stacks||(this._stacks=new Map);const K=new Error().stack.split(`
|
|
|
`).slice(3).join(`
|
|
|
`),O=this._stacks.get(K)||0;if(this._stacks.set(K,O+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=U*.5;let I,H=0;for(const[te,S]of this._stacks)(!I||H<S)&&(I=te,H=S);console.warn(`[${this.name}] potential listener LEAK detected, having ${y} listeners already. MOST frequent listener (${H}):`),console.warn(I)}return()=>{const I=this._stacks.get(K)||0;this._stacks.set(K,I-1)}}}class o{constructor(y){var U;this._disposed=!1,this._options=y,this._leakageMon=ve>0?new Ee(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((U=this._options)===null||U===void 0)&&U._profName?new re(this._options._profName):void 0}get event(){return this._event||(this._event=(y,U,K)=>{var O;this._listeners||(this._listeners=new me.S);const I=this._listeners.isEmpty();I&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const H=this._listeners.push(U?[y,U]:y);I&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,y,U);const te=(O=this._leakageMon)===null||O===void 0?void 0:O.check(this._listeners.size),S=(0,_e.OF)(()=>{te&&te(),this._disposed||(H(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return K instanceof _e.SL?K.add(S):Array.isArray(K)&&K.push(S),S}),this._event}fire(y){var U,K;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new me.S);for(let O of this._listeners)this._deliveryQueue.push([O,y]);for((U=this._perfMon)===null||U===void 0||U.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[O,I]=this._deliveryQueue.shift();try{typeof O=="function"?O.call(void 0,I):O[0].call(O[1],I)}catch(H){(0,R.dL)(H)}}(K=this._perfMon)===null||K===void 0||K.stop()}}dispose(){var y,U,K,O,I;this._disposed||(this._disposed=!0,(y=this._listeners)===null||y===void 0||y.clear(),(U=this._deliveryQueue)===null||U===void 0||U.clear(),(O=(K=this._options)===null||K===void 0?void 0:K.onLastListenerRemove)===null||O===void 0||O.call(K),(I=this._leakageMon)===null||I===void 0||I.dispose())}}class $ extends o{constructor(y){super(y),this._isPaused=0,this._eventQueue=new me.S,this._mergeFn=y==null?void 0:y.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const y=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(y))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(y){this._listeners&&(this._isPaused!==0?this._eventQueue.push(y):super.fire(y))}}class F extends ${constructor(y){var U;super(y),this._delay=(U=y.delay)!==null&&U!==void 0?U:100}fire(y){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(y)}}class w{constructor(){this.buffers=[]}wrapEvent(y){return(U,K,O)=>y(I=>{const H=this.buffers[this.buffers.length-1];H?H.push(()=>U.call(K,I)):U.call(K,I)},void 0,O)}bufferEvents(y){const U=[];this.buffers.push(U);const K=y();return this.buffers.pop(),U.forEach(O=>O()),K}}class f{constructor(){this.listening=!1,this.inputEvent=fe.None,this.inputEventListener=_e.JT.None,this.emitter=new o({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(y){this.inputEvent=y,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=y(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function($t,st,D){"use strict";D.d(st,{I:function(){return R}});function R(_e){const me=this;let Ie=!1,fe;return function(){return Ie||(Ie=!0,fe=_e.apply(me,arguments)),fe}}},88226:function($t,st,D){"use strict";D.d(st,{$:function(){return R}});var R;(function(_e){function me(H){return H&&typeof H=="object"&&typeof H[Symbol.iterator]=="function"}_e.is=me;const Ie=Object.freeze([]);function fe(){return Ie}_e.empty=fe;function*re(H){yield H}_e.single=re;function ve(H){return H||Ie}_e.from=ve;function Ee(H){return!H||H[Symbol.iterator]().next().done===!0}_e.isEmpty=Ee;function o(H){return H[Symbol.iterator]().next().value}_e.first=o;function $(H,te){for(const S of H)if(te(S))return!0;return!1}_e.some=$;function F(H,te){for(const S of H)if(te(S))return S}_e.find=F;function*w(H,te){for(const S of H)te(S)&&(yield S)}_e.filter=w;function*f(H,te){let S=0;for(const j of H)yield te(j,S++)}_e.map=f;function*_(...H){for(const te of H)for(const S of te)yield S}_e.concat=_;function*y(H){for(const te of H)for(const S of te)yield S}_e.concatNested=y;function U(H,te,S){let j=S;for(const ae of H)j=te(j,ae);return j}_e.reduce=U;function*K(H,te,S=H.length){for(te<0&&(te+=H.length),S<0?S+=H.length:S>H.length&&(S=H.length);te<S;te++)yield H[te]}_e.slice=K;function O(H,te=Number.POSITIVE_INFINITY){const S=[];if(te===0)return[S,H];const j=H[Symbol.iterator]();for(let ae=0;ae<te;ae++){const de=j.next();if(de.done)return[S,_e.empty()];S.push(de.value)}return[S,{[Symbol.iterator](){return j}}]}_e.consume=O;function I(H,te,S=(j,ae)=>j===ae){const j=H[Symbol.iterator](),ae=te[Symbol.iterator]();for(;;){const de=j.next(),Se=ae.next();if(de.done!==Se.done)return!1;if(de.done)return!0;if(!S(de.value,Se.value))return!1}}_e.equals=I})(R||(R={}))},69323:function($t,st,D){"use strict";D.d(st,{B9:function(){return f},F8:function(){return _},JT:function(){return K},Jz:function(){return I},OF:function(){return y},SL:function(){return U},Wf:function(){return w},XK:function(){return O},dk:function(){return $}});var R=D(17845),_e=D(88226);const me=!1;let Ie=null;function fe(H){Ie=H}if(me){const H="__is_disposable_tracked__";fe(new class{trackDisposable(te){const S=new Error("Potentially leaked disposable").stack;setTimeout(()=>{te[H]||console.log(S)},3e3)}setParent(te,S){if(te&&te!==K.None)try{te[H]=!0}catch(j){}}markAsDisposed(te){if(te&&te!==K.None)try{te[H]=!0}catch(S){}}markAsSingleton(te){}})}function re(H){return Ie==null||Ie.trackDisposable(H),H}function ve(H){Ie==null||Ie.markAsDisposed(H)}function Ee(H,te){Ie==null||Ie.setParent(H,te)}function o(H,te){if(Ie)for(const S of H)Ie.setParent(S,te)}function $(H){return Ie==null||Ie.markAsSingleton(H),H}class F extends Error{constructor(te){super(`Encountered errors while disposing of store. Errors: [${te.join(", ")}]`),this.errors=te}}function w(H){return typeof H.dispose=="function"&&H.dispose.length===0}function f(H){if(_e.$.is(H)){let te=[];for(const S of H)if(S)try{S.dispose()}catch(j){te.push(j)}if(te.length===1)throw te[0];if(te.length>1)throw new F(te);return Array.isArray(H)?[]:H}else if(H)return H.dispose(),H}function _(...H){const te=y(()=>f(H));return o(H,te),te}function y(H){const te=re({dispose:(0,R.I)(()=>{ve(te),H()})});return te}class U{constructor(){this._toDispose=new Set,this._isDisposed=!1,re(this)}dispose(){this._isDisposed||(ve(this),this._isDisposed=!0,this.clear())}clear(){try{f(this._toDispose.values())}finally{this._toDispose.clear()}}add(te){if(!te)return te;if(te===this)throw new Error("Cannot register a disposable on itself!");return Ee(te,this),this._isDisposed?U.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(te),te}}U.DISABLE_DISPOSED_WARNING=!1;class K{constructor(){this._store=new U,re(this),Ee(this._store,this)}dispose(){ve(this),this._store.dispose()}_register(te){if(te===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(te)}}K.None=Object.freeze({dispose(){}});class O{constructor(){this._isDisposed=!1,re(this)}get value(){return this._isDisposed?void 0:this._value}set value(te){var S;this._isDisposed||te===this._value||((S=this._value)===null||S===void 0||S.dispose(),te&&Ee(te,this),this._value=te)}clear(){this.value=void 0}dispose(){var te;this._isDisposed=!0,ve(this),(te=this._value)===null||te===void 0||te.dispose(),this._value=void 0}clearAndLeak(){const te=this._value;return this._value=void 0,te&&Ee(te,null),te}}class I{constructor(te){this.object=te}dispose(){}}},34502:function($t,st,D){"use strict";D.d(st,{S:function(){return _e}});class R{constructor(Ie){this.element=Ie,this.next=R.Undefined,this.prev=R.Undefined}}R.Undefined=new R(void 0);class _e{constructor(){this._first=R.Undefined,this._last=R.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===R.Undefined}clear(){let Ie=this._first;for(;Ie!==R.Undefined;){const fe=Ie.next;Ie.prev=R.Undefined,Ie.next=R.Undefined,Ie=fe}this._first=R.Undefined,this._last=R.Undefined,this._size=0}unshift(Ie){return this._insert(Ie,!1)}push(Ie){return this._insert(Ie,!0)}_insert(Ie,fe){const re=new R(Ie);if(this._first===R.Undefined)this._first=re,this._last=re;else if(fe){const Ee=this._last;this._last=re,re.prev=Ee,Ee.next=re}else{const Ee=this._first;this._first=re,re.next=Ee,Ee.prev=re}this._size+=1;let ve=!1;return()=>{ve||(ve=!0,this._remove(re))}}shift(){if(this._first!==R.Undefined){const Ie=this._first.element;return this._remove(this._first),Ie}}pop(){if(this._last!==R.Undefined){const Ie=this._last.element;return this._remove(this._last),Ie}}_remove(Ie){if(Ie.prev!==R.Undefined&&Ie.next!==R.Undefined){const fe=Ie.prev;fe.next=Ie.next,Ie.next.prev=fe}else Ie.prev===R.Undefined&&Ie.next===R.Undefined?(this._first=R.Undefined,this._last=R.Undefined):Ie.next===R.Undefined?(this._last=this._last.prev,this._last.next=R.Undefined):Ie.prev===R.Undefined&&(this._first=this._first.next,this._first.prev=R.Undefined);this._size-=1}*[Symbol.iterator](){let Ie=this._first;for(;Ie!==R.Undefined;)yield Ie.element,Ie=Ie.next}}},23345:function($t,st,D){"use strict";D.d(st,{$L:function(){return j},ED:function(){return I},IJ:function(){return te},OS:function(){return we},WE:function(){return de},dz:function(){return H},gn:function(){return ae},li:function(){return y},r:function(){return Y},tY:function(){return S},xS:function(){return Se}});var R=D(97671),_e;const me="en";let Ie=!1,fe=!1,re=!1,ve=!1,Ee=!1,o=!1,$=!1,F,w=null,f=null,_;const y=typeof self=="object"?self:typeof D.g=="object"?D.g:{};let U;typeof y.vscode!="undefined"&&typeof y.vscode.process!="undefined"?U=y.vscode.process:typeof R!="undefined"&&(U=R);const K=typeof((_e=U==null?void 0:U.versions)===null||_e===void 0?void 0:_e.electron)=="string"&&U.type==="renderer";if(typeof navigator=="object"&&!K)_=navigator.userAgent,Ie=_.indexOf("Windows")>=0,fe=_.indexOf("Macintosh")>=0,$=(_.indexOf("Macintosh")>=0||_.indexOf("iPad")>=0||_.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,re=_.indexOf("Linux")>=0,o=!0,F=navigator.language,w=F;else if(typeof U=="object"){Ie=U.platform==="win32",fe=U.platform==="darwin",re=U.platform==="linux",ve=re&&!!U.env.SNAP&&!!U.env.SNAP_REVISION,F=me,w=me;const B=U.env.VSCODE_NLS_CONFIG;if(B)try{const Z=JSON.parse(B),X=Z.availableLanguages["*"];F=Z.locale,w=X||me,f=Z._translationsConfigFile}catch(Z){}Ee=!0}else console.error("Unable to resolve platform.");let O=0;fe?O=1:Ie?O=3:re&&(O=2);const I=Ie,H=fe,te=re,S=Ee,j=o,ae=$,de=_,Se=function(){if(y.setImmediate)return y.setImmediate.bind(y);if(typeof y.postMessage=="function"&&!y.importScripts){let X=[];y.addEventListener("message",q=>{if(q.data&&q.data.vscodeSetImmediateId)for(let b=0,x=X.length;b<x;b++){const G=X[b];if(G.id===q.data.vscodeSetImmediateId){X.splice(b,1),G.callback();return}}});let le=0;return q=>{const b=++le;X.push({id:b,callback:q}),y.postMessage({vscodeSetImmediateId:b},"*")}}if(typeof(U==null?void 0:U.nextTick)=="function")return U.nextTick.bind(U);const Z=Promise.resolve();return X=>Z.then(X)}(),we=fe||$?2:Ie?1:3;let Me=!0,$e=!1;function Y(){if(!$e){$e=!0;const B=new Uint8Array(2);B[0]=1,B[1]=2,Me=new Uint16Array(B.buffer)[0]===513}return Me}},95830:function($t,st,D){"use strict";D.d(st,{G:function(){return me}});var R=D(23345);const _e=R.li.performance&&typeof R.li.performance.now=="function";class me{constructor(fe){this._highResolution=_e&&fe,this._startTime=this._now(),this._stopTime=-1}static create(fe=!0){return new me(fe)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?R.li.performance.now():Date.now()}}},82983:function($t,st,D){"use strict";D.d(st,{$i:function(){return ze},C8:function(){return ct},GF:function(){return F},HO:function(){return le},IO:function(){return w},K7:function(){return pt},Kw:function(){return Zt},LC:function(){return y},Mh:function(){return Se},P1:function(){return we},PJ:function(){return qt},Qe:function(){return Xe},R1:function(){return $},RP:function(){return G},S6:function(){return Ut},TT:function(){return I},Ut:function(){return b},V8:function(){return U},WU:function(){return me},YK:function(){return $e},YU:function(){return Ie},ZG:function(){return Me},ZH:function(){return B},ab:function(){return Ke},c1:function(){return ht},df:function(){return j},ec:function(){return fe},fi:function(){return zt},fy:function(){return re},j3:function(){return ve},j_:function(){return te},m5:function(){return R},mK:function(){return S},mr:function(){return f},oH:function(){return qe},oL:function(){return Ee},ok:function(){return de},ow:function(){return K},qq:function(){return ae},qu:function(){return O},rL:function(){return Y},uS:function(){return jt},un:function(){return o},uq:function(){return _},vH:function(){return X},xe:function(){return Ze},zY:function(){return H}});function R(N){return!N||typeof N!="string"?!0:N.trim().length===0}const _e=/{(\d+)}/g;function me(N,...ee){return ee.length===0?N:N.replace(_e,function(ye,be){const Le=parseInt(be,10);return isNaN(Le)||Le<0||Le>=ee.length?ye:ee[Le]})}function Ie(N){return N.replace(/[<>&]/g,function(ee){switch(ee){case"<":return"<";case">":return">";case"&":return"&";default:return ee}})}function fe(N){return N.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function re(N,ee=" "){const ye=ve(N,ee);return Ee(ye,ee)}function ve(N,ee){if(!N||!ee)return N;const ye=ee.length;if(ye===0||N.length===0)return N;let be=0;for(;N.indexOf(ee,be)===be;)be=be+ye;return N.substring(be)}function Ee(N,ee){if(!N||!ee)return N;const ye=ee.length,be=N.length;if(ye===0||be===0)return N;let Le=be,Be=-1;for(;Be=N.lastIndexOf(ee,Le-1),!(Be===-1||Be+ye!==Le);){if(Be===0)return"";Le=Be}return N.substring(0,Le)}function o(N){return N.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function $(N){return N.replace(/\*/g,"")}function F(N,ee,ye={}){if(!N)throw new Error("Cannot create regex from empty string");ee||(N=fe(N)),ye.wholeWord&&(/\B/.test(N.charAt(0))||(N="\\b"+N),/\B/.test(N.charAt(N.length-1))||(N=N+"\\b"));let be="";return ye.global&&(be+="g"),ye.matchCase||(be+="i"),ye.multiline&&(be+="m"),ye.unicode&&(be+="u"),new RegExp(N,be)}function w(N){return N.source==="^"||N.source==="^$"||N.source==="$"||N.source==="^\\s*$"?!1:!!(N.exec("")&&N.lastIndex===0)}function f(N){return(N.global?"g":"")+(N.ignoreCase?"i":"")+(N.multiline?"m":"")+(N.unicode?"u":"")}function _(N){return N.split(/\r\n|\r|\n/)}function y(N){for(let ee=0,ye=N.length;ee<ye;ee++){const be=N.charCodeAt(ee);if(be!==32&&be!==9)return ee}return-1}function U(N,ee=0,ye=N.length){for(let be=ee;be<ye;be++){const Le=N.charCodeAt(be);if(Le!==32&&Le!==9)return N.substring(ee,be)}return N.substring(ee,ye)}function K(N,ee=N.length-1){for(let ye=ee;ye>=0;ye--){const be=N.charCodeAt(ye);if(be!==32&&be!==9)return ye}return-1}function O(N,ee){return N<ee?-1:N>ee?1:0}function I(N,ee,ye=0,be=N.length,Le=0,Be=ee.length){for(;ye<be&&Le<Be;ye++,Le++){let Qe=N.charCodeAt(ye),je=ee.charCodeAt(Le);if(Qe<je)return-1;if(Qe>je)return 1}const Ve=be-ye,nt=Be-Le;return Ve<nt?-1:Ve>nt?1:0}function H(N,ee){return te(N,ee,0,N.length,0,ee.length)}function te(N,ee,ye=0,be=N.length,Le=0,Be=ee.length){for(;ye<be&&Le<Be;ye++,Le++){let Qe=N.charCodeAt(ye),je=ee.charCodeAt(Le);if(Qe===je)continue;if(Qe>=128||je>=128)return I(N.toLowerCase(),ee.toLowerCase(),ye,be,Le,Be);S(Qe)&&(Qe-=32),S(je)&&(je-=32);const bt=Qe-je;if(bt!==0)return bt}const Ve=be-ye,nt=Be-Le;return Ve<nt?-1:Ve>nt?1:0}function S(N){return N>=97&&N<=122}function j(N){return N>=65&&N<=90}function ae(N,ee){return N.length===ee.length&&te(N,ee)===0}function de(N,ee){const ye=ee.length;return ee.length>N.length?!1:te(N,ee,0,ye)===0}function Se(N,ee){let ye,be=Math.min(N.length,ee.length);for(ye=0;ye<be;ye++)if(N.charCodeAt(ye)!==ee.charCodeAt(ye))return ye;return be}function we(N,ee){let ye,be=Math.min(N.length,ee.length);const Le=N.length-1,Be=ee.length-1;for(ye=0;ye<be;ye++)if(N.charCodeAt(Le-ye)!==ee.charCodeAt(Be-ye))return ye;return be}function Me(N){return 55296<=N&&N<=56319}function $e(N){return 56320<=N&&N<=57343}function Y(N,ee){return(N-55296<<10)+(ee-56320)+65536}function B(N,ee,ye){const be=N.charCodeAt(ye);if(Me(be)&&ye+1<ee){const Le=N.charCodeAt(ye+1);if($e(Le))return Y(be,Le)}return be}function Z(N,ee){const ye=N.charCodeAt(ee-1);if($e(ye)&&ee>1){const be=N.charCodeAt(ee-2);if(Me(be))return Y(be,ye)}return ye}function X(N,ee){const ye=Bt.getInstance(),be=ee,Le=N.length,Be=B(N,Le,ee);ee+=Be>=65536?2:1;let Ve=ye.getGraphemeBreakType(Be);for(;ee<Le;){const nt=B(N,Le,ee),Qe=ye.getGraphemeBreakType(nt);if(zt(Ve,Qe))break;ee+=nt>=65536?2:1,Ve=Qe}return ee-be}function le(N,ee){const ye=Bt.getInstance(),be=ee,Le=Z(N,ee);ee-=Le>=65536?2:1;let Be=ye.getGraphemeBreakType(Le);for(;ee>0;){const Ve=Z(N,ee),nt=ye.getGraphemeBreakType(Ve);if(zt(nt,Be))break;ee-=Ve>=65536?2:1,Be=nt}return be-ee}const q=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function b(N){return q.test(N)}const x=/(?:[\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 G(N){return x.test(N)}const ue=/^[\t\n\r\x20-\x7E]*$/;function ze(N){return ue.test(N)}const Xe=/[\u2028\u2029]/;function Ke(N){return Xe.test(N)}function Ze(N){for(let ee=0,ye=N.length;ee<ye;ee++)if(pt(N.charCodeAt(ee)))return!0;return!1}function pt(N){return N=+N,N>=11904&&N<=55215||N>=63744&&N<=64255||N>=65281&&N<=65374}function ct(N){return N>=127462&&N<=127487||N===8986||N===8987||N===9200||N===9203||N>=9728&&N<=10175||N===11088||N===11093||N>=127744&&N<=128591||N>=128640&&N<=128764||N>=128992&&N<=129003||N>=129280&&N<=129535||N>=129648&&N<=129750}const ht="\uFEFF";function jt(N){return!!(N&&N.length>0&&N.charCodeAt(0)===65279)}function Zt(N,ee=!1){return N?(ee&&(N=N.replace(/\\./g,"")),N.toLowerCase()!==N):!1}function qt(N){return N=N%(2*26),N<26?String.fromCharCode(97+N):String.fromCharCode(65+N-26)}function Ut(N){return Bt.getInstance().getGraphemeBreakType(N)}function zt(N,ee){return N===0?ee!==5&&ee!==7:N===2&&ee===3?!1:N===4||N===2||N===3||ee===4||ee===2||ee===3?!0:!(N===8&&(ee===8||ee===9||ee===11||ee===12)||(N===11||N===9)&&(ee===9||ee===10)||(N===12||N===10)&&ee===10||ee===5||ee===13||ee===7||N===1||N===13&&ee===14||N===6&&ee===6)}class Bt{constructor(){this._data=Oe()}static getInstance(){return Bt._INSTANCE||(Bt._INSTANCE=new Bt),Bt._INSTANCE}getGraphemeBreakType(ee){if(ee<32)return ee===10?3:ee===13?2:4;if(ee<127)return 0;const ye=this._data,be=ye.length/3;let Le=1;for(;Le<=be;)if(ee<ye[3*Le])Le=2*Le;else if(ee>ye[3*Le+1])Le=2*Le+1;else return ye[3*Le+2];return 0}}Bt._INSTANCE=null;function Oe(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function qe(N,ee){if(N===0)return 0;const ye=se(N,ee);if(ye!==void 0)return ye;const be=Z(ee,N);return N-=Ne(be),N}function se(N,ee){let ye=Z(ee,N);for(N-=Ne(ye);He(ye)||ye===65039||ye===8419;){if(N===0)return;ye=Z(ee,N),N-=Ne(ye)}if(ct(ye)){if(N>=0){const be=Z(ee,N);be===8205&&(N-=Ne(be))}return N}}function Ne(N){return N>=65536?2:1}function He(N){return 127995<=N&&N<=127999}},72999:function($t,st,D){"use strict";D.d(st,{$E:function(){return y},$K:function(){return ve},D8:function(){return w},HD:function(){return _e},IU:function(){return U},Jp:function(){return Ee},Kn:function(){return me},cW:function(){return $},f6:function(){return K},hj:function(){return Ie},jn:function(){return fe},kJ:function(){return R},mf:function(){return F},o8:function(){return re},p_:function(){return o},vE:function(){return O}});function R(I){return Array.isArray(I)}function _e(I){return typeof I=="string"}function me(I){return typeof I=="object"&&I!==null&&!Array.isArray(I)&&!(I instanceof RegExp)&&!(I instanceof Date)}function Ie(I){return typeof I=="number"&&!isNaN(I)}function fe(I){return I===!0||I===!1}function re(I){return typeof I=="undefined"}function ve(I){return!Ee(I)}function Ee(I){return re(I)||I===null}function o(I,H){if(!I)throw new Error(H?`Unexpected type, expected '${H}'`:"Unexpected type")}function $(I){if(Ee(I))throw new Error("Assertion Failed: argument is undefined or null");return I}function F(I){return typeof I=="function"}function w(I,H){const te=Math.min(I.length,H.length);for(let S=0;S<te;S++)f(I[S],H[S])}function f(I,H){if(_e(H)){if(typeof I!==H)throw new Error(`argument does not match constraint: typeof ${H}`)}else if(F(H)){try{if(I instanceof H)return}catch(te){}if(!Ee(I)&&I.constructor===H||H.length===1&&H.call(void 0,I)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function _(I){let H=[],te=Object.getPrototypeOf(I);for(;Object.prototype!==te;)H=H.concat(Object.getOwnPropertyNames(te)),te=Object.getPrototypeOf(te);return H}function y(I){const H=[];for(const te of _(I))typeof I[te]=="function"&&H.push(te);return H}function U(I,H){const te=j=>function(){const ae=Array.prototype.slice.call(arguments,0);return H(j,ae)};let S={};for(const j of I)S[j]=te(j);return S}function K(I){return I===null?void 0:I}function O(I,H="Unreachable"){throw new Error(H)}},13268:function($t,st,D){"use strict";D.d(st,{N:function(){return _e}});function R(me,Ie){let fe;return Ie.length===0?fe=me:fe=me.replace(/\{(\d+)\}/g,function(re,ve){const Ee=ve[0];return typeof Ie[Ee]!="undefined"?Ie[Ee]:re}),fe}function _e(me,Ie,...fe){return R(Ie,fe)}},96236:function($t,st,D){"use strict";D.d(st,{BH:function(){return U},NZ:function(){return K},U8:function(){return O},co:function(){return y},eH:function(){return _},vr:function(){return f}});var R=D(75918),_e=D(52615),me=D(4348),Ie=D(88226),fe=D(69323),re=D(34502),ve=D(35884),Ee=D(90689),o=D(16925),$=D(49055),F=function(I,H,te,S){var j=arguments.length,ae=j<3?H:S===null?S=Object.getOwnPropertyDescriptor(H,te):S,de;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(I,H,te,S);else for(var Se=I.length-1;Se>=0;Se--)(de=I[Se])&&(ae=(j<3?de(ae):j>3?de(H,te,ae):de(H,te))||ae);return j>3&&ae&&Object.defineProperty(H,te,ae),ae},w=function(I,H){return function(te,S){H(te,S,I)}};function f(I){return I.command!==void 0}class _{constructor(H){this.id=_._idPool++,this._debugName=H}}_._idPool=0,_.CommandPalette=new _("CommandPalette"),_.EditorContext=new _("EditorContext"),_.SimpleEditorContext=new _("SimpleEditorContext"),_.EditorContextCopy=new _("EditorContextCopy"),_.EditorContextPeek=new _("EditorContextPeek"),_.MenubarEditMenu=new _("MenubarEditMenu"),_.MenubarCopy=new _("MenubarCopy"),_.MenubarGoMenu=new _("MenubarGoMenu"),_.MenubarSelectionMenu=new _("MenubarSelectionMenu"),_.InlineCompletionsActions=new _("InlineCompletionsActions");const y=(0,o.yh)("menuService"),U=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new me.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:I=>I===_.CommandPalette}}addCommand(I){return this.addCommands(Ie.$.single(I))}addCommands(I){for(const H of I)this._commands.set(H.id,H);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,fe.OF)(()=>{let H=!1;for(const te of I)H=this._commands.delete(te.id)||H;H&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(I){return this._commands.get(I)}getCommands(){const I=new Map;return this._commands.forEach((H,te)=>I.set(te,H)),I}appendMenuItem(I,H){return this.appendMenuItems(Ie.$.single({id:I,item:H}))}appendMenuItems(I){const H=new Set,te=new re.S;for(const{id:S,item:j}of I){let ae=this._menuItems.get(S);ae||(ae=new re.S,this._menuItems.set(S,ae)),te.push(ae.push(j)),H.add(S)}return this._onDidChangeMenu.fire(H),(0,fe.OF)(()=>{if(te.size>0){for(let S of te)S();this._onDidChangeMenu.fire(H),te.clear()}})}getMenuItems(I){let H;return this._menuItems.has(I)?H=[...this._menuItems.get(I)]:H=[],I===_.CommandPalette&&this._appendImplicitItems(H),H}_appendImplicitItems(I){const H=new Set;for(const te of I)f(te)&&(H.add(te.command.id),te.alt&&H.add(te.alt.id));this._commands.forEach((te,S)=>{H.has(S)||I.push({command:te})})}};class K extends R.wY{constructor(H,te,S,j){super(`submenuitem.${H.submenu.id}`,typeof H.title=="string"?H.title:H.title.value,[],"submenu"),this.item=H,this._menuService=te,this._contextKeyService=S,this._options=j}get actions(){const H=[],te=this._menuService.createMenu(this.item.submenu,this._contextKeyService),S=te.getActions(this._options);te.dispose();for(const[,j]of S)j.length>0&&(H.push(...j),H.push(new R.Z0));return H.length&&H.pop(),H}}let O=class Xo{constructor(H,te,S,j,ae){var de,Se;if(this._commandService=ae,this.id=H.id,this.label=S!=null&&S.renderShortTitle&&H.shortTitle?typeof H.shortTitle=="string"?H.shortTitle:H.shortTitle.value:typeof H.title=="string"?H.title:H.title.value,this.tooltip=(Se=typeof H.tooltip=="string"?H.tooltip:(de=H.tooltip)===null||de===void 0?void 0:de.value)!==null&&Se!==void 0?Se:"",this.enabled=!H.precondition||j.contextMatchesRules(H.precondition),this.checked=void 0,H.toggled){const we=H.toggled.condition?H.toggled:{condition:H.toggled};this.checked=j.contextMatchesRules(we.condition),this.checked&&we.tooltip&&(this.tooltip=typeof we.tooltip=="string"?we.tooltip:we.tooltip.value),we.title&&(this.label=typeof we.title=="string"?we.title:we.title.value)}this.item=H,this.alt=te?new Xo(te,void 0,S,j,ae):void 0,this._options=S,$.kS.isThemeIcon(H.icon)&&(this.class=_e.dT.asClassName(H.icon))}dispose(){}run(...H){var te,S;let j=[];return!((te=this._options)===null||te===void 0)&&te.arg&&(j=[...j,this._options.arg]),!((S=this._options)===null||S===void 0)&&S.shouldForwardArgs&&(j=[...j,...H]),this._commandService.executeCommand(this.id,...j)}};O=F([w(3,Ee.i6),w(4,ve.H)],O)},35884:function($t,st,D){"use strict";D.d(st,{H:function(){return ve},P:function(){return Ee}});var R=D(4348),_e=D(88226),me=D(69323),Ie=D(34502),fe=D(72999),re=D(16925);const ve=(0,re.yh)("commandService"),Ee=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new R.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,$){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!$)throw new Error("invalid command");return this.registerCommand({id:o,handler:$})}if(o.description){const y=[];for(let K of o.description.args)y.push(K.constraint);const U=o.handler;o.handler=function(K,...O){return(0,fe.D8)(O,y),U(K,...O)}}const{id:F}=o;let w=this._commands.get(F);w||(w=new Ie.S,this._commands.set(F,w));let f=w.unshift(o),_=(0,me.OF)(()=>{f();const y=this._commands.get(F);y!=null&&y.isEmpty()&&this._commands.delete(F)});return this._onDidRegisterCommand.fire(F),_}registerCommandAlias(o,$){return Ee.registerCommand(o,(F,...w)=>F.get(ve).executeCommand($,...w))}getCommand(o){const $=this._commands.get(o);if(!(!$||$.isEmpty()))return _e.$.first($)}getCommands(){const o=new Map;for(const $ of this._commands.keys()){const F=this.getCommand($);F&&o.set($,F)}return o}};Ee.registerCommand("noop",()=>{})},90689:function($t,st,D){"use strict";D.d(st,{Ao:function(){return ve},Eq:function(){return Y},Fb:function(){return Ee},K8:function(){return X},i6:function(){return $e},uy:function(){return Me}});var R=D(23345),_e=D(82983),me=D(16925);let Ie=R.WE||"";const fe=new Map;fe.set("false",!1),fe.set("true",!0),fe.set("isMac",R.dz),fe.set("isLinux",R.IJ),fe.set("isWindows",R.ED),fe.set("isWeb",R.$L),fe.set("isMacNative",R.dz&&!R.$L),fe.set("isEdge",Ie.indexOf("Edg/")>=0),fe.set("isFirefox",Ie.indexOf("Firefox")>=0),fe.set("isChrome",Ie.indexOf("Chrome")>=0),fe.set("isSafari",Ie.indexOf("Safari")>=0);const re=Object.prototype.hasOwnProperty;class ve{static has(b){return w.create(b)}static equals(b,x){return f.create(b,x)}static regex(b,x){return j.create(b,x)}static not(b){return K.create(b)}static and(...b){return Se.create(b,null)}static or(...b){return we.create(b,null,!0)}static deserialize(b,x=!1){if(b)return this._deserializeOrExpression(b,x)}static _deserializeOrExpression(b,x){let G=b.split("||");return we.create(G.map(ue=>this._deserializeAndExpression(ue,x)),null,!0)}static _deserializeAndExpression(b,x){let G=b.split("&&");return Se.create(G.map(ue=>this._deserializeOne(ue,x)),null)}static _deserializeOne(b,x){if(b=b.trim(),b.indexOf("!=")>=0){let G=b.split("!=");return U.create(G[0].trim(),this._deserializeValue(G[1],x))}if(b.indexOf("==")>=0){let G=b.split("==");return f.create(G[0].trim(),this._deserializeValue(G[1],x))}if(b.indexOf("=~")>=0){let G=b.split("=~");return j.create(G[0].trim(),this._deserializeRegexValue(G[1],x))}if(b.indexOf(" in ")>=0){let G=b.split(" in ");return _.create(G[0].trim(),G[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(b)){const G=b.split(">=");return H.create(G[0].trim(),G[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(b)){const G=b.split(">");return I.create(G[0].trim(),G[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(b)){const G=b.split("<=");return S.create(G[0].trim(),G[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(b)){const G=b.split("<");return te.create(G[0].trim(),G[1].trim())}return/^\!\s*/.test(b)?K.create(b.substr(1).trim()):w.create(b)}static _deserializeValue(b,x){if(b=b.trim(),b==="true")return!0;if(b==="false")return!1;let G=/^'([^']*)'$/.exec(b);return G?G[1].trim():b}static _deserializeRegexValue(b,x){if((0,_e.m5)(b)){if(x)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let G=b.indexOf("/"),ue=b.lastIndexOf("/");if(G===ue||G<0){if(x)throw new Error(`bad regexp-value '${b}', missing /-enclosure`);return console.warn(`bad regexp-value '${b}', missing /-enclosure`),null}let ze=b.slice(G+1,ue),Xe=b[ue+1]==="i"?"i":"";try{return new RegExp(ze,Xe)}catch(Ke){if(x)throw new Error(`bad regexp-value '${b}', parse error: ${Ke}`);return console.warn(`bad regexp-value '${b}', parse error: ${Ke}`),null}}}function Ee(q,b){const x=q?q.substituteConstants():void 0,G=b?b.substituteConstants():void 0;return!x&&!G?!0:!x||!G?!1:x.equals(G)}function o(q,b){return q.cmp(b)}class ${constructor(){this.type=0}cmp(b){return this.type-b.type}equals(b){return b.type===this.type}substituteConstants(){return this}evaluate(b){return!1}serialize(){return"false"}keys(){return[]}negate(){return F.INSTANCE}}$.INSTANCE=new $;class F{constructor(){this.type=1}cmp(b){return this.type-b.type}equals(b){return b.type===this.type}substituteConstants(){return this}evaluate(b){return!0}serialize(){return"true"}keys(){return[]}negate(){return $.INSTANCE}}F.INSTANCE=new F;class w{constructor(b,x){this.key=b,this.negated=x,this.type=2}static create(b,x=null){const G=fe.get(b);return typeof G=="boolean"?G?F.INSTANCE:$.INSTANCE:new w(b,x)}cmp(b){return b.type!==this.type?this.type-b.type:B(this.key,b.key)}equals(b){return b.type===this.type?this.key===b.key:!1}substituteConstants(){const b=fe.get(this.key);return typeof b=="boolean"?b?F.INSTANCE:$.INSTANCE:this}evaluate(b){return!!b.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=K.create(this.key,this)),this.negated}}class f{constructor(b,x,G){this.key=b,this.value=x,this.negated=G,this.type=4}static create(b,x,G=null){if(typeof x=="boolean")return x?w.create(b,G):K.create(b,G);const ue=fe.get(b);return typeof ue=="boolean"?x===(ue?"true":"false")?F.INSTANCE:$.INSTANCE:new f(b,x,G)}cmp(b){return b.type!==this.type?this.type-b.type:Z(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){const b=fe.get(this.key);if(typeof b=="boolean"){const x=b?"true":"false";return this.value===x?F.INSTANCE:$.INSTANCE}return this}evaluate(b){return b.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=U.create(this.key,this.value,this)),this.negated}}class _{constructor(b,x){this.key=b,this.valueKey=x,this.type=10,this.negated=null}static create(b,x){return new _(b,x)}cmp(b){return b.type!==this.type?this.type-b.type:Z(this.key,this.valueKey,b.key,b.valueKey)}equals(b){return b.type===this.type?this.key===b.key&&this.valueKey===b.valueKey:!1}substituteConstants(){return this}evaluate(b){const x=b.getValue(this.valueKey),G=b.getValue(this.key);return Array.isArray(x)?x.indexOf(G)>=0:typeof G=="string"&&typeof x=="object"&&x!==null?re.call(x,G):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=y.create(this)),this.negated}}class y{constructor(b){this._actual=b,this.type=11}static create(b){return new y(b)}cmp(b){return b.type!==this.type?this.type-b.type:this._actual.cmp(b._actual)}equals(b){return b.type===this.type?this._actual.equals(b._actual):!1}substituteConstants(){return this}evaluate(b){return!this._actual.evaluate(b)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class U{constructor(b,x,G){this.key=b,this.value=x,this.negated=G,this.type=5}static create(b,x,G=null){if(typeof x=="boolean")return x?K.create(b,G):w.create(b,G);const ue=fe.get(b);return typeof ue=="boolean"?x===(ue?"true":"false")?$.INSTANCE:F.INSTANCE:new U(b,x,G)}cmp(b){return b.type!==this.type?this.type-b.type:Z(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){const b=fe.get(this.key);if(typeof b=="boolean"){const x=b?"true":"false";return this.value===x?$.INSTANCE:F.INSTANCE}return this}evaluate(b){return b.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class K{constructor(b,x){this.key=b,this.negated=x,this.type=3}static create(b,x=null){const G=fe.get(b);return typeof G=="boolean"?G?$.INSTANCE:F.INSTANCE:new K(b,x)}cmp(b){return b.type!==this.type?this.type-b.type:B(this.key,b.key)}equals(b){return b.type===this.type?this.key===b.key:!1}substituteConstants(){const b=fe.get(this.key);return typeof b=="boolean"?b?$.INSTANCE:F.INSTANCE:this}evaluate(b){return!b.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=w.create(this.key,this)),this.negated}}function O(q,b){if(typeof q=="string"){const x=parseFloat(q);isNaN(x)||(q=x)}return typeof q=="string"||typeof q=="number"?b(q):$.INSTANCE}class I{constructor(b,x,G){this.key=b,this.value=x,this.negated=G,this.type=12}static create(b,x,G=null){return O(x,ue=>new I(b,ue,G))}cmp(b){return b.type!==this.type?this.type-b.type:Z(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this.key,this.value,this)),this.negated}}class H{constructor(b,x,G){this.key=b,this.value=x,this.negated=G,this.type=13}static create(b,x,G=null){return O(x,ue=>new H(b,ue,G))}cmp(b){return b.type!==this.type?this.type-b.type:Z(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=te.create(this.key,this.value,this)),this.negated}}class te{constructor(b,x,G){this.key=b,this.value=x,this.negated=G,this.type=14}static create(b,x,G=null){return O(x,ue=>new te(b,ue,G))}cmp(b){return b.type!==this.type?this.type-b.type:Z(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=H.create(this.key,this.value,this)),this.negated}}class S{constructor(b,x,G){this.key=b,this.value=x,this.negated=G,this.type=15}static create(b,x,G=null){return O(x,ue=>new S(b,ue,G))}cmp(b){return b.type!==this.type?this.type-b.type:Z(this.key,this.value,b.key,b.value)}equals(b){return b.type===this.type?this.key===b.key&&this.value===b.value:!1}substituteConstants(){return this}evaluate(b){return typeof this.value=="string"?!1:parseFloat(b.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this.value,this)),this.negated}}class j{constructor(b,x){this.key=b,this.regexp=x,this.type=7,this.negated=null}static create(b,x){return new j(b,x)}cmp(b){if(b.type!==this.type)return this.type-b.type;if(this.key<b.key)return-1;if(this.key>b.key)return 1;const x=this.regexp?this.regexp.source:"",G=b.regexp?b.regexp.source:"";return x<G?-1:x>G?1:0}equals(b){if(b.type===this.type){const x=this.regexp?this.regexp.source:"",G=b.regexp?b.regexp.source:"";return this.key===b.key&&x===G}return!1}substituteConstants(){return this}evaluate(b){let x=b.getValue(this.key);return this.regexp?this.regexp.test(x):!1}serialize(){const b=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${b}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ae.create(this)),this.negated}}class ae{constructor(b){this._actual=b,this.type=8}static create(b){return new ae(b)}cmp(b){return b.type!==this.type?this.type-b.type:this._actual.cmp(b._actual)}equals(b){return b.type===this.type?this._actual.equals(b._actual):!1}substituteConstants(){return this}evaluate(b){return!this._actual.evaluate(b)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function de(q){let b=null;for(let x=0,G=q.length;x<G;x++){const ue=q[x].substituteConstants();if(q[x]!==ue&&b===null){b=[];for(let ze=0;ze<x;ze++)b[ze]=q[ze]}b!==null&&(b[x]=ue)}return b===null?q:b}class Se{constructor(b,x){this.expr=b,this.negated=x,this.type=6}static create(b,x){return Se._normalizeArr(b,x)}cmp(b){if(b.type!==this.type)return this.type-b.type;if(this.expr.length<b.expr.length)return-1;if(this.expr.length>b.expr.length)return 1;for(let x=0,G=this.expr.length;x<G;x++){const ue=o(this.expr[x],b.expr[x]);if(ue!==0)return ue}return 0}equals(b){if(b.type===this.type){if(this.expr.length!==b.expr.length)return!1;for(let x=0,G=this.expr.length;x<G;x++)if(!this.expr[x].equals(b.expr[x]))return!1;return!0}return!1}substituteConstants(){const b=de(this.expr);return b===this.expr?this:Se.create(b,this.negated)}evaluate(b){for(let x=0,G=this.expr.length;x<G;x++)if(!this.expr[x].evaluate(b))return!1;return!0}static _normalizeArr(b,x){const G=[];let ue=!1;for(const ze of b)if(ze){if(ze.type===1){ue=!0;continue}if(ze.type===0)return $.INSTANCE;if(ze.type===6){G.push(...ze.expr);continue}G.push(ze)}if(G.length===0&&ue)return F.INSTANCE;if(G.length!==0){if(G.length===1)return G[0];G.sort(o);for(let ze=1;ze<G.length;ze++)G[ze-1].equals(G[ze])&&(G.splice(ze,1),ze--);if(G.length===1)return G[0];for(;G.length>1;){const ze=G[G.length-1];if(ze.type!==9)break;G.pop();const Xe=G.pop(),Ke=G.length===0,Ze=we.create(ze.expr.map(pt=>Se.create([pt,Xe],null)),null,Ke);Ze&&(G.push(Ze),G.sort(o))}return G.length===1?G[0]:new Se(G,x)}}serialize(){return this.expr.map(b=>b.serialize()).join(" && ")}keys(){const b=[];for(let x of this.expr)b.push(...x.keys());return b}negate(){if(!this.negated){const b=[];for(let x of this.expr)b.push(x.negate());this.negated=we.create(b,this,!0)}return this.negated}}class we{constructor(b,x){this.expr=b,this.negated=x,this.type=9}static create(b,x,G){return we._normalizeArr(b,x,G)}cmp(b){if(b.type!==this.type)return this.type-b.type;if(this.expr.length<b.expr.length)return-1;if(this.expr.length>b.expr.length)return 1;for(let x=0,G=this.expr.length;x<G;x++){const ue=o(this.expr[x],b.expr[x]);if(ue!==0)return ue}return 0}equals(b){if(b.type===this.type){if(this.expr.length!==b.expr.length)return!1;for(let x=0,G=this.expr.length;x<G;x++)if(!this.expr[x].equals(b.expr[x]))return!1;return!0}return!1}substituteConstants(){const b=de(this.expr);return b===this.expr?this:we.create(b,this.negated,!1)}evaluate(b){for(let x=0,G=this.expr.length;x<G;x++)if(this.expr[x].evaluate(b))return!0;return!1}static _normalizeArr(b,x,G){let ue=[],ze=!1;if(b){for(let Xe=0,Ke=b.length;Xe<Ke;Xe++){const Ze=b[Xe];if(Ze){if(Ze.type===0){ze=!0;continue}if(Ze.type===1)return F.INSTANCE;if(Ze.type===9){ue=ue.concat(Ze.expr);continue}ue.push(Ze)}}if(ue.length===0&&ze)return $.INSTANCE;ue.sort(o)}if(ue.length!==0){if(ue.length===1)return ue[0];for(let Xe=1;Xe<ue.length;Xe++)ue[Xe-1].equals(ue[Xe])&&(ue.splice(Xe,1),Xe--);if(ue.length===1)return ue[0];if(G){for(let Xe=0;Xe<ue.length;Xe++)for(let Ke=Xe+1;Ke<ue.length;Ke++)X(ue[Xe],ue[Ke])&&(ue.splice(Ke,1),Ke--);if(ue.length===1)return ue[0]}return new we(ue,x)}}serialize(){return this.expr.map(b=>b.serialize()).join(" || ")}keys(){const b=[];for(let x of this.expr)b.push(...x.keys());return b}negate(){if(!this.negated){let b=[];for(let x of this.expr)b.push(x.negate());for(;b.length>1;){const x=b.shift(),G=b.shift(),ue=[];for(const Xe of le(x))for(const Ke of le(G))ue.push(Se.create([Xe,Ke],null));const ze=b.length===0;b.unshift(we.create(ue,null,ze))}this.negated=b[0]}return this.negated}}class Me extends w{constructor(b,x,G){super(b,null),this._defaultValue=x,typeof G=="object"?Me._info.push(Object.assign(Object.assign({},G),{key:b})):G!==!0&&Me._info.push({key:b,description:G,type:x!=null?typeof x:void 0})}static all(){return Me._info.values()}bindTo(b){return b.createKey(this.key,this._defaultValue)}getValue(b){return b.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(b){return f.create(this.key,b)}}Me._info=[];const $e=(0,me.yh)("contextKeyService"),Y="setContext";function B(q,b){return q<b?-1:q>b?1:0}function Z(q,b,x,G){return q<x?-1:q>x?1:b<G?-1:b>G?1:0}function X(q,b){if(b.type===6&&q.type!==9&&q.type!==6){for(const ue of b.expr)if(q.equals(ue))return!0}const x=q.negate(),G=le(x).concat(le(b));G.sort(o);for(let ue=0;ue<G.length;ue++){const Xe=G[ue].negate();for(let Ke=ue+1;Ke<G.length;Ke++){const Ze=G[Ke];if(Xe.equals(Ze))return!0}}return!1}function le(q){return q.type===9?q.expr:[q]}},16925:function($t,st,D){"use strict";D.d(st,{I8:function(){return R},TG:function(){return _e},jt:function(){return fe},yh:function(){return Ie}});var R;(function(re){re.serviceIds=new Map,re.DI_TARGET="$di$target",re.DI_DEPENDENCIES="$di$dependencies";function ve(Ee){return Ee[re.DI_DEPENDENCIES]||[]}re.getServiceDependencies=ve})(R||(R={}));const _e=Ie("instantiationService");function me(re,ve,Ee,o){ve[R.DI_TARGET]===ve?ve[R.DI_DEPENDENCIES].push({id:re,index:Ee,optional:o}):(ve[R.DI_DEPENDENCIES]=[{id:re,index:Ee,optional:o}],ve[R.DI_TARGET]=ve)}function Ie(re){if(R.serviceIds.has(re))return R.serviceIds.get(re);const ve=function(Ee,o,$){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");me(ve,Ee,$,!1)};return ve.toString=()=>re,R.serviceIds.set(re,ve),ve}function fe(re){return function(ve,Ee,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");me(re,ve,o,!0)}}},44650:function($t,st,D){"use strict";D.d(st,{B:function(){return Ie}});var R=D(76068),_e=D(72999);class me{constructor(){this.data=new Map}add(re,ve){R.ok(_e.HD(re)),R.ok(_e.Kn(ve)),R.ok(!this.data.has(re),"There is already an extension with this id"),this.data.set(re,ve)}as(re){return this.data.get(re)||null}}const Ie=new me},66213:function($t,st,D){"use strict";D.d(st,{e:function(){return R}});var R;(function(_e){_e.DARK="dark",_e.LIGHT="light",_e.HIGH_CONTRAST="hc"})(R||(R={}))},49055:function($t,st,D){"use strict";D.d(st,{EN:function(){return o},IP:function(){return w},Ic:function(){return y},XE:function(){return ve},bB:function(){return U},kS:function(){return $},m6:function(){return F}});var R=D(52615),_e=D(4348),me=D(69323),Ie=D(16925),fe=D(44650),re=D(66213);const ve=(0,Ie.yh)("themeService");var Ee;(function(K){function O(I){return I&&typeof I=="object"&&typeof I.id=="string"}K.isThemeColor=O})(Ee||(Ee={}));function o(K){return{id:K}}var $;(function(K){function O(ae){return ae&&typeof ae=="object"&&typeof ae.id=="string"&&(typeof ae.color=="undefined"||Ee.isThemeColor(ae.color))}K.isThemeIcon=O;const I=new RegExp(`^\\$\\((${R.dT.iconNameExpression}(?:${R.dT.iconModifierExpression})?)\\)$`);function H(ae){const de=I.exec(ae);if(!de)return;let[,Se]=de;return{id:Se}}K.fromString=H;function te(ae,de){let Se=ae.id;const we=Se.lastIndexOf("~");return we!==-1&&(Se=Se.substring(0,we)),de&&(Se=`${Se}~${de}`),{id:Se}}K.modify=te;function S(ae,de){var Se,we;return ae.id===de.id&&((Se=ae.color)===null||Se===void 0?void 0:Se.id)===((we=de.color)===null||we===void 0?void 0:we.id)}K.isEqual=S;function j(ae,de){return{id:ae.id,color:de?o(de):void 0}}K.asThemeIcon=j,K.asClassNameArray=R.dT.asClassNameArray,K.asClassName=R.dT.asClassName,K.asCSSSelector=R.dT.asCSSSelector})($||($={}));function F(K){switch(K){case re.e.DARK:return"vs-dark";case re.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const w={ThemingContribution:"base.contributions.theming"};class f{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new _e.Q5}onColorThemeChange(O){return this.themingParticipants.push(O),this.onThemingParticipantAddedEmitter.fire(O),(0,me.OF)(()=>{const I=this.themingParticipants.indexOf(O);this.themingParticipants.splice(I,1)})}getThemingParticipants(){return this.themingParticipants}}let _=new f;fe.B.add(w.ThemingContribution,_);function y(K){return _.onColorThemeChange(K)}class U extends me.JT{constructor(O){super(),this.themeService=O,this.theme=O.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(I=>this.onThemeChange(I)))}onThemeChange(O){this.theme=O,this.updateStyles()}updateStyles(){}}},93681:function($t,st,D){"use strict";D.r(st),D.d(st,{BaseInput:function(){return $},default:function(){return I}});var R=D(96663),_e=D(44127),me=D(90493),Ie=D(20135),fe=D(92310),re=D.n(fe),ve=D(59301),Ee=D(5643),o=function(te){var S,j,ae=te.inputElement,de=te.prefixCls,Se=te.prefix,we=te.suffix,Me=te.addonBefore,$e=te.addonAfter,Y=te.className,B=te.style,Z=te.disabled,X=te.readOnly,le=te.focused,q=te.triggerFocus,b=te.allowClear,x=te.value,G=te.handleReset,ue=te.hidden,ze=te.classes,Xe=te.classNames,Ke=te.dataAttrs,Ze=te.styles,pt=te.components,ct=(pt==null?void 0:pt.affixWrapper)||"span",ht=(pt==null?void 0:pt.groupWrapper)||"span",jt=(pt==null?void 0:pt.wrapper)||"span",Zt=(pt==null?void 0:pt.groupAddon)||"span",qt=(0,ve.useRef)(null),Ut=function(Le){var Be;(Be=qt.current)!==null&&Be!==void 0&&Be.contains(Le.target)&&(q==null||q())},zt=function(){var Le;if(!b)return null;var Be=!Z&&!X&&x,Ve="".concat(de,"-clear-icon"),nt=(0,Ie.Z)(b)==="object"&&b!==null&&b!==void 0&&b.clearIcon?b.clearIcon:"\u2716";return ve.createElement("span",{onClick:G,onMouseDown:function(je){return je.preventDefault()},className:re()(Ve,(Le={},(0,me.Z)(Le,"".concat(Ve,"-hidden"),!Be),(0,me.Z)(Le,"".concat(Ve,"-has-suffix"),!!we),Le)),role:"button",tabIndex:-1},nt)},Bt=(0,ve.cloneElement)(ae,{value:x,hidden:ue,className:re()((S=ae.props)===null||S===void 0?void 0:S.className,!(0,Ee.X3)(te)&&!(0,Ee.He)(te)&&Y)||null,style:(0,_e.Z)((0,_e.Z)({},(j=ae.props)===null||j===void 0?void 0:j.style),!(0,Ee.X3)(te)&&!(0,Ee.He)(te)?B:{})});if((0,Ee.X3)(te)){var Oe,qe="".concat(de,"-affix-wrapper"),se=re()(qe,(Oe={},(0,me.Z)(Oe,"".concat(qe,"-disabled"),Z),(0,me.Z)(Oe,"".concat(qe,"-focused"),le),(0,me.Z)(Oe,"".concat(qe,"-readonly"),X),(0,me.Z)(Oe,"".concat(qe,"-input-with-clear-btn"),we&&b&&x),Oe),!(0,Ee.He)(te)&&Y,ze==null?void 0:ze.affixWrapper,Xe==null?void 0:Xe.affixWrapper),Ne=(we||b)&&ve.createElement("span",{className:re()("".concat(de,"-suffix"),Xe==null?void 0:Xe.suffix),style:Ze==null?void 0:Ze.suffix},zt(),we);Bt=ve.createElement(ct,(0,R.Z)({className:se,style:(0,_e.Z)((0,_e.Z)({},(0,Ee.He)(te)?void 0:B),Ze==null?void 0:Ze.affixWrapper),hidden:!(0,Ee.He)(te)&&ue,onClick:Ut},Ke==null?void 0:Ke.affixWrapper,{ref:qt}),Se&&ve.createElement("span",{className:re()("".concat(de,"-prefix"),Xe==null?void 0:Xe.prefix),style:Ze==null?void 0:Ze.prefix},Se),(0,ve.cloneElement)(ae,{value:x,hidden:null}),Ne)}if((0,Ee.He)(te)){var He="".concat(de,"-group"),N="".concat(He,"-addon"),ee=re()("".concat(de,"-wrapper"),He,ze==null?void 0:ze.wrapper),ye=re()("".concat(de,"-group-wrapper"),Y,ze==null?void 0:ze.group);return ve.createElement(ht,{className:ye,style:B,hidden:ue},ve.createElement(jt,{className:ee},Me&&ve.createElement(Zt,{className:N},Me),(0,ve.cloneElement)(Bt,{hidden:null}),$e&&ve.createElement(Zt,{className:N},$e)))}return Bt},$=o,F=D(19127),w=D(72071),f=D(6620),_=D(18929),y=D(2738),U=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],K=(0,ve.forwardRef)(function(H,te){var S=H.autoComplete,j=H.onChange,ae=H.onFocus,de=H.onBlur,Se=H.onPressEnter,we=H.onKeyDown,Me=H.prefixCls,$e=Me===void 0?"rc-input":Me,Y=H.disabled,B=H.htmlSize,Z=H.className,X=H.maxLength,le=H.suffix,q=H.showCount,b=H.type,x=b===void 0?"text":b,G=H.classes,ue=H.classNames,ze=H.styles,Xe=(0,f.Z)(H,U),Ke=(0,_.Z)(H.defaultValue,{value:H.value}),Ze=(0,w.Z)(Ke,2),pt=Ze[0],ct=Ze[1],ht=(0,ve.useState)(!1),jt=(0,w.Z)(ht,2),Zt=jt[0],qt=jt[1],Ut=(0,ve.useRef)(null),zt=function(ye){Ut.current&&(0,Ee.nH)(Ut.current,ye)};(0,ve.useImperativeHandle)(te,function(){return{focus:zt,blur:function(){var ye;(ye=Ut.current)===null||ye===void 0||ye.blur()},setSelectionRange:function(ye,be,Le){var Be;(Be=Ut.current)===null||Be===void 0||Be.setSelectionRange(ye,be,Le)},select:function(){var ye;(ye=Ut.current)===null||ye===void 0||ye.select()},input:Ut.current}}),(0,ve.useEffect)(function(){qt(function(ee){return ee&&Y?!1:ee})},[Y]);var Bt=function(ye){H.value===void 0&&ct(ye.target.value),Ut.current&&(0,Ee.rJ)(Ut.current,ye,j)},Oe=function(ye){Se&&ye.key==="Enter"&&Se(ye),we==null||we(ye)},qe=function(ye){qt(!0),ae==null||ae(ye)},se=function(ye){qt(!1),de==null||de(ye)},Ne=function(ye){ct(""),zt(),Ut.current&&(0,Ee.rJ)(Ut.current,ye,j)},He=function(){var ye=(0,y.Z)(H,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return ve.createElement("input",(0,R.Z)({autoComplete:S},ye,{onChange:Bt,onFocus:qe,onBlur:se,onKeyDown:Oe,className:re()($e,(0,me.Z)({},"".concat($e,"-disabled"),Y),ue==null?void 0:ue.input),style:ze==null?void 0:ze.input,ref:Ut,size:B,type:x}))},N=function(){var ye=Number(X)>0;if(le||q){var be=(0,Ee.D7)(pt),Le=(0,F.Z)(be).length,Be=(0,Ie.Z)(q)==="object"?q.formatter({value:be,count:Le,maxLength:X}):"".concat(Le).concat(ye?" / ".concat(X):"");return ve.createElement(ve.Fragment,null,!!q&&ve.createElement("span",{className:re()("".concat($e,"-show-count-suffix"),(0,me.Z)({},"".concat($e,"-show-count-has-suffix"),!!le),ue==null?void 0:ue.count),style:(0,_e.Z)({},ze==null?void 0:ze.count)},Be),le)}return null};return ve.createElement($,(0,R.Z)({},Xe,{prefixCls:$e,className:Z,inputElement:He(),handleReset:Ne,value:(0,Ee.D7)(pt),focused:Zt,triggerFocus:zt,suffix:N(),disabled:Y,classes:G,classNames:ue,styles:ze}))}),O=K,I=O},5643:function($t,st,D){"use strict";D.d(st,{D7:function(){return fe},He:function(){return R},X3:function(){return _e},nH:function(){return Ie},rJ:function(){return me}});function R(re){return!!(re.addonBefore||re.addonAfter)}function _e(re){return!!(re.prefix||re.suffix||re.allowClear)}function me(re,ve,Ee,o){if(Ee){var $=ve;if(ve.type==="click"){var F=re.cloneNode(!0);$=Object.create(ve,{target:{value:F},currentTarget:{value:F}}),F.value="",Ee($);return}if(o!==void 0){$=Object.create(ve,{target:{value:re},currentTarget:{value:re}}),re.value=o,Ee($);return}Ee($)}}function Ie(re,ve){if(re){re.focus(ve);var Ee=ve||{},o=Ee.cursor;if(o){var $=re.value.length;switch(o){case"start":re.setSelectionRange(0,0);break;case"end":re.setSelectionRange($,$);break;default:re.setSelectionRange(0,$)}}}}function fe(re){return typeof re=="undefined"||re===null?"":String(re)}},29301:function($t,st,D){"use strict";D.d(st,{Z:function(){return Y}});var R=D(96663),_e=D(59301),me=D(11592),Ie=D(48736),fe=D(44127),re=D(20135),ve=D(76846),Ee=D(8654),o=_e.createContext(null);function $(B){var Z=B.children,X=B.onBatchResize,le=_e.useRef(0),q=_e.useRef([]),b=_e.useContext(o),x=_e.useCallback(function(G,ue,ze){le.current+=1;var Xe=le.current;q.current.push({size:G,element:ue,data:ze}),Promise.resolve().then(function(){Xe===le.current&&(X==null||X(q.current),q.current=[])}),b==null||b(G,ue,ze)},[X,b]);return _e.createElement(o.Provider,{value:x},Z)}var F=D(76374),w=new Map;function f(B){B.forEach(function(Z){var X,le=Z.target;(X=w.get(le))===null||X===void 0||X.forEach(function(q){return q(le)})})}var _=new F.Z(f),y=null,U=null;function K(B,Z){w.has(B)||(w.set(B,new Set),_.observe(B)),w.get(B).add(Z)}function O(B,Z){w.has(B)&&(w.get(B).delete(Z),w.get(B).size||(_.unobserve(B),w.delete(B)))}var I=D(52884),H=D(95727),te=D(65711),S=D(85745),j=function(B){(0,te.Z)(X,B);var Z=(0,S.Z)(X);function X(){return(0,I.Z)(this,X),Z.apply(this,arguments)}return(0,H.Z)(X,[{key:"render",value:function(){return this.props.children}}]),X}(_e.Component);function ae(B,Z){var X=B.children,le=B.disabled,q=_e.useRef(null),b=_e.useRef(null),x=_e.useContext(o),G=typeof X=="function",ue=G?X(q):X,ze=_e.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Xe=!G&&_e.isValidElement(ue)&&(0,Ee.Yr)(ue),Ke=Xe?(0,Ee.C4)(ue):null,Ze=(0,Ee.x1)(Ke,q),pt=function(){var Zt;return(0,ve.ZP)(q.current)||(q.current&&(0,re.Z)(q.current)==="object"?(0,ve.ZP)((Zt=q.current)===null||Zt===void 0?void 0:Zt.nativeElement):null)||(0,ve.ZP)(b.current)};_e.useImperativeHandle(Z,function(){return pt()});var ct=_e.useRef(B);ct.current=B;var ht=_e.useCallback(function(jt){var Zt=ct.current,qt=Zt.onResize,Ut=Zt.data,zt=jt.getBoundingClientRect(),Bt=zt.width,Oe=zt.height,qe=jt.offsetWidth,se=jt.offsetHeight,Ne=Math.floor(Bt),He=Math.floor(Oe);if(ze.current.width!==Ne||ze.current.height!==He||ze.current.offsetWidth!==qe||ze.current.offsetHeight!==se){var N={width:Ne,height:He,offsetWidth:qe,offsetHeight:se};ze.current=N;var ee=qe===Math.round(Bt)?Bt:qe,ye=se===Math.round(Oe)?Oe:se,be=(0,fe.Z)((0,fe.Z)({},N),{},{offsetWidth:ee,offsetHeight:ye});x==null||x(be,jt,Ut),qt&&Promise.resolve().then(function(){qt(be,jt)})}},[]);return _e.useEffect(function(){var jt=pt();return jt&&!le&&K(jt,ht),function(){return O(jt,ht)}},[q.current,le]),_e.createElement(j,{ref:b},Xe?_e.cloneElement(ue,{ref:Ze}):ue)}var de=_e.forwardRef(ae),Se=de,we="rc-observer-key";function Me(B,Z){var X=B.children,le=typeof X=="function"?[X]:(0,me.Z)(X);return le.map(function(q,b){var x=(q==null?void 0:q.key)||"".concat(we,"-").concat(b);return _e.createElement(Se,(0,R.Z)({},B,{key:x,ref:b===0?Z:void 0}),q)})}var $e=_e.forwardRef(Me);$e.Collection=$;var Y=$e},9296:function($t,st,D){"use strict";D.r(st),D.d(st,{ResizableTextArea:function(){return Me},default:function(){return le}});var R=D(96663),_e=D(44127),me=D(90493),Ie=D(20135),fe=D(72071),re=D(6620),ve=D(19127),Ee=D(92310),o=D.n(Ee),$=D(93681),F=D(5643),w=D(18929),f=D(59301),_=D(29301),y=D(34280),U=D(16089),K=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,O=["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"],I={},H;function te(q){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=q.getAttribute("id")||q.getAttribute("data-reactid")||q.getAttribute("name");if(b&&I[x])return I[x];var G=window.getComputedStyle(q),ue=G.getPropertyValue("box-sizing")||G.getPropertyValue("-moz-box-sizing")||G.getPropertyValue("-webkit-box-sizing"),ze=parseFloat(G.getPropertyValue("padding-bottom"))+parseFloat(G.getPropertyValue("padding-top")),Xe=parseFloat(G.getPropertyValue("border-bottom-width"))+parseFloat(G.getPropertyValue("border-top-width")),Ke=O.map(function(pt){return"".concat(pt,":").concat(G.getPropertyValue(pt))}).join(";"),Ze={sizingStyle:Ke,paddingSize:ze,borderSize:Xe,boxSizing:ue};return b&&x&&(I[x]=Ze),Ze}function S(q){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,G=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;H||(H=document.createElement("textarea"),H.setAttribute("tab-index","-1"),H.setAttribute("aria-hidden","true"),document.body.appendChild(H)),q.getAttribute("wrap")?H.setAttribute("wrap",q.getAttribute("wrap")):H.removeAttribute("wrap");var ue=te(q,b),ze=ue.paddingSize,Xe=ue.borderSize,Ke=ue.boxSizing,Ze=ue.sizingStyle;H.setAttribute("style","".concat(Ze,";").concat(K)),H.value=q.value||q.placeholder||"";var pt=void 0,ct=void 0,ht,jt=H.scrollHeight;if(Ke==="border-box"?jt+=Xe:Ke==="content-box"&&(jt-=ze),x!==null||G!==null){H.value=" ";var Zt=H.scrollHeight-ze;x!==null&&(pt=Zt*x,Ke==="border-box"&&(pt=pt+ze+Xe),jt=Math.max(pt,jt)),G!==null&&(ct=Zt*G,Ke==="border-box"&&(ct=ct+ze+Xe),ht=jt>ct?"":"hidden",jt=Math.min(ct,jt))}var qt={height:jt,overflowY:ht,resize:"none"};return pt&&(qt.minHeight=pt),ct&&(qt.maxHeight=ct),qt}var j=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ae=0,de=1,Se=2,we=f.forwardRef(function(q,b){var x=q,G=x.prefixCls,ue=x.onPressEnter,ze=x.defaultValue,Xe=x.value,Ke=x.autoSize,Ze=x.onResize,pt=x.className,ct=x.style,ht=x.disabled,jt=x.onChange,Zt=x.onInternalAutoSize,qt=(0,re.Z)(x,j),Ut=(0,w.Z)(ze,{value:Xe,postState:function(E){return E!=null?E:""}}),zt=(0,fe.Z)(Ut,2),Bt=zt[0],Oe=zt[1],qe=function(E){Oe(E.target.value),jt==null||jt(E)},se=f.useRef();f.useImperativeHandle(b,function(){return{textArea:se.current}});var Ne=f.useMemo(function(){return Ke&&(0,Ie.Z)(Ke)==="object"?[Ke.minRows,Ke.maxRows]:[]},[Ke]),He=(0,fe.Z)(Ne,2),N=He[0],ee=He[1],ye=!!Ke,be=function(){try{if(document.activeElement===se.current){var E=se.current,Ye=E.selectionStart,P=E.selectionEnd,oe=E.scrollTop;se.current.setSelectionRange(Ye,P),se.current.scrollTop=oe}}catch(kt){}},Le=f.useState(Se),Be=(0,fe.Z)(Le,2),Ve=Be[0],nt=Be[1],Qe=f.useState(),je=(0,fe.Z)(Qe,2),bt=je[0],Ae=je[1],De=function(){nt(ae)};(0,y.Z)(function(){ye&&De()},[Xe,N,ee,ye]),(0,y.Z)(function(){if(Ve===ae)nt(de);else if(Ve===de){var v=S(se.current,!1,N,ee);nt(Se),Ae(v)}else be()},[Ve]);var Ue=f.useRef(),it=function(){U.Z.cancel(Ue.current)},et=function(E){Ve===Se&&(Ze==null||Ze(E),Ke&&(it(),Ue.current=(0,U.Z)(function(){De()})))};f.useEffect(function(){return it},[]);var ft=ye?bt:null,_t=(0,_e.Z)((0,_e.Z)({},ct),ft);return(Ve===ae||Ve===de)&&(_t.overflowY="hidden",_t.overflowX="hidden"),f.createElement(_.Z,{onResize:et,disabled:!(Ke||Ze)},f.createElement("textarea",(0,R.Z)({},qt,{ref:se,style:_t,className:o()(G,pt,(0,me.Z)({},"".concat(G,"-disabled"),ht)),disabled:ht,value:Bt,onChange:qe})))}),Me=we,$e=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Y(q,b){return(0,ve.Z)(q||"").slice(0,b).join("")}function B(q,b,x,G){var ue=x;return q?ue=Y(x,G):(0,ve.Z)(b||"").length<x.length&&(0,ve.Z)(x||"").length>G&&(ue=b),ue}var Z=f.forwardRef(function(q,b){var x,G=q.defaultValue,ue=q.value,ze=q.onFocus,Xe=q.onBlur,Ke=q.onChange,Ze=q.allowClear,pt=q.maxLength,ct=q.onCompositionStart,ht=q.onCompositionEnd,jt=q.suffix,Zt=q.prefixCls,qt=Zt===void 0?"rc-textarea":Zt,Ut=q.classes,zt=q.showCount,Bt=q.className,Oe=q.style,qe=q.disabled,se=q.hidden,Ne=q.classNames,He=q.styles,N=q.onResize,ee=(0,re.Z)(q,$e),ye=(0,w.Z)(G,{value:ue,defaultValue:G}),be=(0,fe.Z)(ye,2),Le=be[0],Be=be[1],Ve=(0,f.useRef)(null),nt=f.useState(!1),Qe=(0,fe.Z)(nt,2),je=Qe[0],bt=Qe[1],Ae=f.useState(!1),De=(0,fe.Z)(Ae,2),Ue=De[0],it=De[1],et=f.useRef(),ft=f.useRef(0),_t=f.useState(null),v=(0,fe.Z)(_t,2),E=v[0],Ye=v[1],P=function(){var Ct;(Ct=Ve.current)===null||Ct===void 0||Ct.textArea.focus()};(0,f.useImperativeHandle)(b,function(){return{resizableTextArea:Ve.current,focus:P,blur:function(){var Ct;(Ct=Ve.current)===null||Ct===void 0||Ct.textArea.blur()}}}),(0,f.useEffect)(function(){bt(function(ur){return!qe&&ur})},[qe]);var oe=Number(pt)>0,kt=function(Ct){it(!0),et.current=Le,ft.current=Ct.currentTarget.selectionStart,ct==null||ct(Ct)},ge=function(Ct){it(!1);var Ot=Ct.currentTarget.value;if(oe){var Re,ot=ft.current>=pt+1||ft.current===((Re=et.current)===null||Re===void 0?void 0:Re.length);Ot=B(ot,et.current,Ot,pt)}Ot!==Le&&(Be(Ot),(0,F.rJ)(Ct.currentTarget,Ct,Ke,Ot)),ht==null||ht(Ct)},Pe=function(Ct){var Ot=Ct.target.value;if(!Ue&&oe){var Re=Ct.target.selectionStart>=pt+1||Ct.target.selectionStart===Ot.length||!Ct.target.selectionStart;Ot=B(Re,Le,Ot,pt)}Be(Ot),(0,F.rJ)(Ct.currentTarget,Ct,Ke,Ot)},Ge=function(Ct){var Ot=ee.onPressEnter,Re=ee.onKeyDown;Ct.key==="Enter"&&Ot&&Ot(Ct),Re==null||Re(Ct)},z=function(Ct){bt(!0),ze==null||ze(Ct)},J=function(Ct){bt(!1),Xe==null||Xe(Ct)},ce=function(Ct){var Ot;Be(""),P(),(0,F.rJ)((Ot=Ve.current)===null||Ot===void 0?void 0:Ot.textArea,Ct,Ke)},Ce=(0,F.D7)(Le);!Ue&&oe&&ue==null&&(Ce=Y(Ce,pt));var M=jt,xt;if(zt){var pe=(0,ve.Z)(Ce).length;(0,Ie.Z)(zt)==="object"?xt=zt.formatter({value:Ce,count:pe,maxLength:pt}):xt="".concat(pe).concat(oe?" / ".concat(pt):""),M=f.createElement(f.Fragment,null,M,f.createElement("span",{className:o()("".concat(qt,"-data-count"),Ne==null?void 0:Ne.count),style:He==null?void 0:He.count},xt))}var Lt=function(Ct){var Ot;N==null||N(Ct),(Ot=Ve.current)!==null&&Ot!==void 0&&Ot.textArea.style.height&&Ye(!0)},It=!ee.autoSize&&!zt&&!Ze,Wt=f.createElement($.BaseInput,{value:Ce,allowClear:Ze,handleReset:ce,suffix:M,prefixCls:qt,classes:{affixWrapper:o()(Ut==null?void 0:Ut.affixWrapper,(x={},(0,me.Z)(x,"".concat(qt,"-show-count"),zt),(0,me.Z)(x,"".concat(qt,"-textarea-allow-clear"),Ze),x))},disabled:qe,focused:je,className:Bt,style:(0,_e.Z)((0,_e.Z)({},Oe),E&&!It?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof xt=="string"?xt:void 0}},hidden:se,inputElement:f.createElement(Me,(0,R.Z)({},ee,{onKeyDown:Ge,onChange:Pe,onFocus:z,onBlur:J,onCompositionStart:kt,onCompositionEnd:ge,className:Ne==null?void 0:Ne.textarea,style:(0,_e.Z)((0,_e.Z)({},He==null?void 0:He.textarea),{},{resize:Oe==null?void 0:Oe.resize}),disabled:qe,prefixCls:qt,onResize:Lt,ref:Ve}))});return Wt}),X=Z,le=X},55477:function($t,st,D){"use strict";D.d(st,{G:function(){return f},Z:function(){return K}});var R=D(96663),_e=D(44127),me=D(6620),Ie=D(35593),fe=D(59301),re={shiftX:64,adjustY:1},ve={adjustX:1,shiftY:!0},Ee=[0,0],o={left:{points:["cr","cl"],overflow:ve,offset:[-4,0],targetOffset:Ee},right:{points:["cl","cr"],overflow:ve,offset:[4,0],targetOffset:Ee},top:{points:["bc","tc"],overflow:re,offset:[0,-4],targetOffset:Ee},bottom:{points:["tc","bc"],overflow:re,offset:[0,4],targetOffset:Ee},topLeft:{points:["bl","tl"],overflow:re,offset:[0,-4],targetOffset:Ee},leftTop:{points:["tr","tl"],overflow:ve,offset:[-4,0],targetOffset:Ee},topRight:{points:["br","tr"],overflow:re,offset:[0,-4],targetOffset:Ee},rightTop:{points:["tl","tr"],overflow:ve,offset:[4,0],targetOffset:Ee},bottomRight:{points:["tr","br"],overflow:re,offset:[0,4],targetOffset:Ee},rightBottom:{points:["bl","br"],overflow:ve,offset:[4,0],targetOffset:Ee},bottomLeft:{points:["tl","bl"],overflow:re,offset:[0,4],targetOffset:Ee},leftBottom:{points:["br","bl"],overflow:ve,offset:[-4,0],targetOffset:Ee}},$=null,F=D(92310),w=D.n(F);function f(O){var I=O.children,H=O.prefixCls,te=O.id,S=O.overlayInnerStyle,j=O.className,ae=O.style;return fe.createElement("div",{className:w()("".concat(H,"-content"),j),style:ae},fe.createElement("div",{className:"".concat(H,"-inner"),id:te,role:"tooltip",style:S},typeof I=="function"?I():I))}var _=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],y=function(I,H){var te=I.overlayClassName,S=I.trigger,j=S===void 0?["hover"]:S,ae=I.mouseEnterDelay,de=ae===void 0?0:ae,Se=I.mouseLeaveDelay,we=Se===void 0?.1:Se,Me=I.overlayStyle,$e=I.prefixCls,Y=$e===void 0?"rc-tooltip":$e,B=I.children,Z=I.onVisibleChange,X=I.afterVisibleChange,le=I.transitionName,q=I.animation,b=I.motion,x=I.placement,G=x===void 0?"right":x,ue=I.align,ze=ue===void 0?{}:ue,Xe=I.destroyTooltipOnHide,Ke=Xe===void 0?!1:Xe,Ze=I.defaultVisible,pt=I.getTooltipContainer,ct=I.overlayInnerStyle,ht=I.arrowContent,jt=I.overlay,Zt=I.id,qt=I.showArrow,Ut=qt===void 0?!0:qt,zt=(0,me.Z)(I,_),Bt=(0,fe.useRef)(null);(0,fe.useImperativeHandle)(H,function(){return Bt.current});var Oe=(0,_e.Z)({},zt);"visible"in I&&(Oe.popupVisible=I.visible);var qe=function(){return fe.createElement(f,{key:"content",prefixCls:Y,id:Zt,overlayInnerStyle:ct},jt)};return fe.createElement(Ie.Z,(0,R.Z)({popupClassName:te,prefixCls:Y,popup:qe,action:j,builtinPlacements:o,popupPlacement:G,ref:Bt,popupAlign:ze,getPopupContainer:pt,onPopupVisibleChange:Z,afterPopupVisibleChange:X,popupTransitionName:le,popupAnimation:q,popupMotion:b,defaultPopupVisible:Ze,autoDestroy:Ke,mouseLeaveDelay:we,popupStyle:Me,mouseEnterDelay:de,arrow:Ut},Oe),B)},U=(0,fe.forwardRef)(y),K=U},49658:function($t,st){"use strict";st.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var D=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(D)||/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(D==null?void 0:D.substr(0,4))}},83145:function($t,st,D){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.CopyToClipboard=void 0;var R=me(D(59301)),_e=me(D(25769));function me(I){return I&&I.__esModule?I:{default:I}}function Ie(I){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ie=function(te){return typeof te}:Ie=function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},Ie(I)}function fe(I,H){var te=Object.keys(I);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(I);H&&(S=S.filter(function(j){return Object.getOwnPropertyDescriptor(I,j).enumerable})),te.push.apply(te,S)}return te}function re(I){for(var H=1;H<arguments.length;H++){var te=arguments[H]!=null?arguments[H]:{};H%2?fe(te,!0).forEach(function(S){K(I,S,te[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(te)):fe(te).forEach(function(S){Object.defineProperty(I,S,Object.getOwnPropertyDescriptor(te,S))})}return I}function ve(I,H){if(I==null)return{};var te=Ee(I,H),S,j;if(Object.getOwnPropertySymbols){var ae=Object.getOwnPropertySymbols(I);for(j=0;j<ae.length;j++)S=ae[j],!(H.indexOf(S)>=0)&&Object.prototype.propertyIsEnumerable.call(I,S)&&(te[S]=I[S])}return te}function Ee(I,H){if(I==null)return{};var te={},S=Object.keys(I),j,ae;for(ae=0;ae<S.length;ae++)j=S[ae],!(H.indexOf(j)>=0)&&(te[j]=I[j]);return te}function o(I,H){if(!(I instanceof H))throw new TypeError("Cannot call a class as a function")}function $(I,H){for(var te=0;te<H.length;te++){var S=H[te];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(I,S.key,S)}}function F(I,H,te){return H&&$(I.prototype,H),te&&$(I,te),I}function w(I,H){return H&&(Ie(H)==="object"||typeof H=="function")?H:_(I)}function f(I){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(te){return te.__proto__||Object.getPrototypeOf(te)},f(I)}function _(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}function y(I,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(H&&H.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),H&&U(I,H)}function U(I,H){return U=Object.setPrototypeOf||function(S,j){return S.__proto__=j,S},U(I,H)}function K(I,H,te){return H in I?Object.defineProperty(I,H,{value:te,enumerable:!0,configurable:!0,writable:!0}):I[H]=te,I}var O=function(I){y(H,I);function H(){var te,S;o(this,H);for(var j=arguments.length,ae=new Array(j),de=0;de<j;de++)ae[de]=arguments[de];return S=w(this,(te=f(H)).call.apply(te,[this].concat(ae))),K(_(S),"onClick",function(Se){var we=S.props,Me=we.text,$e=we.onCopy,Y=we.children,B=we.options,Z=R.default.Children.only(Y),X=(0,_e.default)(Me,B);$e&&$e(Me,X),Z&&Z.props&&typeof Z.props.onClick=="function"&&Z.props.onClick(Se)}),S}return F(H,[{key:"render",value:function(){var S=this.props,j=S.text,ae=S.onCopy,de=S.options,Se=S.children,we=ve(S,["text","onCopy","options","children"]),Me=R.default.Children.only(Se);return R.default.cloneElement(Me,re({},we,{onClick:this.onClick}))}}]),H}(R.default.PureComponent);st.CopyToClipboard=O,K(O,"defaultProps",{onCopy:void 0,options:void 0})},56102:function($t,st,D){"use strict";var R=D(83145),_e=R.CopyToClipboard;_e.CopyToClipboard=_e,$t.exports=_e},76374:function($t,st,D){"use strict";var R=function(){if(typeof Map!="undefined")return Map;function Y(B,Z){var X=-1;return B.some(function(le,q){return le[0]===Z?(X=q,!0):!1}),X}return function(){function B(){this.__entries__=[]}return Object.defineProperty(B.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),B.prototype.get=function(Z){var X=Y(this.__entries__,Z),le=this.__entries__[X];return le&&le[1]},B.prototype.set=function(Z,X){var le=Y(this.__entries__,Z);~le?this.__entries__[le][1]=X:this.__entries__.push([Z,X])},B.prototype.delete=function(Z){var X=this.__entries__,le=Y(X,Z);~le&&X.splice(le,1)},B.prototype.has=function(Z){return!!~Y(this.__entries__,Z)},B.prototype.clear=function(){this.__entries__.splice(0)},B.prototype.forEach=function(Z,X){X===void 0&&(X=null);for(var le=0,q=this.__entries__;le<q.length;le++){var b=q[le];Z.call(X,b[1],b[0])}},B}()}(),_e=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,me=function(){return typeof D.g!="undefined"&&D.g.Math===Math?D.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),Ie=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(me):function(Y){return setTimeout(function(){return Y(Date.now())},1e3/60)}}(),fe=2;function re(Y,B){var Z=!1,X=!1,le=0;function q(){Z&&(Z=!1,Y()),X&&x()}function b(){Ie(q)}function x(){var G=Date.now();if(Z){if(G-le<fe)return;X=!0}else Z=!0,X=!1,setTimeout(b,B);le=G}return x}var ve=20,Ee=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",$=function(){function Y(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=re(this.refresh.bind(this),ve)}return Y.prototype.addObserver=function(B){~this.observers_.indexOf(B)||this.observers_.push(B),this.connected_||this.connect_()},Y.prototype.removeObserver=function(B){var Z=this.observers_,X=Z.indexOf(B);~X&&Z.splice(X,1),!Z.length&&this.connected_&&this.disconnect_()},Y.prototype.refresh=function(){var B=this.updateObservers_();B&&this.refresh()},Y.prototype.updateObservers_=function(){var B=this.observers_.filter(function(Z){return Z.gatherActive(),Z.hasActive()});return B.forEach(function(Z){return Z.broadcastActive()}),B.length>0},Y.prototype.connect_=function(){!_e||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),o?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},Y.prototype.disconnect_=function(){!_e||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},Y.prototype.onTransitionEnd_=function(B){var Z=B.propertyName,X=Z===void 0?"":Z,le=Ee.some(function(q){return!!~X.indexOf(q)});le&&this.refresh()},Y.getInstance=function(){return this.instance_||(this.instance_=new Y),this.instance_},Y.instance_=null,Y}(),F=function(Y,B){for(var Z=0,X=Object.keys(B);Z<X.length;Z++){var le=X[Z];Object.defineProperty(Y,le,{value:B[le],enumerable:!1,writable:!1,configurable:!0})}return Y},w=function(Y){var B=Y&&Y.ownerDocument&&Y.ownerDocument.defaultView;return B||me},f=j(0,0,0,0);function _(Y){return parseFloat(Y)||0}function y(Y){for(var B=[],Z=1;Z<arguments.length;Z++)B[Z-1]=arguments[Z];return B.reduce(function(X,le){var q=Y["border-"+le+"-width"];return X+_(q)},0)}function U(Y){for(var B=["top","right","bottom","left"],Z={},X=0,le=B;X<le.length;X++){var q=le[X],b=Y["padding-"+q];Z[q]=_(b)}return Z}function K(Y){var B=Y.getBBox();return j(0,0,B.width,B.height)}function O(Y){var B=Y.clientWidth,Z=Y.clientHeight;if(!B&&!Z)return f;var X=w(Y).getComputedStyle(Y),le=U(X),q=le.left+le.right,b=le.top+le.bottom,x=_(X.width),G=_(X.height);if(X.boxSizing==="border-box"&&(Math.round(x+q)!==B&&(x-=y(X,"left","right")+q),Math.round(G+b)!==Z&&(G-=y(X,"top","bottom")+b)),!H(Y)){var ue=Math.round(x+q)-B,ze=Math.round(G+b)-Z;Math.abs(ue)!==1&&(x-=ue),Math.abs(ze)!==1&&(G-=ze)}return j(le.left,le.top,x,G)}var I=function(){return typeof SVGGraphicsElement!="undefined"?function(Y){return Y instanceof w(Y).SVGGraphicsElement}:function(Y){return Y instanceof w(Y).SVGElement&&typeof Y.getBBox=="function"}}();function H(Y){return Y===w(Y).document.documentElement}function te(Y){return _e?I(Y)?K(Y):O(Y):f}function S(Y){var B=Y.x,Z=Y.y,X=Y.width,le=Y.height,q=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,b=Object.create(q.prototype);return F(b,{x:B,y:Z,width:X,height:le,top:Z,right:B+X,bottom:le+Z,left:B}),b}function j(Y,B,Z,X){return{x:Y,y:B,width:Z,height:X}}var ae=function(){function Y(B){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=j(0,0,0,0),this.target=B}return Y.prototype.isActive=function(){var B=te(this.target);return this.contentRect_=B,B.width!==this.broadcastWidth||B.height!==this.broadcastHeight},Y.prototype.broadcastRect=function(){var B=this.contentRect_;return this.broadcastWidth=B.width,this.broadcastHeight=B.height,B},Y}(),de=function(){function Y(B,Z){var X=S(Z);F(this,{target:B,contentRect:X})}return Y}(),Se=function(){function Y(B,Z,X){if(this.activeObservations_=[],this.observations_=new R,typeof B!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=B,this.controller_=Z,this.callbackCtx_=X}return Y.prototype.observe=function(B){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(B instanceof w(B).Element))throw new TypeError('parameter 1 is not of type "Element".');var Z=this.observations_;Z.has(B)||(Z.set(B,new ae(B)),this.controller_.addObserver(this),this.controller_.refresh())}},Y.prototype.unobserve=function(B){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(B instanceof w(B).Element))throw new TypeError('parameter 1 is not of type "Element".');var Z=this.observations_;Z.has(B)&&(Z.delete(B),Z.size||this.controller_.removeObserver(this))}},Y.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Y.prototype.gatherActive=function(){var B=this;this.clearActive(),this.observations_.forEach(function(Z){Z.isActive()&&B.activeObservations_.push(Z)})},Y.prototype.broadcastActive=function(){if(this.hasActive()){var B=this.callbackCtx_,Z=this.activeObservations_.map(function(X){return new de(X.target,X.broadcastRect())});this.callback_.call(B,Z,B),this.clearActive()}},Y.prototype.clearActive=function(){this.activeObservations_.splice(0)},Y.prototype.hasActive=function(){return this.activeObservations_.length>0},Y}(),we=typeof WeakMap!="undefined"?new WeakMap:new R,Me=function(){function Y(B){if(!(this instanceof Y))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var Z=$.getInstance(),X=new Se(B,Z,this);we.set(this,X)}return Y}();["observe","unobserve","disconnect"].forEach(function(Y){Me.prototype[Y]=function(){var B;return(B=we.get(this))[Y].apply(B,arguments)}});var $e=function(){return typeof me.ResizeObserver!="undefined"?me.ResizeObserver:Me}();st.Z=$e},98040:function($t){$t.exports=function(){var st=document.getSelection();if(!st.rangeCount)return function(){};for(var D=document.activeElement,R=[],_e=0;_e<st.rangeCount;_e++)R.push(st.getRangeAt(_e));switch(D.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":D.blur();break;default:D=null;break}return st.removeAllRanges(),function(){st.type==="Caret"&&st.removeAllRanges(),st.rangeCount||R.forEach(function(me){st.addRange(me)}),D&&D.focus()}}},1012:function($t,st,D){"use strict";D.d(st,{Z:function(){return w}});var R=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),_e=new Uint8Array(16);function me(){if(!R)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return R(_e)}var Ie=/^(?:[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 fe(f){return typeof f=="string"&&Ie.test(f)}for(var re=fe,ve=[],Ee=0;Ee<256;++Ee)ve.push((Ee+256).toString(16).substr(1));function o(f){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,y=(ve[f[_+0]]+ve[f[_+1]]+ve[f[_+2]]+ve[f[_+3]]+"-"+ve[f[_+4]]+ve[f[_+5]]+"-"+ve[f[_+6]]+ve[f[_+7]]+"-"+ve[f[_+8]]+ve[f[_+9]]+"-"+ve[f[_+10]]+ve[f[_+11]]+ve[f[_+12]]+ve[f[_+13]]+ve[f[_+14]]+ve[f[_+15]]).toLowerCase();if(!re(y))throw TypeError("Stringified UUID is invalid");return y}var $=o;function F(f,_,y){f=f||{};var U=f.random||(f.rng||me)();if(U[6]=U[6]&15|64,U[8]=U[8]&63|128,_){y=y||0;for(var K=0;K<16;++K)_[y+K]=U[K];return _}return $(U)}var w=F},93314:function($t){"use strict";$t.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($t,st,D){"use strict";D.d(st,{ZP:function(){return ls}});function R(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var _e={exports:{}};(function(a,e){(function(t){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,u={buildAbsoluteURL:function(d,m,g){if(g=g||{},d=d.trim(),m=m.trim(),!m){if(!g.alwaysNormalize)return d;var A=u.parseURL(d);if(!A)throw new Error("Error trying to parse base URL.");return A.path=u.normalizePath(A.path),u.buildURLFromParts(A)}var L=u.parseURL(m);if(!L)throw new Error("Error trying to parse relative URL.");if(L.scheme)return g.alwaysNormalize?(L.path=u.normalizePath(L.path),u.buildURLFromParts(L)):m;var V=u.parseURL(d);if(!V)throw new Error("Error trying to parse base URL.");if(!V.netLoc&&V.path&&V.path[0]!=="/"){var W=n.exec(V.path);V.netLoc=W[1],V.path=W[2]}V.netLoc&&!V.path&&(V.path="/");var Q={scheme:V.scheme,netLoc:L.netLoc,path:null,params:L.params,query:L.query,fragment:L.fragment};if(!L.netLoc&&(Q.netLoc=V.netLoc,L.path[0]!=="/"))if(!L.path)Q.path=V.path,L.params||(Q.params=V.params,L.query||(Q.query=V.query));else{var ie=V.path,Fe=ie.substring(0,ie.lastIndexOf("/")+1)+L.path;Q.path=u.normalizePath(Fe)}return Q.path===null&&(Q.path=g.alwaysNormalize?u.normalizePath(L.path):L.path),u.buildURLFromParts(Q)},parseURL:function(d){var m=r.exec(d);return m?{scheme:m[1]||"",netLoc:m[2]||"",path:m[3]||"",params:m[4]||"",query:m[5]||"",fragment:m[6]||""}:null},normalizePath:function(d){for(d=d.split("").reverse().join("").replace(i,"");d.length!==(d=d.replace(s,"")).length;);return d.split("").reverse().join("")},buildURLFromParts:function(d){return d.scheme+d.netLoc+d.path+d.params+d.query+d.fragment}};a.exports=u})()})(_e);var me=_e.exports;function Ie(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable})),t.push.apply(t,r)}return t}function fe(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ie(Object(t),!0).forEach(function(r){Ee(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Ie(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function re(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function ve(a){var e=re(a,"string");return typeof e=="symbol"?e:String(e)}function Ee(a,e,t){return e=ve(e),e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function o(){return o=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},o.apply(this,arguments)}const $=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},F=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=w},w=Number.MAX_SAFE_INTEGER||9007199254740991;let f=function(a){return a.MEDIA_ATTACHING="hlsMediaAttaching",a.MEDIA_ATTACHED="hlsMediaAttached",a.MEDIA_DETACHING="hlsMediaDetaching",a.MEDIA_DETACHED="hlsMediaDetached",a.BUFFER_RESET="hlsBufferReset",a.BUFFER_CODECS="hlsBufferCodecs",a.BUFFER_CREATED="hlsBufferCreated",a.BUFFER_APPENDING="hlsBufferAppending",a.BUFFER_APPENDED="hlsBufferAppended",a.BUFFER_EOS="hlsBufferEos",a.BUFFER_FLUSHING="hlsBufferFlushing",a.BUFFER_FLUSHED="hlsBufferFlushed",a.MANIFEST_LOADING="hlsManifestLoading",a.MANIFEST_LOADED="hlsManifestLoaded",a.MANIFEST_PARSED="hlsManifestParsed",a.LEVEL_SWITCHING="hlsLevelSwitching",a.LEVEL_SWITCHED="hlsLevelSwitched",a.LEVEL_LOADING="hlsLevelLoading",a.LEVEL_LOADED="hlsLevelLoaded",a.LEVEL_UPDATED="hlsLevelUpdated",a.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",a.LEVELS_UPDATED="hlsLevelsUpdated",a.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",a.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",a.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",a.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",a.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",a.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",a.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",a.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",a.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",a.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",a.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",a.CUES_PARSED="hlsCuesParsed",a.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",a.INIT_PTS_FOUND="hlsInitPtsFound",a.FRAG_LOADING="hlsFragLoading",a.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",a.FRAG_LOADED="hlsFragLoaded",a.FRAG_DECRYPTED="hlsFragDecrypted",a.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",a.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",a.FRAG_PARSING_METADATA="hlsFragParsingMetadata",a.FRAG_PARSED="hlsFragParsed",a.FRAG_BUFFERED="hlsFragBuffered",a.FRAG_CHANGED="hlsFragChanged",a.FPS_DROP="hlsFpsDrop",a.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",a.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",a.ERROR="hlsError",a.DESTROYING="hlsDestroying",a.KEY_LOADING="hlsKeyLoading",a.KEY_LOADED="hlsKeyLoaded",a.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",a.BACK_BUFFER_REACHED="hlsBackBufferReached",a.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",a}({}),_=function(a){return a.NETWORK_ERROR="networkError",a.MEDIA_ERROR="mediaError",a.KEY_SYSTEM_ERROR="keySystemError",a.MUX_ERROR="muxError",a.OTHER_ERROR="otherError",a}({}),y=function(a){return a.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",a.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",a.KEY_SYSTEM_NO_SESSION="keySystemNoSession",a.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",a.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",a.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",a.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",a.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",a.MANIFEST_LOAD_ERROR="manifestLoadError",a.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",a.MANIFEST_PARSING_ERROR="manifestParsingError",a.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",a.LEVEL_EMPTY_ERROR="levelEmptyError",a.LEVEL_LOAD_ERROR="levelLoadError",a.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",a.LEVEL_PARSING_ERROR="levelParsingError",a.LEVEL_SWITCH_ERROR="levelSwitchError",a.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",a.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",a.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",a.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",a.FRAG_LOAD_ERROR="fragLoadError",a.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",a.FRAG_DECRYPT_ERROR="fragDecryptError",a.FRAG_PARSING_ERROR="fragParsingError",a.FRAG_GAP="fragGap",a.REMUX_ALLOC_ERROR="remuxAllocError",a.KEY_LOAD_ERROR="keyLoadError",a.KEY_LOAD_TIMEOUT="keyLoadTimeOut",a.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",a.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",a.BUFFER_APPEND_ERROR="bufferAppendError",a.BUFFER_APPENDING_ERROR="bufferAppendingError",a.BUFFER_STALLED_ERROR="bufferStalledError",a.BUFFER_FULL_ERROR="bufferFullError",a.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",a.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",a.INTERNAL_EXCEPTION="internalException",a.INTERNAL_ABORTED="aborted",a.UNKNOWN="unknown",a}({});const U=function(){},K={trace:U,debug:U,log:U,warn:U,info:U,error:U};let O=K;function I(a){const e=self.console[a];return e?e.bind(self.console,`[${a}] >`):U}function H(a,...e){e.forEach(function(t){O[t]=a[t]?a[t].bind(a):I(t)})}function te(a,e){if(typeof console=="object"&&a===!0||typeof a=="object"){H(a,"debug","log","info","warn","error");try{O.log(`Debug logs enabled for "${e}" in hls.js version 1.5.20`)}catch(t){O=K}}else O=K}const S=O,j=/^(\d+)x(\d+)$/,ae=/(.+?)=(".*?"|.*?)(?:,|$)/g;class de{constructor(e){typeof e=="string"&&(e=de.parseAttrList(e)),o(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const r=new Uint8Array(t.length/2);for(let n=0;n<t.length/2;n++)r[n]=parseInt(t.slice(n*2,n*2+2),16);return r}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=j.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const r={},n='"';for(ae.lastIndex=0;(t=ae.exec(e))!==null;){let i=t[2];i.indexOf(n)===0&&i.lastIndexOf(n)===i.length-1&&(i=i.slice(1,-1));const s=t[1].trim();r[s]=i}return r}}function Se(a){return a!=="ID"&&a!=="CLASS"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function we(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"}class Me{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 n in r)if(Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==r[n]){S.warn(`DATERANGE tag attribute: "${n}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=n;break}e=o(new de({}),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"]);$(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($(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&&$(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 Y={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class B{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[Y.AUDIO]:null,[Y.VIDEO]:null,[Y.AUDIOVIDEO]:null},this.baseurl=e}setByteRange(e,t){const r=e.split("@",2);let n;r.length===1?n=(t==null?void 0:t.byteRangeEndOffset)||0:n=parseInt(r[1]),this._byteRange=[n,parseInt(r[0])+n]}get 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=me.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class Z extends B{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||!$(this.programDateTime))return null;const e=$(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,n,i,s=!1){const{elementaryStreams:u}=this,d=u[e];if(!d){u[e]={startPTS:t,endPTS:r,startDTS:n,endDTS:i,partial:s};return}d.startPTS=Math.min(d.startPTS,t),d.endPTS=Math.max(d.endPTS,r),d.startDTS=Math.min(d.startDTS,n),d.endDTS=Math.max(d.endDTS,i)}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[Y.AUDIO]=null,e[Y.VIDEO]=null,e[Y.AUDIOVIDEO]=null}}class X extends B{constructor(e,t,r,n,i){super(r),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.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=n;const s=e.enumeratedString("BYTERANGE");s&&this.setByteRange(s,i),i&&(this.fragOffset=i.fragOffset+i.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}const le=10;class q{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?$(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||le}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 b(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function x(a){const e=ze(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function G(a){const e=function(r,n,i){const s=r[n];r[n]=r[i],r[i]=s};e(a,0,3),e(a,1,2),e(a,4,5),e(a,6,7)}function ue(a){const e=a.split(":");let t=null;if(e[0]==="data"&&e.length===2){const r=e[1].split(";"),n=r[r.length-1].split(",");if(n.length===2){const i=n[0]==="base64",s=n[1];i?(r.splice(-1,1),t=b(s)):t=x(s)}}return t}function ze(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}const Xe=typeof self!="undefined"?self:void 0;var Ke={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Ze={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function pt(a){switch(a){case Ze.FAIRPLAY:return Ke.FAIRPLAY;case Ze.PLAYREADY:return Ke.PLAYREADY;case Ze.WIDEVINE:return Ke.WIDEVINE;case Ze.CLEARKEY:return Ke.CLEARKEY}}var ct={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",FAIRPLAY:"94ce86fb07ff4f43adb893d2fa968ca2",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function ht(a){if(a===ct.WIDEVINE)return Ke.WIDEVINE;if(a===ct.PLAYREADY)return Ke.PLAYREADY;if(a===ct.CENC||a===ct.CLEARKEY)return Ke.CLEARKEY}function jt(a){switch(a){case Ke.FAIRPLAY:return Ze.FAIRPLAY;case Ke.PLAYREADY:return Ze.PLAYREADY;case Ke.WIDEVINE:return Ze.WIDEVINE;case Ke.CLEARKEY:return Ze.CLEARKEY}}function Zt(a){const{drmSystems:e,widevineLicenseUrl:t}=a,r=e?[Ke.FAIRPLAY,Ke.WIDEVINE,Ke.PLAYREADY,Ke.CLEARKEY].filter(n=>!!e[n]):[];return!r[Ke.WIDEVINE]&&t&&r.push(Ke.WIDEVINE),r}const qt=function(a){return Xe!=null&&(a=Xe.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function Ut(a,e,t,r){let n;switch(a){case Ke.FAIRPLAY:n=["cenc","sinf"];break;case Ke.WIDEVINE:case Ke.PLAYREADY:n=["cenc"];break;case Ke.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return zt(n,e,t,r)}function zt(a,e,t,r){return[{initDataTypes:a,persistentState:r.persistentState||"optional",distinctiveIdentifier:r.distinctiveIdentifier||"optional",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:e.map(i=>({contentType:`audio/mp4; codecs="${i}"`,robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null})),videoCapabilities:t.map(i=>({contentType:`video/mp4; codecs="${i}"`,robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}))}]}function Bt(a){const e=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),r=t.substring(t.indexOf("<"),t.length),s=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(s){const u=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(u){const d=b(u).subarray(0,16);return G(d),d}}return null}function Oe(a,e,t){return Uint8Array.prototype.slice?a.slice(e,t):new Uint8Array(Array.prototype.slice.call(a,e,t))}const qe=(a,e)=>e+10<=a.length&&a[e]===73&&a[e+1]===68&&a[e+2]===51&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128,se=(a,e)=>e+10<=a.length&&a[e]===51&&a[e+1]===68&&a[e+2]===73&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128,Ne=(a,e)=>{const t=e;let r=0;for(;qe(a,e);){r+=10;const n=He(a,e+6);r+=n,se(a,e+10)&&(r+=10),e+=r}if(r>0)return a.subarray(t,t+r)},He=(a,e)=>{let t=0;return t=(a[e]&127)<<21,t|=(a[e+1]&127)<<14,t|=(a[e+2]&127)<<7,t|=a[e+3]&127,t},N=(a,e)=>qe(a,e)&&He(a,e+6)+10<=a.length-e,ee=a=>{const e=Le(a);for(let t=0;t<e.length;t++){const r=e[t];if(ye(r))return je(r)}},ye=a=>a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp",be=a=>{const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=He(a,4),r=10;return{type:e,size:t,data:a.subarray(r,r+t)}},Le=a=>{let e=0;const t=[];for(;qe(a,e);){const r=He(a,e+6);e+=10;const n=e+r;for(;e+8<n;){const i=be(a.subarray(e)),s=Be(i);s&&t.push(s),e+=i.size+10}se(a,e)&&(e+=10)}return t},Be=a=>a.type==="PRIV"?Ve(a):a.type[0]==="W"?Qe(a):nt(a),Ve=a=>{if(a.size<2)return;const e=bt(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}},nt=a=>{if(a.size<2)return;if(a.type==="TXXX"){let t=1;const r=bt(a.data.subarray(t),!0);t+=r.length+1;const n=bt(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=bt(a.data.subarray(1));return{key:a.type,data:e}},Qe=a=>{if(a.type==="WXXX"){if(a.size<2)return;let t=1;const r=bt(a.data.subarray(t),!0);t+=r.length+1;const n=bt(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=bt(a.data);return{key:a.type,data:e}},je=a=>{if(a.data.byteLength===8){const e=new Uint8Array(a.data),t=e[3]&1;let r=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return r/=45,t&&(r+=4772185884e-2),Math.round(r)}},bt=(a,e=!1)=>{const t=De();if(t){const m=t.decode(a);if(e){const g=m.indexOf("\0");return g!==-1?m.substring(0,g):m}return m.replace(/\0/g,"")}const r=a.length;let n,i,s,u="",d=0;for(;d<r;){if(n=a[d++],n===0&&e)return u;if(n===0||n===3)continue;switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:u+=String.fromCharCode(n);break;case 12:case 13:i=a[d++],u+=String.fromCharCode((n&31)<<6|i&63);break;case 14:i=a[d++],s=a[d++],u+=String.fromCharCode((n&15)<<12|(i&63)<<6|(s&63)<<0);break}}return u};let Ae;function De(){if(!navigator.userAgent.includes("PlayStation 4"))return!Ae&&typeof self.TextDecoder!="undefined"&&(Ae=new self.TextDecoder("utf-8")),Ae}const Ue={hexDump:function(a){let e="";for(let t=0;t<a.length;t++){let r=a[t].toString(16);r.length<2&&(r="0"+r),e+=r}return e}},it=Math.pow(2,32)-1,et=[].push,ft={video:1,audio:2,id3:3,text:4};function _t(a){return String.fromCharCode.apply(null,a)}function v(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function E(a,e){const t=P(a,e);return t<0?4294967296+t:t}function Ye(a,e){let t=E(a,e);return t*=Math.pow(2,32),t+=E(a,e+4),t}function P(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function oe(a,e,t){a[e]=t>>24,a[e+1]=t>>16&255,a[e+2]=t>>8&255,a[e+3]=t&255}function kt(a){const e=a.byteLength;for(let t=0;t<e;){const r=E(a,t);if(r>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=r>1?t+r:e}return!1}function ge(a,e){const t=[];if(!e.length)return t;const r=a.byteLength;for(let n=0;n<r;){const i=E(a,n),s=_t(a.subarray(n+4,n+8)),u=i>1?n+i:r;if(s===e[0])if(e.length===1)t.push(a.subarray(n+8,u));else{const d=ge(a.subarray(n+8,u),e.slice(1));d.length&&et.apply(t,d)}n=u}return t}function Pe(a){const e=[],t=a[0];let r=8;const n=E(a,r);r+=4;let i=0,s=0;t===0?(i=E(a,r),s=E(a,r+4),r+=8):(i=Ye(a,r),s=Ye(a,r+8),r+=16),r+=2;let u=a.length+s;const d=v(a,r);r+=2;for(let m=0;m<d;m++){let g=r;const A=E(a,g);g+=4;const L=A&2147483647;if((A&2147483648)>>>31===1)return S.warn("SIDX has hierarchical references (not supported)"),null;const W=E(a,g);g+=4,e.push({referenceSize:L,subsegmentDuration:W,info:{duration:W/n,start:u,end:u+L-1}}),u+=L,g+=4,r=g}return{earliestPresentationTime:i,timescale:n,version:t,referencesCount:d,references:e}}function Ge(a){const e=[],t=ge(a,["moov","trak"]);for(let n=0;n<t.length;n++){const i=t[n],s=ge(i,["tkhd"])[0];if(s){let u=s[0];const d=E(s,u===0?12:20),m=ge(i,["mdia","mdhd"])[0];if(m){u=m[0];const g=E(m,u===0?12:20),A=ge(i,["mdia","hdlr"])[0];if(A){const L=_t(A.subarray(8,12)),V={soun:Y.AUDIO,vide:Y.VIDEO}[L];if(V){const W=ge(i,["mdia","minf","stbl","stsd"])[0],Q=z(W);e[d]={timescale:g,type:V},e[V]=fe({timescale:g,id:d},Q)}}}}}return ge(a,["moov","mvex","trex"]).forEach(n=>{const i=E(n,4),s=e[i];s&&(s.default={duration:E(n,12),flags:E(n,20)})}),e}function z(a){const e=a.subarray(8),t=e.subarray(86),r=_t(e.subarray(4,8));let n=r;const i=r==="enca"||r==="encv";if(i){const u=ge(e,[r])[0].subarray(r==="enca"?28:78);ge(u,["sinf"]).forEach(m=>{const g=ge(m,["schm"])[0];if(g){const A=_t(g.subarray(4,8));if(A==="cbcs"||A==="cenc"){const L=ge(m,["frma"])[0];L&&(n=_t(L))}}})}switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const s=ge(t,["avcC"])[0];n+="."+ce(s[1])+ce(s[2])+ce(s[3]);break}case"mp4a":{const s=ge(e,[r])[0],u=ge(s.subarray(28),["esds"])[0];if(u&&u.length>12){let d=4;if(u[d++]!==3)break;d=J(u,d),d+=2;const m=u[d++];if(m&128&&(d+=2),m&64&&(d+=u[d++]),u[d++]!==4)break;d=J(u,d);const g=u[d++];if(g===64)n+="."+ce(g);else break;if(d+=12,u[d++]!==5)break;d=J(u,d);const A=u[d++];let L=(A&248)>>3;L===31&&(L+=1+((A&7)<<3)+((u[d]&224)>>5)),n+="."+L}break}case"hvc1":case"hev1":{const s=ge(t,["hvcC"])[0],u=s[1],d=["","A","B","C"][u>>6],m=u&31,g=E(s,2),A=(u&32)>>5?"H":"L",L=s[12],V=s.subarray(6,12);n+="."+d+m,n+="."+g.toString(16).toUpperCase(),n+="."+A+L;let W="";for(let Q=V.length;Q--;){const ie=V[Q];(ie||W)&&(W="."+ie.toString(16).toUpperCase()+W)}n+=W;break}case"dvh1":case"dvhe":{const s=ge(t,["dvcC"])[0],u=s[2]>>1&127,d=s[2]<<5&32|s[3]>>3&31;n+="."+Ce(u)+"."+Ce(d);break}case"vp09":{const s=ge(t,["vpcC"])[0],u=s[4],d=s[5],m=s[6]>>4&15;n+="."+Ce(u)+"."+Ce(d)+"."+Ce(m);break}case"av01":{const s=ge(t,["av1C"])[0],u=s[1]>>>5,d=s[1]&31,m=s[2]>>>7?"H":"M",g=(s[2]&64)>>6,A=(s[2]&32)>>5,L=u===2&&g?A?12:10:g?10:8,V=(s[2]&16)>>4,W=(s[2]&8)>>3,Q=(s[2]&4)>>2,ie=s[2]&3;n+="."+u+"."+Ce(d)+m+"."+Ce(L)+"."+V+"."+W+Q+ie+"."+Ce(1)+"."+Ce(1)+"."+Ce(1)+"."+0;break}}return{codec:n,encrypted:i}}function J(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function ce(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function Ce(a){return(a<10?"0":"")+a}function M(a,e){if(!a||!e)return a;const t=e.keyId;return t&&e.isCommonEncryption&&ge(a,["moov","trak"]).forEach(n=>{const s=ge(n,["mdia","minf","stbl","stsd"])[0].subarray(8);let u=ge(s,["enca"]);const d=u.length>0;d||(u=ge(s,["encv"])),u.forEach(m=>{const g=d?m.subarray(28):m.subarray(78);ge(g,["sinf"]).forEach(L=>{const V=xt(L);if(V){const W=V.subarray(8,24);W.some(Q=>Q!==0)||(S.log(`[eme] Patching keyId in 'enc${d?"a":"v"}>sinf>>tenc' box: ${Ue.hexDump(W)} -> ${Ue.hexDump(t)}`),V.set(t,8))}})})}),a}function xt(a){const e=ge(a,["schm"])[0];if(e){const t=_t(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return ge(a,["schi","tenc"])[0]}return null}function pe(a,e){return ge(e,["moof","traf"]).reduce((t,r)=>{const n=ge(r,["tfdt"])[0],i=n[0],s=ge(r,["tfhd"]).reduce((u,d)=>{const m=E(d,4),g=a[m];if(g){let A=E(n,4);if(i===1){if(A===it)return S.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),u;A*=it+1,A+=E(n,8)}const L=g.timescale||9e4,V=A/L;if($(V)&&(u===null||V<u))return V}return u},null);return s!==null&&$(s)&&(t===null||s<t)?s:t},null)}function Lt(a,e){let t=0,r=0,n=0;const i=ge(a,["moof","traf"]);for(let s=0;s<i.length;s++){const u=i[s],d=ge(u,["tfhd"])[0],m=E(d,4),g=e[m];if(!g)continue;const A=g.default,L=E(d,0)|(A==null?void 0:A.flags);let V=A==null?void 0:A.duration;L&8&&(L&2?V=E(d,12):V=E(d,8));const W=g.timescale||9e4,Q=ge(u,["trun"]);for(let ie=0;ie<Q.length;ie++){if(t=It(Q[ie]),!t&&V){const Fe=E(Q[ie],4);t=V*Fe}g.type===Y.VIDEO?r+=t/W:g.type===Y.AUDIO&&(n+=t/W)}}if(r===0&&n===0){let s=1/0,u=0,d=0;const m=ge(a,["sidx"]);for(let g=0;g<m.length;g++){const A=Pe(m[g]);if(A!=null&&A.references){s=Math.min(s,A.earliestPresentationTime/A.timescale);const L=A.references.reduce((V,W)=>V+W.info.duration||0,0);u=Math.max(u,L+A.earliestPresentationTime/A.timescale),d=u-s}}if(d&&$(d))return d}return r||n}function It(a){const e=E(a,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let r=0;const n=E(a,4);for(let i=0;i<n;i++){if(e&256){const s=E(a,t);r+=s,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return r}function Wt(a,e,t){ge(e,["moof","traf"]).forEach(r=>{ge(r,["tfhd"]).forEach(n=>{const i=E(n,4),s=a[i];if(!s)return;const u=s.timescale||9e4;ge(r,["tfdt"]).forEach(d=>{const m=d[0],g=t*u;if(g){let A=E(d,4);if(m===0)A-=g,A=Math.max(A,0),oe(d,4,A);else{A*=Math.pow(2,32),A+=E(d,8),A-=g,A=Math.max(A,0);const L=Math.floor(A/(it+1)),V=Math.floor(A%(it+1));oe(d,4,L),oe(d,8,V)}}})})})}function ur(a){const e={valid:null,remainder:null},t=ge(a,["moof"]);if(t.length<2)return e.remainder=a,e;const r=t[t.length-1];return e.valid=Oe(a,0,r.byteOffset-8),e.remainder=Oe(a,r.byteOffset-8),e}function Ct(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function Ot(a,e){const t=[],r=e.samples,n=e.timescale,i=e.id;let s=!1;return ge(r,["moof"]).map(d=>{const m=d.byteOffset-8;ge(d,["traf"]).map(A=>{const L=ge(A,["tfdt"]).map(V=>{const W=V[0];let Q=E(V,4);return W===1&&(Q*=Math.pow(2,32),Q+=E(V,8)),Q/n})[0];return L!==void 0&&(a=L),ge(A,["tfhd"]).map(V=>{const W=E(V,4),Q=E(V,0)&16777215,ie=(Q&1)!==0,Fe=(Q&2)!==0,tt=(Q&8)!==0;let Je=0;const yt=(Q&16)!==0;let at=0;const Rt=(Q&32)!==0;let vt=8;W===i&&(ie&&(vt+=8),Fe&&(vt+=4),tt&&(Je=E(V,vt),vt+=4),yt&&(at=E(V,vt),vt+=4),Rt&&(vt+=4),e.type==="video"&&(s=Re(e.codec)),ge(A,["trun"]).map(Mt=>{const Qt=Mt[0],At=E(Mt,0)&16777215,Nt=(At&1)!==0;let Or=0;const nr=(At&4)!==0,Ir=(At&256)!==0;let kr=0;const wr=(At&512)!==0;let Kr=0;const ln=(At&1024)!==0,dr=(At&2048)!==0;let ir=0;const Zr=E(Mt,4);let Ur=8;Nt&&(Or=E(Mt,Ur),Ur+=4),nr&&(Ur+=4);let sn=Or+m;for(let An=0;An<Zr;An++){if(Ir?(kr=E(Mt,Ur),Ur+=4):kr=Je,wr?(Kr=E(Mt,Ur),Ur+=4):Kr=at,ln&&(Ur+=4),dr&&(Qt===0?ir=E(Mt,Ur):ir=P(Mt,Ur),Ur+=4),e.type===Y.VIDEO){let $n=0;for(;$n<Kr;){const zn=E(r,sn);if(sn+=4,ot(s,r[sn])){const di=r.subarray(sn,sn+zn);dt(di,s?2:1,a+ir/n,t)}sn+=zn,$n+=zn+4}}a+=kr/n}}))})})}),t}function Re(a){if(!a)return!1;const e=a.indexOf("."),t=e<0?a:a.substring(0,e);return t==="hvc1"||t==="hev1"||t==="dvh1"||t==="dvhe"}function ot(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function dt(a,e,t,r){const n=mt(a);let i=0;i+=e;let s=0,u=0,d=0;for(;i<n.length;){s=0;do{if(i>=n.length)break;d=n[i++],s+=d}while(d===255);u=0;do{if(i>=n.length)break;d=n[i++],u+=d}while(d===255);const m=n.length-i;let g=i;if(u<m)i+=u;else if(u>m){S.error(`Malformed SEI payload. ${u} is too small, only ${m} bytes left to parse.`);break}if(s===4){if(n[g++]===181){const L=v(n,g);if(g+=2,L===49){const V=E(n,g);if(g+=4,V===1195456820){const W=n[g++];if(W===3){const Q=n[g++],ie=31&Q,Fe=64&Q,tt=Fe?2+ie*3:0,Je=new Uint8Array(tt);if(Fe){Je[0]=Q;for(let yt=1;yt<tt;yt++)Je[yt]=n[g++]}r.push({type:W,payloadType:s,pts:t,bytes:Je})}}}}}else if(s===5&&u>16){const A=[];for(let W=0;W<16;W++){const Q=n[g++].toString(16);A.push(Q.length==1?"0"+Q:Q),(W===3||W===5||W===7||W===9)&&A.push("-")}const L=u-16,V=new Uint8Array(L);for(let W=0;W<L;W++)V[W]=n[g++];r.push({payloadType:s,pts:t,uuid:A.join(""),userData:bt(V),userDataBytes:V})}}}function mt(a){const e=a.byteLength,t=[];let r=1;for(;r<e-2;)a[r]===0&&a[r+1]===0&&a[r+2]===3?(t.push(r+2),r+=2):r++;if(t.length===0)return a;const n=e-t.length,i=new Uint8Array(n);let s=0;for(r=0;r<n;s++,r++)s===t[0]&&(s++,t.shift()),i[r]=a[s];return i}function ut(a){const e=a[0];let t="",r="",n=0,i=0,s=0,u=0,d=0,m=0;if(e===0){for(;_t(a.subarray(m,m+1))!=="\0";)t+=_t(a.subarray(m,m+1)),m+=1;for(t+=_t(a.subarray(m,m+1)),m+=1;_t(a.subarray(m,m+1))!=="\0";)r+=_t(a.subarray(m,m+1)),m+=1;r+=_t(a.subarray(m,m+1)),m+=1,n=E(a,12),i=E(a,16),u=E(a,20),d=E(a,24),m=28}else if(e===1){m+=4,n=E(a,m),m+=4;const A=E(a,m);m+=4;const L=E(a,m);for(m+=4,s=Yo(2,32)*A+L,F(s)||(s=Number.MAX_SAFE_INTEGER,S.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),u=E(a,m),m+=4,d=E(a,m),m+=4;_t(a.subarray(m,m+1))!=="\0";)t+=_t(a.subarray(m,m+1)),m+=1;for(t+=_t(a.subarray(m,m+1)),m+=1;_t(a.subarray(m,m+1))!=="\0";)r+=_t(a.subarray(m,m+1)),m+=1;r+=_t(a.subarray(m,m+1)),m+=1}const g=a.subarray(m,a.byteLength);return{schemeIdUri:t,value:r,timeScale:n,presentationTime:s,presentationTimeDelta:i,eventDuration:u,id:d,payload:g}}function Et(a,...e){const t=e.length;let r=8,n=t;for(;n--;)r+=e[n].byteLength;const i=new Uint8Array(r);for(i[0]=r>>24&255,i[1]=r>>16&255,i[2]=r>>8&255,i[3]=r&255,i.set(a,4),n=0,r=8;n<t;n++)i.set(e[n],r),r+=e[n].byteLength;return i}function Kt(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let r,n;if(e){r=1,n=new Uint8Array(e.length*16);for(let u=0;u<e.length;u++){const d=e[u];if(d.byteLength!==16)throw new RangeError("Invalid key");n.set(d,u*16)}}else r=0,n=new Uint8Array;let i;r>0?(i=new Uint8Array(4),e.length>0&&new DataView(i.buffer).setUint32(0,e.length,!1)):i=new Uint8Array;const s=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(s.buffer).setUint32(0,t.byteLength,!1),Et([112,115,115,104],new Uint8Array([r,0,0,0]),a,i,n,s,t||new Uint8Array)}function hr(a){const e=[];if(a instanceof ArrayBuffer){const t=a.byteLength;let r=0;for(;r+32<t;){const n=new DataView(a,r),i=Xt(n);e.push(i),r+=i.size}}return e}function Xt(a){const e=a.getUint32(0),t=a.byteOffset,r=a.byteLength;if(r<e)return{offset:t,size:r};if(a.getUint32(4)!==1886614376)return{offset:t,size:e};const i=a.getUint32(8)>>>24;if(i!==0&&i!==1)return{offset:t,size:e};const s=a.buffer,u=Ue.hexDump(new Uint8Array(s,t+12,16)),d=a.getUint32(28);let m=null,g=null;if(i===0){if(e-32<d||d<22)return{offset:t,size:e};g=new Uint8Array(s,t+32,d)}else if(i===1){if(!d||r<t+32+d*16+16)return{offset:t,size:e};m=[];for(let A=0;A<d;A++)m.push(new Uint8Array(s,t+32+A*16,16))}return{version:i,systemId:u,kids:m,data:g,offset:t,size:e}}let lr={};class Jt{static clearKeyUriToKeyIdMap(){lr={}}constructor(e,t,r,n=[1],i=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=n,this.iv=i,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 Ze.FAIRPLAY:case Ze.WIDEVINE:case Ze.PLAYREADY:case Ze.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&&S.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const r=xr(e);return new Jt(this.method,this.uri,"identity",this.keyFormatVersions,r)}const t=ue(this.uri);if(t)switch(this.keyFormat){case Ze.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case Ze.PLAYREADY:{const r=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Kt(r,null,t),this.keyId=Bt(t);break}default:{let r=t.subarray(0,16);if(r.length!==16){const n=new Uint8Array(16);n.set(r,16-r.length),r=n}this.keyId=r;break}}if(!this.keyId||this.keyId.byteLength!==16){let r=lr[this.uri];if(!r){const n=Object.keys(lr).length%Number.MAX_SAFE_INTEGER;r=new Uint8Array(16),new DataView(r.buffer,12,4).setUint32(0,n),lr[this.uri]=r}this.keyId=r}return this}}function xr(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const Lr=/\{\$([a-zA-Z0-9-_]+)\}/g;function wt(a){return Lr.test(a)}function Tt(a,e,t){if(a.variableList!==null||a.hasVariableRefs)for(let r=t.length;r--;){const n=t[r],i=e[n];i&&(e[n]=tr(a,i))}}function tr(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(Lr,r=>{const n=r.substring(2,r.length-1),i=t==null?void 0:t[n];return i===void 0?(a.playlistParsingError||(a.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${n}"`)),r):i})}return e}function vr(a,e,t){let r=a.variableList;r||(a.variableList=r={});let n,i;if("QUERYPARAM"in e){n=e.QUERYPARAM;try{const s=new self.URL(t).searchParams;if(s.has(n))i=s.get(n);else throw new Error(`"${n}" does not match any query parameter in URI: "${t}"`)}catch(s){a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${s.message}`))}}else n=e.NAME,i=e.VALUE;n in r?a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${n}"`)):r[n]=i||""}function cr(a,e,t){const r=e.IMPORT;if(t&&r in t){let n=a.variableList;n||(a.variableList=n={}),n[r]=t[r]}else a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${r}"`))}function rr(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Mr(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}const Er={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 fr(a,e){const t=Er[e];return!!t&&!!t[a.slice(0,4)]}function mr(a,e,t=!0){return!a.split(",").some(r=>!gr(r,e,t))}function gr(a,e,t=!0){var r;const n=rr(t);return(r=n==null?void 0:n.isTypeSupported(Fr(a,e)))!=null?r:!1}function Fr(a,e){return`${e}/mp4;codecs="${a}"`}function Gr(a){if(a){const e=a.substring(0,4);return Er.video[e]}return 2}function Sr(a){return a.split(",").reduce((e,t)=>{const r=Er.video[t];return r?(r*2+e)/(e?3:2):(Er.audio[t]+e)/(e?2:1)},0)}const pr={};function _r(a,e=!0){if(pr[a])return pr[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[a];for(let r=0;r<t.length;r++)if(gr(t[r],"audio",e))return pr[a]=t[r],t[r];return a}const Pr=/flac|opus/i;function yr(a,e=!0){return a.replace(Pr,t=>_r(t.toLowerCase(),e))}function Dr(a,e){return a&&a!=="mp4a"?a:e&&e.split(",")[0]}function jr(a){const e=a.split(",");for(let t=0;t<e.length;t++){const r=e[t].split(".");if(r.length>2){let n=r.shift()+".";n+=parseInt(r.shift()).toString(16),n+=("000"+parseInt(r.shift()).toString(16)).slice(-4),e[t]=n}}return e.join(",")}const Tn=/#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,Yr=/#EXT-X-MEDIA:(.*)/g,br=/^#EXT(?:INF|-X-TARGETDURATION):/m,Cr=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"),vn=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 qr{static findGroup(e,t){for(let r=0;r<e.length;r++){const n=e[r];if(n.id===t)return n}}static resolve(e,t){return me.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return br.test(e)}static parseMasterPlaylist(e,t){const r=wt(e),n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:r},i=[];Tn.lastIndex=0;let s;for(;(s=Tn.exec(e))!=null;)if(s[1]){var u;const m=new de(s[1]);Tt(n,m,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const g=tr(n,s[2]),A={attrs:m,bitrate:m.decimalInteger("BANDWIDTH")||m.decimalInteger("AVERAGE-BANDWIDTH"),name:m.NAME,url:qr.resolve(g,t)},L=m.decimalResolution("RESOLUTION");L&&(A.width=L.width,A.height=L.height),en(m.CODECS,A),(u=A.unknownCodecs)!=null&&u.length||i.push(A),n.levels.push(A)}else if(s[3]){const m=s[3],g=s[4];switch(m){case"SESSION-DATA":{const A=new de(g);Tt(n,A,["DATA-ID","LANGUAGE","VALUE","URI"]);const L=A["DATA-ID"];L&&(n.sessionData===null&&(n.sessionData={}),n.sessionData[L]=A);break}case"SESSION-KEY":{const A=Jr(g,t,n);A.encrypted&&A.isSupported()?(n.sessionKeys===null&&(n.sessionKeys=[]),n.sessionKeys.push(A)):S.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${g}"`);break}case"DEFINE":{{const A=new de(g);Tt(n,A,["NAME","VALUE","QUERYPARAM"]),vr(n,A,t)}break}case"CONTENT-STEERING":{const A=new de(g);Tt(n,A,["SERVER-URI","PATHWAY-ID"]),n.contentSteering={uri:qr.resolve(A["SERVER-URI"],t),pathwayId:A["PATHWAY-ID"]||"."};break}case"START":{n.startTimeOffset=zr(g);break}}}const d=i.length>0&&i.length<n.levels.length;return n.levels=d?i:n.levels,n.levels.length===0&&(n.playlistParsingError=new Error("no levels found in manifest")),n}static parseMasterPlaylistMedia(e,t,r){let n;const i={},s=r.levels,u={AUDIO:s.map(m=>({id:m.attrs.AUDIO,audioCodec:m.audioCodec})),SUBTITLES:s.map(m=>({id:m.attrs.SUBTITLES,textCodec:m.textCodec})),"CLOSED-CAPTIONS":[]};let d=0;for(Yr.lastIndex=0;(n=Yr.exec(e))!==null;){const m=new de(n[1]),g=m.TYPE;if(g){const A=u[g],L=i[g]||[];i[g]=L,Tt(r,m,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const V=m.LANGUAGE,W=m["ASSOC-LANGUAGE"],Q=m.CHANNELS,ie=m.CHARACTERISTICS,Fe=m["INSTREAM-ID"],tt={attrs:m,bitrate:0,id:d++,groupId:m["GROUP-ID"]||"",name:m.NAME||V||"",type:g,default:m.bool("DEFAULT"),autoselect:m.bool("AUTOSELECT"),forced:m.bool("FORCED"),lang:V,url:m.URI?qr.resolve(m.URI,t):""};if(W&&(tt.assocLang=W),Q&&(tt.channels=Q),ie&&(tt.characteristics=ie),Fe&&(tt.instreamId=Fe),A!=null&&A.length){const Je=qr.findGroup(A,tt.groupId)||A[0];tn(tt,Je,"audioCodec"),tn(tt,Je,"textCodec")}L.push(tt)}}return i}static parseLevelPlaylist(e,t,r,n,i,s){const u=new q(t),d=u.fragments;let m=null,g=0,A=0,L=0,V=0,W=null,Q=new Z(n,t),ie,Fe,tt,Je=-1,yt=!1,at=null;for(Cr.lastIndex=0,u.m3u8=e,u.hasVariableRefs=wt(e);(ie=Cr.exec(e))!==null;){yt&&(yt=!1,Q=new Z(n,t),Q.start=L,Q.sn=g,Q.cc=V,Q.level=r,m&&(Q.initSegment=m,Q.rawProgramDateTime=m.rawProgramDateTime,m.rawProgramDateTime=null,at&&(Q.setByteRange(at),at=null)));const Qt=ie[1];if(Qt){Q.duration=parseFloat(Qt);const At=(" "+ie[2]).slice(1);Q.title=At||null,Q.tagList.push(At?["INF",Qt,At]:["INF",Qt])}else if(ie[3]){if($(Q.duration)){Q.start=L,tt&&Dn(Q,tt,u),Q.sn=g,Q.level=r,Q.cc=V,d.push(Q);const At=(" "+ie[3]).slice(1);Q.relurl=tr(u,At),_n(Q,W),W=Q,L+=Q.duration,g++,A=0,yt=!0}}else if(ie[4]){const At=(" "+ie[4]).slice(1);W?Q.setByteRange(At,W):Q.setByteRange(At)}else if(ie[5])Q.rawProgramDateTime=(" "+ie[5]).slice(1),Q.tagList.push(["PROGRAM-DATE-TIME",Q.rawProgramDateTime]),Je===-1&&(Je=d.length);else{if(ie=ie[0].match(vn),!ie){S.warn("No matches on slow regex match for level playlist!");continue}for(Fe=1;Fe<ie.length&&typeof ie[Fe]=="undefined";Fe++);const At=(" "+ie[Fe]).slice(1),Nt=(" "+ie[Fe+1]).slice(1),Or=ie[Fe+2]?(" "+ie[Fe+2]).slice(1):"";switch(At){case"PLAYLIST-TYPE":u.type=Nt.toUpperCase();break;case"MEDIA-SEQUENCE":g=u.startSN=parseInt(Nt);break;case"SKIP":{const nr=new de(Nt);Tt(u,nr,["RECENTLY-REMOVED-DATERANGES"]);const Ir=nr.decimalInteger("SKIPPED-SEGMENTS");if($(Ir)){u.skippedSegments=Ir;for(let wr=Ir;wr--;)d.unshift(null);g+=Ir}const kr=nr.enumeratedString("RECENTLY-REMOVED-DATERANGES");kr&&(u.recentlyRemovedDateranges=kr.split(" "));break}case"TARGETDURATION":u.targetduration=Math.max(parseInt(Nt),1);break;case"VERSION":u.version=parseInt(Nt);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":u.live=!1;break;case"#":(Nt||Or)&&Q.tagList.push(Or?[Nt,Or]:[Nt]);break;case"DISCONTINUITY":V++,Q.tagList.push(["DIS"]);break;case"GAP":Q.gap=!0,Q.tagList.push([At]);break;case"BITRATE":Q.tagList.push([At,Nt]);break;case"DATERANGE":{const nr=new de(Nt);Tt(u,nr,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),Tt(u,nr,nr.clientAttrs);const Ir=new Me(nr,u.dateRanges[nr.ID]);Ir.isValid||u.skippedSegments?u.dateRanges[Ir.id]=Ir:S.warn(`Ignoring invalid DATERANGE tag: "${Nt}"`),Q.tagList.push(["EXT-X-DATERANGE",Nt]);break}case"DEFINE":{{const nr=new de(Nt);Tt(u,nr,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in nr?cr(u,nr,s):vr(u,nr,t)}break}case"DISCONTINUITY-SEQUENCE":V=parseInt(Nt);break;case"KEY":{const nr=Jr(Nt,t,u);if(nr.isSupported()){if(nr.method==="NONE"){tt=void 0;break}tt||(tt={}),tt[nr.keyFormat]&&(tt=o({},tt)),tt[nr.keyFormat]=nr}else S.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${Nt}"`);break}case"START":u.startTimeOffset=zr(Nt);break;case"MAP":{const nr=new de(Nt);if(Tt(u,nr,["BYTERANGE","URI"]),Q.duration){const Ir=new Z(n,t);kn(Ir,nr,r,tt),m=Ir,Q.initSegment=m,m.rawProgramDateTime&&!Q.rawProgramDateTime&&(Q.rawProgramDateTime=m.rawProgramDateTime)}else{const Ir=Q.byteRangeEndOffset;if(Ir){const kr=Q.byteRangeStartOffset;at=`${Ir-kr}@${kr}`}else at=null;kn(Q,nr,r,tt),m=Q,yt=!0}break}case"SERVER-CONTROL":{const nr=new de(Nt);u.canBlockReload=nr.bool("CAN-BLOCK-RELOAD"),u.canSkipUntil=nr.optionalFloat("CAN-SKIP-UNTIL",0),u.canSkipDateRanges=u.canSkipUntil>0&&nr.bool("CAN-SKIP-DATERANGES"),u.partHoldBack=nr.optionalFloat("PART-HOLD-BACK",0),u.holdBack=nr.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const nr=new de(Nt);u.partTarget=nr.decimalFloatingPoint("PART-TARGET");break}case"PART":{let nr=u.partList;nr||(nr=u.partList=[]);const Ir=A>0?nr[nr.length-1]:void 0,kr=A++,wr=new de(Nt);Tt(u,wr,["BYTERANGE","URI"]);const Kr=new X(wr,Q,t,kr,Ir);nr.push(Kr),Q.duration+=Kr.duration;break}case"PRELOAD-HINT":{const nr=new de(Nt);Tt(u,nr,["URI"]),u.preloadHint=nr;break}case"RENDITION-REPORT":{const nr=new de(Nt);Tt(u,nr,["URI"]),u.renditionReports=u.renditionReports||[],u.renditionReports.push(nr);break}default:S.warn(`line parsed but not handled: ${ie}`);break}}}W&&!W.relurl?(d.pop(),L-=W.duration,u.partList&&(u.fragmentHint=W)):u.partList&&(_n(Q,W),Q.cc=V,u.fragmentHint=Q,tt&&Dn(Q,tt,u));const Rt=d.length,vt=d[0],Mt=d[Rt-1];if(L+=u.skippedSegments*u.targetduration,L>0&&Rt&&Mt){u.averagetargetduration=L/Rt;const Qt=Mt.sn;u.endSN=Qt!=="initSegment"?Qt:0,u.live||(Mt.endList=!0),vt&&(u.startCC=vt.cc)}else u.endSN=0,u.startCC=0;return u.fragmentHint&&(L+=u.fragmentHint.duration),u.totalduration=L,u.endCC=V,Je>0&&rn(d,Je),u}}function Jr(a,e,t){var r,n;const i=new de(a);Tt(t,i,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const s=(r=i.METHOD)!=null?r:"",u=i.URI,d=i.hexadecimalInteger("IV"),m=i.KEYFORMATVERSIONS,g=(n=i.KEYFORMAT)!=null?n:"identity";u&&i.IV&&!d&&S.error(`Invalid IV: ${i.IV}`);const A=u?qr.resolve(u,e):"",L=(m||"1").split("/").map(Number).filter(Number.isFinite);return new Jt(s,A,g,L,d)}function zr(a){const t=new de(a).decimalFloatingPoint("TIME-OFFSET");return $(t)?t:null}function en(a,e){let t=(a||"").split(/[ ,]+/).filter(r=>r);["video","audio","text"].forEach(r=>{const n=t.filter(i=>fr(i,r));n.length&&(e[`${r}Codec`]=n.join(","),t=t.filter(i=>n.indexOf(i)===-1))}),e.unknownCodecs=t}function tn(a,e,t){const r=e[t];r&&(a[t]=r)}function rn(a,e){let t=a[e];for(let r=e;r--;){const n=a[r];if(!n)return;n.programDateTime=t.programDateTime-n.duration*1e3,t=n}}function _n(a,e){a.rawProgramDateTime?a.programDateTime=Date.parse(a.rawProgramDateTime):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime),$(a.programDateTime)||(a.programDateTime=null,a.rawProgramDateTime=null)}function kn(a,e,t,r){a.relurl=e.URI,e.BYTERANGE&&a.setByteRange(e.BYTERANGE),a.level=t,a.sn="initSegment",r&&(a.levelkeys=r),a.initSegment=null}function Dn(a,e,t){a.levelkeys=e;const{encryptedFragments:r}=t;(!r.length||r[r.length-1].levelkeys!==e)&&Object.keys(e).some(n=>e[n].isCommonEncryption)&&r.push(a)}var Gt={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ke={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Ht(a){const{type:e}=a;switch(e){case Gt.AUDIO_TRACK:return ke.AUDIO;case Gt.SUBTITLE_TRACK:return ke.SUBTITLE;default:return ke.MAIN}}function ar(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class Wr{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(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(f.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_LOADING,this.onLevelLoading,this),e.off(f.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(f.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,r=t.pLoader,n=t.loader,i=r||n,s=new i(t);return this.loaders[e.type]=s,s}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:r}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:Gt.MANIFEST,url:r,deliveryDirectives:null})}onLevelLoading(e,t){const{id:r,level:n,pathwayId:i,url:s,deliveryDirectives:u}=t;this.load({id:r,level:n,pathwayId:i,responseType:"text",type:Gt.LEVEL,url:s,deliveryDirectives:u})}onAudioTrackLoading(e,t){const{id:r,groupId:n,url:i,deliveryDirectives:s}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:Gt.AUDIO_TRACK,url:i,deliveryDirectives:s})}onSubtitleTrackLoading(e,t){const{id:r,groupId:n,url:i,deliveryDirectives:s}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:Gt.SUBTITLE_TRACK,url:i,deliveryDirectives:s})}load(e){var t;const r=this.hls.config;let n=this.getInternalLoader(e);if(n){const m=n.context;if(m&&m.url===e.url&&m.level===e.level){S.trace("[playlist-loader]: playlist request ongoing");return}S.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),n.abort()}let i;if(e.type===Gt.MANIFEST?i=r.manifestLoadPolicy.default:i=o({},r.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),n=this.createInternalLoader(e),$((t=e.deliveryDirectives)==null?void 0:t.part)){let m;if(e.type===Gt.LEVEL&&e.level!==null?m=this.hls.levels[e.level].details:e.type===Gt.AUDIO_TRACK&&e.id!==null?m=this.hls.audioTracks[e.id].details:e.type===Gt.SUBTITLE_TRACK&&e.id!==null&&(m=this.hls.subtitleTracks[e.id].details),m){const g=m.partTarget,A=m.targetduration;if(g&&A){const L=Math.max(g*3,A*.8)*1e3;i=o({},i,{maxTimeToFirstByteMs:Math.min(L,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(L,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},u={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},d={onSuccess:(m,g,A,L)=>{const V=this.getInternalLoader(A);this.resetInternalLoader(A.type);const W=m.data;if(W.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(m,A,new Error("no EXTM3U delimiter"),L||null,g);return}g.parsing.start=performance.now(),qr.isMediaPlaylist(W)?this.handleTrackOrLevelPlaylist(m,g,A,L||null,V):this.handleMasterPlaylist(m,g,A,L)},onError:(m,g,A,L)=>{this.handleNetworkError(g,A,!1,m,L)},onTimeout:(m,g,A)=>{this.handleNetworkError(g,A,!0,void 0,m)}};n.load(e,u,d)}handleMasterPlaylist(e,t,r,n){const i=this.hls,s=e.data,u=ar(e,r),d=qr.parseMasterPlaylist(s,u);if(d.playlistParsingError){this.handleManifestParsingError(e,r,d.playlistParsingError,n,t);return}const{contentSteering:m,levels:g,sessionData:A,sessionKeys:L,startTimeOffset:V,variableList:W}=d;this.variableList=W;const{AUDIO:Q=[],SUBTITLES:ie,"CLOSED-CAPTIONS":Fe}=qr.parseMasterPlaylistMedia(s,u,d);Q.length&&!Q.some(Je=>!Je.url)&&g[0].audioCodec&&!g[0].attrs.AUDIO&&(S.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),Q.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new de({}),bitrate:0,url:""})),i.trigger(f.MANIFEST_LOADED,{levels:g,audioTracks:Q,subtitles:ie,captions:Fe,contentSteering:m,url:u,stats:t,networkDetails:n,sessionData:A,sessionKeys:L,startTimeOffset:V,variableList:W})}handleTrackOrLevelPlaylist(e,t,r,n,i){const s=this.hls,{id:u,level:d,type:m}=r,g=ar(e,r),A=0,L=$(d)?d:$(u)?u:0,V=Ht(r),W=qr.parseLevelPlaylist(e.data,g,L,V,A,this.variableList);if(m===Gt.MANIFEST){const Q={attrs:new de({}),bitrate:0,details:W,name:"",url:g};s.trigger(f.MANIFEST_LOADED,{levels:[Q],audioTracks:[],url:g,stats:t,networkDetails:n,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),r.levelDetails=W,this.handlePlaylistLoaded(W,e,t,r,n,i)}handleManifestParsingError(e,t,r,n,i){this.hls.trigger(f.ERROR,{type:_.NETWORK_ERROR,details:y.MANIFEST_PARSING_ERROR,fatal:t.type===Gt.MANIFEST,url:e.url,err:r,error:r,reason:r.message,response:e,context:t,networkDetails:n,stats:i})}handleNetworkError(e,t,r=!1,n,i){let s=`A network ${r?"timeout":"error"+(n?" (status "+n.code+")":"")} occurred while loading ${e.type}`;e.type===Gt.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===Gt.AUDIO_TRACK||e.type===Gt.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const u=new Error(s);S.warn(`[playlist-loader]: ${s}`);let d=y.UNKNOWN,m=!1;const g=this.getInternalLoader(e);switch(e.type){case Gt.MANIFEST:d=r?y.MANIFEST_LOAD_TIMEOUT:y.MANIFEST_LOAD_ERROR,m=!0;break;case Gt.LEVEL:d=r?y.LEVEL_LOAD_TIMEOUT:y.LEVEL_LOAD_ERROR,m=!1;break;case Gt.AUDIO_TRACK:d=r?y.AUDIO_TRACK_LOAD_TIMEOUT:y.AUDIO_TRACK_LOAD_ERROR,m=!1;break;case Gt.SUBTITLE_TRACK:d=r?y.SUBTITLE_TRACK_LOAD_TIMEOUT:y.SUBTITLE_LOAD_ERROR,m=!1;break}g&&this.resetInternalLoader(e.type);const A={type:_.NETWORK_ERROR,details:d,fatal:m,url:e.url,loader:g,context:e,error:u,networkDetails:t,stats:i};if(n){const L=(t==null?void 0:t.url)||e.url;A.response=fe({url:L,data:void 0},n)}this.hls.trigger(f.ERROR,A)}handlePlaylistLoaded(e,t,r,n,i,s){const u=this.hls,{type:d,level:m,id:g,groupId:A,deliveryDirectives:L}=n,V=ar(t,n),W=Ht(n),Q=typeof n.level=="number"&&W===ke.MAIN?m:void 0;if(!e.fragments.length){const Fe=new Error("No Segments found in Playlist");u.trigger(f.ERROR,{type:_.NETWORK_ERROR,details:y.LEVEL_EMPTY_ERROR,fatal:!1,url:V,error:Fe,reason:Fe.message,response:t,context:n,level:Q,parent:W,networkDetails:i,stats:r});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const ie=e.playlistParsingError;if(ie){u.trigger(f.ERROR,{type:_.NETWORK_ERROR,details:y.LEVEL_PARSING_ERROR,fatal:!1,url:V,error:ie,reason:ie.message,response:t,context:n,level:Q,parent:W,networkDetails:i,stats:r});return}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),d){case Gt.MANIFEST:case Gt.LEVEL:u.trigger(f.LEVEL_LOADED,{details:e,level:Q||0,id:g||0,stats:r,networkDetails:i,deliveryDirectives:L});break;case Gt.AUDIO_TRACK:u.trigger(f.AUDIO_TRACK_LOADED,{details:e,id:g||0,groupId:A||"",stats:r,networkDetails:i,deliveryDirectives:L});break;case Gt.SUBTITLE_TRACK:u.trigger(f.SUBTITLE_TRACK_LOADED,{details:e,id:g||0,groupId:A||"",stats:r,networkDetails:i,deliveryDirectives:L});break}}}function En(a,e){let t;try{t=new Event("addtrack")}catch(r){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=a,e.dispatchEvent(t)}function Ln(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(e.id))try{if(a.addCue(e),!a.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(r){S.debug(`[texttrack-utils]: ${r}`);try{const n=new self.TextTrackCue(e.startTime,e.endTime,e.text);n.id=e.id,a.addCue(n)}catch(n){S.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${n}`)}}t==="disabled"&&(a.mode=t)}function yn(a){const e=a.mode;if(e==="disabled"&&(a.mode="hidden"),a.cues)for(let t=a.cues.length;t--;)a.removeCue(a.cues[t]);e==="disabled"&&(a.mode=e)}function Nr(a,e,t,r){const n=a.mode;if(n==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=In(a.cues,e,t);for(let s=0;s<i.length;s++)(!r||r(i[s]))&&a.removeCue(i[s])}n==="disabled"&&(a.mode=n)}function bn(a,e){if(e<a[0].startTime)return 0;const t=a.length-1;if(e>a[t].endTime)return-1;let r=0,n=t;for(;r<=n;){const i=Math.floor((n+r)/2);if(e<a[i].startTime)n=i-1;else if(e>a[i].startTime&&r<t)r=i+1;else return i}return a[r].startTime-e<e-a[n].startTime?r:n}function In(a,e,t){const r=[],n=bn(a,e);if(n>-1)for(let i=n,s=a.length;i<s;i++){const u=a[i];if(u.startTime>=e&&u.endTime<=t)r.push(u);else if(u.startTime>t)return r}return r}function an(a){const e=[];for(let t=0;t<a.length;t++){const r=a[t];(r.kind==="subtitles"||r.kind==="captions")&&r.label&&e.push(a[t])}return e}var pn={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const zi=.25;function ti(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function li(a,e,t,r,n){let i=new a(e,t,"");try{i.value=r,n&&(i.type=n)}catch(s){i=new a(e,t,JSON.stringify(n?fe({type:n},r):r))}return i}const er=(()=>{const a=ti();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Gn(a,e){return a.getTime()/1e3-e}function mn(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class Fn{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(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(yn(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 En(r,this.media),r}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:r,enableID3MetadataCues:n}}}=this;if(!r&&!n)return;const{samples:i}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=ti();if(s)for(let u=0;u<i.length;u++){const d=i[u].type;if(d===pn.emsg&&!r||!n)continue;const m=Le(i[u].data);if(m){const g=i[u].pts;let A=g+i[u].duration;A>er&&(A=er),A-g<=0&&(A=g+zi);for(let V=0;V<m.length;V++){const W=m[V];if(!ye(W)){this.updateId3CueEnds(g,d);const Q=li(s,g,A,W,d);Q&&this.id3Track.addCue(Q)}}}}}updateId3CueEnds(e,t){var r;const n=(r=this.id3Track)==null?void 0:r.cues;if(n)for(let i=n.length;i--;){const s=n[i];s.type===t&&s.startTime<e&&s.endTime===er&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:r,type:n}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:u,enableID3MetadataCues:d}}=s;if(i&&(u||d)){let m;n==="audio"?m=g=>g.type===pn.audioId3&&d:n==="video"?m=g=>g.type===pn.emsg&&u:m=g=>g.type===pn.audioId3&&d||g.type===pn.emsg&&u,Nr(i,t,r,m)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:r,id3Track:n}=this,{dateRanges:i}=t,s=Object.keys(i);if(n){const g=Object.keys(r).filter(A=>!s.includes(A));for(let A=g.length;A--;){const L=g[A];Object.keys(r[L].cues).forEach(V=>{n.removeCue(r[L].cues[V])}),delete r[L]}}const u=t.fragments[t.fragments.length-1];if(s.length===0||!$(u==null?void 0:u.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const d=u.programDateTime/1e3-u.start,m=ti();for(let g=0;g<s.length;g++){const A=s[g],L=i[A],V=Gn(L.startDate,d),W=r[A],Q=(W==null?void 0:W.cues)||{};let ie=(W==null?void 0:W.durationKnown)||!1,Fe=er;const tt=L.endDate;if(tt)Fe=Gn(tt,d),ie=!0;else if(L.endOnNext&&!ie){const yt=s.reduce((at,Rt)=>{if(Rt!==L.id){const vt=i[Rt];if(vt.class===L.class&&vt.startDate>L.startDate&&(!at||L.startDate<at.startDate))return vt}return at},null);yt&&(Fe=Gn(yt.startDate,d),ie=!0)}const Je=Object.keys(L.attr);for(let yt=0;yt<Je.length;yt++){const at=Je[yt];if(!Se(at))continue;const Rt=Q[at];if(Rt)ie&&!W.durationKnown&&(Rt.endTime=Fe);else if(m){let vt=L.attr[at];we(at)&&(vt=mn(vt));const Mt=li(m,V,Fe,{key:at,data:vt},pn.dateRange);Mt&&(Mt.id=A,this.id3Track.addCue(Mt),Q[at]=Mt)}}r[A]={cues:Q,dateRange:L,durationKnown:ie}}}}class Gi{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:n}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:u}=this.config,d=this.hls.userConfig;let m=u&&r||t;(d.liveSyncDuration||d.liveSyncDurationCount||m===0)&&(m=i!==void 0?i:s*n);const g=n;return m+Math.min(this.stallCount*1,g)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,r=this.levelDetails;if(e===null||t===null||r===null)return null;const n=r.edge,i=e-t-this.edgeStalled,s=n-r.totalduration,u=n-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(s,i),u)}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(f.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(f.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(f.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(f.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(f.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===y.BUFFER_STALLED_ERROR&&(this.stallCount++,(r=this.levelDetails)!=null&&r.live&&S.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:n,maxLiveSyncPlaybackRate:i}=this.config;if(!n||i===1||!t.live)return;const s=this.targetLatency;if(s===null)return;const u=r-s,d=Math.min(this.maxLatency,s+t.targetduration);if(u<d&&u>.05&&this.forwardBufferLength>1){const g=Math.min(2,Math.max(1,i)),A=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20;e.playbackRate=Math.min(g,Math.max(1,A))}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 ui=["NONE","TYPE-0","TYPE-1",null];function ri(a){return ui.indexOf(a)>-1}const Yn=["SDR","PQ","HLG"];function hn(a){return!!a&&Yn.indexOf(a)>-1}var qn={No:"",Yes:"YES",v2:"v2"};function Kn(a){const{canSkipUntil:e,canSkipDateRanges:t,age:r}=a,n=r<e/2;return e&&n?t?qn.v2:qn.Yes:qn.No}class ki{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 On{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 Un(this._audioGroups,e)}hasSubtitleGroup(e){return Un(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 Un(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Br(a,e){const t=e.startPTS;if($(t)){let r=0,n;e.sn>a.sn?(r=t-a.start,n=a):(r=a.start-t,n=e),n.duration!==r&&(n.duration=r)}else e.sn>a.sn?a.cc===e.cc&&a.minEndPTS?e.start=a.start+(a.minEndPTS-a.start):e.start=a.start+a.duration:e.start=Math.max(a.start-e.duration,0)}function pi(a,e,t,r,n,i){r-t<=0&&(S.warn("Fragment should have a positive duration",e),r=t+e.duration,i=n+e.duration);let u=t,d=r;const m=e.startPTS,g=e.endPTS;if($(m)){const ie=Math.abs(m-t);$(e.deltaPTS)?e.deltaPTS=Math.max(ie,e.deltaPTS):e.deltaPTS=ie,u=Math.max(t,m),t=Math.min(t,m),n=Math.min(n,e.startDTS),d=Math.min(r,g),r=Math.max(r,g),i=Math.max(i,e.endDTS)}const A=t-e.start;e.start!==0&&(e.start=t),e.duration=r-e.start,e.startPTS=t,e.maxStartPTS=u,e.startDTS=n,e.endPTS=r,e.minEndPTS=d,e.endDTS=i;const L=e.sn;if(!a||L<a.startSN||L>a.endSN)return 0;let V;const W=L-a.startSN,Q=a.fragments;for(Q[W]=e,V=W;V>0;V--)Br(Q[V],Q[V-1]);for(V=W;V<Q.length-1;V++)Br(Q[V],Q[V+1]);return a.fragmentHint&&Br(Q[Q.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,A}function Li(a,e){let t=null;const r=a.fragments;for(let u=r.length-1;u>=0;u--){const d=r[u].initSegment;if(d){t=d;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let n;mi(a,e,(u,d,m,g)=>{if(e.skippedSegments&&d.cc!==u.cc){const A=u.cc-d.cc;for(let L=m;L<g.length;L++)g[L].cc+=A}$(u.startPTS)&&$(u.endPTS)&&(d.start=d.startPTS=u.startPTS,d.startDTS=u.startDTS,d.maxStartPTS=u.maxStartPTS,d.endPTS=u.endPTS,d.endDTS=u.endDTS,d.minEndPTS=u.minEndPTS,d.duration=u.endPTS-u.startPTS,d.duration&&(n=d),e.PTSKnown=e.alignedSliding=!0),d.elementaryStreams=u.elementaryStreams,d.loader=u.loader,d.stats=u.stats,u.initSegment&&(d.initSegment=u.initSegment,t=u.initSegment)});const i=e.fragments;if(t&&(e.fragmentHint?i.concat(e.fragmentHint):i).forEach(d=>{var m;d&&(!d.initSegment||d.initSegment.relurl===((m=t)==null?void 0:m.relurl))&&(d.initSegment=t)}),e.skippedSegments){if(e.deltaUpdateFailed=i.some(u=>!u),e.deltaUpdateFailed){S.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let u=e.skippedSegments;u--;)i.shift();e.startSN=i[0].sn}else e.canSkipDateRanges&&(e.dateRanges=Ii(a.dateRanges,e.dateRanges,e.recentlyRemovedDateranges));e.startCC=e.fragments[0].cc,e.endCC=i[i.length-1].cc}Pn(a.partList,e.partList,(u,d)=>{d.elementaryStreams=u.elementaryStreams,d.stats=u.stats}),n?pi(e,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):Hi(a,e),i.length&&(e.totalduration=e.edge-i[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const s=e.advancedDateTime;if(e.advanced&&s){const u=e.edge;e.driftStart||(e.driftStartTime=s,e.driftStart=u),e.driftEndTime=s,e.driftEnd=u}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime}function Ii(a,e,t){const r=o({},a);return t&&t.forEach(n=>{delete r[n]}),Object.keys(e).forEach(n=>{const i=new Me(e[n].attr,r[n]);i.isValid?r[n]=i:S.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(e[n].attr)}"`)}),r}function Pn(a,e,t){if(a&&e){let r=0;for(let n=0,i=a.length;n<=i;n++){const s=a[n],u=e[n+r];s&&u&&s.index===u.index&&s.fragment.sn===u.fragment.sn?t(s,u):r--}}}function mi(a,e,t){const r=e.skippedSegments,n=Math.max(a.startSN,e.startSN)-e.startSN,i=(a.fragmentHint?1:0)+(r?e.endSN:Math.min(a.endSN,e.endSN))-e.startSN,s=e.startSN-a.startSN,u=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,d=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let m=n;m<=i;m++){const g=d[s+m];let A=u[m];r&&!A&&m<r&&(A=e.fragments[m]=g),g&&A&&t(g,A,m,u)}}function Hi(a,e){const t=e.startSN+e.skippedSegments-a.startSN,r=a.fragments;t<0||t>=r.length||Pt(e,r[t].start)}function Pt(a,e){if(e){const t=a.fragments;for(let r=a.skippedSegments;r<t.length;r++)t[r].start+=e;a.fragmentHint&&(a.fragmentHint.start+=e)}}function Mn(a,e=1/0){let t=1e3*a.targetduration;if(a.updated){const r=a.fragments;if(r.length&&t*4>e){const i=r[r.length-1].duration*1e3;i<t&&(t=i)}}else t/=2;return Math.round(t)}function Fi(a,e,t){if(!(a!=null&&a.details))return null;const r=a.details;let n=r.fragments[e-r.startSN];return n||(n=r.fragmentHint,n&&n.sn===e)?n:e<r.startSN&&t&&t.sn===e?t:null}function gi(a,e,t){var r;return a!=null&&a.details?Cn((r=a.details)==null?void 0:r.partList,e,t):null}function Cn(a,e,t){if(a)for(let r=a.length;r--;){const n=a[r];if(n.index===t&&n.fragment.sn===e)return n}return null}function gn(a){a.forEach((e,t)=>{const{details:r}=e;r!=null&&r.fragments&&r.fragments.forEach(n=>{n.level=t})})}function Hr(a){switch(a.details){case y.FRAG_LOAD_TIMEOUT:case y.KEY_LOAD_TIMEOUT:case y.LEVEL_LOAD_TIMEOUT:case y.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Vn(a,e){const t=Hr(e);return a.default[`${t?"timeout":"error"}Retry`]}function Xn(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function ci(a){return fe(fe({},a),{errorRetry:null,timeoutRetry:null})}function Qn(a,e,t,r){if(!a)return!1;const n=r==null?void 0:r.code,i=e<a.maxNumRetry&&(Oi(n)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,r,i):i}function Oi(a){return a===0&&navigator.onLine===!1||!!a&&(a<400||a>499)}const Pi={search:function(a,e){let t=0,r=a.length-1,n=null,i=null;for(;t<=r;){n=(t+r)/2|0,i=a[n];const s=e(i);if(s>0)t=n+1;else if(s<0)r=n-1;else return i}return null}};function ji(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!$(e))return null;const r=a[0].programDateTime;if(e<(r||0))return null;const n=a[a.length-1].endProgramDateTime;if(e>=(n||0))return null;t=t||0;for(let i=0;i<a.length;++i){const s=a[i];if(ts(e,t,s))return s}return null}function Si(a,e,t=0,r=0,n=.005){let i=null;if(a){i=e[a.sn-e[0].sn+1]||null;const u=a.endDTS-t;u>0&&u<15e-7&&(t+=15e-7)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&Mi(t,r,i)===0||es(i,a,Math.min(n,r))))return i;const s=Pi.search(e,Mi.bind(null,t,r));return s&&(s!==a||!i)?s:i}function es(a,e,t){if(e&&e.start===0&&e.level<a.level&&(e.endPTS||0)>0){const r=e.tagList.reduce((n,i)=>(i[0]==="INF"&&(n+=parseFloat(i[1])),n),t);return a.start<=r}return!1}function Mi(a=0,e=0,t){if(t.start<=a&&t.start+t.duration>a)return 0;const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-r<=a?1:t.start-r>a&&t.start?-1:0}function ts(a,e,t){const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-r>a}function or(a,e){return Pi.search(a,t=>t.cc<e?1:t.cc>e?-1:0)}var Yt={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},$r={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class fn{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=S.log.bind(S,"[info]:"),this.warn=S.warn.bind(S,"[warning]:"),this.error=S.error.bind(S,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(f.ERROR,this.onError,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(f.ERROR,this.onError,this),e.off(f.ERROR,this.onErrorOut,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.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)===ke.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var r,n;if(t.fatal)return;const i=this.hls,s=t.context;switch(t.details){case y.FRAG_LOAD_ERROR:case y.FRAG_LOAD_TIMEOUT:case y.KEY_LOAD_ERROR:case y.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case y.FRAG_PARSING_ERROR:if((r=t.frag)!=null&&r.gap){t.errorAction={action:Yt.DoNothing,flags:$r.None};return}case y.FRAG_GAP:case y.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=Yt.SendAlternateToPenaltyBox;return}case y.LEVEL_EMPTY_ERROR:case y.LEVEL_PARSING_ERROR:{var u,d;const m=t.parent===ke.MAIN?t.level:i.loadLevel;t.details===y.LEVEL_EMPTY_ERROR&&((u=t.context)!=null&&(d=u.levelDetails)!=null&&d.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,m):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,m))}return;case y.LEVEL_LOAD_ERROR:case y.LEVEL_LOAD_TIMEOUT:typeof(s==null?void 0:s.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,s.level));return;case y.AUDIO_TRACK_LOAD_ERROR:case y.AUDIO_TRACK_LOAD_TIMEOUT:case y.SUBTITLE_LOAD_ERROR:case y.SUBTITLE_TRACK_LOAD_TIMEOUT:if(s){const m=i.levels[i.loadLevel];if(m&&(s.type===Gt.AUDIO_TRACK&&m.hasAudioGroup(s.groupId)||s.type===Gt.SUBTITLE_TRACK&&m.hasSubtitleGroup(s.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.loadLevel),t.errorAction.action=Yt.SendAlternateToPenaltyBox,t.errorAction.flags=$r.MoveAllAlternatesMatchingHost;return}}return;case y.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const m=i.levels[i.loadLevel],g=m==null?void 0:m.attrs["HDCP-LEVEL"];g?t.errorAction={action:Yt.SendAlternateToPenaltyBox,flags:$r.MoveAllAlternatesMatchingHDCP,hdcpLevel:g}:this.keySystemError(t)}return;case y.BUFFER_ADD_CODEC_ERROR:case y.REMUX_ALLOC_ERROR:case y.BUFFER_APPEND_ERROR:t.errorAction=this.getLevelSwitchAction(t,(n=t.level)!=null?n:i.loadLevel);return;case y.INTERNAL_EXCEPTION:case y.BUFFER_APPENDING_ERROR:case y.BUFFER_FULL_ERROR:case y.LEVEL_SWITCH_ERROR:case y.BUFFER_STALLED_ERROR:case y.BUFFER_SEEK_OVER_HOLE:case y.BUFFER_NUDGE_ON_STALL:t.errorAction={action:Yt.DoNothing,flags:$r.None};return}t.type===_.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,n=Vn(r.config.playlistLoadPolicy,e),i=this.playlistError++;if(Qn(n,i,Hr(e),e.response))return{action:Yt.RetryRequest,flags:$r.None,retryConfig:n,retryCount:i};const u=this.getLevelSwitchAction(e,t);return n&&(u.retryConfig=n,u.retryCount=i),u}getFragRetryOrSwitchAction(e){const t=this.hls,r=this.getVariantLevelIndex(e.frag),n=t.levels[r],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,u=Vn(e.details.startsWith("key")?s:i,e),d=t.levels.reduce((g,A)=>g+A.fragmentError,0);if(n&&(e.details!==y.FRAG_GAP&&n.fragmentError++,Qn(u,d,Hr(e),e.response)))return{action:Yt.RetryRequest,flags:$r.None,retryConfig:u,retryCount:d};const m=this.getLevelSwitchAction(e,r);return u&&(m.retryConfig=u,m.retryCount=d),m}getLevelSwitchAction(e,t){const r=this.hls;t==null&&(t=r.loadLevel);const n=this.hls.levels[t];if(n){var i,s;const m=e.details;n.loadError++,m===y.BUFFER_APPEND_ERROR&&n.fragmentError++;let g=-1;const{levels:A,loadLevel:L,minAutoLevel:V,maxAutoLevel:W}=r;r.autoLevelEnabled||(r.loadLevel=-1);const Q=(i=e.frag)==null?void 0:i.type,Fe=(Q===ke.AUDIO&&m===y.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(m===y.BUFFER_ADD_CODEC_ERROR||m===y.BUFFER_APPEND_ERROR))&&A.some(({audioCodec:Rt})=>n.audioCodec!==Rt),Je=e.sourceBufferName==="video"&&(m===y.BUFFER_ADD_CODEC_ERROR||m===y.BUFFER_APPEND_ERROR)&&A.some(({codecSet:Rt,audioCodec:vt})=>n.codecSet!==Rt&&n.audioCodec===vt),{type:yt,groupId:at}=(s=e.context)!=null?s:{};for(let Rt=A.length;Rt--;){const vt=(Rt+L)%A.length;if(vt!==L&&vt>=V&&vt<=W&&A[vt].loadError===0){var u,d;const Mt=A[vt];if(m===y.FRAG_GAP&&Q===ke.MAIN&&e.frag){const Qt=A[vt].details;if(Qt){const At=Si(e.frag,Qt.fragments,e.frag.start);if(At!=null&&At.gap)continue}}else{if(yt===Gt.AUDIO_TRACK&&Mt.hasAudioGroup(at)||yt===Gt.SUBTITLE_TRACK&&Mt.hasSubtitleGroup(at))continue;if(Q===ke.AUDIO&&(u=n.audioGroups)!=null&&u.some(Qt=>Mt.hasAudioGroup(Qt))||Q===ke.SUBTITLE&&(d=n.subtitleGroups)!=null&&d.some(Qt=>Mt.hasSubtitleGroup(Qt))||Fe&&n.audioCodec===Mt.audioCodec||!Fe&&n.audioCodec!==Mt.audioCodec||Je&&n.codecSet===Mt.codecSet)continue}g=vt;break}}if(g>-1&&r.loadLevel!==g)return e.levelRetry=!0,this.playlistError=0,{action:Yt.SendAlternateToPenaltyBox,flags:$r.None,nextAutoLevel:g}}return{action:Yt.SendAlternateToPenaltyBox,flags:$r.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var r;switch((r=t.errorAction)==null?void 0:r.action){case Yt.DoNothing:break;case Yt.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==y.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 Yt.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,r=e.errorAction;if(!r)return;const{flags:n,hdcpLevel:i,nextAutoLevel:s}=r;switch(n){case $r.None:this.switchLevel(e,s);break;case $r.MoveAllAlternatesMatchingHDCP:i&&(t.maxHdcpLevel=ui[ui.indexOf(i)-1],r.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}r.resolved||this.switchLevel(e,s)}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 on{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=S.log.bind(S,`${t}:`),this.warn=S.warn.bind(S,`${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 n=t==null?void 0:t.renditionReports;if(n){let i=-1;for(let s=0;s<n.length;s++){const u=n[s];let d;try{d=new self.URL(u.URI,t.url).href}catch(m){S.warn(`Could not construct new URL for Rendition Report: ${m}`),d=u.URI||""}if(d===e){i=s;break}else d===e.substring(0,d.length)&&(i=s)}if(i!==-1){const s=n[i],u=parseInt(s["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let d=parseInt(s["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const g=Math.min(t.age-t.partTarget,t.targetduration);d>=0&&g>t.partTarget&&(d+=1)}const m=r&&Kn(r);return new ki(u,d>=0?d:void 0,m)}}}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:n,stats:i}=t,s=self.performance.now(),u=i.loading.first?Math.max(0,s-i.loading.first):0;if(n.advancedDateTime=Date.now()-u,n.live||r!=null&&r.live){if(n.reloaded(r),r&&this.log(`live playlist ${e} ${n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:n.updated?"UPDATED":"MISSED"}`),r&&n.fragments.length>0&&Li(r,n),!this.canLoad||!n.live)return;let d,m,g;if(n.canBlockReload&&n.endSN&&n.advanced){const ie=this.hls.config.lowLatencyMode,Fe=n.lastPartSn,tt=n.endSN,Je=n.lastPartIndex,yt=Je!==-1,at=Fe===tt,Rt=ie?0:Je;yt?(m=at?tt+1:Fe,g=at?Rt:Je+1):m=tt+1;const vt=n.age,Mt=vt+n.ageHeader;let Qt=Math.min(Mt-n.partTarget,n.targetduration*1.5);if(Qt>0){if(r&&Qt>r.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${r.tuneInGoal} to: ${Qt} with playlist age: ${n.age}`),Qt=0;else{const At=Math.floor(Qt/n.targetduration);if(m+=At,g!==void 0){const Nt=Math.round(Qt%n.targetduration/n.partTarget);g+=Nt}this.log(`CDN Tune-in age: ${n.ageHeader}s last advanced ${vt.toFixed(2)}s goal: ${Qt} skip sn ${At} to part ${g}`)}n.tuneInGoal=Qt}if(d=this.getDeliveryDirectives(n,t.deliveryDirectives,m,g),ie||!at){this.loadPlaylist(d);return}}else(n.canBlockReload||n.canSkipUntil)&&(d=this.getDeliveryDirectives(n,t.deliveryDirectives,m,g));const A=this.hls.mainForwardBufferInfo,L=A?A.end-A.len:0,V=(n.edge-L)*1e3,W=Mn(n,V);n.updated&&s>this.requestScheduled+W&&(this.requestScheduled=i.loading.start),m!==void 0&&n.canBlockReload?this.requestScheduled=i.loading.first+W-(n.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+W<s?this.requestScheduled=s:this.requestScheduled-s<=0&&(this.requestScheduled+=W);let Q=this.requestScheduled-s;Q=Math.max(0,Q),this.log(`reload live playlist ${e} in ${Math.round(Q)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(d),Q)}else this.clearTimer()}getDeliveryDirectives(e,t,r,n){let i=Kn(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(r=t.msn,n=t.part,i=qn.No),new ki(r,n,i)}checkRetry(e){const t=e.details,r=Hr(e),n=e.errorAction,{action:i,retryCount:s=0,retryConfig:u}=n||{},d=!!n&&!!u&&(i===Yt.RetryRequest||!n.resolved&&i===Yt.SendAlternateToPenaltyBox);if(d){var m;if(this.requestScheduled=-1,s>=u.maxNumRetry)return!1;if(r&&(m=e.context)!=null&&m.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${u.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const g=Xn(u,s);this.timer=self.setTimeout(()=>this.loadPlaylist(),g),this.warn(`Retrying playlist loading ${s+1}/${u.maxNumRetry} after "${t}" in ${g}ms`)}e.levelRetry=!0,n.resolved=!0}return d}}class Hn{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 Wi{constructor(e,t,r,n=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Hn(e),this.fast_=new Hn(t),this.defaultTTFB_=n,this.ttfb_=new Hn(e)}update(e,t){const{slow_:r,fast_:n,ttfb_:i}=this;r.halfLife!==e&&(this.slow_=new Hn(e,r.getEstimate(),r.getTotalWeight())),n.halfLife!==t&&(this.fast_=new Hn(t,n.getEstimate(),n.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new Hn(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const r=8*t,n=e/1e3,i=r/n;this.fast_.sample(n,i),this.slow_.sample(n,i)}sampleTTFB(e){const t=e/1e3,r=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(r,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const Ki={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},ni={};function Ls(a,e,t,r,n,i){const s=a.audioCodec?a.audioGroups:null,u=i==null?void 0:i.audioCodec,d=i==null?void 0:i.channels,m=d?parseInt(d):u?1/0:2;let g=null;if(s!=null&&s.length)try{s.length===1&&s[0]?g=e.groups[s[0]].channels:g=s.reduce((A,L)=>{if(L){const V=e.groups[L];if(!V)throw new Error(`Audio track group ${L} not found`);Object.keys(V.channels).forEach(W=>{A[W]=(A[W]||0)+V.channels[W]})}return A},{2:0})}catch(A){return!0}return a.videoCodec!==void 0&&(a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(r,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(n,8e6))||!!g&&$(m)&&Object.keys(g).some(A=>parseInt(A)>m)}function ra(a,e,t){const r=a.videoCodec,n=a.audioCodec;if(!r||!n||!t)return Promise.resolve(Ki);const i={width:a.width,height:a.height,bitrate:Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)),framerate:a.frameRate||30},s=a.videoRange;s!=="SDR"&&(i.transferFunction=s.toLowerCase());const u=r.split(",").map(d=>({type:"media-source",video:fe(fe({},i),{},{contentType:Fr(d,"video")})}));return n&&a.audioGroups&&a.audioGroups.forEach(d=>{var m;d&&((m=e.groups[d])==null||m.tracks.forEach(g=>{if(g.groupId===d){const A=g.channels||"",L=parseFloat(A);$(L)&&L>2&&u.push.apply(u,n.split(",").map(V=>({type:"media-source",audio:{contentType:Fr(V,"audio"),channels:""+L}})))}}))}),Promise.all(u.map(d=>{const m=Oa(d);return ni[m]||(ni[m]=t.decodingInfo(d))})).then(d=>({supported:!d.some(m=>!m.supported),configurations:u,decodingInfoResults:d})).catch(d=>({supported:!1,configurations:u,decodingInfoResults:[],error:d}))}function Oa(a){const{audio:e,video:t}=a,r=t||e;if(r){const n=r.contentType.split('"')[1];if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${n}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${n}`}return""}function Pa(){if(typeof matchMedia=="function"){const a=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(a.media!==e.media)return a.matches===!0}return!1}function na(a,e){let t=!1,r=[];return a&&(t=a!=="SDR",r=[a]),e&&(r=e.allowedVideoRanges||Yn.slice(0),t=e.preferHDR!==void 0?e.preferHDR:Pa(),t?r=r.filter(n=>n!=="SDR"):r=["SDR"]),{preferHDR:t,allowedVideoRanges:r}}function Ai(a,e,t,r,n){const i=Object.keys(a),s=r==null?void 0:r.channels,u=r==null?void 0:r.audioCodec,d=s&&parseInt(s)===2;let m=!0,g=!1,A=1/0,L=1/0,V=1/0,W=0,Q=[];const{preferHDR:ie,allowedVideoRanges:Fe}=na(e,n);for(let at=i.length;at--;){const Rt=a[i[at]];m=Rt.channels[2]>0,A=Math.min(A,Rt.minHeight),L=Math.min(L,Rt.minFramerate),V=Math.min(V,Rt.minBitrate);const vt=Fe.filter(Mt=>Rt.videoRanges[Mt]>0);vt.length>0&&(g=!0,Q=vt)}A=$(A)?A:0,L=$(L)?L:0;const tt=Math.max(1080,A),Je=Math.max(30,L);return V=$(V)?V:t,t=Math.max(V,t),g||(e=void 0,Q=[]),{codecSet:i.reduce((at,Rt)=>{const vt=a[Rt];if(Rt===at)return at;if(vt.minBitrate>t)return Zn(Rt,`min bitrate of ${vt.minBitrate} > current estimate of ${t}`),at;if(!vt.hasDefaultAudio)return Zn(Rt,"no renditions with default or auto-select sound found"),at;if(u&&Rt.indexOf(u.substring(0,4))%5!==0)return Zn(Rt,`audio codec preference "${u}" not found`),at;if(s&&!d){if(!vt.channels[s])return Zn(Rt,`no renditions with ${s} channel sound found (channels options: ${Object.keys(vt.channels)})`),at}else if((!u||d)&&m&&vt.channels[2]===0)return Zn(Rt,"no renditions with stereo sound found"),at;return vt.minHeight>tt?(Zn(Rt,`min resolution of ${vt.minHeight} > maximum of ${tt}`),at):vt.minFramerate>Je?(Zn(Rt,`min framerate of ${vt.minFramerate} > maximum of ${Je}`),at):Q.some(Mt=>vt.videoRanges[Mt]>0)?vt.maxScore<W?(Zn(Rt,`max score of ${vt.maxScore} < selected max of ${W}`),at):at&&(Sr(Rt)>=Sr(at)||vt.fragmentError>a[at].fragmentError)?at:(W=vt.maxScore,Rt):(Zn(Rt,`no variants with VIDEO-RANGE of ${JSON.stringify(Q)} found`),at)},void 0),videoRanges:Q,preferHDR:ie,minFramerate:L,minBitrate:V}}function Zn(a,e){S.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function ia(a){return a.reduce((e,t)=>{let r=e.groups[t.groupId];r||(r=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),r.tracks.push(t);const n=t.channels||"2";return r.channels[n]=(r.channels[n]||0)+1,r.hasDefault=r.hasDefault||t.default,r.hasAutoSelect=r.hasAutoSelect||t.autoselect,r.hasDefault&&(e.hasDefaultAudio=!0),r.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function Is(a,e,t,r){return a.slice(t,r+1).reduce((n,i)=>{if(!i.codecSet)return n;const s=i.audioGroups;let u=n[i.codecSet];u||(n[i.codecSet]=u={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!s,fragmentError:0}),u.minBitrate=Math.min(u.minBitrate,i.bitrate);const d=Math.min(i.height,i.width);return u.minHeight=Math.min(u.minHeight,d),u.minFramerate=Math.min(u.minFramerate,i.frameRate),u.maxScore=Math.max(u.maxScore,i.score),u.fragmentError+=i.fragmentError,u.videoRanges[i.videoRange]=(u.videoRanges[i.videoRange]||0)+1,s&&s.forEach(m=>{if(!m)return;const g=e.groups[m];g&&(u.hasDefaultAudio=u.hasDefaultAudio||e.hasDefaultAudio?g.hasDefault:g.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(g.channels).forEach(A=>{u.channels[A]=(u.channels[A]||0)+g.channels[A]}))}),n},{})}function Jn(a,e,t){if("attrs"in a){const r=e.indexOf(a);if(r!==-1)return r}for(let r=0;r<e.length;r++){const n=e[r];if(vi(a,n,t))return r}return-1}function vi(a,e,t){const{groupId:r,name:n,lang:i,assocLang:s,default:u}=a,d=a.forced;return(r===void 0||e.groupId===r)&&(n===void 0||e.name===n)&&(i===void 0||e.lang===i)&&(i===void 0||e.assocLang===s)&&(u===void 0||e.default===u)&&(d===void 0||e.forced===d)&&(!("characteristics"in a)||Ma(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function Ma(a,e=""){const t=a.split(","),r=e.split(",");return t.length===r.length&&!t.some(n=>r.indexOf(n)===-1)}function Ti(a,e){const{audioCodec:t,channels:r}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(r===void 0||r===(e.channels||"2"))}function Ba(a,e,t,r,n){const i=e[r],u=e.reduce((L,V,W)=>{const Q=V.uri;return(L[Q]||(L[Q]=[])).push(W),L},{})[i.uri];u.length>1&&(r=Math.max.apply(Math,u));const d=i.videoRange,m=i.frameRate,g=i.codecSet.substring(0,4),A=Fs(e,r,L=>{if(L.videoRange!==d||L.frameRate!==m||L.codecSet.substring(0,4)!==g)return!1;const V=L.audioGroups,W=t.filter(Q=>!V||V.indexOf(Q.groupId)!==-1);return Jn(a,W,n)>-1});return A>-1?A:Fs(e,r,L=>{const V=L.audioGroups,W=t.filter(Q=>!V||V.indexOf(Q.groupId)!==-1);return Jn(a,W,n)>-1})}function Fs(a,e,t){for(let r=e;r>-1;r--)if(t(a[r]))return r;for(let r=e+1;r<a.length;r++)if(t(a[r]))return r;return-1}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:n}=this,{autoLevelEnabled:i,media:s}=n;if(!t||!s)return;const u=performance.now(),d=r?r.stats:t.stats,m=r?r.duration:t.duration,g=u-d.loading.start,A=n.minAutoLevel;if(d.aborted||d.loaded&&d.loaded===d.total||t.level<=A){this.clearTimer(),this._nextAutoLevel=-1;return}if(!i||s.paused||!s.playbackRate||!s.readyState)return;const L=n.mainForwardBufferInfo;if(L===null)return;const V=this.bwEstimator.getEstimateTTFB(),W=Math.abs(s.playbackRate);if(g<=Math.max(V,1e3*(m/(W*2))))return;const Q=L.len/W,ie=d.loading.first?d.loading.first-d.loading.start:-1,Fe=d.loaded&&ie>-1,tt=this.getBwEstimate(),Je=n.levels,yt=Je[t.level],at=d.total||Math.max(d.loaded,Math.round(m*yt.averageBitrate/8));let Rt=Fe?g-ie:g;Rt<1&&Fe&&(Rt=Math.min(g,d.loaded*8/tt));const vt=Fe?d.loaded*1e3/Rt:0,Mt=vt?(at-d.loaded)/vt:at*8/tt+V/1e3;if(Mt<=Q)return;const Qt=vt?vt*8:tt;let At=Number.POSITIVE_INFINITY,Nt;for(Nt=t.level-1;Nt>A;Nt--){const nr=Je[Nt].maxBitrate;if(At=this.getTimeToLoadFrag(V/1e3,Qt,m*nr,!Je[Nt].details),At<Q)break}if(At>=Mt||At>m*10)return;n.nextLoadLevel=n.nextAutoLevel=Nt,Fe?this.bwEstimator.sample(g-Math.min(V,ie),d.loaded):this.bwEstimator.sampleTTFB(g);const Or=Je[Nt].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>Or&&this.resetEstimator(Or),this.clearTimer(),S.warn(`[abr] Fragment ${t.sn}${r?" part "+r.index:""} of level ${t.level} is loading too slowly;
|
|
|
Time to underbuffer: ${Q.toFixed(3)} s
|
|
|
Estimated load time for current fragment: ${Mt.toFixed(3)} s
|
|
|
Estimated load time for down switch fragment: ${At.toFixed(3)} s
|
|
|
TTFB estimate: ${ie|0} ms
|
|
|
Current BW estimate: ${$(tt)?tt|0:"Unknown"} bps
|
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
|
Switching to level ${Nt} @ ${Or|0} bps`),n.trigger(f.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:r,stats:d})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(S.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 Wi(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.FRAG_LOADING,this.onFragLoading,this),e.on(f.FRAG_LOADED,this.onFragLoaded,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this),e.on(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.FRAG_LOADING,this.onFragLoading,this),e.off(f.FRAG_LOADED,this.onFragLoaded,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this),e.off(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(f.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 n;this.fragCurrent=r,this.partCurrent=(n=t.part)!=null?n:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case y.BUFFER_ADD_CODEC_ERROR:case y.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case y.FRAG_LOAD_TIMEOUT:{const r=t.frag,{fragCurrent:n,partCurrent:i}=this;if(r&&n&&r.sn===n.sn&&r.level===n.level){const s=performance.now(),u=i?i.stats:r.stats,d=s-u.loading.start,m=u.loading.first?u.loading.first-u.loading.start:-1;if(u.loaded&&m>-1){const A=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(d-Math.min(A,m),u.loaded)}else this.bwEstimator.sampleTTFB(d)}break}}}getTimeToLoadFrag(e,t,r,n){const i=e+r/t,s=n?this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const r=this.hls.config,{loading:n}=t.stats,i=n.end-n.start;$(i)&&(this.lastLevelLoadSec=i/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 n=r?r.stats:t.stats;if(t.type===ke.MAIN&&this.bwEstimator.sampleTTFB(n.loading.first-n.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const i=r?r.duration:t.duration,s=this.hls.levels[t.level],u=(s.loaded?s.loaded.bytes:0)+n.loaded,d=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:u,duration:d},s.realBitrate=Math.round(8*u/d)}if(t.bitrateTest){const i={stats:n,frag:t,part:r,id:t.type};this.onFragBuffered(f.FRAG_BUFFERED,i),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:r,part:n}=t,i=n!=null&&n.stats.loaded?n.stats:r.stats;if(i.aborted||this.ignoreFragment(r))return;const s=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(s,i.loaded),i.bwEstimate=this.getBwEstimate(),r.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==ke.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,r=this.getBwEstimate(),n=this.hls.config.maxStarvationDelay,i=this.findBestLevel(r,t,e,0,n,1,1);if(i>-1)return i;const s=this.hls.firstLevel,u=Math.min(Math.max(s,t),e);return S.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${u}`),u}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,r=this.bwEstimator.canEstimate(),n=this.lastLoadedFragLevel>-1;if(e!==-1&&(!r||!n||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const i=r&&n?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const s=this.hls.levels;if(s.length>Math.max(e,i)&&s[e].loadError<=s[i].loadError)return e}return this._nextAutoLevel=i,this.nextAutoLevelKey=this.getAutoLevelKey(),i}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:r}=this,{maxAutoLevel:n,config:i,minAutoLevel:s}=r,u=t?t.duration:e?e.duration:0,d=this.getBwEstimate(),m=this.getStarvationDelay();let g=i.abrBandWidthFactor,A=i.abrBandWidthUpFactor;if(m){const ie=this.findBestLevel(d,s,n,m,0,g,A);if(ie>=0)return ie}let L=u?Math.min(u,i.maxStarvationDelay):i.maxStarvationDelay;if(!m){const ie=this.bitrateTestDelay;ie&&(L=(u?Math.min(u,i.maxLoadingDelay):i.maxLoadingDelay)-ie,S.info(`[abr] bitrate test took ${Math.round(1e3*ie)}ms, set first fragment max fetchDuration to ${Math.round(1e3*L)} ms`),g=A=1)}const V=this.findBestLevel(d,s,n,m,L,g,A);if(S.info(`[abr] ${m?"rebuffering expected":"buffer is empty"}, optimal quality level ${V}`),V>-1)return V;const W=r.levels[s],Q=r.levels[r.loadLevel];return(W==null?void 0:W.bitrate)<(Q==null?void 0:Q.bitrate)?s:r.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const r=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,n=e.mainForwardBufferInfo;return(n?n.len:0)/r}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,r,n,i,s,u){var d;const m=n+i,g=this.lastLoadedFragLevel,A=g===-1?this.hls.firstLevel:g,{fragCurrent:L,partCurrent:V}=this,{levels:W,allAudioTracks:Q,loadLevel:ie,config:Fe}=this.hls;if(W.length===1)return 0;const tt=W[A],Je=!!(tt!=null&&(d=tt.details)!=null&&d.live),yt=ie===-1||g===-1;let at,Rt="SDR",vt=(tt==null?void 0:tt.frameRate)||0;const{audioPreference:Mt,videoPreference:Qt}=Fe,At=this.audioTracksByGroup||(this.audioTracksByGroup=ia(Q));if(yt){if(this.firstSelection!==-1)return this.firstSelection;const kr=this.codecTiers||(this.codecTiers=Is(W,At,t,r)),wr=Ai(kr,Rt,e,Mt,Qt),{codecSet:Kr,videoRanges:ln,minFramerate:dr,minBitrate:ir,preferHDR:Zr}=wr;at=Kr,Rt=Zr?ln[ln.length-1]:ln[0],vt=dr,e=Math.max(e,ir),S.log(`[abr] picked start tier ${JSON.stringify(wr)}`)}else at=tt==null?void 0:tt.codecSet,Rt=tt==null?void 0:tt.videoRange;const Nt=V?V.duration:L?L.duration:0,Or=this.bwEstimator.getEstimateTTFB()/1e3,nr=[];for(let kr=r;kr>=t;kr--){var Ir;const wr=W[kr],Kr=kr>A;if(!wr)continue;if(Fe.useMediaCapabilities&&!wr.supportedResult&&!wr.supportedPromise){const An=navigator.mediaCapabilities;typeof(An==null?void 0:An.decodingInfo)=="function"&&Ls(wr,At,Rt,vt,e,Mt)?(wr.supportedPromise=ra(wr,At,An),wr.supportedPromise.then($n=>{if(!this.hls)return;wr.supportedResult=$n;const zn=this.hls.levels,di=zn.indexOf(wr);$n.error?S.warn(`[abr] MediaCapabilities decodingInfo error: "${$n.error}" for level ${di} ${JSON.stringify($n)}`):$n.supported||(S.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${di} ${JSON.stringify($n)}`),di>-1&&zn.length>1&&(S.log(`[abr] Removing unsupported level ${di}`),this.hls.removeLevel(di)))})):wr.supportedResult=Ki}if(at&&wr.codecSet!==at||Rt&&wr.videoRange!==Rt||Kr&&vt>wr.frameRate||!Kr&&vt>0&&vt<wr.frameRate||wr.supportedResult&&!((Ir=wr.supportedResult.decodingInfoResults)!=null&&Ir[0].smooth)){nr.push(kr);continue}const ln=wr.details,dr=(V?ln==null?void 0:ln.partTarget:ln==null?void 0:ln.averagetargetduration)||Nt;let ir;Kr?ir=u*e:ir=s*e;const Zr=Nt&&n>=Nt*2&&i===0?W[kr].averageBitrate:W[kr].maxBitrate,Ur=this.getTimeToLoadFrag(Or,ir,Zr*dr,ln===void 0);if(ir>=Zr&&(kr===g||wr.loadError===0&&wr.fragmentError===0)&&(Ur<=Or||!$(Ur)||Je&&!this.bitrateTestDelay||Ur<m)){const An=this.forcedAutoLevel;return kr!==ie&&(An===-1||An!==ie)&&(nr.length&&S.trace(`[abr] Skipped level(s) ${nr.join(",")} of ${r} max with CODECS and VIDEO-RANGE:"${W[nr[0]].codecs}" ${W[nr[0]].videoRange}; not compatible with "${tt.codecs}" ${Rt}`),S.info(`[abr] switch candidate:${A}->${kr} adjustedbw(${Math.round(ir)})-bitrate=${Math.round(ir-Zr)} ttfb:${Or.toFixed(1)} avgDuration:${dr.toFixed(1)} maxFetchDuration:${m.toFixed(1)} fetchDuration:${Ur.toFixed(1)} firstSelection:${yt} codecSet:${at} videoRange:${Rt} hls.loadLevel:${ie}`)),yt&&(this.firstSelection=kr),kr}}return-1}set nextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:r}=this.hls,n=Math.min(Math.max(e,r),t);this._nextAutoLevel!==n&&(this.nextAutoLevelKey="",this._nextAutoLevel=n)}}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 wn={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class $a{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(f.BUFFER_APPENDED,this.onBufferAppended,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this),e.on(f.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.BUFFER_APPENDED,this.onBufferAppended,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this),e.off(f.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 n=r.length;n--;){const i=r[n];if(!i)break;const s=i.end;if(i.start<=e&&s!==null&&e<=s)return i}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){const{fragments:r}=this,n=Object.keys(r);for(let i=n.length;i--;){const s=r[n[i]];if((s==null?void 0:s.body.type)===t&&s.buffered){const u=s.body;if(u.start<=e&&e<=u.end)return u}}return null}detectEvictedFragments(e,t,r,n){this.timeRanges&&(this.timeRanges[e]=t);const i=(n==null?void 0:n.fragment.sn)||-1;Object.keys(this.fragments).forEach(s=>{const u=this.fragments[s];if(!u||i>=u.body.sn)return;if(!u.buffered&&!u.loaded){u.body.type===r&&this.removeFragment(u.body);return}const d=u.range[e];d&&d.time.some(m=>{const g=!this.isTimeBuffered(m.startPTS,m.endPTS,t);return g&&this.removeFragment(u.body),g})})}detectPartialFragments(e){const t=this.timeRanges,{frag:r,part:n}=e;if(!t||r.sn==="initSegment")return;const i=Vi(r),s=this.fragments[i];if(!s||s.buffered&&r.gap)return;const u=!r.relurl;Object.keys(t).forEach(d=>{const m=r.elementaryStreams[d];if(!m)return;const g=t[d],A=u||m.partial===!0;s.range[d]=this.getBufferedTimes(r,n,A,g)}),s.loaded=null,Object.keys(s.range).length?(s.buffered=!0,(s.body.endList=r.endList||s.body.endList)&&(this.endListFragments[s.body.type]=s),rs(s)||this.removeParts(r.sn-1,r.type)):this.removeFragment(s.body)}removeParts(e,t){const r=this.activePartLists[t];r&&(this.activePartLists[t]=r.filter(n=>n.fragment.sn>=e))}fragBuffered(e,t){const r=Vi(e);let n=this.fragments[r];!n&&t&&(n=this.fragments[r]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),n&&(n.loaded=null,n.buffered=!0)}getBufferedTimes(e,t,r,n){const i={time:[],partial:r},s=e.start,u=e.end,d=e.minEndPTS||u,m=e.maxStartPTS||s;for(let g=0;g<n.length;g++){const A=n.start(g)-this.bufferPadding,L=n.end(g)+this.bufferPadding;if(m>=A&&d<=L){i.time.push({startPTS:Math.max(s,n.start(g)),endPTS:Math.min(u,n.end(g))});break}else if(s<L&&u>A){const V=Math.max(s,n.start(g)),W=Math.min(u,n.end(g));W>V&&(i.partial=!0,i.time.push({startPTS:V,endPTS:W}))}else if(u<=A)break}return i}getPartialFragment(e){let t=null,r,n,i,s=0;const{bufferPadding:u,fragments:d}=this;return Object.keys(d).forEach(m=>{const g=d[m];g&&rs(g)&&(n=g.body.start-u,i=g.body.end+u,e>=n&&e<=i&&(r=Math.min(e-n,i-e),s<=r&&(t=g.body,s=r)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||rs(t))}getState(e){const t=Vi(e),r=this.fragments[t];return r?r.buffered?rs(r)?wn.PARTIAL:wn.OK:wn.APPENDING:wn.NOT_LOADED}isTimeBuffered(e,t,r){let n,i;for(let s=0;s<r.length;s++){if(n=r.start(s)-this.bufferPadding,i=r.end(s)+this.bufferPadding,e>=n&&t<=i)return!0;if(t<=n)return!1}return!1}onFragLoaded(e,t){const{frag:r,part:n}=t;if(r.sn==="initSegment"||r.bitrateTest)return;const i=n?null:t,s=Vi(r);this.fragments[s]={body:r,appendedPTS:null,loaded:i,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:r,part:n,timeRanges:i}=t;if(r.sn==="initSegment")return;const s=r.type;if(n){let u=this.activePartLists[s];u||(this.activePartLists[s]=u=[]),u.push(n)}this.timeRanges=i,Object.keys(i).forEach(u=>{const d=i[u];this.detectEvictedFragments(u,d,s,n)})}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Vi(e);return!!this.fragments[t]}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,r,n,i){n&&!this.hasGaps||Object.keys(this.fragments).forEach(s=>{const u=this.fragments[s];if(!u)return;const d=u.body;d.type!==r||n&&!d.gap||d.start<t&&d.end>e&&(u.buffered||i)&&this.removeFragment(d)})}removeFragment(e){const t=Vi(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const r=this.activePartLists[e.type];if(r){const n=e.sn;this.activePartLists[e.type]=r.filter(i=>i.fragment.sn!==n)}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(a){var e,t,r;return a.buffered&&(a.body.gap||((e=a.range.video)==null?void 0:e.partial)||((t=a.range.audio)==null?void 0:t.partial)||((r=a.range.audiovideo)==null?void 0:r.partial))}function Vi(a){return`${a.type}_${a.level}_${a.sn}`}const sa={length:0,start:()=>0,end:()=>0};class nn{static isBuffered(e,t){try{if(e){const r=nn.getBuffered(e);for(let n=0;n<r.length;n++)if(t>=r.start(n)&&t<=r.end(n))return!0}}catch(r){}return!1}static bufferInfo(e,t,r){try{if(e){const n=nn.getBuffered(e),i=[];let s;for(s=0;s<n.length;s++)i.push({start:n.start(s),end:n.end(s)});return this.bufferedInfo(i,t,r)}}catch(n){}return{len:0,start:t,end:t,nextStart:void 0}}static bufferedInfo(e,t,r){t=Math.max(0,t),e.sort(function(m,g){const A=m.start-g.start;return A||g.end-m.end});let n=[];if(r)for(let m=0;m<e.length;m++){const g=n.length;if(g){const A=n[g-1].end;e[m].start-A<r?e[m].end>A&&(n[g-1].end=e[m].end):n.push(e[m])}else n.push(e[m])}else n=e;let i=0,s,u=t,d=t;for(let m=0;m<n.length;m++){const g=n[m].start,A=n[m].end;if(t+r>=g&&t<A)u=g,d=A,i=d-t;else if(t+r<g){s=g;break}}return{len:i,start:u||0,end:d||0,nextStart:s}}static getBuffered(e){try{return e.buffered}catch(t){return S.log("failed to get media.buffered",t),sa}}}class Os{constructor(e,t,r,n=0,i=-1,s=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=ii(),this.buffering={audio:ii(),video:ii(),audiovideo:ii()},this.level=e,this.sn=t,this.id=r,this.size=n,this.part=i,this.partial=s}}function ii(){return{start:0,executeStart:0,executeEnd:0,end:0}}function ns(a,e){for(let r=0,n=a.length;r<n;r++){var t;if(((t=a[r])==null?void 0:t.cc)===e)return a[r]}return null}function Ua(a,e,t){return!!(e&&(t.endCC>t.startCC||a&&a.cc<t.startCC))}function cs(a,e){const t=a.fragments,r=e.fragments;if(!r.length||!t.length){S.log("No fragments to align");return}const n=ns(t,r[0].cc);if(!n||n&&!n.startPTS){S.log("No frag in previous level to align on");return}return n}function Ps(a,e){if(a){const t=a.start+e;a.start=a.startPTS=t,a.endPTS=t+a.duration}}function hs(a,e){const t=e.fragments;for(let r=0,n=t.length;r<n;r++)Ps(t[r],a);e.fragmentHint&&Ps(e.fragmentHint,a),e.alignedSliding=!0}function Ms(a,e,t){e&&(aa(a,t,e),!t.alignedSliding&&e&&si(t,e),!t.alignedSliding&&e&&!t.skippedSegments&&Hi(e,t))}function aa(a,e,t){if(Ua(a,t,e)){const r=cs(t,e);r&&$(r.start)&&(S.log(`Adjusting PTS using last level due to CC increase within current level ${e.url}`),hs(r.start,e))}}function si(a,e){if(!a.hasProgramDateTime||!e.hasProgramDateTime)return;const t=a.fragments,r=e.fragments;if(!t.length||!r.length)return;let n,i;const s=Math.min(e.endCC,a.endCC);e.startCC<s&&a.startCC<s&&(n=ns(r,s),i=ns(t,s)),(!n||!i)&&(n=r[Math.floor(r.length/2)],i=ns(t,n.cc)||t[Math.floor(t.length/2)]);const u=n.programDateTime,d=i.programDateTime;if(!u||!d)return;const m=(d-u)/1e3-(i.start-n.start);hs(m,a)}const Bs=Math.pow(2,17);class Bi{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 yi({type:_.NETWORK_ERROR,details:y.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${r?"part list":"url"}`),networkDetails:null}));this.abort();const n=this.config,i=n.fLoader,s=n.loader;return new Promise((u,d)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(V=>V[0]==="GAP")){d(_i(e));return}else e.gap=!1;const m=this.loader=e.loader=i?new i(n):new s(n),g=fs(e),A=ci(n.fragLoadPolicy.default),L={loadPolicy:A,timeout:A.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Bs};e.stats=m.stats,m.load(g,L,{onSuccess:(V,W,Q,ie)=>{this.resetLoader(e,m);let Fe=V.data;Q.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(Fe.slice(0,16)),Fe=Fe.slice(16)),u({frag:e,part:null,payload:Fe,networkDetails:ie})},onError:(V,W,Q,ie)=>{this.resetLoader(e,m),d(new yi({type:_.NETWORK_ERROR,details:y.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:fe({url:r,data:void 0},V),error:new Error(`HTTP Error ${V.code} ${V.text}`),networkDetails:Q,stats:ie}))},onAbort:(V,W,Q)=>{this.resetLoader(e,m),d(new yi({type:_.NETWORK_ERROR,details:y.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:Q,stats:V}))},onTimeout:(V,W,Q)=>{this.resetLoader(e,m),d(new yi({type:_.NETWORK_ERROR,details:y.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${L.timeout}ms`),networkDetails:Q,stats:V}))},onProgress:(V,W,Q,ie)=>{t&&t({frag:e,part:null,payload:Q,networkDetails:ie})}})})}loadPart(e,t,r){this.abort();const n=this.config,i=n.fLoader,s=n.loader;return new Promise((u,d)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){d(_i(e,t));return}const m=this.loader=e.loader=i?new i(n):new s(n),g=fs(e,t),A=ci(n.fragLoadPolicy.default),L={loadPolicy:A,timeout:A.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Bs};t.stats=m.stats,m.load(g,L,{onSuccess:(V,W,Q,ie)=>{this.resetLoader(e,m),this.updateStatsFromPart(e,t);const Fe={frag:e,part:t,payload:V.data,networkDetails:ie};r(Fe),u(Fe)},onError:(V,W,Q,ie)=>{this.resetLoader(e,m),d(new yi({type:_.NETWORK_ERROR,details:y.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:fe({url:g.url,data:void 0},V),error:new Error(`HTTP Error ${V.code} ${V.text}`),networkDetails:Q,stats:ie}))},onAbort:(V,W,Q)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,m),d(new yi({type:_.NETWORK_ERROR,details:y.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:Q,stats:V}))},onTimeout:(V,W,Q)=>{this.resetLoader(e,m),d(new yi({type:_.NETWORK_ERROR,details:y.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${L.timeout}ms`),networkDetails:Q,stats:V}))}})})}updateStatsFromPart(e,t){const r=e.stats,n=t.stats,i=n.total;if(r.loaded+=n.loaded,i){const d=Math.round(e.duration/t.duration),m=Math.min(Math.round(r.loaded/i),d),A=(d-m)*Math.round(r.loaded/m);r.total=r.loaded+A}else r.total=Math.max(r.loaded,r.total);const s=r.loading,u=n.loading;s.start?s.first+=u.first-u.start:(s.start=u.start,s.first=u.first),s.end=u.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function fs(a,e=null){const t=e||a,r={frag:a,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},n=t.byteRangeStartOffset,i=t.byteRangeEndOffset;if($(n)&&$(i)){var s;let u=n,d=i;if(a.sn==="initSegment"&&((s=a.decryptdata)==null?void 0:s.method)==="AES-128"){const m=i-n;m%16&&(d=i+(16-m%16)),n!==0&&(r.resetIV=!0,u=n-16)}r.rangeStart=u,r.rangeEnd=d}return r}function _i(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),r={type:_.MEDIA_ERROR,details:y.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(r.part=e),(e||a).stats.aborted=!0,new yi(r)}class yi extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Di{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 za(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?Oe(a,0,e-t):a}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 n=0;n<4;n++)r[n]=t.getUint32(n*4);return r}initTable(){const e=this.sBox,t=this.invSBox,r=this.subMix,n=r[0],i=r[1],s=r[2],u=r[3],d=this.invSubMix,m=d[0],g=d[1],A=d[2],L=d[3],V=new Uint32Array(256);let W=0,Q=0,ie=0;for(ie=0;ie<256;ie++)ie<128?V[ie]=ie<<1:V[ie]=ie<<1^283;for(ie=0;ie<256;ie++){let Fe=Q^Q<<1^Q<<2^Q<<3^Q<<4;Fe=Fe>>>8^Fe&255^99,e[W]=Fe,t[Fe]=W;const tt=V[W],Je=V[tt],yt=V[Je];let at=V[Fe]*257^Fe*16843008;n[W]=at<<24|at>>>8,i[W]=at<<16|at>>>16,s[W]=at<<8|at>>>24,u[W]=at,at=yt*16843009^Je*65537^tt*257^W*16843008,m[Fe]=at<<24|at>>>8,g[Fe]=at<<16|at>>>16,A[Fe]=at<<8|at>>>24,L[Fe]=at,W?(W=tt^V[V[V[yt^tt]]],Q^=V[V[Q]]):W=Q=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let r=!0,n=0;for(;n<t.length&&r;)r=t[n]===this.key[n],n++;if(r)return;this.key=t;const i=this.keySize=t.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);const s=this.ksRows=(i+6+1)*4;let u,d;const m=this.keySchedule=new Uint32Array(s),g=this.invKeySchedule=new Uint32Array(s),A=this.sBox,L=this.rcon,V=this.invSubMix,W=V[0],Q=V[1],ie=V[2],Fe=V[3];let tt,Je;for(u=0;u<s;u++){if(u<i){tt=m[u]=t[u];continue}Je=tt,u%i===0?(Je=Je<<8|Je>>>24,Je=A[Je>>>24]<<24|A[Je>>>16&255]<<16|A[Je>>>8&255]<<8|A[Je&255],Je^=L[u/i|0]<<24):i>6&&u%i===4&&(Je=A[Je>>>24]<<24|A[Je>>>16&255]<<16|A[Je>>>8&255]<<8|A[Je&255]),m[u]=tt=(m[u-i]^Je)>>>0}for(d=0;d<s;d++)u=s-d,d&3?Je=m[u]:Je=m[u-4],d<4||u<=4?g[d]=Je:g[d]=W[A[Je>>>24]]^Q[A[Je>>>16&255]]^ie[A[Je>>>8&255]]^Fe[A[Je&255]],g[d]=g[d]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,r){const n=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,u=this.invSubMix,d=u[0],m=u[1],g=u[2],A=u[3],L=this.uint8ArrayToUint32Array_(r);let V=L[0],W=L[1],Q=L[2],ie=L[3];const Fe=new Int32Array(e),tt=new Int32Array(Fe.length);let Je,yt,at,Rt,vt,Mt,Qt,At,Nt,Or,nr,Ir,kr,wr;const Kr=this.networkToHostOrderSwap;for(;t<Fe.length;){for(Nt=Kr(Fe[t]),Or=Kr(Fe[t+1]),nr=Kr(Fe[t+2]),Ir=Kr(Fe[t+3]),vt=Nt^i[0],Mt=Ir^i[1],Qt=nr^i[2],At=Or^i[3],kr=4,wr=1;wr<n;wr++)Je=d[vt>>>24]^m[Mt>>16&255]^g[Qt>>8&255]^A[At&255]^i[kr],yt=d[Mt>>>24]^m[Qt>>16&255]^g[At>>8&255]^A[vt&255]^i[kr+1],at=d[Qt>>>24]^m[At>>16&255]^g[vt>>8&255]^A[Mt&255]^i[kr+2],Rt=d[At>>>24]^m[vt>>16&255]^g[Mt>>8&255]^A[Qt&255]^i[kr+3],vt=Je,Mt=yt,Qt=at,At=Rt,kr=kr+4;Je=s[vt>>>24]<<24^s[Mt>>16&255]<<16^s[Qt>>8&255]<<8^s[At&255]^i[kr],yt=s[Mt>>>24]<<24^s[Qt>>16&255]<<16^s[At>>8&255]<<8^s[vt&255]^i[kr+1],at=s[Qt>>>24]<<24^s[At>>16&255]<<16^s[vt>>8&255]<<8^s[Mt&255]^i[kr+2],Rt=s[At>>>24]<<24^s[vt>>16&255]<<16^s[Mt>>8&255]<<8^s[Qt&255]^i[kr+3],tt[t]=Kr(Je^V),tt[t+1]=Kr(Rt^W),tt[t+2]=Kr(at^Q),tt[t+3]=Kr(yt^ie),V=Nt,W=Or,Q=nr,ie=Ir,t=t+4}return tt.buffer}}const Ga=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?za(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((n,i)=>{this.softwareDecrypt(new Uint8Array(e),t,r);const s=this.flush();s?n(s.buffer):i(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,r)}softwareDecrypt(e,t,r){const{currentIV:n,currentResult:i,remainderData:s}=this;this.logOnce("JS AES decrypt"),s&&(e=Ct(s,e),this.remainderData=null);const u=this.getValidChunk(e);if(!u.length)return null;n&&(r=n);let d=this.softwareDecrypter;d||(d=this.softwareDecrypter=new la),d.expandKey(t);const m=i;return this.currentResult=d.decrypt(u.buffer,0,r),this.currentIV=Oe(u,-16).buffer,m||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(n=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new Di(this.subtle,new Uint8Array(r)).decrypt(e.buffer,n)):Promise.reject(new Error("web crypto not initialized"))).catch(n=>(S.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${n.name}: ${n.message}`),this.onWebCryptoError(e,t,r)))}onWebCryptoError(e,t,r){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,r);const n=this.flush();if(n)return n.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const r=e.length-e.length%Ga;return r!==e.length&&(t=Oe(e,0,r),this.remainderData=Oe(e,r)),t}logOnce(e){this.logEnabled&&(S.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const ua={toString:function(a){let e="";const t=a.length;for(let r=0;r<t;r++)e+=`[${a.start(r).toFixed(3)}-${a.end(r).toFixed(3)}]`;return e}},Dt={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,n,i){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=Dt.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=i,this.logPrefix=n,this.log=S.log.bind(S,`${n}:`),this.warn=S.warn.bind(S,`${n}:`),this.hls=e,this.fragmentLoader=new Bi(e.config),this.keyLoader=r,this.fragmentTracker=t,this.config=e.config,this.decrypter=new ds(e.config),e.on(f.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=Dt.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 i=r[r.length-1];return nn.isBuffered(this.media,i.start+i.duration/2)}const n=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(n)}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 n=this.config;this.levels&&n.autoStartLoad&&this.state===Dt.STOPPED&&this.startLoad(n.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:n,state:i}=this,s=r?r.currentTime:0,u=nn.bufferInfo(n||r,s,e.maxBufferHole);if(this.log(`media seeking to ${$(s)?s.toFixed(3):s}, state: ${i}`),this.state===Dt.ENDED)this.resetLoadingState();else if(t){const d=e.maxFragLookUpTolerance,m=t.start-d,g=t.start+t.duration+d;if(!u.len||g<u.start||m>u.end){const A=s>g;(s<m||A)&&(A&&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(s,1/0,this.playlistType,!0),this.lastCurrentTime=s),!this.loadedmetadata&&!u.len&&(this.nextLoadPosition=this.startPosition=s),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.hls.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),this.stopLoad(),super.onHandlerDestroying(),this.hls=null}onHandlerDestroyed(){this.state=Dt.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 n=i=>{if(this.fragContextChanged(e)){this.warn(`Fragment ${e.sn}${i.part?" p: "+i.part.index:""} of level ${e.level} was dropped during download.`),this.fragmentTracker.removeFragment(e);return}e.stats.chunkCount++,this._handleFragmentLoadProgress(i)};this._doFragLoad(e,t,r,n).then(i=>{if(!i)return;const s=this.state;if(this.fragContextChanged(e)){(s===Dt.FRAG_LOADING||!this.fragCurrent&&s===Dt.PARSING)&&(this.fragmentTracker.removeFragment(e),this.state=Dt.IDLE);return}"payload"in i&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(f.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===Dt.STOPPED||this.state===Dt.ERROR||(this.warn(`Frag error: ${(i==null?void 0:i.message)||i}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:r}=this;if(r.getState(e)===wn.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),u=Math.max(e.duration,s?s.len:this.config.maxBufferLength),d=this.backtrackFragment;((d?e.sn-d.sn:0)===1||this.reduceMaxBufferLength(u,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)===wn.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 n={startOffset:e,endOffset:t,type:r};this.hls.trigger(f.BUFFER_FLUSHING,n)}_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:n}=this,{payload:i}=r,s=e.decryptdata;if(i&&i.byteLength>0&&s!=null&&s.key&&s.iv&&s.method==="AES-128"){const u=self.performance.now();return this.decrypter.decrypt(new Uint8Array(i),s.key.buffer,s.iv.buffer).catch(d=>{throw n.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.FRAG_DECRYPT_ERROR,fatal:!1,error:d,reason:d.message,frag:e}),d}).then(d=>{const m=self.performance.now();return n.trigger(f.FRAG_DECRYPTED,{frag:e,payload:d,stats:{tstart:u,tdecrypt:m}}),r.payload=d,this.completeInitSegmentLoad(r)})}return this.completeInitSegmentLoad(r)}).catch(r=>{this.state===Dt.STOPPED||this.state===Dt.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=Dt.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,n,i,s;const u=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===ke.MAIN?"level":"track"} ${e.level} (frag:[${((r=e.startPTS)!=null?r:NaN).toFixed(3)}-${((n=e.endPTS)!=null?n:NaN).toFixed(3)}] > buffer:${u?ua.toString(nn.getBuffered(u)):"(detached)"})`),e.sn!=="initSegment"){var d;if(e.type!==ke.SUBTITLE){const g=e.elementaryStreams;if(!Object.keys(g).some(A=>!!g[A])){this.state=Dt.IDLE;return}}const m=(d=this.levels)==null?void 0:d[e.level];m!=null&&m.fragmentError&&(this.log(`Resetting level fragment error count of ${m.fragmentError} on frag buffered`),m.fragmentError=0)}this.state=Dt.IDLE,u&&(!this.loadedmetadata&&e.type==ke.MAIN&&u.buffered.length&&((i=this.fragCurrent)==null?void 0:i.sn)===((s=this.fragPrevious)==null?void 0:s.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:r,part:n,partsLoaded:i}=e,s=!i||i.length===0||i.some(d=>!d),u=new Os(r.level,r.sn,r.stats.chunkCount+1,0,n?n.index:-1,!s);t.flush(u)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,r=null,n){var i;const s=t==null?void 0:t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let u=null;if(e.encrypted&&!((i=e.decryptdata)!=null&&i.key)?(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.logPrefix==="[stream-controller]"?"level":"track"} ${e.level}`),this.state=Dt.KEY_LOADING,this.fragCurrent=e,u=this.keyLoader.load(e).then(g=>{if(!this.fragContextChanged(g.frag))return this.hls.trigger(f.KEY_LOADED,g),this.state===Dt.KEY_LOADING&&(this.state=Dt.IDLE),g}),this.hls.trigger(f.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(u=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&s.encryptedFragments.length&&this.keyLoader.loadClear(e,s.encryptedFragments),r=Math.max(e.start,r||0),this.config.lowLatencyMode&&e.sn!=="initSegment"){const g=s.partList;if(g&&n){r>e.end&&s.fragmentHint&&(e=s.fragmentHint);const A=this.getNextPart(g,e,r);if(A>-1){const L=g[A];this.log(`Loading part sn: ${e.sn} p: ${L.index} cc: ${e.cc} of playlist [${s.startSN}-${s.endSN}] parts [0-${A}-${g.length-1}] ${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(r.toFixed(3))}`),this.nextLoadPosition=L.start+L.duration,this.state=Dt.FRAG_LOADING;let V;return u?V=u.then(W=>!W||this.fragContextChanged(W.frag)?null:this.doFragPartsLoad(e,L,t,n)).catch(W=>this.handleFragLoadError(W)):V=this.doFragPartsLoad(e,L,t,n).catch(W=>this.handleFragLoadError(W)),this.hls.trigger(f.FRAG_LOADING,{frag:e,part:L,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):V}else if(!e.url||this.loadedEndOfParts(g,r))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${s?"of ["+s.startSN+"-"+s.endSN+"] ":""}${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(r.toFixed(3))}`),$(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Dt.FRAG_LOADING;const d=this.config.progressive;let m;return d&&u?m=u.then(g=>!g||this.fragContextChanged(g==null?void 0:g.frag)?null:this.fragmentLoader.load(e,n)).catch(g=>this.handleFragLoadError(g)):m=Promise.all([this.fragmentLoader.load(e,d?n:void 0),u]).then(([g])=>(!d&&g&&n&&n(g),g)).catch(g=>this.handleFragLoadError(g)),this.hls.trigger(f.FRAG_LOADING,{frag:e,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):m}doFragPartsLoad(e,t,r,n){return new Promise((i,s)=>{var u;const d=[],m=(u=r.details)==null?void 0:u.partList,g=A=>{this.fragmentLoader.loadPart(e,A,n).then(L=>{d[A.index]=L;const V=L.part;this.hls.trigger(f.FRAG_LOADED,L);const W=gi(r,e.sn,A.index+1)||Cn(m,e.sn,A.index+1);if(W)g(W);else return i({frag:e,part:V,partsLoaded:d})}).catch(s)};g(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===y.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(f.ERROR,t)}else this.hls.trigger(f.ERROR,{type:_.OTHER_ERROR,details:y.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Dt.PARSING){!this.fragCurrent&&this.state!==Dt.STOPPED&&this.state!==Dt.ERROR&&(this.state=Dt.IDLE);return}const{frag:r,part:n,level:i}=t,s=self.performance.now();r.stats.parsing.end=s,n&&(n.stats.parsing.end=s),this.updateLevelTiming(r,n,i,e.partial)}getCurrentContext(e){const{levels:t,fragCurrent:r}=this,{level:n,sn:i,part:s}=e;if(!(t!=null&&t[n]))return this.warn(`Levels object was unset while buffering fragment ${i} of level ${n}. The current chunk will not be buffered.`),null;const u=t[n],d=s>-1?gi(u,i,s):null,m=d?d.fragment:Fi(u,i,r);return m?(r&&r!==m&&(m.stats=r.stats),{frag:m,part:d,level:u}):null}bufferFragmentData(e,t,r,n,i){var s;if(!e||this.state!==Dt.PARSING)return;const{data1:u,data2:d}=e;let m=u;if(u&&d&&(m=Ct(u,d)),!((s=m)!=null&&s.length))return;const g={type:e.type,frag:t,part:r,chunkMeta:n,parent:t.type,data:m};if(this.hls.trigger(f.BUFFER_APPENDING,g),e.dropped&&e.independent&&!r){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!nn.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const r=t.currentTime,n=nn.bufferInfo(t,r,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),u=Math.max(Math.min(e.start-s,n.end-s),r+s);e.start-u>s&&this.flushMainBuffer(u,e.start)}getFwdBufferInfo(e,t){const r=this.getLoadPosition();return $(r)?this.getFwdBufferInfoAtPos(e,r,t):null}getFwdBufferInfoAtPos(e,t,r){const{config:{maxBufferHole:n}}=this,i=nn.bufferInfo(e,t,n);if(i.len===0&&i.nextStart!==void 0){const s=this.fragmentTracker.getBufferedFrag(t,r);if(s&&i.nextStart<s.end)return nn.bufferInfo(e,t,Math.max(i.nextStart,n))}return i}getMaxBufferLength(e){const{config:t}=this;let r;return e?r=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):r=t.maxBufferLength,Math.min(r,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const r=this.config,n=Math.max(Math.min(e-t,r.maxBufferLength),t),i=Math.max(e-t*3,r.maxMaxBufferLength/2,n);return i>=n?(r.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0):!1}getAppendedFrag(e,t=ke.MAIN){const r=this.fragmentTracker.getAppendedFrag(e,ke.MAIN);return r&&"fragment"in r?r.fragment:r}getNextFragment(e,t){const r=t.fragments,n=r.length;if(!n)return null;const{config:i}=this,s=r[0].start;let u;if(t.live){const d=i.initialLiveManifestSize;if(n<d)return this.warn(`Not enough fragments to start playback (have: ${n}, need: ${d})`),null;(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s)&&(u=this.getInitialLiveFragment(t,r),this.startPosition=this.nextLoadPosition=u?this.hls.liveSyncPosition||u.start:e)}else e<=s&&(u=r[0]);if(!u){const d=i.lowLatencyMode?t.partEnd:t.fragmentEnd;u=this.getFragmentAtPosition(e,d,t)}return this.mapToInitFragWhenRequired(u)}isLoopLoading(e,t){const r=this.fragmentTracker.getState(e);return(r===wn.OK||r===wn.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,r,n,i){const s=e.gap,u=this.getNextFragment(this.nextLoadPosition,t);if(u===null)return u;if(e=u,s&&e&&!e.gap&&r.nextStart){const d=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,r.nextStart,n);if(d!==null&&r.len+d.len>=i)return this.log(`buffer full after gaps in "${n}" 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 n=-1,i=!1,s=!0;for(let u=0,d=e.length;u<d;u++){const m=e[u];if(s=s&&!m.independent,n>-1&&r<m.start)break;const g=m.loaded;g?n=-1:(i||m.independent||s)&&m.fragment===t&&(n=u),i=g}return n}loadedEndOfParts(e,t){const r=e[e.length-1];return r&&t>r.start&&r.loaded}getInitialLiveFragment(e,t){const r=this.fragPrevious;let n=null;if(r){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${r.programDateTime}`),n=ji(t,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!n){const i=r.sn+1;if(i>=e.startSN&&i<=e.endSN){const s=t[i-e.startSN];r.cc===s.cc&&(n=s,this.log(`Live playlist, switching playlist, load frag with next SN: ${n.sn}`))}n||(n=or(t,r.cc),n&&this.log(`Live playlist, switching playlist, load frag with same CC: ${n.sn}`))}}else{const i=this.hls.liveSyncPosition;i!==null&&(n=this.getFragmentAtPosition(i,this.bitrateTest?e.fragmentEnd:e.edge,e))}return n}getFragmentAtPosition(e,t,r){const{config:n}=this;let{fragPrevious:i}=this,{fragments:s,endSN:u}=r;const{fragmentHint:d}=r,{maxFragLookUpTolerance:m}=n,g=r.partList,A=!!(n.lowLatencyMode&&g!=null&&g.length&&d);A&&d&&!this.bitrateTest&&(s=s.concat(d),u=d.sn);let L;if(e<t){const V=e>t-m?0:m;L=Si(i,s,e,V)}else L=s[s.length-1];if(L){const V=L.sn-r.startSN,W=this.fragmentTracker.getState(L);if((W===wn.OK||W===wn.PARTIAL&&L.gap)&&(i=L),i&&L.sn===i.sn&&(!A||g[0].fragment.sn>L.sn)&&i&&L.level===i.level){const ie=s[V+1];L.sn<u&&this.fragmentTracker.getState(ie)!==wn.OK?L=ie:L=null}}return L}synchronizeToLiveEdge(e){const{config:t,media:r}=this;if(!r)return;const n=this.hls.liveSyncPosition,i=r.currentTime,s=e.fragments[0].start,u=e.edge,d=i>=s-t.maxFragLookUpTolerance&&i<=u;if(n!==null&&r.duration>n&&(i<n||!d)){const m=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!d&&r.readyState<4||i<u-m)&&(this.loadedmetadata||(this.nextLoadPosition=n),r.readyState&&(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${u}, reset currentTime to : ${n.toFixed(3)}`),r.currentTime=n))}}alignPlaylists(e,t,r){const n=e.fragments.length;if(!n)return this.warn("No fragments in live playlist"),0;const i=e.fragments[0].start,s=!t,u=e.alignedSliding&&$(i);if(s||!u&&!i){const{fragPrevious:d}=this;Ms(d,r,e);const m=e.fragments[0].start;return this.log(`Live playlist sliding: ${m.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} prev-sn: ${d?d.sn:"na"} fragments: ${n}`),m}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let r=this.startPosition;if(r<t&&(r=-1),r===-1||this.lastCurrentTime===-1){const n=this.startTimeOffset!==null,i=n?this.startTimeOffset:e.startTimeOffset;i!==null&&$(i)?(r=t+i,i<0&&(r+=e.totalduration),r=Math.min(Math.max(t,r),t+e.totalduration),this.log(`Start time offset ${i} found in ${n?"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!==Dt.FRAG_LOADING_WAITING_RETRY)&&(this.state=Dt.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const g=this.getCurrentContext(t.chunkMeta);g&&(t.frag=g.frag)}const r=t.frag;if(!r||r.type!==e||!this.levels)return;if(this.fragContextChanged(r)){var n;this.warn(`Frag load error must match current frag to retry ${r.url} > ${(n=this.fragCurrent)==null?void 0:n.url}`);return}const i=t.details===y.FRAG_GAP;i&&this.fragmentTracker.fragBuffered(r,!0);const s=t.errorAction,{action:u,retryCount:d=0,retryConfig:m}=s||{};if(s&&u===Yt.RetryRequest&&m){this.resetStartWhenNotLoaded(this.levelLastLoaded);const g=Xn(m,d);this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${d+1}/${m.maxNumRetry} in ${g}ms`),s.resolved=!0,this.retryDate=self.performance.now()+g,this.state=Dt.FRAG_LOADING_WAITING_RETRY}else if(m&&s)if(this.resetFragmentErrors(e),d<m.maxNumRetry)!i&&u!==Yt.RemoveAlternatePermanently&&(s.resolved=!0);else{S.warn(`${t.details} reached or exceeded max retry (${d})`);return}else(s==null?void 0:s.action)===Yt.SendAlternateToPenaltyBox?this.state=Dt.WAITING_LEVEL:this.state=Dt.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===Dt.PARSING||this.state===Dt.PARSED){const t=e.frag,r=e.parent,n=this.getFwdBufferInfo(this.mediaBuffer,r),i=n&&n.len>.5;i&&this.reduceMaxBufferLength(n.len,(t==null?void 0:t.duration)||10);const s=!i;return s&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${r} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===ke.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==Dt.STOPPED&&(this.state=Dt.IDLE)}afterBufferFlushed(e,t,r){if(!e)return;const n=nn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,r),this.state===Dt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=Dt.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,n){var i;const s=r.details;if(!s){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((d,m)=>{const g=e.elementaryStreams[m];if(g){const A=g.endPTS-g.startPTS;if(A<=0)return this.warn(`Could not parse fragment ${e.sn} ${m} duration reliably (${A})`),d||!1;const L=n?0:pi(s,e,g.startPTS,g.endPTS,g.startDTS,g.endDTS);return this.hls.trigger(f.LEVEL_PTS_UPDATED,{details:s,level:r,drift:L,type:m,frag:e,start:g.startPTS,end:g.endPTS}),!0}return d},!1)&&((i=this.transmuxer)==null?void 0:i.error)===null){const d=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(d.message),this.hls.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.FRAG_PARSING_ERROR,fatal:!1,error:d,frag:e,reason:`Found no media in msn ${e.sn} of level "${r.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=Dt.PARSED,this.hls.trigger(f.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(a,e){const t=new Uint8Array(e);let r=0;for(let n=0;n<a.length;n++){const i=a[n];t.set(i,r),r+=i.length}return t}function ha(){return typeof __HLS_WORKER_BUNDLE__=="function"}function $s(){const a=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(a);return{worker:new self.Worker(e),objectURL:e}}function Us(a){const e=new self.URL(a,self.location.href).href;return{worker:new self.Worker(e),scriptURL:e}}function ai(a="",e=9e4){return{type:a,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,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,r){}demux(e,t){this.cachedData&&(e=Ct(this.cachedData,e),this.cachedData=null);let r=Ne(e,0),n=r?r.length:0,i;const s=this._audioTrack,u=this._id3Track,d=r?ee(r):void 0,m=e.length;for((this.basePTS===null||this.frameIndex===0&&$(d))&&(this.basePTS=fa(d,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),r&&r.length>0&&u.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:pn.audioId3,duration:Number.POSITIVE_INFINITY});n<m;){if(this.canParse(e,n)){const g=this.appendFrame(s,e,n);g?(this.frameIndex++,this.lastPTS=g.sample.pts,n+=g.length,i=n):n=m}else N(e,n)?(r=Ne(e,n),u.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:pn.audioId3,duration:Number.POSITIVE_INFINITY}),n+=r.length,i=n):n++;if(n===m&&i!==m){const g=Oe(e,i);this.cachedData?this.cachedData=Ct(this.cachedData,g):this.cachedData=g}}return{audioTrack:s,videoTrack:ai(),id3Track:u,textTrack:ai()}}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:ai(),id3Track:this._id3Track,textTrack:ai()}}destroy(){}}const fa=(a,e,t)=>{if($(a))return a*90;const r=t?t.baseTime*9e4/t.timescale:0;return e*9e4+r};function Ha(a,e,t,r){let n,i,s,u;const d=navigator.userAgent.toLowerCase(),m=r,g=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];n=((e[t+2]&192)>>>6)+1;const A=(e[t+2]&60)>>>2;if(A>g.length-1){const L=new Error(`invalid ADTS sampling index:${A}`);a.emit(f.ERROR,f.ERROR,{type:_.MEDIA_ERROR,details:y.FRAG_PARSING_ERROR,fatal:!0,error:L,reason:L.message});return}return s=(e[t+2]&1)<<2,s|=(e[t+3]&192)>>>6,S.log(`manifest codec:${r}, ADTS type:${n}, samplingIndex:${A}`),/firefox/i.test(d)?A>=6?(n=5,u=new Array(4),i=A-3):(n=2,u=new Array(2),i=A):d.indexOf("android")!==-1?(n=2,u=new Array(2),i=A):(n=5,u=new Array(4),r&&(r.indexOf("mp4a.40.29")!==-1||r.indexOf("mp4a.40.5")!==-1)||!r&&A>=6?i=A-3:((r&&r.indexOf("mp4a.40.2")!==-1&&(A>=6&&s===1||/vivaldi/i.test(d))||!r&&s===1)&&(n=2,u=new Array(2)),i=A)),u[0]=n<<3,u[0]|=(A&14)>>1,u[1]|=(A&1)<<7,u[1]|=s<<3,n===5&&(u[1]|=(i&14)>>1,u[2]=(i&1)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:g[A],channelCount:s,codec:"mp4a.40."+n,manifestCodec:m}}function gs(a,e){return a[e]===255&&(a[e+1]&246)===240}function zs(a,e){return a[e+1]&1?7:9}function vs(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function da(a,e){return e+5<a.length}function bi(a,e){return e+1<a.length&&gs(a,e)}function is(a,e){return da(a,e)&&gs(a,e)&&vs(a,e)<=a.length-e}function ja(a,e){if(bi(a,e)){const t=zs(a,e);if(e+t>=a.length)return!1;const r=vs(a,e);if(r<=t)return!1;const n=e+r;return n===a.length||bi(a,n)}return!1}function pa(a,e,t,r,n){if(!a.samplerate){const i=Ha(e,t,r,n);if(!i)return;a.config=i.config,a.samplerate=i.samplerate,a.channelCount=i.channelCount,a.codec=i.codec,a.manifestCodec=i.manifestCodec,S.log(`parsed codec:${a.codec}, rate:${i.samplerate}, channels:${i.channelCount}`)}}function Gs(a){return 1024*9e4/a}function Wa(a,e){const t=zs(a,e);if(e+t<=a.length){const r=vs(a,e)-t;if(r>0)return{headerLength:t,frameLength:r}}}function Hs(a,e,t,r,n){const i=Gs(a.samplerate),s=r+n*i,u=Wa(e,t);let d;if(u){const{frameLength:A,headerLength:L}=u,V=L+A,W=Math.max(0,t+V-e.length);W?(d=new Uint8Array(V-L),d.set(e.subarray(t+L,e.length),0)):d=e.subarray(t+L,t+V);const Q={unit:d,pts:s};return W||a.samples.push(Q),{sample:Q,length:V,missing:W}}const m=e.length-t;return d=new Uint8Array(m),d.set(e.subarray(t,e.length),0),{sample:{unit:d,pts:s},length:m,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 _s(a,e,t,r,n){if(t+24>e.length)return;const i=ys(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,u=r+n*s,d={unit:e.subarray(t,t+i.frameLength),pts:u,dts:u};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(d),{sample:d,length:i.frameLength,missing:0}}}function ys(a,e){const t=a[e+1]>>3&3,r=a[e+1]>>1&3,n=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&n!==0&&n!==15&&i!==3){const s=a[e+2]>>1&1,u=a[e+3]>>6,d=t===3?3-r:r===3?3:4,m=Ka[d*14+n-1]*1e3,A=ma[(t===3?0:t===2?1:2)*3+i],L=u===3?1:2,V=Va[t][r],W=ga[r],Q=V*8*W,ie=Math.floor(V*m/A+s)*W;if(ss===null){const Je=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ss=Je?parseInt(Je[1]):0}return!!ss&&ss<=87&&r===2&&m>=224e3&&u===0&&(a[e+3]=a[e+3]|128),{sampleRate:A,channelCount:L,frameLength:ie,samplesPerFrame:Q}}}function bs(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function js(a,e){return e+1<a.length&&bs(a,e)}function va(a,e){return bs(a,e)&&4<=a.length-e}function _a(a,e){if(e+1<a.length&&bs(a,e)){const r=ys(a,e);let n=4;r!=null&&r.frameLength&&(n=r.frameLength);const i=e+n;return i===a.length||js(a,i)}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,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=Ne(e,0);let r=(t==null?void 0:t.length)||0;if(_a(e,r))return!1;for(let n=e.length;r<n;r++)if(ja(e,r))return S.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return is(e,t)}appendFrame(e,t,r){pa(e,this.observer,t,r,e.manifestCodec);const n=Hs(e,t,r,this.basePTS,this.frameIndex);if(n&&n.missing===0)return n}}const ba=/\/emsg[-/]ID3/i;class Za{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,r,n){const i=this.videoTrack=ai("video",1),s=this.audioTrack=ai("audio",1),u=this.txtTrack=ai("text",1);if(this.id3Track=ai("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const d=Ge(e);if(d.video){const{id:m,timescale:g,codec:A}=d.video;i.id=m,i.timescale=u.timescale=g,i.codec=A}if(d.audio){const{id:m,timescale:g,codec:A}=d.audio;s.id=m,s.timescale=g,s.codec=A}u.id=ft.text,i.sampleDuration=0,i.duration=s.duration=n}resetContiguity(){this.remainderData=null}static probe(e){return kt(e)}demux(e,t){this.timeOffset=t;let r=e;const n=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=Ct(this.remainderData,e));const u=ur(r);this.remainderData=u.remainder,n.samples=u.valid||new Uint8Array}else n.samples=r;const s=this.extractID3Track(n,t);return i.samples=Ot(t,n),{videoTrack:n,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,r=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const n=this.extractID3Track(t,this.timeOffset);return r.samples=Ot(e,t),{videoTrack:t,audioTrack:ai(),id3Track:n,textTrack:ai()}}extractID3Track(e,t){const r=this.id3Track;if(e.samples.length){const n=ge(e.samples,["emsg"]);n&&n.forEach(i=>{const s=ut(i);if(ba.test(s.schemeIdUri)){const u=$(s.presentationTime)?s.presentationTime/s.timeScale:t+s.presentationTimeDelta/s.timeScale;let d=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;d<=.001&&(d=Number.POSITIVE_INFINITY);const m=s.payload;r.samples.push({data:m,len:m.byteLength,dts:u,pts:u,type:pn.emsg,duration:d})}})}return r}demuxSampleAes(e,t,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}}const Zi=(a,e)=>{let t=0,r=5;e+=r;const n=new Uint32Array(1),i=new Uint32Array(1),s=new Uint8Array(1);for(;r>0;){s[0]=a[e];const u=Math.min(r,8),d=8-u;i[0]=4278190080>>>24+d<<d,n[0]=(s[0]&i[0])>>d,t=t?t<<u|n[0]:n[0],e+=1,r-=u}return t};class Ws extends ms{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,r){const n=Ks(e,t,r,this.basePTS,this.frameIndex);if(n!==-1)return{sample:e.samples[e.samples.length-1],length:n,missing:0}}static probe(e){if(!e)return!1;const t=Ne(e,0);if(!t)return!1;const r=t.length;return e[r]===11&&e[r+1]===119&&ee(t)!==void 0&&Zi(e,r)<16}}function Ks(a,e,t,r,n){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const i=e[t+4]>>6;if(i>=3)return-1;const u=[48e3,44100,32e3][i],d=e[t+4]&63,g=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][d*3+i]*2;if(t+g>e.length)return-1;const A=e[t+6]>>5;let L=0;A===2?L+=2:(A&1&&A!==1&&(L+=2),A&4&&(L+=2));const V=(e[t+6]<<8|e[t+7])>>12-L&1,Q=[2,1,2,3,3,4,4,5][A]+V,ie=e[t+5]>>3,Fe=e[t+5]&7,tt=new Uint8Array([i<<6|ie<<1|Fe>>2,(Fe&3)<<6|A<<3|V<<2|d>>4,d<<4&224]),Je=1536/u*9e4,yt=r+n*Je,at=e.subarray(t,t+g);return a.config=tt,a.channelCount=Q,a.samplerate=u,a.samples.push({unit:at,pts:yt}),g}class Ya{constructor(){this.VideoSample=null}createVideoSample(e,t,r,n){return{key:e,frame:!1,pts:t,dts:r,units:[],debug:n,length:0}}getLastNalUnit(e){var t;let r=this.VideoSample,n;if((!r||r.units.length===0)&&(r=e[e.length-1]),(t=r)!=null&&t.units){const i=r.units;n=i[i.length-1]}return n}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const r=t.samples,n=r.length;if(n){const i=r[n-1];e.pts=i.pts,e.dts=i.dts}else{t.dropped++;return}}t.samples.push(e)}e.debug.length&&S.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,n=new Uint8Array(4),i=Math.min(4,t);if(i===0)throw new Error("no bytes available");n.set(e.subarray(r,r+i)),this.word=new DataView(n.buffer).getUint32(0),this.bitsAvailable=i*8,this.bytesAvailable-=i}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const r=this.word>>>32-t;if(e>32&&S.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,n;for(let i=0;i<e;i++)r!==0&&(n=this.readEG(),r=(t+n+256)%256),t=r===0?t:r}readSPS(){let e=0,t=0,r=0,n=0,i,s,u;const d=this.readUByte.bind(this),m=this.readBits.bind(this),g=this.readUEG.bind(this),A=this.readBoolean.bind(this),L=this.skipBits.bind(this),V=this.skipEG.bind(this),W=this.skipUEG.bind(this),Q=this.skipScalingList.bind(this);d();const ie=d();if(m(5),L(3),d(),W(),ie===100||ie===110||ie===122||ie===244||ie===44||ie===83||ie===86||ie===118||ie===128){const Rt=g();if(Rt===3&&L(1),W(),W(),L(1),A())for(s=Rt!==3?8:12,u=0;u<s;u++)A()&&(u<6?Q(16):Q(64))}W();const Fe=g();if(Fe===0)g();else if(Fe===1)for(L(1),V(),V(),i=g(),u=0;u<i;u++)V();W(),L(1);const tt=g(),Je=g(),yt=m(1);yt===0&&L(1),L(1),A()&&(e=g(),t=g(),r=g(),n=g());let at=[1,1];if(A()&&A())switch(d()){case 1:at=[1,1];break;case 2:at=[12,11];break;case 3:at=[10,11];break;case 4:at=[16,11];break;case 5:at=[40,33];break;case 6:at=[24,11];break;case 7:at=[20,11];break;case 8:at=[32,11];break;case 9:at=[80,33];break;case 10:at=[18,11];break;case 11:at=[15,11];break;case 12:at=[64,33];break;case 13:at=[160,99];break;case 14:at=[4,3];break;case 15:at=[3,2];break;case 16:at=[2,1];break;case 255:{at=[d()<<8|d(),d()<<8|d()];break}}return{width:Math.ceil((tt+1)*16-e*2-t*2),height:(2-yt)*(Je+1)*16-(yt?2:4)*(r+n),pixelRatio:at}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class qa extends Ya{parseAVCPES(e,t,r,n,i){const s=this.parseAVCNALu(e,r.data);let u=this.VideoSample,d,m=!1;r.data=null,u&&s.length&&!e.audFound&&(this.pushAccessUnit(u,e),u=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts,"")),s.forEach(g=>{var A;switch(g.type){case 1:{let Q=!1;d=!0;const ie=g.data;if(m&&ie.length>4){const Fe=new xa(ie).readSliceType();(Fe===2||Fe===4||Fe===7||Fe===9)&&(Q=!0)}if(Q){var L;(L=u)!=null&&L.frame&&!u.key&&(this.pushAccessUnit(u,e),u=this.VideoSample=null)}u||(u=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts,"")),u.frame=!0,u.key=Q;break}case 5:d=!0,(A=u)!=null&&A.frame&&!u.key&&(this.pushAccessUnit(u,e),u=this.VideoSample=null),u||(u=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts,"")),u.key=!0,u.frame=!0;break;case 6:{d=!0,dt(g.data,1,r.pts,t.samples);break}case 7:{var V,W;d=!0,m=!0;const Q=g.data,Fe=new xa(Q).readSPS();if(!e.sps||e.width!==Fe.width||e.height!==Fe.height||((V=e.pixelRatio)==null?void 0:V[0])!==Fe.pixelRatio[0]||((W=e.pixelRatio)==null?void 0:W[1])!==Fe.pixelRatio[1]){e.width=Fe.width,e.height=Fe.height,e.pixelRatio=Fe.pixelRatio,e.sps=[Q],e.duration=i;const tt=Q.subarray(1,4);let Je="avc1.";for(let yt=0;yt<3;yt++){let at=tt[yt].toString(16);at.length<2&&(at="0"+at),Je+=at}e.codec=Je}break}case 8:d=!0,e.pps=[g.data];break;case 9:d=!0,e.audFound=!0,u&&this.pushAccessUnit(u,e),u=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts,"");break;case 12:d=!0;break;default:d=!1,u&&(u.debug+="unknown NAL "+g.type+" ");break}u&&d&&u.units.push(g)}),n&&u&&(this.pushAccessUnit(u,e),this.VideoSample=null)}parseAVCNALu(e,t){const r=t.byteLength;let n=e.naluState||0;const i=n,s=[];let u=0,d,m,g,A=-1,L=0;for(n===-1&&(A=0,L=t[0]&31,n=0,u=1);u<r;){if(d=t[u++],!n){n=d?0:1;continue}if(n===1){n=d?0:2;continue}if(!d)n=3;else if(d===1){if(m=u-n-1,A>=0){const V={data:t.subarray(A,m),type:L};s.push(V)}else{const V=this.getLastNalUnit(e.samples);V&&(i&&u<=4-i&&V.state&&(V.data=V.data.subarray(0,V.data.byteLength-i)),m>0&&(V.data=Ct(V.data,t.subarray(0,m)),V.state=0))}u<r?(g=t[u]&31,A=u,L=g,n=0):n=-1}else n=0}if(A>=0&&n>=0){const V={data:t.subarray(A,r),type:L,state:n};s.push(V)}if(s.length===0){const V=this.getLastNalUnit(e.samples);V&&(V.data=Ct(V.data,t))}return e.naluState=n,s}}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 n=e[t].unit;if(n.length<=16)return;const i=n.subarray(16,n.length-n.length%16),s=i.buffer.slice(i.byteOffset,i.byteOffset+i.length);this.decryptBuffer(s).then(u=>{const d=new Uint8Array(u);n.set(d,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 n=0;for(let i=32;i<e.length-16;i+=160,n+=16)r.set(e.subarray(i,i+16),n);return r}getAvcDecryptedUnit(e,t){const r=new Uint8Array(t);let n=0;for(let i=32;i<e.length-16;i+=160,n+=16)e.set(r.subarray(n,n+16),i);return e}decryptAvcSample(e,t,r,n,i){const s=mt(i.data),u=this.getAvcEncryptedData(s);this.decryptBuffer(u.buffer).then(d=>{i.data=this.getAvcDecryptedUnit(s,d),this.decrypter.isSync()||this.decryptAvcSamples(e,t,r+1,n)})}decryptAvcSamples(e,t,r,n){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,r=0){if(t>=e.length){n();return}const i=e[t].units;for(;!(r>=i.length);r++){const s=i[r];if(!(s.data.length<=48||s.type!==1&&s.type!==5)&&(this.decryptAvcSample(e,t,r,n,s),!this.decrypter.isSync()))return}}}}const Sn=188;class Ci{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 qa}static probe(e){const t=Ci.syncOffset(e);return t>0&&S.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`),t!==-1}static syncOffset(e){const t=e.length;let r=Math.min(Sn*5,t-Sn)+1,n=0;for(;n<r;){let i=!1,s=-1,u=0;for(let d=n;d<t;d+=Sn)if(e[d]===71&&(t-d===Sn||e[d+Sn]===71)){if(u++,s===-1&&(s=d,s!==0&&(r=Math.min(s+Sn*99,e.length-Sn)+1)),i||(i=xs(e,d)===0),i&&u>1&&(s===0&&u>2||d+Sn>r))return s}else{if(u)return-1;break}n++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:ft[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,r,n){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=Ci.createTrack("video"),this._audioTrack=Ci.createTrack("audio",n),this._id3Track=Ci.createTrack("id3"),this._txtTrack=Ci.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=r,this._duration=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:r}=this;e&&(e.pesData=null),t&&(t.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,r=!1,n=!1){r||(this.sampleAes=null);let i;const s=this._videoTrack,u=this._audioTrack,d=this._id3Track,m=this._txtTrack;let g=s.pid,A=s.pesData,L=u.pid,V=d.pid,W=u.pesData,Q=d.pesData,ie=null,Fe=this.pmtParsed,tt=this._pmtId,Je=e.length;if(this.remainderData&&(e=Ct(this.remainderData,e),Je=e.length,this.remainderData=null),Je<Sn&&!n)return this.remainderData=e,{audioTrack:u,videoTrack:s,id3Track:d,textTrack:m};const yt=Math.max(0,Ci.syncOffset(e));Je-=(Je-yt)%Sn,Je<e.byteLength&&!n&&(this.remainderData=new Uint8Array(e.buffer,Je,e.buffer.byteLength-Je));let at=0;for(let vt=yt;vt<Je;vt+=Sn)if(e[vt]===71){const Mt=!!(e[vt+1]&64),Qt=xs(e,vt),At=(e[vt+3]&48)>>4;let Nt;if(At>1){if(Nt=vt+5+e[vt+4],Nt===vt+Sn)continue}else Nt=vt+4;switch(Qt){case g:Mt&&(A&&(i=Ni(A))&&this.videoParser.parseAVCPES(s,m,i,!1,this._duration),A={data:[],size:0}),A&&(A.data.push(e.subarray(Nt,vt+Sn)),A.size+=vt+Sn-Nt);break;case L:if(Mt){if(W&&(i=Ni(W)))switch(u.segmentCodec){case"aac":this.parseAACPES(u,i);break;case"mp3":this.parseMPEGPES(u,i);break;case"ac3":this.parseAC3PES(u,i);break}W={data:[],size:0}}W&&(W.data.push(e.subarray(Nt,vt+Sn)),W.size+=vt+Sn-Nt);break;case V:Mt&&(Q&&(i=Ni(Q))&&this.parseID3PES(d,i),Q={data:[],size:0}),Q&&(Q.data.push(e.subarray(Nt,vt+Sn)),Q.size+=vt+Sn-Nt);break;case 0:Mt&&(Nt+=e[Nt]+1),tt=this._pmtId=Xa(e,Nt);break;case tt:{Mt&&(Nt+=e[Nt]+1);const Or=Ea(e,Nt,this.typeSupported,r,this.observer);g=Or.videoPid,g>0&&(s.pid=g,s.segmentCodec=Or.segmentVideoCodec),L=Or.audioPid,L>0&&(u.pid=L,u.segmentCodec=Or.segmentAudioCodec),V=Or.id3Pid,V>0&&(d.pid=V),ie!==null&&!Fe&&(S.warn(`MPEG-TS PMT found at ${vt} after unknown PID '${ie}'. Backtracking to sync byte @${yt} to parse all TS packets.`),ie=null,vt=yt-188),Fe=this.pmtParsed=!0;break}case 17:case 8191:break;default:ie=Qt;break}}else at++;at>0&&Es(this.observer,new Error(`Found ${at} TS packet/s that do not start with 0x47`)),s.pesData=A,u.pesData=W,d.pesData=Q;const Rt={audioTrack:u,videoTrack:s,id3Track:d,textTrack:m};return n&&this.extractRemainingSamples(Rt),Rt}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:r,id3Track:n,textTrack:i}=e,s=r.pesData,u=t.pesData,d=n.pesData;let m;if(s&&(m=Ni(s))?(this.videoParser.parseAVCPES(r,i,m,!0,this._duration),r.pesData=null):r.pesData=s,u&&(m=Ni(u))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,m);break;case"mp3":this.parseMPEGPES(t,m);break;case"ac3":this.parseAC3PES(t,m);break}t.pesData=null}else u!=null&&u.size&&S.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=u;d&&(m=Ni(d))?(this.parseID3PES(n,m),n.pesData=null):n.pesData=d}demuxSampleAes(e,t,r){const n=this.demux(e,r,!0,!this.config.progressive),i=this.sampleAes=new Vs(this.observer,this.config,t);return this.decrypt(n,i)}decrypt(e,t){return new Promise(r=>{const{audioTrack:n,videoTrack:i}=e;n.samples&&n.segmentCodec==="aac"?t.decryptAacSamples(n.samples,0,()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,()=>{r(e)}):r(e)}):i.samples&&t.decryptAvcSamples(i.samples,0,0,()=>{r(e)})})}destroy(){this._duration=0}parseAACPES(e,t){let r=0;const n=this.aacOverFlow;let i=t.data;if(n){this.aacOverFlow=null;const A=n.missing,L=n.sample.unit.byteLength;if(A===-1)i=Ct(n.sample.unit,i);else{const V=L-A;n.sample.unit.set(i.subarray(0,A),V),e.samples.push(n.sample),r=n.missing}}let s,u;for(s=r,u=i.length;s<u-1&&!bi(i,s);s++);if(s!==r){let A;const L=s<u-1;if(L?A=`AAC PES did not start with ADTS header,offset:${s}`:A="No ADTS header found in AAC PES",Es(this.observer,new Error(A),L),!L)return}pa(e,this.observer,i,s,this.audioCodec);let d;if(t.pts!==void 0)d=t.pts;else if(n){const A=Gs(e.samplerate);d=n.sample.pts+A}else{S.warn("[tsdemuxer]: AAC PES unknown PTS");return}let m=0,g;for(;s<u;)if(g=Hs(e,i,s,d,m),s+=g.length,g.missing){this.aacOverFlow=g;break}else for(m++;s<u-1&&!bi(i,s);s++);}parseMPEGPES(e,t){const r=t.data,n=r.length;let i=0,s=0;const u=t.pts;if(u===void 0){S.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<n;)if(js(r,s)){const d=_s(e,r,s,u,i);if(d)s+=d.length,i++;else break}else s++}parseAC3PES(e,t){{const r=t.data,n=t.pts;if(n===void 0){S.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=r.length;let s=0,u=0,d;for(;u<i&&(d=Ks(e,r,u,n,s++))>0;)u+=d}}parseID3PES(e,t){if(t.pts===void 0){S.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const r=o({},t,{type:this._videoTrack?pn.emsg:pn.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(r)}}function xs(a,e){return((a[e+1]&31)<<8)+a[e+2]}function Xa(a,e){return(a[e+10]&31)<<8|a[e+11]}function Ea(a,e,t,r,n){const i={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},s=(a[e+1]&15)<<8|a[e+2],u=e+3+s-4,d=(a[e+10]&15)<<8|a[e+11];for(e+=12+d;e<u;){const m=xs(a,e),g=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!r){xe("ADTS AAC");break}case 15:i.audioPid===-1&&(i.audioPid=m);break;case 21:i.id3Pid===-1&&(i.id3Pid=m);break;case 219:if(!r){xe("H.264");break}case 27:i.videoPid===-1&&(i.videoPid=m,i.segmentVideoCodec="avc");break;case 3:case 4:!t.mpeg&&!t.mp3?S.log("MPEG audio found, not supported in this browser"):i.audioPid===-1&&(i.audioPid=m,i.segmentAudioCodec="mp3");break;case 193:if(!r){xe("AC-3");break}case 129:t.ac3?i.audioPid===-1&&(i.audioPid=m,i.segmentAudioCodec="ac3"):S.log("AC-3 audio found, not supported in this browser");break;case 6:if(i.audioPid===-1&&g>0){let A=e+5,L=g;for(;L>2;){switch(a[A]){case 106:t.ac3!==!0?S.log("AC-3 audio found, not supported in this browser for now"):(i.audioPid=m,i.segmentAudioCodec="ac3");break}const W=a[A+1]+2;A+=W,L-=W}}break;case 194:case 135:return Es(n,new Error("Unsupported EC-3 in M2TS found")),i;case 36:return Es(n,new Error("Unsupported HEVC in M2TS found")),i}e+=g+5}return i}function Es(a,e,t){S.warn(`parsing error: ${e.message}`),a.emit(f.ERROR,f.ERROR,{type:_.MEDIA_ERROR,details:y.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function xe(a){S.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function Ni(a){let e=0,t,r,n,i,s;const u=a.data;if(!a||a.size===0)return null;for(;u[0].length<19&&u.length>1;)u[0]=Ct(u[0],u[1]),u.splice(1,1);if(t=u[0],(t[0]<<16)+(t[1]<<8)+t[2]===1){if(r=(t[4]<<8)+t[5],r&&r>a.size-6)return null;const m=t[7];m&192&&(i=(t[9]&14)*536870912+(t[10]&255)*4194304+(t[11]&254)*16384+(t[12]&255)*128+(t[13]&254)/2,m&64?(s=(t[14]&14)*536870912+(t[15]&255)*4194304+(t[16]&254)*16384+(t[17]&255)*128+(t[18]&254)/2,i-s>60*9e4&&(S.warn(`${Math.round((i-s)/9e4)}s delta between PTS and DTS, align them`),i=s)):s=i),n=t[8];let g=n+9;if(a.size<=g)return null;a.size-=g;const A=new Uint8Array(a.size);for(let L=0,V=u.length;L<V;L++){t=u[L];let W=t.byteLength;if(g)if(g>W){g-=W;continue}else t=t.subarray(g),W-=g,g=0;A.set(t,e),e+=W}return r&&(r-=n+3),{data:A,pts:i,dts:s,len:r}}return null}class Zs extends ms{resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=Ne(e,0);let r=(t==null?void 0:t.length)||0;if(t&&e[r]===11&&e[r+1]===119&&ee(t)!==void 0&&Zi(e,r)<=16)return!1;for(let n=e.length;r<n;r++)if(_a(e,r))return S.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return va(e,t)}appendFrame(e,t,r){if(this.basePTS!==null)return _s(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 xi=Math.pow(2,32)-1;class lt{static init(){lt.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 lt.types)lt.types.hasOwnProperty(e)&&(lt.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]);lt.HDLR_TYPES={video:t,audio:r};const n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i=new Uint8Array([0,0,0,0,0,0,0,0]);lt.STTS=lt.STSC=lt.STCO=i,lt.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),lt.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),lt.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),lt.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),u=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);lt.FTYP=lt.box(lt.types.ftyp,s,d,s,u),lt.DINF=lt.box(lt.types.dinf,lt.box(lt.types.dref,n))}static box(e,...t){let r=8,n=t.length;const i=n;for(;n--;)r+=t[n].byteLength;const s=new Uint8Array(r);for(s[0]=r>>24&255,s[1]=r>>16&255,s[2]=r>>8&255,s[3]=r&255,s.set(e,4),n=0,r=8;n<i;n++)s.set(t[n],r),r+=t[n].byteLength;return s}static hdlr(e){return lt.box(lt.types.hdlr,lt.HDLR_TYPES[e])}static mdat(e){return lt.box(lt.types.mdat,e)}static mdhd(e,t){t*=e;const r=Math.floor(t/(xi+1)),n=Math.floor(t%(xi+1));return lt.box(lt.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,r>>24,r>>16&255,r>>8&255,r&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))}static mdia(e){return lt.box(lt.types.mdia,lt.mdhd(e.timescale,e.duration),lt.hdlr(e.type),lt.minf(e))}static mfhd(e){return lt.box(lt.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"?lt.box(lt.types.minf,lt.box(lt.types.smhd,lt.SMHD),lt.DINF,lt.stbl(e)):lt.box(lt.types.minf,lt.box(lt.types.vmhd,lt.VMHD),lt.DINF,lt.stbl(e))}static moof(e,t,r){return lt.box(lt.types.moof,lt.mfhd(e),lt.traf(r,t))}static moov(e){let t=e.length;const r=[];for(;t--;)r[t]=lt.trak(e[t]);return lt.box.apply(null,[lt.types.moov,lt.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(lt.mvex(e)))}static mvex(e){let t=e.length;const r=[];for(;t--;)r[t]=lt.trex(e[t]);return lt.box.apply(null,[lt.types.mvex,...r])}static mvhd(e,t){t*=e;const r=Math.floor(t/(xi+1)),n=Math.floor(t%(xi+1)),i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,r>>24,r>>16&255,r>>8&255,r&255,n>>24,n>>16&255,n>>8&255,n&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return lt.box(lt.types.mvhd,i)}static sdtp(e){const t=e.samples||[],r=new Uint8Array(4+t.length);let n,i;for(n=0;n<t.length;n++)i=t[n].flags,r[n+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return lt.box(lt.types.sdtp,r)}static stbl(e){return lt.box(lt.types.stbl,lt.stsd(e),lt.box(lt.types.stts,lt.STTS),lt.box(lt.types.stsc,lt.STSC),lt.box(lt.types.stsz,lt.STSZ),lt.box(lt.types.stco,lt.STCO))}static avc1(e){let t=[],r=[],n,i,s;for(n=0;n<e.sps.length;n++)i=e.sps[n],s=i.byteLength,t.push(s>>>8&255),t.push(s&255),t=t.concat(Array.prototype.slice.call(i));for(n=0;n<e.pps.length;n++)i=e.pps[n],s=i.byteLength,r.push(s>>>8&255),r.push(s&255),r=r.concat(Array.prototype.slice.call(i));const u=lt.box(lt.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(r))),d=e.width,m=e.height,g=e.pixelRatio[0],A=e.pixelRatio[1];return lt.box(lt.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,d>>8&255,d&255,m>>8&255,m&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),u,lt.box(lt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),lt.box(lt.types.pasp,new Uint8Array([g>>24,g>>16&255,g>>8&255,g&255,A>>24,A>>16&255,A>>8&255,A&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 lt.box(lt.types.mp4a,lt.audioStsd(e),lt.box(lt.types.esds,lt.esds(e)))}static mp3(e){return lt.box(lt.types[".mp3"],lt.audioStsd(e))}static ac3(e){return lt.box(lt.types["ac-3"],lt.audioStsd(e),lt.box(lt.types.dac3,e.config))}static stsd(e){return e.type==="audio"?e.segmentCodec==="mp3"&&e.codec==="mp3"?lt.box(lt.types.stsd,lt.STSD,lt.mp3(e)):e.segmentCodec==="ac3"?lt.box(lt.types.stsd,lt.STSD,lt.ac3(e)):lt.box(lt.types.stsd,lt.STSD,lt.mp4a(e)):lt.box(lt.types.stsd,lt.STSD,lt.avc1(e))}static tkhd(e){const t=e.id,r=e.duration*e.timescale,n=e.width,i=e.height,s=Math.floor(r/(xi+1)),u=Math.floor(r%(xi+1));return lt.box(lt.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,u>>24,u>>16&255,u>>8&255,u&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,n&255,0,0,i>>8&255,i&255,0,0]))}static traf(e,t){const r=lt.sdtp(e),n=e.id,i=Math.floor(t/(xi+1)),s=Math.floor(t%(xi+1));return lt.box(lt.types.traf,lt.box(lt.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),lt.box(lt.types.tfdt,new Uint8Array([1,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,s>>24,s>>16&255,s>>8&255,s&255])),lt.trun(e,r.length+16+20+8+16+8+8),r)}static trak(e){return e.duration=e.duration||4294967295,lt.box(lt.types.trak,lt.tkhd(e),lt.mdia(e))}static trex(e){const t=e.id;return lt.box(lt.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const r=e.samples||[],n=r.length,i=12+16*n,s=new Uint8Array(i);let u,d,m,g,A,L;for(t+=8+i,s.set([e.type==="video"?1:0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),u=0;u<n;u++)d=r[u],m=d.duration,g=d.size,A=d.flags,L=d.cts,s.set([m>>>24&255,m>>>16&255,m>>>8&255,m&255,g>>>24&255,g>>>16&255,g>>>8&255,g&255,A.isLeading<<2|A.dependsOn,A.isDependedOn<<6|A.hasRedundancy<<4|A.paddingValue<<1|A.isNonSync,A.degradPrio&61440,A.degradPrio&15,L>>>24&255,L>>>16&255,L>>>8&255,L&255],12+16*u);return lt.box(lt.types.trun,s)}static initSegment(e){lt.types||lt.init();const t=lt.moov(e);return Ct(lt.FTYP,t)}}lt.types=void 0,lt.HDLR_TYPES=void 0,lt.STTS=void 0,lt.STSC=void 0,lt.STCO=void 0,lt.STSZ=void 0,lt.VMHD=void 0,lt.SMHD=void 0,lt.STSD=void 0,lt.FTYP=void 0,lt.DINF=void 0;const Ys=9e4;function Ss(a,e,t=1,r=!1){const n=a*e*t;return r?Math.round(n):n}function Qa(a,e,t=1,r=!1){return Ss(a,e,1/t,r)}function Yi(a,e=!1){return Ss(a,1e3,1/Ys,e)}function wa(a,e=1){return Ss(a,Ys,1/e)}const As=10*1e3,Sa=1024,qs=1152,Aa=1536;let qi=null,Xs=null;class as{constructor(e,t,r,n=""){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,qi===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);qi=s?parseInt(s[1]):0}if(Xs===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);Xs=i?parseInt(i[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){S.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){S.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){S.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const r=e[0].pts,n=e.reduce((i,s)=>{let u=s.pts,d=u-i;return d<-4294967296&&(t=!0,u=jn(u,r),d=u-i),d>0?i:u},r);return t&&S.debug("PTS rollover detected"),n}remux(e,t,r,n,i,s,u,d){let m,g,A,L,V,W,Q=i,ie=i;const Fe=e.pid>-1,tt=t.pid>-1,Je=t.samples.length,yt=e.samples.length>0,at=u&&Je>0||Je>1;if((!Fe||yt)&&(!tt||at)||this.ISGenerated||u){if(this.ISGenerated){var vt,Mt,Qt,At;const Ir=this.videoTrackConfig;Ir&&(t.width!==Ir.width||t.height!==Ir.height||((vt=t.pixelRatio)==null?void 0:vt[0])!==((Mt=Ir.pixelRatio)==null?void 0:Mt[0])||((Qt=t.pixelRatio)==null?void 0:Qt[1])!==((At=Ir.pixelRatio)==null?void 0:At[1]))&&this.resetInitSegment()}else A=this.generateIS(e,t,i,s);const Nt=this.isVideoContiguous;let Or=-1,nr;if(at&&(Or=Ja(t.samples),!Nt&&this.config.forceKeyFrameOnDiscontinuity))if(W=!0,Or>0){S.warn(`[mp4-remuxer]: Dropped ${Or} out of ${Je} video samples due to a missing keyframe`);const Ir=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Or),t.dropped+=Or,ie+=(t.samples[0].pts-Ir)/t.inputTimeScale,nr=ie}else Or===-1&&(S.warn(`[mp4-remuxer]: No keyframe found out of ${Je} video samples`),W=!1);if(this.ISGenerated){if(yt&&at){const Ir=this.getVideoStartPts(t.samples),wr=(jn(e.samples[0].pts,Ir)-Ir)/t.inputTimeScale;Q+=Math.max(0,wr),ie+=Math.max(0,-wr)}if(yt){if(e.samplerate||(S.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),A=this.generateIS(e,t,i,s)),g=this.remuxAudio(e,Q,this.isAudioContiguous,s,tt||at||d===ke.AUDIO?ie:void 0),at){const Ir=g?g.endPTS-g.startPTS:0;t.inputTimeScale||(S.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),A=this.generateIS(e,t,i,s)),m=this.remuxVideo(t,ie,Nt,Ir)}}else at&&(m=this.remuxVideo(t,ie,Nt,0));m&&(m.firstKeyFrame=Or,m.independent=Or!==-1,m.firstKeyFramePTS=nr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(V=Ta(r,i,this._initPTS,this._initDTS)),n.samples.length&&(L=eo(n,i,this._initPTS))),{audio:g,video:m,initSegment:A,independent:W,text:L,id3:V}}generateIS(e,t,r,n){const i=e.samples,s=t.samples,u=this.typeSupported,d={},m=this._initPTS;let g=!m||n,A="audio/mp4",L,V,W;if(g&&(L=V=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":u.mpeg?(A="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}d.audio={id:"audio",container:A,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&u.mpeg?new Uint8Array(0):lt.initSegment([e]),metadata:{channelCount:e.channelCount}},g&&(W=e.inputTimeScale,!m||W!==m.timescale?L=V=i[0].pts-Math.round(W*r):g=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:lt.initSegment([t]),metadata:{width:t.width,height:t.height}},g)if(W=t.inputTimeScale,!m||W!==m.timescale){const Q=this.getVideoStartPts(s),ie=Math.round(W*r);V=Math.min(V,jn(s[0].dts,Q)-ie),L=Math.min(L,Q-ie)}else g=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(d).length)return this.ISGenerated=!0,g?(this._initPTS={baseTime:L,timescale:W},this._initDTS={baseTime:V,timescale:W}):L=W=void 0,{tracks:d,initPTS:L,timescale:W}}remuxVideo(e,t,r,n){const i=e.inputTimeScale,s=e.samples,u=[],d=s.length,m=this._initPTS;let g=this.nextAvcDts,A=8,L=this.videoSampleDuration,V,W,Q=Number.POSITIVE_INFINITY,ie=Number.NEGATIVE_INFINITY,Fe=!1;if(!r||g===null){const dr=t*i,ir=s[0].pts-jn(s[0].dts,s[0].pts);qi&&g!==null&&Math.abs(dr-ir-g)<15e3?r=!0:g=dr-ir}const tt=m.baseTime*i/m.timescale;for(let dr=0;dr<d;dr++){const ir=s[dr];ir.pts=jn(ir.pts-tt,g),ir.dts=jn(ir.dts-tt,g),ir.dts<s[dr>0?dr-1:dr].dts&&(Fe=!0)}Fe&&s.sort(function(dr,ir){const Zr=dr.dts-ir.dts,Ur=dr.pts-ir.pts;return Zr||Ur}),V=s[0].dts,W=s[s.length-1].dts;const Je=W-V,yt=Je?Math.round(Je/(d-1)):L||e.inputTimeScale/30;if(r){const dr=V-g,ir=dr>yt,Zr=dr<-1;if((ir||Zr)&&(ir?S.warn(`AVC: ${Yi(dr,!0)} ms (${dr}dts) hole between fragments detected at ${t.toFixed(3)}`):S.warn(`AVC: ${Yi(-dr,!0)} ms (${dr}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Zr||g>=s[0].pts||qi)){V=g;const Ur=s[0].pts-dr;if(ir)s[0].dts=V,s[0].pts=Ur;else for(let sn=0;sn<s.length&&!(s[sn].dts>Ur);sn++)s[sn].dts-=dr,s[sn].pts-=dr;S.log(`Video: Initial PTS/DTS adjusted: ${Yi(Ur,!0)}/${Yi(V,!0)}, delta: ${Yi(dr,!0)} ms`)}}V=Math.max(0,V);let at=0,Rt=0,vt=V;for(let dr=0;dr<d;dr++){const ir=s[dr],Zr=ir.units,Ur=Zr.length;let sn=0;for(let An=0;An<Ur;An++)sn+=Zr[An].data.length;Rt+=sn,at+=Ur,ir.length=sn,ir.dts<vt?(ir.dts=vt,vt+=yt/4|0||1):vt=ir.dts,Q=Math.min(ir.pts,Q),ie=Math.max(ir.pts,ie)}W=s[d-1].dts;const Mt=Rt+4*at+8;let Qt;try{Qt=new Uint8Array(Mt)}catch(dr){this.observer.emit(f.ERROR,f.ERROR,{type:_.MUX_ERROR,details:y.REMUX_ALLOC_ERROR,fatal:!1,error:dr,bytes:Mt,reason:`fail allocating video mdat ${Mt}`});return}const At=new DataView(Qt.buffer);At.setUint32(0,Mt),Qt.set(lt.types.mdat,4);let Nt=!1,Or=Number.POSITIVE_INFINITY,nr=Number.POSITIVE_INFINITY,Ir=Number.NEGATIVE_INFINITY,kr=Number.NEGATIVE_INFINITY;for(let dr=0;dr<d;dr++){const ir=s[dr],Zr=ir.units;let Ur=0;for(let $n=0,zn=Zr.length;$n<zn;$n++){const di=Zr[$n],ta=di.data,bo=di.data.byteLength;At.setUint32(A,bo),A+=4,Qt.set(ta,A),A+=bo,Ur+=4+bo}let sn;if(dr<d-1)L=s[dr+1].dts-ir.dts,sn=s[dr+1].pts-ir.pts;else{const $n=this.config,zn=dr>0?ir.dts-s[dr-1].dts:yt;if(sn=dr>0?ir.pts-s[dr-1].pts:yt,$n.stretchShortVideoTrack&&this.nextAudioPts!==null){const di=Math.floor($n.maxBufferHole*i),ta=(n?Q+n*i:this.nextAudioPts)-ir.pts;ta>di?(L=ta-zn,L<0?L=zn:Nt=!0,S.log(`[mp4-remuxer]: It is approximately ${ta/90} ms to the next segment; using duration ${L/90} ms for the last video frame.`)):L=zn}else L=zn}const An=Math.round(ir.pts-ir.dts);Or=Math.min(Or,L),Ir=Math.max(Ir,L),nr=Math.min(nr,sn),kr=Math.max(kr,sn),u.push(new k(ir.key,L,Ur,An))}if(u.length){if(qi){if(qi<70){const dr=u[0].flags;dr.dependsOn=2,dr.isNonSync=0}}else if(Xs&&kr-nr<Ir-Or&&yt/Ir<.025&&u[0].cts===0){S.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let dr=V;for(let ir=0,Zr=u.length;ir<Zr;ir++){const Ur=dr+u[ir].duration,sn=dr+u[ir].cts;if(ir<Zr-1){const An=Ur+u[ir+1].cts;u[ir].duration=An-sn}else u[ir].duration=ir?u[ir-1].duration:yt;u[ir].cts=0,dr=Ur}}}L=Nt||!L?yt:L,this.nextAvcDts=g=W+L,this.videoSampleDuration=L,this.isVideoContiguous=!0;const ln={data1:lt.moof(e.sequenceNumber++,V,o({},e,{samples:u})),data2:Qt,startPTS:Q/i,endPTS:(ie+L)/i,startDTS:V/i,endDTS:g/i,type:"video",hasAudio:!1,hasVideo:!0,nb:u.length,dropped:e.dropped};return e.samples=[],e.dropped=0,ln}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return qs;case"ac3":return Aa;default:return Sa}}remuxAudio(e,t,r,n,i){const s=e.inputTimeScale,u=e.samplerate?e.samplerate:s,d=s/u,m=this.getSamplesPerFrame(e),g=m*d,A=this._initPTS,L=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,V=[],W=i!==void 0;let Q=e.samples,ie=L?0:8,Fe=this.nextAudioPts||-1;const tt=t*s,Je=A.baseTime*s/A.timescale;if(this.isAudioContiguous=r=r||Q.length&&Fe>0&&(n&&Math.abs(tt-Fe)<9e3||Math.abs(jn(Q[0].pts-Je,tt)-Fe)<20*g),Q.forEach(function(wr){wr.pts=jn(wr.pts-Je,tt)}),!r||Fe<0){if(Q=Q.filter(wr=>wr.pts>=0),!Q.length)return;i===0?Fe=0:n&&!W?Fe=Math.max(0,tt):Fe=Q[0].pts}if(e.segmentCodec==="aac"){const wr=this.config.maxAudioFramesDrift;for(let Kr=0,ln=Fe;Kr<Q.length;Kr++){const dr=Q[Kr],ir=dr.pts,Zr=ir-ln,Ur=Math.abs(1e3*Zr/s);if(Zr<=-wr*g&&W)Kr===0&&(S.warn(`Audio frame @ ${(ir/s).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*Zr/s)} ms.`),this.nextAudioPts=Fe=ln=ir);else if(Zr>=wr*g&&Ur<As&&W){let sn=Math.round(Zr/g);ln=ir-sn*g,ln<0&&(sn--,ln+=g),Kr===0&&(this.nextAudioPts=Fe=ln),S.warn(`[mp4-remuxer]: Injecting ${sn} audio frame @ ${(ln/s).toFixed(3)}s due to ${Math.round(1e3*Zr/s)} ms gap.`);for(let An=0;An<sn;An++){const $n=Math.max(ln,0);let zn=ws.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);zn||(S.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),zn=dr.unit.subarray()),Q.splice(Kr,0,{unit:zn,pts:$n}),ln+=g,Kr++}}dr.pts=ln,ln+=g}}let yt=null,at=null,Rt,vt=0,Mt=Q.length;for(;Mt--;)vt+=Q[Mt].unit.byteLength;for(let wr=0,Kr=Q.length;wr<Kr;wr++){const ln=Q[wr],dr=ln.unit;let ir=ln.pts;if(at!==null){const Ur=V[wr-1];Ur.duration=Math.round((ir-at)/d)}else if(r&&e.segmentCodec==="aac"&&(ir=Fe),yt=ir,vt>0){vt+=ie;try{Rt=new Uint8Array(vt)}catch(Ur){this.observer.emit(f.ERROR,f.ERROR,{type:_.MUX_ERROR,details:y.REMUX_ALLOC_ERROR,fatal:!1,error:Ur,bytes:vt,reason:`fail allocating audio mdat ${vt}`});return}L||(new DataView(Rt.buffer).setUint32(0,vt),Rt.set(lt.types.mdat,4))}else return;Rt.set(dr,ie);const Zr=dr.byteLength;ie+=Zr,V.push(new k(!0,m,Zr,0)),at=ir}const Qt=V.length;if(!Qt)return;const At=V[V.length-1];this.nextAudioPts=Fe=at+d*At.duration;const Nt=L?new Uint8Array(0):lt.moof(e.sequenceNumber++,yt/d,o({},e,{samples:V}));e.samples=[];const Or=yt/s,nr=Fe/s,kr={data1:Nt,data2:Rt,startPTS:Or,endPTS:nr,startDTS:Or,endDTS:nr,type:"audio",hasAudio:!0,hasVideo:!1,nb:Qt};return this.isAudioContiguous=!0,kr}remuxEmptyAudio(e,t,r,n){const i=e.inputTimeScale,s=e.samplerate?e.samplerate:i,u=i/s,d=this.nextAudioPts,m=this._initDTS,g=m.baseTime*9e4/m.timescale,A=(d!==null?d:n.startDTS*i)+g,L=n.endDTS*i+g,V=u*Sa,W=Math.ceil((L-A)/V),Q=ws.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(S.warn("[mp4-remuxer]: remux empty Audio"),!Q){S.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}const ie=[];for(let Fe=0;Fe<W;Fe++){const tt=A+Fe*V;ie.push({unit:Q,pts:tt,dts:tt})}return e.samples=ie,this.remuxAudio(e,t,r,!1)}}function jn(a,e){let t;if(e===null)return a;for(e<a?t=-8589934592:t=8589934592;Math.abs(a-e)>4294967296;)a+=t;return a}function Ja(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function Ta(a,e,t,r){const n=a.samples.length;if(!n)return;const i=a.inputTimeScale;for(let u=0;u<n;u++){const d=a.samples[u];d.pts=jn(d.pts-t.baseTime*i/t.timescale,e*i)/i,d.dts=jn(d.dts-r.baseTime*i/r.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function eo(a,e,t){const r=a.samples.length;if(!r)return;const n=a.inputTimeScale;for(let s=0;s<r;s++){const u=a.samples[s];u.pts=jn(u.pts-t.baseTime*n/t.timescale,e*n)/n}a.samples.sort((s,u)=>s.pts-u.pts);const i=a.samples;return a.samples=[],{samples:i}}class k{constructor(e,t,r,n){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=r,this.cts=n,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}class l{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,n){this.audioCodec=t,this.videoCodec=r,this.generateInitSegment(M(e,n)),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 n=this.initData=Ge(e);n.audio&&(t=h(n.audio,Y.AUDIO)),n.video&&(r=h(n.video,Y.VIDEO));const i={};n.audio&&n.video?i.audiovideo={container:"video/mp4",codec:t+","+r,initSegment:e,id:"main"}:n.audio?i.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:n.video?i.video={container:"video/mp4",codec:r,initSegment:e,id:"main"}:S.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i}remux(e,t,r,n,i,s){var u,d;let{initPTS:m,lastEndTime:g}=this;const A={audio:void 0,video:void 0,text:n,id3:r,initSegment:void 0};$(g)||(g=this.lastEndTime=i||0);const L=t.samples;if(!(L!=null&&L.length))return A;const V={initPTS:void 0,timescale:1};let W=this.initData;if((u=W)!=null&&u.length||(this.generateInitSegment(L),W=this.initData),!((d=W)!=null&&d.length))return S.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),A;this.emitInitSegment&&(V.tracks=this.initTracks,this.emitInitSegment=!1);const Q=Lt(L,W),ie=pe(W,L),Fe=ie===null?i:ie;(c(m,Fe,i,Q)||V.timescale!==m.timescale&&s)&&(V.initPTS=Fe-i,m&&m.timescale===1&&S.warn(`Adjusting initPTS by ${V.initPTS-m.baseTime}`),this.initPTS=m={baseTime:V.initPTS,timescale:1});const tt=e?Fe-m.baseTime/m.timescale:g,Je=tt+Q;Wt(W,L,m.baseTime/m.timescale),Q>0?this.lastEndTime=Je:(S.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const yt=!!W.audio,at=!!W.video;let Rt="";yt&&(Rt+="audio"),at&&(Rt+="video");const vt={data1:L,startPTS:tt,startDTS:tt,endPTS:Je,endDTS:Je,type:Rt,hasAudio:yt,hasVideo:at,nb:1,dropped:0};return A.audio=vt.type==="audio"?vt:void 0,A.video=vt.type!=="audio"?vt:void 0,A.initSegment=V,A.id3=Ta(r,i,m,m),n.samples.length&&(A.text=eo(n,i,m)),A}}function c(a,e,t,r){if(a===null)return!0;const n=Math.max(r,1),i=e-a.baseTime/a.timescale;return Math.abs(i-t)>n}function h(a,e){const t=a==null?void 0:a.codec;if(t&&t.length>4)return t;if(e===Y.AUDIO){if(t==="ec-3"||t==="ac-3"||t==="alac")return t;if(t==="fLaC"||t==="Opus")return yr(t,!1);const r="mp4a.40.5";return S.info(`Parsed audio codec "${t}" or audio object type not handled. Using "${r}"`),r}return S.warn(`Unhandled video codec "${t}"`),t==="hvc1"||t==="hev1"?"hvc1.1.6.L120.90":t==="av01"?"av01.0.04M.08":"avc1.42e01e"}let p;try{p=self.performance.now.bind(self.performance)}catch(a){S.debug("Unable to use Performance API on this environment"),p=Xe==null?void 0:Xe.Date.now}const T=[{demux:Za,remux:l},{demux:Ci,remux:as},{demux:ya,remux:as},{demux:Zs,remux:as}];T.splice(2,0,{demux:Ws,remux:as});class C{constructor(e,t,r,n,i){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=n,this.id=i}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,r,n){const i=r.transmuxing;i.executeStart=p();let s=new Uint8Array(e);const{currentTransmuxState:u,transmuxConfig:d}=this;n&&(this.currentTransmuxState=n);const{contiguous:m,discontinuity:g,trackSwitch:A,accurateTimeOffset:L,timeOffset:V,initSegmentChange:W}=n||u,{audioCodec:Q,videoCodec:ie,defaultInitPts:Fe,duration:tt,initSegmentData:Je}=d,yt=ne(s,t);if(yt&&yt.method==="AES-128"){const Mt=this.getDecrypter();if(Mt.isSync()){let Qt=Mt.softwareDecrypt(s,yt.key.buffer,yt.iv.buffer);if(r.part>-1&&(Qt=Mt.flush()),!Qt)return i.executeEnd=p(),he(r);s=new Uint8Array(Qt)}else return this.decryptionPromise=Mt.webCryptoDecrypt(s,yt.key.buffer,yt.iv.buffer).then(Qt=>{const At=this.push(Qt,null,r);return this.decryptionPromise=null,At}),this.decryptionPromise}const at=this.needsProbing(g,A);if(at){const Mt=this.configureTransmuxer(s);if(Mt)return S.warn(`[transmuxer] ${Mt.message}`),this.observer.emit(f.ERROR,f.ERROR,{type:_.MEDIA_ERROR,details:y.FRAG_PARSING_ERROR,fatal:!1,error:Mt,reason:Mt.message}),i.executeEnd=p(),he(r)}(g||A||W||at)&&this.resetInitSegment(Je,Q,ie,tt,t),(g||W||at)&&this.resetInitialTimestamp(Fe),m||this.resetContiguity();const Rt=this.transmux(s,yt,V,L,r),vt=this.currentTransmuxState;return vt.contiguous=!0,vt.discontinuity=!1,vt.trackSwitch=!1,i.executeEnd=p(),Rt}flush(e){const t=e.transmuxing;t.executeStart=p();const{decrypter:r,currentTransmuxState:n,decryptionPromise:i}=this;if(i)return i.then(()=>this.flush(e));const s=[],{timeOffset:u}=n;if(r){const A=r.flush();A&&s.push(this.push(A,null,e))}const{demuxer:d,remuxer:m}=this;if(!d||!m)return t.executeEnd=p(),[he(e)];const g=d.flush(u);return Te(g)?g.then(A=>(this.flushRemux(s,A,e),s)):(this.flushRemux(s,g,e),s)}flushRemux(e,t,r){const{audioTrack:n,videoTrack:i,id3Track:s,textTrack:u}=t,{accurateTimeOffset:d,timeOffset:m}=this.currentTransmuxState;S.log(`[transmuxer.ts]: Flushed fragment ${r.sn}${r.part>-1?" p: "+r.part:""} of level ${r.level}`);const g=this.remuxer.remux(n,i,s,u,m,d,!0,this.id);e.push({remuxResult:g,chunkMeta:r}),r.transmuxing.executeEnd=p()}resetInitialTimestamp(e){const{demuxer:t,remuxer:r}=this;!t||!r||(t.resetTimeStamp(e),r.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,r,n,i){const{demuxer:s,remuxer:u}=this;!s||!u||(s.resetInitSegment(e,t,r,n),u.resetInitSegment(e,t,r,i))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,r,n,i){let s;return t&&t.method==="SAMPLE-AES"?s=this.transmuxSampleAes(e,t,r,n,i):s=this.transmuxUnencrypted(e,r,n,i),s}transmuxUnencrypted(e,t,r,n){const{audioTrack:i,videoTrack:s,id3Track:u,textTrack:d}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,u,d,t,r,!1,this.id),chunkMeta:n}}transmuxSampleAes(e,t,r,n,i){return this.demuxer.demuxSampleAes(e,t,r).then(s=>({remuxResult:this.remuxer.remux(s.audioTrack,s.videoTrack,s.id3Track,s.textTrack,r,n,!1,this.id),chunkMeta:i}))}configureTransmuxer(e){const{config:t,observer:r,typeSupported:n,vendor:i}=this;let s;for(let L=0,V=T.length;L<V;L++){var u;if((u=T[L].demux)!=null&&u.probe(e)){s=T[L];break}}if(!s)return new Error("Failed to find demuxer by probing fragment data");const d=this.demuxer,m=this.remuxer,g=s.remux,A=s.demux;(!m||!(m instanceof g))&&(this.remuxer=new g(r,t,n,i)),(!d||!(d instanceof A))&&(this.demuxer=new A(r,t,n),this.probe=A.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 ne(a,e){let t=null;return a.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const he=a=>({remuxResult:{},chunkMeta:a});function Te(a){return"then"in a&&a.then instanceof Function}class We{constructor(e,t,r,n,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=r,this.duration=n,this.defaultInitPts=i||null}}class rt{constructor(e,t,r,n,i,s){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=r,this.trackSwitch=n,this.timeOffset=i,this.initSegmentChange=s}}var gt={exports:{}};(function(a){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function n(d,m,g){this.fn=d,this.context=m,this.once=g||!1}function i(d,m,g,A,L){if(typeof g!="function")throw new TypeError("The listener must be a function");var V=new n(g,A||d,L),W=t?t+m:m;return d._events[W]?d._events[W].fn?d._events[W]=[d._events[W],V]:d._events[W].push(V):(d._events[W]=V,d._eventsCount++),d}function s(d,m){--d._eventsCount===0?d._events=new r:delete d._events[m]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var m=[],g,A;if(this._eventsCount===0)return m;for(A in g=this._events)e.call(g,A)&&m.push(t?A.slice(1):A);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(g)):m},u.prototype.listeners=function(m){var g=t?t+m:m,A=this._events[g];if(!A)return[];if(A.fn)return[A.fn];for(var L=0,V=A.length,W=new Array(V);L<V;L++)W[L]=A[L].fn;return W},u.prototype.listenerCount=function(m){var g=t?t+m:m,A=this._events[g];return A?A.fn?1:A.length:0},u.prototype.emit=function(m,g,A,L,V,W){var Q=t?t+m:m;if(!this._events[Q])return!1;var ie=this._events[Q],Fe=arguments.length,tt,Je;if(ie.fn){switch(ie.once&&this.removeListener(m,ie.fn,void 0,!0),Fe){case 1:return ie.fn.call(ie.context),!0;case 2:return ie.fn.call(ie.context,g),!0;case 3:return ie.fn.call(ie.context,g,A),!0;case 4:return ie.fn.call(ie.context,g,A,L),!0;case 5:return ie.fn.call(ie.context,g,A,L,V),!0;case 6:return ie.fn.call(ie.context,g,A,L,V,W),!0}for(Je=1,tt=new Array(Fe-1);Je<Fe;Je++)tt[Je-1]=arguments[Je];ie.fn.apply(ie.context,tt)}else{var yt=ie.length,at;for(Je=0;Je<yt;Je++)switch(ie[Je].once&&this.removeListener(m,ie[Je].fn,void 0,!0),Fe){case 1:ie[Je].fn.call(ie[Je].context);break;case 2:ie[Je].fn.call(ie[Je].context,g);break;case 3:ie[Je].fn.call(ie[Je].context,g,A);break;case 4:ie[Je].fn.call(ie[Je].context,g,A,L);break;default:if(!tt)for(at=1,tt=new Array(Fe-1);at<Fe;at++)tt[at-1]=arguments[at];ie[Je].fn.apply(ie[Je].context,tt)}}return!0},u.prototype.on=function(m,g,A){return i(this,m,g,A,!1)},u.prototype.once=function(m,g,A){return i(this,m,g,A,!0)},u.prototype.removeListener=function(m,g,A,L){var V=t?t+m:m;if(!this._events[V])return this;if(!g)return s(this,V),this;var W=this._events[V];if(W.fn)W.fn===g&&(!L||W.once)&&(!A||W.context===A)&&s(this,V);else{for(var Q=0,ie=[],Fe=W.length;Q<Fe;Q++)(W[Q].fn!==g||L&&!W[Q].once||A&&W[Q].context!==A)&&ie.push(W[Q]);ie.length?this._events[V]=ie.length===1?ie[0]:ie:s(this,V)}return this},u.prototype.removeAllListeners=function(m){var g;return m?(g=t?t+m:m,this._events[g]&&s(this,g)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=t,u.EventEmitter=u,a.exports=u})(gt);var St=gt.exports,Ft=R(St);class Vt{constructor(e,t,r,n){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 i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=r,this.onFlush=n;const s=(m,g)=>{g=g||{},g.frag=this.frag,g.id=this.id,m===f.ERROR&&(this.error=g.error),this.hls.trigger(m,g)};this.observer=new Ft,this.observer.on(f.FRAG_DECRYPTED,s),this.observer.on(f.ERROR,s);const u=rr(i.preferManagedMediaSource)||{isTypeSupported:()=>!1},d={mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:u.isTypeSupported('audio/mp4; codecs="ac-3"')};if(this.useWorker&&typeof Worker!="undefined"&&(i.workerPath||ha())){try{i.workerPath?(S.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=Us(i.workerPath)):(S.log(`injecting Web Worker for "${t}"`),this.workerContext=$s()),this.onwmsg=A=>this.onWorkerMessage(A);const{worker:g}=this.workerContext;g.addEventListener("message",this.onwmsg),g.onerror=A=>{const L=new Error(`${A.message} (${A.filename}:${A.lineno})`);i.enableWorker=!1,S.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(f.ERROR,{type:_.OTHER_ERROR,details:y.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:L})},g.postMessage({cmd:"init",typeSupported:d,vendor:"",id:t,config:JSON.stringify(i)})}catch(g){S.warn(`Error setting up "${t}" Web Worker, fallback to inline`,g),this.resetWorker(),this.error=null,this.transmuxer=new C(this.observer,d,i,"",t)}return}this.transmuxer=new C(this.observer,d,i,"",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,n,i,s,u,d,m,g){var A,L;m.transmuxing.start=self.performance.now();const{transmuxer:V}=this,W=s?s.start:i.start,Q=i.decryptdata,ie=this.frag,Fe=!(ie&&i.cc===ie.cc),tt=!(ie&&m.level===ie.level),Je=ie?m.sn-ie.sn:-1,yt=this.part?m.part-this.part.index:-1,at=Je===0&&m.id>1&&m.id===(ie==null?void 0:ie.stats.chunkCount),Rt=!tt&&(Je===1||Je===0&&(yt===1||at&&yt<=0)),vt=self.performance.now();(tt||Je||i.stats.parsing.start===0)&&(i.stats.parsing.start=vt),s&&(yt||!Rt)&&(s.stats.parsing.start=vt);const Mt=!(ie&&((A=i.initSegment)==null?void 0:A.url)===((L=ie.initSegment)==null?void 0:L.url)),Qt=new rt(Fe,Rt,d,tt,W,Mt);if(!Rt||Fe||Mt){S.log(`[transmuxer-interface, ${i.type}]: Starting new transmux session for sn: ${m.sn} p: ${m.part} level: ${m.level} id: ${m.id}
|
|
|
discontinuity: ${Fe}
|
|
|
trackSwitch: ${tt}
|
|
|
contiguous: ${Rt}
|
|
|
accurateTimeOffset: ${d}
|
|
|
timeOffset: ${W}
|
|
|
initSegmentChange: ${Mt}`);const At=new We(r,n,t,u,g);this.configureTransmuxer(At)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:Q,chunkMeta:m,state:Qt},e instanceof ArrayBuffer?[e]:[]);else if(V){const At=V.push(e,Q,m,Qt);Te(At)?(V.async=!0,At.then(Nt=>{this.handleTransmuxComplete(Nt)}).catch(Nt=>{this.transmuxerError(Nt,m,"transmuxer-interface push error")})):(V.async=!1,this.handleTransmuxComplete(At))}}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);Te(r)||t.async?(Te(r)||(r=Promise.resolve(r)),r.then(i=>{this.handleFlushResult(i,e)}).catch(i=>{this.transmuxerError(i,e,"transmuxer-interface flush error")})):this.handleFlushResult(r,e)}}transmuxerError(e,t,r){this.hls&&(this.error=e,this.hls.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.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)){S.warn(`worker message received with no ${t?"event name":"data"}`);return}const r=this.hls;if(this.hls)switch(t.event){case"init":{var n;const i=(n=this.workerContext)==null?void 0:n.objectURL;i&&self.URL.revokeObjectURL(i);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}case"workerLog":S[t.data.logType]&&S[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 sr=100;class Ar extends ps{constructor(e,t,r){super(e,t,r,"[audio-stream-controller]",ke.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(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(f.ERROR,this.onError,this),e.on(f.BUFFER_RESET,this.onBufferReset,this),e.on(f.BUFFER_CREATED,this.onBufferCreated,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(f.ERROR,this.onError,this),e.off(f.BUFFER_RESET,this.onBufferReset,this),e.off(f.BUFFER_CREATED,this.onBufferCreated,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:i}){if(r==="main"){const s=t.cc;this.initPTS[t.cc]={baseTime:n,timescale:i},this.log(`InitPTS for cc: ${s} found from main: ${n}`),this.videoTrackCC=s,this.state===Dt.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels){this.startPosition=e,this.state=Dt.STOPPED;return}const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(sr),t>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=Dt.IDLE):(this.loadedmetadata=!1,this.state=Dt.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case Dt.IDLE:this.doTickIdle();break;case Dt.WAITING_TRACK:{var e;const{levels:r,trackId:n}=this,i=r==null||(e=r[n])==null?void 0:e.details;if(i){if(this.waitForCdnTuneIn(i))break;this.state=Dt.WAITING_INIT_PTS}break}case Dt.FRAG_LOADING_WAITING_RETRY:{var t;const r=performance.now(),n=this.retryDate;if(!n||r>=n||(t=this.media)!=null&&t.seeking){const{levels:i,trackId:s}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((i==null?void 0:i[s])||null),this.state=Dt.IDLE}break}case Dt.WAITING_INIT_PTS:{const r=this.waitingData;if(r){const{frag:n,part:i,cache:s,complete:u}=r;if(this.initPTS[n.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=Dt.FRAG_LOADING;const d=s.flush(),m={frag:n,part:i,payload:d,networkDetails:null};this._handleFragmentLoadProgress(m),u&&super._handleFragmentLoadComplete(m)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${n.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const d=this.getLoadPosition(),m=nn.bufferInfo(this.mediaBuffer,d,this.config.maxBufferHole);Mi(m.end,this.config.maxFragLookUpTolerance,n)<0&&(this.log(`Waiting fragment cc (${n.cc}) @ ${n.start} cancelled because another fragment at ${m.end} is needed`),this.clearWaitingFragment())}}else this.state=Dt.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=Dt.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:n}=this,i=e.config;if(!this.buffering||!r&&(this.startFragRequested||!i.startFragPrefetch)||!(t!=null&&t[n]))return;const s=t[n],u=s.details;if(!u||u.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(u)){this.state=Dt.WAITING_TRACK;return}const d=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&d&&(this.bufferFlushed=!1,this.afterBufferFlushed(d,Y.AUDIO,ke.AUDIO));const m=this.getFwdBufferInfo(d,ke.AUDIO);if(m===null)return;if(!this.switchingTrack&&this._streamEnded(m,u)){e.trigger(f.BUFFER_EOS,{type:"audio"}),this.state=Dt.ENDED;return}const g=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,ke.MAIN),A=m.len,L=this.getMaxBufferLength(g==null?void 0:g.len),V=u.fragments,W=V[0].start,Q=this.getLoadPosition(),ie=this.flushing?Q:m.end;if(this.switchingTrack&&r){const yt=Q;u.PTSKnown&&yt<W&&(m.end>W||m.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=W+.05)}if(A>=L&&!this.switchingTrack&&ie<V[V.length-1].start)return;let Fe=this.getNextFragment(ie,u),tt=!1;if(Fe&&this.isLoopLoading(Fe,ie)&&(tt=!!Fe.gap,Fe=this.getNextFragmentLoopLoading(Fe,u,m,ke.MAIN,L)),!Fe){this.bufferFlushed=!0;return}const Je=g&&Fe.start>g.end+u.targetduration;if(Je||!(g!=null&&g.len)&&m.len){const yt=this.getAppendedFrag(Fe.start,ke.MAIN);if(yt===null||(tt||(tt=!!yt.gap||!!Je&&g.len===0),Je&&!tt||tt&&m.nextStart&&m.nextStart<yt.end))return}this.loadFragment(Fe,s,ie)}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 On(r))}onAudioTrackSwitching(e,t){const r=!!t.url;this.trackId=t.id;const{fragCurrent:n}=this;n&&(n.abortRequests(),this.removeUnbufferedFrags(n.start)),this.resetLoadingState(),r?this.setInterval(sr):this.resetTransmuxer(),r?(this.switchingTrack=t,this.state=Dt.IDLE,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=Dt.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(f.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var r;if(this.mainDetails==null){this.cachedTrackLoadedData=t;return}const{levels:n}=this,{details:i,id:s}=t;if(!n){this.warn(`Audio tracks were reset while loading level ${s}`);return}this.log(`Audio track ${s} loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const u=n[s];let d=0;if(i.live||(r=u.details)!=null&&r.live){this.checkLiveUpdate(i);const g=this.mainDetails;if(i.deltaUpdateFailed||!g)return;if(!u.details&&i.hasProgramDateTime&&g.hasProgramDateTime)si(i,g),d=i.fragments[0].start;else{var m;d=this.alignPlaylists(i,u.details,(m=this.levelLastLoaded)==null?void 0:m.details)}}u.details=i,this.levelLastLoaded=u,!this.startFragRequested&&(this.mainDetails||!i.live)&&this.setStartPosition(this.mainDetails||i,d),this.state===Dt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=Dt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:r,part:n,payload:i}=e,{config:s,trackId:u,levels:d}=this;if(!d){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 m=d[u];if(!m){this.warn("Audio track is undefined on fragment load progress");return}const g=m.details;if(!g){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(r.start);return}const A=s.defaultAudioCodec||m.audioCodec||"mp4a.40.2";let L=this.transmuxer;L||(L=this.transmuxer=new Vt(this.hls,ke.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const V=this.initPTS[r.cc],W=(t=r.initSegment)==null?void 0:t.data;if(V!==void 0){const ie=n?n.index:-1,Fe=ie!==-1,tt=new Os(r.level,r.sn,r.stats.chunkCount,i.byteLength,ie,Fe);L.push(i,W,A,"",r,n,g.totalduration,!1,tt,V)}else{this.log(`Unknown video PTS for cc ${r.cc}, waiting for video PTS before demuxing audio frag ${r.sn} of [${g.startSN} ,${g.endSN}],track ${u}`);const{cache:Q}=this.waitingData=this.waitingData||{frag:r,part:n,cache:new Ns,complete:!1};Q.push(new Uint8Array(i)),this.waitingVideoCC=this.videoTrackCC,this.state=Dt.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:n}=t;if(r.type!==ke.AUDIO){if(!this.loadedmetadata&&r.type===ke.MAIN){const i=this.videoBuffer||this.media;i&&nn.getBuffered(i).length&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${n?" p: "+n.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(r.sn!=="initSegment"){this.fragPrevious=r;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(f.AUDIO_TRACK_SWITCHED,fe({},i)))}this.fragBufferedComplete(r,n)}onError(e,t){var r;if(t.fatal){this.state=Dt.ERROR;return}switch(t.details){case y.FRAG_GAP:case y.FRAG_PARSING_ERROR:case y.FRAG_DECRYPT_ERROR:case y.FRAG_LOAD_ERROR:case y.FRAG_LOAD_TIMEOUT:case y.KEY_LOAD_ERROR:case y.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ke.AUDIO,t);break;case y.AUDIO_TRACK_LOAD_ERROR:case y.AUDIO_TRACK_LOAD_TIMEOUT:case y.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Dt.WAITING_TRACK&&((r=t.context)==null?void 0:r.type)===Gt.AUDIO_TRACK&&(this.state=Dt.IDLE);break;case y.BUFFER_APPEND_ERROR:case y.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="audio")return;if(t.details===y.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case y.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==Y.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==Y.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Dt.ENDED&&(this.state=Dt.IDLE);const r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,t,ke.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const r="audio",{hls:n}=this,{remuxResult:i,chunkMeta:s}=e,u=this.getCurrentContext(s);if(!u){this.resetWhenMissingContext(s);return}const{frag:d,part:m,level:g}=u,{details:A}=g,{audio:L,text:V,id3:W,initSegment:Q}=i;if(this.fragContextChanged(d)||!A){this.fragmentTracker.removeFragment(d);return}if(this.state=Dt.PARSING,this.switchingTrack&&L&&this.completeAudioSwitch(this.switchingTrack),Q!=null&&Q.tracks){const ie=d.initSegment||d;this._bufferInitSegment(g,Q.tracks,ie,s),n.trigger(f.FRAG_PARSING_INIT_SEGMENT,{frag:ie,id:r,tracks:Q.tracks})}if(L){const{startPTS:ie,endPTS:Fe,startDTS:tt,endDTS:Je}=L;m&&(m.elementaryStreams[Y.AUDIO]={startPTS:ie,endPTS:Fe,startDTS:tt,endDTS:Je}),d.setElementaryStreamInfo(Y.AUDIO,ie,Fe,tt,Je),this.bufferFragmentData(L,d,m,s)}if(W!=null&&(t=W.samples)!=null&&t.length){const ie=o({id:r,frag:d,details:A},W);n.trigger(f.FRAG_PARSING_METADATA,ie)}if(V){const ie=o({id:r,frag:d,details:A},V);n.trigger(f.FRAG_PARSING_USERDATA,ie)}}_bufferInitSegment(e,t,r,n){if(this.state!==Dt.PARSING)return;t.video&&delete t.video;const i=t.audio;if(!i)return;i.id="audio";const s=e.audioCodec;this.log(`Init audio buffer, container:${i.container}, codecs[level/parsed]=[${s}/${i.codec}]`),s&&s.split(",").length===1&&(i.levelCodec=s),this.hls.trigger(f.BUFFER_CODECS,t);const u=i.initSegment;if(u!=null&&u.byteLength){const d={type:"audio",frag:r,part:null,chunkMeta:n,parent:r.type,data:u};this.hls.trigger(f.BUFFER_APPENDING,d)}this.tickImmediate()}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);if(this.fragCurrent=e,this.switchingTrack||n===wn.NOT_LOADED||n===wn.PARTIAL){var i;if(e.sn==="initSegment")this._loadInitSegment(e,t);else if((i=t.details)!=null&&i.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=Dt.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragments[0].start!==t.details.fragments[0].start&&si(t.details,s)}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:n,characteristics:i,audioCodec:s,channels:u}=this.bufferedTrack;vi({name:t,lang:r,assocLang:n,characteristics:i,audioCodec:s,channels:u},e,Ti)||(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(f.AUDIO_TRACK_SWITCHED,fe({},e))}}function Rr(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!Tr(a[t].attrs,e[t].attrs))return!1;return!0}function Tr(a,e,t){const r=a["STABLE-RENDITION-ID"];return r&&!t?r===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(n=>a[n]!==e[n])}function Xr(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Qr extends on{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(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVEL_LOADING,this.onLevelLoading,this),e.off(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(f.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:r,groupId:n,details:i}=t,s=this.tracksInGroup[r];if(!s||s.groupId!==n){this.warn(`Audio track with id:${r} and group:${n} not found in active group ${s==null?void 0:s.groupId}`);return}const u=s.details;s.details=t.details,this.log(`Audio track ${r} "${s.name}" lang:${s.lang} group:${n} loaded [${i.startSN}-${i.endSN}]`),r===this.trackId&&this.playlistLoaded(r,t,u)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const r=t.audioGroups||null,n=this.groupIds;let i=this.currentTrack;if(!r||(n==null?void 0:n.length)!==(r==null?void 0:r.length)||r!=null&&r.some(u=>(n==null?void 0:n.indexOf(u))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const u=this.tracks.filter(L=>!r||r.indexOf(L.groupId)!==-1);if(u.length)this.selectDefaultTrack&&!u.some(L=>L.default)&&(this.selectDefaultTrack=!1),u.forEach((L,V)=>{L.id=V});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=u;const d=this.hls.config.audioPreference;if(!i&&d){const L=Jn(d,u,Ti);if(L>-1)i=u[L];else{const V=Jn(d,this.tracks);i=this.tracks[V]}}let m=this.findTrackId(i);m===-1&&i&&(m=this.findTrackId(null));const g={audioTracks:u};this.log(`Updating audio tracks, ${u.length} track(s) found in group(s): ${r==null?void 0:r.join(",")}`),this.hls.trigger(f.AUDIO_TRACKS_UPDATED,g);const A=this.trackId;if(m!==-1&&A===-1)this.setAudioTrack(m);else if(u.length&&A===-1){var s;const L=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${u.length}`);this.warn(L.message),this.hls.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:L})}}else this.shouldReloadPlaylist(i)&&this.setAudioTrack(this.trackId)}onError(e,t){t.fatal||!t.context||t.context.type===Gt.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 n=this.currentTrack;if(n&&vi(e,n,Ti))return n;const i=Jn(e,this.tracksInGroup,Ti);if(i>-1){const s=this.tracksInGroup[i];return this.setAudioTrack(i),s}else if(n){let s=t.loadLevel;s===-1&&(s=t.firstAutoLevel);const u=Ba(e,t.levels,r,s,Ti);if(u===-1)return null;t.nextLoadLevel=u}if(e.channels||e.audioCodec){const s=Jn(e,r);if(s>-1)return r[s]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.clearTimer(),this.selectDefaultTrack=!1;const r=this.currentTrack,n=t[e],i=n.details&&!n.details.live;if(e===this.trackId&&n===r&&i||(this.log(`Switching to audio-track ${e} "${n.name}" lang:${n.lang} group:${n.groupId} channels:${n.channels}`),this.trackId=e,this.currentTrack=n,this.hls.trigger(f.AUDIO_TRACK_SWITCHING,fe({},n)),i))return;const s=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(s)}findTrackId(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const n=t[r];if(!(this.selectDefaultTrack&&!n.default)&&(!e||vi(e,n,Ti)))return r}if(e){const{name:r,lang:n,assocLang:i,characteristics:s,audioCodec:u,channels:d}=e;for(let m=0;m<t.length;m++){const g=t[m];if(vi({name:r,lang:n,assocLang:i,characteristics:s,audioCodec:u,channels:d},g,Ti))return m}for(let m=0;m<t.length;m++){const g=t[m];if(Tr(e.attrs,g.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return m}for(let m=0;m<t.length;m++){const g=t[m];if(Tr(e.attrs,g.attrs,["LANGUAGE"]))return m}}return-1}loadPlaylist(e){const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){super.loadPlaylist();const r=t.id,n=t.groupId;let i=t.url;if(e)try{i=e.addDirectives(i)}catch(s){this.warn(`Could not construct new URL with HLS Delivery Directives: ${s}`)}this.log(`loading audio-track playlist ${r} "${t.name}" lang:${t.lang} group:${n}`),this.clearTimer(),this.hls.trigger(f.AUDIO_TRACK_LOADING,{url:i,id:r,groupId:n,deliveryDirectives:e||null})}}}const un=500;class cn extends ps{constructor(e,t,r){super(e,t,r,"[subtitle-stream-controller]",ke.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(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.ERROR,this.onError,this),e.on(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(f.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.ERROR,this.onError,this),e.off(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(f.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=Dt.IDLE,this.setInterval(un),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:n}=t;if(this.fragPrevious=r,this.state=Dt.IDLE,!n)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const u=r.start;for(let m=0;m<i.length;m++)if(u>=i[m].start&&u<=i[m].end){s=i[m];break}const d=r.start+r.duration;s?s.end=d:(s={start:u,end:d},i.push(s)),this.fragmentTracker.fragBuffered(r),this.fragBufferedComplete(r,null)}onBufferFlushing(e,t){const{startOffset:r,endOffset:n}=t;if(r===0&&n!==Number.POSITIVE_INFINITY){const i=n-1;if(i<=0)return;t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach(s=>{for(let u=0;u<s.length;){if(s[u].end<=i){s.shift();continue}else if(s[u].start<i)s[u].start=i;else break;u++}}),this.fragmentTracker.removeFragmentsInRange(r,i,ke.SUBTITLE)}}onFragBuffered(e,t){if(!this.loadedmetadata&&t.frag.type===ke.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)===ke.SUBTITLE&&(t.details===y.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Dt.STOPPED&&(this.state=Dt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&Rr(this.levels,t)){this.levels=t.map(r=>new On(r));return}this.tracksBuffered=[],this.levels=t.map(r=>{const n=new On(r);return this.tracksBuffered[n.id]=[],n}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,ke.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var r;if(this.currentTrackId=t.id,!((r=this.levels)!=null&&r.length)||this.currentTrackId===-1){this.clearInterval();return}const n=this.levels[this.currentTrackId];n!=null&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.setInterval(un)}onSubtitleTrackLoaded(e,t){var r;const{currentTrackId:n,levels:i}=this,{details:s,id:u}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${u}`);return}const d=i[u];if(u>=i.length||!d)return;this.log(`Subtitle track ${u} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let m=0;if(s.live||(r=d.details)!=null&&r.live){const A=this.mainDetails;if(s.deltaUpdateFailed||!A)return;const L=A.fragments[0];if(!d.details)s.hasProgramDateTime&&A.hasProgramDateTime?(si(s,A),m=s.fragments[0].start):L&&(m=L.start,Pt(s,m));else{var g;m=this.alignPlaylists(s,d.details,(g=this.levelLastLoaded)==null?void 0:g.details),m===0&&L&&(m=L.start,Pt(s,m))}}d.details=s,this.levelLastLoaded=d,u===n&&(!this.startFragRequested&&(this.mainDetails||!s.live)&&this.setStartPosition(this.mainDetails||s,m),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===Dt.IDLE&&(Si(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),d.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:r}=e,n=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&r&&r.byteLength>0&&n!=null&&n.key&&n.iv&&n.method==="AES-128"){const s=performance.now();this.decrypter.decrypt(new Uint8Array(r),n.key.buffer,n.iv.buffer).catch(u=>{throw i.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.FRAG_DECRYPT_ERROR,fatal:!1,error:u,reason:u.message,frag:t}),u}).then(u=>{const d=performance.now();i.trigger(f.FRAG_DECRYPTED,{frag:t,payload:u,stats:{tstart:s,tdecrypt:d}})}).catch(u=>{this.warn(`${u.name}: ${u.message}`),this.state=Dt.IDLE})}}doTick(){if(!this.media){this.state=Dt.IDLE;return}if(this.state===Dt.IDLE){const{currentTrackId:e,levels:t}=this,r=t==null?void 0:t[e];if(!r||!t.length||!r.details)return;const{config:n}=this,i=this.getLoadPosition(),s=nn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,n.maxBufferHole),{end:u,len:d}=s,m=this.getFwdBufferInfo(this.media,ke.MAIN),g=r.details,A=this.getMaxBufferLength(m==null?void 0:m.len)+g.levelTargetDuration;if(d>A)return;const L=g.fragments,V=L.length,W=g.edge;let Q=null;const ie=this.fragPrevious;if(u<W){const Fe=n.maxFragLookUpTolerance,tt=u>W-Fe?0:Fe;Q=Si(ie,L,Math.max(L[0].start,u),tt),!Q&&ie&&ie.start<L[0].start&&(Q=L[0])}else Q=L[V-1];if(!Q)return;if(Q=this.mapToInitFragWhenRequired(Q),Q.sn!=="initSegment"){const Fe=Q.sn-g.startSN,tt=L[Fe-1];tt&&tt.cc===Q.cc&&this.fragmentTracker.getState(tt)===wn.NOT_LOADED&&(Q=tt)}this.fragmentTracker.getState(Q)===wn.NOT_LOADED&&this.loadFragment(Q,r,u)}}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 dn(this.tracksBuffered[this.currentTrackId]||[])}}class dn{constructor(e){this.buffered=void 0;const t=(r,n,i)=>{if(n=n>>>0,n>i-1)throw new DOMException(`Failed to execute '${r}' on 'TimeRanges': The index provided (${n}) is greater than the maximum bound (${i})`);return e[n][r]};this.buffered={get length(){return e.length},end(r){return t("end",r,e.length)},start(r){return t("start",r,e.length)}}}}class Bn extends on{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=an(this.media.textTracks);for(let i=0;i<r.length;i++)if(r[i].mode==="hidden")t=r[i];else if(r[i].mode==="showing"){t=r[i];break}const n=this.findTrackForTextTrack(t);this.subtitleTrack!==n&&this.setSubtitleTrack(n)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVEL_LOADING,this.onLevelLoading,this),e.off(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(f.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),an(this.media.textTracks).forEach(t=>{yn(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:n,details:i}=t,s=this.tracksInGroup[r];if(!s||s.groupId!==n){this.warn(`Subtitle track with id:${r} and group:${n} not found in active group ${s==null?void 0:s.groupId}`);return}const u=s.details;s.details=t.details,this.log(`Subtitle track ${r} "${s.name}" lang:${s.lang} group:${n} loaded [${i.startSN}-${i.endSN}]`),r===this.trackId&&this.playlistLoaded(r,t,u)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const r=t.subtitleGroups||null,n=this.groupIds;let i=this.currentTrack;if(!r||(n==null?void 0:n.length)!==(r==null?void 0:r.length)||r!=null&&r.some(s=>(n==null?void 0:n.indexOf(s))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const s=this.tracks.filter(g=>!r||r.indexOf(g.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(g=>g.default)&&(this.selectDefaultTrack=!1),s.forEach((g,A)=>{g.id=A});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const u=this.hls.config.subtitlePreference;if(!i&&u){this.selectDefaultTrack=!1;const g=Jn(u,s);if(g>-1)i=s[g];else{const A=Jn(u,this.tracks);i=this.tracks[A]}}let d=this.findTrackId(i);d===-1&&i&&(d=this.findTrackId(null));const m={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${r==null?void 0:r.join(",")}" group-id`),this.hls.trigger(f.SUBTITLE_TRACKS_UPDATED,m),d!==-1&&this.trackId===-1&&this.setSubtitleTrack(d)}else this.shouldReloadPlaylist(i)&&this.setSubtitleTrack(this.trackId)}findTrackId(e){const t=this.tracksInGroup,r=this.selectDefaultTrack;for(let n=0;n<t.length;n++){const i=t[n];if(!(r&&!i.default||!r&&!e)&&(!e||vi(i,e)))return n}if(e){for(let n=0;n<t.length;n++){const i=t[n];if(Tr(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const i=t[n];if(Tr(e.attrs,i.attrs,["LANGUAGE"]))return n}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const n=t[r];if(Xr(n,e))return r}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===Gt.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&&vi(e,r))return r;const n=Jn(e,this.tracksInGroup);if(n>-1){const i=this.tracksInGroup[n];return this.setSubtitleTrack(n),i}else{if(r)return null;{const i=Jn(e,t);if(i>-1)return t[i]}}}}return null}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){const r=t.id,n=t.groupId;let i=t.url;if(e)try{i=e.addDirectives(i)}catch(s){this.warn(`Could not construct new URL with HLS Delivery Directives: ${s}`)}this.log(`Loading subtitle playlist for id ${r}`),this.hls.trigger(f.SUBTITLE_TRACK_LOADING,{url:i,id:r,groupId:n,deliveryDirectives:e||null})}}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=an(e.textTracks),r=this.currentTrack;let n;if(r&&(n=t.filter(i=>Xr(r,i))[0],n||this.warn(`Unable to find subtitle TextTrack with name "${r.name}" and language "${r.lang}"`)),[].slice.call(t).forEach(i=>{i.mode!=="disabled"&&i!==n&&(i.mode="disabled")}),n){const i=this.subtitleDisplay?"showing":"hidden";n.mode!==i&&(n.mode=i)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!$(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.clearTimer(),this.selectDefaultTrack=!1;const r=this.currentTrack,n=t[e]||null;if(this.trackId=e,this.currentTrack=n,this.toggleTrackModes(),!n){this.hls.trigger(f.SUBTITLE_TRACK_SWITCH,{id:e});return}const i=!!n.details&&!n.details.live;if(e===this.trackId&&n===r&&i)return;this.log(`Switching to subtitle-track ${e}`+(n?` "${n.name}" lang:${n.lang} group:${n.groupId}`:""));const{id:s,groupId:u="",name:d,type:m,url:g}=n;this.hls.trigger(f.SUBTITLE_TRACK_SWITCH,{id:s,groupId:u,name:d,type:m,url:g});const A=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(A)}}class Rn{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,t,r){const n=this.queues[t];n.push(e),n.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(i=>{t=i}),n={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(n,e),r}executeNext(e){const t=this.queues[e];if(t.length){const r=t[0];try{r.execute()}catch(n){S.warn(`[buffer-operation-queue]: Exception executing "${e}" SourceBuffer operation: ${n}`),r.onError(n);const i=this.buffers[e];i!=null&&i.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const Vr=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;class ei{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:n}=this;this.log("Media source opened"),r&&(r.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(f.MEDIA_ATTACHED,{media:r,mediaSource:n})),n&&n.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:n}=this;r!==n&&S.error(`Media element src was set while attaching MediaSource (${n} > ${r})`)},this.hls=e;const t="[buffer-controller]";this.appendSource=Mr(rr(e.config.preferManagedMediaSource)),this.log=S.log.bind(S,t),this.warn=S.warn.bind(S,t),this.error=S.error.bind(S,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(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.BUFFER_RESET,this.onBufferReset,this),e.on(f.BUFFER_APPENDING,this.onBufferAppending,this),e.on(f.BUFFER_CODECS,this.onBufferCodecs,this),e.on(f.BUFFER_EOS,this.onBufferEos,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.FRAG_PARSED,this.onFragParsed,this),e.on(f.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.BUFFER_RESET,this.onBufferReset,this),e.off(f.BUFFER_APPENDING,this.onBufferAppending,this),e.off(f.BUFFER_CODECS,this.onBufferCodecs,this),e.off(f.BUFFER_EOS,this.onBufferEos,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.FRAG_PARSED,this.onFragParsed,this),e.off(f.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new Rn(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,n=rr(this.appendSource);if(r&&n){var i;const s=this.mediaSource=new n;this.log(`created media source: ${(i=s.constructor)==null?void 0:i.name}`),s.addEventListener("sourceopen",this._onMediaSourceOpen),s.addEventListener("sourceended",this._onMediaSourceEnded),s.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(s.addEventListener("startstreaming",this._onStartStreaming),s.addEventListener("endstreaming",this._onEndStreaming));const u=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{r.removeAttribute("src");const d=self.ManagedMediaSource;r.disableRemotePlayback=r.disableRemotePlayback||d&&s instanceof d,Ei(r),oi(r,u),r.load()}catch(d){r.src=u}else r.src=u;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(n){this.warn(`onMediaDetaching: ${n.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&&Ei(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(f.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(n){this.warn(`onBufferReset ${e}`,n)}}onBufferCodecs(e,t){const r=this.getSourceBufferTypes().length,n=Object.keys(t);if(n.forEach(s=>{if(r){const d=this.tracks[s];if(d&&typeof d.buffer.changeType=="function"){var u;const{id:m,codec:g,levelCodec:A,container:L,metadata:V}=t[s],W=Dr(d.codec,d.levelCodec),Q=W==null?void 0:W.replace(Vr,"$1");let ie=Dr(g,A);const Fe=(u=ie)==null?void 0:u.replace(Vr,"$1");if(ie&&Q!==Fe){s.slice(0,5)==="audio"&&(ie=yr(ie,this.appendSource));const tt=`${L};codecs=${ie}`;this.appendChangeType(s,tt),this.log(`switching codec ${W} to ${ie}`),this.tracks[s]={buffer:d.buffer,codec:g,container:L,levelCodec:A,metadata:V,id:m}}}}else this.pendingTracks[s]=t[s]}),r)return;const i=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==i&&(this.log(`${i} bufferCodec event(s) expected ${n.join(",")}`),this.bufferCodecEventsExpected=i),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()}appendChangeType(e,t){const{operationQueue:r}=this,n={execute:()=>{const i=this.sourceBuffer[e];i&&(this.log(`changing ${e} sourceBuffer type to ${t}`),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:i=>{this.warn(`Failed to change ${e} SourceBuffer type`,i)}};r.append(n,e,!!this.pendingTracks[e])}onBufferAppending(e,t){const{hls:r,operationQueue:n,tracks:i}=this,{data:s,type:u,frag:d,part:m,chunkMeta:g}=t,A=g.buffering[u],L=self.performance.now();A.start=L;const V=d.stats.buffering,W=m?m.stats.buffering:null;V.start===0&&(V.start=L),W&&W.start===0&&(W.start=L);const Q=i.audio;let ie=!1;u==="audio"&&(Q==null?void 0:Q.container)==="audio/mpeg"&&(ie=!this.lastMpegAudioChunk||g.id===1||this.lastMpegAudioChunk.sn!==g.sn,this.lastMpegAudioChunk=g);const Fe=d.start,tt={execute:()=>{if(A.executeStart=self.performance.now(),ie){const Je=this.sourceBuffer[u];if(Je){const yt=Fe-Je.timestampOffset;Math.abs(yt)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${Fe} (delta: ${yt}) sn: ${d.sn})`),Je.timestampOffset=Fe)}}this.appendExecutor(s,u)},onStart:()=>{},onComplete:()=>{const Je=self.performance.now();A.executeEnd=A.end=Je,V.first===0&&(V.first=Je),W&&W.first===0&&(W.first=Je);const{sourceBuffer:yt}=this,at={};for(const Rt in yt)at[Rt]=nn.getBuffered(yt[Rt]);this.appendErrors[u]=0,u==="audio"||u==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(f.BUFFER_APPENDED,{type:u,frag:d,part:m,chunkMeta:g,parent:d.type,timeRanges:at})},onError:Je=>{const yt={type:_.MEDIA_ERROR,parent:d.type,details:y.BUFFER_APPEND_ERROR,sourceBufferName:u,frag:d,part:m,chunkMeta:g,error:Je,err:Je,fatal:!1};if(Je.code===DOMException.QUOTA_EXCEEDED_ERR)yt.details=y.BUFFER_FULL_ERROR;else{const at=++this.appendErrors[u];yt.details=y.BUFFER_APPEND_ERROR,this.warn(`Failed ${at}/${r.config.appendErrorMaxRetry} times to append segment in "${u}" sourceBuffer`),at>=r.config.appendErrorMaxRetry&&(yt.fatal=!0)}r.trigger(f.ERROR,yt)}};n.append(tt,u,!!this.pendingTracks[u])}onBufferFlushing(e,t){const{operationQueue:r}=this,n=i=>({execute:this.removeExecutor.bind(this,i,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(f.BUFFER_FLUSHED,{type:i})},onError:s=>{this.warn(`Failed to remove from ${i} SourceBuffer`,s)}});t.type?r.append(n(t.type),t.type):this.getSourceBufferTypes().forEach(i=>{r.append(n(i),i)})}onFragParsed(e,t){const{frag:r,part:n}=t,i=[],s=n?n.elementaryStreams:r.elementaryStreams;s[Y.AUDIOVIDEO]?i.push("audiovideo"):(s[Y.AUDIO]&&i.push("audio"),s[Y.VIDEO]&&i.push("video"));const u=()=>{const d=self.performance.now();r.stats.buffering.end=d,n&&(n.stats.buffering.end=d);const m=n?n.stats:r.stats;this.hls.trigger(f.FRAG_BUFFERED,{frag:r,part:n,stats:m,id:r.type})};i.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${r.type} level: ${r.level} sn: ${r.sn}`),this.blockBuffers(u,i)}onFragChanged(e,t){this.trimBuffers()}onBufferEos(e,t){this.getSourceBufferTypes().reduce((n,i)=>{const s=this.sourceBuffer[i];return s&&(!t.type||t.type===i)&&(s.ending=!0,s.ended||(s.ended=!0,this.log(`${i} sourceBuffer now EOS`))),n&&!!(!s||s.ended)},!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers(()=>{this.getSourceBufferTypes().forEach(i=>{const s=this.sourceBuffer[i];s&&(s.ending=!1)});const{mediaSource:n}=this;if(!n||n.readyState!=="open"){n&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${n.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),n.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 i=e.config,s=r.currentTime,u=t.levelTargetDuration,d=t.live&&i.liveBackBufferLength!==null?i.liveBackBufferLength:i.backBufferLength;if($(d)&&d>0){const m=Math.max(d,u),g=Math.floor(s/u)*u-m;this.flushBackBuffer(s,u,g)}if($(i.frontBufferFlushThreshold)&&i.frontBufferFlushThreshold>0){const m=Math.max(i.maxBufferLength,i.frontBufferFlushThreshold),g=Math.max(m,u),A=Math.floor(s/u)*u+g;this.flushFrontBuffer(s,u,A)}}flushBackBuffer(e,t,r){const{details:n,sourceBuffer:i}=this;this.getSourceBufferTypes().forEach(u=>{const d=i[u];if(d){const m=nn.getBuffered(d);if(m.length>0&&r>m.start(0)){if(this.hls.trigger(f.BACK_BUFFER_REACHED,{bufferEnd:r}),n!=null&&n.live)this.hls.trigger(f.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r});else if(d.ended&&m.end(m.length-1)-e<t*2){this.log(`Cannot flush ${u} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(f.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:u})}}})}flushFrontBuffer(e,t,r){const{sourceBuffer:n}=this;this.getSourceBufferTypes().forEach(s=>{const u=n[s];if(u){const d=nn.getBuffered(u),m=d.length;if(m<2)return;const g=d.start(m-1),A=d.end(m-1);if(r>g||e>=g&&e<=A)return;if(u.ended&&e-A<2*t){this.log(`Cannot flush ${s} front buffer while SourceBuffer is in ended state`);return}this.hls.trigger(f.BUFFER_FLUSHING,{startOffset:g,endOffset:1/0,type:s})}})}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;const{details:e,hls:t,media:r,mediaSource:n}=this,i=e.fragments[0].start+e.totalduration,s=r.duration,u=$(n.duration)?n.duration:0;e.live&&t.config.liveDurationInfinity?(n.duration=1/0,this.updateSeekableRange(e)):(i>u&&i>s||!$(s))&&(this.log(`Updating Media Source duration to ${i.toFixed(3)}`),n.duration=i)}updateSeekableRange(e){const t=this.mediaSource,r=e.fragments;if(r.length&&e.live&&t!=null&&t.setLiveSeekableRange){const i=Math.max(0,r[0].start),s=Math.max(i,i+e.totalduration);this.log(`Media Source duration is set to ${t.duration}. Setting seekable range to ${i}-${s}.`),t.setLiveSeekableRange(i,s)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:r}=this,n=Object.keys(r).length;if(n&&(!e||n===2||"audiovideo"in r)){this.createSourceBuffers(r),this.pendingTracks={};const i=this.getSourceBufferTypes();if(i.length)this.hls.trigger(f.BUFFER_CREATED,{tracks:this.tracks}),i.forEach(s=>{t.executeNext(s)});else{const s=new Error("could not create source buffer for media codec(s)");this.hls.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:s,reason:s.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:r}=this;if(!r)throw Error("createSourceBuffers called when mediaSource was null");for(const i in e)if(!t[i]){var n;const s=e[i];if(!s)throw Error(`source buffer exists for track ${i}, however track does not`);let u=((n=s.levelCodec)==null?void 0:n.indexOf(","))===-1?s.levelCodec:s.codec;u&&i.slice(0,5)==="audio"&&(u=yr(u,this.appendSource));const d=`${s.container};codecs=${u}`;this.log(`creating sourceBuffer(${d})`);try{const m=t[i]=r.addSourceBuffer(d),g=i;this.addBufferListener(g,"updatestart",this._onSBUpdateStart),this.addBufferListener(g,"updateend",this._onSBUpdateEnd),this.addBufferListener(g,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(g,"bufferedchange",(A,L)=>{const V=L.removedRanges;V!=null&&V.length&&this.hls.trigger(f.BUFFER_FLUSHED,{type:i})}),this.tracks[i]={buffer:m,codec:u,container:s.container,levelCodec:s.levelCodec,metadata:s.metadata,id:s.id}}catch(m){this.error(`error while trying to add sourceBuffer: ${m.message}`),this.hls.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:m,sourceBufferName:i,mimeType:d})}}}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 n=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(r=this.mediaSource)==null?void 0:r.readyState}`);this.error(`${n}`,t),this.hls.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:n,fatal:!1});const i=this.operationQueue.current(e);i&&i.onError(n)}removeExecutor(e,t,r){const{media:n,mediaSource:i,operationQueue:s,sourceBuffer:u}=this,d=u[e];if(!n||!i||!d){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),s.shiftAndExecuteNext(e);return}const m=$(n.duration)?n.duration:1/0,g=$(i.duration)?i.duration:1/0,A=Math.max(0,t),L=Math.min(r,m,g);L>A&&(!d.ending||d.ended)?(d.ended=!1,this.log(`Removing [${A},${L}] from the ${e} SourceBuffer`),d.remove(A,L)):s.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,n=t.map(i=>r.appendBlocker(i));Promise.all(n).then(()=>{e(),t.forEach(i=>{const s=this.sourceBuffer[i];s!=null&&s.updating||r.shiftAndExecuteNext(i)})})}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,r){const n=this.sourceBuffer[e];if(!n)return;const i=r.bind(this,e);this.listeners[e].push({event:t,listener:i}),n.addEventListener(t,i)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach(r=>{t.removeEventListener(r.event,r.listener)})}}function Ei(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function oi(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}const Nn={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},wi=a=>String.fromCharCode(Nn[a]||a),xn=15,hi=100,to={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Xi={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Qi={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Ji={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ts=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Ds{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const r=typeof t=="function"?t():t;S.log(`${this.time} [${e}] ${r}`)}}}const $i=function(e){const t=[];for(let r=0;r<e.length;r++)t.push(e[r].toString(16));return t};class Da{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let r=0;r<t.length;r++){const n=t[r];e.hasOwnProperty(n)&&(this[n]=e[n])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class ro{constructor(){this.uchar=" ",this.penState=new Da}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 Qs{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Da,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<hi;t++)this.chars.push(new ro);this.logger=e}equals(e){for(let t=0;t<hi;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<hi;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<hi;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>hi&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=hi)}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=wi(e);if(this.pos>=hi){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<hi;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<hi;r++){const n=this.chars[r].uchar;n!==" "&&(t=!1),e.push(n)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class Cs{constructor(e){this.rows=[],this.currRow=xn-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<xn;t++)this.rows.push(new Qs(e));this.logger=e}reset(){for(let e=0;e<xn;e++)this.rows[e].clear();this.currRow=xn-1}equals(e){let t=!0;for(let r=0;r<xn;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t}copy(e){for(let t=0;t<xn;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<xn;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 u=0;u<xn;u++)this.rows[u].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const u=s.rows[i].cueStartTime,d=this.logger.time;if(u!==null&&d!==null&&u<d)for(let m=0;m<this.nrRollUpRows;m++)this.rows[t-this.nrRollUpRows+m+1].copy(s.rows[i+m])}}this.currRow=t;const r=this.rows[this.currRow];if(e.indent!==null){const i=e.indent,s=Math.max(i-1,0);r.setCursor(e.indent),e.color=r.chars[s].penState.foreground}const n={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(n)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+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="",n=-1;for(let i=0;i<xn;i++){const s=this.rows[i].getTextString();s&&(n=i+1,e?t.push("Row "+n+": '"+s+"'"):t.push(s.trim()))}return t.length>0&&(e?r="["+t.join(" | ")+"]":r=t.join(`
|
|
|
`)),r}getTextAndFormat(){return this.rows}}class Js{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 Cs(r),this.nonDisplayedMemory=new Cs(r),this.lastOutputScreen=new Cs(r),this.currRollUpRow=this.displayedMemory.rows[xn-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[xn-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let r=0;r<e.length;r++)this.writeScreen.insertChar(e[r]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const r=Math.floor(e/2)-16,n=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=n[r]}this.logger.log(2,"MIDROW: "+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=Jo(),this.logger=void 0;const n=this.logger=new Ds;this.channels=[null,new Js(e,t,n),new Js(e+1,r,n)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let r=0;r<t.length;r+=2){const n=t[r]&127,i=t[r+1]&127;let s=!1,u=null;if(n===0&&i===0)continue;this.logger.log(3,()=>"["+$i([t[r],t[r+1]])+"] -> ("+$i([n,i])+")");const d=this.cmdHistory;if(n>=16&&n<=31){if(Qo(n,i,d)){Ui(null,null,d),this.logger.log(3,()=>"Repeated command ("+$i([n,i])+") is dropped");continue}Ui(n,i,this.cmdHistory),s=this.parseCmd(n,i),s||(s=this.parseMidrow(n,i)),s||(s=this.parsePAC(n,i)),s||(s=this.parseBackgroundAttributes(n,i))}else Ui(null,null,d);if(!s&&(u=this.parseChars(n,i),u)){const g=this.currentChannel;g&&g>0?this.channels[g].insertChars(u):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!u&&this.logger.log(2,()=>"Couldn't parse cleaned data "+$i([n,i])+" orig: "+$i([t[r],t[r+1]]))}}parseCmd(e,t){const r=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,n=(e===23||e===31)&&t>=33&&t<=35;if(!(r||n))return!1;const i=e===20||e===21||e===23?1:2,s=this.channels[i];return e===20||e===21||e===28||e===29?t===32?s.ccRCL():t===33?s.ccBS():t===34?s.ccAOF():t===35?s.ccAON():t===36?s.ccDER():t===37?s.ccRU(2):t===38?s.ccRU(3):t===39?s.ccRU(4):t===40?s.ccFON():t===41?s.ccRDC():t===42?s.ccTR():t===43?s.ccRTD():t===44?s.ccEDM():t===45?s.ccCR():t===46?s.ccENM():t===47&&s.ccEOC():s.ccTO(t-32),this.currentChannel=i,!0}parseMidrow(e,t){let r=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?r=1:r=2,r!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const n=this.channels[r];return n?(n.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+$i([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let r;const n=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,i=(e===16||e===24)&&t>=64&&t<=95;if(!(n||i))return!1;const s=e<=23?1:2;t>=64&&t<=95?r=s===1?to[e]:Qi[e]:r=s===1?Xi[e]:Ji[e];const u=this.channels[s];return u?(u.setPAC(this.interpretPAC(r,t)),this.currentChannel=s,!0):!1}interpretPAC(e,t){let r;const n={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?r=t-96:r=t-64,n.underline=(r&1)===1,r<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(n.italics=!0,n.color="white"):n.indent=Math.floor((r-16)/2)*4,n}parseChars(e,t){let r,n=null,i=null;if(e>=25?(r=2,i=e-8):(r=1,i=e),i>=17&&i<=19){let s;i===17?s=t+80:i===18?s=t+112:s=t+144,this.logger.log(2,()=>"Special char '"+wi(s)+"' in channel "+r),n=[s]}else e>=32&&e<=127&&(n=t===0?[e]:[e,t]);return n&&this.logger.log(3,()=>"Char codes = "+$i(n).join(",")),n}parseBackgroundAttributes(e,t){const r=(e===16||e===24)&&t>=32&&t<=47,n=(e===23||e===31)&&t>=45&&t<=47;if(!(r||n))return!1;let i;const s={};e===16||e===24?(i=Math.floor((t-32)/2),s.background=Ts[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const u=e<=23?1:2;return this.channels[u].setBkgData(s),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}Ui(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 Ui(a,e,t){t.a=a,t.b=e}function Qo(a,e,t){return t.a===a&&t.b===e}function Jo(){return{a:null,b:null}}class Ca{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 no=function(){if(Xe!=null&&Xe.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(u,d){if(typeof d!="string"||!Array.isArray(u))return!1;const m=d.toLowerCase();return~u.indexOf(m)?m:!1}function r(u){return t(a,u)}function n(u){return t(e,u)}function i(u,...d){let m=1;for(;m<arguments.length;m++){const g=arguments[m];for(const A in g)u[A]=g[A]}return u}function s(u,d,m){const g=this,A={enumerable:!0};g.hasBeenReset=!1;let L="",V=!1,W=u,Q=d,ie=m,Fe=null,tt="",Je=!0,yt="auto",at="start",Rt=50,vt="middle",Mt=50,Qt="middle";Object.defineProperty(g,"id",i({},A,{get:function(){return L},set:function(At){L=""+At}})),Object.defineProperty(g,"pauseOnExit",i({},A,{get:function(){return V},set:function(At){V=!!At}})),Object.defineProperty(g,"startTime",i({},A,{get:function(){return W},set:function(At){if(typeof At!="number")throw new TypeError("Start time must be set to a number.");W=At,this.hasBeenReset=!0}})),Object.defineProperty(g,"endTime",i({},A,{get:function(){return Q},set:function(At){if(typeof At!="number")throw new TypeError("End time must be set to a number.");Q=At,this.hasBeenReset=!0}})),Object.defineProperty(g,"text",i({},A,{get:function(){return ie},set:function(At){ie=""+At,this.hasBeenReset=!0}})),Object.defineProperty(g,"region",i({},A,{get:function(){return Fe},set:function(At){Fe=At,this.hasBeenReset=!0}})),Object.defineProperty(g,"vertical",i({},A,{get:function(){return tt},set:function(At){const Nt=r(At);if(Nt===!1)throw new SyntaxError("An invalid or illegal string was specified.");tt=Nt,this.hasBeenReset=!0}})),Object.defineProperty(g,"snapToLines",i({},A,{get:function(){return Je},set:function(At){Je=!!At,this.hasBeenReset=!0}})),Object.defineProperty(g,"line",i({},A,{get:function(){return yt},set:function(At){if(typeof At!="number"&&At!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");yt=At,this.hasBeenReset=!0}})),Object.defineProperty(g,"lineAlign",i({},A,{get:function(){return at},set:function(At){const Nt=n(At);if(!Nt)throw new SyntaxError("An invalid or illegal string was specified.");at=Nt,this.hasBeenReset=!0}})),Object.defineProperty(g,"position",i({},A,{get:function(){return Rt},set:function(At){if(At<0||At>100)throw new Error("Position must be between 0 and 100.");Rt=At,this.hasBeenReset=!0}})),Object.defineProperty(g,"positionAlign",i({},A,{get:function(){return vt},set:function(At){const Nt=n(At);if(!Nt)throw new SyntaxError("An invalid or illegal string was specified.");vt=Nt,this.hasBeenReset=!0}})),Object.defineProperty(g,"size",i({},A,{get:function(){return Mt},set:function(At){if(At<0||At>100)throw new Error("Size must be between 0 and 100.");Mt=At,this.hasBeenReset=!0}})),Object.defineProperty(g,"align",i({},A,{get:function(){return Qt},set:function(At){const Nt=n(At);if(!Nt)throw new SyntaxError("An invalid or illegal string was specified.");Qt=Nt,this.hasBeenReset=!0}})),g.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();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(a){function e(r,n,i,s){return(r|0)*3600+(n|0)*60+(i|0)+parseFloat(s||0)}const t=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}class 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 n=0;n<r.length;++n)if(t===r[n]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const r=parseFloat(t);if(r>=0&&r<=100)return this.set(e,r),!0}return!1}}function Eo(a,e,t,r){const n=r?a.split(r):[a];for(const i in n){if(typeof n[i]!="string")continue;const s=n[i].split(t);if(s.length!==2)continue;const u=s[0],d=s[1];e(u,d)}}const io=new no(0,0,""),Ra=io.align==="middle"?"middle":"center";function rl(a,e,t){const r=a;function n(){const u=xo(a);if(u===null)throw new Error("Malformed timestamp: "+r);return a=a.replace(/^[^\sa-zA-Z-]+/,""),u}function i(u,d){const m=new tl;Eo(u,function(L,V){let W;switch(L){case"region":for(let Q=t.length-1;Q>=0;Q--)if(t[Q].id===V){m.set(L,t[Q].region);break}break;case"vertical":m.alt(L,V,["rl","lr"]);break;case"line":W=V.split(","),m.integer(L,W[0]),m.percent(L,W[0])&&m.set("snapToLines",!1),m.alt(L,W[0],["auto"]),W.length===2&&m.alt("lineAlign",W[1],["start",Ra,"end"]);break;case"position":W=V.split(","),m.percent(L,W[0]),W.length===2&&m.alt("positionAlign",W[1],["start",Ra,"end","line-left","line-right","auto"]);break;case"size":m.percent(L,V);break;case"align":m.alt(L,V,["start",Ra,"end","left","right"]);break}},/:/,/\s/),d.region=m.get("region",null),d.vertical=m.get("vertical","");let g=m.get("line","auto");g==="auto"&&io.line===-1&&(g=-1),d.line=g,d.lineAlign=m.get("lineAlign","start"),d.snapToLines=m.get("snapToLines",!0),d.size=m.get("size",100),d.align=m.get("align",Ra);let A=m.get("position","auto");A==="auto"&&io.position===50&&(A=d.align==="start"||d.align==="left"?0:d.align==="end"||d.align==="right"?100:50),d.position=A}function s(){a=a.replace(/^\s+/,"")}if(s(),e.startTime=n(),s(),a.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+r);a=a.slice(3),s(),e.endTime=n(),s(),i(a,e)}function wo(a){return a.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}class nl{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 i=t.buffer,s=0;for(i=wo(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
|
|
|
`;)++s;const u=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
|
|
|
`&&++s,t.buffer=i.slice(s),u}function n(i){Eo(i,function(s,u){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=r();const u=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(u!=null&&u[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:i=r(),t.state){case"HEADER":/:/.test(i)?n(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new no(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{rl(i,t.cue,t.regionList)}catch(u){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const u=i.indexOf("-->")!==-1;if(!i||u&&(s=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
|
|
|
`),t.cue.text+=i}continue;case"BADCUE":i||(t.state="ID")}}}catch(i){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
|
|
|
|
|
|
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const il=/\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)),n=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!$(t)||!$(r)||!$(n)||!$(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*r,t+=60*1e3*n,t+=60*60*1e3*i,t},ao=function(e){let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return(t>>>0).toString()};function oo(a,e,t){return ao(a.toString())+ao(e.toString())+ao(t)}const al=function(e,t,r){let n=e[t],i=e[n.prevCC];if(!i||!i.new&&n.new){e.ccOffset=e.presentationOffset=n.start,n.new=!1;return}for(;(s=i)!=null&&s.new;){var s;e.ccOffset+=n.start-i.start,n.new=!1,n=i,i=e[n.prevCC]}e.presentationOffset=r};function ol(a,e,t,r,n,i,s){const u=new nl,d=bt(new Uint8Array(a)).trim().replace(il,`
|
|
|
`).split(`
|
|
|
`),m=[],g=e?wa(e.baseTime,e.timescale):0;let A="00:00.000",L=0,V=0,W,Q=!0;u.oncue=function(ie){const Fe=t[r];let tt=t.ccOffset;const Je=(L-g)/9e4;if(Fe!=null&&Fe.new&&(V!==void 0?tt=t.ccOffset=Fe.start:al(t,r,Je)),Je){if(!e){W=new Error("Missing initPTS for VTT MPEGTS");return}tt=Je-t.presentationOffset}const yt=ie.endTime-ie.startTime,at=jn((ie.startTime+tt-V)*9e4,n*9e4)/9e4;ie.startTime=Math.max(at,0),ie.endTime=Math.max(at+yt,0);const Rt=ie.text.trim();ie.text=decodeURIComponent(encodeURIComponent(Rt)),ie.id||(ie.id=oo(ie.startTime,ie.endTime,Rt)),ie.endTime>0&&m.push(ie)},u.onparsingerror=function(ie){W=ie},u.onflush=function(){if(W){s(W);return}i(m)},d.forEach(ie=>{if(Q)if(so(ie,"X-TIMESTAMP-MAP=")){Q=!1,ie.slice(16).split(",").forEach(Fe=>{so(Fe,"LOCAL:")?A=Fe.slice(6):so(Fe,"MPEGTS:")&&(L=parseInt(Fe.slice(7)))});try{V=sl(A)/1e3}catch(Fe){W=Fe}return}else ie===""&&(Q=!1);u.parse(ie+`
|
|
|
`)}),u.flush()}const lo="stpp.ttml.im1t",So=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Ao=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,ll={left:"start",center:"center",right:"end",start:"start",end:"end"};function To(a,e,t,r){const n=ge(new Uint8Array(a),["mdat"]);if(n.length===0){r(new Error("Could not parse IMSC1 mdat"));return}const i=n.map(u=>bt(u)),s=Qa(e.baseTime,1,e.timescale);try{i.forEach(u=>t(ul(u,s)))}catch(u){r(u)}}function ul(a,e){const n=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");const i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(i).reduce((A,L)=>(A[L]=n.getAttribute(`ttp:${L}`)||i[L],A),{}),u=n.getAttribute("xml:space")!=="preserve",d=Do(uo(n,"styling","style")),m=Do(uo(n,"layout","region")),g=uo(n,"body","[begin]");return[].map.call(g,A=>{const L=Co(A,u);if(!L||!A.hasAttribute("begin"))return null;const V=ho(A.getAttribute("begin"),s),W=ho(A.getAttribute("dur"),s);let Q=ho(A.getAttribute("end"),s);if(V===null)throw Ro(A);if(Q===null){if(W===null)throw Ro(A);Q=V+W}const ie=new no(V-e,Q-e,L);ie.id=oo(ie.startTime,ie.endTime,ie.text);const Fe=m[A.getAttribute("region")],tt=d[A.getAttribute("style")],Je=cl(Fe,tt,d),{textAlign:yt}=Je;if(yt){const at=ll[yt];at&&(ie.lineAlign=at),ie.align=yt}return o(ie,Je),ie}).filter(A=>A!==null)}function uo(a,e,t){const r=a.getElementsByTagName(e)[0];return r?[].slice.call(r.querySelectorAll(t)):[]}function Do(a){return a.reduce((e,t)=>{const r=t.getAttribute("xml:id");return r&&(e[r]=t),e},{})}function Co(a,e){return[].slice.call(a.childNodes).reduce((t,r,n)=>{var i;return r.nodeName==="br"&&n?t+`
|
|
|
`:(i=r.childNodes)!=null&&i.length?Co(r,e):e?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent},"")}function cl(a,e,t){const r="http://www.w3.org/ns/ttml#styling";let n=null;const i=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=a!=null&&a.hasAttribute("style")?a.getAttribute("style"):null;return s&&t.hasOwnProperty(s)&&(n=t[s]),i.reduce((u,d)=>{const m=co(e,r,d)||co(a,r,d)||co(n,r,d);return m&&(u[d]=m),u},{})}function co(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function Ro(a){return new Error(`Could not parse ttml timestamp ${a}`)}function ho(a,e){if(!a)return null;let t=xo(a);return t===null&&(So.test(a)?t=hl(a,e):Ao.test(a)&&(t=fl(a,e))),t}function hl(a,e){const t=So.exec(a),r=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+r/e.frameRate}function fl(a,e){const t=Ao.exec(a),r=Number(t[1]);switch(t[2]){case"h":return r*3600;case"m":return r*60;case"ms":return r*1e3;case"f":return r/e.frameRate;case"t":return r/e.tickRate}return r}class 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(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(f.FRAG_LOADING,this.onFragLoading,this),e.on(f.FRAG_LOADED,this.onFragLoaded,this),e.on(f.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(f.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(f.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(f.FRAG_LOADING,this.onFragLoading,this),e.off(f.FRAG_LOADED,this.onFragLoaded,this),e.off(f.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(f.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(f.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(f.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 Ca(this,"textTrack1"),t=new Ca(this,"textTrack2"),r=new Ca(this,"textTrack3"),n=new Ca(this,"textTrack4");this.cea608Parser1=new ea(1,e,t),this.cea608Parser2=new ea(3,r,n)}}addCues(e,t,r,n,i){let s=!1;for(let u=i.length;u--;){const d=i[u],m=pl(d[0],d[1],t,r);if(m>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],r),s=!0,m/(r-t)>.5))return}if(s||i.push([t,r]),this.config.renderTextTracksNatively){const u=this.captionsTracks[e];this.Cues.newCue(u,t,r,n)}else{const u=this.Cues.newCue(null,t,r,n);this.hls.trigger(f.CUES_PARSED,{type:"captions",cues:u,track:e})}}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:i}){const{unparsedVttFrags:s}=this;r==="main"&&(this.initPTS[t.cc]={baseTime:n,timescale:i}),s.length&&(this.unparsedVttFrags=[],s.forEach(u=>{this.onFragLoaded(f.FRAG_LOADED,u)}))}getExistingTrack(e,t){const{media:r}=this;if(r)for(let n=0;n<r.textTracks.length;n++){const i=r.textTracks[n];if(Lo(i,{name:e,lang:t,attrs:{}}))return i}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:r,media:n}=this,{label:i,languageCode:s}=t[e],u=this.getExistingTrack(i,s);if(u)r[e]=u,yn(r[e]),En(r[e],n);else{const d=this.createTextTrack("captions",i,s);d&&(d[e]=!0,r[e]=d)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const r=t.label,n={_id:e,label:r,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(f.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}createTextTrack(e,t,r){const n=this.media;if(n)return n.addTextTrack(e,t,r)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach(t=>{yn(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++)yn(t[r])}onSubtitleTracksUpdated(e,t){const r=t.subtitleTracks||[],n=r.some(i=>i.textCodec===lo);if(this.config.enableWebVTT||n&&this.config.enableIMSC1){if(Rr(this.tracks,r)){this.tracks=r;return}if(this.textTracks=[],this.tracks=r,this.config.renderTextTracksNatively){const s=this.media,u=s?an(s.textTracks):null;if(this.tracks.forEach((d,m)=>{let g;if(u){let A=null;for(let L=0;L<u.length;L++)if(u[L]&&Lo(u[L],d)){A=u[L],u[L]=null;break}A&&(g=A)}if(g)yn(g);else{const A=ko(d);g=this.createTextTrack(A,d.name,d.lang),g&&(g.mode="disabled")}g&&this.textTracks.push(g)}),u!=null&&u.length){const d=u.filter(m=>m!==null).map(m=>m.label);d.length&&S.warn(`Media element contains unused subtitle tracks: ${d.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(u=>({label:u.name,kind:u.type.toLowerCase(),default:u.default,subtitleTrack:u}));this.hls.trigger(f.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(r=>{const n=/(?:CC|SERVICE)([1-4])/.exec(r.instreamId);if(!n)return;const i=`textTrack${n[1]}`,s=this.captionsProperties[i];s&&(s.label=r.name,r.lang&&(s.languageCode=r.lang),s.media=r)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===ke.MAIN){var r,n;const{cea608Parser1:i,cea608Parser2:s,lastSn:u}=this,{cc:d,sn:m}=t.frag,g=(r=(n=t.part)==null?void 0:n.index)!=null?r:-1;i&&s&&(m!==u+1||m===u&&g!==this.lastPartIndex+1||d!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=d,this.lastSn=m,this.lastPartIndex=g}}onFragLoaded(e,t){const{frag:r,payload:n}=t;if(r.type===ke.SUBTITLE)if(n.byteLength){const i=r.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const u=this.tracks[r.level],d=this.vttCCs;d[r.cc]||(d[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),u&&u.textCodec===lo?this._parseIMSC1(r,n):this._parseVTTs(t)}}else this.hls.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const r=this.hls;To(t,this.initPTS[e.cc],n=>{this._appendCues(n,e.level),r.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},n=>{S.log(`Failed to parse IMSC1: ${n}`),r.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})})}_parseVTTs(e){var t;const{frag:r,payload:n}=e,{initPTS:i,unparsedVttFrags:s}=this,u=i.length-1;if(!i[r.cc]&&u===-1){s.push(e);return}const d=this.hls,m=(t=r.initSegment)!=null&&t.data?Ct(r.initSegment.data,new Uint8Array(n)):n;ol(m,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,g=>{this._appendCues(g,r.level),d.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},g=>{const A=g.message==="Missing initPTS for VTT MPEGTS";A?s.push(e):this._fallbackToIMSC1(r,n),S.log(`Failed to parse VTT cue: ${g}`),!(A&&u>r.cc)&&d.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:g})})}_fallbackToIMSC1(e,t){const r=this.tracks[e.level];r.textCodec||To(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 n=this.textTracks[t];if(!n||n.mode==="disabled")return;e.forEach(i=>Ln(n,i))}else{const n=this.tracks[t];if(!n)return;const i=n.default?"default":"subtitles"+t;r.trigger(f.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:r}=t;r.type===ke.SUBTITLE&&this.onFragLoaded(f.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){this.initCea608Parsers();const{cea608Parser1:r,cea608Parser2:n}=this;if(!this.enabled||!r||!n)return;const{frag:i,samples:s}=t;if(!(i.type===ke.MAIN&&this.closedCaptionsForLevel(i)==="NONE"))for(let u=0;u<s.length;u++){const d=s[u].bytes;if(d){const m=this.extractCea608Data(d);r.addData(s[u].pts,m[0]),n.addData(s[u].pts,m[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:r,endOffsetSubtitles:n,type:i}){const{media:s}=this;if(!(!s||s.currentTime<r)){if(!i||i==="video"){const{captionsTracks:u}=this;Object.keys(u).forEach(d=>Nr(u[d],t,r))}if(this.config.renderTextTracksNatively&&t===0&&n!==void 0){const{textTracks:u}=this;Object.keys(u).forEach(d=>Nr(u[d],t,n))}}}extractCea608Data(e){const t=[[],[]],r=e[0]&31;let n=2;for(let i=0;i<r;i++){const s=e[n++],u=127&e[n++],d=127&e[n++];if(u===0&&d===0)continue;if((4&s)!==0){const g=3&s;(g===0||g===1)&&(t[g].push(u),t[g].push(d))}}return t}}function ko(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function Lo(a,e){return!!a&&a.kind===ko(e)&&Xr(e,a)}function pl(a,e,t,r){return Math.min(e,r)-Math.max(a,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(f.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.BUFFER_CODECS,this.onBufferCodecs,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(f.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.BUFFER_CODECS,this.onBufferCodecs,this),e.off(f.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&&$(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&&S.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((n,i)=>this.isLevelAllowed(n)&&i<=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 n=(u,d)=>d?u.width!==d.width||u.height!==d.height:!0;let i=e.length-1;const s=Math.max(t,r);for(let u=0;u<e.length;u+=1){const d=e[u];if((d.width>=s||d.height>=s)&&n(d,e[u+1])){i=u;break}}return i}}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(f.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(f.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 n=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=n,n&&typeof n.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,r){const n=performance.now();if(t){if(this.lastTime){const i=n-this.lastTime,s=r-this.lastDroppedFrames,u=t-this.lastDecodedFrames,d=1e3*s/i,m=this.hls;if(m.trigger(f.FPS_DROP,{currentDropped:s,currentDecoded:u,totalDroppedFrames:r}),d>0&&s>m.config.fpsDroppedMonitoringThreshold*u){let g=m.currentLevel;S.warn("drop FPS ratio greater than max allowed value for currentLevel: "+g),g>0&&(m.autoLevelCapping===-1||m.autoLevelCapping>=g)&&(g=g-1,m.trigger(f.FPS_DROP_LEVEL_CAPPING,{level:g,droppedLevel:m.currentLevel}),m.autoLevelCapping=g,this.streamController.nextLevelSwitch())}}this.lastTime=n,this.lastDroppedFrames=r,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}const ka="[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=S.debug.bind(S,ka),this.log=S.log.bind(S,ka),this.warn=S.warn.bind(S,ka),this.error=S.error.bind(S,ka),this.onMediaEncrypted=t=>{const{initDataType:r,initData:n}=t,i=`"${t.type}" event: init data type: "${r}"`;if(this.debug(i),n!==null){if(!this.keyFormatPromise){let s=Object.keys(this.keySystemAccessPromises);s.length||(s=Zt(this.config));const u=s.map(jt).filter(d=>!!d);this.keyFormatPromise=this.getKeyFormatPromise(u)}this.keyFormatPromise.then(s=>{const u=pt(s);let d,m;if(r==="sinf"){if(u!==Ke.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${u}`);return}const W=_t(new Uint8Array(n));try{const Q=b(JSON.parse(W).sinf),ie=xt(Q);if(!ie)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");d=ie.subarray(8,24),m=Ke.FAIRPLAY}catch(Q){this.warn(`${i} Failed to parse sinf: ${Q}`);return}}else{if(u!==Ke.WIDEVINE&&u!==Ke.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${u}`);return}const W=hr(n),Q=W.filter(Fe=>!!Fe.systemId&&ht(Fe.systemId)===u);Q.length>1&&this.warn(`${i} Using first of ${Q.length} pssh found for selected key-system ${u}`);const ie=Q[0];if(!ie){W.length===0||W.some(Fe=>!Fe.systemId)?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${W.map(Fe=>ht(Fe.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(m=ht(ie.systemId),ie.version===0&&ie.data)if(m===Ke.WIDEVINE){const Fe=ie.data.length-22;d=ie.data.subarray(Fe,Fe+16)}else m===Ke.PLAYREADY&&(d=Bt(ie.data))}if(!m||!d){this.log(`Unable to handle ${i} with key-system ${u}`);return}const g=Ue.hexDump(d),{keyIdToKeySessionPromise:A,mediaKeySessions:L}=this;let V=A[g];for(let W=0;W<L.length;W++){const Q=L[W],ie=Q.decryptdata;if(!ie.keyId)continue;const Fe=Ue.hexDump(ie.keyId);if(g===Fe||ie.uri.replace(/-/g,"").indexOf(g)!==-1){if(V=A[Fe],ie.pssh)break;delete A[Fe],ie.pssh=new Uint8Array(n),ie.keyId=d,V=A[g]=V.then(()=>this.generateRequestWithPreferredKeySession(Q,r,n,"encrypted-event-key-match")),V.catch(tt=>this.handleError(tt));break}}if(!V){if(m!==u){this.log(`Ignoring "${i}" with ${m} init data for selected key-system ${u}`);return}V=A[g]=this.getKeySystemSelectionPromise([m]).then(({keySystem:W,mediaKeys:Q})=>{var ie;this.throwIfDestroyed();const Fe=new Jt("ISO-23001-7",g,(ie=jt(W))!=null?ie:"");return Fe.pssh=new Uint8Array(n),Fe.keyId=d,this.attemptSetMediaKeys(W,Q).then(()=>{this.throwIfDestroyed();const tt=this.createMediaKeySessionContext({decryptdata:Fe,keySystem:W,mediaKeys:Q});return this.generateRequestWithPreferredKeySession(tt,r,n,"encrypted-event-no-match")})}),V.catch(W=>this.handleError(W))}})}},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(f.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(f.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(f.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(f.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(f.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(f.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(f.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:r}=this.config,n=t[e];if(n)return n.licenseUrl;if(e===Ke.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=(s,u,d)=>!!s&&d.indexOf(s)===u,n=t.map(s=>s.audioCodec).filter(r),i=t.map(s=>s.videoCodec).filter(r);return n.length+i.length===0&&i.push("avc1.42e01e"),new Promise((s,u)=>{const d=m=>{const g=m.shift();this.getMediaKeysPromise(g,n,i).then(A=>s({keySystem:g,mediaKeys:A})).catch(A=>{m.length?d(m):A instanceof fi?u(A):u(new fi({type:_.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_NO_ACCESS,error:A,fatal:!0},A.message))})};d(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:r}=this.config;if(typeof r!="function"){let n=`Configured requestMediaKeySystemAccess is not a function ${r}`;return qt===null&&self.location.protocol==="http:"&&(n=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(n))}return r(e,t)}getMediaKeysPromise(e,t,r){const n=Ut(e,t,r,this.config.drmSystemOptions),i=this.keySystemAccessPromises[e];let s=i==null?void 0:i.keySystemAccess;if(!s){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(n)}`),s=this.requestMediaKeySystemAccess(e,n);const u=this.keySystemAccessPromises[e]={keySystemAccess:s};return s.catch(d=>{this.log(`Failed to obtain access to key-system "${e}": ${d}`)}),s.then(d=>{this.log(`Access for key-system "${d.keySystem}" obtained`);const m=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),u.mediaKeys=d.createMediaKeys().then(g=>(this.log(`Media-keys created for "${e}"`),m.then(A=>A?this.setMediaKeysServerCertificate(g,e,A):g))),u.mediaKeys.catch(g=>{this.error(`Failed to create media-keys for "${e}"}: ${g}`)}),u.mediaKeys})}return s.then(()=>i.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:r}){this.log(`Creating key-system session "${t}" keyId: ${Ue.hexDump(e.keyId||[])}`);const n=r.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:r,mediaKeysSession:n,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const r=this.createMediaKeySessionContext(e),n=this.getKeyIdString(t),i="cenc";this.keyIdToKeySessionPromise[n]=this.generateRequestWithPreferredKeySession(r,i,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 Ue.hexDump(e.keyId)}updateKeySession(e,t){var r;const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyID ${Ue.hexDump(((r=e.decryptdata)==null?void 0:r.keyId)||[])}
|
|
|
} (data length: ${t&&t.byteLength})`),n.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 n=Zt(this.config),i=e.map(pt).filter(s=>!!s&&n.indexOf(s)!==-1);return this.getKeySystemSelectionPromise(i).then(({keySystem:s})=>{const u=jt(s);u?t(u):r(new Error(`Unable to find format for key-system "${s}"`))}).catch(r)})}loadKey(e){const t=e.keyInfo.decryptdata,r=this.getKeyIdString(t),n=`(keyId: ${r} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${n}`);let i=this.keyIdToKeySessionPromise[r];return i||(i=this.keyIdToKeySessionPromise[r]=this.getKeySystemForKeyPromise(t).then(({keySystem:s,mediaKeys:u})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${n}`),this.attemptSetMediaKeys(s,u).then(()=>{this.throwIfDestroyed();const d=this.createMediaKeySessionContext({keySystem:s,mediaKeys:u,decryptdata:t});return this.generateRequestWithPreferredKeySession(d,"cenc",t.pssh,"playlist-key")}))),i.catch(s=>this.handleError(s))),i}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof fi?this.hls.trigger(f.ERROR,e.data):this.hls.trigger(f.ERROR,{type:_.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),r=this.keyIdToKeySessionPromise[t];if(!r){const n=pt(e.keyFormat),i=n?[n]:Zt(this.config);return this.attemptKeySystemAccess(i)}return r}getKeySystemSelectionPromise(e){if(e.length||(e=Zt(this.config)),e.length===0)throw new fi({type:_.KEY_SYSTEM_ERROR,details:y.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 n=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(n),n.then(()=>{this.log(`Media-keys set for "${e}"`),r.push(n),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(i=>r.indexOf(i)===-1)})}generateRequestWithPreferredKeySession(e,t,r,n){var i,s;const u=(i=this.config.drmSystems)==null||(s=i[e.keySystem])==null?void 0:s.generateRequest;if(u)try{const W=u.call(this.hls,t,r,e);if(!W)throw new Error("Invalid response from configured generateRequest filter");t=W.initDataType,r=e.decryptdata.pssh=W.initData?new Uint8Array(W.initData):null}catch(W){var d;if(this.warn(W.message),(d=this.hls)!=null&&d.config.debug)throw W}if(r===null)return this.log(`Skipping key-session request for "${n}" (no initData)`),Promise.resolve(e);const m=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${n}": ${m} (init data type: ${t} length: ${r?r.byteLength:null})`);const g=new Ft,A=e._onmessage=W=>{const Q=e.mediaKeysSession;if(!Q){g.emit("error",new Error("invalid state"));return}const{messageType:ie,message:Fe}=W;this.log(`"${ie}" message event for session "${Q.sessionId}" message size: ${Fe.byteLength}`),ie==="license-request"||ie==="license-renewal"?this.renewLicense(e,Fe).catch(tt=>{this.handleError(tt),g.emit("error",tt)}):ie==="license-release"?e.keySystem===Ke.FAIRPLAY&&(this.updateKeySession(e,ze("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${ie}"`)},L=e._onkeystatuseschange=W=>{if(!e.mediaKeysSession){g.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const ie=e.keyStatus;g.emit("keyStatus",ie),ie==="expired"&&(this.warn(`${e.keySystem} expired for key ${m}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",A),e.mediaKeysSession.addEventListener("keystatuseschange",L);const V=new Promise((W,Q)=>{g.on("error",Q),g.on("keyStatus",ie=>{ie.startsWith("usable")?W():ie==="output-restricted"?Q(new fi({type:_.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):ie==="internal-error"?Q(new fi({type:_.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${ie}"`)):ie==="expired"?Q(new Error("key expired while generating request")):this.warn(`unhandled key status change "${ie}"`)})});return e.mediaKeysSession.generateRequest(t,r).then(()=>{var W;this.log(`Request generated for key-session "${(W=e.mediaKeysSession)==null?void 0:W.sessionId}" keyId: ${m}`)}).catch(W=>{throw new fi({type:_.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_NO_SESSION,error:W,fatal:!1},`Error generating key-session request: ${W}`)}).then(()=>V).catch(W=>{throw g.removeAllListeners(),this.removeSession(e),W}).then(()=>(g.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,r)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${Ue.hexDump("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r))} session keyId: ${Ue.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,r=t.loader,n=new r(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,u)=>{const d={responseType:"arraybuffer",url:i},m=t.certLoadPolicy.default,g={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},A={onSuccess:(L,V,W,Q)=>{s(L.data)},onError:(L,V,W,Q)=>{u(new fi({type:_.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:W,response:fe({url:d.url,data:void 0},L)},`"${e}" certificate request failed (${i}). Status: ${L.code} (${L.text})`))},onTimeout:(L,V,W)=>{u(new fi({type:_.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:W,response:{url:d.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(L,V,W)=>{u(new Error("aborted"))}};n.load(d,g,A)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,r){return new Promise((n,i)=>{e.setServerCertificate(r).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${r==null?void 0:r.byteLength}) on "${t}"`),n(e)}).catch(s=>{i(new fi({type:_.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(r=>this.updateKeySession(e,new Uint8Array(r)).catch(n=>{throw new fi({type:_.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:n,fatal:!0},n.message)}))}unpackPlayReadyKeyMessage(e,t){const r=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!r.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const n=new DOMParser().parseFromString(r,"application/xml"),i=n.querySelectorAll("HttpHeader");if(i.length>0){let g;for(let A=0,L=i.length;A<L;A++){var s,u;g=i[A];const V=(s=g.querySelector("name"))==null?void 0:s.textContent,W=(u=g.querySelector("value"))==null?void 0:u.textContent;V&&W&&e.setRequestHeader(V,W)}}const d=n.querySelector("Challenge"),m=d==null?void 0:d.textContent;if(!m)throw new Error("Cannot find <Challenge> in key message");return ze(atob(m))}setupLicenseXHR(e,t,r,n){const i=this.config.licenseXhrSetup;return i?Promise.resolve().then(()=>{if(!r.decryptdata)throw new Error("Key removed");return i.call(this.hls,e,t,r,n)}).catch(s=>{if(!r.decryptdata)throw s;return e.open("POST",t,!0),i.call(this.hls,e,t,r,n)}).then(s=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:s||n})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:n}))}requestLicense(e,t){const r=this.config.keyLoadPolicy.default;return new Promise((n,i)=>{const s=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${s}`);const u=new XMLHttpRequest;u.responseType="arraybuffer",u.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(u.readyState===4)if(u.status===200){this._requestLicenseFailureCount=0;let d=u.response;this.log(`License received ${d instanceof ArrayBuffer?d.byteLength:d}`);const m=this.config.licenseResponseCallback;if(m)try{d=m.call(this.hls,u,s,e)}catch(g){this.error(g)}n(d)}else{const d=r.errorRetry,m=d?d.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>m||u.status>=400&&u.status<500)i(new fi({type:_.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:u,response:{url:s,data:void 0,code:u.status,text:u.statusText}},`License Request XHR failed (${s}). Status: ${u.status} (${u.statusText})`));else{const g=m-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${g} attempts left`),this.requestLicense(e,t).then(n,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=u,this.setupLicenseXHR(u,s,e,t).then(({xhr:d,licenseChallenge:m})=>{e.keySystem==Ke.PLAYREADY&&(m=this.unpackPlayReadyKeyMessage(d,m)),d.send(m)})})}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={},Jt.clearKeyUriToKeyIdMap();const r=t.length;Rs.CDMCleanupPromise=Promise.all(t.map(n=>this.removeSession(n)).concat(e==null?void 0:e.setMediaKeys(null).catch(n=>{this.log(`Could not clear media keys: ${n}`)}))).then(()=>{r&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)}).catch(n=>{this.log(`Could not close sessions and clear media keys: ${n}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const r=t.reduce((n,i)=>(n.indexOf(i.keyFormat)===-1&&n.push(i.keyFormat),n),[]);this.log(`Selecting key-system from session-keys ${r.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(r)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:r}=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 n=this.mediaKeySessions.indexOf(e);return n>-1&&this.mediaKeySessions.splice(n,1),t.remove().catch(i=>{this.log(`Could not remove session: ${i}`)}).then(()=>t.close()).catch(i=>{this.log(`Could not close session: ${i}`)})}}}Rs.CDMCleanupPromise=void 0;class fi 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 Wn;(function(a){a.MANIFEST="m",a.AUDIO="a",a.VIDEO="v",a.MUXED="av",a.INIT="i",a.CAPTION="c",a.TIMED_TEXT="tt",a.KEY="k",a.OTHER="o"})(Wn||(Wn={}));var po;(function(a){a.DASH="d",a.HLS="h",a.SMOOTH="s",a.OTHER="o"})(po||(po={}));var os;(function(a){a.OBJECT="CMCD-Object",a.REQUEST="CMCD-Request",a.SESSION="CMCD-Session",a.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 ks{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map(r=>r instanceof ks?r:new ks(r))),this.value=e,this.params=t}}class Fo{constructor(e){this.description=void 0,this.description=e}}const vl="Dict";function _l(a){return Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":typeof a=="object"?JSON.stringify(a):String(a)}function yl(a,e,t,r){return new Error(`failed to ${a} "${_l(e)}" as ${t}`,{cause:r})}const Oo="Bare Item",bl="Boolean",xl="Byte Sequence",El="Decimal",wl="Integer";function Sl(a){return a<-999999999999999||999999999999999<a}const Al=/[\x00-\x1f\x7f]+/,Tl="Token",Dl="Key";function Ri(a,e,t){return yl("serialize",a,e,t)}function Cl(a){if(typeof a!="boolean")throw Ri(a,bl);return a?"?1":"?0"}function Rl(a){return btoa(String.fromCharCode(...a))}function kl(a){if(ArrayBuffer.isView(a)===!1)throw Ri(a,xl);return`:${Rl(a)}:`}function Po(a){if(Sl(a))throw Ri(a,wl);return a.toString()}function Ll(a){return`@${Po(a.getTime()/1e3)}`}function Mo(a,e){if(a<0)return-Mo(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const n=Math.floor(a*t);return(n%2===0?n:n+1)/t}else return Math.round(a*t)/t}function Il(a){const e=Mo(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Ri(a,El);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Fl="String";function Ol(a){if(Al.test(a))throw Ri(a,Fl);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Pl(a){return a.description||a.toString().slice(7,-1)}function Bo(a){const e=Pl(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Ri(e,Tl);return e}function mo(a){switch(typeof a){case"number":if(!$(a))throw Ri(a,Oo);return Number.isInteger(a)?Po(a):Il(a);case"string":return Ol(a);case"symbol":return Bo(a);case"boolean":return Cl(a);case"object":if(a instanceof Date)return Ll(a);if(a instanceof Uint8Array)return kl(a);if(a instanceof Fo)return Bo(a);default:throw Ri(a,Oo)}}function go(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw Ri(a,Dl);return a}function vo(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${go(e)}`:`;${go(e)}=${mo(t)}`).join("")}function No(a){return a instanceof ks?`${mo(a.value)}${vo(a.params)}`:mo(a)}function Ml(a){return`(${a.value.map(No).join(" ")})${vo(a.params)}`}function Bl(a,e={whitespace:!0}){if(typeof a!="object")throw Ri(a,vl);const t=a instanceof Map?a.entries():Object.entries(a),r=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([n,i])=>{i instanceof ks||(i=new ks(i));let s=go(n);return i.value===!0?s+=vo(i.params):(s+="=",Array.isArray(i.value)?s+=Ml(i):s+=No(i)),s}).join(`,${r}`)}function Nl(a,e){return Bl(a,e)}const $l=a=>a==="ot"||a==="sf"||a==="st",Ul=a=>typeof a=="number"?$(a):a!=null&&a!==""&&a!==!1;function zl(a,e){const t=new URL(a),r=new URL(e);if(t.origin!==r.origin)return a;const n=t.pathname.split("/").slice(1),i=r.pathname.split("/").slice(1,-1);for(;n[0]===i[0];)n.shift(),i.shift();for(;i.length;)i.shift(),n.unshift("..");return n.join("/")}function Gl(){try{return crypto.randomUUID()}catch(a){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{const i=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(n=="x"?i:i&3|8).toString(16)})}}}const La=a=>Math.round(a),Hl=(a,e)=>(e!=null&&e.baseUrl&&(a=zl(a,e.baseUrl)),encodeURIComponent(a)),Ia=a=>La(a/100)*100,jl={br:La,d:La,bl:Ia,dl:Ia,mtp:Ia,nor:Hl,rtp:Ia,tb:La};function Wl(a,e){const t={};if(a==null||typeof a!="object")return t;const r=Object.keys(a).sort(),n=o({},jl,e==null?void 0:e.formatters),i=e==null?void 0:e.filter;return r.forEach(s=>{if(i!=null&&i(s))return;let u=a[s];const d=n[s];d&&(u=d(u,e)),!(s==="v"&&u===1)&&(s=="pr"&&u===1||Ul(u)&&($l(s)&&typeof u=="string"&&(u=new Fo(u)),t[s]=u))}),t}function $o(a,e={}){return a?Nl(Wl(a,e),o({whitespace:!1},e)):""}function Kl(a,e={}){if(!a)return{};const t=Object.entries(a),r=Object.entries(gl).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),n=t.reduce((i,s)=>{var u,d;const[m,g]=s,A=((u=r.find(L=>L[1].includes(m)))==null?void 0:u[0])||os.REQUEST;return(d=i[A])!=null||(i[A]={}),i[A][m]=g,i},{});return Object.entries(n).reduce((i,[s,u])=>(i[s]=$o(u,e),i),{})}function Vl(a,e,t){return o(a,Kl(e,t))}const Zl="CMCD";function Yl(a,e={}){if(!a)return"";const t=$o(a,e);return`${Zl}=${encodeURIComponent(t)}`}const Uo=/CMCD=[^&#]+/;function ql(a,e,t){const r=Yl(e,t);if(!r)return a;if(Uo.test(a))return a.replace(Uo,r);const n=a.includes("?")?"&":"?";return`${a}${n}${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=n=>{try{this.apply(n,{ot:Wn.MANIFEST,su:!this.initialized})}catch(i){S.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=n=>{try{const i=n.frag,s=this.hls.levels[i.level],u=this.getObjectType(i),d={d:i.duration*1e3,ot:u};(u===Wn.VIDEO||u===Wn.AUDIO||u==Wn.MUXED)&&(d.br=s.bitrate/1e3,d.tb=this.getTopBandwidth(u)/1e3,d.bl=this.getBufferLength(u)),this.apply(n,d)}catch(i){S.warn("Could not generate segment CMCD data.",i)}},this.hls=e;const t=this.config=e.config,{cmcd:r}=t;r!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||Gl(),this.cid=r.contentId,this.useHeaders=r.useHeaders===!0,this.includeKeys=r.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHED,this.onMediaDetached,this),e.on(f.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHED,this.onMediaDetached,this),e.off(f.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,n;this.audioBuffer=(r=t.tracks.audio)==null?void 0:r.buffer,this.videoBuffer=(n=t.tracks.video)==null?void 0:n.buffer}createData(){var e;return{v:1,sf: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={}){o(t,this.createData());const r=t.ot===Wn.INIT||t.ot===Wn.VIDEO||t.ot===Wn.MUXED;this.starved&&r&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:n}=this;n&&(t=Object.keys(t).reduce((i,s)=>(n.includes(s)&&(i[s]=t[s]),i),{})),this.useHeaders?(e.headers||(e.headers={}),Vl(e.headers,t)):e.url=ql(e.url,t)}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Wn.TIMED_TEXT;if(e.sn==="initSegment")return Wn.INIT;if(t==="audio")return Wn.AUDIO;if(t==="main")return this.hls.audioTracks.length?Wn.VIDEO:Wn.MUXED}getTopBandwidth(e){let t=0,r;const n=this.hls;if(e===Wn.AUDIO)r=n.audioTracks;else{const i=n.maxAutoLevel,s=i>-1?i+1:n.levels.length;r=n.levels.slice(0,s)}for(const i of r)i.bitrate>t&&(t=i.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.hls.media,r=e===Wn.AUDIO?this.audioBuffer:this.videoBuffer;return!r||!t?NaN:nn.bufferInfo(r,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,r=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new r(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,u){t(i),this.loader.load(i,s,u)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,r=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new r(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,u){t(i),this.loader.load(i,s,u)}}}}const Ql=3e5;class Jl{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=S.log.bind(S,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.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)===Yt.SendAlternateToPenaltyBox&&r.flags===$r.MoveAllAlternatesMatchingHost){const n=this.levels;let i=this.pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:u,pathwayId:d,type:m}=t.context;u&&n?s=this.getPathwayForGroupId(u,m,s):d&&(s=d)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&n&&(i=n.reduce((u,d)=>(u.indexOf(d.pathwayId)===-1&&u.push(d.pathwayId),u),[])),i&&i.length>1&&(this.updatePathwayPriority(i),r.resolved=this.pathwayId!==s),r.resolved||S.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${n&&n.length} priorities: ${JSON.stringify(i)} 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,n=performance.now();Object.keys(r).forEach(i=>{n-r[i]>Ql&&delete r[i]});for(let i=0;i<e.length;i++){const s=e[i];if(s in r)continue;if(s===this.pathwayId)return;const u=this.hls.nextLoadLevel,d=this.hls.levels[u];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,gn(t),this.hls.trigger(f.LEVELS_UPDATED,{levels:t});const m=this.hls.levels[u];d&&m&&this.levels&&(m.attrs["STABLE-VARIANT-ID"]!==d.attrs["STABLE-VARIANT-ID"]&&m.bitrate!==d.bitrate&&this.log(`Unstable Pathways change from bitrate ${d.bitrate} to ${m.bitrate}`),this.hls.nextLoadLevel=u);break}}}getPathwayForGroupId(e,t,r){const n=this.getLevelsForPathway(r).concat(this.levels||[]);for(let i=0;i<n.length;i++)if(t===Gt.AUDIO_TRACK&&n[i].hasAudioGroup(e)||t===Gt.SUBTITLE_TRACK&&n[i].hasSubtitleGroup(e))return n[i].pathwayId;return r}clonePathways(e){const t=this.levels;if(!t)return;const r={},n={};e.forEach(i=>{const{ID:s,"BASE-ID":u,"URI-REPLACEMENT":d}=i;if(t.some(g=>g.pathwayId===s))return;const m=this.getLevelsForPathway(u).map(g=>{const A=new de(g.attrs);A["PATHWAY-ID"]=s;const L=A.AUDIO&&`${A.AUDIO}_clone_${s}`,V=A.SUBTITLES&&`${A.SUBTITLES}_clone_${s}`;L&&(r[A.AUDIO]=L,A.AUDIO=L),V&&(n[A.SUBTITLES]=V,A.SUBTITLES=V);const W=Go(g.uri,A["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),Q=new On({attrs:A,audioCodec:g.audioCodec,bitrate:g.bitrate,height:g.height,name:g.name,url:W,videoCodec:g.videoCodec,width:g.width});if(g.audioGroups)for(let ie=1;ie<g.audioGroups.length;ie++)Q.addGroupId("audio",`${g.audioGroups[ie]}_clone_${s}`);if(g.subtitleGroups)for(let ie=1;ie<g.subtitleGroups.length;ie++)Q.addGroupId("text",`${g.subtitleGroups[ie]}_clone_${s}`);return Q});t.push(...m),zo(this.audioTracks,r,d,s),zo(this.subtitleTracks,n,d,s)})}loadSteeringManifest(e){const t=this.hls.config,r=t.loader;this.loader&&this.loader.destroy(),this.loader=new r(t);let n;try{n=new self.URL(e)}catch(g){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(n.protocol!=="data:"){const g=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;n.searchParams.set("_HLS_pathway",this.pathwayId),n.searchParams.set("_HLS_throughput",""+g)}const i={responseType:"json",url:n.href},s=t.steeringManifestLoadPolicy.default,u=s.errorRetry||s.timeoutRetry||{},d={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:u.maxNumRetry||0,retryDelay:u.retryDelayMs||0,maxRetryDelay:u.maxRetryDelayMs||0},m={onSuccess:(g,A,L,V)=>{this.log(`Loaded steering manifest: "${n}"`);const W=g.data;if(W.VERSION!==1){this.log(`Steering VERSION ${W.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=W.TTL;const{"RELOAD-URI":Q,"PATHWAY-CLONES":ie,"PATHWAY-PRIORITY":Fe}=W;if(Q)try{this.uri=new self.URL(Q,n).href}catch(Je){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${Q}`);return}this.scheduleRefresh(this.uri||L.url),ie&&this.clonePathways(ie);const tt={steeringManifest:W,url:n.toString()};this.hls.trigger(f.STEERING_MANIFEST_LOADED,tt),Fe&&this.updatePathwayPriority(Fe)},onError:(g,A,L,V)=>{if(this.log(`Error loading steering manifest: ${g.code} ${g.text} (${A.url})`),this.stopLoad(),g.code===410){this.enabled=!1,this.log(`Steering manifest ${A.url} no longer available`);return}let W=this.timeToLoad*1e3;if(g.code===429){const Q=this.loader;if(typeof(Q==null?void 0:Q.getResponseHeader)=="function"){const ie=Q.getResponseHeader("Retry-After");ie&&(W=parseFloat(ie)*1e3)}this.log(`Steering manifest ${A.url} rate limited`);return}this.scheduleRefresh(this.uri||A.url,W)},onTimeout:(g,A,L)=>{this.log(`Timeout loading steering manifest (${A.url})`),this.scheduleRefresh(this.uri||A.url)}};this.log(`Requesting steering manifest: ${n}`),this.loader.load(i,d,m)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var r;const n=(r=this.hls)==null?void 0:r.media;if(n&&!n.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function zo(a,e,t,r){a&&Object.keys(e).forEach(n=>{const i=a.filter(s=>s.groupId===n).map(s=>{const u=o({},s);return u.details=void 0,u.attrs=new de(u.attrs),u.url=u.attrs.URI=Go(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),u.groupId=u.attrs["GROUP-ID"]=e[n],u.attrs["PATHWAY-ID"]=r,u});a.push(...i)})}function Go(a,e,t,r){const{HOST:n,PARAMS:i,[t]:s}=r;let u;e&&(u=s==null?void 0:s[e],u&&(a=u));const d=new self.URL(a);return n&&!u&&(d.host=n),i&&Object.keys(i).sort().forEach(m=>{m&&d.searchParams.set(m,i[m])}),d.href}const eu=/^age:\s*[\d.]+\s*$/im;class Ho{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,n=this.stats;n.loading.first=0,n.loaded=0,n.aborted=!1;const i=this.xhrSetup;i?Promise.resolve().then(()=>{if(!(this.loader!==r||this.stats.aborted))return i(r,t.url)}).catch(s=>{if(!(this.loader!==r||this.stats.aborted))return r.open("GET",t.url,!0),i(r,t.url)}).then(()=>{this.loader!==r||this.stats.aborted||this.openAndSendXhr(r,t,e)}).catch(s=>{this.callbacks.onError({code:r.status,text:s.message},t,r,n)}):this.openAndSendXhr(r,t,e)}openAndSendXhr(e,t,r){e.readyState||e.open("GET",t.url,!0);const n=t.headers,{maxTimeToFirstByteMs:i,maxLoadTimeMs:s}=r.loadPolicy;if(n)for(const u in n)e.setRequestHeader(u,n[u]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),r.timeout=i&&$(i)?i:s,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:r}=this;if(!e||!t)return;const n=t.readyState,i=this.config;if(!r.aborted&&n>=2&&(r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(r.loading.first-r.loading.start)))),n===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const s=t.status,u=t.responseType==="text"?t.responseText:null;if(s>=200&&s<300){const A=u!=null?u:t.response;if(A!=null){r.loading.end=Math.max(self.performance.now(),r.loading.first);const L=t.responseType==="arraybuffer"?A.byteLength:A.length;if(r.loaded=r.total=L,r.bwEstimate=r.total*8e3/(r.loading.end-r.loading.first),!this.callbacks)return;const V=this.callbacks.onProgress;if(V&&V(r,e,A,t),!this.callbacks)return;const W={url:t.responseURL,data:A,code:s};this.callbacks.onSuccess(W,r,e,t);return}}const d=i.loadPolicy.errorRetry,m=r.retry,g={url:e.url,data:void 0,code:s};Qn(d,m,!1,g)?this.retry(d):(S.error(`${s} while loading ${e.url}`),this.callbacks.onError({code:s,text:t.statusText},e,t,r))}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Qn(e,t,!0))this.retry(e);else{var r;S.warn(`timeout while loading ${(r=this.context)==null?void 0:r.url}`);const n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:r}=this;this.retryDelay=Xn(e,r.retry),r.retry++,S.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(a){}return!1}const ru=/(\d+)-(\d+)\/(\d+)/;class jo{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 n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();const i=nu(e,this.controller.signal),s=r.onProgress,u=e.responseType==="arraybuffer",d=u?"byteLength":"length",{maxTimeToFirstByteMs:m,maxLoadTimeMs:g}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=m&&$(m)?m:g,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),r.onTimeout(n,e,this.response)},t.timeout),self.fetch(this.request).then(A=>{this.response=this.loader=A;const L=Math.max(self.performance.now(),n.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=g,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),r.onTimeout(n,e,this.response)},g-(L-n.loading.start)),!A.ok){const{status:V,statusText:W}=A;throw new ou(W||"fetch, bad network response",V,A)}return n.loading.first=L,n.total=su(A.headers)||n.total,s&&$(t.highWaterMark)?this.loadProgressively(A,n,e,t.highWaterMark,s):u?A.arrayBuffer():e.responseType==="json"?A.json():A.text()}).then(A=>{const L=this.response;if(!L)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first);const V=A[d];V&&(n.loaded=n.total=V);const W={url:L.url,data:A,code:L.status};s&&!$(t.highWaterMark)&&s(n,e,A,L),r.onSuccess(W,n,e,L)}).catch(A=>{if(self.clearTimeout(this.requestTimeout),n.aborted)return;const L=A&&A.code||0,V=A?A.message:null;r.onError({code:L,text:V},e,A?A.details:null,n)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,r,n=0,i){const s=new Ns,u=e.body.getReader(),d=()=>u.read().then(m=>{if(m.done)return s.dataLength&&i(t,r,s.flush(),e),Promise.resolve(new ArrayBuffer(0));const g=m.value,A=g.length;return t.loaded+=A,A<n||s.dataLength?(s.push(g),s.dataLength>=n&&i(t,r,s.flush(),e)):i(t,r,g,e),d()}).catch(()=>Promise.reject());return d()}}function nu(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(o({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function iu(a){const e=ru.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function su(a){const e=a.get("Content-Range");if(e){const r=iu(e);if($(r))return r}const t=a.get("Content-Length");if(t)return parseInt(t)}function au(a,e){return new self.Request(a.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(a,e,t,r){const n=[];let i,s,u,d,m;const g=self.VTTCue||self.TextTrackCue;for(let L=0;L<r.rows.length;L++)if(i=r.rows[L],u=!0,d=0,m="",!i.isEmpty()){var A;for(let Q=0;Q<i.chars.length;Q++)lu.test(i.chars[Q].uchar)&&u?d++:(m+=i.chars[Q].uchar,u=!1);i.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const V=wo(m.trim()),W=oo(e,t,V);a!=null&&(A=a.cues)!=null&&A.getCueById(W)||(s=new g(e,t,V),s.id=W,s.line=L+1,s.align="left",s.position=10+Math.min(80,Math.floor(d*8/32)*10),n.push(s))}return a&&n.length&&(n.sort((L,V)=>L.line==="auto"||V.line==="auto"?0:L.line>8&&V.line>8?V.line-L.line:L.line-V.line),n.forEach(L=>Ln(a,L))),n}},cu={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Wo=fe(fe({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:Ho,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:us,bufferController:ei,capLevelController:fo,errorController:fn,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:cn,subtitleTrackController:Bn,timelineController:dl,audioStreamController:Ar,audioTrackController:Qr,emeController:Rs,cmcdController:Xl,contentSteeringController:Jl});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(a,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=_o(a),r=["manifest","level","frag"],n=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(i=>{const s=`${i==="level"?"playlist":i}LoadPolicy`,u=e[s]===void 0,d=[];n.forEach(m=>{const g=`${i}Loading${m}`,A=e[g];if(A!==void 0&&u){d.push(g);const L=t[s].default;switch(e[s]={default:L},m){case"TimeOut":L.maxLoadTimeMs=A,L.maxTimeToFirstByteMs=A;break;case"MaxRetry":L.errorRetry.maxNumRetry=A,L.timeoutRetry.maxNumRetry=A;break;case"RetryDelay":L.errorRetry.retryDelayMs=A,L.timeoutRetry.retryDelayMs=A;break;case"MaxRetryTimeout":L.errorRetry.maxRetryDelayMs=A,L.timeoutRetry.maxRetryDelayMs=A;break}}}),d.length&&S.warn(`hls.js config: "${d.join('", "')}" setting(s) are deprecated, use "${s}": ${JSON.stringify(e[s])}`)}),fe(fe({},t),e)}function _o(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(_o):Object.keys(a).reduce((e,t)=>(e[t]=_o(a[t]),e),{}):a}function du(a){const e=a.loader;e!==jo&&e!==Ho?(S.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):tu()&&(a.loader=jo,a.progressive=!0,a.enableSoftwareAES=!0,S.log("[config]: Progressive streaming enabled, using FetchLoader"))}let yo;class pu extends on{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(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this),e.on(f.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this),e.off(f.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const r=this.hls.config.preferManagedMediaSource,n=[],i={},s={};let u=!1,d=!1,m=!1;t.levels.forEach(g=>{var A,L;const V=g.attrs;let{audioCodec:W,videoCodec:Q}=g;((A=W)==null?void 0:A.indexOf("mp4a.40.34"))!==-1&&(yo||(yo=/chrome|firefox/i.test(navigator.userAgent)),yo&&(g.audioCodec=W=void 0)),W&&(g.audioCodec=W=yr(W,r)),((L=Q)==null?void 0:L.indexOf("avc1"))===0&&(Q=g.videoCodec=jr(Q));const{width:ie,height:Fe,unknownCodecs:tt}=g;if(u||(u=!!(ie&&Fe)),d||(d=!!Q),m||(m=!!W),tt!=null&&tt.length||W&&!mr(W,"audio",r)||Q&&!mr(Q,"video",r))return;const{CODECS:Je,"FRAME-RATE":yt,"HDCP-LEVEL":at,"PATHWAY-ID":Rt,RESOLUTION:vt,"VIDEO-RANGE":Mt}=V,At=`${`${Rt||"."}-`}${g.bitrate}-${vt}-${yt}-${Je}-${Mt}-${at}`;if(i[At])if(i[At].uri!==g.url&&!g.attrs["PATHWAY-ID"]){const Nt=s[At]+=1;g.attrs["PATHWAY-ID"]=new Array(Nt+1).join(".");const Or=new On(g);i[At]=Or,n.push(Or)}else i[At].addGroupId("audio",V.AUDIO),i[At].addGroupId("text",V.SUBTITLES);else{const Nt=new On(g);i[At]=Nt,s[At]=1,n.push(Nt)}}),this.filterAndSortMediaOptions(n,t,u,d,m)}filterAndSortMediaOptions(e,t,r,n,i){let s=[],u=[],d=e;if((r||n)&&i&&(d=d.filter(({videoCodec:W,videoRange:Q,width:ie,height:Fe})=>(!!W||!!(ie&&Fe))&&hn(Q))),d.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 W=new Error("no level with compatible codecs found in manifest");this.hls.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:W,reason:W.message})}});return}if(t.audioTracks){const{preferManagedMediaSource:W}=this.hls.config;s=t.audioTracks.filter(Q=>!Q.audioCodec||mr(Q.audioCodec,"audio",W)),Ko(s)}t.subtitles&&(u=t.subtitles,Ko(u));const m=d.slice(0);d.sort((W,Q)=>{if(W.attrs["HDCP-LEVEL"]!==Q.attrs["HDCP-LEVEL"])return(W.attrs["HDCP-LEVEL"]||"")>(Q.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&W.height!==Q.height)return W.height-Q.height;if(W.frameRate!==Q.frameRate)return W.frameRate-Q.frameRate;if(W.videoRange!==Q.videoRange)return Yn.indexOf(W.videoRange)-Yn.indexOf(Q.videoRange);if(W.videoCodec!==Q.videoCodec){const ie=Gr(W.videoCodec),Fe=Gr(Q.videoCodec);if(ie!==Fe)return Fe-ie}if(W.uri===Q.uri&&W.codecSet!==Q.codecSet){const ie=Sr(W.codecSet),Fe=Sr(Q.codecSet);if(ie!==Fe)return Fe-ie}return W.averageBitrate!==Q.averageBitrate?W.averageBitrate-Q.averageBitrate:0});let g=m[0];if(this.steering&&(d=this.steering.filterParsedLevels(d),d.length!==m.length)){for(let W=0;W<m.length;W++)if(m[W].pathwayId===d[0].pathwayId){g=m[W];break}}this._levels=d;for(let W=0;W<d.length;W++)if(d[W]===g){var A;this._firstLevel=W;const Q=g.bitrate,ie=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${d.length} level(s) found, first bitrate: ${Q}`),((A=this.hls.userConfig)==null?void 0:A.abrEwmaDefaultEstimate)===void 0){const Fe=Math.min(Q,this.hls.config.abrEwmaDefaultEstimateMax);Fe>ie&&ie===Wo.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=Fe)}break}const L=i&&!n,V={levels:d,audioTracks:s,subtitleTracks:u,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:n,altAudio:!L&&s.some(W=>!!W.url)};this.hls.trigger(f.MANIFEST_PARSED,V),(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 g=new Error("invalid level idx"),A=e<0;if(this.hls.trigger(f.ERROR,{type:_.OTHER_ERROR,details:y.LEVEL_SWITCH_ERROR,level:e,fatal:A,error:g,reason:g.message}),A)return;e=Math.min(e,t.length-1)}const r=this.currentLevelIndex,n=this.currentLevel,i=n?n.attrs["PATHWAY-ID"]:void 0,s=t[e],u=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,r===e&&s.details&&n&&i===u)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${u?" with Pathway "+u:""} from level ${r}${i?" with Pathway "+i:""}`);const d={level:e,attrs:s.attrs,details:s.details,bitrate:s.bitrate,averageBitrate:s.averageBitrate,maxBitrate:s.maxBitrate,realBitrate:s.realBitrate,width:s.width,height:s.height,codecSet:s.codecSet,audioCodec:s.audioCodec,videoCodec:s.videoCodec,audioGroups:s.audioGroups,subtitleGroups:s.subtitleGroups,loaded:s.loaded,loadError:s.loadError,fragmentError:s.fragmentError,name:s.name,id:s.id,uri:s.uri,url:s.url,urlId:0,audioGroupIds:s.audioGroupIds,textGroupIds:s.textGroupIds};this.hls.trigger(f.LEVEL_SWITCHING,d);const m=s.details;if(!m||m.live){const g=this.switchParams(s.uri,n==null?void 0:n.details,m);this.loadPlaylist(g)}}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===Gt.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===ke.MAIN){const r=t.elementaryStreams;if(!Object.keys(r).some(i=>!!r[i]))return;const n=this._levels[t.level];n!=null&&n.loadError&&(this.log(`Resetting level error count of ${n.loadError} on frag buffered`),n.loadError=0)}}onLevelLoaded(e,t){var r;const{level:n,details:i}=t,s=this._levels[n];if(!s){var u;this.warn(`Invalid level index ${n}`),(u=t.deliveryDirectives)!=null&&u.skip&&(i.deltaUpdateFailed=!0);return}n===this.currentLevelIndex?(s.fragmentError===0&&(s.loadError=0),this.playlistLoaded(n,t,s.details)):(r=t.deliveryDirectives)!=null&&r.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,r=this.currentLevel;if(r&&this.shouldLoadPlaylist(r)){let n=r.uri;if(e)try{n=e.addDirectives(n)}catch(s){this.warn(`Could not construct new URL with HLS Delivery Directives: ${s}`)}const i=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${i?" Pathway "+i:""} ${n}`),this.clearTimer(),this.hls.trigger(f.LEVEL_LOADING,{url:n,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((n,i)=>i!==e?!0:(this.steering&&this.steering.removeLevel(n),n===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,n.details&&n.details.fragments.forEach(s=>s.level=-1)),!1));gn(r),this._levels=r,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(f.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(f.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:r}))}}function Ko(a){const e={};a.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 n=this.keyUriToKeyInfo[r].loader;if(n){var t;if(e&&e!==((t=n.context)==null?void 0:t.frag.type))return;n.abort()}}}detach(){for(const e in this.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=y.KEY_LOAD_ERROR,r,n,i){return new yi({type:_.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:r,networkDetails:n})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:r,cc:n}=e;for(let i=0;i<t.length;i++){const s=t[i];if(n<=s.cc&&(r==="initSegment"||s.sn==="initSegment"||r<s.sn)){this.emeController.selectKeySystemFormat(s).then(u=>{s.setKeyFormat(u)});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,n;t&&e.setKeyFormat(t);const i=e.decryptdata;if(!i){const m=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,y.KEY_LOAD_ERROR,m))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,y.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));let u=this.keyUriToKeyInfo[s];if((r=u)!=null&&r.decryptdata.key)return i.key=u.decryptdata.key,Promise.resolve({frag:e,keyInfo:u});if((n=u)!=null&&n.keyLoadPromise){var d;switch((d=u.mediaKeySessionContext)==null?void 0:d.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return u.keyLoadPromise.then(m=>(i.key=m.keyInfo.decryptdata.key,{frag:e,keyInfo:u}))}}switch(u=this.keyUriToKeyInfo[s]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(u,e):this.loadKeyEME(u,e);case"AES-128":return this.loadKeyHTTP(u,e);default:return Promise.reject(this.createKeyLoadError(e,y.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const r={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const n=this.emeController.loadKey(r);if(n)return(e.keyLoadPromise=n.then(i=>(e.mediaKeySessionContext=i,r))).catch(i=>{throw e.keyLoadPromise=null,i})}return Promise.resolve(r)}loadKeyHTTP(e,t){const r=this.config,n=r.loader,i=new n(r);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,u)=>{const d={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},m=r.keyLoadPolicy.default,g={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},A={onSuccess:(L,V,W,Q)=>{const{frag:ie,keyInfo:Fe,url:tt}=W;if(!ie.decryptdata||Fe!==this.keyUriToKeyInfo[tt])return u(this.createKeyLoadError(ie,y.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),Q));Fe.decryptdata.key=ie.decryptdata.key=new Uint8Array(L.data),ie.keyLoader=null,Fe.loader=null,s({frag:ie,keyInfo:Fe})},onError:(L,V,W,Q)=>{this.resetLoader(V),u(this.createKeyLoadError(t,y.KEY_LOAD_ERROR,new Error(`HTTP Error ${L.code} loading key ${L.text}`),W,fe({url:d.url,data:void 0},L)))},onTimeout:(L,V,W)=>{this.resetLoader(V),u(this.createKeyLoadError(t,y.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),W))},onAbort:(L,V,W)=>{this.resetLoader(V),u(this.createKeyLoadError(t,y.INTERNAL_ABORTED,new Error("key loading aborted"),W))}};i.load(d,g,A)})}resetLoader(e){const{frag:t,keyInfo:r,url:n}=e,i=r.loader;t.keyLoader===i&&(t.keyLoader=null,r.loader=null),delete this.keyUriToKeyInfo[n],i&&i.destroy()}}function Vo(){return self.SourceBuffer||self.WebKitSourceBuffer}function Zo(){if(!rr())return!1;const e=Vo();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function gu(){if(!Zo())return!1;const a=rr();return typeof(a==null?void 0:a.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>a.isTypeSupported(Fr(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(Fr(e,"audio"))))}function vu(){var a;const e=Vo();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const _u=250,Fa=2,yu=.1,bu=.05;class xu{constructor(e,t,r,n){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=n}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:r,media:n,stalled:i}=this;if(n===null)return;const{currentTime:s,seeking:u}=n,d=this.seeking&&!u,m=!this.seeking&&u;if(this.seeking=u,s!==e){if(this.moved=!0,u||(this.nudgeRetry=0),i!==null){if(this.stallReported){const ie=self.performance.now()-i;S.warn(`playback not stuck anymore @${s}, after ${Math.round(ie)}ms`),this.stallReported=!1}this.stalled=null}return}if(m||d){this.stalled=null;return}if(n.paused&&!u||n.ended||n.playbackRate===0||!nn.getBuffered(n).length){this.nudgeRetry=0;return}const g=nn.bufferInfo(n,s,0),A=g.nextStart||0;if(u){const ie=g.len>Fa,Fe=!A||t&&t.start<=s||A-s>Fa&&!this.fragmentTracker.getPartialFragment(s);if(ie||Fe)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var L;if(!(g.len>0)&&!A)return;const Fe=Math.max(A,g.start||0)-s,tt=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,yt=(tt==null||(L=tt.details)==null?void 0:L.live)?tt.details.targetduration*2:Fa,at=this.fragmentTracker.getPartialFragment(s);if(Fe>0&&(Fe<=yt||at)){n.paused||this._trySkipBufferHole(at);return}}const V=self.performance.now();if(i===null){this.stalled=V;return}const W=V-i;if(!u&&W>=_u&&(this._reportStall(g),!this.media))return;const Q=nn.bufferInfo(n,s,r.maxBufferHole);this._tryFixBufferStall(Q,W)}_tryFixBufferStall(e,t){const{config:r,fragmentTracker:n,media:i}=this;if(i===null)return;const s=i.currentTime,u=n.getPartialFragment(s);u&&(this._trySkipBufferHole(u)||!this.media)||(e.len>r.maxBufferHole||e.nextStart&&e.nextStart-s<r.maxBufferHole)&&t>r.highBufferWatchdogPeriod*1e3&&(S.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:r,stallReported:n}=this;if(!n&&r){this.stallReported=!0;const i=new Error(`Playback stalling at @${r.currentTime} due to low buffer (${JSON.stringify(e)})`);S.warn(i.message),t.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.BUFFER_STALLED_ERROR,fatal:!1,error:i,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:r,media:n}=this;if(n===null)return 0;const i=n.currentTime,s=nn.bufferInfo(n,i,0),u=i<s.start?s.start:s.nextStart;if(u){const d=s.len<=t.maxBufferHole,m=s.len>0&&s.len<1&&n.readyState<3,g=u-i;if(g>0&&(d||m)){if(g>t.maxBufferHole){const{fragmentTracker:L}=this;let V=!1;if(i===0){const W=L.getAppendedFrag(0,ke.MAIN);W&&u<W.end&&(V=!0)}if(!V){const W=e||L.getAppendedFrag(i,ke.MAIN);if(W){let Q=!1,ie=W.end;for(;ie<u;){const Fe=L.getPartialFragment(ie);if(Fe)ie+=Fe.duration;else{Q=!0;break}}if(Q)return 0}}}const A=Math.max(u+bu,i+yu);if(S.warn(`skipping hole, adjusting currentTime from ${i} to ${A}`),this.moved=!0,this.stalled=null,n.currentTime=A,e&&!e.gap){const L=new Error(`fragment loaded with buffer holes, seeking from ${i} to ${A}`);r.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:L,reason:L.message,frag:e})}return A}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:r,nudgeRetry:n}=this;if(r===null)return;const i=r.currentTime;if(this.nudgeRetry++,n<e.nudgeMaxRetry){const s=i+(n+1)*e.nudgeOffset,u=new Error(`Nudging 'currentTime' from ${i} to ${s}`);S.warn(u.message),r.currentTime=s,t.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.BUFFER_NUDGE_ON_STALL,error:u,fatal:!1})}else{const s=new Error(`Playhead still not moving while enough data buffered @${i} after ${e.nudgeMaxRetry} nudges`);S.error(s.message),t.trigger(f.ERROR,{type:_.MEDIA_ERROR,details:y.BUFFER_STALLED_ERROR,error:s,fatal:!0})}}}const Eu=100;class wu extends ps{constructor(e,t,r){super(e,t,r,"[stream-controller]",ke.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(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(f.ERROR,this.onError,this),e.on(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(f.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(f.BUFFER_CREATED,this.onBufferCreated,this),e.on(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(f.ERROR,this.onError,this),e.off(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(f.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(f.BUFFER_CREATED,this.onBufferCreated,this),e.off(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.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(Eu),this.level=-1,!this.startFragRequested){let n=r.startLevel;n===-1&&(r.config.testBandwidth&&this.levels.length>1?(n=0,this.bitrateTest=!0):n=r.firstAutoLevel),r.nextLoadLevel=n,this.level=r.loadLevel,this.loadedmetadata=!1}t>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=Dt.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=Dt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Dt.WAITING_LEVEL:{const{levels:t,level:r}=this,n=t==null?void 0:t[r],i=n==null?void 0:n.details;if(i&&(!i.live||this.levelLastLoaded===n)){if(this.waitForCdnTuneIn(i))break;this.state=Dt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Dt.IDLE;break}break}case Dt.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:n,level:i}=this,s=n==null?void 0:n[i];this.resetStartWhenNotLoaded(s||null),this.state=Dt.IDLE}}break}this.state===Dt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:r,media:n}=this;if(t===null||!n&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const i=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(r!=null&&r[i]))return;const s=r[i],u=this.getMainFwdBufferInfo();if(u===null)return;const d=this.getLevelDetails();if(d&&this._streamEnded(u,d)){const Q={};this.altAudio&&(Q.type="video"),this.hls.trigger(f.BUFFER_EOS,Q),this.state=Dt.ENDED;return}if(!this.buffering)return;e.loadLevel!==i&&e.manualLevel===-1&&this.log(`Adapting to level ${i} from level ${this.level}`),this.level=e.nextLoadLevel=i;const m=s.details;if(!m||this.state===Dt.WAITING_LEVEL||m.live&&this.levelLastLoaded!==s){this.level=i,this.state=Dt.WAITING_LEVEL;return}const g=u.len,A=this.getMaxBufferLength(s.maxBitrate);if(g>=A)return;this.backtrackFragment&&this.backtrackFragment.start>u.end&&(this.backtrackFragment=null);const L=this.backtrackFragment?this.backtrackFragment.start:u.end;let V=this.getNextFragment(L,m);if(this.couldBacktrack&&!this.fragPrevious&&V&&V.sn!=="initSegment"&&this.fragmentTracker.getState(V)!==wn.OK){var W;const ie=((W=this.backtrackFragment)!=null?W:V).sn-m.startSN,Fe=m.fragments[ie-1];Fe&&V.cc===Fe.cc&&(V=Fe,this.fragmentTracker.removeFragment(Fe))}else this.backtrackFragment&&u.len&&(this.backtrackFragment=null);if(V&&this.isLoopLoading(V,L)){if(!V.gap){const ie=this.audioOnly&&!this.altAudio?Y.AUDIO:Y.VIDEO,Fe=(ie===Y.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Fe&&this.afterBufferFlushed(Fe,ie,ke.MAIN)}V=this.getNextFragmentLoopLoading(V,m,u,ke.MAIN,A)}V&&(V.initSegment&&!V.initSegment.data&&!this.bitrateTest&&(V=V.initSegment),this.loadFragment(V,s,L))}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);this.fragCurrent=e,n===wn.NOT_LOADED||n===wn.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,ke.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let r;const n=this.getAppendedFrag(t.currentTime);n&&n.start>1&&this.flushMainBuffer(0,n.start-1);const i=this.getLevelDetails();if(i!=null&&i.live){const u=this.getMainFwdBufferInfo();if(!u||u.len<i.targetduration*2)return}if(!t.paused&&e){const u=this.hls.nextLoadLevel,d=e[u],m=this.fragLastKbps;m&&this.fragCurrent?r=this.fragCurrent.duration*d.maxBitrate/(1e3*m)+1:r=0}else r=0;const s=this.getBufferedFrag(t.currentTime+r);if(s){const u=this.followingBufferedFrag(s);if(u){this.abortCurrentFrag();const d=u.maxStartPTS?u.maxStartPTS:u.start,m=u.duration,g=Math.max(s.end,d+Math.min(Math.max(m-this.config.maxFragLookUpTolerance,m*(this.couldBacktrack?.5:.125)),m*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(g,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 Dt.KEY_LOADING:case Dt.FRAG_LOADING:case Dt.FRAG_LOADING_WAITING_RETRY:case Dt.PARSING:case Dt.PARSED:this.state=Dt.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;$(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(f.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,n=!1;t.levels.forEach(i=>{const s=i.audioCodec;s&&(r=r||s.indexOf("mp4a.40.2")!==-1,n=n||s.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=r&&n&&!vu(),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!==Dt.IDLE)return;const n=r[t.level];(!n.details||n.details.live&&this.levelLastLoaded!==n||this.waitForCdnTuneIn(n.details))&&(this.state=Dt.WAITING_LEVEL)}onLevelLoaded(e,t){var r;const{levels:n}=this,i=t.level,s=t.details,u=s.totalduration;if(!n){this.warn(`Levels were reset while loading level ${i}`);return}this.log(`Level ${i} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""}, cc [${s.startCC}, ${s.endCC}] duration:${u}`);const d=n[i],m=this.fragCurrent;m&&(this.state===Dt.FRAG_LOADING||this.state===Dt.FRAG_LOADING_WAITING_RETRY)&&m.level!==t.level&&m.loader&&this.abortCurrentFrag();let g=0;if(s.live||(r=d.details)!=null&&r.live){var A;if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;g=this.alignPlaylists(s,d.details,(A=this.levelLastLoaded)==null?void 0:A.details)}if(d.details=s,this.levelLastLoaded=d,this.hls.trigger(f.LEVEL_UPDATED,{details:s,level:i}),this.state===Dt.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=Dt.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,g),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:r,part:n,payload:i}=e,{levels:s}=this;if(!s){this.warn(`Levels were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const u=s[r.level],d=u.details;if(!d){this.warn(`Dropping fragment ${r.sn} of level ${r.level} after level details were reset`),this.fragmentTracker.removeFragment(r);return}const m=u.videoCodec,g=d.PTSKnown||!d.live,A=(t=r.initSegment)==null?void 0:t.data,L=this._getAudioCodec(u),V=this.transmuxer=this.transmuxer||new Vt(this.hls,ke.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),W=n?n.index:-1,Q=W!==-1,ie=new Os(r.level,r.sn,r.stats.chunkCount,i.byteLength,W,Q),Fe=this.initPTS[r.cc];V.push(i,A,L,m,r,n,d.totalduration,g,ie,Fe)}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 s=this.fragCurrent;s&&(this.log("Switching to main audio track, cancel main fragment load"),s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const i=this.hls;r&&(i.trigger(f.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),i.trigger(f.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const r=t.id,n=!!this.hls.audioTracks[r].url;if(n){const i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=n,this.tick()}onBufferCreated(e,t){const r=t.tracks;let n,i,s=!1;for(const u in r){const d=r[u];if(d.id==="main"){if(i=u,n=d,u==="video"){const m=r[u];m&&(this.videoBuffer=m.buffer)}}else s=!0}s&&n?(this.log(`Alternate track found, use ${i}.buffered to schedule main fragment loading`),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:r,part:n}=t;if(r&&r.type!==ke.MAIN)return;if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${n?" p: "+n.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}`),this.state===Dt.PARSED&&(this.state=Dt.IDLE);return}const i=n?n.stats:r.stats;this.fragLastKbps=Math.round(8*i.total/(i.buffering.end-i.loading.first)),r.sn!=="initSegment"&&(this.fragPrevious=r),this.fragBufferedComplete(r,n)}onError(e,t){var r;if(t.fatal){this.state=Dt.ERROR;return}switch(t.details){case y.FRAG_GAP:case y.FRAG_PARSING_ERROR:case y.FRAG_DECRYPT_ERROR:case y.FRAG_LOAD_ERROR:case y.FRAG_LOAD_TIMEOUT:case y.KEY_LOAD_ERROR:case y.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ke.MAIN,t);break;case y.LEVEL_LOAD_ERROR:case y.LEVEL_LOAD_TIMEOUT:case y.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Dt.WAITING_LEVEL&&((r=t.context)==null?void 0:r.type)===Gt.LEVEL&&(this.state=Dt.IDLE);break;case y.BUFFER_APPEND_ERROR:case y.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;if(t.details===y.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case y.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(!(!e||!t||!e.readyState)){if(this.loadedmetadata||!nn.getBuffered(e).length){const r=this.state!==Dt.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,r)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=Dt.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Y.AUDIO||this.audioOnly&&!this.altAudio){const r=(t===Y.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,t,ke.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 n=nn.getBuffered(e),s=(n.length?n.start(0):0)-r;s>0&&(s<this.config.maxBufferHole||s<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${s} to match buffer start`),r+=s,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:n}=this;if(!r||this.fragContextChanged(e))return;t.fragmentError=0,this.state=Dt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const i=e.stats;i.parsing.start=i.parsing.end=i.buffering.start=i.buffering.end=self.performance.now(),n.trigger(f.FRAG_LOADED,r),e.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const r="main",{hls:n}=this,{remuxResult:i,chunkMeta:s}=e,u=this.getCurrentContext(s);if(!u){this.resetWhenMissingContext(s);return}const{frag:d,part:m,level:g}=u,{video:A,text:L,id3:V,initSegment:W}=i,{details:Q}=g,ie=this.altAudio?void 0:i.audio;if(this.fragContextChanged(d)){this.fragmentTracker.removeFragment(d);return}if(this.state=Dt.PARSING,W){if(W!=null&&W.tracks){const Je=d.initSegment||d;this._bufferInitSegment(g,W.tracks,Je,s),n.trigger(f.FRAG_PARSING_INIT_SEGMENT,{frag:Je,id:r,tracks:W.tracks})}const Fe=W.initPTS,tt=W.timescale;$(Fe)&&(this.initPTS[d.cc]={baseTime:Fe,timescale:tt},n.trigger(f.INIT_PTS_FOUND,{frag:d,id:r,initPTS:Fe,timescale:tt}))}if(A&&Q&&d.sn!=="initSegment"){const Fe=Q.fragments[d.sn-1-Q.startSN],tt=d.sn===Q.startSN,Je=!Fe||d.cc>Fe.cc;if(i.independent!==!1){const{startPTS:yt,endPTS:at,startDTS:Rt,endDTS:vt}=A;if(m)m.elementaryStreams[A.type]={startPTS:yt,endPTS:at,startDTS:Rt,endDTS:vt};else if(A.firstKeyFrame&&A.independent&&s.id===1&&!Je&&(this.couldBacktrack=!0),A.dropped&&A.independent){const Mt=this.getMainFwdBufferInfo(),Qt=(Mt?Mt.end:this.getLoadPosition())+this.config.maxBufferHole,At=A.firstKeyFramePTS?A.firstKeyFramePTS:yt;if(!tt&&Qt<At-this.config.maxBufferHole&&!Je){this.backtrack(d);return}else Je&&(d.gap=!0);d.setElementaryStreamInfo(A.type,d.start,at,d.start,vt,!0)}else tt&&yt>Fa&&(d.gap=!0);d.setElementaryStreamInfo(A.type,yt,at,Rt,vt),this.backtrackFragment&&(this.backtrackFragment=d),this.bufferFragmentData(A,d,m,s,tt||Je)}else if(tt||Je)d.gap=!0;else{this.backtrack(d);return}}if(ie){const{startPTS:Fe,endPTS:tt,startDTS:Je,endDTS:yt}=ie;m&&(m.elementaryStreams[Y.AUDIO]={startPTS:Fe,endPTS:tt,startDTS:Je,endDTS:yt}),d.setElementaryStreamInfo(Y.AUDIO,Fe,tt,Je,yt),this.bufferFragmentData(ie,d,m,s)}if(Q&&V!=null&&(t=V.samples)!=null&&t.length){const Fe={id:r,frag:d,details:Q,samples:V.samples};n.trigger(f.FRAG_PARSING_METADATA,Fe)}if(Q&&L){const Fe={id:r,frag:d,details:Q,samples:L.samples};n.trigger(f.FRAG_PARSING_USERDATA,Fe)}}_bufferInitSegment(e,t,r,n){if(this.state!==Dt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:i,video:s,audiovideo:u}=t;if(i){let d=e.audioCodec;const m=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){d&&(d.indexOf("mp4a.40.5")!==-1?d="mp4a.40.2":d="mp4a.40.5");const g=i.metadata;g&&"channelCount"in g&&(g.channelCount||1)!==1&&m.indexOf("firefox")===-1&&(d="mp4a.40.5")}d&&d.indexOf("mp4a.40.5")!==-1&&m.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(d="mp4a.40.2",this.log(`Android: force audio codec to ${d}`)),e.audioCodec&&e.audioCodec!==d&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${d}"`),i.levelCodec=d,i.id="main",this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${d||""}/${e.audioCodec||""}/${i.codec}]`)}s&&(s.levelCodec=e.videoCodec,s.id="main",this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${s.codec}]`)),u&&this.log(`Init audiovideo buffer, container:${u.container}, codecs[level/parsed]=[${e.codecs}/${u.codec}]`),this.hls.trigger(f.BUFFER_CODECS,t),Object.keys(t).forEach(d=>{const g=t[d].initSegment;g!=null&&g.byteLength&&this.hls.trigger(f.BUFFER_APPENDING,{type:d,data:g,frag:r,part:null,chunkMeta:n,parent:r.type})}),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,ke.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=Dt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const r=e.currentTime;if(nn.isBuffered(e,r)?t=this.getAppendedFrag(r):nn.isBuffered(e,r+.1)&&(t=this.getAppendedFrag(r+.1)),t){this.backtrackFragment=null;const n=this.fragPlaying,i=t.level;(!n||t.sn!==n.sn||n.level!==i)&&(this.fragPlaying=t,this.hls.trigger(f.FRAG_CHANGED,{frag:t}),(!n||n.level!==i)&&this.hls.trigger(f.LEVEL_SWITCHED,{level:i}))}}}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&&$(t)&&$(r.programDateTime)){const n=r.programDateTime+(t-r.start)*1e3;return new Date(n)}}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 Zo()}static isSupported(){return gu()}static getMediaSource(){return rr()}static get Events(){return f}static get ErrorTypes(){return _}static get ErrorDetails(){return y}static get DefaultConfig(){return ls.defaultConfig?ls.defaultConfig:Wo}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 Ft,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,te(e.debug||!1,"Hls instance");const t=this.config=fu(ls.DefaultConfig,e);this.userConfig=e,t.progressive&&du(t);const{abrController:r,bufferController:n,capLevelController:i,errorController:s,fpsController:u}=t,d=new s(this),m=this.abrController=new r(this),g=this.bufferController=new n(this),A=this.capLevelController=new i(this),L=new u(this),V=new Wr(this),W=new Fn(this),Q=t.contentSteeringController,ie=Q?new Q(this):null,Fe=this.levelController=new pu(this,ie),tt=new $a(this),Je=new mu(this.config),yt=this.streamController=new wu(this,tt,Je);A.setStreamController(yt),L.setStreamController(yt);const at=[V,Fe,yt];ie&&at.splice(1,0,ie),this.networkControllers=at;const Rt=[m,g,A,L,W,tt];this.audioTrackController=this.createController(t.audioTrackController,at);const vt=t.audioStreamController;vt&&at.push(new vt(this,tt,Je)),this.subtitleTrackController=this.createController(t.subtitleTrackController,at);const Mt=t.subtitleStreamController;Mt&&at.push(new Mt(this,tt,Je)),this.createController(t.timelineController,Rt),Je.emeController=this.emeController=this.createController(t.emeController,Rt),this.cmcdController=this.createController(t.cmcdController,Rt),this.latencyController=this.createController(Gi,Rt),this.coreComponents=Rt,at.push(d);const Qt=d.onErrorOut;typeof Qt=="function"&&this.on(f.ERROR,Qt,d)}createController(e,t){if(e){const r=new e(this);return t&&t.push(r),r}return null}on(e,t,r=this){this._emitter.on(e,t,r)}once(e,t,r=this){this._emitter.once(e,t,r)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,r=this,n){this._emitter.off(e,t,r,n)}listeners(e){return this._emitter.listeners(e)}emit(e,t,r){return this._emitter.emit(e,t,r)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(r){if(S.error("An internal error happened while handling event "+e+'. Error message: "'+r.message+'". Here is a stacktrace:',r),!this.triggeringException){this.triggeringException=!0;const n=e===f.ERROR;this.trigger(f.ERROR,{type:_.OTHER_ERROR,details:y.INTERNAL_EXCEPTION,fatal:n,event:e,error:r}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){S.log("destroy"),this.trigger(f.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){S.log("attachMedia"),this._media=e,this.trigger(f.MEDIA_ATTACHING,{media:e})}detachMedia(){S.log("detachMedia"),this.trigger(f.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,r=this.url,n=this.url=me.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,S.log(`loadSource:${n}`),t&&r&&(r!==n||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(f.MANIFEST_LOADING,{url:e})}startLoad(e=-1){S.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(){S.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}resumeBuffering(){S.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()})}pauseBuffering(){S.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()})}swapAudioCodec(){S.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){S.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){S.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){S.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){S.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){S.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){S.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&&(S.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){ri(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const r=e.length;for(let n=0;n<r;n++)if(e[n].maxBitrate>=t)return n;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:r}=this;let n;if(t===-1&&e!=null&&e.length?n=e.length-1:n=t,r)for(let i=n;i--;){const s=e[i].attrs["HDCP-LEVEL"];if(s&&s<=r)return i}return n}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}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},16722:function($t,st,D){"use strict";D.d(st,{Z:function(){return Ee}});const R=o=>typeof o=="object"&&o!=null&&o.nodeType===1,_e=(o,$)=>(!$||o!=="hidden")&&o!=="visible"&&o!=="clip",me=(o,$)=>{if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){const F=getComputedStyle(o,null);return _e(F.overflowY,$)||_e(F.overflowX,$)||(w=>{const f=(_=>{if(!_.ownerDocument||!_.ownerDocument.defaultView)return null;try{return _.ownerDocument.defaultView.frameElement}catch(y){return null}})(w);return!!f&&(f.clientHeight<w.scrollHeight||f.clientWidth<w.scrollWidth)})(o)}return!1},Ie=(o,$,F,w,f,_,y,U)=>_<o&&y>$||_>o&&y<$?0:_<=o&&U<=F||y>=$&&U>=F?_-o-w:y>$&&U<F||_<o&&U>F?y-$+f:0,fe=o=>{const $=o.parentElement;return $==null?o.getRootNode().host||null:$},re=(o,$)=>{var F,w,f,_;if(typeof document=="undefined")return[];const{scrollMode:y,block:U,inline:K,boundary:O,skipOverflowHiddenElements:I}=$,H=typeof O=="function"?O:Xe=>Xe!==O;if(!R(o))throw new TypeError("Invalid target");const te=document.scrollingElement||document.documentElement,S=[];let j=o;for(;R(j)&&H(j);){if(j=fe(j),j===te){S.push(j);break}j!=null&&j===document.body&&me(j)&&!me(document.documentElement)||j!=null&&me(j,I)&&S.push(j)}const ae=(w=(F=window.visualViewport)==null?void 0:F.width)!=null?w:innerWidth,de=(_=(f=window.visualViewport)==null?void 0:f.height)!=null?_:innerHeight,{scrollX:Se,scrollY:we}=window,{height:Me,width:$e,top:Y,right:B,bottom:Z,left:X}=o.getBoundingClientRect(),{top:le,right:q,bottom:b,left:x}=(Xe=>{const Ke=window.getComputedStyle(Xe);return{top:parseFloat(Ke.scrollMarginTop)||0,right:parseFloat(Ke.scrollMarginRight)||0,bottom:parseFloat(Ke.scrollMarginBottom)||0,left:parseFloat(Ke.scrollMarginLeft)||0}})(o);let G=U==="start"||U==="nearest"?Y-le:U==="end"?Z+b:Y+Me/2-le+b,ue=K==="center"?X+$e/2-x+q:K==="end"?B+q:X-x;const ze=[];for(let Xe=0;Xe<S.length;Xe++){const Ke=S[Xe],{height:Ze,width:pt,top:ct,right:ht,bottom:jt,left:Zt}=Ke.getBoundingClientRect();if(y==="if-needed"&&Y>=0&&X>=0&&Z<=de&&B<=ae&&(Ke===te&&!me(Ke)||Y>=ct&&Z<=jt&&X>=Zt&&B<=ht))return ze;const qt=getComputedStyle(Ke),Ut=parseInt(qt.borderLeftWidth,10),zt=parseInt(qt.borderTopWidth,10),Bt=parseInt(qt.borderRightWidth,10),Oe=parseInt(qt.borderBottomWidth,10);let qe=0,se=0;const Ne="offsetWidth"in Ke?Ke.offsetWidth-Ke.clientWidth-Ut-Bt:0,He="offsetHeight"in Ke?Ke.offsetHeight-Ke.clientHeight-zt-Oe:0,N="offsetWidth"in Ke?Ke.offsetWidth===0?0:pt/Ke.offsetWidth:0,ee="offsetHeight"in Ke?Ke.offsetHeight===0?0:Ze/Ke.offsetHeight:0;if(te===Ke)qe=U==="start"?G:U==="end"?G-de:U==="nearest"?Ie(we,we+de,de,zt,Oe,we+G,we+G+Me,Me):G-de/2,se=K==="start"?ue:K==="center"?ue-ae/2:K==="end"?ue-ae:Ie(Se,Se+ae,ae,Ut,Bt,Se+ue,Se+ue+$e,$e),qe=Math.max(0,qe+we),se=Math.max(0,se+Se);else{qe=U==="start"?G-ct-zt:U==="end"?G-jt+Oe+He:U==="nearest"?Ie(ct,jt,Ze,zt,Oe+He,G,G+Me,Me):G-(ct+Ze/2)+He/2,se=K==="start"?ue-Zt-Ut:K==="center"?ue-(Zt+pt/2)+Ne/2:K==="end"?ue-ht+Bt+Ne:Ie(Zt,ht,pt,Ut,Bt+Ne,ue,ue+$e,$e);const{scrollLeft:ye,scrollTop:be}=Ke;qe=ee===0?0:Math.max(0,Math.min(be+qe/ee,Ke.scrollHeight-Ze/ee+He)),se=N===0?0:Math.max(0,Math.min(ye+se/N,Ke.scrollWidth-pt/N+Ne)),G+=be-qe,ue+=ye-se}ze.push({el:Ke,top:qe,left:se})}return ze},ve=o=>o===!1?{block:"end",inline:"nearest"}:($=>$===Object($)&&Object.keys($).length!==0)(o)?o:{block:"start",inline:"nearest"};function Ee(o,$){if(!o.isConnected||!(f=>{let _=f;for(;_&&_.parentNode;){if(_.parentNode===document)return!0;_=_.parentNode instanceof ShadowRoot?_.parentNode.host:_.parentNode}return!1})(o))return;const F=(f=>{const _=window.getComputedStyle(f);return{top:parseFloat(_.scrollMarginTop)||0,right:parseFloat(_.scrollMarginRight)||0,bottom:parseFloat(_.scrollMarginBottom)||0,left:parseFloat(_.scrollMarginLeft)||0}})(o);if((f=>typeof f=="object"&&typeof f.behavior=="function")($))return $.behavior(re(o,$));const w=typeof $=="boolean"||$==null?void 0:$.behavior;for(const{el:f,top:_,left:y}of re(o,ve($))){const U=_-F.top+F.bottom,K=y-F.left+F.right;f.scroll({top:U,left:K,behavior:w})}}}}]);
|
|
|
}()); |