You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1046 lines
1.4 MiB
1046 lines
1.4 MiB
!(function(){var rc=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[5902],{67921:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return ie}});var N=C(14809),ae=C(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M632 698.3l141.9-112a8 8 0 000-12.6L632 461.7c-5.3-4.2-13-.4-13 6.3v76H295c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h324v76c0 6.7 7.8 10.4 13 6.3zm261.3-405L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v278c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V422c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-83.5c0-17-6.7-33.2-18.7-45.2zM640 288H384V184h256v104zm264 436h-56c-4.4 0-8 3.6-8 8v108H184V732c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v148c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V732c0-4.4-3.6-8-8-8z"}}]},name:"delivered-procedure",theme:"outlined"},le=ve,Q=C(7657),h=function(B,T){return ae.createElement(Q.Z,(0,N.Z)({},B,{ref:T,icon:le}))},ge=ae.forwardRef(h),ie=ge},4958:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return ie}});var N=C(14809),ae=C(59301),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},le=ve,Q=C(7657),h=function(B,T){return ae.createElement(Q.Z,(0,N.Z)({},B,{ref:T,icon:le}))},ge=ae.forwardRef(h),ie=ge},65966:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return mt}});var N=C(20439),ae=C(50298),ve=C(62646),le=C(43403),Q=C(92310),h=C.n(Q),ge=C(29301),ie=C(76846),A=C(96452),B=C(6089),T=C(80402),p=C(34280),v=C(49658),E=C(59301),S=C(14809),F=C(77900),O=C(8654);function Z(ke){var xe=ke.prefixCls,W=ke.align,Re=ke.arrow,$e=ke.arrowPos,J=Re||{},R=J.className,k=J.content,se=$e.x,$=se===void 0?0:se,G=$e.y,te=G===void 0?0:G,Ce=E.useRef();if(!W||!W.points)return null;var we={position:"absolute"};if(W.autoArrow!==!1){var Se=W.points[0],Ie=W.points[1],Ne=Se[0],qe=Se[1],et=Ie[0],ft=Ie[1];Ne===et||!["t","b"].includes(Ne)?we.top=te:Ne==="t"?we.top=0:we.bottom=0,qe===ft||!["l","r"].includes(qe)?we.left=$:qe==="l"?we.left=0:we.right=0}return E.createElement("div",{ref:Ce,className:h()("".concat(xe,"-arrow"),R),style:we},k)}function b(ke){var xe=ke.prefixCls,W=ke.open,Re=ke.zIndex,$e=ke.mask,J=ke.motion;return $e?E.createElement(F.default,(0,S.Z)({},J,{motionAppear:!0,visible:W,removeOnLeave:!0}),function(R){var k=R.className;return E.createElement("div",{style:{zIndex:Re},className:h()("".concat(xe,"-mask"),k)})}):null}var L=E.memo(function(ke){var xe=ke.children;return xe},function(ke,xe){return xe.cache}),D=L,I=E.forwardRef(function(ke,xe){var W=ke.popup,Re=ke.className,$e=ke.prefixCls,J=ke.style,R=ke.target,k=ke.onVisibleChanged,se=ke.open,$=ke.keepDom,G=ke.fresh,te=ke.onClick,Ce=ke.mask,we=ke.arrow,Se=ke.arrowPos,Ie=ke.align,Ne=ke.motion,qe=ke.maskMotion,et=ke.forceRender,ft=ke.getPopupContainer,Kt=ke.autoDestroy,Ct=ke.portal,vt=ke.zIndex,en=ke.onMouseEnter,on=ke.onMouseLeave,Vt=ke.onPointerEnter,gn=ke.onPointerDownCapture,Pn=ke.ready,Gt=ke.offsetX,mn=ke.offsetY,Ye=ke.offsetR,Ge=ke.offsetB,He=ke.onAlign,ne=ke.onPrepare,fe=ke.stretch,ye=ke.targetWidth,Ee=ke.targetHeight,Te=typeof W=="function"?W():W,xt=se||$,Wt=(ft==null?void 0:ft.length)>0,nn=E.useState(!ft||!Wt),Cn=(0,ae.Z)(nn,2),Wn=Cn[0],zn=Cn[1];if((0,p.Z)(function(){!Wn&&Wt&&R&&zn(!0)},[Wn,Wt,R]),!Wn)return null;var vn="auto",Dn={left:"-1000vw",top:"-1000vh",right:vn,bottom:vn};if(Pn||!se){var or,pr=Ie.points,rr=Ie.dynamicInset||((or=Ie._experimental)===null||or===void 0?void 0:or.dynamicInset),cr=rr&&pr[0][1]==="r",Jn=rr&&pr[0][0]==="b";cr?(Dn.right=Ye,Dn.left=vn):(Dn.left=Gt,Dn.right=vn),Jn?(Dn.bottom=Ge,Dn.top=vn):(Dn.top=mn,Dn.bottom=vn)}var kn={};return fe&&(fe.includes("height")&&Ee?kn.height=Ee:fe.includes("minHeight")&&Ee&&(kn.minHeight=Ee),fe.includes("width")&&ye?kn.width=ye:fe.includes("minWidth")&&ye&&(kn.minWidth=ye)),se||(kn.pointerEvents="none"),E.createElement(Ct,{open:et||xt,getContainer:ft&&function(){return ft(R)},autoDestroy:Kt},E.createElement(b,{prefixCls:$e,open:se,zIndex:vt,mask:Ce,motion:qe}),E.createElement(ge.Z,{onResize:He,disabled:!se},function(qn){return E.createElement(F.default,(0,S.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:et,leavedClassName:"".concat($e,"-hidden")},Ne,{onAppearPrepare:ne,onEnterPrepare:ne,visible:se,onVisibleChanged:function(br){var je;Ne==null||(je=Ne.onVisibleChanged)===null||je===void 0||je.call(Ne,br),k(br)}}),function(vr,br){var je=vr.className,Ve=vr.style,Yt=h()($e,je,Re);return E.createElement("div",{ref:(0,O.sQ)(qn,xe,br),className:Yt,style:(0,N.Z)((0,N.Z)((0,N.Z)((0,N.Z)({"--arrow-x":"".concat(Se.x||0,"px"),"--arrow-y":"".concat(Se.y||0,"px")},Dn),kn),Ve),{},{boxSizing:"border-box",zIndex:vt},J),onMouseEnter:en,onMouseLeave:on,onPointerEnter:Vt,onClick:te,onPointerDownCapture:gn},we&&E.createElement(Z,{prefixCls:$e,arrow:we,arrowPos:Se,align:Ie}),E.createElement(D,{cache:!se&&!G},Te))})}))}),re=I,ce=E.forwardRef(function(ke,xe){var W=ke.children,Re=ke.getTriggerDOMNode,$e=(0,O.Yr)(W),J=E.useCallback(function(k){(0,O.mH)(xe,Re?Re(k):k)},[Re]),R=(0,O.x1)(J,(0,O.C4)(W));return $e?E.cloneElement(W,{ref:R}):W}),X=ce,q=E.createContext(null),oe=q;function pe(ke){return ke?Array.isArray(ke)?ke:[ke]:[]}function _e(ke,xe,W,Re){return E.useMemo(function(){var $e=pe(W!=null?W:xe),J=pe(Re!=null?Re:xe),R=new Set($e),k=new Set(J);return ke&&(R.has("hover")&&(R.delete("hover"),R.add("click")),k.has("hover")&&(k.delete("hover"),k.add("click"))),[R,k]},[ke,xe,W,Re])}var j=C(29194);function K(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],W=arguments.length>2?arguments[2]:void 0;return W?ke[0]===xe[0]:ke[0]===xe[0]&&ke[1]===xe[1]}function ee(ke,xe,W,Re){for(var $e=W.points,J=Object.keys(ke),R=0;R<J.length;R+=1){var k,se=J[R];if(K((k=ke[se])===null||k===void 0?void 0:k.points,$e,Re))return"".concat(xe,"-placement-").concat(se)}return""}function z(ke,xe,W,Re){return xe||(W?{motionName:"".concat(ke,"-").concat(W)}:Re?{motionName:Re}:null)}function Ae(ke){return ke.ownerDocument.defaultView}function Y(ke){for(var xe=[],W=ke==null?void 0:ke.parentElement,Re=["hidden","scroll","clip","auto"];W;){var $e=Ae(W).getComputedStyle(W),J=$e.overflowX,R=$e.overflowY,k=$e.overflow;[J,R,k].some(function(se){return Re.includes(se)})&&xe.push(W),W=W.parentElement}return xe}function y(ke){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(ke)?xe:ke}function _(ke){return y(parseFloat(ke),0)}function V(ke,xe){var W=(0,N.Z)({},ke);return(xe||[]).forEach(function(Re){if(!(Re instanceof HTMLBodyElement||Re instanceof HTMLHtmlElement)){var $e=Ae(Re).getComputedStyle(Re),J=$e.overflow,R=$e.overflowClipMargin,k=$e.borderTopWidth,se=$e.borderBottomWidth,$=$e.borderLeftWidth,G=$e.borderRightWidth,te=Re.getBoundingClientRect(),Ce=Re.offsetHeight,we=Re.clientHeight,Se=Re.offsetWidth,Ie=Re.clientWidth,Ne=_(k),qe=_(se),et=_($),ft=_(G),Kt=y(Math.round(te.width/Se*1e3)/1e3),Ct=y(Math.round(te.height/Ce*1e3)/1e3),vt=(Se-Ie-et-ft)*Kt,en=(Ce-we-Ne-qe)*Ct,on=Ne*Ct,Vt=qe*Ct,gn=et*Kt,Pn=ft*Kt,Gt=0,mn=0;if(J==="clip"){var Ye=_(R);Gt=Ye*Kt,mn=Ye*Ct}var Ge=te.x+gn-Gt,He=te.y+on-mn,ne=Ge+te.width+2*Gt-gn-Pn-vt,fe=He+te.height+2*mn-on-Vt-en;W.left=Math.max(W.left,Ge),W.top=Math.max(W.top,He),W.right=Math.min(W.right,ne),W.bottom=Math.min(W.bottom,fe)}}),W}function de(ke){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,W="".concat(xe),Re=W.match(/^(.*)\%$/);return Re?ke*(parseFloat(Re[1])/100):parseFloat(W)}function We(ke,xe){var W=xe||[],Re=(0,ae.Z)(W,2),$e=Re[0],J=Re[1];return[de(ke.width,$e),de(ke.height,J)]}function Qe(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[ke[0],ke[1]]}function ct(ke,xe){var W=xe[0],Re=xe[1],$e,J;return W==="t"?J=ke.y:W==="b"?J=ke.y+ke.height:J=ke.y+ke.height/2,Re==="l"?$e=ke.x:Re==="r"?$e=ke.x+ke.width:$e=ke.x+ke.width/2,{x:$e,y:J}}function Et(ke,xe){var W={t:"b",b:"t",l:"r",r:"l"};return ke.map(function(Re,$e){return $e===xe?W[Re]||"c":Re}).join("")}function Mt(ke,xe,W,Re,$e,J,R){var k=E.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:$e[Re]||{}}),se=(0,ae.Z)(k,2),$=se[0],G=se[1],te=E.useRef(0),Ce=E.useMemo(function(){return xe?Y(xe):[]},[xe]),we=E.useRef({}),Se=function(){we.current={}};ke||Se();var Ie=(0,B.Z)(function(){if(xe&&W&&ke){let Cr=function(yr,Qn){var Ar=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yt,ur=xt.x+yr,hr=xt.y+Qn,Er=ur+Jn,Fr=hr+cr,wn=Math.max(ur,Ar.left),tr=Math.max(hr,Ar.top),Ir=Math.min(Er,Ar.right),nr=Math.min(Fr,Ar.bottom);return Math.max(0,(Ir-wn)*(nr-tr))},Zn=function(){ut=xt.y+Ze,It=ut+cr,Bt=xt.x+Be,lt=Bt+Jn};var et,ft,Kt,Ct,vt=xe,en=vt.ownerDocument,on=Ae(vt),Vt=on.getComputedStyle(vt),gn=Vt.position,Pn=vt.style.left,Gt=vt.style.top,mn=vt.style.right,Ye=vt.style.bottom,Ge=vt.style.overflow,He=(0,N.Z)((0,N.Z)({},$e[Re]),J),ne=en.createElement("div");(et=vt.parentElement)===null||et===void 0||et.appendChild(ne),ne.style.left="".concat(vt.offsetLeft,"px"),ne.style.top="".concat(vt.offsetTop,"px"),ne.style.position=gn,ne.style.height="".concat(vt.offsetHeight,"px"),ne.style.width="".concat(vt.offsetWidth,"px"),vt.style.left="0",vt.style.top="0",vt.style.right="auto",vt.style.bottom="auto",vt.style.overflow="hidden";var fe;if(Array.isArray(W))fe={x:W[0],y:W[1],width:0,height:0};else{var ye,Ee,Te=W.getBoundingClientRect();Te.x=(ye=Te.x)!==null&&ye!==void 0?ye:Te.left,Te.y=(Ee=Te.y)!==null&&Ee!==void 0?Ee:Te.top,fe={x:Te.x,y:Te.y,width:Te.width,height:Te.height}}var xt=vt.getBoundingClientRect(),Wt=on.getComputedStyle(vt),nn=Wt.height,Cn=Wt.width;xt.x=(ft=xt.x)!==null&&ft!==void 0?ft:xt.left,xt.y=(Kt=xt.y)!==null&&Kt!==void 0?Kt:xt.top;var Wn=en.documentElement,zn=Wn.clientWidth,vn=Wn.clientHeight,Dn=Wn.scrollWidth,or=Wn.scrollHeight,pr=Wn.scrollTop,rr=Wn.scrollLeft,cr=xt.height,Jn=xt.width,kn=fe.height,qn=fe.width,vr={left:0,top:0,right:zn,bottom:vn},br={left:-rr,top:-pr,right:Dn-rr,bottom:or-pr},je=He.htmlRegion,Ve="visible",Yt="visibleFirst";je!=="scroll"&&je!==Yt&&(je=Ve);var Pt=je===Yt,An=V(br,Ce),un=V(vr,Ce),yt=je===Ve?un:An,pt=Pt?un:yt;vt.style.left="auto",vt.style.top="auto",vt.style.right="0",vt.style.bottom="0";var Lt=vt.getBoundingClientRect();vt.style.left=Pn,vt.style.top=Gt,vt.style.right=mn,vt.style.bottom=Ye,vt.style.overflow=Ge,(Ct=vt.parentElement)===null||Ct===void 0||Ct.removeChild(ne);var rn=y(Math.round(Jn/parseFloat(Cn)*1e3)/1e3),dn=y(Math.round(cr/parseFloat(nn)*1e3)/1e3);if(rn===0||dn===0||(0,ie.Sh)(W)&&!(0,j.Z)(W))return;var xn=He.offset,dt=He.targetOffset,$t=We(xt,xn),Le=(0,ae.Z)($t,2),Xe=Le[0],gt=Le[1],_t=We(fe,dt),Qt=(0,ae.Z)(_t,2),Xt=Qt[0],Rt=Qt[1];fe.x-=Xt,fe.y-=Rt;var Jt=He.points||[],fn=(0,ae.Z)(Jt,2),bn=fn[0],nt=fn[1],cn=Qe(nt),_n=Qe(bn),U=ct(fe,cn),M=ct(xt,_n),he=(0,N.Z)({},He),Be=U.x-M.x+Xe,Ze=U.y-M.y+gt,ze=Cr(Be,Ze),ht=Cr(Be,Ze,un),wt=ct(fe,["t","l"]),zt=ct(xt,["t","l"]),St=ct(fe,["b","r"]),Tt=ct(xt,["b","r"]),tn=He.overflow||{},ue=tn.adjustX,Oe=tn.adjustY,Pe=tn.shiftX,Me=tn.shiftY,Je=function(Qn){return typeof Qn=="boolean"?Qn:Qn>=0},ut,It,Bt,lt;Zn();var Ke=Je(Oe),tt=_n[0]===cn[0];if(Ke&&_n[0]==="t"&&(It>pt.bottom||we.current.bt)){var at=Ze;tt?at-=cr-kn:at=wt.y-Tt.y-gt;var it=Cr(Be,at),At=Cr(Be,at,un);it>ze||it===ze&&(!Pt||At>=ht)?(we.current.bt=!0,Ze=at,gt=-gt,he.points=[Et(_n,0),Et(cn,0)]):we.current.bt=!1}if(Ke&&_n[0]==="b"&&(ut<pt.top||we.current.tb)){var Ht=Ze;tt?Ht+=cr-kn:Ht=St.y-zt.y-gt;var qt=Cr(Be,Ht),an=Cr(Be,Ht,un);qt>ze||qt===ze&&(!Pt||an>=ht)?(we.current.tb=!0,Ze=Ht,gt=-gt,he.points=[Et(_n,0),Et(cn,0)]):we.current.tb=!1}var Sn=Je(ue),Rn=_n[1]===cn[1];if(Sn&&_n[1]==="l"&&(lt>pt.right||we.current.rl)){var yn=Be;Rn?yn-=Jn-qn:yn=wt.x-Tt.x-Xe;var On=Cr(yn,Ze),hn=Cr(yn,Ze,un);On>ze||On===ze&&(!Pt||hn>=ht)?(we.current.rl=!0,Be=yn,Xe=-Xe,he.points=[Et(_n,1),Et(cn,1)]):we.current.rl=!1}if(Sn&&_n[1]==="r"&&(Bt<pt.left||we.current.lr)){var Vn=Be;Rn?Vn+=Jn-qn:Vn=St.x-zt.x-Xe;var Mn=Cr(Vn,Ze),En=Cr(Vn,Ze,un);Mn>ze||Mn===ze&&(!Pt||En>=ht)?(we.current.lr=!0,Be=Vn,Xe=-Xe,he.points=[Et(_n,1),Et(cn,1)]):we.current.lr=!1}Zn();var Hn=Pe===!0?0:Pe;typeof Hn=="number"&&(Bt<un.left&&(Be-=Bt-un.left-Xe,fe.x+qn<un.left+Hn&&(Be+=fe.x-un.left+qn-Hn)),lt>un.right&&(Be-=lt-un.right-Xe,fe.x>un.right-Hn&&(Be+=fe.x-un.right+Hn)));var Gn=Me===!0?0:Me;typeof Gn=="number"&&(ut<un.top&&(Ze-=ut-un.top-gt,fe.y+kn<un.top+Gn&&(Ze+=fe.y-un.top+kn-Gn)),It>un.bottom&&(Ze-=It-un.bottom-gt,fe.y>un.bottom-Gn&&(Ze+=fe.y-un.bottom+Gn)));var er=xt.x+Be,jn=er+Jn,$n=xt.y+Ze,Nn=$n+cr,In=fe.x,Bn=In+qn,ir=fe.y,mr=ir+kn,fr=Math.max(er,In),dr=Math.min(jn,Bn),kr=(fr+dr)/2,Wr=kr-er,Kr=Math.max($n,ir),Ai=Math.min(Nn,mr),Jr=(Kr+Ai)/2,ei=Jr-$n;R==null||R(xe,he);var Tr=Lt.right-xt.x-(Be+xt.width),Rr=Lt.bottom-xt.y-(Ze+xt.height);rn===1&&(Be=Math.round(Be),Tr=Math.round(Tr)),dn===1&&(Ze=Math.round(Ze),Rr=Math.round(Rr));var ti={ready:!0,offsetX:Be/rn,offsetY:Ze/dn,offsetR:Tr/rn,offsetB:Rr/dn,arrowX:Wr/rn,arrowY:ei/dn,scaleX:rn,scaleY:dn,align:he};G(ti)}}),Ne=function(){te.current+=1;var ft=te.current;Promise.resolve().then(function(){te.current===ft&&Ie()})},qe=function(){G(function(ft){return(0,N.Z)((0,N.Z)({},ft),{},{ready:!1})})};return(0,p.Z)(qe,[Re]),(0,p.Z)(function(){ke||qe()},[ke]),[$.ready,$.offsetX,$.offsetY,$.offsetR,$.offsetB,$.arrowX,$.arrowY,$.scaleX,$.scaleY,$.align,Ne]}var Ot=C(95190);function Fe(ke,xe,W,Re,$e){(0,p.Z)(function(){if(ke&&xe&&W){let te=function(){Re(),$e()};var J=xe,R=W,k=Y(J),se=Y(R),$=Ae(R),G=new Set([$].concat((0,Ot.Z)(k),(0,Ot.Z)(se)));return G.forEach(function(Ce){Ce.addEventListener("scroll",te,{passive:!0})}),$.addEventListener("resize",te,{passive:!0}),Re(),function(){G.forEach(function(Ce){Ce.removeEventListener("scroll",te),$.removeEventListener("resize",te)})}}},[ke,xe,W])}var kt=C(48736);function sn(ke,xe,W,Re,$e,J,R,k){var se=E.useRef(ke);se.current=ke;var $=E.useRef(!1);E.useEffect(function(){if(xe&&Re&&(!$e||J)){var te=function(){$.current=!1},Ce=function(Kt){var Ct;se.current&&!R(((Ct=Kt.composedPath)===null||Ct===void 0||(Ct=Ct.call(Kt))===null||Ct===void 0?void 0:Ct[0])||Kt.target)&&!$.current&&k(!1)},we=Ae(Re);we.addEventListener("pointerdown",te,!0),we.addEventListener("mousedown",Ce,!0),we.addEventListener("contextmenu",Ce,!0);var Se=(0,A.A)(W);if(Se&&(Se.addEventListener("mousedown",Ce,!0),Se.addEventListener("contextmenu",Ce,!0)),0)var Ie,Ne,qe,et;return function(){we.removeEventListener("pointerdown",te,!0),we.removeEventListener("mousedown",Ce,!0),we.removeEventListener("contextmenu",Ce,!0),Se&&(Se.removeEventListener("mousedown",Ce,!0),Se.removeEventListener("contextmenu",Ce,!0))}}},[xe,W,Re,$e,J]);function G(){$.current=!0}return G}var jt=["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 pn(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:le.Z,xe=E.forwardRef(function(W,Re){var $e=W.prefixCls,J=$e===void 0?"rc-trigger-popup":$e,R=W.children,k=W.action,se=k===void 0?"hover":k,$=W.showAction,G=W.hideAction,te=W.popupVisible,Ce=W.defaultPopupVisible,we=W.onPopupVisibleChange,Se=W.afterPopupVisibleChange,Ie=W.mouseEnterDelay,Ne=W.mouseLeaveDelay,qe=Ne===void 0?.1:Ne,et=W.focusDelay,ft=W.blurDelay,Kt=W.mask,Ct=W.maskClosable,vt=Ct===void 0?!0:Ct,en=W.getPopupContainer,on=W.forceRender,Vt=W.autoDestroy,gn=W.destroyPopupOnHide,Pn=W.popup,Gt=W.popupClassName,mn=W.popupStyle,Ye=W.popupPlacement,Ge=W.builtinPlacements,He=Ge===void 0?{}:Ge,ne=W.popupAlign,fe=W.zIndex,ye=W.stretch,Ee=W.getPopupClassNameFromAlign,Te=W.fresh,xt=W.alignPoint,Wt=W.onPopupClick,nn=W.onPopupAlign,Cn=W.arrow,Wn=W.popupMotion,zn=W.maskMotion,vn=W.popupTransitionName,Dn=W.popupAnimation,or=W.maskTransitionName,pr=W.maskAnimation,rr=W.className,cr=W.getTriggerDOMNode,Jn=(0,ve.Z)(W,jt),kn=Vt||gn||!1,qn=E.useState(!1),vr=(0,ae.Z)(qn,2),br=vr[0],je=vr[1];(0,p.Z)(function(){je((0,v.Z)())},[]);var Ve=E.useRef({}),Yt=E.useContext(oe),Pt=E.useMemo(function(){return{registerSubPopup:function(tr,Ir){Ve.current[tr]=Ir,Yt==null||Yt.registerSubPopup(tr,Ir)}}},[Yt]),An=(0,T.Z)(),un=E.useState(null),yt=(0,ae.Z)(un,2),pt=yt[0],Lt=yt[1],rn=E.useRef(null),dn=(0,B.Z)(function(wn){rn.current=wn,(0,ie.Sh)(wn)&&pt!==wn&&Lt(wn),Yt==null||Yt.registerSubPopup(An,wn)}),xn=E.useState(null),dt=(0,ae.Z)(xn,2),$t=dt[0],Le=dt[1],Xe=E.useRef(null),gt=(0,B.Z)(function(wn){(0,ie.Sh)(wn)&&$t!==wn&&(Le(wn),Xe.current=wn)}),_t=E.Children.only(R),Qt=(_t==null?void 0:_t.props)||{},Xt={},Rt=(0,B.Z)(function(wn){var tr,Ir,nr=$t;return(nr==null?void 0:nr.contains(wn))||((tr=(0,A.A)(nr))===null||tr===void 0?void 0:tr.host)===wn||wn===nr||(pt==null?void 0:pt.contains(wn))||((Ir=(0,A.A)(pt))===null||Ir===void 0?void 0:Ir.host)===wn||wn===pt||Object.values(Ve.current).some(function(wr){return(wr==null?void 0:wr.contains(wn))||wn===wr})}),Jt=z(J,Wn,Dn,vn),fn=z(J,zn,pr,or),bn=E.useState(Ce||!1),nt=(0,ae.Z)(bn,2),cn=nt[0],_n=nt[1],U=te!=null?te:cn,M=(0,B.Z)(function(wn){te===void 0&&_n(wn)});(0,p.Z)(function(){_n(te||!1)},[te]);var he=E.useRef(U);he.current=U;var Be=E.useRef([]);Be.current=[];var Ze=(0,B.Z)(function(wn){var tr;M(wn),((tr=Be.current[Be.current.length-1])!==null&&tr!==void 0?tr:U)!==wn&&(Be.current.push(wn),we==null||we(wn))}),ze=E.useRef(),ht=function(){clearTimeout(ze.current)},wt=function(tr){var Ir=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;ht(),Ir===0?Ze(tr):ze.current=setTimeout(function(){Ze(tr)},Ir*1e3)};E.useEffect(function(){return ht},[]);var zt=E.useState(!1),St=(0,ae.Z)(zt,2),Tt=St[0],tn=St[1];(0,p.Z)(function(wn){(!wn||U)&&tn(!0)},[U]);var ue=E.useState(null),Oe=(0,ae.Z)(ue,2),Pe=Oe[0],Me=Oe[1],Je=E.useState(null),ut=(0,ae.Z)(Je,2),It=ut[0],Bt=ut[1],lt=function(tr){Bt([tr.clientX,tr.clientY])},Ke=Mt(U,pt,xt&&It!==null?It:$t,Ye,He,ne,nn),tt=(0,ae.Z)(Ke,11),at=tt[0],it=tt[1],At=tt[2],Ht=tt[3],qt=tt[4],an=tt[5],Sn=tt[6],Rn=tt[7],yn=tt[8],On=tt[9],hn=tt[10],Vn=_e(br,se,$,G),Mn=(0,ae.Z)(Vn,2),En=Mn[0],Hn=Mn[1],Gn=En.has("click"),er=Hn.has("click")||Hn.has("contextMenu"),jn=(0,B.Z)(function(){Tt||hn()}),$n=function(){he.current&&xt&&er&&wt(!1)};Fe(U,$t,pt,jn,$n),(0,p.Z)(function(){jn()},[It,Ye]),(0,p.Z)(function(){U&&!(He!=null&&He[Ye])&&jn()},[JSON.stringify(ne)]);var Nn=E.useMemo(function(){var wn=ee(He,J,On,xt);return h()(wn,Ee==null?void 0:Ee(On))},[On,Ee,He,J,xt]);E.useImperativeHandle(Re,function(){return{nativeElement:Xe.current,popupElement:rn.current,forceAlign:jn}});var In=E.useState(0),Bn=(0,ae.Z)(In,2),ir=Bn[0],mr=Bn[1],fr=E.useState(0),dr=(0,ae.Z)(fr,2),kr=dr[0],Wr=dr[1],Kr=function(){if(ye&&$t){var tr=$t.getBoundingClientRect();mr(tr.width),Wr(tr.height)}},Ai=function(){Kr(),jn()},Jr=function(tr){tn(!1),hn(),Se==null||Se(tr)},ei=function(){return new Promise(function(tr){Kr(),Me(function(){return tr})})};(0,p.Z)(function(){Pe&&(hn(),Pe(),Me(null))},[Pe]);function Tr(wn,tr,Ir,nr){Xt[wn]=function(wr){var Nr;nr==null||nr(wr),wt(tr,Ir);for(var Yr=arguments.length,ri=new Array(Yr>1?Yr-1:0),Pr=1;Pr<Yr;Pr++)ri[Pr-1]=arguments[Pr];(Nr=Qt[wn])===null||Nr===void 0||Nr.call.apply(Nr,[Qt,wr].concat(ri))}}(Gn||er)&&(Xt.onClick=function(wn){var tr;he.current&&er?wt(!1):!he.current&&Gn&&(lt(wn),wt(!0));for(var Ir=arguments.length,nr=new Array(Ir>1?Ir-1:0),wr=1;wr<Ir;wr++)nr[wr-1]=arguments[wr];(tr=Qt.onClick)===null||tr===void 0||tr.call.apply(tr,[Qt,wn].concat(nr))});var Rr=sn(U,er,$t,pt,Kt,vt,Rt,wt),ti=En.has("hover"),Cr=Hn.has("hover"),Zn,yr;ti&&(Tr("onMouseEnter",!0,Ie,function(wn){lt(wn)}),Tr("onPointerEnter",!0,Ie,function(wn){lt(wn)}),Zn=function(tr){(U||Tt)&&pt!==null&&pt!==void 0&&pt.contains(tr.target)&&wt(!0,Ie)},xt&&(Xt.onMouseMove=function(wn){var tr;(tr=Qt.onMouseMove)===null||tr===void 0||tr.call(Qt,wn)})),Cr&&(Tr("onMouseLeave",!1,qe),Tr("onPointerLeave",!1,qe),yr=function(){wt(!1,qe)}),En.has("focus")&&Tr("onFocus",!0,et),Hn.has("focus")&&Tr("onBlur",!1,ft),En.has("contextMenu")&&(Xt.onContextMenu=function(wn){var tr;he.current&&Hn.has("contextMenu")?wt(!1):(lt(wn),wt(!0)),wn.preventDefault();for(var Ir=arguments.length,nr=new Array(Ir>1?Ir-1:0),wr=1;wr<Ir;wr++)nr[wr-1]=arguments[wr];(tr=Qt.onContextMenu)===null||tr===void 0||tr.call.apply(tr,[Qt,wn].concat(nr))}),rr&&(Xt.className=h()(Qt.className,rr));var Qn=(0,N.Z)((0,N.Z)({},Qt),Xt),Ar={},ur=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];ur.forEach(function(wn){Jn[wn]&&(Ar[wn]=function(){for(var tr,Ir=arguments.length,nr=new Array(Ir),wr=0;wr<Ir;wr++)nr[wr]=arguments[wr];(tr=Qn[wn])===null||tr===void 0||tr.call.apply(tr,[Qn].concat(nr)),Jn[wn].apply(Jn,nr)})});var hr=E.cloneElement(_t,(0,N.Z)((0,N.Z)({},Qn),Ar)),Er={x:an,y:Sn},Fr=Cn?(0,N.Z)({},Cn!==!0?Cn:{}):null;return E.createElement(E.Fragment,null,E.createElement(ge.Z,{disabled:!U,ref:gt,onResize:Ai},E.createElement(X,{getTriggerDOMNode:cr},hr)),E.createElement(oe.Provider,{value:Pt},E.createElement(re,{portal:ke,ref:dn,prefixCls:J,popup:Pn,className:h()(Gt,Nn),style:mn,target:$t,onMouseEnter:Zn,onMouseLeave:yr,onPointerEnter:Zn,zIndex:fe,open:U,keepDom:Tt,fresh:Te,onClick:Wt,onPointerDownCapture:Rr,mask:Kt,motion:Jt,maskMotion:fn,onVisibleChanged:Jr,onPrepare:ei,forceRender:on,autoDestroy:kn,getPopupContainer:en,align:On,arrow:Fr,arrowPos:Er,ready:at,offsetX:it,offsetY:At,offsetR:Ht,offsetB:qt,onAlign:jn,stretch:ye,targetWidth:ir/Rn,targetHeight:kr/yn})))});return xe}var mt=pn(le.Z)},28426:function(Fn,st,C){"use strict";var N=C(59301),ae=C(93314),ve=C(99571),le=Object.defineProperty,Q=Object.defineProperties,h=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,B=(E,S,F)=>S in E?le(E,S,{enumerable:!0,configurable:!0,writable:!0,value:F}):E[S]=F,T=(E,S)=>{for(var F in S||(S={}))ie.call(S,F)&&B(E,F,S[F]);if(ge)for(var F of ge(S))A.call(S,F)&&B(E,F,S[F]);return E},p=(E,S)=>Q(E,h(S));const v=({img:E,buttonProps:S={},styles:F={},customText:O,ButtonText:Z,ButtonClick:b,Buttonclass:L,ButtonTwo:D,imgStyles:I,loading:re=!1,className:ce=""})=>N.createElement("section",{className:`tc animated fadeIn ${ce}`,style:T({color:"#999",margin:"100px auto",visibility:re?"hidden":"visible"},F)},N.createElement("img",{src:E||ae,style:p(T({},I),{pointerEvents:"none",userSelect:"none"})}),N.createElement("p",{className:"mt20 font14"},O||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),Z&&N.createElement(ve.ZP,T({className:L,onClick:b},S),Z),D&&D);st.Z=v},45677:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return L}});var N=C(59301),ae={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ve=C(99571),le=C(70557),Q=C(75975),h=C(25399),ge=C(51257),ie=C(81722),A=C(28426),B=C(346),T=C(44203),p=C(59301),v=Object.defineProperty,E=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,O=(D,I,re)=>I in D?v(D,I,{enumerable:!0,configurable:!0,writable:!0,value:re}):D[I]=re,Z=(D,I)=>{for(var re in I||(I={}))S.call(I,re)&&O(D,re,I[re]);if(E)for(var re of E(I))F.call(I,re)&&O(D,re,I[re]);return D},b=(D,I,re)=>new Promise((ce,X)=>{var q=_e=>{try{pe(re.next(_e))}catch(j){X(j)}},oe=_e=>{try{pe(re.throw(_e))}catch(j){X(j)}},pe=_e=>_e.done?ce(_e.value):Promise.resolve(_e.value).then(q,oe);pe((re=re.apply(D,I)).next())}),L=({editOffice:D="view",data:I,issaver:re,onSaver:ce,theme:X,type:q,filename:oe,monacoEditor:pe,className:_e,style:j,close:K,onClose:ee,hasMask:z,disabledDownload:Ae,onImgDimensions:Y,showNodata:y,recordInfo:_})=>{const[V,de]=(0,N.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[We,Qe]=(0,N.useState)(""),[ct,Et]=(0,N.useState)(),Mt=window.ENV==="build"?"/react/build":"",Ot=location.host.startsWith("localhost")?B.Z.PROXY_SERVER:B.Z.API_SERVER,kt=10*(1024*1024),sn=(0,N.useRef)();I!=null&&I.startsWith("/api")&&q!=="txt"&&(I=B.Z.API_SERVER+I);const jt=W=>W.substring(W.lastIndexOf("/")+1).split(".").pop();oe&&pe&&(pe.filename=oe),(0,N.useEffect)(()=>{var W,Re;const $e=(Re=(W=document.cookie)==null?void 0:W.replace(/\s/g,""))==null?void 0:Re.split(";");$e==null||$e.map(J=>{let R=J.split("=");R[0]==="_educoder_session"&&Qe(R[1])})},[]),(0,N.useEffect)(()=>{q==="office"&&(I.indexOf("bigfilescdn.")>-1||I.indexOf("bigfiles1")>-1?Et({url:I,fileType:jt(I),model:I.indexOf("model=edit")?"edit":"view"}):mt())},[q,I]);function pn(W){return b(this,null,function*(){W.data.type==="pdfdata"&&(ce(W.data.data),window.removeEventListener("message",pn,!1)),console.log("mess---:",W.data)})}const mt=()=>b(void 0,null,function*(){console.log("data:",I);let W=I;I.startsWith("http")||(W=location.origin+W);let Re=new URL(W).pathname.split("/").pop();const $e=yield(0,ie.gJ)({attachment_id:Re});$e.url=Ot+$e.url,Et($e)}),ke=()=>{if(I.startsWith("http")||I.startsWith("blob:")){xe();return}(0,ge.Sv)(oe||"educoder",I,oe)},xe=()=>{_&&(0,T.fc)({id:_==null?void 0:_.id,watch_type:1,course_id:_==null?void 0:_.course_id}),(0,ge.Nd)(oe||"educoder",decodeURIComponent(I))};return p.createElement("div",{style:Z({},j||{}),className:`${z&&ae.bgBlack} ${q?ae.wrp:"hide"}`},K&&p.createElement("div",{className:ae.close,ref:sn},!!Y&&p.createElement(h.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>sn.current},p.createElement("span",{onClick:()=>{ee(),Y()}},p.createElement("i",{className:"icon-yulanpizhu"}))),!Ae&&p.createElement(h.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>sn.current},p.createElement("span",{onClick:xe},p.createElement("i",{className:"icon-quxiaozhiding"}))),re&&p.createElement(h.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>sn.current},p.createElement("span",{className:"",onClick:()=>{const W=document.getElementById("pdfiframe");window.addEventListener("message",pn,!1),setTimeout(()=>{W.contentWindow.postMessage("getData","*")},300)}},p.createElement("i",{className:"icon-baocun"}))),p.createElement(h.Z,{title:"\u5173\u95ED",getPopupContainer:()=>sn.current},p.createElement("span",{className:"",onClick:()=>{ee()}},p.createElement("i",{className:"icon-guanbi1"})))),p.createElement("div",{className:`${ae[_e]} ${_e} ${ae.monaco} ${q==="txt"?"show":"hide"}`},q==="txt"&&p.createElement(p.Fragment,null,p.createElement(Q.ZP,Z({},pe)))),q==="audio"&&p.createElement("audio",{src:`${(I==null?void 0:I.indexOf("http://"))>-1||(I==null?void 0:I.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${I}`,autoPlay:!0}),q==="video"&&p.createElement(p.Fragment,null,(I==null?void 0:I.indexOf("http"))>-1?p.createElement("video",{controls:!0,src:`${I}`,autoPlay:!0}):p.createElement("video",{controls:!0,src:`data:video/mp4;base64,${I}`,autoPlay:!0})),q==="office"&&ct&&p.createElement("iframe",{src:`${Mt}/office.html?key=${ct.key}&url=${btoa(ct.url)}&callbackUrl=${Ot+(ct.callbackUrl||"")}&fileType=${ct.fileType}&title=${ct.title||""}&model=${D}&officeServer=${B.Z.ONLYOFFICE}&disabledDownload=${!!Ae}`}),q==="html"&&p.createElement("iframe",{src:I+"&disposition=inline"}),q==="pdf"&&p.createElement("iframe",{id:"pdfiframe",src:`${Mt}/js/pdfview/index.html?filename=${oe||"educoder.pdf"}&url=${encodeURIComponent(I)}&disabledDownload=${!!Ae}&model=${D}`}),q==="image"&&p.createElement("img",{src:`${(I==null?void 0:I.indexOf("http://"))>-1||(I==null?void 0:I.indexOf("https://"))>-1?"":"data:image/png;base64,"}${I}`}),(q==="other"||q==="download")&&p.createElement(p.Fragment,null,y?p.createElement(A.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:p.createElement(ve.ZP,{icon:p.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ke,disabled:Ae},"\u4E0B\u8F7D")}):p.createElement(ve.ZP,{type:"primary",size:"middle",onClick:ke,disabled:Ae},p.createElement(le.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(Fn,st,C){"use strict";C.d(st,{z:function(){return X},Z:function(){return q}});var N=C(59301),ae=C(8944),ve=C(81428),le=C(64018),Q=C(15360),h=C(346),ge=C(51257),ie=C(15342),A=C(1012),B=C(45677),T=C(59301),v=({html:oe})=>{const pe=(0,N.useRef)(null),_e=(0,N.useRef)(null),j=`.markdown-body p {
|
|
margin: 0 0 16px 0 !important;
|
|
line-height: 28px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
li {
|
|
list-style-type: none
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
dl {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.markdown-body {
|
|
-ms-text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
color: #333;
|
|
overflow: hidden;
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
word-break: break-word;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.markdown-body ul>li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol>li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body a {
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body a:active,
|
|
.markdown-body a:hover {
|
|
outline: 0;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 2em;
|
|
margin: 0.67em 0;
|
|
}
|
|
|
|
.markdown-body img {
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
-moz-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-body code,
|
|
.markdown-body kbd,
|
|
.markdown-body pre {
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body input {
|
|
color: inherit;
|
|
font: inherit;
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body html input[disabled] {
|
|
cursor: default;
|
|
}
|
|
|
|
.markdown-body input {
|
|
line-height: normal;
|
|
}
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body * {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body input {
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: #4183c4;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover,
|
|
.markdown-body a:active {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
height: 0;
|
|
margin: 15px 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
border: 0;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body hr:before {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body hr:after {
|
|
display: table;
|
|
clear: both;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
margin-top: 15px;
|
|
margin-bottom: 15px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 30px;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: 21px;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
ul.linenums,
|
|
ol.linenums {
|
|
padding: 16px 0 0 56px !important;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
|
|
.markdown-body ol ol,
|
|
.markdown-body ul ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
.markdown-body ul ul ol,
|
|
.markdown-body ul ol ol,
|
|
.markdown-body ol ul ol,
|
|
.markdown-body ol ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.markdown-body dd {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
}
|
|
|
|
.markdown-body .octicon {
|
|
font: normal normal 16px octicons-anchor;
|
|
line-height: 1;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-body .octicon-link:before {
|
|
content: '\f05c';
|
|
}
|
|
|
|
.markdown-body>*:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.markdown-body>*:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.markdown-body .anchor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
padding-right: 6px;
|
|
padding-left: 30px;
|
|
margin-left: -30px;
|
|
}
|
|
|
|
.markdown-body .anchor:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
position: relative;
|
|
margin-top: 1em;
|
|
margin-bottom: 16px;
|
|
font-weight: bold;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
.markdown-body h2 .octicon-link,
|
|
.markdown-body h3 .octicon-link,
|
|
.markdown-body h4 .octicon-link,
|
|
.markdown-body h5 .octicon-link,
|
|
.markdown-body h6 .octicon-link {
|
|
display: none;
|
|
color: #000;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
.markdown-body h2:hover .anchor,
|
|
.markdown-body h3:hover .anchor,
|
|
.markdown-body h4:hover .anchor,
|
|
.markdown-body h5:hover .anchor,
|
|
.markdown-body h6:hover .anchor {
|
|
padding-left: 8px;
|
|
margin-left: -30px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
display: inline-block;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 2.25em;
|
|
line-height: 1.2;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h1 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 1.75em;
|
|
line-height: 1.225;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h2 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 1.5em;
|
|
line-height: 1.43;
|
|
}
|
|
|
|
.markdown-body h3 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.markdown-body h4 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body h5 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 1em;
|
|
color: #777;
|
|
}
|
|
|
|
.markdown-body h6 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body ul ul,
|
|
.markdown-body ul ol,
|
|
.markdown-body ol ol,
|
|
.markdown-body ol ul {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body li>p {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.markdown-body dl {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body dl dt {
|
|
padding: 0;
|
|
margin-top: 16px;
|
|
font-size: 1em;
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body dl dd {
|
|
padding: 0 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
padding: 0 15px;
|
|
color: #777;
|
|
border-left: 4px solid #ddd;
|
|
}
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
word-break: normal;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.markdown-body table th {
|
|
font-weight: bold;
|
|
text-align: revert;
|
|
}
|
|
|
|
.markdown-body table th,
|
|
.markdown-body table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body table tr {
|
|
background-color: #fff;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body code {
|
|
padding: 0;
|
|
padding-top: 0.2em;
|
|
padding-bottom: 0.2em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body code:has(.katex) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body code:before,
|
|
.markdown-body code:after {
|
|
letter-spacing: -0.2em;
|
|
content: "\\00a0";
|
|
}
|
|
|
|
.markdown-body pre>code {
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 100%;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
background: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body .highlight {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body .highlight pre,
|
|
.markdown-body pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f7f7f7;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body .highlight pre {
|
|
margin-bottom: 0;
|
|
word-break: normal;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
display: inline;
|
|
max-width: initial;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: initial;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body pre code:before,
|
|
.markdown-body pre code:after {
|
|
content: normal;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font-size: 11px;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .pl-c {
|
|
color: #969896;
|
|
}
|
|
|
|
.markdown-body .pl-c1,
|
|
.markdown-body .pl-mdh,
|
|
.markdown-body .pl-mm,
|
|
.markdown-body .pl-mp,
|
|
.markdown-body .pl-mr,
|
|
.markdown-body .pl-s1 .pl-v,
|
|
.markdown-body .pl-s3,
|
|
.markdown-body .pl-sc,
|
|
.markdown-body .pl-sv {
|
|
color: #0086b3;
|
|
}
|
|
|
|
.markdown-body .pl-e,
|
|
.markdown-body .pl-en {
|
|
color: #795da3;
|
|
}
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
.markdown-body .pl-smi,
|
|
.markdown-body .pl-smp,
|
|
.markdown-body .pl-stj,
|
|
.markdown-body .pl-vo,
|
|
.markdown-body .pl-vpf {
|
|
color: #333;
|
|
}
|
|
|
|
.markdown-body .pl-ent {
|
|
color: #63a35c;
|
|
}
|
|
|
|
.markdown-body .pl-k,
|
|
.markdown-body .pl-s,
|
|
.markdown-body .pl-st {
|
|
color: #a71d5d;
|
|
}
|
|
|
|
.markdown-body .pl-pds,
|
|
.markdown-body .pl-s1,
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
.markdown-body .pl-sr,
|
|
.markdown-body .pl-sr .pl-cce,
|
|
.markdown-body .pl-sr .pl-sra,
|
|
.markdown-body .pl-sr .pl-sre,
|
|
.markdown-body .pl-src {
|
|
color: #df5000;
|
|
}
|
|
|
|
.markdown-body .pl-mo,
|
|
.markdown-body .pl-v {
|
|
color: #1d3e81;
|
|
}
|
|
|
|
.markdown-body .pl-id {
|
|
color: #b52a1d;
|
|
}
|
|
|
|
.markdown-body .pl-ii {
|
|
background-color: #b52a1d;
|
|
color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
color: #63a35c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-ml {
|
|
color: #693a17;
|
|
}
|
|
|
|
.markdown-body .pl-mh,
|
|
.markdown-body .pl-mh .pl-en,
|
|
.markdown-body .pl-ms {
|
|
color: #1d3e81;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-mq {
|
|
color: #008080;
|
|
}
|
|
|
|
.markdown-body .pl-mi {
|
|
color: #333;
|
|
font-style: italic;
|
|
}
|
|
|
|
.markdown-body .pl-mb {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-md,
|
|
.markdown-body .pl-mdhf {
|
|
background-color: #ffecec;
|
|
color: #bd2c00;
|
|
}
|
|
|
|
.markdown-body .pl-mdht,
|
|
.markdown-body .pl-mi1 {
|
|
background-color: #eaffea;
|
|
color: #55a532;
|
|
}
|
|
|
|
.markdown-body .pl-mdr {
|
|
color: #795da3;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .task-list-item {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.markdown-body .task-list-item input {
|
|
float: left;
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
z-index: 1;
|
|
position: relative;
|
|
border-color: #4183c4;
|
|
}
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
.pln {
|
|
color: #000
|
|
}
|
|
|
|
/* plain text */
|
|
|
|
@media screen {
|
|
.str {
|
|
color: #080
|
|
}
|
|
|
|
/* string content */
|
|
.kwd {
|
|
color: #008
|
|
}
|
|
|
|
/* a keyword */
|
|
.com {
|
|
color: #800
|
|
}
|
|
|
|
/* a comment */
|
|
.typ {
|
|
color: #606
|
|
}
|
|
|
|
/* a type name */
|
|
.lit {
|
|
color: #066
|
|
}
|
|
|
|
/* a literal value */
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #660
|
|
}
|
|
|
|
.tag {
|
|
color: #008
|
|
}
|
|
|
|
/* a markup tag name */
|
|
.atn {
|
|
color: #606
|
|
}
|
|
|
|
/* a markup attribute name */
|
|
.atv {
|
|
color: #080
|
|
}
|
|
|
|
/* a markup attribute value */
|
|
.dec,
|
|
.var {
|
|
color: #606
|
|
}
|
|
|
|
/* a declaration; a variable name */
|
|
.fun {
|
|
color: red
|
|
}
|
|
|
|
/* a function name */
|
|
}
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
@media print,
|
|
projection {
|
|
.str {
|
|
color: #060
|
|
}
|
|
|
|
.kwd {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.com {
|
|
color: #600;
|
|
font-style: italic
|
|
}
|
|
|
|
.typ {
|
|
color: #404;
|
|
font-weight: bold
|
|
}
|
|
|
|
.lit {
|
|
color: #044
|
|
}
|
|
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #440
|
|
}
|
|
|
|
.tag {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.atn {
|
|
color: #404
|
|
}
|
|
|
|
.atv {
|
|
color: #060
|
|
}
|
|
}
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
pre.prettyprint {
|
|
padding: 2px;
|
|
/* border: 1px solid #888 */
|
|
}
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
ol.linenums {
|
|
margin-top: 0;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
/* IE indents via margin-left */
|
|
li.L0,
|
|
li.L1,
|
|
li.L2,
|
|
li.L3,
|
|
li.L5,
|
|
li.L6,
|
|
li.L7,
|
|
li.L8 {
|
|
list-style-type: none
|
|
}
|
|
|
|
/* Alternate shading for lines */
|
|
li.L1,
|
|
li.L3,
|
|
li.L5,
|
|
li.L7,
|
|
li.L9 {
|
|
background: #eee
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}`;return(0,N.useEffect)(()=>{const K=pe.current.attachShadow({mode:"open"});_e.current=document.createElement("div"),_e.current.className="markdown-body",_e.current.innerHTML=oe,K.appendChild(_e.current);const ee=document.createElement("style");return ee.textContent=j,K.appendChild(ee),()=>{K.innerHTML=""}},[]),(0,N.useEffect)(()=>{_e.current&&(_e.current.innerHTML=oe)},[oe]),T.createElement("div",{ref:pe})};function E(oe){const pe=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],_e=new RegExp(`\\b(${pe.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return oe.replace(_e,"").trim()}var S=Object.defineProperty,F=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,b=(oe,pe,_e)=>pe in oe?S(oe,pe,{enumerable:!0,configurable:!0,writable:!0,value:_e}):oe[pe]=_e,L=(oe,pe)=>{for(var _e in pe||(pe={}))O.call(pe,_e)&&b(oe,_e,pe[_e]);if(F)for(var _e of F(pe))Z.call(pe,_e)&&b(oe,_e,pe[_e]);return oe};const D="@\u2581\u2581@",I="@\u2581@",re=/<pre[^>]*>/g;function ce(oe){let pe=document.createElement("div");return pe.innerHTML=oe,pe.childNodes.length===0?"":pe.childNodes[0].nodeValue}const X=(oe,pe)=>{oe=oe||"";const _e=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,j=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,K=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ee=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return pe?oe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(_e,(z,Ae,Y,y,_,V,de)=>{const We=Ae||y||V,Qe=Y||_||de||"?";return h.Z.API_SERVER+"/api/attachments/"+We+Qe+"&t="+(0,ge.Jn)(We,Date.now())+(z.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(oe=oe.replace(ee,(z,Ae,Y,y,_,V,de)=>{const We=Ae||y||V,Qe=Y||_||de||"?";return h.Z.API_SERVER+"/attachments/download/"+We+Qe+"&t="+(0,ge.Jn)(We,Date.now())+(z.indexOf(")")>-1?")":"&")}).replace(_e,(z,Ae,Y,y,_,V,de)=>{const We=Ae||y||V,Qe=Y||_||de||"?";return h.Z.API_SERVER+"/api/attachments/"+We+Qe+"&t="+(0,ge.Jn)(We,Date.now())+(z.indexOf(")")>-1?")":"&")}).replace(j,(z,Ae,Y,y,_)=>{const V=Ae||y,de=Y||_||"";return'"'+h.Z.API_SERVER+"/api/attachments/"+V+de+V+de+"&t="+(0,ge.Jn)(V,Date.now())}).replace(K,(z,Ae,Y,y,_)=>{const V=Ae||y,de=Y||_||"";return"("+h.Z.API_SERVER+"/files/uploads/"+V+de+V+de+"&t="+(0,ge.Jn)(V,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,`
|
|
`),oe)};var q=({value:oe="",className:pe,showTextOnly:_e,showLines:j,style:K={},stylesPrev:ee={},highlightKeywords:z,showProgramFill:Ae,isProgramFill:Y,disabledFill:y=!1,programFillValue:_,onFillChange:V=Qe=>{},onFillBlur:de=()=>{},onFillFocus:We=()=>{}})=>{let Qe=E(String(oe||""));const[ct,Et]=(0,N.useState)(""),[Mt,Ot]=(0,N.useState)("office"),[Fe,kt]=(0,N.useState)([]),sn=(0,N.useRef)("a"+(0,A.Z)()),jt={},pn=G=>/<style[\s\S]*?>/i.test(G||""),mt=(G,te,Ce)=>{const we=document.createElement(G===I?"input":"textarea");we.style.width="100%",we.style.height=G===I?"40px":"151px",we.rows=5,we.spellcheck=!1,we.name="edu-program-fill",we.placeholder="\u8BF7\u8F93\u5165",we.dataset.id=te;const Se=Object.keys(jt).length;return jt[Se]=we,`<span class="edu-program-fill-wrap ${G===I?"":"show"}" style="width:${G===I?"400px":"100%"}" title=${Ce||""}><span>${we.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function ke(G){return G=G.replace(/!\[.*?\]\(.*?\)/g,""),G=G.replace(/\[.*?\]\(.*?\)/g,""),G=G.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),G=G.replace(/<embed.*?>/g,""),G=G.replace(/<img.*?>/g,""),G=G.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),G=G.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),G=G.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),G=G.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),G}const xe=G=>!_e&&pn(Qe)?G:G.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(te,Ce){let we=Ce.replace(/(\n|\r)/g,"").split("}"),Se=[];return we.map(Ie=>{Ie!=""&&Se.push(`.${sn.current} ${Ie}`)}),`<style>${Se.join("}")}</style>`}),W=(0,N.useMemo)(()=>{try{const we=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Se=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ie=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ne=/\(\/attachments\/download\//g;Qe=Qe.replace(Ne,"("+h.Z.API_SERVER+"/attachments/download/").replace(we,"("+h.Z.API_SERVER+"/api/attachments/").replace(Se,'"'+h.Z.API_SERVER+"/api/attachments/").replace(Ie,'"'+h.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(we){}if(Ae){let we=-1;return Qe=Qe.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Se,Ie,Ne){var qe;return++we,mt(Se,we,(qe=_==null?void 0:_[we])==null?void 0:qe.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${xe(Qe||"")}</pre>`}let G=xe(Qe);G=(0,ve.ZP)(G);const te=(0,ve.ez)();Qe.match(/\[TOC\]/)&&(G=G.replace("<p>[TOC]</p>",(0,ve.Qv)()),(0,ve.Iy)()),G=G.replace(/(__special_katext_id_\d+__)/g,(we,Se)=>{const{type:Ie,expression:Ne}=te[Se];return(0,ie.renderToString)(ce(Ne)||"",{displayMode:Ie==="block",throwOnError:!1,output:"html"})}),G=G.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ve.AL)();const Ce=document.createElement("div");if(Ce.innerHTML=G,_e)return Ce.innerText;if(z){const we=z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return R(Ce,we),Ce.innerHTML}return setTimeout(()=>$(),500),Ce.innerHTML},[Qe,z]);(0,N.useEffect)(()=>{k.current&&k.current.querySelectorAll(["input","textarea"]).forEach(te=>{te.oninput=Re,te.onblur=$e,te.onfocus=J})},[Fe]),(0,N.useEffect)(()=>{var G,te,Ce,we,Se;if(_!=null&&_.length)try{const Ie=k.current.querySelectorAll(".edu-program-fill-score"),Ne=k.current.querySelectorAll('[name="edu-program-fill"]');for(const[qe,et]of Ne.entries())et.value=((G=_==null?void 0:_[qe])==null?void 0:G.value)||"",((te=_==null?void 0:_[qe])==null?void 0:te.type)==="warning"?et.className="program-fill-warning":((Ce=_==null?void 0:_[qe])==null?void 0:Ce.type)==="success"?et.className="program-fill-success":et.className="";for(const[qe,et]of Ie.entries())et.innerHTML=(we=_==null?void 0:_[qe])!=null&&we.score?`${(Se=_==null?void 0:_[qe])==null?void 0:Se.score}\u5206`:"";kt(_)}catch(Ie){console.log(Ie,"error")}},[_]);const Re=G=>{Fe[G.target.dataset.id]=Fe[G.target.dataset.id]||{},Fe[G.target.dataset.id].value=G.target.value,kt([...Fe]),V(Fe,G.target.dataset.id)},$e=G=>{Fe[G.target.dataset.id]=Fe[G.target.dataset.id]||{},Fe[G.target.dataset.id].value=G.target.value,kt([...Fe]),de(Fe,G.target.dataset.id)},J=G=>{Fe[G.target.dataset.id]=Fe[G.target.dataset.id]||{},Fe[G.target.dataset.id].value=G.target.value,kt([...Fe]),We(Fe,G.target.dataset.id)};function R(G,te){return G.childNodes.forEach(Ce=>{var we;if(Ce.childNodes.length>0)R(Ce,te);else if(Ce.nodeName!=="IMG")if(Ce.innerHTML)Ce.innerHTML=(we=Ce.innerHTML)==null?void 0:we.replace(new RegExp(te,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Se=document.createElement("span");Se.innerHTML=Ce.textContent.replace(new RegExp(te,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ce.replaceWith(Se)}})}const k=(0,N.useRef)();ve.jb.WebkitLineClamp=j,j&&(K=L(L({},K),ve.jb));function se(G){let te=G.target;if(te.tagName.toUpperCase()==="A"){let Ce=te.getAttribute("href");if(Ce.indexOf("office")>-1)G.preventDefault(),Et(Ce),Ot("office");else if(Ce.indexOf("application/pdf")>-1)G.preventDefault(),Et(Ce),Ot("pdf");else if(Ce.indexOf("text/html")>-1)G.preventDefault(),Et(Ce),Ot("html");else if(Ce.startsWith("#")){G.preventDefault();let we=document.getElementById(Ce.replace("#",""));we&&we.scrollIntoView(!0)}}}const $=()=>{var G;const te=(G=k.current)==null?void 0:G.querySelectorAll("video");te==null||te.forEach(Ce=>{if(Ce.oncontextmenu=()=>!1,Ce.src.indexOf(".m3u8")>-1&&!Ce.canPlayType("application/vnd.apple.mpegurl")){if(Q.ZP.isSupported()){var we=new Q.ZP;we.loadSource(Ce.src),we.attachMedia(Ce)}}})};return(0,N.useEffect)(()=>{if(k.current&&W&&W.match(re)&&window.PR.prettyPrint(),k.current)return k.current.addEventListener("click",se),()=>{var G;(G=k.current)==null||G.removeEventListener("click",se),(0,ve.AL)(),(0,ve.Iy)()}},[W,k.current,se]),(0,N.useEffect)(()=>{var G;const te=Ce=>{Ce.preventDefault(),Ce.clipboardData.setData("text",window.getSelection().toString())};return(G=k.current)==null||G.addEventListener("copy",te),()=>{var Ce;(Ce=k.current)==null||Ce.removeEventListener("copy",te)}},[k.current]),N.createElement(N.Fragment,null,_e&&N.createElement("div",{ref:k},W),!_e&&!pn(W)&&N.createElement("div",{ref:k,style:L({},K),className:`${pe||""} ${y?"disabled-fill":""} markdown-body ${sn.current}`,dangerouslySetInnerHTML:{__html:W}}),!_e&&pn(W)&&N.createElement(v,{html:W}),N.createElement(B.Z,{close:!0,data:ct,type:ct!=null&&ct.length?Mt:"",style:L({},ee),onClose:()=>Et("")}))}},75975:function(Fn,st,C){"use strict";C.d(st,{SV:function(){return R},ZP:function(){return J}});var N=C(59301),ae=C(76374);const ve={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"]},le={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"]},Q={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(`
|
|
`)}]},h={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(`
|
|
`)}]},ge={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 ie=C(53184),A=C.n(ie),B=Object.defineProperty,T=Object.defineProperties,p=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,F=(k,se,$)=>se in k?B(k,se,{enumerable:!0,configurable:!0,writable:!0,value:$}):k[se]=$,O=(k,se)=>{for(var $ in se||(se={}))E.call(se,$)&&F(k,$,se[$]);if(v)for(var $ of v(se))S.call(se,$)&&F(k,$,se[$]);return k},Z=(k,se)=>T(k,p(se)),b=(k,se,$)=>new Promise((G,te)=>{var Ce=Ie=>{try{Se($.next(Ie))}catch(Ne){te(Ne)}},we=Ie=>{try{Se($.throw(Ie))}catch(Ne){te(Ne)}},Se=Ie=>Ie.done?G(Ie.value):Promise.resolve(Ie.value).then(Ce,we);Se(($=$.apply(k,se)).next())});const L={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"]}},D=(k,se)=>se.map($=>({label:$,kind:k.languages.CompletionItemKind.Keyword,insertText:$})),I=k=>Object.keys(L.tables).map(se=>({label:se,kind:k.languages.CompletionItemKind.Variable,insertText:se})),re=(k,se)=>{const $=L.tables[k];return $?$.map(G=>({label:G,kind:se.languages.CompletionItemKind.Field,insertText:G})):[]};function ce(k,se,$,G,te){let Ce=se.getWordUntilPosition($),we={startLineNumber:$.lineNumber,endLineNumber:$.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},Se=G.map(Ie=>({label:Ie,kind:k.languages.CompletionItemKind.Keyword,insertText:Ie,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:we}));return te.map(Ie=>{Se.push(Z(O({},Ie),{range:we}))}),Se}var X=k=>{L.languages.map(te=>(k.languages.registerDocumentFormattingEditProvider(te,{provideDocumentFormattingEdits(Ce,we,Se){return b(this,null,function*(){const Ie=A()(Ce.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:Ce.getFullModelRange(),text:Ie}]})}}),te));const se=Q.quickKey.map(te=>({label:te.label,kind:k.languages.CompletionItemKind.Method,insertText:te.content,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet})),$=h.quickKey.map(te=>({label:te.label,kind:k.languages.CompletionItemKind.Method,insertText:te.content,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet})),G=le.quickKey.map(te=>({label:te.label,kind:k.languages.CompletionItemKind.Method,insertText:te.content,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet}));k.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(te,Ce){var we=te.getWordUntilPosition(Ce),Se={startLineNumber:Ce.lineNumber,endLineNumber:Ce.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn},Ie=te.getLineContent(Ce.lineNumber).substring(we.startColumn-2,we.endColumn);return{suggestions:[...Q.keywords.map(Ne=>({label:Ne,kind:k.languages.CompletionItemKind.Function,documentation:Ne,insertText:Ne,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se})),...Q.quickKey.map(Ne=>({label:Ne.label,kind:k.languages.CompletionItemKind.Function,documentation:Ne.content,insertText:Ie.startsWith("#")?Ne.content.replace(/#/,""):Ne.content,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}))]}}}),k.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(te,Ce){var we=te.getWordUntilPosition(Ce),Se={startLineNumber:Ce.lineNumber,endLineNumber:Ce.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn};return{suggestions:[...ve.keywords.map(Ie=>({label:Ie,kind:k.languages.CompletionItemKind.Function,documentation:Ie,insertText:Ie,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}))]}}}),k.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(te,Ce){var we=te.getWordUntilPosition(Ce),Se={startLineNumber:Ce.lineNumber,endLineNumber:Ce.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn},Ie=te.getLineContent(Ce.lineNumber).substring(we.startColumn-2,we.endColumn);return{suggestions:[...le.keywords.map(Ne=>({label:Ne,kind:k.languages.CompletionItemKind.Function,documentation:Ne,insertText:Ne,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se})),...le.quickKey.map(Ne=>({label:Ne.label,kind:k.languages.CompletionItemKind.Function,documentation:Ne.content,insertText:Ie.startsWith("#")?Ne.content.replace(/#/,""):Ne.content,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}))]}}}),k.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(te,Ce){var we=te.getWordUntilPosition(Ce),Se={startLineNumber:Ce.lineNumber,endLineNumber:Ce.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn},Ie=te.getLineContent(Ce.lineNumber).substring(we.startColumn-2,we.endColumn);return{suggestions:[...ge.keywords.map(Ne=>({label:Ne,kind:k.languages.CompletionItemKind.Function,documentation:Ne,insertText:Ne,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se})),...ge.quickKey.map(Ne=>({label:Ne.label,kind:k.languages.CompletionItemKind.Function,documentation:Ne.content,insertText:Ie.startsWith("#")?Ne.content.replace(/#/,""):Ne.content,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}))]}}}),k.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(te,Ce){var we=te.getWordUntilPosition(Ce),Se={startLineNumber:Ce.lineNumber,endLineNumber:Ce.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn},Ie=te.getLineContent(Ce.lineNumber).substring(we.startColumn-2,we.endColumn);return{suggestions:[...h.keywords.map(Ne=>({label:Ne,kind:k.languages.CompletionItemKind.Function,documentation:Ne,insertText:Ne,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se})),...h.quickKey.map(Ne=>({label:Ne.label,kind:k.languages.CompletionItemKind.Function,documentation:Ne.content,insertText:Ie.startsWith("#")?Ne.content.replace(/#/,""):Ne.content,insertTextRules:k.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}))]}}})};const q="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var oe=Object.defineProperty,pe=(k,se,$)=>se in k?oe(k,se,{enumerable:!0,configurable:!0,writable:!0,value:$}):k[se]=$,_e=(k,se,$)=>pe(k,typeof se!="symbol"?se+"":se,$);const j=class ic{constructor(se,$,G){this.placeholder=se,this.editor=$,this.monaco=G,$.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return ic.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(j,"ID","editor.widget.placeholderHint");var ee=j,z=C(96236),Ae=C(6767),Y=C(25399),y=C(89392),_=C(49535),V=C(56102),de=Object.defineProperty,We=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable,Ot=(k,se,$)=>se in k?de(k,se,{enumerable:!0,configurable:!0,writable:!0,value:$}):k[se]=$,Fe=(k,se)=>{for(var $ in se||(se={}))Et.call(se,$)&&Ot(k,$,se[$]);if(ct)for(var $ of ct(se))Mt.call(se,$)&&Ot(k,$,se[$]);return k},kt=(k,se)=>We(k,Qe(se)),sn=(k,se)=>{var $={};for(var G in k)Et.call(k,G)&&se.indexOf(G)<0&&($[G]=k[G]);if(k!=null&&ct)for(var G of ct(k))se.indexOf(G)<0&&Mt.call(k,G)&&($[G]=k[G]);return $},jt=(k,se,$)=>new Promise((G,te)=>{var Ce=Ie=>{try{Se($.next(Ie))}catch(Ne){te(Ne)}},we=Ie=>{try{Se($.throw(Ie))}catch(Ne){te(Ne)}},Se=Ie=>Ie.done?G(Ie.value):Promise.resolve(Ie.value).then(Ce,we);Se(($=$.apply(k,se)).next())});function pn(k){return/^\d+$/.test(k)?`${k}px`:k}function mt(){}let ke=!1;const xe={"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 W(k=[]){let se=k;if(Array.isArray(k)){for(let $=0;$<k.length;$++){let G=xe[k[$]];if(G)return G}return se[0]}return xe[se]||se}let Re=null;const $e=()=>jt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(k){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",k)}});var J=k=>{var se=k,{width:$="100%",height:G="100%",value:te,language:Ce="javascript",style:we={},options:Se={},overrideServices:Ie={},theme:Ne="vs-dark",onEditBlur:qe,isCopy:et=!1,onSave:ft,autoHeight:Kt=!1,forbidCopy:Ct=!1,onChange:vt=mt,editorDidMount:en=mt,onFocus:on=mt,onBreakPoint:Vt=mt,breakPointValue:gn=[],filename:Pn="educoder.txt",errorLine:Gt,errorContent:mn="",highlightLine:Ye,openBreakPoint:Ge=!1,placeholder:He="",showMiniMap:ne=!0}=se,fe=sn(se,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const ye=(0,N.useRef)(),Ee=(0,N.useRef)({}),Te=(0,N.useRef)(),xt=(0,N.useRef)(),Wt=(0,N.useRef)([]),nn=(0,N.useRef)(!1),Cn=(0,N.useRef)(),Wn=(0,N.useRef)(),zn=(0,N.useRef)(!1),[vn,Dn]=(0,N.useState)(!1);function or(){let yt;return ye.current&&(yt=new ae.Z(pt=>{for(let Lt of pt)(Lt.target.offsetHeight>0||Lt.target.offsetWidth>0)&&Ee.current.instance.layout()}),yt.observe(ye.current)),yt}function pr(){Ae.ZP.warning({content:decodeURIComponent(q),key:"monaco-editor-tip"})}const rr=()=>{let yt=Ee.current.instance;if(te!=null&&yt&&vn){const pt=yt.getModel();pt&&te!==pt.getValue()&&(ke=!0,pt.setValue(te),yt.layout(),ke=!1)}};(0,N.useEffect)(()=>{const yt=_.Z.subscribe("formatDocument",pt=>{var Lt;let rn=Ee.current.instance;(Lt=rn==null?void 0:rn.getAction)==null||Lt.call(rn,"editor.action.formatDocument").run()});return window.updateMonacoValue=pt=>{vt(pt)},yt},[]),(0,N.useEffect)(()=>{var yt;let pt=Ee.current.instance;xt.current&&clearTimeout(xt.current),xt.current=setTimeout(()=>{rr()},500),te&&(te!=null&&te.length)&&((yt=pt==null?void 0:pt.updateOptions)==null||yt.call(pt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(te.split(/\r\n|\r|\n/g).length))+3,5)}))},[te,vn,Ee.current]),(0,N.useEffect)(()=>{if(Gt&&Ee.current&&Ee.current.instance){let pt=Ee.current.instance;pt.changeViewZones(function(Lt){var rn=document.createElement("div");rn.style.padding="10px 20px",rn.style.width="calc(100% - 20px)",rn.className="my-error-line-wrp",rn.innerHTML=mn,Lt.addZone({afterLineNumber:Gt||11,heightInLines:3,domNode:rn})});var yt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};pt.addOverlayWidget(yt),pt.revealPositionInCenter({lineNumber:20,column:1})}},[Gt,Ee.current,vn]);const cr=(yt="",pt)=>{if(!yt||yt.trim()==="")return!0;const rn=Ee.current.instance.getModel().getLineTokens(pt);let dn=!1;for(let xn=0;xn<2;xn++)rn.getStandardTokenType(xn)===1&&(dn=!0);return dn};(0,N.useEffect)(()=>{var yt;const pt=(yt=Ee.current)==null?void 0:yt.instance;if(pt&&vn&&Ct){const Lt=pt.onDidBlurEditorWidget(()=>{zn.current=!1}),rn=pt.onDidFocusEditorText(()=>{zn.current=!0});return()=>{Lt.dispose(),rn.dispose()}}},[Ee.current,vn,Ct]),(0,N.useEffect)(()=>{var yt;if((yt=Ee.current)!=null&&yt.instance&&vn&&Ge){let pt=Ee.current.instance,Lt=pt.getModel();if(!Lt)return;(()=>{var Rt;let Jt=[],fn=[];const bn=Lt.getAllDecorations();for(let cn of bn)cn.options.className==="highlighted-line"&&(Jt.push((Rt=cn==null?void 0:cn.range)==null?void 0:Rt.startLineNumber),fn.push(cn==null?void 0:cn.id));if(Ye===Jt[0])return;Lt.deltaDecorations(fn,[]);const nt=Lt.getLineCount();Ye&&Ye<=nt&&(pt.deltaDecorations([],[{range:new Re.Range(Ye,1,Ye,Lt.getLineMaxColumn(Ye)),options:{isWholeLine:!0,className:"highlighted-line"}}]),pt.revealLineInCenter(Ye))})();const dn=(Rt=!1)=>{var Jt;let fn=[],bn=[];const nt=Lt.getAllDecorations();for(let cn of nt)cn.options.linesDecorationsClassName==="breakpoints-select"&&(fn.push((Jt=cn==null?void 0:cn.range)==null?void 0:Jt.startLineNumber),bn.push(cn==null?void 0:cn.id));if(Rt)return{lines:fn,ids:bn};Vt(fn)},xn=Rt=>jt(void 0,null,function*(){let Jt={range:new Re.Range(Rt,1,Rt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Lt.deltaDecorations([],[Jt]),dn()}),dt=Rt=>jt(void 0,null,function*(){let Jt=[];const fn=pt.getLineDecorations(Rt);for(let bn of fn)bn.options.linesDecorationsClassName==="breakpoints-select"&&Jt.push(bn.id);yield Lt.deltaDecorations(Jt,[]),dn()}),$t=Rt=>{let Jt=pt.getLineDecorations(Rt);for(let fn of Jt)if(fn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,y.isEqual)(gn,dn(!0).lines)){Lt.deltaDecorations(dn(!0).ids,[]);const Rt=gn.map(Jt=>({range:new Re.Range(Jt,1,Jt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Lt.deltaDecorations([],Rt)}const Le=pt.onDidChangeModelContent(Rt=>{let Jt=pt.getPosition();if(Jt){let fn=Jt.lineNumber;clearTimeout(Wn.current),Wn.current=setTimeout(()=>{cr(Lt.getLineContent(fn),fn)?dt(fn):$t(fn)?(dt(fn),xn(fn)):dn()},100)}}),Xe=pt.onMouseDown(Rt=>{var Jt,fn,bn;if(Rt.target.detail&&((bn=(fn=(Jt=Rt.target)==null?void 0:Jt.element)==null?void 0:fn.className)!=null&&bn.includes("line-numbers"))){let nt=Rt.target.position.lineNumber;if(cr(Lt.getLineContent(nt),nt))return;$t(nt)?dt(nt):xn(nt)}}),gt=Rt=>{let Jt={range:new Re.Range(Rt,1,Rt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Wt.current=pt.deltaDecorations(Wt.current,[Jt])},_t=()=>{Wt.current=pt.deltaDecorations(Wt.current,[])},Qt=pt.onMouseMove(Rt=>{var Jt,fn,bn;if(_t(),Rt.target.detail&&((bn=(fn=(Jt=Rt.target)==null?void 0:Jt.element)==null?void 0:fn.className)!=null&&bn.includes("line-numbers"))){let nt=Rt.target.position.lineNumber;if(cr(Lt.getLineContent(nt),nt))return;gt(nt)}}),Xt=pt.onMouseLeave(()=>{_t()});return()=>{Le.dispose(),Xe.dispose(),Qt.dispose(),Xt.dispose()}}},[Ee.current,vn,gn,Ye,Ge,Ce]),(0,N.useEffect)(()=>{var yt;(yt=Ee.current)!=null&&yt.instance&&Ge&&Ee.current.instance.setPosition({lineNumber:0,column:0})},[Ye]);function Jn(){let yt=Ee.current.instance;if(yt){const pt=yt.getSelection(),Lt=Ee.current.pastePos||{},rn=new Re.Range(Lt.startLineNumber||pt.endLineNumber,Lt.startColumn||pt.endColumn,Lt.endLineNumber||pt.endLineNumber,Lt.endColumn||pt.endColumn);setTimeout(()=>{yt.executeEdits("",[{range:rn,text:""}])},300)}}function kn(yt){(window.navigator.platform.match("Mac")?yt.metaKey:yt.ctrlKey)&&yt.keyCode==83&&(yt.preventDefault(),ft())}const qn=()=>{if(Kt&&Ee.current.instance){const yt=Ee.current.instance.getContentHeight();An(yt<G?G:yt)}else An(G)};function vr(yt){var pt=document.createEvent("MouseEvents");pt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),yt.dispatchEvent(pt)}const br=yt=>{if(!zn.current)return;const{keyCode:pt,ctrlKey:Lt,metaKey:rn,target:dn,type:xn}=yt;return(xn==="paste"||(pt===67||pt===86)&&(rn||Lt))&&dn.nodeName==="TEXTAREA"&&(pr(),yt.preventDefault()),!1};function je(yt,pt){var Lt=window.URL||window.webkitURL||window,rn=new Blob([pt]),dn=document.createElementNS("http://www.w3.org/1999/xhtml","a");dn.href=Lt.createObjectURL(rn),dn.download=yt,vr(dn)}(0,N.useEffect)(()=>{qn()},[qn]),(0,N.useEffect)(()=>{ye.current&&!vn&&Promise.all([C.e(8909),C.e(6656)]).then(C.bind(C,71448)).then(yt=>{try{Re=yt,Ee.current.instance=Re.editor.create(ye.current,{value:te,language:W(Ce),theme:Ne,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:ne||!1}},Ie);const pt=Ee.current.instance;let dn=[...z.BH._menuItems].find(Le=>Le[0]._debugName=="EditorContext")[1],xn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],dt=(Le,Xe)=>{var gt,_t;let Qt=Le._first;do Xe.includes((_t=(gt=Qt.element)==null?void 0:gt.command)==null?void 0:_t.id)&&Le._remove(Qt);while(Qt=Qt.next)};if(en(pt,Re),setTimeout(()=>{qn(),Ee.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{je(Pn||"educoder.txt",pt.getValue())}})},500),Ee.current.subscription=pt.onDidChangeModelContent(Le=>{nn.current?clearTimeout(Cn.current):(qn(),vt(pt.getValue(),Le)),Cn.current=setTimeout(()=>{nn.current=!1},500)}),window.Monaco||X(Re,W(Ce)),Ct&&(dt(dn,xn),ye.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",br),window.removeEventListener("paste",br),window.addEventListener("keydown",br),window.addEventListener("paste",br)),window.Monaco=Re,qe&&pt.onDidBlurEditorWidget(()=>{qe(pt.getValue())}),on&&pt.onDidFocusEditorText(()=>{Ct&&$e(),on(pt.getValue())}),Ct){$e();try{pt.onDidPaste(Le=>{const Xe=pt.getSelection(),gt=Ee.current.pastePos||{},_t=new Re.Range(gt.startLineNumber||Xe.endLineNumber,gt.startColumn||Xe.endColumn,gt.endLineNumber||Xe.endLineNumber,gt.endColumn||Xe.endColumn);pt.executeEdits("",[{range:Le.range,text:""}])})}catch(Le){}}let $t=or();return He&&typeof He=="string"&&new ee(He,pt,Re),Dn(!0),()=>{const Le=Ee.current.instance;Le.dispose();const Xe=Le.getModel();Xe&&Xe.dispose(),Ee.current.subscription&&Ee.current.subscription.dispose(),$t.unobserve(ye.current)}}catch(pt){}})},[]),(0,N.useEffect)(()=>{if(Ee.current.instance&&vn)return document.addEventListener("keydown",kn,!1),()=>{document.removeEventListener("keydown",kn)}},[ft,vn]),(0,N.useEffect)(()=>{let yt=Ee.current.instance;if(yt&&vn){let pt=W(Ce);Re.editor.setModelLanguage(yt.getModel(),pt)}},[Ce,vn]),(0,N.useEffect)(()=>{Ee.current.instance&&vn&&Re.editor.setTheme(Ne)},[Ne,vn]),(0,N.useEffect)(()=>{let yt=Ee.current.instance;Te.current=Se,yt&&vn&&(yt.updateOptions(Fe({},Se)),setTimeout(()=>{yt.getModel().updateOptions(Fe({},Se))},200))},[JSON.stringify(Se),vn]),(0,N.useEffect)(()=>{let yt=Ee.current.instance;yt&&vn&&yt.layout()},[$,G,vn]);const[Ve,Yt]=(0,N.useState)(pn($)),[Pt,An]=(0,N.useState)(pn(G)),un=kt(Fe({},we),{width:Ve,height:Pt,position:"relative"});return N.createElement("div",{className:"my-monaco-editor",ref:ye,style:un},et&&N.createElement(V.CopyToClipboard,{text:te,onCopy:()=>Ae.ZP.success("\u590D\u5236\u6210\u529F")},N.createElement(Y.Z,{title:"\u590D\u5236\u4EE3\u7801"},N.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},N.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function R({width:k="100%",height:se="100%",original:$,modified:G,language:te,options:Ce={}}){const we=(0,N.useRef)(),[Se,Ie]=(0,N.useState)(null);function Ne(Kt){let Ct;return we.current&&(Ct=new ae.Z(vt=>{for(let en of vt)(en.target.offsetHeight>0||en.target.offsetWidth>0)&&Kt.layout()}),Ct.observe(we.current)),Ct}(0,N.useEffect)(()=>(we.current&&Promise.all([C.e(8909),C.e(9404)]).then(C.bind(C,2550)).then(Kt=>{Re=Kt;const Ct=Re.editor.createDiffEditor(we.current,kt(Fe({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ce),{wordWrap:!0}));Ie(Ct);let vt=Ne(Ct);return()=>{Ct.dispose();const en=Ct.getModel();en&&en.dispose(),vt.unobserve(we.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,N.useEffect)(()=>{Se&&Se.setModel({original:Re.editor.createModel($,te),modified:Re.editor.createModel(G,te)})},[$,G,te,Se]);const qe=pn(k),et=pn(se),ft={width:qe,height:et};return N.createElement("div",{className:"my-diff-editor",ref:we,style:ft})}},80119:function(Fn,st,C){"use strict";C.d(st,{H:function(){return ge}});var N=C(59301),ae=C(28284),ve=C(37568),le=C(42441),Q=C(76902);const h=({form:ie,index:A=1,field:B,ParentName:T=[]})=>{(typeof T=="string"||typeof T=="number")&&(T=[T]);const p=ae.default.useWatch([...T,B.name,"chart_1"],{form:ie}),v=ae.default.useWatch([...T,B.name,"chart_2"],{form:ie}),E=ae.default.useWatch([...T,B.name,"name"],{form:ie}),S=ae.default.useWatch([...T,B.name,"question_type"],{form:ie}),F=(0,N.useMemo)(()=>{const Z=[],b=[];return p==null||p.forEach(L=>{Z.push(L==null?void 0:L.x_axis),b.push(L==null?void 0:L.y_axis)}),{tooltip:{},grid:{left:"7%",right:"5%",bottom:"15%",top:"15%",containLabel:!0},xAxis:{type:"category",data:[...Z||[],[4,5,6,7,8].includes(S)?"\u5206\u6570\u533A\u95F4":"\u7B54\u5BF9\u9898\u6570\uFF08\u5355\u4F4D\uFF1A\u9898\uFF09"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:b,barMaxWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}},[p]),O=(0,N.useMemo)(()=>{const Z=[],b=[];return v==null||v.forEach(L=>{Z.push(L==null?void 0:L.x_axis),b.push(Math.round((L==null?void 0:L.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",containLabel:!0},xAxis:{type:"category",data:[...Z||[],"\u9898\u76EE"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0,formatter:(L,D)=>L!=="\u9898\u76EE"?`${D+1}
|
|
|
|
{subtext|${(L.length>6?L==null?void 0:L.slice(0,6):L).split("").join(`
|
|
`)}}`:L,rich:{subtext:{align:"center",color:"#666",lineHeight:15}}}},yAxis:{name:"\u5E73\u5747\u5F97\u5206",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:b,barMaxWidth:"40px",itemStyle:{color:"#2EC25B"},type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:"{c}%"}}]}},[v]);return N.createElement(N.Fragment,null,N.createElement("div",{className:"text-500 font14 mb10"},A,".",E),N.createElement(ae.default.Item,{name:[B.name,"content"]},N.createElement(ve.default.TextArea,{rows:3})),N.createElement("div",{className:"mt20"},N.createElement("div",{className:"font14 mb10"},"\u5B66\u5458\u7B54\u9898\u60C5\u51B5"),N.createElement(le.Z,{className:"bg-white",style:{border:"1px solid #EBEBEB"},option:F})),N.createElement("div",{className:"mt20"},N.createElement("div",{className:"font14 mb10"},"\u5404\u5C0F\u9898\u7B54\u9898\u60C5\u51B5"),N.createElement(le.Z,{className:"bg-white",style:{border:"1px solid #EBEBEB",height:331},option:O})))};st.Z=N.memo(h);const ge=N.memo(({form:ie,index:A=1,data:B})=>{const T=(0,N.useMemo)(()=>{var v;const E=[],S=[];return(v=B==null?void 0:B.chart_1)==null||v.forEach(F=>{E.push(F==null?void 0:F.x_axis),S.push(F==null?void 0:F.y_axis)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"15%",top:"20%",containLabel:!0},xAxis:{type:"category",data:[...E||[],[4,5,6,7,8].includes(B==null?void 0:B.question_type)?"\u5206\u6570\u533A\u95F4":"\u7B54\u5BF9\u9898\u6570\uFF08\u5355\u4F4D\uFF1A\u9898\uFF09"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:S,barMaxWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}},[B==null?void 0:B.chart_1]),p=(0,N.useMemo)(()=>{var v;const E=[],S=[];return(v=B==null?void 0:B.chart_2)==null||v.forEach(F=>{E.push(F==null?void 0:F.x_axis),S.push(Math.round((F==null?void 0:F.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",containLabel:!0},xAxis:{type:"category",data:[...E||[],"\u9898\u76EE"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0,formatter:(F,O)=>F!=="\u9898\u76EE"?`${O+1}
|
|
|
|
{subtext|${(F.length>6?F==null?void 0:F.slice(0,6):F).split("").join(`
|
|
`)}}`:F,rich:{subtext:{align:"center",color:"#666",lineHeight:15}}}},yAxis:{name:"\u5E73\u5747\u5F97\u5206",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:S,barMaxWidth:"40px",itemStyle:{color:"#2EC25B"},type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:"{c}%"}}]}},[B==null?void 0:B.chart_2]);return N.createElement("div",{className:"text-start pl10 pr10"},N.createElement("div",{className:"text-500 font14 mb10 c-black"},A,".",B==null?void 0:B.name),N.createElement("div",null,N.createElement(Q.Z,{className:"font14 c-grey-333",value:B==null?void 0:B.content})),N.createElement("div",{className:"mt20"},N.createElement(le.Z,{className:"bg-white",style:{background:"#F6F7F9"},option:T}),N.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",A*2-1,"\xA0\xA0",B==null?void 0:B.name,"\u7B54\u9898\u5F97\u5206\u60C5\u51B5\u5206\u5E03")),N.createElement("div",{className:"mt20"},N.createElement(le.Z,{className:"bg-white",style:{background:"#F6F7F9",height:331},option:p}),N.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",A*2,"\xA0\xA0",B==null?void 0:B.name,"\u5404\u5C0F\u9898\u5F97\u5206\u7387")))})},46799:function(Fn,st,C){"use strict";var N=C(45677),ae=C(81722),ve=C(45937),le=C(28284),Q=C(62957),h=C(99571),ge=C(29787),ie=C(62673),A=C(47889),B=C(77736),T=C(59301),p=C(25690),v=C(346),E=C(59301),S=(O,Z,b)=>new Promise((L,D)=>{var I=X=>{try{ce(b.next(X))}catch(q){D(q)}},re=X=>{try{ce(b.throw(X))}catch(q){D(q)}},ce=X=>X.done?L(X.value):Promise.resolve(X.value).then(I,re);ce((b=b.apply(O,Z)).next())});const F=({exercise:O,dispatch:Z})=>{var b,L,D,I;const re=(0,p.useParams)(),[ce]=(0,p.useSearchParams)(),X=ce.getAll("exercise_group_id").map(Qe=>Qe==="all"?Qe:Number(Qe)),{actionTabs:q}=O,[oe]=le.default.useForm(),[pe,_e]=(0,T.useState)(!1),j=(0,T.useRef)(null),[K,ee]=(0,T.useState)(!1),[,z,Ae,Y]=(0,ve.U)(ae.aU,{}),[y,_]=(0,T.useState)({}),V=()=>{Z({type:"exercise/setActionTabs",payload:{title:""}})},de=(Qe,ct)=>{p.history.push(`/classrooms/${re.coursesId}/exercise/${(re==null?void 0:re.categoryId)||(re==null?void 0:re.exerciseId)}/sumup?exam_summary_id=${(ct==null?void 0:ct.exam_summary_id)||""}&template=${Qe==null?void 0:Qe.exam_summary_template_id}&${Qe==null?void 0:Qe.exercise_group_id.map(Et=>`exercise_group_id=${Et}`).join("&")}`)},We=()=>S(void 0,null,function*(){var Qe,ct,Et,Mt,Ot;const Fe=yield Ae({id:(re==null?void 0:re.categoryId)||(re==null?void 0:re.exerciseId)});oe.setFieldsValue({exercise_group_id:q!=null&&q.isEdit&&X.length>0?X:["all",...((ct=(Qe=Fe==null?void 0:Fe.data)==null?void 0:Qe.course_groups)==null?void 0:ct.map(kt=>kt==null?void 0:kt.exercise_group_id))||[]],exam_summary_template_id:q!=null&&q.isEdit?Number(ce.get("template")):(Ot=(Mt=(Et=Fe==null?void 0:Fe.data)==null?void 0:Et.exam_summary_templates)==null?void 0:Mt[0])==null?void 0:Ot.id})});return(0,T.useEffect)(()=>{j.current&&j.current.scrollHeight>134&&ee(!0)},[j]),(0,T.useEffect)(()=>{(q==null?void 0:q.title)==="\u8003\u8BD5\u603B\u7ED3\u8BBE\u7F6E"?We():oe.resetFields()},[q==null?void 0:q.title]),E.createElement(E.Fragment,null,E.createElement(Q.default,{title:q.title,width:800,centered:!0,open:(q==null?void 0:q.title)==="\u8003\u8BD5\u603B\u7ED3\u8BBE\u7F6E",footer:E.createElement("div",{style:{textAlign:"center"}},E.createElement(h.ZP,{type:"primary",onClick:()=>{oe.submit()}},"\u603B\u7ED3\u62A5\u544A\u9884\u89C8")),onCancel:()=>{V()}},E.createElement(ge.Z,{spinning:z},E.createElement(le.default,{form:oe,onFinish:Qe=>S(void 0,null,function*(){var ct,Et;const Mt=(Et=(ct=Y==null?void 0:Y.data)==null?void 0:ct.exam_summaries)==null?void 0:Et.find(Ot=>(Ot==null?void 0:Ot.exam_summary_template_id)===Qe.exam_summary_template_id);if(Mt!=null&&Mt.exam_summary_id){const Ot=Q.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,closeIcon:E.createElement("i",{className:"iconfont icon-guanbi1 current",style:{fontSize:"10px"},onClick:Fe=>{Fe.preventDefault(),Fe.stopPropagation(),Ot.destroy()}}),closable:!0,content:"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u60A8\u6709\u4E00\u4EFD\u5DF2\u751F\u6210\u7684\u603B\u7ED3\u62A5\u544A\uFF0C\u91CD\u65B0\u751F\u6210\u64CD\u4F5C\u4F1A\u5C06\u60A8\u4E4B\u524D\u7684\u7F16\u8F91\u8BB0\u5F55\u91CD\u7F6E\u4E3A\u521D\u59CB\u72B6\u6001\u3002\u662F\u5426\u9700\u8981\u91CD\u65B0\u751F\u6210\uFF1F",onOk:()=>{de(Qe,Mt),V()},cancelText:"\u91CD\u65B0\u751F\u6210",okText:"\u67E5\u770B\u5DF2\u6709\u62A5\u544A",onCancel:()=>{de(Qe,{}),V()}});return}de(Qe,Mt),V()})},E.createElement("div",{ref:j,className:"mt5 flex flex-wrap gap-20px",style:{maxHeight:pe?"none":"134px",overflow:"hidden",transition:"max-height 0.3s ease",position:"relative"}},E.createElement(le.default.Item,{name:"exercise_group_id",label:"\u5206\u6790\u5BF9\u8C61",normalize:(Qe,ct=[],Et)=>{var Mt,Ot;let Fe=Qe;const kt=((Ot=(Mt=Y==null?void 0:Y.data)==null?void 0:Mt.course_groups)==null?void 0:Ot.map(sn=>sn==null?void 0:sn.exercise_group_id))||[];return!(ct!=null&&ct.includes("all"))&&(Qe.includes("all")||Qe.length===kt.length)?Fe=[...kt,"all"]:Qe.includes("all")&&Qe.length!==kt.length+1?Fe=Qe.filter(sn=>sn!=="all"):ct!=null&&ct.includes("all")&&!Qe.includes("all")&&(Fe=[]),Fe}},E.createElement(ie.default.Group,{options:[{label:"\u5168\u90E8",value:"all"},...((L=(b=Y==null?void 0:Y.data)==null?void 0:b.course_groups)==null?void 0:L.map(Qe=>({value:Qe==null?void 0:Qe.exercise_group_id,label:`${Qe==null?void 0:Qe.exercise_group_name}\uFF08${Qe==null?void 0:Qe.exercise_group_students}\uFF09`})))||[]]})),K&&E.createElement("div",{className:"current",style:{position:"absolute",bottom:24,right:0,lineHeight:"32px"},onClick:()=>_e(!pe)},pe?"\u6536\u8D77":"\u5C55\u5F00",E.createElement("i",{className:"iconfont icon-a-bianzu11 font12"}))),E.createElement(le.default.Item,{className:"mb0",name:"exam_summary_template_id",label:"\u5206\u6790\u6A21\u677F"},E.createElement(A.ZP.Group,null,E.createElement(B.Z,{className:"mt5",direction:"vertical"},(I=(D=Y==null?void 0:Y.data)==null?void 0:D.exam_summary_templates)==null?void 0:I.map((Qe,ct)=>E.createElement(A.ZP,{key:ct,value:Qe==null?void 0:Qe.id},`\u6A21\u677F${ct+1}-${Qe==null?void 0:Qe.name}`,E.createElement("a",{className:"ml5",onClick:()=>{var Et,Mt;_({url:v.Z.API_SERVER+((Et=Qe==null?void 0:Qe.attachment_info)==null?void 0:Et.url),file_type:(Mt=Qe==null?void 0:Qe.attachment_info)==null?void 0:Mt.file_type})}},"\u67E5\u770B"))))))))),E.createElement(N.Z,{close:!0,hasMask:!0,style:{zIndex:9999},data:y==null?void 0:y.url,type:y==null?void 0:y.file_type,onClose:()=>_({})}))};st.Z=(0,p.connect)(({exercise:O})=>({exercise:O}))(F)},82856:function(Fn,st,C){"use strict";C.r(st),C.d(st,{default:function(){return J}});var N=C(25690),ae=C(59301),ve=C(29787),le=C(91882),Q=C(99571),h=C(27812),ge=C(67921),ie=C(4958),A=C(51257),B=C(61186),T=C.n(B),p=C(33656),v=C.n(p),E=C(32162),S=C(80119),F=C(76902),O=C(42441),Z=C(54172),b=C(59301),L=Object.defineProperty,D=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,ce=(R,k,se)=>k in R?L(R,k,{enumerable:!0,configurable:!0,writable:!0,value:se}):R[k]=se,X=(R,k)=>{for(var se in k||(k={}))I.call(k,se)&&ce(R,se,k[se]);if(D)for(var se of D(k))re.call(k,se)&&ce(R,se,k[se]);return R};T().extend(v());const q=({items:R,labelClassName:k,labelStyle:se})=>b.createElement("div",{className:"flex flex-col text-start gap-8px"},R==null?void 0:R.map(($,G)=>b.createElement("div",{key:G,className:"flex item-center gap-20px"},$.label&&b.createElement("div",{className:`w-56px c-grey-666 ${k||""} ${($==null?void 0:$.labelClassName)||""}`,style:X(X({textAlignLast:"justify"},se||{}),($==null?void 0:$.labelStyle)||{})},$.label),($==null?void 0:$.children)&&b.createElement("div",null,$==null?void 0:$.children)))),oe=({exercise:R,dispatch:k})=>{var se,$,G,te,Ce,we,Se,Ie,Ne,qe,et,ft,Kt,Ct,vt,en,on,Vt,gn,Pn,Gt,mn,Ye,Ge,He,ne,fe,ye,Ee,Te,xt,Wt,nn,Cn,Wn,zn,vn,Dn,or,pr,rr,cr,Jn,kn,qn,vr,br,je,Ve,Yt,Pt,An,un,yt,pt,Lt,rn,dn,xn,dt,$t,Le,Xe,gt,_t,Qt,Xt,Rt,Jt,fn,bn;const{SumupDetail:nt}=R,cn="text-500 text-16px",_n=U=>U?" \u2713 ":b.createElement(b.Fragment,null,"\xA0\xA0\xA0\xA0");return b.createElement("section",{className:"flex flex-col item-center"},b.createElement("div",{className:"font30 mb40",style:{fontWeight:600}},(nt==null?void 0:nt.big_title)||"XXXX\u5927\u5B66\u672C\u79D1\u8BFE\u7A0B\u8003\u6838\u5C0F\u7ED3"),b.createElement("table",{className:"w-full native_table",border:1,style:{borderColor:"#dcdcdc"}},b.createElement("tr",null,b.createElement("td",{className:cn,width:160},"\u8BFE\u7A0B\u540D\u79F0"),b.createElement("td",{colSpan:4},(nt==null?void 0:nt.course_list_name)||""),b.createElement("td",{className:cn},"\u8BFE\u7A0B\u7F16\u53F7"),b.createElement("td",{colSpan:2},(nt==null?void 0:nt.course_number)||"")),b.createElement("tr",null,b.createElement("td",{className:cn},"\u5F00\u8BFE\u5355\u4F4D"),b.createElement("td",{colSpan:7},(nt==null?void 0:nt.school_name)||"")),b.createElement("tr",null,b.createElement("td",{className:cn},"\u8003\u6838\u5BF9\u8C61"),b.createElement("td",{colSpan:7},(nt==null?void 0:nt.course_group_names)||"")),b.createElement("tr",null,b.createElement("td",{className:cn},"\u7EC8\u7ED3\u6027\u8003\u6838\u65E5\u671F"),b.createElement("td",{width:145},(nt==null?void 0:nt.exercise_start_time)&&T()(nt==null?void 0:nt.exercise_start_time).format("YYYY\u5E74MM\u6708DD\u65E5")),b.createElement("td",{className:cn,width:145},"\u7EC8\u7ED3\u6027\u8003\u6838\u65F6\u95F4 "),b.createElement("td",{width:185},(nt==null?void 0:nt.exercise_time_slot)||""),b.createElement("td",{className:cn},"\u5E94\u8003\u4EBA\u6570"),b.createElement("td",null,nt!=null&&nt.candidate_num?`${nt==null?void 0:nt.candidate_num}\u4EBA`:""),b.createElement("td",{className:cn},"\u5B9E\u8003\u4EBA\u6570"),b.createElement("td",null,nt!=null&&nt.exam_num?`${nt==null?void 0:nt.exam_num}\u4EBA`:"")),b.createElement("tr",null,b.createElement("td",{className:cn},"\u8003\u6559\u5206\u79BB"),b.createElement("td",{colSpan:3},"\u662F\uFF08",_n(nt==null?void 0:nt.is_split_exam_teaching),"\uFF09 \u5426\uFF08",_n(!(nt!=null&&nt.is_split_exam_teaching)),"\uFF09"),b.createElement("td",{className:cn,width:110},"\u7EC8\u7ED3\u6027\u8003\u6838\u547D\u9898\u5F62\u5F0F"),b.createElement("td",{colSpan:3},"\u8BD5\u9898\u5E93\uFF08",_n((nt==null?void 0:nt.set_problem_mode)===E.gW.PROBLEM),"\uFF09 \u8BD5\u5377\u5E93\uFF08",_n((nt==null?void 0:nt.set_problem_mode)===E.gW.PAPER),"\uFF09 \u5176\u4ED6\uFF08",_n((nt==null?void 0:nt.set_problem_mode)===E.gW.OTHER),"\uFF09")),b.createElement("tr",null,b.createElement("td",{className:cn},"\u9605\u5377\u5F62\u5F0F"),b.createElement("td",{colSpan:7},"\u5355\u4EBA\u9605\u5377\uFF08",_n((nt==null?void 0:nt.review_paper_mode)===E.a2.SINGLE),"\uFF09 \u591A\u4EBA\u6D41\u6C34\u4F5C\u4E1A\u9605\u5377\uFF08",_n((nt==null?void 0:nt.review_paper_mode)===E.a2.MULTIPLEFLOW),"\uFF09 \u591A\u4EBA\u72EC\u7ACB\u9605\u5377\uFF08",_n((nt==null?void 0:nt.review_paper_mode)===E.a2.MULTIPLEFIXED),"\uFF09 \u5176\u4ED6\uFF08",_n((nt==null?void 0:nt.review_paper_mode)===E.a2.OTHER),"\uFF09")),b.createElement("tr",null,b.createElement("td",{className:cn},"\u7EC8\u7ED3\u6027\u8003\u6838\u8BD5\u9898\u7C7B\u578B\u53CA\u5176\u5206\u6570\u6BD4\u4F8B"),b.createElement("td",{colSpan:7},b.createElement("div",{className:"w-full flex flex-col gap-10px text-start font14"},((se=nt==null?void 0:nt.exercise_questions_info)==null?void 0:se.content)||"",b.createElement("br",null),(G=($=nt==null?void 0:nt.exercise_questions_info)==null?void 0:$.exercise_questions)==null?void 0:G.map((U,M)=>b.createElement("div",{key:M},M+1,"\u3001",U==null?void 0:U.name,U==null?void 0:U.count,"\u9053\uFF0C\u5171",U==null?void 0:U.score,"\u5206\uFF0C\u5360",Math.round((U==null?void 0:U.rate)*1e4)/100,"%"))))),b.createElement("tr",null,b.createElement("td",{className:cn,rowSpan:2},"\u7EC8\u7ED3\u6027\u8003\u6838\u5185\u5BB9\u5206\u6790"),b.createElement("td",{colSpan:7},b.createElement(q,{items:[{label:"\u8986\u76D6\u9762",children:b.createElement("span",null,"\u5BBD\uFF08",_n(((te=nt==null?void 0:nt.content_analysis)==null?void 0:te.coverage)==="wide"),"\uFF09 \u4E2D\uFF08",_n(((Ce=nt==null?void 0:nt.content_analysis)==null?void 0:Ce.coverage)==="medium"),"\uFF09 \u7A84\uFF08",_n(((we=nt==null?void 0:nt.content_analysis)==null?void 0:we.coverage)==="narrow"),"\uFF09")},{label:"\u96BE\u5EA6",children:b.createElement("span",null,"\u96BE\uFF08",_n(((Se=nt==null?void 0:nt.content_analysis)==null?void 0:Se.difficulty)==1),"\uFF09 \u8F83\u96BE\uFF08",_n(((Ie=nt==null?void 0:nt.content_analysis)==null?void 0:Ie.difficulty)==2),"\uFF09 \u4E2D\uFF08",_n(((Ne=nt==null?void 0:nt.content_analysis)==null?void 0:Ne.difficulty)==3),"\uFF09 \u8F83\u6613\uFF08",_n(((qe=nt==null?void 0:nt.content_analysis)==null?void 0:qe.difficulty)==4),"\uFF09 \u6613\uFF08",_n(((et=nt==null?void 0:nt.content_analysis)==null?void 0:et.difficulty)==5),"\uFF09")},{label:"\u9898\u91CF",children:b.createElement("span",null,">100\uFF08",_n(((ft=nt==null?void 0:nt.content_analysis)==null?void 0:ft.question_quantity)==1),"\uFF09 70-100\uFF08",_n(((Kt=nt==null?void 0:nt.content_analysis)==null?void 0:Kt.question_quantity)==2),"\uFF09 50-70\uFF08",_n(((Ct=nt==null?void 0:nt.content_analysis)==null?void 0:Ct.question_quantity)==3),"\uFF09 <50\uFF08",_n(((vt=nt==null?void 0:nt.content_analysis)==null?void 0:vt.question_quantity)==4),"\uFF09")},{label:"\u6709\u65E0\u9519\u8BEF",children:b.createElement("span",null,"\u6709\uFF08",_n((en=nt==null?void 0:nt.content_analysis)==null?void 0:en.is_wrong),"\uFF09 \u65E0\uFF08",_n(!((on=nt==null?void 0:nt.content_analysis)!=null&&on.is_wrong)),"\uFF09")}]}))),b.createElement("tr",null,b.createElement("td",{colSpan:7,style:{textAlign:"start"}},"\u6839\u636E\u5E73\u5747\u5206\u5224\u65AD\u96BE\u5EA6\uFF1A<65\uFF08\u96BE\uFF09,<70\uFF08\u8F83\u96BE\uFF09,70-80\uFF08\u4E2D\uFF09,>80(\u8F83\u6613)\uFF0C>85(\u6613)")),b.createElement("tr",null,b.createElement("td",{className:cn},"\u8003\u6838\u7EC4\u7EC7\u60C5\u51B5"),b.createElement("td",{colSpan:7},b.createElement(q,{items:[{label:"\u7EC4\u7EC7\u5F62\u5F0F",children:(Vt=nt==null?void 0:nt.organization_condition)==null?void 0:Vt.organization_mode},{label:"\u8003\u8BD5\u6279\u6B21",children:(gn=nt==null?void 0:nt.organization_condition)==null?void 0:gn.exam_count},{label:"\u8003\u8BD5\u5F62\u5F0F",children:(Pn=nt==null?void 0:nt.organization_condition)==null?void 0:Pn.exam_mode},{label:"\u8003\u8BD5\u7CFB\u7EDF",children:(Gt=nt==null?void 0:nt.organization_condition)==null?void 0:Gt.exam_system},{label:"\u662F\u5426\u5F00\u5377",children:(mn=nt==null?void 0:nt.organization_condition)!=null&&mn.is_open_exercise?"\u5F00\u5377\uFF0C\u5141\u8BB8\u643A\u5E26\u7EB8\u8D28\u6750\u6599\uFF0C\u4F46\u4E0D\u5141\u8BB8\u643A\u5E26\u4EFB\u4F55\u7535\u5B50\u8BBE\u5907":"\u95ED\u5377\uFF0C\u4E0D\u5141\u8BB8\u643A\u5E26\u7EB8\u8D28\u6750\u6599\u548C\u4EFB\u4F55\u7535\u5B50\u8BBE\u5907"},{labelStyle:{width:100},label:"\u662F\u5426\u4E3A\u5355\u4E00\u8BD5\u5377",children:(Ye=nt==null?void 0:nt.organization_condition)==null?void 0:Ye.is_single_exercise},{children:(Ge=nt==null?void 0:nt.organization_condition)==null?void 0:Ge.end_examine}]}))),b.createElement("tr",null,b.createElement("td",{className:cn,rowSpan:4},"\u8003\u6838\u6210\u7EE9\u5206\u5E03"),b.createElement("td",{colSpan:7},b.createElement("div",{className:"flex gap-40px item-center justify-center"},[{label:"\u6700\u9AD8",num:`${((He=nt==null?void 0:nt.score_distribution)==null?void 0:He.max_score)||0}\u5206`},{label:"\u6700\u4F4E",num:`${((ne=nt==null?void 0:nt.score_distribution)==null?void 0:ne.min_score)||0}\u5206`},{label:"\u5E73\u5747",num:`${((fe=nt==null?void 0:nt.score_distribution)==null?void 0:fe.average_score)||0}\u5206`},{label:"\u53CA\u683C\u7387",num:`${Math.round((((ye=nt==null?void 0:nt.score_distribution)==null?void 0:ye.rate)||0)*1e4)/100}%`}].map((U,M)=>b.createElement("span",{key:M,className:"c-grey-666"},U==null?void 0:U.label,b.createElement("span",{className:"ml10 c-black"},U==null?void 0:U.num)))))),b.createElement("tr",null,b.createElement("td",{colSpan:3},"\u4F18\u79C0\uFF08",((Te=(Ee=nt==null?void 0:nt.score_distribution)==null?void 0:Ee.best)==null?void 0:Te.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((Wt=(xt=nt==null?void 0:nt.score_distribution)==null?void 0:xt.best)==null?void 0:Wt.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((Cn=(nn=nt==null?void 0:nt.score_distribution)==null?void 0:nn.best)==null?void 0:Cn.rate)||0)*1e4)/100,"%"),b.createElement("td",{colSpan:4},"\u826F\u597D\uFF08",((zn=(Wn=nt==null?void 0:nt.score_distribution)==null?void 0:Wn.good)==null?void 0:zn.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((Dn=(vn=nt==null?void 0:nt.score_distribution)==null?void 0:vn.good)==null?void 0:Dn.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((pr=(or=nt==null?void 0:nt.score_distribution)==null?void 0:or.good)==null?void 0:pr.rate)||0)*1e4)/100,"%")),b.createElement("tr",null,b.createElement("td",{colSpan:3},"\u4E2D\u7B49\uFF08",((cr=(rr=nt==null?void 0:nt.score_distribution)==null?void 0:rr.middle)==null?void 0:cr.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((kn=(Jn=nt==null?void 0:nt.score_distribution)==null?void 0:Jn.middle)==null?void 0:kn.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((vr=(qn=nt==null?void 0:nt.score_distribution)==null?void 0:qn.middle)==null?void 0:vr.rate)||0)*1e4)/100,"%"),b.createElement("td",{colSpan:4},"\u53CA\u683C\uFF08",((je=(br=nt==null?void 0:nt.score_distribution)==null?void 0:br.pass)==null?void 0:je.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((Yt=(Ve=nt==null?void 0:nt.score_distribution)==null?void 0:Ve.pass)==null?void 0:Yt.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((An=(Pt=nt==null?void 0:nt.score_distribution)==null?void 0:Pt.pass)==null?void 0:An.rate)||0)*1e4)/100,"%")),b.createElement("tr",null,b.createElement("td",{colSpan:7},"\u4E0D\u53CA\u683C\uFF08",((yt=(un=nt==null?void 0:nt.score_distribution)==null?void 0:un.fails)==null?void 0:yt.score_area)||0,"\u5206\uFF09\u4EBA\u6570\uFF1A",((Lt=(pt=nt==null?void 0:nt.score_distribution)==null?void 0:pt.fails)==null?void 0:Lt.people_count)||0,"\xA0\xA0 \u6BD4\u4F8B\uFF1A",Math.round((((dn=(rn=nt==null?void 0:nt.score_distribution)==null?void 0:rn.fails)==null?void 0:dn.rate)||0)*1e4)/100,"%")),b.createElement("tr",null,b.createElement("td",{className:cn},"\u7EC8\u7ED3\u6027\u8003\u6838\u5404\u7C7B\u9898\u578B\u5B66\u5458\u7B54\u9898\u60C5\u51B5\u5206\u6790"),b.createElement("td",{colSpan:7},b.createElement("div",{className:"flex flex-col gap-40px"},(dt=(xn=nt==null?void 0:nt.answer_analysis)==null?void 0:xn.exercise_questions)==null?void 0:dt.map((U,M)=>b.createElement(S.H,{key:M,data:U,index:M+1}))),b.createElement(F.Z,{className:"font14 c-grey-333 text-start mt20 pl10",value:(($t=nt==null?void 0:nt.answer_analysis)==null?void 0:$t.question_analysis)||""}))),b.createElement("tr",null,b.createElement("td",{className:cn},"\u5B66\u5458\u8003\u6838\u6210\u7EE9\u53CA\u5B66\u4E60\u60C5\u51B5\u5206\u6790"),b.createElement("td",{colSpan:7},b.createElement("div",{className:"pl10 pr10 text-start"},b.createElement(F.Z,{className:"font14 c-grey-333 text-start",value:((Le=nt==null?void 0:nt.condition_analysis)==null?void 0:Le.content)||""}),((Xe=nt==null?void 0:nt.condition_analysis)==null?void 0:Xe.chart_1)&&b.createElement("div",{className:"mt20"},b.createElement(O.Z,{style:{background:"#F6F7F9"},option:(()=>{var U,M;const he=[],Be=[];return(M=(U=nt==null?void 0:nt.condition_analysis)==null?void 0:U.chart_1)==null||M.forEach(Ze=>{he.push(Ze==null?void 0:Ze.x_axis),Be.push(Math.round((Ze==null?void 0:Ze.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"7%",right:"5%",bottom:"15%",top:"15%",containLabel:!0},xAxis:{type:"category",data:[...he||[],"\u5F97\u5206"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},yAxis:{name:"\u6BD4\u4F8B",nameTextStyle:{color:"#666"},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:Be,barWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}})()}),b.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",((((_t=(gt=nt==null?void 0:nt.answer_analysis)==null?void 0:gt.exercise_questions)==null?void 0:_t.length)||0)+1)*2-1,"\xA0\xA0\u7EC8\u7ED3\u6027\u8003\u6838\u7B54\u9898\u5F97\u5206\u60C5\u51B5\u5206\u5E03")),((Qt=nt==null?void 0:nt.condition_analysis)==null?void 0:Qt.chart_2)&&b.createElement("div",{className:"mt20"},b.createElement(Z.default,{dataSource:((Xt=nt==null?void 0:nt.condition_analysis)==null?void 0:Xt.chart_2)||[],columns:[{title:"\u4E13\u4E1A",dataIndex:"exercise_group_name",align:"center"},{title:"\u4EBA\u6570",dataIndex:"exercise_group_students",align:"center"},{title:"\u5E73\u5747\u5206",dataIndex:"average_score",align:"center"},{title:"\u6700\u9AD8\u5206",dataIndex:"max_score",align:"center"},{title:"\u6700\u4F4E\u5206",dataIndex:"min_score",align:"center"}],pagination:!1,bordered:!0}),b.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",((((Jt=(Rt=nt==null?void 0:nt.answer_analysis)==null?void 0:Rt.exercise_questions)==null?void 0:Jt.length)||0)+1)*2,"\xA0\xA0\u5404\u4E13\u4E1A\u8003\u7EC8\u7ED3\u6027\u8003\u8BD5\u6210\u7EE9\u5BF9\u6BD4")),b.createElement(F.Z,{className:"font14 c-grey-333 text-start mt20",value:((fn=nt==null?void 0:nt.condition_analysis)==null?void 0:fn.student_condition_analysis)||""})))),b.createElement("tr",null,b.createElement("td",{className:cn},"\u5B58\u5728\u7684\u95EE\u9898\u4EE5\u53CA\u6539\u8FDB\u610F\u89C1"),b.createElement("td",{colSpan:7},b.createElement(F.Z,{className:"font14 c-grey-333 text-start pr10 pl10",value:((bn=nt==null?void 0:nt.suggestion)==null?void 0:bn.suggestion_content)||""}))),b.createElement("tr",null,b.createElement("td",{colSpan:4,height:200},b.createElement("div",{className:"flex flex-col justify-between h-full"},b.createElement("div",{className:"text-start"},"\u4EFB\u8BFE\u6559\u5E08\uFF08\u7B7E\u540D\uFF09"),b.createElement("div",{className:"text-end"},"\u5E74\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u6708\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u65E5"))),b.createElement("td",{colSpan:4,height:200},b.createElement("div",{className:"flex flex-col justify-between h-full"},b.createElement("div",{className:"text-start"},"\u7CFB\uFF08\u6240\u3001\u5BA4\uFF09\u4E3B\u4EFB\uFF08\u7B7E\u540D\uFF09"),b.createElement("div",{className:"text-end"},"\u5E74\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u6708\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u65E5")))),b.createElement("tr",null,b.createElement("td",{colSpan:8},b.createElement("div",{className:"text-start"},"\u6CE8\uFF1A\u6BCF\u95E8\u8BFE\u7A0B\u5E94\u586B\u5199\u4E00\u4EFD\u8003\u6838\u5C0F\u7ED3\u3002")))))};var pe=(0,N.connect)(({exercise:R})=>({exercise:R}))(oe),_e=C(59301),j=Object.defineProperty,K=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,y=(R,k,se)=>k in R?j(R,k,{enumerable:!0,configurable:!0,writable:!0,value:se}):R[k]=se,_=(R,k)=>{for(var se in k||(k={}))Ae.call(k,se)&&y(R,se,k[se]);if(z)for(var se of z(k))Y.call(k,se)&&y(R,se,k[se]);return R},V=(R,k)=>K(R,ee(k));const de=({items:R,labelClassName:k,labelStyle:se})=>_e.createElement("div",{className:"flex flex-col text-start gap-8px"},R==null?void 0:R.map(($,G)=>_e.createElement("div",{key:G,className:"flex gap-20px"},$.label&&_e.createElement("div",{className:`w-56px c-grey-666 ${k||""} ${($==null?void 0:$.labelClassName)||""}`,style:_(_({whiteSpace:"nowrap",textAlignLast:"justify",lineHeight:"28px"},se||{}),($==null?void 0:$.labelStyle)||{})},$.label),($==null?void 0:$.children)&&_e.createElement("div",null,$==null?void 0:$.children)))),We=({data:R=[],ylabel:k="",xlabel:se="",className:$="",itemStyle:G={},formatter:te="{c}%"})=>{const Ce=(0,ae.useMemo)(()=>{const we=[],Se=[];return R==null||R.forEach(Ie=>{we.push(Ie==null?void 0:Ie.x_axis),Se.push(Ie==null?void 0:Ie.y_axis)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",top:"20%",containLabel:!0},xAxis:{type:"category",data:[...we||[],se],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:k,nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:Se,barMaxWidth:"40px",itemStyle:_({color:"#A2BEFF",borderColor:"#165DFF"},G),type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:te}}]}},[R]);return _e.createElement(O.Z,{className:$,style:{background:"#F6F7F9"},option:Ce})},Qe=({exercise:R,dispatch:k})=>{var se,$,G,te,Ce,we,Se,Ie,Ne,qe,et,ft,Kt,Ct,vt,en,on,Vt,gn,Pn,Gt,mn,Ye,Ge,He,ne,fe,ye,Ee,Te,xt,Wt,nn,Cn,Wn,zn,vn,Dn,or,pr,rr,cr,Jn,kn,qn,vr,br,je,Ve,Yt,Pt,An,un,yt,pt,Lt,rn,dn,xn;const{SumupDetail:dt}=R,$t="text-500 text-16px",Le=Xe=>Xe?" \u2713 ":_e.createElement(_e.Fragment,null,"\xA0\xA0\xA0\xA0");return _e.createElement("section",{className:"flex flex-col item-center"},_e.createElement("div",{className:"font30 mb20",style:{fontWeight:600}},(dt==null?void 0:dt.big_title)||"XXXX\u5927\u5B66\u8BFE\u7A0B\u8003\u6838\u8BD5\u5377\u5206\u6790\u8868"),_e.createElement("div",{className:"w-full",style:{textAlign:"end"}},dt==null?void 0:dt.teaching_semester),_e.createElement("table",{className:"w-full native_table",border:1,style:{borderColor:"#dcdcdc"}},_e.createElement("tr",null,_e.createElement("td",{className:$t,colSpan:2},"\u8BFE\u7A0B\u540D\u79F0"),_e.createElement("td",{colSpan:6},(dt==null?void 0:dt.course_list_name)||"")),_e.createElement("tr",null,_e.createElement("td",{className:$t,colSpan:2},"\u6559\u5B66\u73ED\u7EA7"),_e.createElement("td",{colSpan:6},(dt==null?void 0:dt.course_group_names)||"")),_e.createElement("tr",null,_e.createElement("td",{className:$t,colSpan:2},"\u4EFB\u8BFE\u6559\u5E08"),_e.createElement("td",null,(dt==null?void 0:dt.exercise_creator)||""),_e.createElement("td",{className:$t},"\u8003\u8BD5\u65B9\u5F0F"),_e.createElement("td",{colSpan:4},"\u7B14\u8BD5\uFF08",Le((dt==null?void 0:dt.exercise_type_number)===E.k.BISHI),"\uFF09 \u673A\u8BD5\uFF08",Le((dt==null?void 0:dt.exercise_type_number)===E.k.JISHI),"\uFF09 \u53E3\u8BD5\uFF08",Le((dt==null?void 0:dt.exercise_type_number)===E.k.KOUSHI),"\uFF09 \u5176\u4ED6\uFF08",Le((dt==null?void 0:dt.exercise_type_number)===E.k.OTHER),"\uFF09")),_e.createElement("tr",null,_e.createElement("td",{className:$t,rowSpan:5,width:80},"\u7EC8\u7ED3\u6027\u6210\u7EE9\u7EDF\u8BA1"),_e.createElement("td",{className:$t,rowSpan:4,width:80},"\u6210\u7EE9\u5206\u5E03"),_e.createElement("td",{className:$t,width:180},"\u6700\u9AD8\u5206"),_e.createElement("td",{width:180},(se=dt==null?void 0:dt.score_distribution)==null?void 0:se.max_score),_e.createElement("td",{className:$t},"\u6700\u4F4E\u5206"),_e.createElement("td",null,($=dt==null?void 0:dt.score_distribution)==null?void 0:$.min_score),_e.createElement("td",{className:$t},"\u5E73\u5747\u5206"),_e.createElement("td",null,(G=dt==null?void 0:dt.score_distribution)==null?void 0:G.average_score)),_e.createElement("tr",null,_e.createElement("td",{className:$t},"\u6210\u7EE9"),_e.createElement("td",null,(Ce=(te=dt==null?void 0:dt.score_distribution)==null?void 0:te.best)==null?void 0:Ce.score_area),_e.createElement("td",null,(Se=(we=dt==null?void 0:dt.score_distribution)==null?void 0:we.good)==null?void 0:Se.score_area),_e.createElement("td",null,(Ne=(Ie=dt==null?void 0:dt.score_distribution)==null?void 0:Ie.middle)==null?void 0:Ne.score_area),_e.createElement("td",null,(et=(qe=dt==null?void 0:dt.score_distribution)==null?void 0:qe.pass)==null?void 0:et.score_area),_e.createElement("td",null,(Kt=(ft=dt==null?void 0:dt.score_distribution)==null?void 0:ft.fails)==null?void 0:Kt.score_area,"\u4EE5\u4E0B")),_e.createElement("tr",null,_e.createElement("td",{className:$t},"\u4EBA\u6570"),_e.createElement("td",null,(vt=(Ct=dt==null?void 0:dt.score_distribution)==null?void 0:Ct.best)==null?void 0:vt.people_count),_e.createElement("td",null,(on=(en=dt==null?void 0:dt.score_distribution)==null?void 0:en.good)==null?void 0:on.people_count),_e.createElement("td",null,(gn=(Vt=dt==null?void 0:dt.score_distribution)==null?void 0:Vt.middle)==null?void 0:gn.people_count),_e.createElement("td",null,(Gt=(Pn=dt==null?void 0:dt.score_distribution)==null?void 0:Pn.pass)==null?void 0:Gt.people_count),_e.createElement("td",null,(Ye=(mn=dt==null?void 0:dt.score_distribution)==null?void 0:mn.fails)==null?void 0:Ye.people_count)),_e.createElement("tr",null,_e.createElement("td",{className:$t},"\u767E\u5206\u6BD4"),_e.createElement("td",null,Math.round((((He=(Ge=dt==null?void 0:dt.score_distribution)==null?void 0:Ge.best)==null?void 0:He.rate)||0)*1e4)/100,"%"),_e.createElement("td",null,Math.round((((fe=(ne=dt==null?void 0:dt.score_distribution)==null?void 0:ne.good)==null?void 0:fe.rate)||0)*1e4)/100,"%"),_e.createElement("td",null,Math.round((((Ee=(ye=dt==null?void 0:dt.score_distribution)==null?void 0:ye.middle)==null?void 0:Ee.rate)||0)*1e4)/100,"%"),_e.createElement("td",null,Math.round((((xt=(Te=dt==null?void 0:dt.score_distribution)==null?void 0:Te.pass)==null?void 0:xt.rate)||0)*1e4)/100,"%"),_e.createElement("td",null,Math.round((((nn=(Wt=dt==null?void 0:dt.score_distribution)==null?void 0:Wt.fails)==null?void 0:nn.rate)||0)*1e4)/100,"%")),_e.createElement("tr",null,_e.createElement("td",{colSpan:7},(dt==null?void 0:dt.score_distribution)&&_e.createElement(We,{data:[{x_axis:`<=${(Wn=(Cn=dt==null?void 0:dt.score_distribution)==null?void 0:Cn.fails)==null?void 0:Wn.score_area}`,y_axis:((vn=(zn=dt==null?void 0:dt.score_distribution)==null?void 0:zn.fails)==null?void 0:vn.people_count)||0},{x_axis:`${(or=(Dn=dt==null?void 0:dt.score_distribution)==null?void 0:Dn.pass)==null?void 0:or.score_area}`,y_axis:((rr=(pr=dt==null?void 0:dt.score_distribution)==null?void 0:pr.pass)==null?void 0:rr.people_count)||0},{x_axis:`${(Jn=(cr=dt==null?void 0:dt.score_distribution)==null?void 0:cr.middle)==null?void 0:Jn.score_area}`,y_axis:((qn=(kn=dt==null?void 0:dt.score_distribution)==null?void 0:kn.middle)==null?void 0:qn.people_count)||0},{x_axis:`${(br=(vr=dt==null?void 0:dt.score_distribution)==null?void 0:vr.good)==null?void 0:br.score_area}`,y_axis:((Ve=(je=dt==null?void 0:dt.score_distribution)==null?void 0:je.good)==null?void 0:Ve.people_count)||0},{x_axis:`${(Pt=(Yt=dt==null?void 0:dt.score_distribution)==null?void 0:Yt.best)==null?void 0:Pt.score_area}`,y_axis:((un=(An=dt==null?void 0:dt.score_distribution)==null?void 0:An.best)==null?void 0:un.people_count)||0}],ylabel:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",xlabel:"\u5206\u6570\u533A\u95F4",formatter:"{c}"}))),_e.createElement("tr",null,_e.createElement("td",{className:$t},"\u8BD5\u5377\uFF08\u6216\u8003\u6838\uFF09\u60C5\u51B5\u5206\u6790"),_e.createElement("td",{colSpan:7},_e.createElement("div",{className:"flex flex-col gap-20px pl10 pr10 text-start"},_e.createElement(F.Z,{className:"font14 c-grey-333",value:`${((yt=dt==null?void 0:dt.exercise_questions_info)==null?void 0:yt.exercise_questions_str)||""}
|
|
${((pt=dt==null?void 0:dt.exercise_questions_info)==null?void 0:pt.exercise_content)||""}`}),(rn=(Lt=dt==null?void 0:dt.exercise_questions_info)==null?void 0:Lt.exercise_questions)==null?void 0:rn.map((Xe,gt)=>{var _t,Qt,Xt;return _e.createElement("div",{key:gt},_e.createElement("div",{className:"text-500 c-black mb10 "},gt+1,"\u3001",Xe==null?void 0:Xe.name),_e.createElement(de,{items:(_t=Xe==null?void 0:Xe.items)==null?void 0:_t.map((Rt,Jt)=>{var fn,bn;return{label:`\u7B2C${Jt+1}\u9898`,labelClassName:"w-auto h-full",children:_e.createElement(_e.Fragment,null,_e.createElement(F.Z,{className:"font14 c-grey-333 text-start",value:(Rt==null?void 0:Rt.question_title)||""}),((fn=Rt==null?void 0:Rt.tag_discipline_names)==null?void 0:fn.length)>0&&_e.createElement("div",null,"\u8003\u70B9\uFF1A",(bn=Rt==null?void 0:Rt.tag_discipline_names)==null?void 0:bn.join("\u3001")))}})}),_e.createElement("div",{className:"text-500 c-black mb10 mt20"},"\u7EC8\u7ED3\u6027\u8003\u6838\u6210\u7EE9\u5206\u5E03\u56FE"),_e.createElement(We,{data:(Qt=Xe==null?void 0:Xe.chart_1)==null?void 0:Qt.map((Rt={},Jt)=>V(_({},Rt),{x_axis:Jt+1,y_axis:Math.round(Rt.y_axis*1e4)/100})),ylabel:"\u6B63\u786E\u7387",xlabel:"\u9898\u76EE"}),_e.createElement(We,{className:"mt10",data:(Xt=Xe==null?void 0:Xe.chart_2)==null?void 0:Xt.map((Rt={},Jt)=>V(_({},Rt),{x_axis:Jt+1,y_axis:Math.round(Rt.y_axis*1e4)/100})),ylabel:"\u5F97\u5206\u7387",xlabel:"\u9898\u76EE",itemStyle:{color:"#2EC25B",borderColor:"#2EC25B"}}),_e.createElement("div",{className:"text-500 c-black mb10 mt20"},"\u5177\u4F53\u5F97\u5206\u660E\u7EC6\u5982\u4E0B\u8868\u6240\u793A"),_e.createElement(Z.default,{className:"mb20",pagination:!1,dataSource:(Xe==null?void 0:Xe.chart_3)||[],bordered:!0,columns:[{title:"\u5E8F\u53F7",dataIndex:"question_number",align:"center"},{title:"\u7B54\u9898\u4EBA\u6570",dataIndex:"answer_users_count",align:"center"},{title:"0\u5206",dataIndex:"zero_score_number",align:"center"},{title:"\u90E8\u5206\u6B63\u786E\u4EBA\u6570",dataIndex:"part_score_number",align:"center"},{title:"\u6EE1\u5206\u4EBA\u6570",children:[{title:"\u4EBA\u6570",dataIndex:"full_score_number",align:"center"},{title:"\u5360\u6BD4",dataIndex:"full_score_rate",align:"center",render:Rt=>`${Math.round(Rt*1e4)/100}%`}]},{title:"\u5E73\u5747\u5206",dataIndex:"average_score",align:"center"}]}),_e.createElement(F.Z,{className:"font14 c-grey-333 text-start",value:(Xe==null?void 0:Xe.question_type_conent)||""}))}),_e.createElement(F.Z,{className:"font14 c-grey-333 text-start",value:((dn=dt==null?void 0:dt.condition_analysis)==null?void 0:dn.student_condition_analysis)||""})))),_e.createElement("tr",null,_e.createElement("td",{className:$t},"\u5B58\u5728\u7684\u95EE\u9898\u53CA\u6539\u8FDB\u63AA\u65BD"),_e.createElement("td",{colSpan:7},_e.createElement(F.Z,{className:"font14 c-grey-333 text-start pr10 pl10",value:((xn=dt==null?void 0:dt.suggestion)==null?void 0:xn.suggestion_content)||""}))),_e.createElement("tr",null,_e.createElement("td",{colSpan:4,height:200},_e.createElement("div",{className:"flex flex-col justify-between h-full"},_e.createElement("div",{className:"text-start"},"\u4EFB\u8BFE\u6559\u5E08\uFF08\u7B7E\u540D\uFF09"),_e.createElement("div",{className:"text-end"},"\u5E74\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u6708\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u65E5"))),_e.createElement("td",{colSpan:4,height:200},_e.createElement("div",{className:"flex flex-col justify-between h-full"},_e.createElement("div",{className:"text-start"},"\u7CFB\uFF08\u6240\u3001\u5BA4\uFF09\u4E3B\u4EFB\uFF08\u7B7E\u540D\uFF09"),_e.createElement("div",{className:"text-end"},"\u5E74\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u6708\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u65E5"))))),_e.createElement("div",{className:"p20 w-full"},"\u6CE8\uFF1A\u672C\u8868\u4E00\u5F0F\u4E09\u4EFD\uFF0C\u5206\u522B\u7531\u5F00\u8BFE\u5B66\u9662\u6559\u5B66\u79D1\u7814\uFF08\u6559\u52A1\uFF09\u5904\u3001\u5F00\u8BFE\u7CFB\uFF08\u6240\u3001\u5BA4\uFF09\u548C\u5B66\u5458\u7BA1\u7406\u5B66\u9662\u6559\u5B66\u79D1\u7814\uFF08\u6559\u52A1\uFF09\u5904\u5B58\u6863"))};var ct=(0,N.connect)(({exercise:R})=>({exercise:R}))(Qe),Et=C(46799),Mt=C(44164),Ot=C.n(Mt),Fe=C(45937),kt=C(81722),sn=C(59301),jt=Object.defineProperty,pn=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,xe=(R,k,se)=>k in R?jt(R,k,{enumerable:!0,configurable:!0,writable:!0,value:se}):R[k]=se,W=(R,k)=>{for(var se in k||(k={}))mt.call(k,se)&&xe(R,se,k[se]);if(pn)for(var se of pn(k))ke.call(k,se)&&xe(R,se,k[se]);return R},Re=(R,k,se)=>new Promise(($,G)=>{var te=Se=>{try{we(se.next(Se))}catch(Ie){G(Ie)}},Ce=Se=>{try{we(se.throw(Se))}catch(Ie){G(Ie)}},we=Se=>Se.done?$(Se.value):Promise.resolve(Se.value).then(te,Ce);we((se=se.apply(R,k)).next())});const $e=({user:R,exercise:k,dispatch:se})=>{var $;const G=(0,N.useParams)(),[te]=(0,N.useSearchParams)(),Ce=Number(te.get("template")||"1"),we=te.get("exam_summary_id")&&Number(te.get("exam_summary_id")),Se=te.getAll("exercise_group_id").map(on=>on==="all"?on:Number(on)),{userInfo:Ie}=R,{commonHeader:Ne,SumupDetail:qe}=k,[et,ft]=(0,ae.useState)(1),Kt=(0,ae.useRef)(null),[,Ct,vt]=(0,Fe.U)(kt.Ym,{}),en=()=>Re(void 0,null,function*(){var on;se({type:"exercise/getCommonHeader",payload:{categoryId:G==null?void 0:G.exerciseId}});const Vt=yield vt({exam_summary_template_id:Ce,exam_summary_id:we,id:(G==null?void 0:G.categoryId)||(G==null?void 0:G.exerciseId),exercise_group_id:Se.includes("all")?[]:Se});(Vt==null?void 0:Vt.status)===0&&(te.set("exam_summary_id",(on=Vt==null?void 0:Vt.data)==null?void 0:on.exam_summary_id),se({type:"exercise/save",payload:{SumupDetail:W({exercise_group_id:Se},Vt==null?void 0:Vt.data)}}))});return(0,ae.useEffect)(()=>{Ce&&ft(Ce||1),en()},[te]),sn.createElement(ve.Z,{spinning:Ct},sn.createElement("section",{className:"edu-container"},sn.createElement(le.Z,{className:"mt10",separator:">",items:[{title:($=Ie==null?void 0:Ie.course)==null?void 0:$.course_name,href:`/classrooms/${G.coursesId}/exercise`},{title:"\u5728\u7EBF\u8003\u8BD5",href:`/classrooms/${G.coursesId}/exercise`},{title:"\u8BD5\u5377\u8BE6\u60C5",href:`/classrooms/${G.coursesId}/exercise/${G==null?void 0:G.exerciseId}/detail`},{title:Ne==null?void 0:Ne.exercise_name}]}),sn.createElement("div",{className:"flex mt20 justify-between"},sn.createElement("div",{className:"flex item-center"},sn.createElement("a",{href:`/classrooms/${G.coursesId}/exercise/${G==null?void 0:G.exerciseId}/sumup?template=${et}`},sn.createElement(h.Z,{className:"font16 c-black",rev:void 0})),(0,A.vB)(Ne==null?void 0:Ne.exercise_status,Ne==null?void 0:Ne.appraise_label),sn.createElement("strong",{className:"font20 ml5"},Ne==null?void 0:Ne.exercise_name)),sn.createElement("div",{className:"flex gap-20px"},sn.createElement(Q.ZP,{icon:sn.createElement("i",{className:"iconfont icon-bianjizuoye"}),onClick:()=>{N.history.push(`/classrooms/${G==null?void 0:G.coursesId}/exercise/${G==null?void 0:G.exerciseId}/sumup/edit?${te.toString()}`)}},"\u7F16\u8F91"),sn.createElement(Q.ZP,{type:"primary",icon:sn.createElement(ge.Z,{rev:void 0}),onClick:()=>Re(void 0,null,function*(){yield Ot()().set({margin:10,image:{type:"jpeg",quality:.95},jsPDF:{unit:"pt",format:"a4",orientation:"landscape"},filename:`${qe==null?void 0:qe.big_title}.pdf`,html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1,scale:1,dpi:300},pagebreak:{mode:["avoid-all","css"]}}).from(Kt.current).save()})},"\u5BFC\u51FA"),sn.createElement(Q.ZP,{icon:sn.createElement(ie.Z,{rev:void 0}),onClick:()=>{se({type:"exercise/setActionTabs",payload:{title:"\u8003\u8BD5\u603B\u7ED3\u8BBE\u7F6E",isEdit:!0}})}},"\u5BFC\u51FA\u8BBE\u7F6E"))),sn.createElement("div",{className:"mt20 bg-white pt40 pb40 pr30 pl30"},sn.createElement("section",{ref:Kt,className:""},et===1&&sn.createElement(pe,null),et===2&&sn.createElement(ct,null))),sn.createElement(Et.Z,null)))};var J=(0,N.connect)(({user:R,exercise:k})=>({user:R,exercise:k}))($e)},45937:function(Fn,st,C){"use strict";C.d(st,{U:function(){return A}});var N=C(59301),ae=Object.defineProperty,ve=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,h=(B,T,p)=>T in B?ae(B,T,{enumerable:!0,configurable:!0,writable:!0,value:p}):B[T]=p,ge=(B,T)=>{for(var p in T||(T={}))le.call(T,p)&&h(B,p,T[p]);if(ve)for(var p of ve(T))Q.call(T,p)&&h(B,p,T[p]);return B},ie=(B,T,p)=>new Promise((v,E)=>{var S=Z=>{try{O(p.next(Z))}catch(b){E(b)}},F=Z=>{try{O(p.throw(Z))}catch(b){E(b)}},O=Z=>Z.done?v(Z.value):Promise.resolve(Z.value).then(S,F);O((p=p.apply(B,T)).next())});function A(B,T){const[p,v]=(0,N.useState)(T),[E,S]=(0,N.useState)(!1),[F,O]=(0,N.useState)();return[p,E,(b,L=!1)=>ie(this,null,function*(){const D=L?T:ge(ge({},p),b);S(!0),v(D);const I=yield B(D);return S(!1),O(I),I}),F,O]}},81428:function(Fn,st,C){"use strict";C.d(st,{AL:function(){return D},Iy:function(){return T},Qv:function(){return E},ez:function(){return L},jb:function(){return p}});var N=C(32834),ae=C.n(N),ve=C(11690),le=C.n(ve);let Q=1;function h(q,oe){const pe=q.match(/^(\s+)(?:```)/);if(pe===null)return oe;const _e=pe[1];return oe.split(`
|
|
`).map(j=>{const K=j.match(/^\s+/);if(K===null)return j;const[ee]=K;return ee.length>=_e.length?j.slice(_e.length):j}).join(`
|
|
`)}let ge=[],ie=["<ul>"];const A=new(ae()).Renderer,B=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function T(){ge.length=0,ie=["<ul>"]}const p={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function v(q,oe,pe,_e){if(oe>=q.length||q[oe].level<=pe)return oe;var j=q[oe];_e.push("<li><a href='#"+Q+j.anchor+"'>"+j.text+"</a>"),oe++;var K=[];return oe=v(q,oe,j.level,K),K.length>0&&(_e.push("<ul>"),K.forEach(function(ee){_e.push(ee)}),_e.push("</ul>")),_e.push("</li>"),oe=v(q,oe,pe,_e),oe}function E(){return v(ge,0,0,ie),ie.push("</ul>"),ie.join("")}const S={heading(q){const oe=B.exec(q);if(Q+=1,oe)return{type:"heading",raw:oe[0],depth:oe[1].length,text:oe[2]}},fences(q){const oe=this.rules.block.fences.exec(q);if(oe){const pe=oe[0];let _e=h(pe,oe[3]||"");const j=oe[2]?oe[2].trim():oe[2];if(["latex","katex","math"].indexOf(j)>=0){const K=Z(),ee=_e;_e=K,b[K]={type:"block",expression:ee}}return{type:"code",raw:pe,lang:j,text:_e}}}},F=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let O=0;const Z=()=>`__special_katext_id_${O++}__`;let b={};function L(){return b}function D(){O=0,b={}}function I(q){return q=q.replace(F,(oe,pe)=>{const _e=Z();return b[_e]={type:"inline",expression:pe},_e}),q}const re=A.listitem;A.listitem=function(q){return re(I(q))};const ce=A.paragraph;A.paragraph=function(q){return ce(I(q))};const X=A.tablecell;A.tablecell=function(q,oe){return X(I(q),oe)},A.code=function(q,oe,pe){const _e=(oe||"").match(/\S*/)[0];return _e?["latex","katex","math"].indexOf(_e)>=0?`<p class='editormd-tex'>${q}</p>`:`<pre class="prettyprint linenums"><code class="language-${oe}">${pe?q:(0,ve.escape)(q,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(pe?q:(0,ve.escape)(q,!0))+"</code></pre>"},A.heading=function(q,oe,pe){let _e=this.options.headerPrefix+pe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ge.push({anchor:_e,level:oe,text:q}),"<h"+oe+' id="'+Q+_e+'">'+q+"</h"+oe+">"},ae().setOptions({silent:!0,gfm:!0,pedantic:!1}),ae().use({tokenizer:S,renderer:A}),st.ZP=ae()},64018:function(){var Fn,st,C,N=!1,ae,ve;window.PR_SHOULD_USE_CONTINUATION=!0;var le,Q;(function(){var h=window,ge=["break,continue,do,else,for,if,return,while"],ie=[ge,"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"],A=[ie,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],B=[A,"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"],T=[A,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],p=[A,"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"],v="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",E=[A,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],S="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",F=[ge,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],O=[ge,"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"],Z=[ge,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],b=[B,p,T,E,S,F,O,Z],L=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,D="str",I="kwd",re="com",ce="typ",X="lit",q="pun",oe="pln",pe="tag",_e="dec",j="src",K="atn",ee="atv",z="nocode",Ae="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function Y(xe){for(var W=0,Re=!1,$e=!1,J=0,R=xe.length;J<R;++J){var k=xe[J];if(k.ignoreCase)$e=!0;else if(/[a-z]/i.test(k.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Re=!0,$e=!1;break}}var se={b:8,t:9,n:10,v:11,f:12,r:13};function $(Se){var Ie=Se.charCodeAt(0);if(Ie!==92)return Ie;var Ne=Se.charAt(1);return Ie=se[Ne],Ie||("0"<=Ne&&Ne<="7"?parseInt(Se.substring(1),8):Ne==="u"||Ne==="x"?parseInt(Se.substring(2),16):Se.charCodeAt(1))}function G(Se){if(Se<32)return(Se<16?"\\x0":"\\x")+Se.toString(16);var Ie=String.fromCharCode(Se);return Ie==="\\"||Ie==="-"||Ie==="]"||Ie==="^"?"\\"+Ie:Ie}function te(Se){var Ie=Se.substring(1,Se.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")),Ne=[],qe=Ie[0]==="^",et=["["];qe&&et.push("^");for(var ft=qe?1:0,Kt=Ie.length;ft<Kt;++ft){var Ct=Ie[ft];if(/\\[bdsw]/i.test(Ct))et.push(Ct);else{var vt=$(Ct),en;ft+2<Kt&&Ie[ft+1]==="-"?(en=$(Ie[ft+2]),ft+=2):en=vt,Ne.push([vt,en]),en<65||vt>122||(en<65||vt>90||Ne.push([Math.max(65,vt)|32,Math.min(en,90)|32]),en<97||vt>122||Ne.push([Math.max(97,vt)&-33,Math.min(en,122)&-33]))}}Ne.sort(function(Pn,Gt){return Pn[0]-Gt[0]||Gt[1]-Pn[1]});for(var on=[],Vt=[],ft=0;ft<Ne.length;++ft){var gn=Ne[ft];gn[0]<=Vt[1]+1?Vt[1]=Math.max(Vt[1],gn[1]):on.push(Vt=gn)}for(var ft=0;ft<on.length;++ft){var gn=on[ft];et.push(G(gn[0])),gn[1]>gn[0]&&(gn[1]+1>gn[0]&&et.push("-"),et.push(G(gn[1])))}return et.push("]"),et.join("")}function Ce(Se){for(var Ie=Se.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")),Ne=Ie.length,qe=[],et=0,ft=0;et<Ne;++et){var Kt=Ie[et];if(Kt==="(")++ft;else if(Kt.charAt(0)==="\\"){var Ct=+Kt.substring(1);Ct&&(Ct<=ft?qe[Ct]=-1:Ie[et]=G(Ct))}}for(var et=1;et<qe.length;++et)qe[et]===-1&&(qe[et]=++W);for(var et=0,ft=0;et<Ne;++et){var Kt=Ie[et];if(Kt==="(")++ft,qe[ft]||(Ie[et]="(?:");else if(Kt.charAt(0)==="\\"){var Ct=+Kt.substring(1);Ct&&Ct<=ft&&(Ie[et]="\\"+qe[Ct])}}for(var et=0;et<Ne;++et)Ie[et]==="^"&&Ie[et+1]!=="^"&&(Ie[et]="");if(Se.ignoreCase&&Re)for(var et=0;et<Ne;++et){var Kt=Ie[et],vt=Kt.charAt(0);Kt.length>=2&&vt==="["?Ie[et]=te(Kt):vt!=="\\"&&(Ie[et]=Kt.replace(/[a-zA-Z]/g,function(Vt){var gn=Vt.charCodeAt(0);return"["+String.fromCharCode(gn&-33,gn|32)+"]"}))}return Ie.join("")}for(var we=[],J=0,R=xe.length;J<R;++J){var k=xe[J];if(k.global||k.multiline)throw new Error(""+k);we.push("(?:"+Ce(k)+")")}return new RegExp(we.join("|"),$e?"gi":"g")}function y(xe,W){var Re=/(?:^|\s)nocode(?:\s|$)/,$e=[],J=0,R=[],k=0;function se($){var G=$.nodeType;if(G==1){if(Re.test($.className))return;for(var te=$.firstChild;te;te=te.nextSibling)se(te);var Ce=$.nodeName.toLowerCase();(Ce==="br"||Ce==="li")&&($e[k]=`
|
|
`,R[k<<1]=J++,R[k++<<1|1]=$)}else if(G==3||G==4){var we=$.nodeValue;we.length&&(W?we=we.replace(/\r\n?/g,`
|
|
`):we=we.replace(/[ \t\r\n]+/g," "),$e[k]=we,R[k<<1]=J,J+=we.length,R[k++<<1|1]=$)}}return se(xe),{sourceCode:$e.join("").replace(/\n$/,""),spans:R}}function _(xe,W,Re,$e,J){if(Re){var R={sourceNode:xe,pre:1,langExtension:null,numberLines:null,sourceCode:Re,spans:null,basePos:W,decorations:null};$e(R),J.push.apply(J,R.decorations)}}var V=/\S/;function de(xe){for(var W=void 0,Re=xe.firstChild;Re;Re=Re.nextSibling){var $e=Re.nodeType;W=$e===1?W?xe:Re:$e===3&&V.test(Re.nodeValue)?xe:W}return W===xe?void 0:W}function We(xe,W){var Re={},$e;(function(){for(var k=xe.concat(W),se=[],$={},G=0,te=k.length;G<te;++G){var Ce=k[G],we=Ce[3];if(we)for(var Se=we.length;--Se>=0;)Re[we.charAt(Se)]=Ce;var Ie=Ce[1],Ne=""+Ie;$.hasOwnProperty(Ne)||(se.push(Ie),$[Ne]=null)}se.push(/[\0-\uffff]/),$e=Y(se)})();var J=W.length,R=function(k){for(var se=k.sourceCode,$=k.basePos,G=k.sourceNode,te=[$,oe],Ce=0,we=se.match($e)||[],Se={},Ie=0,Ne=we.length;Ie<Ne;++Ie){var qe=we[Ie],et=Se[qe],ft=void 0,Kt;if(typeof et=="string")Kt=!1;else{var Ct=Re[qe.charAt(0)];if(Ct)ft=qe.match(Ct[1]),et=Ct[0];else{for(var vt=0;vt<J;++vt)if(Ct=W[vt],ft=qe.match(Ct[1]),ft){et=Ct[0];break}ft||(et=oe)}Kt=et.length>=5&&et.substring(0,5)==="lang-",Kt&&!(ft&&typeof ft[1]=="string")&&(Kt=!1,et=j),Kt||(Se[qe]=et)}var en=Ce;if(Ce+=qe.length,!Kt)te.push($+en,et);else{var on=ft[1],Vt=qe.indexOf(on),gn=Vt+on.length;ft[2]&&(gn=qe.length-ft[2].length,Vt=gn-on.length);var Pn=et.substring(5);_(G,$+en,qe.substring(0,Vt),R,te),_(G,$+en+Vt,on,kt(Pn,on),te),_(G,$+en+gn,qe.substring(gn),R,te)}}k.decorations=te};return R}function Qe(xe){var W=[],Re=[];xe.tripleQuotedStrings?W.push([D,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):xe.multiLineStrings?W.push([D,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):W.push([D,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),xe.verbatimStrings&&Re.push([D,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $e=xe.hashComments;$e&&(xe.cStyleComments?($e>1?W.push([re,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):W.push([re,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Re.push([D,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):W.push([re,/^#[^\r\n]*/,null,"#"])),xe.cStyleComments&&(Re.push([re,/^\/\/[^\r\n]*/,null]),Re.push([re,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var J=xe.regexLiterals;if(J){var R=J>1?"":`
|
|
\r`,k=R?".":"[\\S\\s]",se="/(?=[^/*"+R+"])(?:[^/\\x5B\\x5C"+R+"]|\\x5C"+k+"|\\x5B(?:[^\\x5C\\x5D"+R+"]|\\x5C"+k+")*(?:\\x5D|$))+/";Re.push(["lang-regex",RegExp("^"+Ae+"("+se+")")])}var $=xe.types;$&&Re.push([ce,$]);var G=(""+xe.keywords).replace(/^ | $/g,"");G.length&&Re.push([I,new RegExp("^(?:"+G.replace(/[\s,]+/g,"|")+")\\b"),null]),W.push([oe,/^\s+/,null,` \r
|
|
\xA0`]);var te="^.[^\\s\\w.$@'\"`/\\\\]*";return xe.regexLiterals&&(te+="(?!s*/)"),Re.push([X,/^@[a-z_$][a-z_$@0-9]*/i,null],[ce,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[oe,/^[a-z_$][a-z_$@0-9]*/i,null],[X,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[oe,/^\\[\s\S]?/,null],[q,new RegExp(te),null]),We(W,Re)}var ct=Qe({keywords:b,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Et(xe,W,Re){for(var $e=/(?:^|\s)nocode(?:\s|$)/,J=/\r\n?|\n/,R=xe.ownerDocument,k=R.createElement("li");xe.firstChild;)k.appendChild(xe.firstChild);var se=[k];function $(Ie){var Ne=Ie.nodeType;if(Ne==1&&!$e.test(Ie.className))if(Ie.nodeName==="br")G(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var qe=Ie.firstChild;qe;qe=qe.nextSibling)$(qe);else if((Ne==3||Ne==4)&&Re){var et=Ie.nodeValue,ft=et.match(J);if(ft){var Kt=et.substring(0,ft.index);Ie.nodeValue=Kt;var Ct=et.substring(ft.index+ft[0].length);if(Ct){var vt=Ie.parentNode;vt.insertBefore(R.createTextNode(Ct),Ie.nextSibling)}G(Ie),Kt||Ie.parentNode.removeChild(Ie)}}}function G(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function Ne(ft,Kt){var Ct=Kt?ft.cloneNode(!1):ft,vt=ft.parentNode;if(vt){var en=Ne(vt,1),on=ft.nextSibling;en.appendChild(Ct);for(var Vt=on;Vt;Vt=on)on=Vt.nextSibling,en.appendChild(Vt)}return Ct}for(var qe=Ne(Ie.nextSibling,0),et;(et=qe.parentNode)&&et.nodeType===1;)qe=et;se.push(qe)}for(var te=0;te<se.length;++te)$(se[te]);W===(W|0)&&se[0].setAttribute("value",W);var Ce=R.createElement("ol");Ce.className="linenums";for(var we=Math.max(0,W-1|0)||0,te=0,Se=se.length;te<Se;++te)k=se[te],k.className="L"+(te+we)%10,k.firstChild||k.appendChild(R.createTextNode("\xA0")),Ce.appendChild(k);xe.appendChild(Ce)}function Mt(xe){var W=/\bMSIE\s(\d+)/.exec(navigator.userAgent);W=W&&+W[1]<=8;var Re=/\n/g,$e=xe.sourceCode,J=$e.length,R=0,k=xe.spans,se=k.length,$=0,G=xe.decorations,te=G.length,Ce=0;G[te]=J;var we,Se;for(Se=we=0;Se<te;)G[Se]!==G[Se+2]?(G[we++]=G[Se++],G[we++]=G[Se++]):Se+=2;for(te=we,Se=we=0;Se<te;){for(var Ie=G[Se],Ne=G[Se+1],qe=Se+2;qe+2<=te&&G[qe+1]===Ne;)qe+=2;G[we++]=Ie,G[we++]=Ne,Se=qe}te=G.length=we;var et=xe.sourceNode,ft="";et&&(ft=et.style.display,et.style.display="none");try{for(var Kt=null;$<se;){var Ct=k[$],vt=k[$+2]||J,en=G[Ce+2]||J,qe=Math.min(vt,en),on=k[$+1],Vt;if(on.nodeType!==1&&(Vt=$e.substring(R,qe))){W&&(Vt=Vt.replace(Re,"\r")),on.nodeValue=Vt;var gn=on.ownerDocument,Pn=gn.createElement("span");Pn.className=G[Ce+1];var Gt=on.parentNode;Gt.replaceChild(Pn,on),Pn.appendChild(on),R<vt&&(k[$+1]=on=gn.createTextNode($e.substring(qe,vt)),Gt.insertBefore(on,Pn.nextSibling))}R=qe,R>=vt&&($+=2),R>=en&&(Ce+=2)}}finally{et&&(et.style.display=ft)}}var Ot={};function Fe(xe,W){for(var Re=W.length;--Re>=0;){var $e=W[Re];Ot.hasOwnProperty($e)?h.console&&console.warn("cannot override language handler %s",$e):Ot[$e]=xe}}function kt(xe,W){return xe&&Ot.hasOwnProperty(xe)||(xe=/^\s*</.test(W)?"default-markup":"default-code"),Ot[xe]}Fe(ct,["default-code"]),Fe(We([],[[oe,/^[^<?]+/],[_e,/^<!\w[^>]*(?:>|$)/],[re,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[q,/^(?:<[%?]|[%?]>)/],["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"]),Fe(We([[oe,/^[\s]+/,null,` \r
|
|
`],[ee,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[pe,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[K,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[q,/^[=<>\/]+/],["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"]),Fe(We([],[[ee,/^[\s\S]+/]]),["uq.val"]),Fe(Qe({keywords:B,hashComments:!0,cStyleComments:!0,types:L}),["c","cc","cpp","cxx","cyc","m"]),Fe(Qe({keywords:"null,true,false"}),["json"]),Fe(Qe({keywords:p,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:L}),["cs"]),Fe(Qe({keywords:T,cStyleComments:!0}),["java"]),Fe(Qe({keywords:Z,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Fe(Qe({keywords:F,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Fe(Qe({keywords:S,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Fe(Qe({keywords:O,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Fe(Qe({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Fe(Qe({keywords:v,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Fe(We([],[[D,/^[\s\S]+/]]),["regex"]);function sn(xe){var W=xe.langExtension;try{var Re=y(xe.sourceNode,xe.pre),$e=Re.sourceCode;xe.sourceCode=$e,xe.spans=Re.spans,xe.basePos=0,kt(W,$e)(xe),Mt(xe)}catch(J){h.console&&console.log(J&&J.stack||J)}}function jt(xe,W,Re){var $e=Re||!1,J=W||null,R=document.createElement("div");R.innerHTML="<pre>"+xe+"</pre>",R=R.firstChild,$e&&Et(R,$e,!0);var k={langExtension:J,numberLines:$e,sourceNode:R,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return sn(k),R.innerHTML}function pn(xe,W){var Re=W||document.body,$e=Re.ownerDocument||document;function J(Ct){return Re.getElementsByTagName(Ct)}for(var R=[J("pre"),J("code"),J("xmp")],k=[],se=0;se<R.length;++se)for(var $=0,G=R[se].length;$<G;++$)k.push(R[se][$]);R=null;var te=Date;te.now||(te={now:function(){return+new Date}});var Ce=0,we=/\blang(?:uage)?-([\w.]+)(?!\S)/,Se=/\bprettyprint\b/,Ie=/\bprettyprinted\b/,Ne=/pre|xmp/i,qe=/^code$/i,et=/^(?:pre|code|xmp)$/i,ft={};function Kt(){for(var Ct=h.PR_SHOULD_USE_CONTINUATION?te.now()+250:1/0;Ce<k.length&&te.now()<Ct;Ce++){for(var vt=k[Ce],en=ft,on=vt;on=on.previousSibling;){var Vt=on.nodeType,gn=(Vt===7||Vt===8)&&on.nodeValue;if(gn?!/^\??prettify\b/.test(gn):Vt!==3||/\S/.test(on.nodeValue))break;if(gn){en={},gn.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Wt,nn,Cn){en[nn]=Cn});break}}var Pn=vt.className;if((en!==ft||Se.test(Pn))&&!Ie.test(Pn)){for(var Gt=!1,mn=vt.parentNode;mn;mn=mn.parentNode){var Ye=mn.tagName;if(et.test(Ye)&&mn.className&&Se.test(mn.className)){Gt=!0;break}}if(!Gt){vt.className+=" prettyprinted";var Ge=en.lang;if(!Ge){Ge=Pn.match(we);var He;!Ge&&(He=de(vt))&&qe.test(He.tagName)&&(Ge=He.className.match(we)),Ge&&(Ge=Ge[1])}var ne;if(Ne.test(vt.tagName))ne=1;else{var fe=vt.currentStyle,ye=$e.defaultView,Ee=fe?fe.whiteSpace:ye&&ye.getComputedStyle?ye.getComputedStyle(vt,null).getPropertyValue("white-space"):0;ne=Ee&&Ee.substring(0,3)==="pre"}var Te=en.linenums;(Te=Te==="true"||+Te)||(Te=Pn.match(/\blinenums\b(?::(\d+))?/),Te=Te?Te[1]&&Te[1].length?+Te[1]:!0:!1),Te&&Et(vt,Te,ne);var xt={langExtension:Ge,sourceNode:vt,numberLines:Te,pre:ne,sourceCode:null,basePos:null,spans:null,decorations:null};sn(xt)}}}Ce<k.length?h.setTimeout(Kt,250):typeof xe=="function"&&xe()}Kt()}var mt=h.PR={createSimpleLexer:We,registerLangHandler:Fe,sourceDecorator:Qe,PR_ATTRIB_NAME:K,PR_ATTRIB_VALUE:ee,PR_COMMENT:re,PR_DECLARATION:_e,PR_KEYWORD:I,PR_LITERAL:X,PR_NOCODE:z,PR_PLAIN:oe,PR_PUNCTUATION:q,PR_SOURCE:j,PR_STRING:D,PR_TAG:pe,PR_TYPE:ce,prettyPrintOne:N?h.prettyPrintOne=jt:le=jt,prettyPrint:Q=N?h.prettyPrint=pn:Q=pn},ke=h.define;typeof ke=="function"&&ke.amd&&ke("google-code-prettify",[],function(){return mt})})()},25769:function(Fn,st,C){"use strict";var N=C(98040),ae={"text/plain":"Text","text/html":"Url",default:"Text"},ve="Copy to clipboard: #{key}, Enter";function le(h){var ge=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return h.replace(/#{\s*key\s*}/g,ge)}function Q(h,ge){var ie,A,B,T,p,v,E=!1;ge||(ge={}),ie=ge.debug||!1;try{B=N(),T=document.createRange(),p=document.getSelection(),v=document.createElement("span"),v.textContent=h,v.ariaHidden="true",v.style.all="unset",v.style.position="fixed",v.style.top=0,v.style.clip="rect(0, 0, 0, 0)",v.style.whiteSpace="pre",v.style.webkitUserSelect="text",v.style.MozUserSelect="text",v.style.msUserSelect="text",v.style.userSelect="text",v.addEventListener("copy",function(F){if(F.stopPropagation(),ge.format)if(F.preventDefault(),typeof F.clipboardData=="undefined"){ie&&console.warn("unable to use e.clipboardData"),ie&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var O=ae[ge.format]||ae.default;window.clipboardData.setData(O,h)}else F.clipboardData.clearData(),F.clipboardData.setData(ge.format,h);ge.onCopy&&(F.preventDefault(),ge.onCopy(F.clipboardData))}),document.body.appendChild(v),T.selectNodeContents(v),p.addRange(T);var S=document.execCommand("copy");if(!S)throw new Error("copy command was unsuccessful");E=!0}catch(F){ie&&console.error("unable to copy using execCommand: ",F),ie&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(ge.format||"text",h),ge.onCopy&&ge.onCopy(window.clipboardData),E=!0}catch(O){ie&&console.error("unable to copy using clipboardData: ",O),ie&&console.error("falling back to prompt"),A=le("message"in ge?ge.message:ve),window.prompt(A,h)}}finally{p&&(typeof p.removeRange=="function"?p.removeRange(T):p.removeAllRanges()),v&&document.body.removeChild(v),B()}return E}Fn.exports=Q},97774:function(Fn,st,C){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.default=void 0;var N=Object.assign||function(F){for(var O=1;O<arguments.length;O++){var Z=arguments[O];for(var b in Z)Object.prototype.hasOwnProperty.call(Z,b)&&(F[b]=Z[b])}return F},ae=function(){function F(O,Z){for(var b=0;b<Z.length;b++){var L=Z[b];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(O,L.key,L)}}return function(O,Z,b){return Z&&F(O.prototype,Z),b&&F(O,b),O}}(),ve=C(59301),le=T(ve),Q=C(12708),h=T(Q),ge=C(53291),ie=T(ge),A=C(47242),B=C(65429);function T(F){return F&&F.__esModule?F:{default:F}}function p(F,O){if(!(F instanceof O))throw new TypeError("Cannot call a class as a function")}function v(F,O){if(!F)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:F}function E(F,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);F.prototype=Object.create(O&&O.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(F,O):F.__proto__=O)}var S=function(F){E(O,F);function O(Z){p(this,O);var b=v(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,Z));return b.getEchartsInstance=function(){return b.echartsLib.getInstanceByDom(b.echartsElement)||b.echartsLib.init(b.echartsElement,b.props.theme,b.props.opts)},b.dispose=function(){if(b.echartsElement){try{(0,A.clear)(b.echartsElement)}catch(L){console.warn(L)}b.echartsLib.dispose(b.echartsElement)}},b.rerender=function(){var L=b.props,D=L.onEvents,I=L.onChartReady,re=b.renderEchartDom();b.bindEvents(re,D||{}),typeof I=="function"&&b.props.onChartReady(re),b.echartsElement&&(0,A.bind)(b.echartsElement,function(){try{re.resize()}catch(ce){console.warn(ce)}})},b.bindEvents=function(L,D){var I=function(X,q){typeof X=="string"&&typeof q=="function"&&L.on(X,function(oe){q(oe,L)})};for(var re in D)Object.prototype.hasOwnProperty.call(D,re)&&I(re,D[re])},b.renderEchartDom=function(){var L=b.getEchartsInstance();return L.setOption(b.props.option,b.props.notMerge||!1,b.props.lazyUpdate||!1),b.props.showLoading?L.showLoading(b.props.loadingOption||null):L.hideLoading(),L},b.echartsLib=Z.echarts,b.echartsElement=null,b}return ae(O,[{key:"componentDidMount",value:function(){this.rerender()}},{key:"componentDidUpdate",value:function(b){if(!(typeof this.props.shouldSetOption=="function"&&!this.props.shouldSetOption(b,this.props))){if(!(0,ie.default)(b.theme,this.props.theme)||!(0,ie.default)(b.opts,this.props.opts)||!(0,ie.default)(b.onEvents,this.props.onEvents)){this.dispose(),this.rerender();return}var L=["option","notMerge","lazyUpdate","showLoading","loadingOption"];if(!(0,ie.default)((0,B.pick)(this.props,L),(0,B.pick)(b,L))){var D=this.renderEchartDom();if(!(0,ie.default)(b.style,this.props.style)||!(0,ie.default)(b.className,this.props.className))try{D.resize()}catch(I){console.warn(I)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var b=this,L=this.props,D=L.style,I=L.className,re=N({height:300},D);return le.default.createElement("div",{ref:function(X){b.echartsElement=X},style:re,className:"echarts-for-react "+I})}}]),O}(ve.Component);st.default=S,S.propTypes={option:h.default.object.isRequired,echarts:h.default.object,notMerge:h.default.bool,lazyUpdate:h.default.bool,style:h.default.object,className:h.default.string,theme:h.default.oneOfType([h.default.string,h.default.object]),onChartReady:h.default.func,showLoading:h.default.bool,loadingOption:h.default.object,onEvents:h.default.object,opts:h.default.shape({devicePixelRatio:h.default.number,renderer:h.default.oneOf(["canvas","svg"]),width:h.default.oneOfType([h.default.number,h.default.oneOf([null,void 0,"auto"])]),height:h.default.oneOfType([h.default.number,h.default.oneOf([null,void 0,"auto"])])}),shouldSetOption:h.default.func},S.defaultProps={echarts:{},notMerge:!1,lazyUpdate:!1,style:{},className:"",theme:null,onChartReady:function(){},showLoading:!1,loadingOption:null,onEvents:{},opts:{},shouldSetOption:function(){return!0}}},42441:function(Fn,st,C){"use strict";var N;N={value:!0},st.Z=void 0;var ae=C(76411),ve=h(ae),le=C(97774),Q=h(le);function h(T){return T&&T.__esModule?T:{default:T}}function ge(T,p){if(!(T instanceof p))throw new TypeError("Cannot call a class as a function")}function ie(T,p){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:T}function A(T,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);T.prototype=Object.create(p&&p.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(T,p):T.__proto__=p)}var B=function(T){A(p,T);function p(v){ge(this,p);var E=ie(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,v));return E.echartsLib=ve.default,E}return p}(Q.default);st.Z=B},65429:function(Fn,st){"use strict";Object.defineProperty(st,"__esModule",{value:!0});var C=st.pick=function(ae,ve){var le={};return ve.forEach(function(Q){le[Q]=ae[Q]}),le}},53291:function(Fn){"use strict";var st=Array.isArray,C=Object.keys,N=Object.prototype.hasOwnProperty;Fn.exports=function ae(ve,le){if(ve===le)return!0;if(ve&&le&&typeof ve=="object"&&typeof le=="object"){var Q=st(ve),h=st(le),ge,ie,A;if(Q&&h){if(ie=ve.length,ie!=le.length)return!1;for(ge=ie;ge--!==0;)if(!ae(ve[ge],le[ge]))return!1;return!0}if(Q!=h)return!1;var B=ve instanceof Date,T=le instanceof Date;if(B!=T)return!1;if(B&&T)return ve.getTime()==le.getTime();var p=ve instanceof RegExp,v=le instanceof RegExp;if(p!=v)return!1;if(p&&v)return ve.toString()==le.toString();var E=C(ve);if(ie=E.length,ie!==C(le).length)return!1;for(ge=ie;ge--!==0;)if(!N.call(le,E[ge]))return!1;for(ge=ie;ge--!==0;)if(A=E[ge],!ae(ve[A],le[A]))return!1;return!0}return ve!==ve&&le!==le}},6330:function(Fn,st,C){"use strict";C.d(st,{HT:function(){return rr},iZ:function(){return vn}});var N={},ae=function(U,M,he,Be,Ze){var ze=new Worker(N[M]||(N[M]=URL.createObjectURL(new Blob([U+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return ze.onmessage=function(ht){var wt=ht.data,zt=wt.$e$;if(zt){var St=new Error(zt[0]);St.code=zt[1],St.stack=zt[2],Ze(St,null)}else Ze(null,wt)},ze.postMessage(he,Be),ze},ve=Uint8Array,le=Uint16Array,Q=Int32Array,h=new ve([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ge=new ve([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ie=new ve([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),A=function(U,M){for(var he=new le(31),Be=0;Be<31;++Be)he[Be]=M+=1<<U[Be-1];for(var Ze=new Q(he[30]),Be=1;Be<30;++Be)for(var ze=he[Be];ze<he[Be+1];++ze)Ze[ze]=ze-he[Be]<<5|Be;return{b:he,r:Ze}},B=A(h,2),T=B.b,p=B.r;T[28]=258,p[258]=28;for(var v=A(ge,0),E=v.b,S=v.r,F=new le(32768),O=0;O<32768;++O){var Z=(O&43690)>>1|(O&21845)<<1;Z=(Z&52428)>>2|(Z&13107)<<2,Z=(Z&61680)>>4|(Z&3855)<<4,F[O]=((Z&65280)>>8|(Z&255)<<8)>>1}for(var b=function(U,M,he){for(var Be=U.length,Ze=0,ze=new le(M);Ze<Be;++Ze)U[Ze]&&++ze[U[Ze]-1];var ht=new le(M);for(Ze=1;Ze<M;++Ze)ht[Ze]=ht[Ze-1]+ze[Ze-1]<<1;var wt;if(he){wt=new le(1<<M);var zt=15-M;for(Ze=0;Ze<Be;++Ze)if(U[Ze])for(var St=Ze<<4|U[Ze],Tt=M-U[Ze],tn=ht[U[Ze]-1]++<<Tt,ue=tn|(1<<Tt)-1;tn<=ue;++tn)wt[F[tn]>>zt]=St}else for(wt=new le(Be),Ze=0;Ze<Be;++Ze)U[Ze]&&(wt[Ze]=F[ht[U[Ze]-1]++]>>15-U[Ze]);return wt},L=new ve(288),O=0;O<144;++O)L[O]=8;for(var O=144;O<256;++O)L[O]=9;for(var O=256;O<280;++O)L[O]=7;for(var O=280;O<288;++O)L[O]=8;for(var D=new ve(32),O=0;O<32;++O)D[O]=5;var I=b(L,9,0),re=b(L,9,1),ce=b(D,5,0),X=b(D,5,1),q=function(U){for(var M=U[0],he=1;he<U.length;++he)U[he]>M&&(M=U[he]);return M},oe=function(U,M,he){var Be=M/8|0;return(U[Be]|U[Be+1]<<8)>>(M&7)&he},pe=function(U,M){var he=M/8|0;return(U[he]|U[he+1]<<8|U[he+2]<<16)>>(M&7)},_e=function(U){return(U+7)/8|0},j=function(U,M,he){return(M==null||M<0)&&(M=0),(he==null||he>U.length)&&(he=U.length),new ve(U.subarray(M,he))},K={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},ee=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],z=function(U,M,he){var Be=new Error(M||ee[U]);if(Be.code=U,Error.captureStackTrace&&Error.captureStackTrace(Be,z),!he)throw Be;return Be},Ae=function(U,M,he,Be){var Ze=U.length,ze=Be?Be.length:0;if(!Ze||M.f&&!M.l)return he||new ve(0);var ht=!he,wt=ht||M.i!=2,zt=M.i;ht&&(he=new ve(Ze*3));var St=function(fr){var dr=he.length;if(fr>dr){var kr=new ve(Math.max(dr*2,fr));kr.set(he),he=kr}},Tt=M.f||0,tn=M.p||0,ue=M.b||0,Oe=M.l,Pe=M.d,Me=M.m,Je=M.n,ut=Ze*8;do{if(!Oe){Tt=oe(U,tn,1);var It=oe(U,tn+1,3);if(tn+=3,It)if(It==1)Oe=re,Pe=X,Me=9,Je=5;else if(It==2){var tt=oe(U,tn,31)+257,at=oe(U,tn+10,15)+4,it=tt+oe(U,tn+5,31)+1;tn+=14;for(var At=new ve(it),Ht=new ve(19),qt=0;qt<at;++qt)Ht[ie[qt]]=oe(U,tn+qt*3,7);tn+=at*3;for(var an=q(Ht),Sn=(1<<an)-1,Rn=b(Ht,an,1),qt=0;qt<it;){var yn=Rn[oe(U,tn,Sn)];tn+=yn&15;var Bt=yn>>4;if(Bt<16)At[qt++]=Bt;else{var On=0,hn=0;for(Bt==16?(hn=3+oe(U,tn,3),tn+=2,On=At[qt-1]):Bt==17?(hn=3+oe(U,tn,7),tn+=3):Bt==18&&(hn=11+oe(U,tn,127),tn+=7);hn--;)At[qt++]=On}}var Vn=At.subarray(0,tt),Mn=At.subarray(tt);Me=q(Vn),Je=q(Mn),Oe=b(Vn,Me,1),Pe=b(Mn,Je,1)}else z(1);else{var Bt=_e(tn)+4,lt=U[Bt-4]|U[Bt-3]<<8,Ke=Bt+lt;if(Ke>Ze){zt&&z(0);break}wt&&St(ue+lt),he.set(U.subarray(Bt,Ke),ue),M.b=ue+=lt,M.p=tn=Ke*8,M.f=Tt;continue}if(tn>ut){zt&&z(0);break}}wt&&St(ue+131072);for(var En=(1<<Me)-1,Hn=(1<<Je)-1,Gn=tn;;Gn=tn){var On=Oe[pe(U,tn)&En],er=On>>4;if(tn+=On&15,tn>ut){zt&&z(0);break}if(On||z(2),er<256)he[ue++]=er;else if(er==256){Gn=tn,Oe=null;break}else{var jn=er-254;if(er>264){var qt=er-257,$n=h[qt];jn=oe(U,tn,(1<<$n)-1)+T[qt],tn+=$n}var Nn=Pe[pe(U,tn)&Hn],In=Nn>>4;Nn||z(3),tn+=Nn&15;var Mn=E[In];if(In>3){var $n=ge[In];Mn+=pe(U,tn)&(1<<$n)-1,tn+=$n}if(tn>ut){zt&&z(0);break}wt&&St(ue+131072);var Bn=ue+jn;if(ue<Mn){var ir=ze-Mn,mr=Math.min(Mn,Bn);for(ir+ue<0&&z(3);ue<mr;++ue)he[ue]=Be[ir+ue]}for(;ue<Bn;++ue)he[ue]=he[ue-Mn]}}M.l=Oe,M.p=Gn,M.b=ue,M.f=Tt,Oe&&(Tt=1,M.m=Me,M.d=Pe,M.n=Je)}while(!Tt);return ue!=he.length&&ht?j(he,0,ue):he.subarray(0,ue)},Y=function(U,M,he){he<<=M&7;var Be=M/8|0;U[Be]|=he,U[Be+1]|=he>>8},y=function(U,M,he){he<<=M&7;var Be=M/8|0;U[Be]|=he,U[Be+1]|=he>>8,U[Be+2]|=he>>16},_=function(U,M){for(var he=[],Be=0;Be<U.length;++Be)U[Be]&&he.push({s:Be,f:U[Be]});var Ze=he.length,ze=he.slice();if(!Ze)return{t:Mt,l:0};if(Ze==1){var ht=new ve(he[0].s+1);return ht[he[0].s]=1,{t:ht,l:1}}he.sort(function(Ke,tt){return Ke.f-tt.f}),he.push({s:-1,f:25001});var wt=he[0],zt=he[1],St=0,Tt=1,tn=2;for(he[0]={s:-1,f:wt.f+zt.f,l:wt,r:zt};Tt!=Ze-1;)wt=he[he[St].f<he[tn].f?St++:tn++],zt=he[St!=Tt&&he[St].f<he[tn].f?St++:tn++],he[Tt++]={s:-1,f:wt.f+zt.f,l:wt,r:zt};for(var ue=ze[0].s,Be=1;Be<Ze;++Be)ze[Be].s>ue&&(ue=ze[Be].s);var Oe=new le(ue+1),Pe=V(he[Tt-1],Oe,0);if(Pe>M){var Be=0,Me=0,Je=Pe-M,ut=1<<Je;for(ze.sort(function(tt,at){return Oe[at.s]-Oe[tt.s]||tt.f-at.f});Be<Ze;++Be){var It=ze[Be].s;if(Oe[It]>M)Me+=ut-(1<<Pe-Oe[It]),Oe[It]=M;else break}for(Me>>=Je;Me>0;){var Bt=ze[Be].s;Oe[Bt]<M?Me-=1<<M-Oe[Bt]++-1:++Be}for(;Be>=0&&Me;--Be){var lt=ze[Be].s;Oe[lt]==M&&(--Oe[lt],++Me)}Pe=M}return{t:new ve(Oe),l:Pe}},V=function(U,M,he){return U.s==-1?Math.max(V(U.l,M,he+1),V(U.r,M,he+1)):M[U.s]=he},de=function(U){for(var M=U.length;M&&!U[--M];);for(var he=new le(++M),Be=0,Ze=U[0],ze=1,ht=function(zt){he[Be++]=zt},wt=1;wt<=M;++wt)if(U[wt]==Ze&&wt!=M)++ze;else{if(!Ze&&ze>2){for(;ze>138;ze-=138)ht(32754);ze>2&&(ht(ze>10?ze-11<<5|28690:ze-3<<5|12305),ze=0)}else if(ze>3){for(ht(Ze),--ze;ze>6;ze-=6)ht(8304);ze>2&&(ht(ze-3<<5|8208),ze=0)}for(;ze--;)ht(Ze);ze=1,Ze=U[wt]}return{c:he.subarray(0,Be),n:M}},We=function(U,M){for(var he=0,Be=0;Be<M.length;++Be)he+=U[Be]*M[Be];return he},Qe=function(U,M,he){var Be=he.length,Ze=_e(M+2);U[Ze]=Be&255,U[Ze+1]=Be>>8,U[Ze+2]=U[Ze]^255,U[Ze+3]=U[Ze+1]^255;for(var ze=0;ze<Be;++ze)U[Ze+ze+4]=he[ze];return(Ze+4+Be)*8},ct=function(U,M,he,Be,Ze,ze,ht,wt,zt,St,Tt){Y(M,Tt++,he),++Ze[256];for(var tn=_(Ze,15),ue=tn.t,Oe=tn.l,Pe=_(ze,15),Me=Pe.t,Je=Pe.l,ut=de(ue),It=ut.c,Bt=ut.n,lt=de(Me),Ke=lt.c,tt=lt.n,at=new le(19),it=0;it<It.length;++it)++at[It[it]&31];for(var it=0;it<Ke.length;++it)++at[Ke[it]&31];for(var At=_(at,7),Ht=At.t,qt=At.l,an=19;an>4&&!Ht[ie[an-1]];--an);var Sn=St+5<<3,Rn=We(Ze,L)+We(ze,D)+ht,yn=We(Ze,ue)+We(ze,Me)+ht+14+3*an+We(at,Ht)+2*at[16]+3*at[17]+7*at[18];if(zt>=0&&Sn<=Rn&&Sn<=yn)return Qe(M,Tt,U.subarray(zt,zt+St));var On,hn,Vn,Mn;if(Y(M,Tt,1+(yn<Rn)),Tt+=2,yn<Rn){On=b(ue,Oe,0),hn=ue,Vn=b(Me,Je,0),Mn=Me;var En=b(Ht,qt,0);Y(M,Tt,Bt-257),Y(M,Tt+5,tt-1),Y(M,Tt+10,an-4),Tt+=14;for(var it=0;it<an;++it)Y(M,Tt+3*it,Ht[ie[it]]);Tt+=3*an;for(var Hn=[It,Ke],Gn=0;Gn<2;++Gn)for(var er=Hn[Gn],it=0;it<er.length;++it){var jn=er[it]&31;Y(M,Tt,En[jn]),Tt+=Ht[jn],jn>15&&(Y(M,Tt,er[it]>>5&127),Tt+=er[it]>>12)}}else On=I,hn=L,Vn=ce,Mn=D;for(var it=0;it<wt;++it){var $n=Be[it];if($n>255){var jn=$n>>18&31;y(M,Tt,On[jn+257]),Tt+=hn[jn+257],jn>7&&(Y(M,Tt,$n>>23&31),Tt+=h[jn]);var Nn=$n&31;y(M,Tt,Vn[Nn]),Tt+=Mn[Nn],Nn>3&&(y(M,Tt,$n>>5&8191),Tt+=ge[Nn])}else y(M,Tt,On[$n]),Tt+=hn[$n]}return y(M,Tt,On[256]),Tt+hn[256]},Et=new Q([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Mt=new ve(0),Ot=function(U,M,he,Be,Ze,ze){var ht=ze.z||U.length,wt=new ve(Be+ht+5*(1+Math.ceil(ht/7e3))+Ze),zt=wt.subarray(Be,wt.length-Ze),St=ze.l,Tt=(ze.r||0)&7;if(M){Tt&&(zt[0]=ze.r>>3);for(var tn=Et[M-1],ue=tn>>13,Oe=tn&8191,Pe=(1<<he)-1,Me=ze.p||new le(32768),Je=ze.h||new le(Pe+1),ut=Math.ceil(he/3),It=2*ut,Bt=function(Wr){return(U[Wr]^U[Wr+1]<<ut^U[Wr+2]<<It)&Pe},lt=new Q(25e3),Ke=new le(288),tt=new le(32),at=0,it=0,At=ze.i||0,Ht=0,qt=ze.w||0,an=0;At+2<ht;++At){var Sn=Bt(At),Rn=At&32767,yn=Je[Sn];if(Me[Rn]=yn,Je[Sn]=Rn,qt<=At){var On=ht-At;if((at>7e3||Ht>24576)&&(On>423||!St)){Tt=ct(U,zt,0,lt,Ke,tt,it,Ht,an,At-an,Tt),Ht=at=it=0,an=At;for(var hn=0;hn<286;++hn)Ke[hn]=0;for(var hn=0;hn<30;++hn)tt[hn]=0}var Vn=2,Mn=0,En=Oe,Hn=Rn-yn&32767;if(On>2&&Sn==Bt(At-Hn))for(var Gn=Math.min(ue,On)-1,er=Math.min(32767,At),jn=Math.min(258,On);Hn<=er&&--En&&Rn!=yn;){if(U[At+Vn]==U[At+Vn-Hn]){for(var $n=0;$n<jn&&U[At+$n]==U[At+$n-Hn];++$n);if($n>Vn){if(Vn=$n,Mn=Hn,$n>Gn)break;for(var Nn=Math.min(Hn,$n-2),In=0,hn=0;hn<Nn;++hn){var Bn=At-Hn+hn&32767,ir=Me[Bn],mr=Bn-ir&32767;mr>In&&(In=mr,yn=Bn)}}}Rn=yn,yn=Me[Rn],Hn+=Rn-yn&32767}if(Mn){lt[Ht++]=268435456|p[Vn]<<18|S[Mn];var fr=p[Vn]&31,dr=S[Mn]&31;it+=h[fr]+ge[dr],++Ke[257+fr],++tt[dr],qt=At+Vn,++at}else lt[Ht++]=U[At],++Ke[U[At]]}}for(At=Math.max(At,qt);At<ht;++At)lt[Ht++]=U[At],++Ke[U[At]];Tt=ct(U,zt,St,lt,Ke,tt,it,Ht,an,At-an,Tt),St||(ze.r=Tt&7|zt[Tt/8|0]<<3,Tt-=7,ze.h=Je,ze.p=Me,ze.i=At,ze.w=qt)}else{for(var At=ze.w||0;At<ht+St;At+=65535){var kr=At+65535;kr>=ht&&(zt[Tt/8|0]=St,kr=ht),Tt=Qe(zt,Tt+1,U.subarray(At,kr))}ze.i=ht}return j(wt,0,Be+_e(Tt)+Ze)},Fe=null,kt=function(){var U=-1;return{p:function(M){for(var he=U,Be=0;Be<M.length;++Be)he=Fe[he&255^M[Be]]^he>>>8;U=he},d:function(){return~U}}},sn=function(){var U=1,M=0;return{p:function(he){for(var Be=U,Ze=M,ze=he.length|0,ht=0;ht!=ze;){for(var wt=Math.min(ht+2655,ze);ht<wt;++ht)Ze+=Be+=he[ht];Be=(Be&65535)+15*(Be>>16),Ze=(Ze&65535)+15*(Ze>>16)}U=Be,M=Ze},d:function(){return U%=65521,M%=65521,(U&255)<<24|(U&65280)<<8|(M&255)<<8|M>>8}}},jt=function(U,M,he,Be,Ze){if(!Ze&&(Ze={l:1},M.dictionary)){var ze=M.dictionary.subarray(-32768),ht=new ve(ze.length+U.length);ht.set(ze),ht.set(U,ze.length),U=ht,Ze.w=ze.length}return Ot(U,M.level==null?6:M.level,M.mem==null?Ze.l?Math.ceil(Math.max(8,Math.min(13,Math.log(U.length)))*1.5):20:12+M.mem,he,Be,Ze)},pn=function(U,M){var he={};for(var Be in U)he[Be]=U[Be];for(var Be in M)he[Be]=M[Be];return he},mt=function(U,M,he){for(var Be=U(),Ze=U.toString(),ze=Ze.slice(Ze.indexOf("[")+1,Ze.lastIndexOf("]")).replace(/\s+/g,"").split(","),ht=0;ht<Be.length;++ht){var wt=Be[ht],zt=ze[ht];if(typeof wt=="function"){M+=";"+zt+"=";var St=wt.toString();if(wt.prototype)if(St.indexOf("[native code]")!=-1){var Tt=St.indexOf(" ",8)+1;M+=St.slice(Tt,St.indexOf("(",Tt))}else{M+=St;for(var tn in wt.prototype)M+=";"+zt+".prototype."+tn+"="+wt.prototype[tn].toString()}else M+=St}else he[zt]=wt}return M},ke=null,xe=function(U){var M=[];for(var he in U)U[he].buffer&&M.push((U[he]=new U[he].constructor(U[he])).buffer);return M},W=function(U,M,he,Be){if(!ke[he]){for(var Ze="",ze={},ht=U.length-1,wt=0;wt<ht;++wt)Ze=mt(U[wt],Ze,ze);ke[he]={c:mt(U[ht],Ze,ze),e:ze}}var zt=pn({},ke[he].e);return ae(ke[he].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+M.toString()+"}",he,zt,xe(zt),Be)},Re=function(){return[ve,le,Q,h,ge,ie,T,E,re,X,F,ee,b,q,oe,pe,_e,j,z,Ae,He,$,G]},$e=function(){return[ve,le,Q,h,ge,ie,p,S,I,L,ce,D,F,Et,Mt,b,Y,y,_,V,de,We,Qe,ct,_e,j,Ot,jt,Gt,$]},J=function(){return[et,Ct,qe,kt,Fe]},R=function(){return[ft,Kt]},k=function(){return[vt,qe,sn]},se=function(){return[en]},$=function(U){return postMessage(U,[U.buffer])},G=function(U){return U&&{out:U.size&&new ve(U.size),dictionary:U.dictionary}},te=function(U,M,he,Be,Ze,ze){var ht=W(he,Be,Ze,function(wt,zt){ht.terminate(),ze(wt,zt)});return ht.postMessage([U,M],M.consume?[U.buffer]:[]),function(){ht.terminate()}},Ce=function(U){return U.ondata=function(M,he){return postMessage([M,he],[M.buffer])},function(M){M.data.length?(U.push(M.data[0],M.data[1]),postMessage([M.data[0].length])):U.flush()}},we=function(U,M,he,Be,Ze,ze,ht){var wt,zt=W(U,Be,Ze,function(St,Tt){St?(zt.terminate(),M.ondata.call(M,St)):Array.isArray(Tt)?Tt.length==1?(M.queuedSize-=Tt[0],M.ondrain&&M.ondrain(Tt[0])):(Tt[1]&&zt.terminate(),M.ondata.call(M,St,Tt[0],Tt[1])):ht(Tt)});zt.postMessage(he),M.queuedSize=0,M.push=function(St,Tt){M.ondata||z(5),wt&&M.ondata(z(4,0,1),null,!!Tt),M.queuedSize+=St.length,zt.postMessage([St,wt=Tt],[St.buffer])},M.terminate=function(){zt.terminate()},ze&&(M.flush=function(){zt.postMessage([])})},Se=function(U,M){return U[M]|U[M+1]<<8},Ie=function(U,M){return(U[M]|U[M+1]<<8|U[M+2]<<16|U[M+3]<<24)>>>0},Ne=function(U,M){return Ie(U,M)+Ie(U,M+4)*4294967296},qe=function(U,M,he){for(;he;++M)U[M]=he,he>>>=8},et=function(U,M){var he=M.filename;if(U[0]=31,U[1]=139,U[2]=8,U[8]=M.level<2?4:M.level==9?2:0,U[9]=3,M.mtime!=0&&qe(U,4,Math.floor(new Date(M.mtime||Date.now())/1e3)),he){U[3]=8;for(var Be=0;Be<=he.length;++Be)U[Be+10]=he.charCodeAt(Be)}},ft=function(U){(U[0]!=31||U[1]!=139||U[2]!=8)&&z(6,"invalid gzip data");var M=U[3],he=10;M&4&&(he+=(U[10]|U[11]<<8)+2);for(var Be=(M>>3&1)+(M>>4&1);Be>0;Be-=!U[he++]);return he+(M&2)},Kt=function(U){var M=U.length;return(U[M-4]|U[M-3]<<8|U[M-2]<<16|U[M-1]<<24)>>>0},Ct=function(U){return 10+(U.filename?U.filename.length+1:0)},vt=function(U,M){var he=M.level,Be=he==0?0:he<6?1:he==9?3:2;if(U[0]=120,U[1]=Be<<6|(M.dictionary&&32),U[1]|=31-(U[0]<<8|U[1])%31,M.dictionary){var Ze=sn();Ze.p(M.dictionary),qe(U,2,Ze.d())}},en=function(U,M){return((U[0]&15)!=8||U[0]>>4>7||(U[0]<<8|U[1])%31)&&z(6,"invalid zlib data"),(U[1]>>5&1)==+!M&&z(6,"invalid zlib data: "+(U[1]&32?"need":"unexpected")+" dictionary"),(U[1]>>3&4)+2};function on(U,M){return typeof U=="function"&&(M=U,U={}),this.ondata=M,U}var Vt=null,gn=null;function Pn(U,M,he){return he||(he=M,M={}),typeof he!="function"&&z(7),te(U,M,[$e],function(Be){return $(Gt(Be.data[0],Be.data[1]))},0,he)}function Gt(U,M){return jt(U,M||{},0,0)}var mn=null,Ye=null;function Ge(U,M,he){return he||(he=M,M={}),typeof he!="function"&&z(7),te(U,M,[Re],function(Be){return $(He(Be.data[0],G(Be.data[1])))},1,he)}function He(U,M){return Ae(U,{i:2},M&&M.out,M&&M.dictionary)}var ne=null,fe=null;function ye(U,M,he){return he||(he=M,M={}),typeof he!="function"&&z(7),te(U,M,[$e,J,function(){return[Ee]}],function(Be){return $(Ee(Be.data[0],Be.data[1]))},2,he)}function Ee(U,M){M||(M={});var he=kt(),Be=U.length;he.p(U);var Ze=jt(U,M,Ct(M),8),ze=Ze.length;return et(Ze,M),qe(Ze,ze-8,he.d()),qe(Ze,ze-4,Be),Ze}var Te=null,xt=null;function Wt(U,M,he){return he||(he=M,M={}),typeof he!="function"&&z(7),te(U,M,[Re,R,function(){return[nn]}],function(Be){return $(nn(Be.data[0],Be.data[1]))},3,he)}function nn(U,M){var he=ft(U);return he+8>U.length&&z(6,"invalid gzip data"),Ae(U.subarray(he,-8),{i:2},M&&M.out||new ve(Kt(U)),M&&M.dictionary)}var Cn=null,Wn=null;function zn(U,M,he){return he||(he=M,M={}),typeof he!="function"&&z(7),te(U,M,[$e,k,function(){return[vn]}],function(Be){return $(vn(Be.data[0],Be.data[1]))},4,he)}function vn(U,M){M||(M={});var he=sn();he.p(U);var Be=jt(U,M,M.dictionary?6:2,4);return vt(Be,M),qe(Be,Be.length-4,he.d()),Be}var Dn=null,or=null;function pr(U,M,he){return he||(he=M,M={}),typeof he!="function"&&z(7),te(U,M,[Re,se,function(){return[rr]}],function(Be){return $(rr(Be.data[0],G(Be.data[1])))},5,he)}function rr(U,M){return Ae(U.subarray(en(U,M&&M.dictionary),-4),{i:2},M&&M.out,M&&M.dictionary)}var cr=null,Jn=null;function kn(U,M,he){return he||(he=M,M={}),typeof he!="function"&&z(7),U[0]==31&&U[1]==139&&U[2]==8?Wt(U,M,he):(U[0]&15)!=8||U[0]>>4>7||(U[0]<<8|U[1])%31?Ge(U,M,he):pr(U,M,he)}function qn(U,M){return U[0]==31&&U[1]==139&&U[2]==8?nn(U,M):(U[0]&15)!=8||U[0]>>4>7||(U[0]<<8|U[1])%31?He(U,M):rr(U,M)}var vr=function(U,M,he,Be){for(var Ze in U){var ze=U[Ze],ht=M+Ze,wt=Be;Array.isArray(ze)&&(wt=pn(Be,ze[1]),ze=ze[0]),ze instanceof ve?he[ht]=[ze,wt]:(he[ht+="/"]=[new ve(0),wt],vr(ze,ht,he,Be))}},br=typeof TextEncoder!="undefined"&&new TextEncoder,je=typeof TextDecoder!="undefined"&&new TextDecoder,Ve=0;try{je.decode(Mt,{stream:!0}),Ve=1}catch(U){}var Yt=function(U){for(var M="",he=0;;){var Be=U[he++],Ze=(Be>127)+(Be>223)+(Be>239);if(he+Ze>U.length)return{s:M,r:j(U,he-1)};Ze?Ze==3?(Be=((Be&15)<<18|(U[he++]&63)<<12|(U[he++]&63)<<6|U[he++]&63)-65536,M+=String.fromCharCode(55296|Be>>10,56320|Be&1023)):Ze&1?M+=String.fromCharCode((Be&31)<<6|U[he++]&63):M+=String.fromCharCode((Be&15)<<12|(U[he++]&63)<<6|U[he++]&63):M+=String.fromCharCode(Be)}},Pt=null,An=null;function un(U,M){if(M){for(var he=new ve(U.length),Be=0;Be<U.length;++Be)he[Be]=U.charCodeAt(Be);return he}if(br)return br.encode(U);for(var Ze=U.length,ze=new ve(U.length+(U.length>>1)),ht=0,wt=function(Tt){ze[ht++]=Tt},Be=0;Be<Ze;++Be){if(ht+5>ze.length){var zt=new ve(ht+8+(Ze-Be<<1));zt.set(ze),ze=zt}var St=U.charCodeAt(Be);St<128||M?wt(St):St<2048?(wt(192|St>>6),wt(128|St&63)):St>55295&&St<57344?(St=65536+(St&1047552)|U.charCodeAt(++Be)&1023,wt(240|St>>18),wt(128|St>>12&63),wt(128|St>>6&63),wt(128|St&63)):(wt(224|St>>12),wt(128|St>>6&63),wt(128|St&63))}return j(ze,0,ht)}function yt(U,M){if(M){for(var he="",Be=0;Be<U.length;Be+=16384)he+=String.fromCharCode.apply(null,U.subarray(Be,Be+16384));return he}else{if(je)return je.decode(U);var Ze=Yt(U),ze=Ze.s,he=Ze.r;return he.length&&z(8),ze}}var pt=function(U){return U==1?3:U<6?2:U==9?1:0},Lt=function(U,M){return M+30+Se(U,M+26)+Se(U,M+28)},rn=function(U,M,he){var Be=Se(U,M+28),Ze=yt(U.subarray(M+46,M+46+Be),!(Se(U,M+8)&2048)),ze=M+46+Be,ht=Ie(U,M+20),wt=he&&ht==4294967295?dn(U,ze):[ht,Ie(U,M+24),Ie(U,M+42)],zt=wt[0],St=wt[1],Tt=wt[2];return[Se(U,M+10),zt,St,Ze,ze+Se(U,M+30)+Se(U,M+32),Tt]},dn=function(U,M){for(;Se(U,M)!=1;M+=4+Se(U,M+2));return[Ne(U,M+12),Ne(U,M+4),Ne(U,M+20)]},xn=function(U){var M=0;if(U)for(var he in U){var Be=U[he].length;Be>65535&&z(9),M+=Be+4}return M},dt=function(U,M,he,Be,Ze,ze,ht,wt){var zt=Be.length,St=he.extra,Tt=wt&&wt.length,tn=xn(St);qe(U,M,ht!=null?33639248:67324752),M+=4,ht!=null&&(U[M++]=20,U[M++]=he.os),U[M]=20,M+=2,U[M++]=he.flag<<1|(ze<0&&8),U[M++]=Ze&&8,U[M++]=he.compression&255,U[M++]=he.compression>>8;var ue=new Date(he.mtime==null?Date.now():he.mtime),Oe=ue.getFullYear()-1980;if((Oe<0||Oe>119)&&z(10),qe(U,M,Oe<<25|ue.getMonth()+1<<21|ue.getDate()<<16|ue.getHours()<<11|ue.getMinutes()<<5|ue.getSeconds()>>1),M+=4,ze!=-1&&(qe(U,M,he.crc),qe(U,M+4,ze<0?-ze-2:ze),qe(U,M+8,he.size)),qe(U,M+12,zt),qe(U,M+14,tn),M+=16,ht!=null&&(qe(U,M,Tt),qe(U,M+6,he.attrs),qe(U,M+10,ht),M+=14),U.set(Be,M),M+=zt,tn)for(var Pe in St){var Me=St[Pe],Je=Me.length;qe(U,M,+Pe),qe(U,M+2,Je),U.set(Me,M+4),M+=4+Je}return Tt&&(U.set(wt,M),M+=Tt),M},$t=function(U,M,he,Be,Ze){qe(U,M,101010256),qe(U,M+8,he),qe(U,M+10,he),qe(U,M+12,Be),qe(U,M+16,Ze)},Le=null,Xe=null,gt=null,_t=null;function Qt(U,M,he){he||(he=M,M={}),typeof he!="function"&&z(7);var Be={};vr(U,"",Be,M);var Ze=Object.keys(Be),ze=Ze.length,ht=0,wt=0,zt=ze,St=new Array(ze),Tt=[],tn=function(){for(var Je=0;Je<Tt.length;++Je)Tt[Je]()},ue=function(Je,ut){nt(function(){he(Je,ut)})};nt(function(){ue=he});var Oe=function(){var Je=new ve(wt+22),ut=ht,It=wt-ht;wt=0;for(var Bt=0;Bt<zt;++Bt){var lt=St[Bt];try{var Ke=lt.c.length;dt(Je,wt,lt,lt.f,lt.u,Ke);var tt=30+lt.f.length+xn(lt.extra),at=wt+tt;Je.set(lt.c,at),dt(Je,ht,lt,lt.f,lt.u,Ke,wt,lt.m),ht+=16+tt+(lt.m?lt.m.length:0),wt=at+Ke}catch(it){return ue(it,null)}}$t(Je,ht,St.length,It,ut),ue(null,Je)};ze||Oe();for(var Pe=function(Je){var ut=Ze[Je],It=Be[ut],Bt=It[0],lt=It[1],Ke=kt(),tt=Bt.length;Ke.p(Bt);var at=un(ut),it=at.length,At=lt.comment,Ht=At&&un(At),qt=Ht&&Ht.length,an=xn(lt.extra),Sn=lt.level==0?0:8,Rn=function(yn,On){if(yn)tn(),ue(yn,null);else{var hn=On.length;St[Je]=pn(lt,{size:tt,crc:Ke.d(),c:On,f:at,m:Ht,u:it!=ut.length||Ht&&At.length!=qt,compression:Sn}),ht+=30+it+an+hn,wt+=76+2*(it+an)+(qt||0)+hn,--ze||Oe()}};if(it>65535&&Rn(z(11,0,1),null),!Sn)Rn(null,Bt);else if(tt<16e4)try{Rn(null,Gt(Bt,lt))}catch(yn){Rn(yn,null)}else Tt.push(Pn(Bt,lt,Rn))},Me=0;Me<zt;++Me)Pe(Me);return tn}function Xt(U,M){M||(M={});var he={},Be=[];vr(U,"",he,M);var Ze=0,ze=0;for(var ht in he){var wt=he[ht],zt=wt[0],St=wt[1],Tt=St.level==0?0:8,tn=un(ht),ue=tn.length,Oe=St.comment,Pe=Oe&&un(Oe),Me=Pe&&Pe.length,Je=xn(St.extra);ue>65535&&z(11);var ut=Tt?Gt(zt,St):zt,It=ut.length,Bt=kt();Bt.p(zt),Be.push(pn(St,{size:zt.length,crc:Bt.d(),c:ut,f:tn,m:Pe,u:ue!=ht.length||Pe&&Oe.length!=Me,o:Ze,compression:Tt})),Ze+=30+ue+Je+It,ze+=76+2*(ue+Je)+(Me||0)+It}for(var lt=new ve(ze+22),Ke=Ze,tt=ze-Ze,at=0;at<Be.length;++at){var tn=Be[at];dt(lt,tn.o,tn,tn.f,tn.u,tn.c.length);var it=30+tn.f.length+xn(tn.extra);lt.set(tn.c,tn.o+it),dt(lt,Ze,tn,tn.f,tn.u,tn.c.length,tn.o,tn.m),Ze+=16+it+(tn.m?tn.m.length:0)}return $t(lt,Ze,Be.length,tt,Ke),lt}var Rt=null,Jt=null,fn=null,bn=null,nt=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(U){U()};function cn(U,M,he){he||(he=M,M={}),typeof he!="function"&&z(7);var Be=[],Ze=function(){for(var Je=0;Je<Be.length;++Je)Be[Je]()},ze={},ht=function(Je,ut){nt(function(){he(Je,ut)})};nt(function(){ht=he});for(var wt=U.length-22;Ie(U,wt)!=101010256;--wt)if(!wt||U.length-wt>65558)return ht(z(13,0,1),null),Ze;var zt=Se(U,wt+8);if(zt){var St=zt,Tt=Ie(U,wt+16),tn=Tt==4294967295||St==65535;if(tn){var ue=Ie(U,wt-12);tn=Ie(U,ue)==101075792,tn&&(St=zt=Ie(U,ue+32),Tt=Ie(U,ue+48))}for(var Oe=M&&M.filter,Pe=function(Je){var ut=rn(U,Tt,tn),It=ut[0],Bt=ut[1],lt=ut[2],Ke=ut[3],tt=ut[4],at=ut[5],it=Lt(U,at);Tt=tt;var At=function(qt,an){qt?(Ze(),ht(qt,null)):(an&&(ze[Ke]=an),--zt||ht(null,ze))};if(!Oe||Oe({name:Ke,size:Bt,originalSize:lt,compression:It}))if(!It)At(null,j(U,it,it+Bt));else if(It==8){var Ht=U.subarray(it,it+Bt);if(lt<524288||Bt>.8*lt)try{At(null,He(Ht,{out:new ve(lt)}))}catch(qt){At(qt,null)}else Be.push(Ge(Ht,{size:lt},At))}else At(z(14,"unknown compression type "+It,1),null);else At(null,null)},Me=0;Me<St;++Me)Pe(Me)}else ht(null,{});return Ze}function _n(U,M){for(var he={},Be=U.length-22;Ie(U,Be)!=101010256;--Be)(!Be||U.length-Be>65558)&&z(13);var Ze=Se(U,Be+8);if(!Ze)return{};var ze=Ie(U,Be+16),ht=ze==4294967295||Ze==65535;if(ht){var wt=Ie(U,Be-12);ht=Ie(U,wt)==101075792,ht&&(Ze=Ie(U,wt+32),ze=Ie(U,wt+48))}for(var zt=M&&M.filter,St=0;St<Ze;++St){var Tt=rn(U,ze,ht),tn=Tt[0],ue=Tt[1],Oe=Tt[2],Pe=Tt[3],Me=Tt[4],Je=Tt[5],ut=Lt(U,Je);ze=Me,(!zt||zt({name:Pe,size:ue,originalSize:Oe,compression:tn}))&&(tn?tn==8?he[Pe]=He(U.subarray(ut,ut+ue),{out:new ve(Oe)}):z(14,"unknown compression type "+tn):he[Pe]=j(U,ut,ut+ue))}return he}},64270:function(Fn){(function(st,C){Fn.exports=C()})(this,function(){"use strict";var st=function(f,c){return st=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,e){i.__proto__=e}||function(i,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])},st(f,c)};function C(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");st(f,c);function i(){this.constructor=f}f.prototype=c===null?Object.create(c):(i.prototype=c.prototype,new i)}var N=function(){return N=Object.assign||function(c){for(var i,e=1,t=arguments.length;e<t;e++){i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(c[n]=i[n])}return c},N.apply(this,arguments)};function ae(f,c,i,e){function t(n){return n instanceof i?n:new i(function(r){r(n)})}return new(i||(i=Promise))(function(n,r){function s(u){try{o(e.next(u))}catch(l){r(l)}}function a(u){try{o(e.throw(u))}catch(l){r(l)}}function o(u){u.done?n(u.value):t(u.value).then(s,a)}o((e=e.apply(f,c||[])).next())})}function ve(f,c){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},e,t,n,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(o){return function(u){return a([o,u])}}function a(o){if(e)throw new TypeError("Generator is already executing.");for(;i;)try{if(e=1,t&&(n=o[0]&2?t.return:o[0]?t.throw||((n=t.return)&&n.call(t),0):t.next)&&!(n=n.call(t,o[1])).done)return n;switch(t=0,n&&(o=[o[0]&2,n.value]),o[0]){case 0:case 1:n=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,t=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(n=i.trys,!(n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){i.label=o[1];break}if(o[0]===6&&i.label<n[1]){i.label=n[1],n=o;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(o);break}n[2]&&i.ops.pop(),i.trys.pop();continue}o=c.call(f,i)}catch(u){o=[6,u],t=0}finally{e=n=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function le(f,c,i){if(i||arguments.length===2)for(var e=0,t=c.length,n;e<t;e++)(n||!(e in c))&&(n||(n=Array.prototype.slice.call(c,0,e)),n[e]=c[e]);return f.concat(n||c)}for(var Q=function(){function f(c,i,e,t){this.left=c,this.top=i,this.width=e,this.height=t}return f.prototype.add=function(c,i,e,t){return new f(this.left+c,this.top+i,this.width+e,this.height+t)},f.fromClientRect=function(c,i){return new f(i.left+c.windowBounds.left,i.top+c.windowBounds.top,i.width,i.height)},f.fromDOMRectList=function(c,i){var e=Array.from(i).find(function(t){return t.width!==0});return e?new f(e.left+c.windowBounds.left,e.top+c.windowBounds.top,e.width,e.height):f.EMPTY},f.EMPTY=new f(0,0,0,0),f}(),h=function(f,c){return Q.fromClientRect(f,c.getBoundingClientRect())},ge=function(f){var c=f.body,i=f.documentElement;if(!c||!i)throw new Error("Unable to get document size");var e=Math.max(Math.max(c.scrollWidth,i.scrollWidth),Math.max(c.offsetWidth,i.offsetWidth),Math.max(c.clientWidth,i.clientWidth)),t=Math.max(Math.max(c.scrollHeight,i.scrollHeight),Math.max(c.offsetHeight,i.offsetHeight),Math.max(c.clientHeight,i.clientHeight));return new Q(0,0,e,t)},ie=function(f){for(var c=[],i=0,e=f.length;i<e;){var t=f.charCodeAt(i++);if(t>=55296&&t<=56319&&i<e){var n=f.charCodeAt(i++);(n&64512)===56320?c.push(((t&1023)<<10)+(n&1023)+65536):(c.push(t),i--)}else c.push(t)}return c},A=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];if(String.fromCodePoint)return String.fromCodePoint.apply(String,f);var i=f.length;if(!i)return"";for(var e=[],t=-1,n="";++t<i;){var r=f[t];r<=65535?e.push(r):(r-=65536,e.push((r>>10)+55296,r%1024+56320)),(t+1===i||e.length>16384)&&(n+=String.fromCharCode.apply(String,e),e.length=0)}return n},B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),p=0;p<B.length;p++)T[B.charCodeAt(p)]=p;for(var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),S=0;S<v.length;S++)E[v.charCodeAt(S)]=S;for(var F=function(f){var c=f.length*.75,i=f.length,e,t=0,n,r,s,a;f[f.length-1]==="="&&(c--,f[f.length-2]==="="&&c--);var o=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(c):new Array(c),u=Array.isArray(o)?o:new Uint8Array(o);for(e=0;e<i;e+=4)n=E[f.charCodeAt(e)],r=E[f.charCodeAt(e+1)],s=E[f.charCodeAt(e+2)],a=E[f.charCodeAt(e+3)],u[t++]=n<<2|r>>4,u[t++]=(r&15)<<4|s>>2,u[t++]=(s&3)<<6|a&63;return o},O=function(f){for(var c=f.length,i=[],e=0;e<c;e+=2)i.push(f[e+1]<<8|f[e]);return i},Z=function(f){for(var c=f.length,i=[],e=0;e<c;e+=4)i.push(f[e+3]<<24|f[e+2]<<16|f[e+1]<<8|f[e]);return i},b=5,L=11,D=2,I=L-b,re=65536>>b,ce=1<<b,X=ce-1,q=1024>>b,oe=re+q,pe=oe,_e=32,j=pe+_e,K=65536>>L,ee=1<<I,z=ee-1,Ae=function(f,c,i){return f.slice?f.slice(c,i):new Uint16Array(Array.prototype.slice.call(f,c,i))},Y=function(f,c,i){return f.slice?f.slice(c,i):new Uint32Array(Array.prototype.slice.call(f,c,i))},y=function(f,c){var i=F(f),e=Array.isArray(i)?Z(i):new Uint32Array(i),t=Array.isArray(i)?O(i):new Uint16Array(i),n=24,r=Ae(t,n/2,e[4]/2),s=e[5]===2?Ae(t,(n+e[4])/2):Y(e,Math.ceil((n+e[4])/4));return new _(e[0],e[1],e[2],e[3],r,s)},_=function(){function f(c,i,e,t,n,r){this.initialValue=c,this.errorValue=i,this.highStart=e,this.highValueIndex=t,this.index=n,this.data=r}return f.prototype.get=function(c){var i;if(c>=0){if(c<55296||c>56319&&c<=65535)return i=this.index[c>>b],i=(i<<D)+(c&X),this.data[i];if(c<=65535)return i=this.index[re+(c-55296>>b)],i=(i<<D)+(c&X),this.data[i];if(c<this.highStart)return i=j-K+(c>>L),i=this.index[i],i+=c>>b&z,i=this.index[i],i=(i<<D)+(c&X),this.data[i];if(c<=1114111)return this.data[this.highValueIndex]}return this.errorValue},f}(),V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",de=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),We=0;We<V.length;We++)de[V.charCodeAt(We)]=We;var Qe="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",ct=50,Et=1,Mt=2,Ot=3,Fe=4,kt=5,sn=7,jt=8,pn=9,mt=10,ke=11,xe=12,W=13,Re=14,$e=15,J=16,R=17,k=18,se=19,$=20,G=21,te=22,Ce=23,we=24,Se=25,Ie=26,Ne=27,qe=28,et=29,ft=30,Kt=31,Ct=32,vt=33,en=34,on=35,Vt=36,gn=37,Pn=38,Gt=39,mn=40,Ye=41,Ge=42,He=43,ne=[9001,65288],fe="!",ye="\xD7",Ee="\xF7",Te=y(Qe),xt=[ft,Vt],Wt=[Et,Mt,Ot,kt],nn=[mt,jt],Cn=[Ne,Ie],Wn=Wt.concat(nn),zn=[Pn,Gt,mn,en,on],vn=[$e,W],Dn=function(f,c){c===void 0&&(c="strict");var i=[],e=[],t=[];return f.forEach(function(n,r){var s=Te.get(n);if(s>ct?(t.push(!0),s-=ct):t.push(!1),["normal","auto","loose"].indexOf(c)!==-1&&[8208,8211,12316,12448].indexOf(n)!==-1)return e.push(r),i.push(J);if(s===Fe||s===ke){if(r===0)return e.push(r),i.push(ft);var a=i[r-1];return Wn.indexOf(a)===-1?(e.push(e[r-1]),i.push(a)):(e.push(r),i.push(ft))}if(e.push(r),s===Kt)return i.push(c==="strict"?G:gn);if(s===Ge||s===et)return i.push(ft);if(s===He)return n>=131072&&n<=196605||n>=196608&&n<=262141?i.push(gn):i.push(ft);i.push(s)}),[e,i,t]},or=function(f,c,i,e){var t=e[i];if(Array.isArray(f)?f.indexOf(t)!==-1:f===t)for(var n=i;n<=e.length;){n++;var r=e[n];if(r===c)return!0;if(r!==mt)break}if(t===mt)for(var n=i;n>0;){n--;var s=e[n];if(Array.isArray(f)?f.indexOf(s)!==-1:f===s)for(var a=i;a<=e.length;){a++;var r=e[a];if(r===c)return!0;if(r!==mt)break}if(s!==mt)break}return!1},pr=function(f,c){for(var i=f;i>=0;){var e=c[i];if(e===mt)i--;else return e}return 0},rr=function(f,c,i,e,t){if(i[e]===0)return ye;var n=e-1;if(Array.isArray(t)&&t[n]===!0)return ye;var r=n-1,s=n+1,a=c[n],o=r>=0?c[r]:0,u=c[s];if(a===Mt&&u===Ot)return ye;if(Wt.indexOf(a)!==-1)return fe;if(Wt.indexOf(u)!==-1||nn.indexOf(u)!==-1)return ye;if(pr(n,c)===jt)return Ee;if(Te.get(f[n])===ke||(a===Ct||a===vt)&&Te.get(f[s])===ke||a===sn||u===sn||a===pn||[mt,W,$e].indexOf(a)===-1&&u===pn||[R,k,se,we,qe].indexOf(u)!==-1||pr(n,c)===te||or(Ce,te,n,c)||or([R,k],G,n,c)||or(xe,xe,n,c))return ye;if(a===mt)return Ee;if(a===Ce||u===Ce)return ye;if(u===J||a===J)return Ee;if([W,$e,G].indexOf(u)!==-1||a===Re||o===Vt&&vn.indexOf(a)!==-1||a===qe&&u===Vt||u===$||xt.indexOf(u)!==-1&&a===Se||xt.indexOf(a)!==-1&&u===Se||a===Ne&&[gn,Ct,vt].indexOf(u)!==-1||[gn,Ct,vt].indexOf(a)!==-1&&u===Ie||xt.indexOf(a)!==-1&&Cn.indexOf(u)!==-1||Cn.indexOf(a)!==-1&&xt.indexOf(u)!==-1||[Ne,Ie].indexOf(a)!==-1&&(u===Se||[te,$e].indexOf(u)!==-1&&c[s+1]===Se)||[te,$e].indexOf(a)!==-1&&u===Se||a===Se&&[Se,qe,we].indexOf(u)!==-1)return ye;if([Se,qe,we,R,k].indexOf(u)!==-1)for(var l=n;l>=0;){var d=c[l];if(d===Se)return ye;if([qe,we].indexOf(d)!==-1)l--;else break}if([Ne,Ie].indexOf(u)!==-1)for(var l=[R,k].indexOf(a)!==-1?r:n;l>=0;){var d=c[l];if(d===Se)return ye;if([qe,we].indexOf(d)!==-1)l--;else break}if(Pn===a&&[Pn,Gt,en,on].indexOf(u)!==-1||[Gt,en].indexOf(a)!==-1&&[Gt,mn].indexOf(u)!==-1||[mn,on].indexOf(a)!==-1&&u===mn||zn.indexOf(a)!==-1&&[$,Ie].indexOf(u)!==-1||zn.indexOf(u)!==-1&&a===Ne||xt.indexOf(a)!==-1&&xt.indexOf(u)!==-1||a===we&&xt.indexOf(u)!==-1||xt.concat(Se).indexOf(a)!==-1&&u===te&&ne.indexOf(f[s])===-1||xt.concat(Se).indexOf(u)!==-1&&a===k)return ye;if(a===Ye&&u===Ye){for(var g=i[n],m=1;g>0&&(g--,c[g]===Ye);)m++;if(m%2!==0)return ye}return a===Ct&&u===vt?ye:Ee},cr=function(f,c){c||(c={lineBreak:"normal",wordBreak:"normal"});var i=Dn(f,c.lineBreak),e=i[0],t=i[1],n=i[2];(c.wordBreak==="break-all"||c.wordBreak==="break-word")&&(t=t.map(function(s){return[Se,ft,Ge].indexOf(s)!==-1?gn:s}));var r=c.wordBreak==="keep-all"?n.map(function(s,a){return s&&f[a]>=19968&&f[a]<=40959}):void 0;return[e,t,r]},Jn=function(){function f(c,i,e,t){this.codePoints=c,this.required=i===fe,this.start=e,this.end=t}return f.prototype.slice=function(){return A.apply(void 0,this.codePoints.slice(this.start,this.end))},f}(),kn=function(f,c){var i=ie(f),e=cr(i,c),t=e[0],n=e[1],r=e[2],s=i.length,a=0,o=0;return{next:function(){if(o>=s)return{done:!0,value:null};for(var u=ye;o<s&&(u=rr(i,n,t,++o,r))===ye;);if(u!==ye||o===s){var l=new Jn(i,u,a,o);return a=o,{value:l,done:!1}}return{done:!0,value:null}}}},qn=1,vr=2,br=4,je=8,Ve=10,Yt=47,Pt=92,An=9,un=32,yt=34,pt=61,Lt=35,rn=36,dn=37,xn=39,dt=40,$t=41,Le=95,Xe=45,gt=33,_t=60,Qt=62,Xt=64,Rt=91,Jt=93,fn=61,bn=123,nt=63,cn=125,_n=124,U=126,M=128,he=65533,Be=42,Ze=43,ze=44,ht=58,wt=59,zt=46,St=0,Tt=8,tn=11,ue=14,Oe=31,Pe=127,Me=-1,Je=48,ut=97,It=101,Bt=102,lt=117,Ke=122,tt=65,at=69,it=70,At=85,Ht=90,qt=function(f){return f>=Je&&f<=57},an=function(f){return f>=55296&&f<=57343},Sn=function(f){return qt(f)||f>=tt&&f<=it||f>=ut&&f<=Bt},Rn=function(f){return f>=ut&&f<=Ke},yn=function(f){return f>=tt&&f<=Ht},On=function(f){return Rn(f)||yn(f)},hn=function(f){return f>=M},Vn=function(f){return f===Ve||f===An||f===un},Mn=function(f){return On(f)||hn(f)||f===Le},En=function(f){return Mn(f)||qt(f)||f===Xe},Hn=function(f){return f>=St&&f<=Tt||f===tn||f>=ue&&f<=Oe||f===Pe},Gn=function(f,c){return f!==Pt?!1:c!==Ve},er=function(f,c,i){return f===Xe?Mn(c)||Gn(c,i):Mn(f)?!0:!!(f===Pt&&Gn(f,c))},jn=function(f,c,i){return f===Ze||f===Xe?qt(c)?!0:c===zt&&qt(i):qt(f===zt?c:f)},$n=function(f){var c=0,i=1;(f[c]===Ze||f[c]===Xe)&&(f[c]===Xe&&(i=-1),c++);for(var e=[];qt(f[c]);)e.push(f[c++]);var t=e.length?parseInt(A.apply(void 0,e),10):0;f[c]===zt&&c++;for(var n=[];qt(f[c]);)n.push(f[c++]);var r=n.length,s=r?parseInt(A.apply(void 0,n),10):0;(f[c]===at||f[c]===It)&&c++;var a=1;(f[c]===Ze||f[c]===Xe)&&(f[c]===Xe&&(a=-1),c++);for(var o=[];qt(f[c]);)o.push(f[c++]);var u=o.length?parseInt(A.apply(void 0,o),10):0;return i*(t+s*Math.pow(10,-r))*Math.pow(10,a*u)},Nn={type:2},In={type:3},Bn={type:4},ir={type:13},mr={type:8},fr={type:21},dr={type:9},kr={type:10},Wr={type:11},Kr={type:12},Ai={type:14},Jr={type:23},ei={type:1},Tr={type:25},Rr={type:24},ti={type:26},Cr={type:27},Zn={type:28},yr={type:29},Qn={type:31},Ar={type:32},ur=function(){function f(){this._value=[]}return f.prototype.write=function(c){this._value=this._value.concat(ie(c))},f.prototype.read=function(){for(var c=[],i=this.consumeToken();i!==Ar;)c.push(i),i=this.consumeToken();return c},f.prototype.consumeToken=function(){var c=this.consumeCodePoint();switch(c){case yt:return this.consumeStringToken(yt);case Lt:var i=this.peekCodePoint(0),e=this.peekCodePoint(1),t=this.peekCodePoint(2);if(En(i)||Gn(e,t)){var n=er(i,e,t)?vr:qn,r=this.consumeName();return{type:5,value:r,flags:n}}break;case rn:if(this.peekCodePoint(0)===pt)return this.consumeCodePoint(),ir;break;case xn:return this.consumeStringToken(xn);case dt:return Nn;case $t:return In;case Be:if(this.peekCodePoint(0)===pt)return this.consumeCodePoint(),Ai;break;case Ze:if(jn(c,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(c),this.consumeNumericToken();break;case ze:return Bn;case Xe:var s=c,a=this.peekCodePoint(0),o=this.peekCodePoint(1);if(jn(s,a,o))return this.reconsumeCodePoint(c),this.consumeNumericToken();if(er(s,a,o))return this.reconsumeCodePoint(c),this.consumeIdentLikeToken();if(a===Xe&&o===Qt)return this.consumeCodePoint(),this.consumeCodePoint(),Rr;break;case zt:if(jn(c,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(c),this.consumeNumericToken();break;case Yt:if(this.peekCodePoint(0)===Be)for(this.consumeCodePoint();;){var u=this.consumeCodePoint();if(u===Be&&(u=this.consumeCodePoint(),u===Yt))return this.consumeToken();if(u===Me)return this.consumeToken()}break;case ht:return ti;case wt:return Cr;case _t:if(this.peekCodePoint(0)===gt&&this.peekCodePoint(1)===Xe&&this.peekCodePoint(2)===Xe)return this.consumeCodePoint(),this.consumeCodePoint(),Tr;break;case Xt:var l=this.peekCodePoint(0),d=this.peekCodePoint(1),g=this.peekCodePoint(2);if(er(l,d,g)){var r=this.consumeName();return{type:7,value:r}}break;case Rt:return Zn;case Pt:if(Gn(c,this.peekCodePoint(0)))return this.reconsumeCodePoint(c),this.consumeIdentLikeToken();break;case Jt:return yr;case fn:if(this.peekCodePoint(0)===pt)return this.consumeCodePoint(),mr;break;case bn:return Wr;case cn:return Kr;case lt:case At:var m=this.peekCodePoint(0),w=this.peekCodePoint(1);return m===Ze&&(Sn(w)||w===nt)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(c),this.consumeIdentLikeToken();case _n:if(this.peekCodePoint(0)===pt)return this.consumeCodePoint(),dr;if(this.peekCodePoint(0)===_n)return this.consumeCodePoint(),fr;break;case U:if(this.peekCodePoint(0)===pt)return this.consumeCodePoint(),kr;break;case Me:return Ar}return Vn(c)?(this.consumeWhiteSpace(),Qn):qt(c)?(this.reconsumeCodePoint(c),this.consumeNumericToken()):Mn(c)?(this.reconsumeCodePoint(c),this.consumeIdentLikeToken()):{type:6,value:A(c)}},f.prototype.consumeCodePoint=function(){var c=this._value.shift();return typeof c=="undefined"?-1:c},f.prototype.reconsumeCodePoint=function(c){this._value.unshift(c)},f.prototype.peekCodePoint=function(c){return c>=this._value.length?-1:this._value[c]},f.prototype.consumeUnicodeRangeToken=function(){for(var c=[],i=this.consumeCodePoint();Sn(i)&&c.length<6;)c.push(i),i=this.consumeCodePoint();for(var e=!1;i===nt&&c.length<6;)c.push(i),i=this.consumeCodePoint(),e=!0;if(e){var t=parseInt(A.apply(void 0,c.map(function(a){return a===nt?Je:a})),16),n=parseInt(A.apply(void 0,c.map(function(a){return a===nt?it:a})),16);return{type:30,start:t,end:n}}var r=parseInt(A.apply(void 0,c),16);if(this.peekCodePoint(0)===Xe&&Sn(this.peekCodePoint(1))){this.consumeCodePoint(),i=this.consumeCodePoint();for(var s=[];Sn(i)&&s.length<6;)s.push(i),i=this.consumeCodePoint();var n=parseInt(A.apply(void 0,s),16);return{type:30,start:r,end:n}}else return{type:30,start:r,end:r}},f.prototype.consumeIdentLikeToken=function(){var c=this.consumeName();return c.toLowerCase()==="url"&&this.peekCodePoint(0)===dt?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===dt?(this.consumeCodePoint(),{type:19,value:c}):{type:20,value:c}},f.prototype.consumeUrlToken=function(){var c=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Me)return{type:22,value:""};var i=this.peekCodePoint(0);if(i===xn||i===yt){var e=this.consumeStringToken(this.consumeCodePoint());return e.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Me||this.peekCodePoint(0)===$t)?(this.consumeCodePoint(),{type:22,value:e.value}):(this.consumeBadUrlRemnants(),Jr)}for(;;){var t=this.consumeCodePoint();if(t===Me||t===$t)return{type:22,value:A.apply(void 0,c)};if(Vn(t))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Me||this.peekCodePoint(0)===$t?(this.consumeCodePoint(),{type:22,value:A.apply(void 0,c)}):(this.consumeBadUrlRemnants(),Jr);if(t===yt||t===xn||t===dt||Hn(t))return this.consumeBadUrlRemnants(),Jr;if(t===Pt)if(Gn(t,this.peekCodePoint(0)))c.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Jr;else c.push(t)}},f.prototype.consumeWhiteSpace=function(){for(;Vn(this.peekCodePoint(0));)this.consumeCodePoint()},f.prototype.consumeBadUrlRemnants=function(){for(;;){var c=this.consumeCodePoint();if(c===$t||c===Me)return;Gn(c,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},f.prototype.consumeStringSlice=function(c){for(var i=5e4,e="";c>0;){var t=Math.min(i,c);e+=A.apply(void 0,this._value.splice(0,t)),c-=t}return this._value.shift(),e},f.prototype.consumeStringToken=function(c){var i="",e=0;do{var t=this._value[e];if(t===Me||t===void 0||t===c)return i+=this.consumeStringSlice(e),{type:0,value:i};if(t===Ve)return this._value.splice(0,e),ei;if(t===Pt){var n=this._value[e+1];n!==Me&&n!==void 0&&(n===Ve?(i+=this.consumeStringSlice(e),e=-1,this._value.shift()):Gn(t,n)&&(i+=this.consumeStringSlice(e),i+=A(this.consumeEscapedCodePoint()),e=-1))}e++}while(!0)},f.prototype.consumeNumber=function(){var c=[],i=br,e=this.peekCodePoint(0);for((e===Ze||e===Xe)&&c.push(this.consumeCodePoint());qt(this.peekCodePoint(0));)c.push(this.consumeCodePoint());e=this.peekCodePoint(0);var t=this.peekCodePoint(1);if(e===zt&&qt(t))for(c.push(this.consumeCodePoint(),this.consumeCodePoint()),i=je;qt(this.peekCodePoint(0));)c.push(this.consumeCodePoint());e=this.peekCodePoint(0),t=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((e===at||e===It)&&((t===Ze||t===Xe)&&qt(n)||qt(t)))for(c.push(this.consumeCodePoint(),this.consumeCodePoint()),i=je;qt(this.peekCodePoint(0));)c.push(this.consumeCodePoint());return[$n(c),i]},f.prototype.consumeNumericToken=function(){var c=this.consumeNumber(),i=c[0],e=c[1],t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(er(t,n,r)){var s=this.consumeName();return{type:15,number:i,flags:e,unit:s}}return t===dn?(this.consumeCodePoint(),{type:16,number:i,flags:e}):{type:17,number:i,flags:e}},f.prototype.consumeEscapedCodePoint=function(){var c=this.consumeCodePoint();if(Sn(c)){for(var i=A(c);Sn(this.peekCodePoint(0))&&i.length<6;)i+=A(this.consumeCodePoint());Vn(this.peekCodePoint(0))&&this.consumeCodePoint();var e=parseInt(i,16);return e===0||an(e)||e>1114111?he:e}return c===Me?he:c},f.prototype.consumeName=function(){for(var c="";;){var i=this.consumeCodePoint();if(En(i))c+=A(i);else if(Gn(i,this.peekCodePoint(0)))c+=A(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(i),c}},f}(),hr=function(){function f(c){this._tokens=c}return f.create=function(c){var i=new ur;return i.write(c),new f(i.read())},f.parseValue=function(c){return f.create(c).parseComponentValue()},f.parseValues=function(c){return f.create(c).parseComponentValues()},f.prototype.parseComponentValue=function(){for(var c=this.consumeToken();c.type===31;)c=this.consumeToken();if(c.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(c);var i=this.consumeComponentValue();do c=this.consumeToken();while(c.type===31);if(c.type===32)return i;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},f.prototype.parseComponentValues=function(){for(var c=[];;){var i=this.consumeComponentValue();if(i.type===32)return c;c.push(i),c.push()}},f.prototype.consumeComponentValue=function(){var c=this.consumeToken();switch(c.type){case 11:case 28:case 2:return this.consumeSimpleBlock(c.type);case 19:return this.consumeFunction(c)}return c},f.prototype.consumeSimpleBlock=function(c){for(var i={type:c,values:[]},e=this.consumeToken();;){if(e.type===32||Yr(e,c))return i;this.reconsumeToken(e),i.values.push(this.consumeComponentValue()),e=this.consumeToken()}},f.prototype.consumeFunction=function(c){for(var i={name:c.value,values:[],type:18};;){var e=this.consumeToken();if(e.type===32||e.type===3)return i;this.reconsumeToken(e),i.values.push(this.consumeComponentValue())}},f.prototype.consumeToken=function(){var c=this._tokens.shift();return typeof c=="undefined"?Ar:c},f.prototype.reconsumeToken=function(c){this._tokens.unshift(c)},f}(),Er=function(f){return f.type===15},Fr=function(f){return f.type===17},wn=function(f){return f.type===20},tr=function(f){return f.type===0},Ir=function(f,c){return wn(f)&&f.value===c},nr=function(f){return f.type!==31},wr=function(f){return f.type!==31&&f.type!==4},Nr=function(f){var c=[],i=[];return f.forEach(function(e){if(e.type===4){if(i.length===0)throw new Error("Error parsing function args, zero tokens for arg");c.push(i),i=[];return}e.type!==31&&i.push(e)}),i.length&&c.push(i),c},Yr=function(f,c){return c===11&&f.type===12||c===28&&f.type===29?!0:c===2&&f.type===3},ri=function(f){return f.type===17||f.type===15},Pr=function(f){return f.type===16||ri(f)},wi=function(f){return f.length>1?[f[0],f[1]]:[f[0]]},Ur={type:17,number:0,flags:br},ls={type:16,number:50,flags:br},li={type:16,number:100,flags:br},bi=function(f,c,i){var e=f[0],t=f[1];return[Gr(e,c),Gr(typeof t!="undefined"?t:e,i)]},Gr=function(f,c){if(f.type===16)return f.number/100*c;if(Er(f))switch(f.unit){case"rem":case"em":return 16*f.number;case"px":default:return f.number}return f.number},Zi="deg",Wi="grad",ns="rad",Fi="turn",zi={name:"angle",parse:function(f,c){if(c.type===15)switch(c.unit){case Zi:return Math.PI*c.number/180;case Wi:return Math.PI/200*c.number;case ns:return c.number;case Fi:return Math.PI*2*c.number}throw new Error("Unsupported angle type")}},Ui=function(f){return f.type===15&&(f.unit===Zi||f.unit===Wi||f.unit===ns||f.unit===Fi)},us=function(f){var c=f.filter(wn).map(function(i){return i.value}).join(" ");switch(c){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Ur,Ur];case"to top":case"bottom":return fi(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Ur,li];case"to right":case"left":return fi(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[li,li];case"to bottom":case"top":return fi(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[li,Ur];case"to left":case"right":return fi(270)}return 0},fi=function(f){return Math.PI*f/180},di={name:"color",parse:function(f,c){if(c.type===18){var i=Dr[c.name];if(typeof i=="undefined")throw new Error('Attempting to parse an unsupported color function "'+c.name+'"');return i(f,c.values)}if(c.type===5){if(c.value.length===3){var e=c.value.substring(0,1),t=c.value.substring(1,2),n=c.value.substring(2,3);return Di(parseInt(e+e,16),parseInt(t+t,16),parseInt(n+n,16),1)}if(c.value.length===4){var e=c.value.substring(0,1),t=c.value.substring(1,2),n=c.value.substring(2,3),r=c.value.substring(3,4);return Di(parseInt(e+e,16),parseInt(t+t,16),parseInt(n+n,16),parseInt(r+r,16)/255)}if(c.value.length===6){var e=c.value.substring(0,2),t=c.value.substring(2,4),n=c.value.substring(4,6);return Di(parseInt(e,16),parseInt(t,16),parseInt(n,16),1)}if(c.value.length===8){var e=c.value.substring(0,2),t=c.value.substring(2,4),n=c.value.substring(4,6),r=c.value.substring(6,8);return Di(parseInt(e,16),parseInt(t,16),parseInt(n,16),parseInt(r,16)/255)}}if(c.type===20){var s=Hr[c.value.toUpperCase()];if(typeof s!="undefined")return s}return Hr.TRANSPARENT}},Ci=function(f){return(255&f)===0},ai=function(f){var c=255&f,i=255&f>>8,e=255&f>>16,t=255&f>>24;return c<255?"rgba("+t+","+e+","+i+","+c/255+")":"rgb("+t+","+e+","+i+")"},Di=function(f,c,i,e){return(f<<24|c<<16|i<<8|Math.round(e*255)<<0)>>>0},hs=function(f,c){if(f.type===17)return f.number;if(f.type===16){var i=c===3?1:255;return c===3?f.number/100*i:Math.round(f.number/100*i)}return 0},rs=function(f,c){var i=c.filter(wr);if(i.length===3){var e=i.map(hs),t=e[0],n=e[1],r=e[2];return Di(t,n,r,1)}if(i.length===4){var s=i.map(hs),t=s[0],n=s[1],r=s[2],a=s[3];return Di(t,n,r,a)}return 0};function gi(f,c,i){return i<0&&(i+=1),i>=1&&(i-=1),i<1/6?(c-f)*i*6+f:i<1/2?c:i<2/3?(c-f)*6*(2/3-i)+f:f}var ci=function(f,c){var i=c.filter(wr),e=i[0],t=i[1],n=i[2],r=i[3],s=(e.type===17?fi(e.number):zi.parse(f,e))/(Math.PI*2),a=Pr(t)?t.number/100:0,o=Pr(n)?n.number/100:0,u=typeof r!="undefined"&&Pr(r)?Gr(r,1):1;if(a===0)return Di(o*255,o*255,o*255,1);var l=o<=.5?o*(a+1):o+a-o*a,d=o*2-l,g=gi(d,l,s+1/3),m=gi(d,l,s),w=gi(d,l,s-1/3);return Di(g*255,m*255,w*255,u)},Dr={hsl:ci,hsla:ci,rgb:rs,rgba:rs},xr=function(f,c){return di.parse(f,hr.create(c).parseComponentValue())},Hr={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},ni={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(f,c){return c.map(function(i){if(wn(i))switch(i.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ii={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},qr=function(f,c){var i=di.parse(f,c[0]),e=c[1];return e&&Pr(e)?{color:i,stop:e}:{color:i,stop:null}},xi=function(f,c){var i=f[0],e=f[f.length-1];i.stop===null&&(i.stop=Ur),e.stop===null&&(e.stop=li);for(var t=[],n=0,r=0;r<f.length;r++){var s=f[r].stop;if(s!==null){var a=Gr(s,c);a>n?t.push(a):t.push(n),n=a}else t.push(null)}for(var o=null,r=0;r<t.length;r++){var u=t[r];if(u===null)o===null&&(o=r);else if(o!==null){for(var l=r-o,d=t[o-1],g=(u-d)/(l+1),m=1;m<=l;m++)t[o+m-1]=g*m;o=null}}return f.map(function(w,x){var H=w.color;return{color:H,stop:Math.max(Math.min(1,t[x]/c),0)}})},Si=function(f,c,i){var e=c/2,t=i/2,n=Gr(f[0],c)-e,r=t-Gr(f[1],i);return(Math.atan2(r,n)+Math.PI*2)%(Math.PI*2)},Ti=function(f,c,i){var e=typeof f=="number"?f:Si(f,c,i),t=Math.abs(c*Math.sin(e))+Math.abs(i*Math.cos(e)),n=c/2,r=i/2,s=t/2,a=Math.sin(e-Math.PI/2)*s,o=Math.cos(e-Math.PI/2)*s;return[t,n-o,n+o,r-a,r+a]},Vr=function(f,c){return Math.sqrt(f*f+c*c)},mi=function(f,c,i,e,t){var n=[[0,0],[0,c],[f,0],[f,c]];return n.reduce(function(r,s){var a=s[0],o=s[1],u=Vr(i-a,e-o);return(t?u<r.optimumDistance:u>r.optimumDistance)?{optimumCorner:s,optimumDistance:u}:r},{optimumDistance:t?1/0:-1/0,optimumCorner:null}).optimumCorner},Ni=function(f,c,i,e,t){var n=0,r=0;switch(f.size){case 0:f.shape===0?n=r=Math.min(Math.abs(c),Math.abs(c-e),Math.abs(i),Math.abs(i-t)):f.shape===1&&(n=Math.min(Math.abs(c),Math.abs(c-e)),r=Math.min(Math.abs(i),Math.abs(i-t)));break;case 2:if(f.shape===0)n=r=Math.min(Vr(c,i),Vr(c,i-t),Vr(c-e,i),Vr(c-e,i-t));else if(f.shape===1){var s=Math.min(Math.abs(i),Math.abs(i-t))/Math.min(Math.abs(c),Math.abs(c-e)),a=mi(e,t,c,i,!0),o=a[0],u=a[1];n=Vr(o-c,(u-i)/s),r=s*n}break;case 1:f.shape===0?n=r=Math.max(Math.abs(c),Math.abs(c-e),Math.abs(i),Math.abs(i-t)):f.shape===1&&(n=Math.max(Math.abs(c),Math.abs(c-e)),r=Math.max(Math.abs(i),Math.abs(i-t)));break;case 3:if(f.shape===0)n=r=Math.max(Vr(c,i),Vr(c,i-t),Vr(c-e,i),Vr(c-e,i-t));else if(f.shape===1){var s=Math.max(Math.abs(i),Math.abs(i-t))/Math.max(Math.abs(c),Math.abs(c-e)),l=mi(e,t,c,i,!1),o=l[0],u=l[1];n=Vr(o-c,(u-i)/s),r=s*n}break}return Array.isArray(f.size)&&(n=Gr(f.size[0],e),r=f.size.length===2?Gr(f.size[1],t):n),[n,r]},Hi=function(f,c){var i=fi(180),e=[];return Nr(c).forEach(function(t,n){if(n===0){var r=t[0];if(r.type===20&&r.value==="to"){i=us(t);return}else if(Ui(r)){i=zi.parse(f,r);return}}var s=qr(f,t);e.push(s)}),{angle:i,stops:e,type:1}},is=function(f,c){var i=fi(180),e=[];return Nr(c).forEach(function(t,n){if(n===0){var r=t[0];if(r.type===20&&["top","left","right","bottom"].indexOf(r.value)!==-1){i=us(t);return}else if(Ui(r)){i=(zi.parse(f,r)+fi(270))%fi(360);return}}var s=qr(f,t);e.push(s)}),{angle:i,stops:e,type:1}},gs=function(f,c){var i=fi(180),e=[],t=1,n=0,r=3,s=[];return Nr(c).forEach(function(a,o){var u=a[0];if(o===0){if(wn(u)&&u.value==="linear"){t=1;return}else if(wn(u)&&u.value==="radial"){t=2;return}}if(u.type===18){if(u.name==="from"){var l=di.parse(f,u.values[0]);e.push({stop:Ur,color:l})}else if(u.name==="to"){var l=di.parse(f,u.values[0]);e.push({stop:li,color:l})}else if(u.name==="color-stop"){var d=u.values.filter(wr);if(d.length===2){var l=di.parse(f,d[1]),g=d[0];Fr(g)&&e.push({stop:{type:16,number:g.number*100,flags:g.flags},color:l})}}}}),t===1?{angle:(i+fi(180))%fi(360),stops:e,type:t}:{size:r,shape:n,stops:e,position:s,type:t}},si="closest-side",Zt="farthest-side",zr="closest-corner",pi="farthest-corner",hi="circle",ki="ellipse",cs="cover",Bs="contain",Qs=function(f,c){var i=0,e=3,t=[],n=[];return Nr(c).forEach(function(r,s){var a=!0;if(s===0){var o=!1;a=r.reduce(function(l,d){if(o)if(wn(d))switch(d.value){case"center":return n.push(ls),l;case"top":case"left":return n.push(Ur),l;case"right":case"bottom":return n.push(li),l}else(Pr(d)||ri(d))&&n.push(d);else if(wn(d))switch(d.value){case hi:return i=0,!1;case ki:return i=1,!1;case"at":return o=!0,!1;case si:return e=0,!1;case cs:case Zt:return e=1,!1;case Bs:case zr:return e=2,!1;case pi:return e=3,!1}else if(ri(d)||Pr(d))return Array.isArray(e)||(e=[]),e.push(d),!1;return l},a)}if(a){var u=qr(f,r);t.push(u)}}),{size:e,shape:i,stops:t,position:n,type:2}},fs=function(f,c){var i=0,e=3,t=[],n=[];return Nr(c).forEach(function(r,s){var a=!0;if(s===0?a=r.reduce(function(u,l){if(wn(l))switch(l.value){case"center":return n.push(ls),!1;case"top":case"left":return n.push(Ur),!1;case"right":case"bottom":return n.push(li),!1}else if(Pr(l)||ri(l))return n.push(l),!1;return u},a):s===1&&(a=r.reduce(function(u,l){if(wn(l))switch(l.value){case hi:return i=0,!1;case ki:return i=1,!1;case Bs:case si:return e=0,!1;case Zt:return e=1,!1;case zr:return e=2,!1;case cs:case pi:return e=3,!1}else if(ri(l)||Pr(l))return Array.isArray(e)||(e=[]),e.push(l),!1;return u},a)),a){var o=qr(f,r);t.push(o)}}),{size:e,shape:i,stops:t,position:n,type:2}},ss=function(f){return f.type===1},ji=function(f){return f.type===2},Ri={name:"image",parse:function(f,c){if(c.type===22){var i={url:c.value,type:0};return f.cache.addImage(c.value),i}if(c.type===18){var e=Sa[c.name];if(typeof e=="undefined")throw new Error('Attempting to parse an unsupported image function "'+c.name+'"');return e(f,c.values)}throw new Error("Unsupported image type "+c.type)}};function xa(f){return!(f.type===20&&f.value==="none")&&(f.type!==18||!!Sa[f.name])}var Sa={"linear-gradient":Hi,"-moz-linear-gradient":is,"-ms-linear-gradient":is,"-o-linear-gradient":is,"-webkit-linear-gradient":is,"radial-gradient":Qs,"-moz-radial-gradient":fs,"-ms-radial-gradient":fs,"-o-radial-gradient":fs,"-webkit-radial-gradient":fs,"-webkit-gradient":gs},Ta={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(f,c){if(c.length===0)return[];var i=c[0];return i.type===20&&i.value==="none"?[]:c.filter(function(e){return wr(e)&&xa(e)}).map(function(e){return Ri.parse(f,e)})}},Ia={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(f,c){return c.map(function(i){if(wn(i))switch(i.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Fa={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(f,c){return Nr(c).map(function(i){return i.filter(Pr)}).map(wi)}},oa={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(f,c){return Nr(c).map(function(i){return i.filter(wn).map(function(e){return e.value}).join(" ")}).map(Ms)}},Ms=function(f){switch(f){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Ki;(function(f){f.AUTO="auto",f.CONTAIN="contain",f.COVER="cover"})(Ki||(Ki={}));var Ns={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(f,c){return Nr(c).map(function(i){return i.filter(Hs)})}},Hs=function(f){return wn(f)||Pr(f)},ps=function(f){return{name:"border-"+f+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Ks=ps("top"),Da=ps("right"),Fs=ps("bottom"),Ra=ps("left"),Gs=function(f){return{name:"border-radius-"+f,initialValue:"0 0",prefix:!1,type:1,parse:function(c,i){return wi(i.filter(Pr))}}},Aa=Gs("top-left"),$s=Gs("top-right"),La=Gs("bottom-right"),Vs=Gs("bottom-left"),Ds=function(f){return{name:"border-"+f+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(c,i){switch(i){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},po=Ds("top"),Or=Ds("right"),Qr=Ds("bottom"),vi=Ds("left"),Ii=function(f){return{name:"border-"+f+"-width",initialValue:"0",type:0,prefix:!1,parse:function(c,i){return Er(i)?i.number:0}}},_i=Ii("top"),bs=Ii("right"),ms=Ii("bottom"),vs=Ii("left"),Rs={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},la={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(f,c){switch(c){case"rtl":return 1;case"ltr":default:return 0}}},Ua={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(f,c){return c.filter(wn).reduce(function(i,e){return i|wl(e.value)},0)}},wl=function(f){switch(f){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},pA={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(f,c){switch(c){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},mA={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(f,c){return c.type===20&&c.value==="normal"?0:c.type===17||c.type===15?c.number:0}},ka;(function(f){f.NORMAL="normal",f.STRICT="strict"})(ka||(ka={}));var mo={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(f,c){switch(c){case"strict":return ka.STRICT;case"normal":default:return ka.NORMAL}}},Gi={name:"line-height",initialValue:"normal",prefix:!1,type:4},as=function(f,c){return wn(f)&&f.value==="normal"?1.2*c:f.type===17?c*f.number:Pr(f)?Gr(f,c):c},vo={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(f,c){return c.type===20&&c.value==="none"?null:Ri.parse(f,c)}},Bl={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(f,c){switch(c){case"inside":return 0;case"outside":default:return 1}}},Zs={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(f,c){switch(c){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Oa=function(f){return{name:"margin-"+f,initialValue:"0",prefix:!1,type:4}},bl=Oa("top"),Cl=Oa("right"),xl=Oa("bottom"),vA=Oa("left"),_A={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(f,c){return c.filter(wn).map(function(i){switch(i.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},_o={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(f,c){switch(c){case"break-word":return"break-word";case"normal":default:return"normal"}}},ua=function(f){return{name:"padding-"+f,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Sl=ua("top"),yA=ua("right"),Tl=ua("bottom"),EA=ua("left"),Il={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(f,c){switch(c){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},wA={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(f,c){switch(c){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Fl={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(f,c){return c.length===1&&Ir(c[0],"none")?[]:Nr(c).map(function(i){for(var e={color:Hr.TRANSPARENT,offsetX:Ur,offsetY:Ur,blur:Ur},t=0,n=0;n<i.length;n++){var r=i[n];ri(r)?(t===0?e.offsetX=r:t===1?e.offsetY=r:e.blur=r,t++):e.color=di.parse(f,r)}return e})}},Dl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(f,c){switch(c){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Rl={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(f,c){if(c.type===20&&c.value==="none")return null;if(c.type===18){var i=bA[c.name];if(typeof i=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+c.name+'"');return i(c.values)}return null}},BA=function(f){var c=f.filter(function(i){return i.type===17}).map(function(i){return i.number});return c.length===6?c:null},Ll=function(f){var c=f.filter(function(a){return a.type===17}).map(function(a){return a.number}),i=c[0],e=c[1];c[2],c[3];var t=c[4],n=c[5];c[6],c[7],c[8],c[9],c[10],c[11];var r=c[12],s=c[13];return c[14],c[15],c.length===16?[i,e,t,n,r,s]:null},bA={matrix:BA,matrix3d:Ll},Ws={type:16,number:50,flags:br},CA=[Ws,Ws],xA={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(f,c){var i=c.filter(Pr);return i.length!==2?CA:[i[0],i[1]]}},Bi={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(f,c){switch(c){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Yi;(function(f){f.NORMAL="normal",f.BREAK_ALL="break-all",f.KEEP_ALL="keep-all"})(Yi||(Yi={}));for(var yo={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(f,c){switch(c){case"break-all":return Yi.BREAK_ALL;case"keep-all":return Yi.KEEP_ALL;case"normal":default:return Yi.NORMAL}}},Ul={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(f,c){if(c.type===20)return{auto:!0,order:0};if(Fr(c))return{auto:!1,order:c.number};throw new Error("Invalid z-index number parsed")}},SA={name:"time",parse:function(f,c){if(c.type===15)switch(c.unit.toLowerCase()){case"s":return 1e3*c.number;case"ms":return c.number}throw new Error("Unsupported time type")}},Eo={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(f,c){return Fr(c)?c.number:1}},wo={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},zs={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(f,c){return c.filter(wn).map(function(i){switch(i.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(i){return i!==0})}},kl={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(f,c){var i=[],e=[];return c.forEach(function(t){switch(t.type){case 20:case 0:i.push(t.value);break;case 17:i.push(t.number.toString());break;case 4:e.push(i.join(" ")),i.length=0;break}}),i.length&&e.push(i.join(" ")),e.map(function(t){return t.indexOf(" ")===-1?t:"'"+t+"'"})}},Cs={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Ut={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(f,c){if(Fr(c))return c.number;if(wn(c))switch(c.value){case"bold":return 700;case"normal":default:return 400}return 400}},TA={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(f,c){return c.filter(wn).map(function(i){return i.value})}},Bo={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(f,c){switch(c){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},yi=function(f,c){return(f&c)!==0},ca={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(f,c){if(c.length===0)return[];var i=c[0];return i.type===20&&i.value==="none"?[]:c}},Ol={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(f,c){if(c.length===0)return null;var i=c[0];if(i.type===20&&i.value==="none")return null;for(var e=[],t=c.filter(nr),n=0;n<t.length;n++){var r=t[n],s=t[n+1];if(r.type===20){var a=s&&Fr(s)?s.number:1;e.push({counter:r.value,increment:a})}}return e}},Pl={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(f,c){if(c.length===0)return[];for(var i=[],e=c.filter(nr),t=0;t<e.length;t++){var n=e[t],r=e[t+1];if(wn(n)&&n.value!=="none"){var s=r&&Fr(r)?r.number:0;i.push({counter:n.value,reset:s})}}return i}},Ql={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(f,c){return c.filter(Er).map(function(i){return SA.parse(f,i)})}},Ml={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(f,c){if(c.length===0)return null;var i=c[0];if(i.type===20&&i.value==="none")return null;var e=[],t=c.filter(tr);if(t.length%2!==0)return null;for(var n=0;n<t.length;n+=2){var r=t[n].value,s=t[n+1].value;e.push({open:r,close:s})}return e}},IA=function(f,c,i){if(!f)return"";var e=f[Math.min(c,f.length-1)];return e?i?e.open:e.close:""},js={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(f,c){return c.length===1&&Ir(c[0],"none")?[]:Nr(c).map(function(i){for(var e={color:255,offsetX:Ur,offsetY:Ur,blur:Ur,spread:Ur,inset:!1},t=0,n=0;n<i.length;n++){var r=i[n];Ir(r,"inset")?e.inset=!0:ri(r)?(t===0?e.offsetX=r:t===1?e.offsetY=r:t===2?e.blur=r:e.spread=r,t++):e.color=di.parse(f,r)}return e})}},bo={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(f,c){var i=[0,1,2],e=[];return c.filter(wn).forEach(function(t){switch(t.value){case"stroke":e.push(1);break;case"fill":e.push(0);break;case"markers":e.push(2);break}}),i.forEach(function(t){e.indexOf(t)===-1&&e.push(t)}),e}},FA={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Pa={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(f,c){return Er(c)?c.number:0}},Xi=function(){function f(c,i){var e,t;this.animationDuration=lr(c,Ql,i.animationDuration),this.backgroundClip=lr(c,ni,i.backgroundClip),this.backgroundColor=lr(c,ii,i.backgroundColor),this.backgroundImage=lr(c,Ta,i.backgroundImage),this.backgroundOrigin=lr(c,Ia,i.backgroundOrigin),this.backgroundPosition=lr(c,Fa,i.backgroundPosition),this.backgroundRepeat=lr(c,oa,i.backgroundRepeat),this.backgroundSize=lr(c,Ns,i.backgroundSize),this.borderTopColor=lr(c,Ks,i.borderTopColor),this.borderRightColor=lr(c,Da,i.borderRightColor),this.borderBottomColor=lr(c,Fs,i.borderBottomColor),this.borderLeftColor=lr(c,Ra,i.borderLeftColor),this.borderTopLeftRadius=lr(c,Aa,i.borderTopLeftRadius),this.borderTopRightRadius=lr(c,$s,i.borderTopRightRadius),this.borderBottomRightRadius=lr(c,La,i.borderBottomRightRadius),this.borderBottomLeftRadius=lr(c,Vs,i.borderBottomLeftRadius),this.borderTopStyle=lr(c,po,i.borderTopStyle),this.borderRightStyle=lr(c,Or,i.borderRightStyle),this.borderBottomStyle=lr(c,Qr,i.borderBottomStyle),this.borderLeftStyle=lr(c,vi,i.borderLeftStyle),this.borderTopWidth=lr(c,_i,i.borderTopWidth),this.borderRightWidth=lr(c,bs,i.borderRightWidth),this.borderBottomWidth=lr(c,ms,i.borderBottomWidth),this.borderLeftWidth=lr(c,vs,i.borderLeftWidth),this.boxShadow=lr(c,js,i.boxShadow),this.color=lr(c,Rs,i.color),this.direction=lr(c,la,i.direction),this.display=lr(c,Ua,i.display),this.float=lr(c,pA,i.cssFloat),this.fontFamily=lr(c,kl,i.fontFamily),this.fontSize=lr(c,Cs,i.fontSize),this.fontStyle=lr(c,Bo,i.fontStyle),this.fontVariant=lr(c,TA,i.fontVariant),this.fontWeight=lr(c,Ut,i.fontWeight),this.letterSpacing=lr(c,mA,i.letterSpacing),this.lineBreak=lr(c,mo,i.lineBreak),this.lineHeight=lr(c,Gi,i.lineHeight),this.listStyleImage=lr(c,vo,i.listStyleImage),this.listStylePosition=lr(c,Bl,i.listStylePosition),this.listStyleType=lr(c,Zs,i.listStyleType),this.marginTop=lr(c,bl,i.marginTop),this.marginRight=lr(c,Cl,i.marginRight),this.marginBottom=lr(c,xl,i.marginBottom),this.marginLeft=lr(c,vA,i.marginLeft),this.opacity=lr(c,Eo,i.opacity);var n=lr(c,_A,i.overflow);this.overflowX=n[0],this.overflowY=n[n.length>1?1:0],this.overflowWrap=lr(c,_o,i.overflowWrap),this.paddingTop=lr(c,Sl,i.paddingTop),this.paddingRight=lr(c,yA,i.paddingRight),this.paddingBottom=lr(c,Tl,i.paddingBottom),this.paddingLeft=lr(c,EA,i.paddingLeft),this.paintOrder=lr(c,bo,i.paintOrder),this.position=lr(c,wA,i.position),this.textAlign=lr(c,Il,i.textAlign),this.textDecorationColor=lr(c,wo,(e=i.textDecorationColor)!==null&&e!==void 0?e:i.color),this.textDecorationLine=lr(c,zs,(t=i.textDecorationLine)!==null&&t!==void 0?t:i.textDecoration),this.textShadow=lr(c,Fl,i.textShadow),this.textTransform=lr(c,Dl,i.textTransform),this.transform=lr(c,Rl,i.transform),this.transformOrigin=lr(c,xA,i.transformOrigin),this.visibility=lr(c,Bi,i.visibility),this.webkitTextStrokeColor=lr(c,FA,i.webkitTextStrokeColor),this.webkitTextStrokeWidth=lr(c,Pa,i.webkitTextStrokeWidth),this.wordBreak=lr(c,yo,i.wordBreak),this.zIndex=lr(c,Ul,i.zIndex)}return f.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},f.prototype.isTransparent=function(){return Ci(this.backgroundColor)},f.prototype.isTransformed=function(){return this.transform!==null},f.prototype.isPositioned=function(){return this.position!==0},f.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},f.prototype.isFloating=function(){return this.float!==0},f.prototype.isInlineLevel=function(){return yi(this.display,4)||yi(this.display,33554432)||yi(this.display,268435456)||yi(this.display,536870912)||yi(this.display,67108864)||yi(this.display,134217728)},f}(),Nl=function(){function f(c,i){this.content=lr(c,ca,i.content),this.quotes=lr(c,Ml,i.quotes)}return f}(),Co=function(){function f(c,i){this.counterIncrement=lr(c,Ol,i.counterIncrement),this.counterReset=lr(c,Pl,i.counterReset)}return f}(),lr=function(f,c,i){var e=new ur,t=i!==null&&typeof i!="undefined"?i.toString():c.initialValue;e.write(t);var n=new hr(e.read());switch(c.type){case 2:var r=n.parseComponentValue();return c.parse(f,wn(r)?r.value:c.initialValue);case 0:return c.parse(f,n.parseComponentValue());case 1:return c.parse(f,n.parseComponentValues());case 4:return n.parseComponentValue();case 3:switch(c.format){case"angle":return zi.parse(f,n.parseComponentValue());case"color":return di.parse(f,n.parseComponentValue());case"image":return Ri.parse(f,n.parseComponentValue());case"length":var s=n.parseComponentValue();return ri(s)?s:Ur;case"length-percentage":var a=n.parseComponentValue();return Pr(a)?a:Ur;case"time":return SA.parse(f,n.parseComponentValue())}break}},Hl="data-html2canvas-debug",Qa=function(f){var c=f.getAttribute(Hl);switch(c){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},xo=function(f,c){var i=Qa(f);return i===1||c===i},os=function(){function f(c,i){if(this.context=c,this.textNodes=[],this.elements=[],this.flags=0,xo(i,3))debugger;this.styles=new Xi(c,window.getComputedStyle(i,null)),qs(i)&&(this.styles.animationDuration.some(function(e){return e>0})&&(i.style.animationDuration="0s"),this.styles.transform!==null&&(i.style.transform="none")),this.bounds=h(this.context,i),xo(i,4)&&(this.flags|=16)}return f}(),_s="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",fa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ys=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ma=0;Ma<fa.length;Ma++)Ys[fa.charCodeAt(Ma)]=Ma;for(var So=function(f){var c=f.length*.75,i=f.length,e,t=0,n,r,s,a;f[f.length-1]==="="&&(c--,f[f.length-2]==="="&&c--);var o=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(c):new Array(c),u=Array.isArray(o)?o:new Uint8Array(o);for(e=0;e<i;e+=4)n=Ys[f.charCodeAt(e)],r=Ys[f.charCodeAt(e+1)],s=Ys[f.charCodeAt(e+2)],a=Ys[f.charCodeAt(e+3)],u[t++]=n<<2|r>>4,u[t++]=(r&15)<<4|s>>2,u[t++]=(s&3)<<6|a&63;return o},da=function(f){for(var c=f.length,i=[],e=0;e<c;e+=2)i.push(f[e+1]<<8|f[e]);return i},Kl=function(f){for(var c=f.length,i=[],e=0;e<c;e+=4)i.push(f[e+3]<<24|f[e+2]<<16|f[e+1]<<8|f[e]);return i},Ls=5,Na=11,Ha=2,DA=Na-Ls,RA=65536>>Ls,To=1<<Ls,Ka=To-1,ha=1024>>Ls,Io=RA+ha,Gl=Io,$l=32,LA=Gl+$l,UA=65536>>Na,Vl=1<<DA,Zl=Vl-1,Fo=function(f,c,i){return f.slice?f.slice(c,i):new Uint16Array(Array.prototype.slice.call(f,c,i))},Wl=function(f,c,i){return f.slice?f.slice(c,i):new Uint32Array(Array.prototype.slice.call(f,c,i))},Do=function(f,c){var i=So(f),e=Array.isArray(i)?Kl(i):new Uint32Array(i),t=Array.isArray(i)?da(i):new Uint16Array(i),n=24,r=Fo(t,n/2,e[4]/2),s=e[5]===2?Fo(t,(n+e[4])/2):Wl(e,Math.ceil((n+e[4])/4));return new Ro(e[0],e[1],e[2],e[3],r,s)},Ro=function(){function f(c,i,e,t,n,r){this.initialValue=c,this.errorValue=i,this.highStart=e,this.highValueIndex=t,this.index=n,this.data=r}return f.prototype.get=function(c){var i;if(c>=0){if(c<55296||c>56319&&c<=65535)return i=this.index[c>>Ls],i=(i<<Ha)+(c&Ka),this.data[i];if(c<=65535)return i=this.index[RA+(c-55296>>Ls)],i=(i<<Ha)+(c&Ka),this.data[i];if(c<this.highStart)return i=LA-UA+(c>>Na),i=this.index[i],i+=c>>Ls&Zl,i=this.index[i],i=(i<<Ha)+(c&Ka),this.data[i];if(c<=1114111)return this.data[this.highValueIndex]}return this.errorValue},f}(),zl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Oi=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Lo=0;Lo<zl.length;Lo++)Oi[zl.charCodeAt(Lo)]=Lo;var jl=1,kA=2,OA=3,Yl=4,Xl=5,ga=7,PA=8,xs=9,Uo=10,QA=11,MA=12,As=13,ko=14,Ga=15,Jl=function(f){for(var c=[],i=0,e=f.length;i<e;){var t=f.charCodeAt(i++);if(t>=55296&&t<=56319&&i<e){var n=f.charCodeAt(i++);(n&64512)===56320?c.push(((t&1023)<<10)+(n&1023)+65536):(c.push(t),i--)}else c.push(t)}return c},ql=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];if(String.fromCodePoint)return String.fromCodePoint.apply(String,f);var i=f.length;if(!i)return"";for(var e=[],t=-1,n="";++t<i;){var r=f[t];r<=65535?e.push(r):(r-=65536,e.push((r>>10)+55296,r%1024+56320)),(t+1===i||e.length>16384)&&(n+=String.fromCharCode.apply(String,e),e.length=0)}return n},eu=Do(_s),Ji="\xD7",Oo="\xF7",tu=function(f){return eu.get(f)},nu=function(f,c,i){var e=i-2,t=c[e],n=c[i-1],r=c[i];if(n===kA&&r===OA)return Ji;if(n===kA||n===OA||n===Yl||r===kA||r===OA||r===Yl)return Oo;if(n===PA&&[PA,xs,QA,MA].indexOf(r)!==-1||(n===QA||n===xs)&&(r===xs||r===Uo)||(n===MA||n===Uo)&&r===Uo||r===As||r===Xl||r===ga||n===jl)return Ji;if(n===As&&r===ko){for(;t===Xl;)t=c[--e];if(t===ko)return Ji}if(n===Ga&&r===Ga){for(var s=0;t===Ga;)s++,t=c[--e];if(s%2===0)return Ji}return Oo},NA=function(f){var c=Jl(f),i=c.length,e=0,t=0,n=c.map(tu);return{next:function(){if(e>=i)return{done:!0,value:null};for(var r=Ji;e<i&&(r=nu(c,n,++e))===Ji;);if(r!==Ji||e===i){var s=ql.apply(null,c.slice(t,e));return t=e,{value:s,done:!1}}return{done:!0,value:null}}}},ru=function(f){for(var c=NA(f),i=[],e;!(e=c.next()).done;)e.value&&i.push(e.value.slice());return i},HA=function(f){var c=123;if(f.createRange){var i=f.createRange();if(i.getBoundingClientRect){var e=f.createElement("boundtest");e.style.height=c+"px",e.style.display="block",f.body.appendChild(e),i.selectNode(e);var t=i.getBoundingClientRect(),n=Math.round(t.height);if(f.body.removeChild(e),n===c)return!0}}return!1},iu=function(f){var c=f.createElement("boundtest");c.style.width="50px",c.style.display="block",c.style.fontSize="12px",c.style.letterSpacing="0px",c.style.wordSpacing="0px",f.body.appendChild(c);var i=f.createRange();c.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var e=c.firstChild,t=ie(e.data).map(function(a){return A(a)}),n=0,r={},s=t.every(function(a,o){i.setStart(e,n),i.setEnd(e,n+a.length);var u=i.getBoundingClientRect();n+=a.length;var l=u.x>r.x||u.y>r.y;return r=u,o===0?!0:l});return f.body.removeChild(c),s},su=function(){return typeof new Image().crossOrigin!="undefined"},au=function(){return typeof new XMLHttpRequest().responseType=="string"},ou=function(f){var c=new Image,i=f.createElement("canvas"),e=i.getContext("2d");if(!e)return!1;c.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{e.drawImage(c,0,0),i.toDataURL()}catch(t){return!1}return!0},KA=function(f){return f[0]===0&&f[1]===255&&f[2]===0&&f[3]===255},Au=function(f){var c=f.createElement("canvas"),i=100;c.width=i,c.height=i;var e=c.getContext("2d");if(!e)return Promise.reject(!1);e.fillStyle="rgb(0, 255, 0)",e.fillRect(0,0,i,i);var t=new Image,n=c.toDataURL();t.src=n;var r=Po(i,i,0,0,t);return e.fillStyle="red",e.fillRect(0,0,i,i),Qo(r).then(function(s){e.drawImage(s,0,0);var a=e.getImageData(0,0,i,i).data;e.fillStyle="red",e.fillRect(0,0,i,i);var o=f.createElement("div");return o.style.backgroundImage="url("+n+")",o.style.height=i+"px",KA(a)?Qo(Po(i,i,0,0,o)):Promise.reject(!1)}).then(function(s){return e.drawImage(s,0,0),KA(e.getImageData(0,0,i,i).data)}).catch(function(){return!1})},Po=function(f,c,i,e,t){var n="http://www.w3.org/2000/svg",r=document.createElementNS(n,"svg"),s=document.createElementNS(n,"foreignObject");return r.setAttributeNS(null,"width",f.toString()),r.setAttributeNS(null,"height",c.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",i.toString()),s.setAttributeNS(null,"y",e.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),r.appendChild(s),s.appendChild(t),r},Qo=function(f){return new Promise(function(c,i){var e=new Image;e.onload=function(){return c(e)},e.onerror=i,e.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(f))})},Ei={get SUPPORT_RANGE_BOUNDS(){var f=HA(document);return Object.defineProperty(Ei,"SUPPORT_RANGE_BOUNDS",{value:f}),f},get SUPPORT_WORD_BREAKING(){var f=Ei.SUPPORT_RANGE_BOUNDS&&iu(document);return Object.defineProperty(Ei,"SUPPORT_WORD_BREAKING",{value:f}),f},get SUPPORT_SVG_DRAWING(){var f=ou(document);return Object.defineProperty(Ei,"SUPPORT_SVG_DRAWING",{value:f}),f},get SUPPORT_FOREIGNOBJECT_DRAWING(){var f=typeof Array.from=="function"&&typeof window.fetch=="function"?Au(document):Promise.resolve(!1);return Object.defineProperty(Ei,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:f}),f},get SUPPORT_CORS_IMAGES(){var f=su();return Object.defineProperty(Ei,"SUPPORT_CORS_IMAGES",{value:f}),f},get SUPPORT_RESPONSE_TYPE(){var f=au();return Object.defineProperty(Ei,"SUPPORT_RESPONSE_TYPE",{value:f}),f},get SUPPORT_CORS_XHR(){var f="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Ei,"SUPPORT_CORS_XHR",{value:f}),f},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var f=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Ei,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:f}),f}},pa=function(){function f(c,i){this.text=c,this.bounds=i}return f}(),Mo=function(f,c,i,e){var t=uu(c,i),n=[],r=0;return t.forEach(function(s){if(i.textDecorationLine.length||s.trim().length>0)if(Ei.SUPPORT_RANGE_BOUNDS){var a=Ho(e,r,s.length).getClientRects();if(a.length>1){var o=Ko(s),u=0;o.forEach(function(d){n.push(new pa(d,Q.fromDOMRectList(f,Ho(e,u+r,d.length).getClientRects()))),u+=d.length})}else n.push(new pa(s,Q.fromDOMRectList(f,a)))}else{var l=e.splitText(s.length);n.push(new pa(s,No(f,e))),e=l}else Ei.SUPPORT_RANGE_BOUNDS||(e=e.splitText(s.length));r+=s.length}),n},No=function(f,c){var i=c.ownerDocument;if(i){var e=i.createElement("html2canvaswrapper");e.appendChild(c.cloneNode(!0));var t=c.parentNode;if(t){t.replaceChild(e,c);var n=h(f,e);return e.firstChild&&t.replaceChild(e.firstChild,e),n}}return Q.EMPTY},Ho=function(f,c,i){var e=f.ownerDocument;if(!e)throw new Error("Node has no owner document");var t=e.createRange();return t.setStart(f,c),t.setEnd(f,c+i),t},Ko=function(f){if(Ei.SUPPORT_NATIVE_TEXT_SEGMENTATION){var c=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(c.segment(f)).map(function(i){return i.segment})}return ru(f)},lu=function(f,c){if(Ei.SUPPORT_NATIVE_TEXT_SEGMENTATION){var i=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(i.segment(f)).map(function(e){return e.segment})}return fu(f,c)},uu=function(f,c){return c.letterSpacing!==0?Ko(f):lu(f,c)},cu=[32,160,4961,65792,65793,4153,4241],fu=function(f,c){for(var i=kn(f,{lineBreak:c.lineBreak,wordBreak:c.overflowWrap==="break-word"?"break-word":c.wordBreak}),e=[],t,n=function(){if(t.value){var r=t.value.slice(),s=ie(r),a="";s.forEach(function(o){cu.indexOf(o)===-1?a+=A(o):(a.length&&e.push(a),e.push(A(o)),a="")}),a.length&&e.push(a)}};!(t=i.next()).done;)n();return e},du=function(){function f(c,i,e){this.text=$a(i.data,e.textTransform),this.textBounds=Mo(c,this.text,e,i)}return f}(),$a=function(f,c){switch(c){case 1:return f.toLowerCase();case 3:return f.replace(hu,Va);case 2:return f.toUpperCase();default:return f}},hu=/(^|\s|:|-|\(|\))([a-z])/g,Va=function(f,c,i){return f.length>0?c+i.toUpperCase():f},GA=function(f){C(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.src=e.currentSrc||e.src,t.intrinsicWidth=e.naturalWidth,t.intrinsicHeight=e.naturalHeight,t.context.cache.addImage(t.src),t}return c}(os),$A=function(f){C(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.canvas=e,t.intrinsicWidth=e.width,t.intrinsicHeight=e.height,t}return c}(os),Go=function(f){C(c,f);function c(i,e){var t=f.call(this,i,e)||this,n=new XMLSerializer,r=h(i,e);return e.setAttribute("width",r.width+"px"),e.setAttribute("height",r.height+"px"),t.svg="data:image/svg+xml,"+encodeURIComponent(n.serializeToString(e)),t.intrinsicWidth=e.width.baseVal.value,t.intrinsicHeight=e.height.baseVal.value,t.context.cache.addImage(t.svg),t}return c}(os),VA=function(f){C(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.value=e.value,t}return c}(os),$o=function(f){C(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.start=e.start,t.reversed=typeof e.reversed=="boolean"&&e.reversed===!0,t}return c}(os),gu=[{type:15,flags:0,unit:"px",number:3}],pu=[{type:16,flags:0,number:50}],ZA=function(f){return f.width>f.height?new Q(f.left+(f.width-f.height)/2,f.top,f.height,f.height):f.width<f.height?new Q(f.left,f.top+(f.height-f.width)/2,f.width,f.width):f},mu=function(f){var c=f.type===vu?new Array(f.value.length+1).join("\u2022"):f.value;return c.length===0?f.placeholder||"":c},Za="checkbox",Wa="radio",vu="password",Vo=707406591,za=function(f){C(c,f);function c(i,e){var t=f.call(this,i,e)||this;switch(t.type=e.type.toLowerCase(),t.checked=e.checked,t.value=mu(e),(t.type===Za||t.type===Wa)&&(t.styles.backgroundColor=3739148031,t.styles.borderTopColor=t.styles.borderRightColor=t.styles.borderBottomColor=t.styles.borderLeftColor=2779096575,t.styles.borderTopWidth=t.styles.borderRightWidth=t.styles.borderBottomWidth=t.styles.borderLeftWidth=1,t.styles.borderTopStyle=t.styles.borderRightStyle=t.styles.borderBottomStyle=t.styles.borderLeftStyle=1,t.styles.backgroundClip=[0],t.styles.backgroundOrigin=[0],t.bounds=ZA(t.bounds)),t.type){case Za:t.styles.borderTopRightRadius=t.styles.borderTopLeftRadius=t.styles.borderBottomRightRadius=t.styles.borderBottomLeftRadius=gu;break;case Wa:t.styles.borderTopRightRadius=t.styles.borderTopLeftRadius=t.styles.borderBottomRightRadius=t.styles.borderBottomLeftRadius=pu;break}return t}return c}(os),Pi=function(f){C(c,f);function c(i,e){var t=f.call(this,i,e)||this,n=e.options[e.selectedIndex||0];return t.value=n&&n.text||"",t}return c}(os),$i=function(f){C(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.value=e.value,t}return c}(os),Us=function(f){C(c,f);function c(i,e){var t=f.call(this,i,e)||this;t.src=e.src,t.width=parseInt(e.width,10)||0,t.height=parseInt(e.height,10)||0,t.backgroundColor=t.styles.backgroundColor;try{if(e.contentWindow&&e.contentWindow.document&&e.contentWindow.document.documentElement){t.tree=Wo(i,e.contentWindow.document.documentElement);var n=e.contentWindow.document.documentElement?xr(i,getComputedStyle(e.contentWindow.document.documentElement).backgroundColor):Hr.TRANSPARENT,r=e.contentWindow.document.body?xr(i,getComputedStyle(e.contentWindow.document.body).backgroundColor):Hr.TRANSPARENT;t.backgroundColor=Ci(n)?Ci(r)?t.styles.backgroundColor:r:n}}catch(s){}return t}return c}(os),qi=["OL","UL","MENU"],ja=function(f,c,i,e){for(var t=c.firstChild,n=void 0;t;t=n)if(n=t.nextSibling,WA(t)&&t.data.trim().length>0)i.textNodes.push(new du(f,t,i.styles));else if(Js(t))if(ys(t)&&t.assignedNodes)t.assignedNodes().forEach(function(s){return ja(f,s,i,e)});else{var r=Zo(f,t);r.styles.isVisible()&&(Xs(t,r,e)?r.flags|=4:zo(r.styles)&&(r.flags|=2),qi.indexOf(t.tagName)!==-1&&(r.flags|=8),i.elements.push(r),t.slot,t.shadowRoot?ja(f,t.shadowRoot,r,e):!_a(t)&&!zA(t)&&!qa(t)&&ja(f,t,r,e))}},Zo=function(f,c){return va(c)?new GA(f,c):Ja(c)?new $A(f,c):zA(c)?new Go(f,c):_u(c)?new VA(f,c):ma(c)?new $o(f,c):ea(c)?new za(f,c):qa(c)?new Pi(f,c):_a(c)?new $i(f,c):jA(c)?new Us(f,c):new os(f,c)},Wo=function(f,c){var i=Zo(f,c);return i.flags|=4,ja(f,c,i,i),i},Xs=function(f,c,i){return c.styles.isPositionedWithZIndex()||c.styles.opacity<1||c.styles.isTransformed()||jo(f)&&i.styles.isTransparent()},zo=function(f){return f.isPositioned()||f.isFloating()},WA=function(f){return f.nodeType===Node.TEXT_NODE},Js=function(f){return f.nodeType===Node.ELEMENT_NODE},qs=function(f){return Js(f)&&typeof f.style!="undefined"&&!Ya(f)},Ya=function(f){return typeof f.className=="object"},_u=function(f){return f.tagName==="LI"},ma=function(f){return f.tagName==="OL"},ea=function(f){return f.tagName==="INPUT"},Xa=function(f){return f.tagName==="HTML"},zA=function(f){return f.tagName==="svg"},jo=function(f){return f.tagName==="BODY"},Ja=function(f){return f.tagName==="CANVAS"},Yo=function(f){return f.tagName==="VIDEO"},va=function(f){return f.tagName==="IMG"},jA=function(f){return f.tagName==="IFRAME"},ks=function(f){return f.tagName==="STYLE"},yu=function(f){return f.tagName==="SCRIPT"},_a=function(f){return f.tagName==="TEXTAREA"},qa=function(f){return f.tagName==="SELECT"},ys=function(f){return f.tagName==="SLOT"},YA=function(f){return f.tagName.indexOf("-")>0},XA=function(){function f(){this.counters={}}return f.prototype.getCounterValue=function(c){var i=this.counters[c];return i&&i.length?i[i.length-1]:1},f.prototype.getCounterValues=function(c){var i=this.counters[c];return i||[]},f.prototype.pop=function(c){var i=this;c.forEach(function(e){return i.counters[e].pop()})},f.prototype.parse=function(c){var i=this,e=c.counterIncrement,t=c.counterReset,n=!0;e!==null&&e.forEach(function(s){var a=i.counters[s.counter];a&&s.increment!==0&&(n=!1,a.length||a.push(1),a[Math.max(0,a.length-1)]+=s.increment)});var r=[];return n&&t.forEach(function(s){var a=i.counters[s.counter];r.push(s.counter),a||(a=i.counters[s.counter]=[]),a.push(s.reset)}),r},f}(),JA={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Xo={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},Eu={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},wu={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},ta=function(f,c,i,e,t,n){return f<c||f>i?Ea(f,t,n.length>0):e.integers.reduce(function(r,s,a){for(;f>=s;)f-=s,r+=e.values[a];return r},"")+n},Jo=function(f,c,i,e){var t="";do i||f--,t=e(f)+t,f/=c;while(f*c>=c);return t},jr=function(f,c,i,e,t){var n=i-c+1;return(f<0?"-":"")+(Jo(Math.abs(f),n,e,function(r){return A(Math.floor(r%n)+c)})+t)},Li=function(f,c,i){i===void 0&&(i=". ");var e=c.length;return Jo(Math.abs(f),e,!1,function(t){return c[Math.floor(t%e)]})+i},na=1,Ss=2,Ts=4,ya=8,Es=function(f,c,i,e,t,n){if(f<-9999||f>9999)return Ea(f,4,t.length>0);var r=Math.abs(f),s=t;if(r===0)return c[0]+s;for(var a=0;r>0&&a<=4;a++){var o=r%10;o===0&&yi(n,na)&&s!==""?s=c[o]+s:o>1||o===1&&a===0||o===1&&a===1&&yi(n,Ss)||o===1&&a===1&&yi(n,Ts)&&f>100||o===1&&a>1&&yi(n,ya)?s=c[o]+(a>0?i[a-1]:"")+s:o===1&&a>0&&(s=i[a-1]+s),r=Math.floor(r/10)}return(f<0?e:"")+s},qA="\u5341\u767E\u5343\u842C",Is="\u62FE\u4F70\u4EDF\u842C",qo="\u30DE\u30A4\u30CA\u30B9",eA="\uB9C8\uC774\uB108\uC2A4",Ea=function(f,c,i){var e=i?". ":"",t=i?"\u3001":"",n=i?", ":"",r=i?" ":"";switch(c){case 0:return"\u2022"+r;case 1:return"\u25E6"+r;case 2:return"\u25FE"+r;case 5:var s=jr(f,48,57,!0,e);return s.length<4?"0"+s:s;case 4:return Li(f,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",t);case 6:return ta(f,1,3999,JA,3,e).toLowerCase();case 7:return ta(f,1,3999,JA,3,e);case 8:return jr(f,945,969,!1,e);case 9:return jr(f,97,122,!1,e);case 10:return jr(f,65,90,!1,e);case 11:return jr(f,1632,1641,!0,e);case 12:case 49:return ta(f,1,9999,Xo,3,e);case 35:return ta(f,1,9999,Xo,3,e).toLowerCase();case 13:return jr(f,2534,2543,!0,e);case 14:case 30:return jr(f,6112,6121,!0,e);case 15:return Li(f,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",t);case 16:return Li(f,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",t);case 17:case 48:return Es(f,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",qA,"\u8CA0",t,Ss|Ts|ya);case 47:return Es(f,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Is,"\u8CA0",t,na|Ss|Ts|ya);case 42:return Es(f,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",qA,"\u8D1F",t,Ss|Ts|ya);case 41:return Es(f,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Is,"\u8D1F",t,na|Ss|Ts|ya);case 26:return Es(f,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",qo,t,0);case 25:return Es(f,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",qo,t,na|Ss|Ts);case 31:return Es(f,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",eA,n,na|Ss|Ts);case 33:return Es(f,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",eA,n,0);case 32:return Es(f,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",eA,n,na|Ss|Ts);case 18:return jr(f,2406,2415,!0,e);case 20:return ta(f,1,19999,wu,3,e);case 21:return jr(f,2790,2799,!0,e);case 22:return jr(f,2662,2671,!0,e);case 22:return ta(f,1,10999,Eu,3,e);case 23:return Li(f,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Li(f,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return jr(f,3302,3311,!0,e);case 28:return Li(f,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",t);case 29:return Li(f,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",t);case 34:return jr(f,3792,3801,!0,e);case 37:return jr(f,6160,6169,!0,e);case 38:return jr(f,4160,4169,!0,e);case 39:return jr(f,2918,2927,!0,e);case 40:return jr(f,1776,1785,!0,e);case 43:return jr(f,3046,3055,!0,e);case 44:return jr(f,3174,3183,!0,e);case 45:return jr(f,3664,3673,!0,e);case 46:return jr(f,3872,3881,!0,e);case 3:default:return jr(f,48,57,!0,e)}},eo="data-html2canvas-ignore",tA=function(){function f(c,i,e){if(this.context=c,this.options=e,this.scrolledElements=[],this.referenceElement=i,this.counters=new XA,this.quoteDepth=0,!i.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(i.ownerDocument.documentElement,!1)}return f.prototype.toIFrame=function(c,i){var e=this,t=to(c,i);if(!t.contentWindow)return Promise.reject("Unable to find iframe window");var n=c.defaultView.pageXOffset,r=c.defaultView.pageYOffset,s=t.contentWindow,a=s.document,o=nA(t).then(function(){return ae(e,void 0,void 0,function(){var u,l;return ve(this,function(d){switch(d.label){case 0:return this.scrolledElements.forEach(rA),s&&(s.scrollTo(i.left,i.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(s.scrollY!==i.top||s.scrollX!==i.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(s.scrollX-i.left,s.scrollY-i.top,0,0))),u=this.options.onclone,l=this.clonedReferenceElement,typeof l=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:d.sent(),d.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,bu(a)]:[3,4];case 3:d.sent(),d.label=4;case 4:return typeof u=="function"?[2,Promise.resolve().then(function(){return u(a,l)}).then(function(){return t})]:[2,t]}})})});return a.open(),a.write(xu(document.doctype)+"<html></html>"),el(this.referenceElement.ownerDocument,n,r),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),o},f.prototype.createElementClone=function(c){if(xo(c,2))debugger;if(Ja(c))return this.createCanvasClone(c);if(Yo(c))return this.createVideoClone(c);if(ks(c))return this.createStyleClone(c);var i=c.cloneNode(!1);return va(i)&&(va(c)&&c.currentSrc&&c.currentSrc!==c.src&&(i.src=c.currentSrc,i.srcset=""),i.loading==="lazy"&&(i.loading="eager")),YA(i)?this.createCustomElementClone(i):i},f.prototype.createCustomElementClone=function(c){var i=document.createElement("html2canvascustomelement");return no(c.style,i),i},f.prototype.createStyleClone=function(c){try{var i=c.sheet;if(i&&i.cssRules){var e=[].slice.call(i.cssRules,0).reduce(function(n,r){return r&&typeof r.cssText=="string"?n+r.cssText:n},""),t=c.cloneNode(!1);return t.textContent=e,t}}catch(n){if(this.context.logger.error("Unable to access cssRules property",n),n.name!=="SecurityError")throw n}return c.cloneNode(!1)},f.prototype.createCanvasClone=function(c){var i;if(this.options.inlineImages&&c.ownerDocument){var e=c.ownerDocument.createElement("img");try{return e.src=c.toDataURL(),e}catch(o){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",c)}}var t=c.cloneNode(!1);try{t.width=c.width,t.height=c.height;var n=c.getContext("2d"),r=t.getContext("2d");if(r)if(!this.options.allowTaint&&n)r.putImageData(n.getImageData(0,0,c.width,c.height),0,0);else{var s=(i=c.getContext("webgl2"))!==null&&i!==void 0?i:c.getContext("webgl");if(s){var a=s.getContextAttributes();(a==null?void 0:a.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",c)}r.drawImage(c,0,0)}return t}catch(o){this.context.logger.info("Unable to clone canvas as it is tainted",c)}return t},f.prototype.createVideoClone=function(c){var i=c.ownerDocument.createElement("canvas");i.width=c.offsetWidth,i.height=c.offsetHeight;var e=i.getContext("2d");try{return e&&(e.drawImage(c,0,0,i.width,i.height),this.options.allowTaint||e.getImageData(0,0,i.width,i.height)),i}catch(n){this.context.logger.info("Unable to clone video as it is tainted",c)}var t=c.ownerDocument.createElement("canvas");return t.width=c.offsetWidth,t.height=c.offsetHeight,t},f.prototype.appendChildNode=function(c,i,e){(!Js(i)||!yu(i)&&!i.hasAttribute(eo)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(i)))&&(!this.options.copyStyles||!Js(i)||!ks(i))&&c.appendChild(this.cloneNode(i,e))},f.prototype.cloneChildNodes=function(c,i,e){for(var t=this,n=c.shadowRoot?c.shadowRoot.firstChild:c.firstChild;n;n=n.nextSibling)if(Js(n)&&ys(n)&&typeof n.assignedNodes=="function"){var r=n.assignedNodes();r.length&&r.forEach(function(s){return t.appendChildNode(i,s,e)})}else this.appendChildNode(i,n,e)},f.prototype.cloneNode=function(c,i){if(WA(c))return document.createTextNode(c.data);if(!c.ownerDocument)return c.cloneNode(!1);var e=c.ownerDocument.defaultView;if(e&&Js(c)&&(qs(c)||Ya(c))){var t=this.createElementClone(c);t.style.transitionProperty="none";var n=e.getComputedStyle(c),r=e.getComputedStyle(c,":before"),s=e.getComputedStyle(c,":after");this.referenceElement===c&&qs(t)&&(this.clonedReferenceElement=t),jo(t)&&sA(t);var a=this.counters.parse(new Co(this.context,n)),o=this.resolvePseudoContent(c,t,r,ra.BEFORE);YA(c)&&(i=!0),Yo(c)||this.cloneChildNodes(c,t,i),o&&t.insertBefore(o,t.firstChild);var u=this.resolvePseudoContent(c,t,s,ra.AFTER);return u&&t.appendChild(u),this.counters.pop(a),(n&&(this.options.copyStyles||Ya(c))&&!jA(c)||i)&&no(n,t),(c.scrollTop!==0||c.scrollLeft!==0)&&this.scrolledElements.push([t,c.scrollLeft,c.scrollTop]),(_a(c)||qa(c))&&(_a(t)||qa(t))&&(t.value=c.value),t}return c.cloneNode(!1)},f.prototype.resolvePseudoContent=function(c,i,e,t){var n=this;if(e){var r=e.content,s=i.ownerDocument;if(!(!s||!r||r==="none"||r==="-moz-alt-content"||e.display==="none")){this.counters.parse(new Co(this.context,e));var a=new Nl(this.context,e),o=s.createElement("html2canvaspseudoelement");no(e,o),a.content.forEach(function(l){if(l.type===0)o.appendChild(s.createTextNode(l.value));else if(l.type===22){var d=s.createElement("img");d.src=l.value,d.style.opacity="1",o.appendChild(d)}else if(l.type===18){if(l.name==="attr"){var g=l.values.filter(wn);g.length&&o.appendChild(s.createTextNode(c.getAttribute(g[0].value)||""))}else if(l.name==="counter"){var m=l.values.filter(wr),w=m[0],x=m[1];if(w&&wn(w)){var H=n.counters.getCounterValue(w.value),P=x&&wn(x)?Zs.parse(n.context,x.value):3;o.appendChild(s.createTextNode(Ea(H,P,!1)))}}else if(l.name==="counters"){var me=l.values.filter(wr),w=me[0],De=me[1],x=me[2];if(w&&wn(w)){var be=n.counters.getCounterValues(w.value),Ue=x&&wn(x)?Zs.parse(n.context,x.value):3,ot=De&&De.type===0?De.value:"",Dt=be.map(function(Nt){return Ea(Nt,Ue,!1)}).join(ot);o.appendChild(s.createTextNode(Dt))}}}else if(l.type===20)switch(l.value){case"open-quote":o.appendChild(s.createTextNode(IA(a.quotes,n.quoteDepth++,!0)));break;case"close-quote":o.appendChild(s.createTextNode(IA(a.quotes,--n.quoteDepth,!1)));break;default:o.appendChild(s.createTextNode(l.value))}}),o.className=io+" "+iA;var u=t===ra.BEFORE?" "+io:" "+iA;return Ya(i)?i.className.baseValue+=u:i.className+=u,o}}},f.destroy=function(c){return c.parentNode?(c.parentNode.removeChild(c),!0):!1},f}(),ra;(function(f){f[f.BEFORE=0]="BEFORE",f[f.AFTER=1]="AFTER"})(ra||(ra={}));var to=function(f,c){var i=f.createElement("iframe");return i.className="html2canvas-container",i.style.visibility="hidden",i.style.position="fixed",i.style.left="-10000px",i.style.top="0px",i.style.border="0",i.width=c.width.toString(),i.height=c.height.toString(),i.scrolling="no",i.setAttribute(eo,"true"),f.body.appendChild(i),i},Bu=function(f){return new Promise(function(c){if(f.complete){c();return}if(!f.src){c();return}f.onload=c,f.onerror=c})},bu=function(f){return Promise.all([].slice.call(f.images,0).map(Bu))},nA=function(f){return new Promise(function(c,i){var e=f.contentWindow;if(!e)return i("No window assigned for iframe");var t=e.document;e.onload=f.onload=function(){e.onload=f.onload=null;var n=setInterval(function(){t.body.childNodes.length>0&&t.readyState==="complete"&&(clearInterval(n),c(f))},50)}})},Cu=["all","d","content"],no=function(f,c){for(var i=f.length-1;i>=0;i--){var e=f.item(i);Cu.indexOf(e)===-1&&c.style.setProperty(e,f.getPropertyValue(e))}return c},xu=function(f){var c="";return f&&(c+="<!DOCTYPE ",f.name&&(c+=f.name),f.internalSubset&&(c+=f.internalSubset),f.publicId&&(c+='"'+f.publicId+'"'),f.systemId&&(c+='"'+f.systemId+'"'),c+=">"),c},el=function(f,c,i){f&&f.defaultView&&(c!==f.defaultView.pageXOffset||i!==f.defaultView.pageYOffset)&&f.defaultView.scrollTo(c,i)},rA=function(f){var c=f[0],i=f[1],e=f[2];c.scrollLeft=i,c.scrollTop=e},ro=":before",Su=":after",io="___html2canvas___pseudoelement_before",iA="___html2canvas___pseudoelement_after",tl=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,sA=function(f){Tu(f,"."+io+ro+tl+`
|
|
.`+iA+Su+tl)},Tu=function(f,c){var i=f.ownerDocument;if(i){var e=i.createElement("style");e.textContent=c,f.appendChild(e)}},so=function(){function f(){}return f.getOrigin=function(c){var i=f._link;return i?(i.href=c,i.href=i.href,i.protocol+i.hostname+i.port):"about:blank"},f.isSameOrigin=function(c){return f.getOrigin(c)===f._origin},f.setContext=function(c){f._link=c.document.createElement("a"),f._origin=f.getOrigin(c.location.href)},f._origin="about:blank",f}(),Iu=function(){function f(c,i){this.context=c,this._options=i,this._cache={}}return f.prototype.addImage=function(c){var i=Promise.resolve();return this.has(c)||(AA(c)||rl(c))&&(this._cache[c]=this.loadImage(c)).catch(function(){}),i},f.prototype.match=function(c){return this._cache[c]},f.prototype.loadImage=function(c){return ae(this,void 0,void 0,function(){var i,e,t,n,r=this;return ve(this,function(s){switch(s.label){case 0:return i=so.isSameOrigin(c),e=!oA(c)&&this._options.useCORS===!0&&Ei.SUPPORT_CORS_IMAGES&&!i,t=!oA(c)&&!i&&!AA(c)&&typeof this._options.proxy=="string"&&Ei.SUPPORT_CORS_XHR&&!e,!i&&this._options.allowTaint===!1&&!oA(c)&&!AA(c)&&!t&&!e?[2]:(n=c,t?[4,this.proxy(n)]:[3,2]);case 1:n=s.sent(),s.label=2;case 2:return this.context.logger.debug("Added image "+c.substring(0,256)),[4,new Promise(function(a,o){var u=new Image;u.onload=function(){return a(u)},u.onerror=o,(il(n)||e)&&(u.crossOrigin="anonymous"),u.src=n,u.complete===!0&&setTimeout(function(){return a(u)},500),r._options.imageTimeout>0&&setTimeout(function(){return o("Timed out ("+r._options.imageTimeout+"ms) loading image")},r._options.imageTimeout)})];case 3:return[2,s.sent()]}})})},f.prototype.has=function(c){return typeof this._cache[c]!="undefined"},f.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},f.prototype.proxy=function(c){var i=this,e=this._options.proxy;if(!e)throw new Error("No proxy defined");var t=c.substring(0,256);return new Promise(function(n,r){var s=Ei.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(a.status===200)if(s==="text")n(a.response);else{var l=new FileReader;l.addEventListener("load",function(){return n(l.result)},!1),l.addEventListener("error",function(d){return r(d)},!1),l.readAsDataURL(a.response)}else r("Failed to proxy resource "+t+" with status code "+a.status)},a.onerror=r;var o=e.indexOf("?")>-1?"&":"?";if(a.open("GET",""+e+o+"url="+encodeURIComponent(c)+"&responseType="+s),s!=="text"&&a instanceof XMLHttpRequest&&(a.responseType=s),i._options.imageTimeout){var u=i._options.imageTimeout;a.timeout=u,a.ontimeout=function(){return r("Timed out ("+u+"ms) proxying "+t)}}a.send()})},f}(),Fu=/^data:image\/svg\+xml/i,aA=/^data:image\/.*;base64,/i,nl=/^data:image\/.*/i,rl=function(f){return Ei.SUPPORT_SVG_DRAWING||!lA(f)},oA=function(f){return nl.test(f)},il=function(f){return aA.test(f)},AA=function(f){return f.substr(0,4)==="blob"},lA=function(f){return f.substr(-3).toLowerCase()==="svg"||Fu.test(f)},sr=function(){function f(c,i){this.type=0,this.x=c,this.y=i}return f.prototype.add=function(c,i){return new f(this.x+c,this.y+i)},f}(),Os=function(f,c,i){return new sr(f.x+(c.x-f.x)*i,f.y+(c.y-f.y)*i)},ao=function(){function f(c,i,e,t){this.type=1,this.start=c,this.startControl=i,this.endControl=e,this.end=t}return f.prototype.subdivide=function(c,i){var e=Os(this.start,this.startControl,c),t=Os(this.startControl,this.endControl,c),n=Os(this.endControl,this.end,c),r=Os(e,t,c),s=Os(t,n,c),a=Os(r,s,c);return i?new f(this.start,e,r,a):new f(a,s,n,this.end)},f.prototype.add=function(c,i){return new f(this.start.add(c,i),this.startControl.add(c,i),this.endControl.add(c,i),this.end.add(c,i))},f.prototype.reverse=function(){return new f(this.end,this.endControl,this.startControl,this.start)},f}(),Qi=function(f){return f.type===1},sl=function(){function f(c){var i=c.styles,e=c.bounds,t=bi(i.borderTopLeftRadius,e.width,e.height),n=t[0],r=t[1],s=bi(i.borderTopRightRadius,e.width,e.height),a=s[0],o=s[1],u=bi(i.borderBottomRightRadius,e.width,e.height),l=u[0],d=u[1],g=bi(i.borderBottomLeftRadius,e.width,e.height),m=g[0],w=g[1],x=[];x.push((n+a)/e.width),x.push((m+l)/e.width),x.push((r+w)/e.height),x.push((o+d)/e.height);var H=Math.max.apply(Math,x);H>1&&(n/=H,r/=H,a/=H,o/=H,l/=H,d/=H,m/=H,w/=H);var P=e.width-a,me=e.height-d,De=e.width-l,be=e.height-w,Ue=i.borderTopWidth,ot=i.borderRightWidth,Dt=i.borderBottomWidth,rt=i.borderLeftWidth,Ft=Gr(i.paddingTop,c.bounds.width),Nt=Gr(i.paddingRight,c.bounds.width),bt=Gr(i.paddingBottom,c.bounds.width),ln=Gr(i.paddingLeft,c.bounds.width);this.topLeftBorderDoubleOuterBox=n>0||r>0?ui(e.left+rt/3,e.top+Ue/3,n-rt/3,r-Ue/3,Zr.TOP_LEFT):new sr(e.left+rt/3,e.top+Ue/3),this.topRightBorderDoubleOuterBox=n>0||r>0?ui(e.left+P,e.top+Ue/3,a-ot/3,o-Ue/3,Zr.TOP_RIGHT):new sr(e.left+e.width-ot/3,e.top+Ue/3),this.bottomRightBorderDoubleOuterBox=l>0||d>0?ui(e.left+De,e.top+me,l-ot/3,d-Dt/3,Zr.BOTTOM_RIGHT):new sr(e.left+e.width-ot/3,e.top+e.height-Dt/3),this.bottomLeftBorderDoubleOuterBox=m>0||w>0?ui(e.left+rt/3,e.top+be,m-rt/3,w-Dt/3,Zr.BOTTOM_LEFT):new sr(e.left+rt/3,e.top+e.height-Dt/3),this.topLeftBorderDoubleInnerBox=n>0||r>0?ui(e.left+rt*2/3,e.top+Ue*2/3,n-rt*2/3,r-Ue*2/3,Zr.TOP_LEFT):new sr(e.left+rt*2/3,e.top+Ue*2/3),this.topRightBorderDoubleInnerBox=n>0||r>0?ui(e.left+P,e.top+Ue*2/3,a-ot*2/3,o-Ue*2/3,Zr.TOP_RIGHT):new sr(e.left+e.width-ot*2/3,e.top+Ue*2/3),this.bottomRightBorderDoubleInnerBox=l>0||d>0?ui(e.left+De,e.top+me,l-ot*2/3,d-Dt*2/3,Zr.BOTTOM_RIGHT):new sr(e.left+e.width-ot*2/3,e.top+e.height-Dt*2/3),this.bottomLeftBorderDoubleInnerBox=m>0||w>0?ui(e.left+rt*2/3,e.top+be,m-rt*2/3,w-Dt*2/3,Zr.BOTTOM_LEFT):new sr(e.left+rt*2/3,e.top+e.height-Dt*2/3),this.topLeftBorderStroke=n>0||r>0?ui(e.left+rt/2,e.top+Ue/2,n-rt/2,r-Ue/2,Zr.TOP_LEFT):new sr(e.left+rt/2,e.top+Ue/2),this.topRightBorderStroke=n>0||r>0?ui(e.left+P,e.top+Ue/2,a-ot/2,o-Ue/2,Zr.TOP_RIGHT):new sr(e.left+e.width-ot/2,e.top+Ue/2),this.bottomRightBorderStroke=l>0||d>0?ui(e.left+De,e.top+me,l-ot/2,d-Dt/2,Zr.BOTTOM_RIGHT):new sr(e.left+e.width-ot/2,e.top+e.height-Dt/2),this.bottomLeftBorderStroke=m>0||w>0?ui(e.left+rt/2,e.top+be,m-rt/2,w-Dt/2,Zr.BOTTOM_LEFT):new sr(e.left+rt/2,e.top+e.height-Dt/2),this.topLeftBorderBox=n>0||r>0?ui(e.left,e.top,n,r,Zr.TOP_LEFT):new sr(e.left,e.top),this.topRightBorderBox=a>0||o>0?ui(e.left+P,e.top,a,o,Zr.TOP_RIGHT):new sr(e.left+e.width,e.top),this.bottomRightBorderBox=l>0||d>0?ui(e.left+De,e.top+me,l,d,Zr.BOTTOM_RIGHT):new sr(e.left+e.width,e.top+e.height),this.bottomLeftBorderBox=m>0||w>0?ui(e.left,e.top+be,m,w,Zr.BOTTOM_LEFT):new sr(e.left,e.top+e.height),this.topLeftPaddingBox=n>0||r>0?ui(e.left+rt,e.top+Ue,Math.max(0,n-rt),Math.max(0,r-Ue),Zr.TOP_LEFT):new sr(e.left+rt,e.top+Ue),this.topRightPaddingBox=a>0||o>0?ui(e.left+Math.min(P,e.width-ot),e.top+Ue,P>e.width+ot?0:Math.max(0,a-ot),Math.max(0,o-Ue),Zr.TOP_RIGHT):new sr(e.left+e.width-ot,e.top+Ue),this.bottomRightPaddingBox=l>0||d>0?ui(e.left+Math.min(De,e.width-rt),e.top+Math.min(me,e.height-Dt),Math.max(0,l-ot),Math.max(0,d-Dt),Zr.BOTTOM_RIGHT):new sr(e.left+e.width-ot,e.top+e.height-Dt),this.bottomLeftPaddingBox=m>0||w>0?ui(e.left+rt,e.top+Math.min(be,e.height-Dt),Math.max(0,m-rt),Math.max(0,w-Dt),Zr.BOTTOM_LEFT):new sr(e.left+rt,e.top+e.height-Dt),this.topLeftContentBox=n>0||r>0?ui(e.left+rt+ln,e.top+Ue+Ft,Math.max(0,n-(rt+ln)),Math.max(0,r-(Ue+Ft)),Zr.TOP_LEFT):new sr(e.left+rt+ln,e.top+Ue+Ft),this.topRightContentBox=a>0||o>0?ui(e.left+Math.min(P,e.width+rt+ln),e.top+Ue+Ft,P>e.width+rt+ln?0:a-rt+ln,o-(Ue+Ft),Zr.TOP_RIGHT):new sr(e.left+e.width-(ot+Nt),e.top+Ue+Ft),this.bottomRightContentBox=l>0||d>0?ui(e.left+Math.min(De,e.width-(rt+ln)),e.top+Math.min(me,e.height+Ue+Ft),Math.max(0,l-(ot+Nt)),d-(Dt+bt),Zr.BOTTOM_RIGHT):new sr(e.left+e.width-(ot+Nt),e.top+e.height-(Dt+bt)),this.bottomLeftContentBox=m>0||w>0?ui(e.left+rt+ln,e.top+be,Math.max(0,m-(rt+ln)),w-(Dt+bt),Zr.BOTTOM_LEFT):new sr(e.left+rt+ln,e.top+e.height-(Dt+bt))}return f}(),Zr;(function(f){f[f.TOP_LEFT=0]="TOP_LEFT",f[f.TOP_RIGHT=1]="TOP_RIGHT",f[f.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",f[f.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Zr||(Zr={}));var ui=function(f,c,i,e,t){var n=4*((Math.sqrt(2)-1)/3),r=i*n,s=e*n,a=f+i,o=c+e;switch(t){case Zr.TOP_LEFT:return new ao(new sr(f,o),new sr(f,o-s),new sr(a-r,c),new sr(a,c));case Zr.TOP_RIGHT:return new ao(new sr(f,c),new sr(f+r,c),new sr(a,o-s),new sr(a,o));case Zr.BOTTOM_RIGHT:return new ao(new sr(a,c),new sr(a,c+s),new sr(f+r,o),new sr(f,o));case Zr.BOTTOM_LEFT:default:return new ao(new sr(a,o),new sr(a-r,o),new sr(f,c+s),new sr(f,c))}},oo=function(f){return[f.topLeftBorderBox,f.topRightBorderBox,f.bottomRightBorderBox,f.bottomLeftBorderBox]},Ao=function(f){return[f.topLeftContentBox,f.topRightContentBox,f.bottomRightContentBox,f.bottomLeftContentBox]},lo=function(f){return[f.topLeftPaddingBox,f.topRightPaddingBox,f.bottomRightPaddingBox,f.bottomLeftPaddingBox]},al=function(){function f(c,i,e){this.offsetX=c,this.offsetY=i,this.matrix=e,this.type=0,this.target=6}return f}(),wa=function(){function f(c,i){this.path=c,this.target=i,this.type=1}return f}(),Du=function(){function f(c){this.opacity=c,this.type=2,this.target=6}return f}(),ol=function(f){return f.type===0},Al=function(f){return f.type===1},Ru=function(f){return f.type===2},ll=function(f,c){return f.length===c.length?f.some(function(i,e){return i===c[e]}):!1},Lu=function(f,c,i,e,t){return f.map(function(n,r){switch(r){case 0:return n.add(c,i);case 1:return n.add(c+e,i);case 2:return n.add(c+e,i+t);case 3:return n.add(c,i+t)}return n})},uA=function(){function f(c){this.element=c,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return f}(),ul=function(){function f(c,i){if(this.container=c,this.parent=i,this.effects=[],this.curves=new sl(this.container),this.container.styles.opacity<1&&this.effects.push(new Du(this.container.styles.opacity)),this.container.styles.transform!==null){var e=this.container.bounds.left+this.container.styles.transformOrigin[0].number,t=this.container.bounds.top+this.container.styles.transformOrigin[1].number,n=this.container.styles.transform;this.effects.push(new al(e,t,n))}if(this.container.styles.overflowX!==0){var r=oo(this.curves),s=lo(this.curves);ll(r,s)?this.effects.push(new wa(r,6)):(this.effects.push(new wa(r,2)),this.effects.push(new wa(s,4)))}}return f.prototype.getEffects=function(c){for(var i=[2,3].indexOf(this.container.styles.position)===-1,e=this.parent,t=this.effects.slice(0);e;){var n=e.effects.filter(function(a){return!Al(a)});if(i||e.container.styles.position!==0||!e.parent){if(t.unshift.apply(t,n),i=[2,3].indexOf(e.container.styles.position)===-1,e.container.styles.overflowX!==0){var r=oo(e.curves),s=lo(e.curves);ll(r,s)||t.unshift(new wa(s,6))}}else t.unshift.apply(t,n);e=e.parent}return t.filter(function(a){return yi(a.target,c)})},f}(),cA=function(f,c,i,e){f.container.elements.forEach(function(t){var n=yi(t.flags,4),r=yi(t.flags,2),s=new ul(t,f);yi(t.styles.display,2048)&&e.push(s);var a=yi(t.flags,8)?[]:e;if(n||r){var o=n||t.styles.isPositioned()?i:c,u=new uA(s);if(t.styles.isPositioned()||t.styles.opacity<1||t.styles.isTransformed()){var l=t.styles.zIndex.order;if(l<0){var d=0;o.negativeZIndex.some(function(m,w){return l>m.element.container.styles.zIndex.order?(d=w,!1):d>0}),o.negativeZIndex.splice(d,0,u)}else if(l>0){var g=0;o.positiveZIndex.some(function(m,w){return l>=m.element.container.styles.zIndex.order?(g=w+1,!1):g>0}),o.positiveZIndex.splice(g,0,u)}else o.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else t.styles.isFloating()?o.nonPositionedFloats.push(u):o.nonPositionedInlineLevel.push(u);cA(s,u,n?u:i,a)}else t.styles.isInlineLevel()?c.inlineLevel.push(s):c.nonInlineLevel.push(s),cA(s,c,i,a);yi(t.flags,8)&&cl(t,a)})},cl=function(f,c){for(var i=f instanceof $o?f.start:1,e=f instanceof $o?f.reversed:!1,t=0;t<c.length;t++){var n=c[t];n.container instanceof VA&&typeof n.container.value=="number"&&n.container.value!==0&&(i=n.container.value),n.listValue=Ea(i,n.container.styles.listStyleType,!0),i+=e?-1:1}},Uu=function(f){var c=new ul(f,null),i=new uA(c),e=[];return cA(c,i,i,e),cl(c.container,e),i},fl=function(f,c){switch(c){case 0:return es(f.topLeftBorderBox,f.topLeftPaddingBox,f.topRightBorderBox,f.topRightPaddingBox);case 1:return es(f.topRightBorderBox,f.topRightPaddingBox,f.bottomRightBorderBox,f.bottomRightPaddingBox);case 2:return es(f.bottomRightBorderBox,f.bottomRightPaddingBox,f.bottomLeftBorderBox,f.bottomLeftPaddingBox);case 3:default:return es(f.bottomLeftBorderBox,f.bottomLeftPaddingBox,f.topLeftBorderBox,f.topLeftPaddingBox)}},ku=function(f,c){switch(c){case 0:return es(f.topLeftBorderBox,f.topLeftBorderDoubleOuterBox,f.topRightBorderBox,f.topRightBorderDoubleOuterBox);case 1:return es(f.topRightBorderBox,f.topRightBorderDoubleOuterBox,f.bottomRightBorderBox,f.bottomRightBorderDoubleOuterBox);case 2:return es(f.bottomRightBorderBox,f.bottomRightBorderDoubleOuterBox,f.bottomLeftBorderBox,f.bottomLeftBorderDoubleOuterBox);case 3:default:return es(f.bottomLeftBorderBox,f.bottomLeftBorderDoubleOuterBox,f.topLeftBorderBox,f.topLeftBorderDoubleOuterBox)}},dl=function(f,c){switch(c){case 0:return es(f.topLeftBorderDoubleInnerBox,f.topLeftPaddingBox,f.topRightBorderDoubleInnerBox,f.topRightPaddingBox);case 1:return es(f.topRightBorderDoubleInnerBox,f.topRightPaddingBox,f.bottomRightBorderDoubleInnerBox,f.bottomRightPaddingBox);case 2:return es(f.bottomRightBorderDoubleInnerBox,f.bottomRightPaddingBox,f.bottomLeftBorderDoubleInnerBox,f.bottomLeftPaddingBox);case 3:default:return es(f.bottomLeftBorderDoubleInnerBox,f.bottomLeftPaddingBox,f.topLeftBorderDoubleInnerBox,f.topLeftPaddingBox)}},Ou=function(f,c){switch(c){case 0:return uo(f.topLeftBorderStroke,f.topRightBorderStroke);case 1:return uo(f.topRightBorderStroke,f.bottomRightBorderStroke);case 2:return uo(f.bottomRightBorderStroke,f.bottomLeftBorderStroke);case 3:default:return uo(f.bottomLeftBorderStroke,f.topLeftBorderStroke)}},uo=function(f,c){var i=[];return Qi(f)?i.push(f.subdivide(.5,!1)):i.push(f),Qi(c)?i.push(c.subdivide(.5,!0)):i.push(c),i},es=function(f,c,i,e){var t=[];return Qi(f)?t.push(f.subdivide(.5,!1)):t.push(f),Qi(i)?t.push(i.subdivide(.5,!0)):t.push(i),Qi(e)?t.push(e.subdivide(.5,!0).reverse()):t.push(e),Qi(c)?t.push(c.subdivide(.5,!1).reverse()):t.push(c),t},hl=function(f){var c=f.bounds,i=f.styles;return c.add(i.borderLeftWidth,i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth),-(i.borderTopWidth+i.borderBottomWidth))},ia=function(f){var c=f.styles,i=f.bounds,e=Gr(c.paddingLeft,i.width),t=Gr(c.paddingRight,i.width),n=Gr(c.paddingTop,i.width),r=Gr(c.paddingBottom,i.width);return i.add(e+c.borderLeftWidth,n+c.borderTopWidth,-(c.borderRightWidth+c.borderLeftWidth+e+t),-(c.borderTopWidth+c.borderBottomWidth+n+r))},Pu=function(f,c){return f===0?c.bounds:f===2?ia(c):hl(c)},co=function(f,c){return f===0?c.bounds:f===2?ia(c):hl(c)},fA=function(f,c,i){var e=Pu(Ps(f.styles.backgroundOrigin,c),f),t=co(Ps(f.styles.backgroundClip,c),f),n=Qu(Ps(f.styles.backgroundSize,c),i,e),r=n[0],s=n[1],a=bi(Ps(f.styles.backgroundPosition,c),e.width-r,e.height-s),o=gl(Ps(f.styles.backgroundRepeat,c),a,n,e,t),u=Math.round(e.left+a[0]),l=Math.round(e.top+a[1]);return[o,u,l,r,s]},sa=function(f){return wn(f)&&f.value===Ki.AUTO},fo=function(f){return typeof f=="number"},Qu=function(f,c,i){var e=c[0],t=c[1],n=c[2],r=f[0],s=f[1];if(!r)return[0,0];if(Pr(r)&&s&&Pr(s))return[Gr(r,i.width),Gr(s,i.height)];var a=fo(n);if(wn(r)&&(r.value===Ki.CONTAIN||r.value===Ki.COVER)){if(fo(n)){var o=i.width/i.height;return o<n!=(r.value===Ki.COVER)?[i.width,i.width/n]:[i.height*n,i.height]}return[i.width,i.height]}var u=fo(e),l=fo(t),d=u||l;if(sa(r)&&(!s||sa(s))){if(u&&l)return[e,t];if(!a&&!d)return[i.width,i.height];if(d&&a){var g=u?e:t*n,m=l?t:e/n;return[g,m]}var w=u?e:i.width,x=l?t:i.height;return[w,x]}if(a){var H=0,P=0;return Pr(r)?H=Gr(r,i.width):Pr(s)&&(P=Gr(s,i.height)),sa(r)?H=P*n:(!s||sa(s))&&(P=H/n),[H,P]}var me=null,De=null;if(Pr(r)?me=Gr(r,i.width):s&&Pr(s)&&(De=Gr(s,i.height)),me!==null&&(!s||sa(s))&&(De=u&&l?me/e*t:i.height),De!==null&&sa(r)&&(me=u&&l?De/t*e:i.width),me!==null&&De!==null)return[me,De];throw new Error("Unable to calculate background-size for element")},Ps=function(f,c){var i=f[c];return typeof i=="undefined"?f[0]:i},gl=function(f,c,i,e,t){var n=c[0],r=c[1],s=i[0],a=i[1];switch(f){case 2:return[new sr(Math.round(e.left),Math.round(e.top+r)),new sr(Math.round(e.left+e.width),Math.round(e.top+r)),new sr(Math.round(e.left+e.width),Math.round(a+e.top+r)),new sr(Math.round(e.left),Math.round(a+e.top+r))];case 3:return[new sr(Math.round(e.left+n),Math.round(e.top)),new sr(Math.round(e.left+n+s),Math.round(e.top)),new sr(Math.round(e.left+n+s),Math.round(e.height+e.top)),new sr(Math.round(e.left+n),Math.round(e.height+e.top))];case 1:return[new sr(Math.round(e.left+n),Math.round(e.top+r)),new sr(Math.round(e.left+n+s),Math.round(e.top+r)),new sr(Math.round(e.left+n+s),Math.round(e.top+r+a)),new sr(Math.round(e.left+n),Math.round(e.top+r+a))];default:return[new sr(Math.round(t.left),Math.round(t.top)),new sr(Math.round(t.left+t.width),Math.round(t.top)),new sr(Math.round(t.left+t.width),Math.round(t.height+t.top)),new sr(Math.round(t.left),Math.round(t.height+t.top))]}},Mu="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",ho="Hidden Text",pl=function(){function f(c){this._data={},this._document=c}return f.prototype.parseMetrics=function(c,i){var e=this._document.createElement("div"),t=this._document.createElement("img"),n=this._document.createElement("span"),r=this._document.body;e.style.visibility="hidden",e.style.fontFamily=c,e.style.fontSize=i,e.style.margin="0",e.style.padding="0",e.style.whiteSpace="nowrap",r.appendChild(e),t.src=Mu,t.width=1,t.height=1,t.style.margin="0",t.style.padding="0",t.style.verticalAlign="baseline",n.style.fontFamily=c,n.style.fontSize=i,n.style.margin="0",n.style.padding="0",n.appendChild(this._document.createTextNode(ho)),e.appendChild(n),e.appendChild(t);var s=t.offsetTop-n.offsetTop+2;e.removeChild(n),e.appendChild(this._document.createTextNode(ho)),e.style.lineHeight="normal",t.style.verticalAlign="super";var a=t.offsetTop-e.offsetTop+2;return r.removeChild(e),{baseline:s,middle:a}},f.prototype.getMetrics=function(c,i){var e=c+" "+i;return typeof this._data[e]=="undefined"&&(this._data[e]=this.parseMetrics(c,i)),this._data[e]},f}(),Ba=function(){function f(c,i){this.context=c,this.options=i}return f}(),Nu=1e4,Hu=function(f){C(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t._activeEffects=[],t.canvas=e.canvas?e.canvas:document.createElement("canvas"),t.ctx=t.canvas.getContext("2d"),e.canvas||(t.canvas.width=Math.floor(e.width*e.scale),t.canvas.height=Math.floor(e.height*e.scale),t.canvas.style.width=e.width+"px",t.canvas.style.height=e.height+"px"),t.fontMetrics=new pl(document),t.ctx.scale(t.options.scale,t.options.scale),t.ctx.translate(-e.x,-e.y),t.ctx.textBaseline="bottom",t._activeEffects=[],t.context.logger.debug("Canvas renderer initialized ("+e.width+"x"+e.height+") with scale "+e.scale),t}return c.prototype.applyEffects=function(i){for(var e=this;this._activeEffects.length;)this.popEffect();i.forEach(function(t){return e.applyEffect(t)})},c.prototype.applyEffect=function(i){this.ctx.save(),Ru(i)&&(this.ctx.globalAlpha=i.opacity),ol(i)&&(this.ctx.translate(i.offsetX,i.offsetY),this.ctx.transform(i.matrix[0],i.matrix[1],i.matrix[2],i.matrix[3],i.matrix[4],i.matrix[5]),this.ctx.translate(-i.offsetX,-i.offsetY)),Al(i)&&(this.path(i.path),this.ctx.clip()),this._activeEffects.push(i)},c.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},c.prototype.renderStack=function(i){return ae(this,void 0,void 0,function(){var e;return ve(this,function(t){switch(t.label){case 0:return e=i.element.container.styles,e.isVisible()?[4,this.renderStackContent(i)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},c.prototype.renderNode=function(i){return ae(this,void 0,void 0,function(){return ve(this,function(e){switch(e.label){case 0:if(yi(i.container.flags,16))debugger;return i.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(i)]:[3,3];case 1:return e.sent(),[4,this.renderNodeContent(i)];case 2:e.sent(),e.label=3;case 3:return[2]}})})},c.prototype.renderTextWithLetterSpacing=function(i,e,t){var n=this;if(e===0)this.ctx.fillText(i.text,i.bounds.left,i.bounds.top+t);else{var r=Ko(i.text);r.reduce(function(s,a){return n.ctx.fillText(a,s,i.bounds.top+t),s+n.ctx.measureText(a).width},i.bounds.left)}},c.prototype.createFontStyle=function(i){var e=i.fontVariant.filter(function(r){return r==="normal"||r==="small-caps"}).join(""),t=_l(i.fontFamily).join(", "),n=Er(i.fontSize)?""+i.fontSize.number+i.fontSize.unit:i.fontSize.number+"px";return[[i.fontStyle,e,i.fontWeight,n,t].join(" "),t,n]},c.prototype.renderTextNode=function(i,e){return ae(this,void 0,void 0,function(){var t,n,r,s,a,o,u,l,d=this;return ve(this,function(g){return t=this.createFontStyle(e),n=t[0],r=t[1],s=t[2],this.ctx.font=n,this.ctx.direction=e.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",a=this.fontMetrics.getMetrics(r,s),o=a.baseline,u=a.middle,l=e.paintOrder,i.textBounds.forEach(function(m){l.forEach(function(w){switch(w){case 0:d.ctx.fillStyle=ai(e.color),d.renderTextWithLetterSpacing(m,e.letterSpacing,o);var x=e.textShadow;x.length&&m.text.trim().length&&(x.slice(0).reverse().forEach(function(H){d.ctx.shadowColor=ai(H.color),d.ctx.shadowOffsetX=H.offsetX.number*d.options.scale,d.ctx.shadowOffsetY=H.offsetY.number*d.options.scale,d.ctx.shadowBlur=H.blur.number,d.renderTextWithLetterSpacing(m,e.letterSpacing,o)}),d.ctx.shadowColor="",d.ctx.shadowOffsetX=0,d.ctx.shadowOffsetY=0,d.ctx.shadowBlur=0),e.textDecorationLine.length&&(d.ctx.fillStyle=ai(e.textDecorationColor||e.color),e.textDecorationLine.forEach(function(H){switch(H){case 1:d.ctx.fillRect(m.bounds.left,Math.round(m.bounds.top+o),m.bounds.width,1);break;case 2:d.ctx.fillRect(m.bounds.left,Math.round(m.bounds.top),m.bounds.width,1);break;case 3:d.ctx.fillRect(m.bounds.left,Math.ceil(m.bounds.top+u),m.bounds.width,1);break}}));break;case 1:e.webkitTextStrokeWidth&&m.text.trim().length&&(d.ctx.strokeStyle=ai(e.webkitTextStrokeColor),d.ctx.lineWidth=e.webkitTextStrokeWidth,d.ctx.lineJoin=window.chrome?"miter":"round",d.ctx.strokeText(m.text,m.bounds.left,m.bounds.top+o)),d.ctx.strokeStyle="",d.ctx.lineWidth=0,d.ctx.lineJoin="miter";break}})}),[2]})})},c.prototype.renderReplacedElement=function(i,e,t){if(t&&i.intrinsicWidth>0&&i.intrinsicHeight>0){var n=ia(i),r=lo(e);this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,i.intrinsicWidth,i.intrinsicHeight,n.left,n.top,n.width,n.height),this.ctx.restore()}},c.prototype.renderNodeContent=function(i){return ae(this,void 0,void 0,function(){var e,t,n,r,s,a,P,P,o,u,l,d,De,g,m,be,w,x,H,P,me,De,be;return ve(this,function(Ue){switch(Ue.label){case 0:this.applyEffects(i.getEffects(4)),e=i.container,t=i.curves,n=e.styles,r=0,s=e.textNodes,Ue.label=1;case 1:return r<s.length?(a=s[r],[4,this.renderTextNode(a,n)]):[3,4];case 2:Ue.sent(),Ue.label=3;case 3:return r++,[3,1];case 4:if(!(e instanceof GA))return[3,8];Ue.label=5;case 5:return Ue.trys.push([5,7,,8]),[4,this.context.cache.match(e.src)];case 6:return P=Ue.sent(),this.renderReplacedElement(e,t,P),[3,8];case 7:return Ue.sent(),this.context.logger.error("Error loading image "+e.src),[3,8];case 8:if(e instanceof $A&&this.renderReplacedElement(e,t,e.canvas),!(e instanceof Go))return[3,12];Ue.label=9;case 9:return Ue.trys.push([9,11,,12]),[4,this.context.cache.match(e.svg)];case 10:return P=Ue.sent(),this.renderReplacedElement(e,t,P),[3,12];case 11:return Ue.sent(),this.context.logger.error("Error loading svg "+e.svg.substring(0,255)),[3,12];case 12:return e instanceof Us&&e.tree?(o=new c(this.context,{scale:this.options.scale,backgroundColor:e.backgroundColor,x:0,y:0,width:e.width,height:e.height}),[4,o.render(e.tree)]):[3,14];case 13:u=Ue.sent(),e.width&&e.height&&this.ctx.drawImage(u,0,0,e.width,e.height,e.bounds.left,e.bounds.top,e.bounds.width,e.bounds.height),Ue.label=14;case 14:if(e instanceof za&&(l=Math.min(e.bounds.width,e.bounds.height),e.type===Za?e.checked&&(this.ctx.save(),this.path([new sr(e.bounds.left+l*.39363,e.bounds.top+l*.79),new sr(e.bounds.left+l*.16,e.bounds.top+l*.5549),new sr(e.bounds.left+l*.27347,e.bounds.top+l*.44071),new sr(e.bounds.left+l*.39694,e.bounds.top+l*.5649),new sr(e.bounds.left+l*.72983,e.bounds.top+l*.23),new sr(e.bounds.left+l*.84,e.bounds.top+l*.34085),new sr(e.bounds.left+l*.39363,e.bounds.top+l*.79)]),this.ctx.fillStyle=ai(Vo),this.ctx.fill(),this.ctx.restore()):e.type===Wa&&e.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(e.bounds.left+l/2,e.bounds.top+l/2,l/4,0,Math.PI*2,!0),this.ctx.fillStyle=ai(Vo),this.ctx.fill(),this.ctx.restore())),Ku(e)&&e.value.length){switch(d=this.createFontStyle(n),De=d[0],g=d[1],m=this.fontMetrics.getMetrics(De,g).baseline,this.ctx.font=De,this.ctx.fillStyle=ai(n.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=ml(e.styles.textAlign),be=ia(e),w=0,e.styles.textAlign){case 1:w+=be.width/2;break;case 2:w+=be.width;break}x=be.add(w,0,0,-be.height/2+1),this.ctx.save(),this.path([new sr(be.left,be.top),new sr(be.left+be.width,be.top),new sr(be.left+be.width,be.top+be.height),new sr(be.left,be.top+be.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new pa(e.value,x),n.letterSpacing,m),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!yi(e.styles.display,2048))return[3,20];if(e.styles.listStyleImage===null)return[3,19];if(H=e.styles.listStyleImage,H.type!==0)return[3,18];P=void 0,me=H.url,Ue.label=15;case 15:return Ue.trys.push([15,17,,18]),[4,this.context.cache.match(me)];case 16:return P=Ue.sent(),this.ctx.drawImage(P,e.bounds.left-(P.width+10),e.bounds.top),[3,18];case 17:return Ue.sent(),this.context.logger.error("Error loading list-style-image "+me),[3,18];case 18:return[3,20];case 19:i.listValue&&e.styles.listStyleType!==-1&&(De=this.createFontStyle(n)[0],this.ctx.font=De,this.ctx.fillStyle=ai(n.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",be=new Q(e.bounds.left,e.bounds.top+Gr(e.styles.paddingTop,e.bounds.width),e.bounds.width,as(n.lineHeight,n.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new pa(i.listValue,be),n.letterSpacing,as(n.lineHeight,n.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Ue.label=20;case 20:return[2]}})})},c.prototype.renderStackContent=function(i){return ae(this,void 0,void 0,function(){var e,t,H,n,r,H,s,a,H,o,u,H,l,d,H,g,m,H,w,x,H;return ve(this,function(P){switch(P.label){case 0:if(yi(i.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(i.element)];case 1:P.sent(),e=0,t=i.negativeZIndex,P.label=2;case 2:return e<t.length?(H=t[e],[4,this.renderStack(H)]):[3,5];case 3:P.sent(),P.label=4;case 4:return e++,[3,2];case 5:return[4,this.renderNodeContent(i.element)];case 6:P.sent(),n=0,r=i.nonInlineLevel,P.label=7;case 7:return n<r.length?(H=r[n],[4,this.renderNode(H)]):[3,10];case 8:P.sent(),P.label=9;case 9:return n++,[3,7];case 10:s=0,a=i.nonPositionedFloats,P.label=11;case 11:return s<a.length?(H=a[s],[4,this.renderStack(H)]):[3,14];case 12:P.sent(),P.label=13;case 13:return s++,[3,11];case 14:o=0,u=i.nonPositionedInlineLevel,P.label=15;case 15:return o<u.length?(H=u[o],[4,this.renderStack(H)]):[3,18];case 16:P.sent(),P.label=17;case 17:return o++,[3,15];case 18:l=0,d=i.inlineLevel,P.label=19;case 19:return l<d.length?(H=d[l],[4,this.renderNode(H)]):[3,22];case 20:P.sent(),P.label=21;case 21:return l++,[3,19];case 22:g=0,m=i.zeroOrAutoZIndexOrTransformedOrOpacity,P.label=23;case 23:return g<m.length?(H=m[g],[4,this.renderStack(H)]):[3,26];case 24:P.sent(),P.label=25;case 25:return g++,[3,23];case 26:w=0,x=i.positiveZIndex,P.label=27;case 27:return w<x.length?(H=x[w],[4,this.renderStack(H)]):[3,30];case 28:P.sent(),P.label=29;case 29:return w++,[3,27];case 30:return[2]}})})},c.prototype.mask=function(i){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(i.slice(0).reverse()),this.ctx.closePath()},c.prototype.path=function(i){this.ctx.beginPath(),this.formatPath(i),this.ctx.closePath()},c.prototype.formatPath=function(i){var e=this;i.forEach(function(t,n){var r=Qi(t)?t.start:t;n===0?e.ctx.moveTo(r.x,r.y):e.ctx.lineTo(r.x,r.y),Qi(t)&&e.ctx.bezierCurveTo(t.startControl.x,t.startControl.y,t.endControl.x,t.endControl.y,t.end.x,t.end.y)})},c.prototype.renderRepeat=function(i,e,t,n){this.path(i),this.ctx.fillStyle=e,this.ctx.translate(t,n),this.ctx.fill(),this.ctx.translate(-t,-n)},c.prototype.resizeImage=function(i,e,t){var n;if(i.width===e&&i.height===t)return i;var r=(n=this.canvas.ownerDocument)!==null&&n!==void 0?n:document,s=r.createElement("canvas");s.width=Math.max(1,e),s.height=Math.max(1,t);var a=s.getContext("2d");return a.drawImage(i,0,0,i.width,i.height,0,0,e,t),s},c.prototype.renderBackgroundImage=function(i){return ae(this,void 0,void 0,function(){var e,t,n,r,s,a;return ve(this,function(o){switch(o.label){case 0:e=i.styles.backgroundImage.length-1,t=function(u){var l,d,g,Ft,Yn,Xn,ln,Ln,Dt,m,Ft,Yn,Xn,ln,Ln,w,x,H,P,me,De,be,Ue,ot,Dt,rt,Ft,Nt,bt,ln,Ln,_r,Yn,Xn,Kn,ar,gr,Tn,Un,Sr,Br,Lr;return ve(this,function(Mr){switch(Mr.label){case 0:if(u.type!==0)return[3,5];l=void 0,d=u.url,Mr.label=1;case 1:return Mr.trys.push([1,3,,4]),[4,n.context.cache.match(d)];case 2:return l=Mr.sent(),[3,4];case 3:return Mr.sent(),n.context.logger.error("Error loading background-image "+d),[3,4];case 4:return l&&(g=fA(i,e,[l.width,l.height,l.width/l.height]),Ft=g[0],Yn=g[1],Xn=g[2],ln=g[3],Ln=g[4],Dt=n.ctx.createPattern(n.resizeImage(l,ln,Ln),"repeat"),n.renderRepeat(Ft,Dt,Yn,Xn)),[3,6];case 5:ss(u)?(m=fA(i,e,[null,null,null]),Ft=m[0],Yn=m[1],Xn=m[2],ln=m[3],Ln=m[4],w=Ti(u.angle,ln,Ln),x=w[0],H=w[1],P=w[2],me=w[3],De=w[4],be=document.createElement("canvas"),be.width=ln,be.height=Ln,Ue=be.getContext("2d"),ot=Ue.createLinearGradient(H,me,P,De),xi(u.stops,x).forEach(function($r){return ot.addColorStop($r.stop,ai($r.color))}),Ue.fillStyle=ot,Ue.fillRect(0,0,ln,Ln),ln>0&&Ln>0&&(Dt=n.ctx.createPattern(be,"repeat"),n.renderRepeat(Ft,Dt,Yn,Xn))):ji(u)&&(rt=fA(i,e,[null,null,null]),Ft=rt[0],Nt=rt[1],bt=rt[2],ln=rt[3],Ln=rt[4],_r=u.position.length===0?[ls]:u.position,Yn=Gr(_r[0],ln),Xn=Gr(_r[_r.length-1],Ln),Kn=Ni(u,Yn,Xn,ln,Ln),ar=Kn[0],gr=Kn[1],ar>0&&gr>0&&(Tn=n.ctx.createRadialGradient(Nt+Yn,bt+Xn,0,Nt+Yn,bt+Xn,ar),xi(u.stops,ar*2).forEach(function($r){return Tn.addColorStop($r.stop,ai($r.color))}),n.path(Ft),n.ctx.fillStyle=Tn,ar!==gr?(Un=i.bounds.left+.5*i.bounds.width,Sr=i.bounds.top+.5*i.bounds.height,Br=gr/ar,Lr=1/Br,n.ctx.save(),n.ctx.translate(Un,Sr),n.ctx.transform(1,0,0,Br,0,0),n.ctx.translate(-Un,-Sr),n.ctx.fillRect(Nt,Lr*(bt-Sr)+Sr,ln,Ln*Lr),n.ctx.restore()):n.ctx.fill())),Mr.label=6;case 6:return e--,[2]}})},n=this,r=0,s=i.styles.backgroundImage.slice(0).reverse(),o.label=1;case 1:return r<s.length?(a=s[r],[5,t(a)]):[3,4];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},c.prototype.renderSolidBorder=function(i,e,t){return ae(this,void 0,void 0,function(){return ve(this,function(n){return this.path(fl(t,e)),this.ctx.fillStyle=ai(i),this.ctx.fill(),[2]})})},c.prototype.renderDoubleBorder=function(i,e,t,n){return ae(this,void 0,void 0,function(){var r,s;return ve(this,function(a){switch(a.label){case 0:return e<3?[4,this.renderSolidBorder(i,t,n)]:[3,2];case 1:return a.sent(),[2];case 2:return r=ku(n,t),this.path(r),this.ctx.fillStyle=ai(i),this.ctx.fill(),s=dl(n,t),this.path(s),this.ctx.fill(),[2]}})})},c.prototype.renderNodeBackgroundAndBorders=function(i){return ae(this,void 0,void 0,function(){var e,t,n,r,s,a,o,u,l=this;return ve(this,function(d){switch(d.label){case 0:return this.applyEffects(i.getEffects(2)),e=i.container.styles,t=!Ci(e.backgroundColor)||e.backgroundImage.length,n=[{style:e.borderTopStyle,color:e.borderTopColor,width:e.borderTopWidth},{style:e.borderRightStyle,color:e.borderRightColor,width:e.borderRightWidth},{style:e.borderBottomStyle,color:e.borderBottomColor,width:e.borderBottomWidth},{style:e.borderLeftStyle,color:e.borderLeftColor,width:e.borderLeftWidth}],r=Gu(Ps(e.backgroundClip,0),i.curves),t||e.boxShadow.length?(this.ctx.save(),this.path(r),this.ctx.clip(),Ci(e.backgroundColor)||(this.ctx.fillStyle=ai(e.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(i.container)]):[3,2];case 1:d.sent(),this.ctx.restore(),e.boxShadow.slice(0).reverse().forEach(function(g){l.ctx.save();var m=oo(i.curves),w=g.inset?0:Nu,x=Lu(m,-w+(g.inset?1:-1)*g.spread.number,(g.inset?1:-1)*g.spread.number,g.spread.number*(g.inset?-2:2),g.spread.number*(g.inset?-2:2));g.inset?(l.path(m),l.ctx.clip(),l.mask(x)):(l.mask(m),l.ctx.clip(),l.path(x)),l.ctx.shadowOffsetX=g.offsetX.number+w,l.ctx.shadowOffsetY=g.offsetY.number,l.ctx.shadowColor=ai(g.color),l.ctx.shadowBlur=g.blur.number,l.ctx.fillStyle=g.inset?ai(g.color):"rgba(0,0,0,1)",l.ctx.fill(),l.ctx.restore()}),d.label=2;case 2:s=0,a=0,o=n,d.label=3;case 3:return a<o.length?(u=o[a],u.style!==0&&!Ci(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,s,i.curves,2)]:[3,11]):[3,13];case 4:return d.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,s,i.curves,3)];case 6:return d.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,s,i.curves)];case 8:return d.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,s,i.curves)];case 10:d.sent(),d.label=11;case 11:s++,d.label=12;case 12:return a++,[3,3];case 13:return[2]}})})},c.prototype.renderDashedDottedBorder=function(i,e,t,n,r){return ae(this,void 0,void 0,function(){var s,a,o,u,l,d,g,m,w,x,H,P,me,De,be,Ue,be,Ue;return ve(this,function(ot){return this.ctx.save(),s=Ou(n,t),a=fl(n,t),r===2&&(this.path(a),this.ctx.clip()),Qi(a[0])?(o=a[0].start.x,u=a[0].start.y):(o=a[0].x,u=a[0].y),Qi(a[1])?(l=a[1].end.x,d=a[1].end.y):(l=a[1].x,d=a[1].y),t===0||t===2?g=Math.abs(o-l):g=Math.abs(u-d),this.ctx.beginPath(),r===3?this.formatPath(s):this.formatPath(a.slice(0,2)),m=e<3?e*3:e*2,w=e<3?e*2:e,r===3&&(m=e,w=e),x=!0,g<=m*2?x=!1:g<=m*2+w?(H=g/(2*m+w),m*=H,w*=H):(P=Math.floor((g+w)/(m+w)),me=(g-P*m)/(P-1),De=(g-(P+1)*m)/P,w=De<=0||Math.abs(w-me)<Math.abs(w-De)?me:De),x&&(r===3?this.ctx.setLineDash([0,m+w]):this.ctx.setLineDash([m,w])),r===3?(this.ctx.lineCap="round",this.ctx.lineWidth=e):this.ctx.lineWidth=e*2+1.1,this.ctx.strokeStyle=ai(i),this.ctx.stroke(),this.ctx.setLineDash([]),r===2&&(Qi(a[0])&&(be=a[3],Ue=a[0],this.ctx.beginPath(),this.formatPath([new sr(be.end.x,be.end.y),new sr(Ue.start.x,Ue.start.y)]),this.ctx.stroke()),Qi(a[1])&&(be=a[1],Ue=a[2],this.ctx.beginPath(),this.formatPath([new sr(be.end.x,be.end.y),new sr(Ue.start.x,Ue.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},c.prototype.render=function(i){return ae(this,void 0,void 0,function(){var e;return ve(this,function(t){switch(t.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ai(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),e=Uu(i),[4,this.renderStack(e)];case 1:return t.sent(),this.applyEffects([]),[2,this.canvas]}})})},c}(Ba),Ku=function(f){return f instanceof $i||f instanceof Pi?!0:f instanceof za&&f.type!==Wa&&f.type!==Za},Gu=function(f,c){switch(f){case 0:return oo(c);case 2:return Ao(c);case 1:default:return lo(c)}},ml=function(f){switch(f){case 1:return"center";case 2:return"right";case 0:default:return"left"}},vl=["-apple-system","system-ui"],_l=function(f){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?f.filter(function(c){return vl.indexOf(c)===-1}):f},$u=function(f){C(c,f);function c(i,e){var t=f.call(this,i,e)||this;return t.canvas=e.canvas?e.canvas:document.createElement("canvas"),t.ctx=t.canvas.getContext("2d"),t.options=e,t.canvas.width=Math.floor(e.width*e.scale),t.canvas.height=Math.floor(e.height*e.scale),t.canvas.style.width=e.width+"px",t.canvas.style.height=e.height+"px",t.ctx.scale(t.options.scale,t.options.scale),t.ctx.translate(-e.x,-e.y),t.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+e.width+"x"+e.height+" at "+e.x+","+e.y+") with scale "+e.scale),t}return c.prototype.render=function(i){return ae(this,void 0,void 0,function(){var e,t;return ve(this,function(n){switch(n.label){case 0:return e=Po(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,i),[4,Vu(e)];case 1:return t=n.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ai(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(t,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},c}(Ba),Vu=function(f){return new Promise(function(c,i){var e=new Image;e.onload=function(){c(e)},e.onerror=i,e.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(f))})},Zu=function(){function f(c){var i=c.id,e=c.enabled;this.id=i,this.enabled=e,this.start=Date.now()}return f.prototype.debug=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,le([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},f.prototype.getTime=function(){return Date.now()-this.start},f.prototype.info=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,le([this.id,this.getTime()+"ms"],c))},f.prototype.warn=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,le([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},f.prototype.error=function(){for(var c=[],i=0;i<arguments.length;i++)c[i]=arguments[i];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,le([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},f.instances={},f}(),Wu=function(){function f(c,i){var e;this.windowBounds=i,this.instanceName="#"+f.instanceCount++,this.logger=new Zu({id:this.instanceName,enabled:c.logging}),this.cache=(e=c.cache)!==null&&e!==void 0?e:new Iu(this,c)}return f.instanceCount=1,f}(),zu=function(f,c){return c===void 0&&(c={}),yl(f,c)};typeof window!="undefined"&&so.setContext(window);var yl=function(f,c){return ae(void 0,void 0,void 0,function(){var i,e,t,n,r,s,a,o,u,l,d,g,m,w,x,H,P,me,De,be,ot,Ue,ot,Dt,rt,Ft,Nt,bt,ln,Ln,_r,Yn,Xn,Kn,ar,gr,Tn,Un,Sr,Br;return ve(this,function(Lr){switch(Lr.label){case 0:if(!f||typeof f!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(i=f.ownerDocument,!i)throw new Error("Element is not attached to a Document");if(e=i.defaultView,!e)throw new Error("Document is not attached to a Window");return t={allowTaint:(Dt=c.allowTaint)!==null&&Dt!==void 0?Dt:!1,imageTimeout:(rt=c.imageTimeout)!==null&&rt!==void 0?rt:15e3,proxy:c.proxy,useCORS:(Ft=c.useCORS)!==null&&Ft!==void 0?Ft:!1},n=N({logging:(Nt=c.logging)!==null&&Nt!==void 0?Nt:!0,cache:c.cache},t),r={windowWidth:(bt=c.windowWidth)!==null&&bt!==void 0?bt:e.innerWidth,windowHeight:(ln=c.windowHeight)!==null&&ln!==void 0?ln:e.innerHeight,scrollX:(Ln=c.scrollX)!==null&&Ln!==void 0?Ln:e.pageXOffset,scrollY:(_r=c.scrollY)!==null&&_r!==void 0?_r:e.pageYOffset},s=new Q(r.scrollX,r.scrollY,r.windowWidth,r.windowHeight),a=new Wu(n,s),o=(Yn=c.foreignObjectRendering)!==null&&Yn!==void 0?Yn:!1,u={allowTaint:(Xn=c.allowTaint)!==null&&Xn!==void 0?Xn:!1,onclone:c.onclone,ignoreElements:c.ignoreElements,inlineImages:o,copyStyles:o},a.logger.debug("Starting document clone with size "+s.width+"x"+s.height+" scrolled to "+-s.left+","+-s.top),l=new tA(a,f,u),d=l.clonedReferenceElement,d?[4,l.toIFrame(i,s)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return g=Lr.sent(),m=jo(d)||Xa(d)?ge(d.ownerDocument):h(a,d),w=m.width,x=m.height,H=m.left,P=m.top,me=dA(a,d,c.backgroundColor),De={canvas:c.canvas,backgroundColor:me,scale:(ar=(Kn=c.scale)!==null&&Kn!==void 0?Kn:e.devicePixelRatio)!==null&&ar!==void 0?ar:1,x:((gr=c.x)!==null&&gr!==void 0?gr:0)+H,y:((Tn=c.y)!==null&&Tn!==void 0?Tn:0)+P,width:(Un=c.width)!==null&&Un!==void 0?Un:Math.ceil(w),height:(Sr=c.height)!==null&&Sr!==void 0?Sr:Math.ceil(x)},o?(a.logger.debug("Document cloned, using foreign object rendering"),ot=new $u(a,De),[4,ot.render(d)]):[3,3];case 2:return be=Lr.sent(),[3,5];case 3:return a.logger.debug("Document cloned, element located at "+H+","+P+" with size "+w+"x"+x+" using computed rendering"),a.logger.debug("Starting DOM parsing"),Ue=Wo(a,d),me===Ue.styles.backgroundColor&&(Ue.styles.backgroundColor=Hr.TRANSPARENT),a.logger.debug("Starting renderer for element at "+De.x+","+De.y+" with size "+De.width+"x"+De.height),ot=new Hu(a,De),[4,ot.render(Ue)];case 4:be=Lr.sent(),Lr.label=5;case 5:return(!((Br=c.removeContainer)!==null&&Br!==void 0)||Br)&&(tA.destroy(g)||a.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),a.logger.debug("Finished rendering"),[2,be]}})})},dA=function(f,c,i){var e=c.ownerDocument,t=e.documentElement?xr(f,getComputedStyle(e.documentElement).backgroundColor):Hr.TRANSPARENT,n=e.body?xr(f,getComputedStyle(e.body).backgroundColor):Hr.TRANSPARENT,r=typeof i=="string"?xr(f,i):i===null?Hr.TRANSPARENT:4294967295;return c===e.documentElement?Ci(t)?Ci(n)?r:n:t:r};return zu})},53184:function(Fn,st,C){"use strict";var N,ae;function ve(le,Q,h){var ge=function(ie,A){return le.js_beautify(ie,A)};return ge.js=le.js_beautify,ge.css=Q.css_beautify,ge.html=h.html_beautify,ge.js_beautify=le.js_beautify,ge.css_beautify=Q.css_beautify,ge.html_beautify=h.html_beautify,ge}N=[C(58553),C(87804),C(40998)],ae=function(le,Q,h){return ve(le,Q,h)}.apply(st,N),ae!==void 0&&(Fn.exports=ae)},87804:function(Fn,st){var C,N;(function(){var ae;(function(){"use strict";var le=[,,function(ie){function A(p){this.__parent=p,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}A.prototype.clone_empty=function(){var p=new A(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},A.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},A.prototype.has_match=function(p){for(var v=this.__items.length-1;v>=0;v--)if(this.__items[v].match(p))return!0;return!1},A.prototype.set_indent=function(p,v){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=v||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},A.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)},A.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},A.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},A.prototype.is_empty=function(){return this.__items.length===0},A.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},A.prototype.push=function(p){this.__items.push(p);var v=p.lastIndexOf(`
|
|
`);v!==-1?this.__character_count=p.length-v:this.__character_count+=p.length},A.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},A.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},A.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},A.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},A.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function B(p,v){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),v=v||"",p.indent_level>0&&(v=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=v,this.__base_string_length=v.length}B.prototype.get_indent_size=function(p,v){var E=this.__base_string_length;return v=v||0,p<0&&(E=0),E+=p*this.__indent_size,E+=v,E},B.prototype.get_indent_string=function(p,v){var E=this.__base_string;return v=v||0,p<0&&(p=0,E=""),v+=p*this.__indent_size,this.__ensure_cache(v),E+=this.__cache[v],E},B.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},B.prototype.__add_column=function(){var p=this.__cache.length,v=0,E="";this.__indent_size&&p>=this.__indent_size&&(v=Math.floor(p/this.__indent_size),p-=v*this.__indent_size,E=new Array(v+1).join(this.__indent_string)),p&&(E+=new Array(p+1).join(" ")),this.__cache.push(E)};function T(p,v){this.__indent_cache=new B(p,v),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new A(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}T.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},T.prototype.get_line_number=function(){return this.__lines.length},T.prototype.get_indent_string=function(p,v){return this.__indent_cache.get_indent_string(p,v)},T.prototype.get_indent_size=function(p,v){return this.__indent_cache.get_indent_size(p,v)},T.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},T.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},T.prototype.get_code=function(p){this.trim(!0);var v=this.current_line.pop();v&&(v[v.length-1]===`
|
|
`&&(v=v.replace(/\n+$/g,"")),this.current_line.push(v)),this._end_with_newline&&this.__add_outputline();var E=this.__lines.join(`
|
|
`);return p!==`
|
|
`&&(E=E.replace(/[\n]/g,p)),E},T.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},T.prototype.set_indent=function(p,v){return p=p||0,v=v||0,this.next_line.set_indent(p,v),this.__lines.length>1?(this.current_line.set_indent(p,v),!0):(this.current_line.set_indent(),!1)},T.prototype.add_raw_token=function(p){for(var v=0;v<p.newlines;v++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(p.whitespace_before),this.current_line.push(p.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},T.prototype.add_token=function(p){this.__add_space_before_token(),this.current_line.push(p),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},T.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(" "))},T.prototype.remove_indent=function(p){for(var v=this.__lines.length;p<v;)this.__lines[p]._remove_indent(),p++;this.current_line._remove_wrap_indent()},T.prototype.trim=function(p){for(p=p===void 0?!1:p,this.current_line.trim();p&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},T.prototype.just_added_newline=function(){return this.current_line.is_empty()},T.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},T.prototype.ensure_empty_line_above=function(p,v){for(var E=this.__lines.length-2;E>=0;){var S=this.__lines[E];if(S.is_empty())break;if(S.item(0).indexOf(p)!==0&&S.item(-1)!==v){this.__lines.splice(E+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}E--}},ie.exports.Output=T},,,,function(ie){function A(p,v){this.raw_options=B(p,v),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"])}A.prototype._get_array=function(p,v){var E=this.raw_options[p],S=v||[];return typeof E=="object"?E!==null&&typeof E.concat=="function"&&(S=E.concat()):typeof E=="string"&&(S=E.split(/[^a-zA-Z0-9_\/\-]+/)),S},A.prototype._get_boolean=function(p,v){var E=this.raw_options[p],S=E===void 0?!!v:!!E;return S},A.prototype._get_characters=function(p,v){var E=this.raw_options[p],S=v||"";return typeof E=="string"&&(S=E.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),S},A.prototype._get_number=function(p,v){var E=this.raw_options[p];v=parseInt(v,10),isNaN(v)&&(v=0);var S=parseInt(E,10);return isNaN(S)&&(S=v),S},A.prototype._get_selection=function(p,v,E){var S=this._get_selection_list(p,v,E);if(S.length!==1)throw new Error("Invalid Option Value: The option '"+p+`' can only be one of the following values:
|
|
`+v+`
|
|
You passed in: '`+this.raw_options[p]+"'");return S[0]},A.prototype._get_selection_list=function(p,v,E){if(!v||v.length===0)throw new Error("Selection list cannot be empty.");if(E=E||[v[0]],!this._is_valid_selection(E,v))throw new Error("Invalid Default Value!");var S=this._get_array(p,E);if(!this._is_valid_selection(S,v))throw new Error("Invalid Option Value: The option '"+p+`' can contain only the following values:
|
|
`+v+`
|
|
You passed in: '`+this.raw_options[p]+"'");return S},A.prototype._is_valid_selection=function(p,v){return p.length&&v.length&&!p.some(function(E){return v.indexOf(E)===-1})};function B(p,v){var E={};p=T(p);var S;for(S in p)S!==v&&(E[S]=p[S]);if(v&&p[v])for(S in p[v])E[S]=p[v][S];return E}function T(p){var v={},E;for(E in p){var S=E.replace(/-/g,"_");v[S]=p[E]}return v}ie.exports.Options=A,ie.exports.normalizeOpts=T,ie.exports.mergeOpts=B},,function(ie){var A=RegExp.prototype.hasOwnProperty("sticky");function B(T){this.__input=T||"",this.__input_length=this.__input.length,this.__position=0}B.prototype.restart=function(){this.__position=0},B.prototype.back=function(){this.__position>0&&(this.__position-=1)},B.prototype.hasNext=function(){return this.__position<this.__input_length},B.prototype.next=function(){var T=null;return this.hasNext()&&(T=this.__input.charAt(this.__position),this.__position+=1),T},B.prototype.peek=function(T){var p=null;return T=T||0,T+=this.__position,T>=0&&T<this.__input_length&&(p=this.__input.charAt(T)),p},B.prototype.__match=function(T,p){T.lastIndex=p;var v=T.exec(this.__input);return v&&!(A&&T.sticky)&&v.index!==p&&(v=null),v},B.prototype.test=function(T,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(T,p):!1},B.prototype.testChar=function(T,p){var v=this.peek(p);return T.lastIndex=0,v!==null&&T.test(v)},B.prototype.match=function(T){var p=this.__match(T,this.__position);return p?this.__position+=p[0].length:p=null,p},B.prototype.read=function(T,p,v){var E="",S;return T&&(S=this.match(T),S&&(E+=S[0])),p&&(S||!T)&&(E+=this.readUntil(p,v)),E},B.prototype.readUntil=function(T,p){var v="",E=this.__position;T.lastIndex=this.__position;var S=T.exec(this.__input);return S?(E=S.index,p&&(E+=S[0].length)):E=this.__input_length,v=this.__input.substring(this.__position,E),this.__position=E,v},B.prototype.readUntilAfter=function(T){return this.readUntil(T,!0)},B.prototype.get_regexp=function(T,p){var v=null,E="g";return p&&A&&(E="y"),typeof T=="string"&&T!==""?v=new RegExp(T,E):T&&(v=new RegExp(T.source,E)),v},B.prototype.get_literal_regexp=function(T){return RegExp(T.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},B.prototype.peekUntilAfter=function(T){var p=this.__position,v=this.readUntilAfter(T);return this.__position=p,v},B.prototype.lookBack=function(T){var p=this.__position-1;return p>=T.length&&this.__input.substring(p-T.length,p).toLowerCase()===T},ie.exports.InputScanner=B},,,,,function(ie){function A(B,T){B=typeof B=="string"?B:B.source,T=typeof T=="string"?T:T.source,this.__directives_block_pattern=new RegExp(B+/ beautify( \w+[:]\w+)+ /.source+T,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(B+/\sbeautify\signore:end\s/.source+T,"g")}A.prototype.get_directives=function(B){if(!B.match(this.__directives_block_pattern))return null;var T={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(B);p;)T[p[1]]=p[2],p=this.__directive_pattern.exec(B);return T},A.prototype.readIgnored=function(B){return B.readUntilAfter(this.__directives_end_ignore_pattern)},ie.exports.Directives=A},,function(ie,A,B){var T=B(16).Beautifier,p=B(17).Options;function v(E,S){var F=new T(E,S);return F.beautify()}ie.exports=v,ie.exports.defaultOptions=function(){return new p}},function(ie,A,B){var T=B(17).Options,p=B(2).Output,v=B(8).InputScanner,E=B(13).Directives,S=new E(/\/\*/,/\*\//),F=/\r\n|[\r\n]/,O=/\r\n|[\r\n]/g,Z=/\s/,b=/(?:\s|\n)+/g,L=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,D=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function I(re,ce){this._source_text=re||"",this._options=new T(ce),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"]}I.prototype.eatString=function(re){var ce="";for(this._ch=this._input.next();this._ch;){if(ce+=this._ch,this._ch==="\\")ce+=this._input.next();else if(re.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return ce},I.prototype.eatWhitespace=function(re){for(var ce=Z.test(this._input.peek()),X=0;Z.test(this._input.peek());)this._ch=this._input.next(),re&&this._ch===`
|
|
`&&(X===0||X<this._options.max_preserve_newlines)&&(X++,this._output.add_new_line(!0));return ce},I.prototype.foundNestedPseudoClass=function(){for(var re=0,ce=1,X=this._input.peek(ce);X;){if(X==="{")return!0;if(X==="(")re+=1;else if(X===")"){if(re===0)return!1;re-=1}else if(X===";"||X==="}")return!1;ce++,X=this._input.peek(ce)}return!1},I.prototype.print_string=function(re){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(re)},I.prototype.preserveSingleSpace=function(re){re&&(this._output.space_before_token=!0)},I.prototype.indent=function(){this._indentLevel++},I.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},I.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var re=this._source_text,ce=this._options.eol;ce==="auto"&&(ce=`
|
|
`,re&&F.test(re||"")&&(ce=re.match(F)[0])),re=re.replace(O,`
|
|
`);var X=re.match(/^[\t ]*/)[0];this._output=new p(this._options,X),this._input=new v(re),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var q=0,oe=!1,pe=!1,_e=!1,j=!1,K=!1,ee=this._ch,z=!1,Ae,Y,y;Ae=this._input.read(b),Y=Ae!=="",y=ee,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),ee=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var _=this._input.read(L),V=S.get_directives(_);V&&V.ignore==="start"&&(_+=S.readIgnored(this._input)),this.print_string(_),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(D)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(Y),this.print_string(this._ch);var de=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);de.match(/[ :]$/)&&(de=this.eatString(": ").replace(/\s+$/,""),this.print_string(de),this._output.space_before_token=!0),q===0&&de.indexOf(":")!==-1&&(pe=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(Y),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var We=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);We.match(/[ :]$/)&&(We=this.eatString(": ").replace(/\s+$/,""),this.print_string(We),this._output.space_before_token=!0),q===0&&We.indexOf(":")!==-1?(pe=!0,this.indent()):We in this.NESTED_AT_RULE?(this._nestedLevel+=1,We in this.CONDITIONAL_GROUP_RULE&&(_e=!0)):q===0&&!pe&&(j=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(Y),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")pe&&(pe=!1,this.outdent()),j=!1,_e?(_e=!1,oe=this._indentLevel>=this._nestedLevel):oe=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&oe&&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)):(y==="("?this._output.space_before_token=!1:y!==","&&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(),y==="{"&&this._output.trim(!0),pe&&(this.outdent(),pe=!1),this.print_string(this._ch),oe=!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 Qe=0;Qe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Qe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Qe])){z=!0;break}(oe||_e)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!j&&q===0?(this.print_string(":"),pe||(pe=!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 ct=y==='"'||y==="'";this.preserveSingleSpace(ct||Y),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")z=!1,q===0?(pe&&(this.outdent(),pe=!1),j=!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(),q++,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(")")),q&&(q--,this.outdent()));else{var Et=!1;this._input.lookBack("with")&&(Et=!0),this.preserveSingleSpace(Y||Et),this.print_string(this._ch),pe&&y==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),K=!0):(this.eatWhitespace(),q++,this.indent())}else if(this._ch===")")q&&(q--,this.outdent()),K&&this._input.peek()===";"&&this._options.selector_separator_newline&&(K=!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&&(!pe||K)&&q===0&&!j?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!pe&&q===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&&Z.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(Y),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),Z.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 Mt=y==='"'||y==="'";this.preserveSingleSpace(Mt||Y),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&z&&this._output.add_new_line()}var Ot=this._output.get_code(ce);return Ot},ie.exports.Beautifier=I},function(ie,A,B){var T=B(6).Options;function p(v){T.call(this,v,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var E=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||E;var S=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var F=0;F<S.length;F++)S[F]!=="expand"?this.brace_style="collapse":this.brace_style=S[F]}p.prototype=new T,ie.exports.Options=p}],Q={};function h(ie){var A=Q[ie];if(A!==void 0)return A.exports;var B=Q[ie]={exports:{}};return le[ie](B,B.exports,h),B.exports}var ge=h(15);ae=ge})();var ve=ae;C=[],N=function(){return{css_beautify:ve}}.apply(st,C),N!==void 0&&(Fn.exports=N)})()},40998:function(Fn,st,C){var N,ae;(function(){var ve;(function(){"use strict";var ge=[,,function(T){function p(S){this.__parent=S,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}p.prototype.clone_empty=function(){var S=new p(this.__parent);return S.set_indent(this.__indent_count,this.__alignment_count),S},p.prototype.item=function(S){return S<0?this.__items[this.__items.length+S]:this.__items[S]},p.prototype.has_match=function(S){for(var F=this.__items.length-1;F>=0;F--)if(this.__items[F].match(S))return!0;return!1},p.prototype.set_indent=function(S,F){this.is_empty()&&(this.__indent_count=S||0,this.__alignment_count=F||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},p.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)},p.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},p.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var S=this.__parent.current_line;return S.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),S.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),S.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,S.__items[0]===" "&&(S.__items.splice(0,1),S.__character_count-=1),!0}return!1},p.prototype.is_empty=function(){return this.__items.length===0},p.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},p.prototype.push=function(S){this.__items.push(S);var F=S.lastIndexOf(`
|
|
`);F!==-1?this.__character_count=S.length-F:this.__character_count+=S.length},p.prototype.pop=function(){var S=null;return this.is_empty()||(S=this.__items.pop(),this.__character_count-=S.length),S},p.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},p.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},p.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},p.prototype.toString=function(){var S="";return this.is_empty()?this.__parent.indent_empty_lines&&(S=this.__parent.get_indent_string(this.__indent_count)):(S=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),S+=this.__items.join("")),S};function v(S,F){this.__cache=[""],this.__indent_size=S.indent_size,this.__indent_string=S.indent_char,S.indent_with_tabs||(this.__indent_string=new Array(S.indent_size+1).join(S.indent_char)),F=F||"",S.indent_level>0&&(F=new Array(S.indent_level+1).join(this.__indent_string)),this.__base_string=F,this.__base_string_length=F.length}v.prototype.get_indent_size=function(S,F){var O=this.__base_string_length;return F=F||0,S<0&&(O=0),O+=S*this.__indent_size,O+=F,O},v.prototype.get_indent_string=function(S,F){var O=this.__base_string;return F=F||0,S<0&&(S=0,O=""),F+=S*this.__indent_size,this.__ensure_cache(F),O+=this.__cache[F],O},v.prototype.__ensure_cache=function(S){for(;S>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var S=this.__cache.length,F=0,O="";this.__indent_size&&S>=this.__indent_size&&(F=Math.floor(S/this.__indent_size),S-=F*this.__indent_size,O=new Array(F+1).join(this.__indent_string)),S&&(O+=new Array(S+1).join(" ")),this.__cache.push(O)};function E(S,F){this.__indent_cache=new v(S,F),this.raw=!1,this._end_with_newline=S.end_with_newline,this.indent_size=S.indent_size,this.wrap_line_length=S.wrap_line_length,this.indent_empty_lines=S.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new p(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}E.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},E.prototype.get_line_number=function(){return this.__lines.length},E.prototype.get_indent_string=function(S,F){return this.__indent_cache.get_indent_string(S,F)},E.prototype.get_indent_size=function(S,F){return this.__indent_cache.get_indent_size(S,F)},E.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},E.prototype.add_new_line=function(S){return this.is_empty()||!S&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},E.prototype.get_code=function(S){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 O=this.__lines.join(`
|
|
`);return S!==`
|
|
`&&(O=O.replace(/[\n]/g,S)),O},E.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},E.prototype.set_indent=function(S,F){return S=S||0,F=F||0,this.next_line.set_indent(S,F),this.__lines.length>1?(this.current_line.set_indent(S,F),!0):(this.current_line.set_indent(),!1)},E.prototype.add_raw_token=function(S){for(var F=0;F<S.newlines;F++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(S.whitespace_before),this.current_line.push(S.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},E.prototype.add_token=function(S){this.__add_space_before_token(),this.current_line.push(S),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},E.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(" "))},E.prototype.remove_indent=function(S){for(var F=this.__lines.length;S<F;)this.__lines[S]._remove_indent(),S++;this.current_line._remove_wrap_indent()},E.prototype.trim=function(S){for(S=S===void 0?!1:S,this.current_line.trim();S&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},E.prototype.just_added_newline=function(){return this.current_line.is_empty()},E.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},E.prototype.ensure_empty_line_above=function(S,F){for(var O=this.__lines.length-2;O>=0;){var Z=this.__lines[O];if(Z.is_empty())break;if(Z.item(0).indexOf(S)!==0&&Z.item(-1)!==F){this.__lines.splice(O+1,0,new p(this)),this.previous_line=this.__lines[this.__lines.length-2];break}O--}},T.exports.Output=E},function(T){function p(v,E,S,F){this.type=v,this.text=E,this.comments_before=null,this.newlines=S||0,this.whitespace_before=F||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}T.exports.Token=p},,,function(T){function p(S,F){this.raw_options=v(S,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"])}p.prototype._get_array=function(S,F){var O=this.raw_options[S],Z=F||[];return typeof O=="object"?O!==null&&typeof O.concat=="function"&&(Z=O.concat()):typeof O=="string"&&(Z=O.split(/[^a-zA-Z0-9_\/\-]+/)),Z},p.prototype._get_boolean=function(S,F){var O=this.raw_options[S],Z=O===void 0?!!F:!!O;return Z},p.prototype._get_characters=function(S,F){var O=this.raw_options[S],Z=F||"";return typeof O=="string"&&(Z=O.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),Z},p.prototype._get_number=function(S,F){var O=this.raw_options[S];F=parseInt(F,10),isNaN(F)&&(F=0);var Z=parseInt(O,10);return isNaN(Z)&&(Z=F),Z},p.prototype._get_selection=function(S,F,O){var Z=this._get_selection_list(S,F,O);if(Z.length!==1)throw new Error("Invalid Option Value: The option '"+S+`' can only be one of the following values:
|
|
`+F+`
|
|
You passed in: '`+this.raw_options[S]+"'");return Z[0]},p.prototype._get_selection_list=function(S,F,O){if(!F||F.length===0)throw new Error("Selection list cannot be empty.");if(O=O||[F[0]],!this._is_valid_selection(O,F))throw new Error("Invalid Default Value!");var Z=this._get_array(S,O);if(!this._is_valid_selection(Z,F))throw new Error("Invalid Option Value: The option '"+S+`' can contain only the following values:
|
|
`+F+`
|
|
You passed in: '`+this.raw_options[S]+"'");return Z},p.prototype._is_valid_selection=function(S,F){return S.length&&F.length&&!S.some(function(O){return F.indexOf(O)===-1})};function v(S,F){var O={};S=E(S);var Z;for(Z in S)Z!==F&&(O[Z]=S[Z]);if(F&&S[F])for(Z in S[F])O[Z]=S[F][Z];return O}function E(S){var F={},O;for(O in S){var Z=O.replace(/-/g,"_");F[Z]=S[O]}return F}T.exports.Options=p,T.exports.normalizeOpts=E,T.exports.mergeOpts=v},,function(T){var p=RegExp.prototype.hasOwnProperty("sticky");function v(E){this.__input=E||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position<this.__input_length},v.prototype.next=function(){var E=null;return this.hasNext()&&(E=this.__input.charAt(this.__position),this.__position+=1),E},v.prototype.peek=function(E){var S=null;return E=E||0,E+=this.__position,E>=0&&E<this.__input_length&&(S=this.__input.charAt(E)),S},v.prototype.__match=function(E,S){E.lastIndex=S;var F=E.exec(this.__input);return F&&!(p&&E.sticky)&&F.index!==S&&(F=null),F},v.prototype.test=function(E,S){return S=S||0,S+=this.__position,S>=0&&S<this.__input_length?!!this.__match(E,S):!1},v.prototype.testChar=function(E,S){var F=this.peek(S);return E.lastIndex=0,F!==null&&E.test(F)},v.prototype.match=function(E){var S=this.__match(E,this.__position);return S?this.__position+=S[0].length:S=null,S},v.prototype.read=function(E,S,F){var O="",Z;return E&&(Z=this.match(E),Z&&(O+=Z[0])),S&&(Z||!E)&&(O+=this.readUntil(S,F)),O},v.prototype.readUntil=function(E,S){var F="",O=this.__position;E.lastIndex=this.__position;var Z=E.exec(this.__input);return Z?(O=Z.index,S&&(O+=Z[0].length)):O=this.__input_length,F=this.__input.substring(this.__position,O),this.__position=O,F},v.prototype.readUntilAfter=function(E){return this.readUntil(E,!0)},v.prototype.get_regexp=function(E,S){var F=null,O="g";return S&&p&&(O="y"),typeof E=="string"&&E!==""?F=new RegExp(E,O):E&&(F=new RegExp(E.source,O)),F},v.prototype.get_literal_regexp=function(E){return RegExp(E.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},v.prototype.peekUntilAfter=function(E){var S=this.__position,F=this.readUntilAfter(E);return this.__position=S,F},v.prototype.lookBack=function(E){var S=this.__position-1;return S>=E.length&&this.__input.substring(S-E.length,S).toLowerCase()===E},T.exports.InputScanner=v},function(T,p,v){var E=v(8).InputScanner,S=v(3).Token,F=v(10).TokenStream,O=v(11).WhitespacePattern,Z={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},b=function(L,D){this._input=new E(L),this._options=D||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new O(this._input)};b.prototype.tokenize=function(){this._input.restart(),this.__tokens=new F,this._reset();for(var L,D=new S(Z.START,""),I=null,re=[],ce=new F;D.type!==Z.EOF;){for(L=this._get_next_token(D,I);this._is_comment(L);)ce.add(L),L=this._get_next_token(D,I);ce.isEmpty()||(L.comments_before=ce,ce=new F),L.parent=I,this._is_opening(L)?(re.push(I),I=L):I&&this._is_closing(L,I)&&(L.opened=I,I.closed=L,I=re.pop(),L.parent=I),L.previous=D,D.next=L,this.__tokens.add(L),D=L}return this.__tokens},b.prototype._is_first_token=function(){return this.__tokens.isEmpty()},b.prototype._reset=function(){},b.prototype._get_next_token=function(L,D){this._readWhitespace();var I=this._input.read(/.+/g);return I?this._create_token(Z.RAW,I):this._create_token(Z.EOF,"")},b.prototype._is_comment=function(L){return!1},b.prototype._is_opening=function(L){return!1},b.prototype._is_closing=function(L,D){return!1},b.prototype._create_token=function(L,D){var I=new S(L,D,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return I},b.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},T.exports.Tokenizer=b,T.exports.TOKEN=Z},function(T){function p(v){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=v}p.prototype.restart=function(){this.__position=0},p.prototype.isEmpty=function(){return this.__tokens_length===0},p.prototype.hasNext=function(){return this.__position<this.__tokens_length},p.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__tokens[this.__position],this.__position+=1),v},p.prototype.peek=function(v){var E=null;return v=v||0,v+=this.__position,v>=0&&v<this.__tokens_length&&(E=this.__tokens[v]),E},p.prototype.add=function(v){this.__parent_token&&(v.parent=this.__parent_token),this.__tokens.push(v),this.__tokens_length+=1},T.exports.TokenStream=p},function(T,p,v){var E=v(12).Pattern;function S(F,O){E.call(this,F,O),O?this._line_regexp=this._input.get_regexp(O._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}S.prototype=new E,S.prototype.__set_whitespace_patterns=function(F,O){F+="\\t ",O+="\\n\\r",this._match_pattern=this._input.get_regexp("["+F+O+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+O+"]")},S.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 O=this.__split(this._newline_regexp,F);this.newline_count=O.length-1,this.whitespace_before_token=O[this.newline_count]}return F},S.prototype.matching=function(F,O){var Z=this._create();return Z.__set_whitespace_patterns(F,O),Z._update(),Z},S.prototype._create=function(){return new S(this._input,this)},S.prototype.__split=function(F,O){F.lastIndex=0;for(var Z=0,b=[],L=F.exec(O);L;)b.push(O.substring(Z,L.index)),Z=L.index+L[0].length,L=F.exec(O);return Z<O.length?b.push(O.substring(Z,O.length)):b.push(""),b},T.exports.WhitespacePattern=S},function(T){function p(v,E){this._input=v,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,E&&(this._starting_pattern=this._input.get_regexp(E._starting_pattern,!0),this._match_pattern=this._input.get_regexp(E._match_pattern,!0),this._until_pattern=this._input.get_regexp(E._until_pattern),this._until_after=E._until_after)}p.prototype.read=function(){var v=this._input.read(this._starting_pattern);return(!this._starting_pattern||v)&&(v+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),v},p.prototype.read_match=function(){return this._input.match(this._match_pattern)},p.prototype.until_after=function(v){var E=this._create();return E._until_after=!0,E._until_pattern=this._input.get_regexp(v),E._update(),E},p.prototype.until=function(v){var E=this._create();return E._until_after=!1,E._until_pattern=this._input.get_regexp(v),E._update(),E},p.prototype.starting_with=function(v){var E=this._create();return E._starting_pattern=this._input.get_regexp(v,!0),E._update(),E},p.prototype.matching=function(v){var E=this._create();return E._match_pattern=this._input.get_regexp(v,!0),E._update(),E},p.prototype._create=function(){return new p(this._input,this)},p.prototype._update=function(){},T.exports.Pattern=p},function(T){function p(v,E){v=typeof v=="string"?v:v.source,E=typeof E=="string"?E:E.source,this.__directives_block_pattern=new RegExp(v+/ beautify( \w+[:]\w+)+ /.source+E,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(v+/\sbeautify\signore:end\s/.source+E,"g")}p.prototype.get_directives=function(v){if(!v.match(this.__directives_block_pattern))return null;var E={};this.__directive_pattern.lastIndex=0;for(var S=this.__directive_pattern.exec(v);S;)E[S[1]]=S[2],S=this.__directive_pattern.exec(v);return E},p.prototype.readIgnored=function(v){return v.readUntilAfter(this.__directives_end_ignore_pattern)},T.exports.Directives=p},function(T,p,v){var E=v(12).Pattern,S={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function F(O,Z){E.call(this,O,Z),this.__template_pattern=null,this._disabled=Object.assign({},S),this._excluded=Object.assign({},S),Z&&(this.__template_pattern=this._input.get_regexp(Z.__template_pattern),this._excluded=Object.assign(this._excluded,Z._excluded),this._disabled=Object.assign(this._disabled,Z._disabled));var b=new E(O);this.__patterns={handlebars_comment:b.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:b.starting_with(/{{{/).until_after(/}}}/),handlebars:b.starting_with(/{{/).until_after(/}}/),php:b.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:b.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:b.starting_with(/{%/).until_after(/%}/),django_value:b.starting_with(/{{/).until_after(/}}/),django_comment:b.starting_with(/{#/).until_after(/#}/),smarty:b.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:b.starting_with(/{\*/).until_after(/\*}/),smarty_literal:b.starting_with(/{literal}/).until_after(/{\/literal}/)}}F.prototype=new E,F.prototype._create=function(){return new F(this._input,this)},F.prototype._update=function(){this.__set_templated_pattern()},F.prototype.disable=function(O){var Z=this._create();return Z._disabled[O]=!0,Z._update(),Z},F.prototype.read_options=function(O){var Z=this._create();for(var b in S)Z._disabled[b]=O.templating.indexOf(b)===-1;return Z._update(),Z},F.prototype.exclude=function(O){var Z=this._create();return Z._excluded[O]=!0,Z._update(),Z},F.prototype.read=function(){var O="";this._match_pattern?O=this._input.read(this._starting_pattern):O=this._input.read(this._starting_pattern,this.__template_pattern);for(var Z=this._read_template();Z;)this._match_pattern?Z+=this._input.read(this._match_pattern):Z+=this._input.readUntil(this.__template_pattern),O+=Z,Z=this._read_template();return this._until_after&&(O+=this._input.readUntilAfter(this._until_pattern)),O},F.prototype.__set_templated_pattern=function(){var O=[];this._disabled.php||O.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||O.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||O.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||O.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(O.push(this.__patterns.django._starting_pattern.source),O.push(this.__patterns.django_value._starting_pattern.source),O.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||O.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&O.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+O.join("|")+")")},F.prototype._read_template=function(){var O="",Z=this._input.peek();if(Z==="<"){var b=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&b==="?"&&(O=O||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&b==="%"&&(O=O||this.__patterns.erb.read())}else Z==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(O=O||this.__patterns.handlebars_comment.read(),O=O||this.__patterns.handlebars_unescaped.read(),O=O||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(O=O||this.__patterns.django_value.read()),this._excluded.django||(O=O||this.__patterns.django_comment.read(),O=O||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(O=O||this.__patterns.smarty_comment.read(),O=O||this.__patterns.smarty_literal.read(),O=O||this.__patterns.smarty.read()));return O},T.exports.TemplatablePattern=F},,,,function(T,p,v){var E=v(19).Beautifier,S=v(20).Options;function F(O,Z,b,L){var D=new E(O,Z,b,L);return D.beautify()}T.exports=F,T.exports.defaultOptions=function(){return new S}},function(T,p,v){var E=v(20).Options,S=v(2).Output,F=v(21).Tokenizer,O=v(21).TOKEN,Z=/\r\n|[\r\n]/,b=/\r\n|[\r\n]/g,L=function(j,K){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=j.max_preserve_newlines,this.preserve_newlines=j.preserve_newlines,this._output=new S(j,K)};L.prototype.current_line_has_match=function(j){return this._output.current_line.has_match(j)},L.prototype.set_space_before_token=function(j,K){this._output.space_before_token=j,this._output.non_breaking_space=K},L.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},L.prototype.add_raw_token=function(j){this._output.add_raw_token(j)},L.prototype.print_preserved_newlines=function(j){var K=0;j.type!==O.TEXT&&j.previous.type!==O.TEXT&&(K=j.newlines?1:0),this.preserve_newlines&&(K=j.newlines<this.max_preserve_newlines+1?j.newlines:this.max_preserve_newlines+1);for(var ee=0;ee<K;ee++)this.print_newline(ee>0);return K!==0},L.prototype.traverse_whitespace=function(j){return j.whitespace_before||j.newlines?(this.print_preserved_newlines(j)||(this._output.space_before_token=!0),!0):!1},L.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},L.prototype.print_newline=function(j){this._output.add_new_line(j)},L.prototype.print_token=function(j){j.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(j.text))},L.prototype.indent=function(){this.indent_level++},L.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},L.prototype.get_full_indent=function(j){return j=this.indent_level+(j||0),j<1?"":this._output.get_indent_string(j)};var D=function(j){for(var K=null,ee=j.next;ee.type!==O.EOF&&j.closed!==ee;){if(ee.type===O.ATTRIBUTE&&ee.text==="type"){ee.next&&ee.next.type===O.EQUALS&&ee.next.next&&ee.next.next.type===O.VALUE&&(K=ee.next.next.text);break}ee=ee.next}return K},I=function(j,K){var ee=null,z=null;return K.closed?(j==="script"?ee="text/javascript":j==="style"&&(ee="text/css"),ee=D(K)||ee,ee.search("text/css")>-1?z="css":ee.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?z="javascript":ee.search(/(text|application|dojo)\/(x-)?(html)/)>-1?z="html":ee.search(/test\/null/)>-1&&(z="null"),z):null};function re(j,K){return K.indexOf(j)!==-1}function ce(j,K,ee){this.parent=j||null,this.tag=K?K.tag_name:"",this.indent_level=ee||0,this.parser_token=K||null}function X(j){this._printer=j,this._current_frame=null}X.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},X.prototype.record_tag=function(j){var K=new ce(this._current_frame,j,this._printer.indent_level);this._current_frame=K},X.prototype._try_pop_frame=function(j){var K=null;return j&&(K=j.parser_token,this._printer.indent_level=j.indent_level,this._current_frame=j.parent),K},X.prototype._get_frame=function(j,K){for(var ee=this._current_frame;ee&&j.indexOf(ee.tag)===-1;){if(K&&K.indexOf(ee.tag)!==-1){ee=null;break}ee=ee.parent}return ee},X.prototype.try_pop=function(j,K){var ee=this._get_frame([j],K);return this._try_pop_frame(ee)},X.prototype.indent_to_tag=function(j){var K=this._get_frame(j);K&&(this._printer.indent_level=K.indent_level)};function q(j,K,ee,z){this._source_text=j||"",K=K||{},this._js_beautify=ee,this._css_beautify=z,this._tag_stack=null;var Ae=new E(K,"html");this._options=Ae,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}q.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var j=this._source_text,K=this._options.eol;this._options.eol==="auto"&&(K=`
|
|
`,j&&Z.test(j)&&(K=j.match(Z)[0])),j=j.replace(b,`
|
|
`);var ee=j.match(/^[\t ]*/)[0],z={text:"",type:""},Ae=new oe(this._options),Y=new L(this._options,ee),y=new F(j,this._options).tokenize();this._tag_stack=new X(Y);for(var _=null,V=y.next();V.type!==O.EOF;)V.type===O.TAG_OPEN||V.type===O.COMMENT?(_=this._handle_tag_open(Y,V,Ae,z,y),Ae=_):V.type===O.ATTRIBUTE||V.type===O.EQUALS||V.type===O.VALUE||V.type===O.TEXT&&!Ae.tag_complete?_=this._handle_inside_tag(Y,V,Ae,z):V.type===O.TAG_CLOSE?_=this._handle_tag_close(Y,V,Ae):V.type===O.TEXT?_=this._handle_text(Y,V,Ae):V.type===O.CONTROL_FLOW_OPEN?_=this._handle_control_flow_open(Y,V):V.type===O.CONTROL_FLOW_CLOSE?_=this._handle_control_flow_close(Y,V):Y.add_raw_token(V),z=_,V=y.next();var de=Y._output.get_code(K);return de},q.prototype._handle_control_flow_open=function(j,K){var ee={text:K.text,type:K.type};return j.set_space_before_token(K.newlines||K.whitespace_before!=="",!0),K.newlines?j.print_preserved_newlines(K):j.set_space_before_token(K.newlines||K.whitespace_before!=="",!0),j.print_token(K),j.indent(),ee},q.prototype._handle_control_flow_close=function(j,K){var ee={text:K.text,type:K.type};return j.deindent(),K.newlines?j.print_preserved_newlines(K):j.set_space_before_token(K.newlines||K.whitespace_before!=="",!0),j.print_token(K),ee},q.prototype._handle_tag_close=function(j,K,ee){var z={text:K.text,type:K.type};return j.alignment_size=0,ee.tag_complete=!0,j.set_space_before_token(K.newlines||K.whitespace_before!=="",!0),ee.is_unformatted?j.add_raw_token(K):(ee.tag_start_char==="<"&&(j.set_space_before_token(K.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&ee.has_wrapped_attrs&&j.print_newline(!1)),j.print_token(K)),ee.indent_content&&!(ee.is_unformatted||ee.is_content_unformatted)&&(j.indent(),ee.indent_content=!1),!ee.is_inline_element&&!(ee.is_unformatted||ee.is_content_unformatted)&&j.set_wrap_point(),z},q.prototype._handle_inside_tag=function(j,K,ee,z){var Ae=ee.has_wrapped_attrs,Y={text:K.text,type:K.type};return j.set_space_before_token(K.newlines||K.whitespace_before!=="",!0),ee.is_unformatted?j.add_raw_token(K):ee.tag_start_char==="{"&&K.type===O.TEXT?j.print_preserved_newlines(K)?(K.newlines=0,j.add_raw_token(K)):j.print_token(K):(K.type===O.ATTRIBUTE?j.set_space_before_token(!0):(K.type===O.EQUALS||K.type===O.VALUE&&K.previous.type===O.EQUALS)&&j.set_space_before_token(!1),K.type===O.ATTRIBUTE&&ee.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(j.traverse_whitespace(K),Ae=Ae||K.newlines!==0),this._is_wrap_attributes_force&&ee.attr_count>=this._options.wrap_attributes_min_attrs&&(z.type!==O.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(j.print_newline(!1),Ae=!0)),j.print_token(K),Ae=Ae||j.previous_token_wrapped(),ee.has_wrapped_attrs=Ae),Y},q.prototype._handle_text=function(j,K,ee){var z={text:K.text,type:"TK_CONTENT"};return ee.custom_beautifier_name?this._print_custom_beatifier_text(j,K,ee):ee.is_unformatted||ee.is_content_unformatted?j.add_raw_token(K):(j.traverse_whitespace(K),j.print_token(K)),z},q.prototype._print_custom_beatifier_text=function(j,K,ee){var z=this;if(K.text!==""){var Ae=K.text,Y,y=1,_="",V="";ee.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?Y=this._js_beautify:ee.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?Y=this._css_beautify:ee.custom_beautifier_name==="html"&&(Y=function(Mt,Ot){var Fe=new q(Mt,Ot,z._js_beautify,z._css_beautify);return Fe.beautify()}),this._options.indent_scripts==="keep"?y=0:this._options.indent_scripts==="separate"&&(y=-j.indent_level);var de=j.get_full_indent(y);if(Ae=Ae.replace(/\n[ \t]*$/,""),ee.custom_beautifier_name!=="html"&&Ae[0]==="<"&&Ae.match(/^(<!--|<!\[CDATA\[)/)){var We=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(Ae);if(!We){j.add_raw_token(K);return}_=de+We[1]+`
|
|
`,Ae=We[4],We[5]&&(V=de+We[5]),Ae=Ae.replace(/\n[ \t]*$/,""),(We[2]||We[3].indexOf(`
|
|
`)!==-1)&&(We=We[3].match(/[ \t]+$/),We&&(K.whitespace_before=We[0]))}if(Ae)if(Y){var Qe=function(){this.eol=`
|
|
`};Qe.prototype=this._options.raw_options;var ct=new Qe;Ae=Y(de+Ae,ct)}else{var Et=K.whitespace_before;Et&&(Ae=Ae.replace(new RegExp(`
|
|
(`+Et+")?","g"),`
|
|
`)),Ae=de+Ae.replace(/\n/g,`
|
|
`+de)}_&&(Ae?Ae=_+Ae+`
|
|
`+V:Ae=_+V),j.print_newline(!1),Ae&&(K.text=Ae,K.whitespace_before="",K.newlines=0,j.add_raw_token(K),j.print_newline(!0))}},q.prototype._handle_tag_open=function(j,K,ee,z,Ae){var Y=this._get_tag_open_token(K);if((ee.is_unformatted||ee.is_content_unformatted)&&!ee.is_empty_element&&K.type===O.TAG_OPEN&&!Y.is_start_tag?(j.add_raw_token(K),Y.start_tag_token=this._tag_stack.try_pop(Y.tag_name)):(j.traverse_whitespace(K),this._set_tag_position(j,K,Y,ee,z),Y.is_inline_element||j.set_wrap_point(),j.print_token(K)),Y.is_start_tag&&this._is_wrap_attributes_force){var y=0,_;do _=Ae.peek(y),_.type===O.ATTRIBUTE&&(Y.attr_count+=1),y+=1;while(_.type!==O.EOF&&_.type!==O.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(Y.alignment_size=K.text.length+1),!Y.tag_complete&&!Y.is_unformatted&&(j.alignment_size=Y.alignment_size),Y};var oe=function(j,K,ee){if(this.parent=K||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="",!ee)this.tag_complete=!0;else{var z;this.tag_start_char=ee.text[0],this.text=ee.text,this.tag_start_char==="<"?(z=ee.text.match(/^<([^\s>]*)/),this.tag_check=z?z[1]:""):(z=ee.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=z?z[1]:"",(ee.text.startsWith("{{#>")||ee.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&ee.next!==null?this.tag_check=ee.next.text.split(" ")[0]:this.tag_check=ee.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),ee.type===O.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||ee.closed&&ee.closed.text==="/>";var Ae=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(Ae=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!j.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(Ae)))}};q.prototype._get_tag_open_token=function(j){var K=new oe(this._options,this._tag_stack.get_parser_token(),j);return K.alignment_size=this._options.wrap_attributes_indent_size,K.is_end_tag=K.is_end_tag||re(K.tag_check,this._options.void_elements),K.is_empty_element=K.tag_complete||K.is_start_tag&&K.is_end_tag,K.is_unformatted=!K.tag_complete&&re(K.tag_check,this._options.unformatted),K.is_content_unformatted=!K.is_empty_element&&re(K.tag_check,this._options.content_unformatted),K.is_inline_element=re(K.tag_name,this._options.inline)||this._options.inline_custom_elements&&K.tag_name.includes("-")||K.tag_start_char==="{",K},q.prototype._set_tag_position=function(j,K,ee,z,Ae){if(ee.is_empty_element||(ee.is_end_tag?ee.start_tag_token=this._tag_stack.try_pop(ee.tag_name):(this._do_optional_end_element(ee)&&(ee.is_inline_element||j.print_newline(!1)),this._tag_stack.record_tag(ee),(ee.tag_name==="script"||ee.tag_name==="style")&&!(ee.is_unformatted||ee.is_content_unformatted)&&(ee.custom_beautifier_name=I(ee.tag_check,K)))),re(ee.tag_check,this._options.extra_liners)&&(j.print_newline(!1),j._output.just_added_blankline()||j.print_newline(!0)),ee.is_empty_element){if(ee.tag_start_char==="{"&&ee.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),ee.indent_content=!0;var Y=j.current_line_has_match(/{{#if/);Y||j.print_newline(!1)}ee.tag_name==="!--"&&Ae.type===O.TAG_CLOSE&&z.is_end_tag&&ee.text.indexOf(`
|
|
`)===-1||(ee.is_inline_element||ee.is_unformatted||j.print_newline(!1),this._calcluate_parent_multiline(j,ee))}else if(ee.is_end_tag){var y=!1;y=ee.start_tag_token&&ee.start_tag_token.multiline_content,y=y||!ee.is_inline_element&&!(z.is_inline_element||z.is_unformatted)&&!(Ae.type===O.TAG_CLOSE&&ee.start_tag_token===z)&&Ae.type!=="TK_CONTENT",(ee.is_content_unformatted||ee.is_unformatted)&&(y=!1),y&&j.print_newline(!1)}else ee.indent_content=!ee.custom_beautifier_name,ee.tag_start_char==="<"&&(ee.tag_name==="html"?ee.indent_content=this._options.indent_inner_html:ee.tag_name==="head"?ee.indent_content=this._options.indent_head_inner_html:ee.tag_name==="body"&&(ee.indent_content=this._options.indent_body_inner_html)),!(ee.is_inline_element||ee.is_unformatted)&&(Ae.type!=="TK_CONTENT"||ee.is_content_unformatted)&&j.print_newline(!1),this._calcluate_parent_multiline(j,ee)},q.prototype._calcluate_parent_multiline=function(j,K){K.parent&&j._output.just_added_newline()&&!((K.is_inline_element||K.is_unformatted)&&K.parent.is_inline_element)&&(K.parent.multiline_content=!0)};var pe=["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"];q.prototype._do_optional_end_element=function(j){var K=null;if(!(j.is_empty_element||!j.is_start_tag||!j.parent)){if(j.tag_name==="body")K=K||this._tag_stack.try_pop("head");else if(j.tag_name==="li")K=K||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(j.tag_name==="dd"||j.tag_name==="dt")K=K||this._tag_stack.try_pop("dt",["dl"]),K=K||this._tag_stack.try_pop("dd",["dl"]);else if(j.parent.tag_name==="p"&&pe.indexOf(j.tag_name)!==-1){var ee=j.parent.parent;(!ee||_e.indexOf(ee.tag_name)===-1)&&(K=K||this._tag_stack.try_pop("p"))}else j.tag_name==="rp"||j.tag_name==="rt"?(K=K||this._tag_stack.try_pop("rt",["ruby","rtc"]),K=K||this._tag_stack.try_pop("rp",["ruby","rtc"])):j.tag_name==="optgroup"?K=K||this._tag_stack.try_pop("optgroup",["select"]):j.tag_name==="option"?K=K||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):j.tag_name==="colgroup"?K=K||this._tag_stack.try_pop("caption",["table"]):j.tag_name==="thead"?(K=K||this._tag_stack.try_pop("caption",["table"]),K=K||this._tag_stack.try_pop("colgroup",["table"])):j.tag_name==="tbody"||j.tag_name==="tfoot"?(K=K||this._tag_stack.try_pop("caption",["table"]),K=K||this._tag_stack.try_pop("colgroup",["table"]),K=K||this._tag_stack.try_pop("thead",["table"]),K=K||this._tag_stack.try_pop("tbody",["table"])):j.tag_name==="tr"?(K=K||this._tag_stack.try_pop("caption",["table"]),K=K||this._tag_stack.try_pop("colgroup",["table"]),K=K||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(j.tag_name==="th"||j.tag_name==="td")&&(K=K||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),K=K||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return j.parent=this._tag_stack.get_parser_token(),K}},T.exports.Beautifier=q},function(T,p,v){var E=v(6).Options;function S(F){E.call(this,F,"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"])}S.prototype=new E,T.exports.Options=S},function(T,p,v){var E=v(9).Tokenizer,S=v(9).TOKEN,F=v(13).Directives,O=v(14).TemplatablePattern,Z=v(12).Pattern,b={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:S.START,RAW:S.RAW,EOF:S.EOF},L=new F(/<\!--/,/-->/),D=function(I,re){E.call(this,I,re),this._current_tag_name="";var ce=new O(this._input).read_options(this._options),X=new Z(this._input);if(this.__patterns={word:ce.until(/[\n\r\t <]/),word_control_flow_close_excluded:ce.until(/[\n\r\t <}]/),single_quote:ce.until_after(/'/),double_quote:ce.until_after(/"/),attribute:ce.until(/[\n\r\t =>]|\/>/),element_name:ce.until(/[\n\r\t >\/]/),angular_control_flow_start:X.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:X.starting_with(/{{!--/).until_after(/--}}/),handlebars:X.starting_with(/{{/).until_after(/}}/),handlebars_open:X.until(/[\n\r\t }]/),handlebars_raw_close:X.until(/}}/),comment:X.starting_with(/<!--/).until_after(/-->/),cdata:X.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:X.starting_with(/<!\[/).until_after(/]>/),processing:X.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 q=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=X.matching(q).until_after(q)}};D.prototype=new E,D.prototype._is_comment=function(I){return!1},D.prototype._is_opening=function(I){return I.type===b.TAG_OPEN||I.type===b.CONTROL_FLOW_OPEN},D.prototype._is_closing=function(I,re){return I.type===b.TAG_CLOSE&&re&&((I.text===">"||I.text==="/>")&&re.text[0]==="<"||I.text==="}}"&&re.text[0]==="{"&&re.text[1]==="{")||I.type===b.CONTROL_FLOW_CLOSE&&I.text==="}"&&re.text.endsWith("{")},D.prototype._reset=function(){this._current_tag_name=""},D.prototype._get_next_token=function(I,re){var ce=null;this._readWhitespace();var X=this._input.peek();return X===null?this._create_token(b.EOF,""):(ce=ce||this._read_open_handlebars(X,re),ce=ce||this._read_attribute(X,I,re),ce=ce||this._read_close(X,re),ce=ce||this._read_script_and_style(X,I),ce=ce||this._read_control_flows(X,re),ce=ce||this._read_raw_content(X,I,re),ce=ce||this._read_content_word(X,re),ce=ce||this._read_comment_or_cdata(X),ce=ce||this._read_processing(X),ce=ce||this._read_open(X,re),ce=ce||this._create_token(b.UNKNOWN,this._input.next()),ce)},D.prototype._read_comment_or_cdata=function(I){var re=null,ce=null,X=null;if(I==="<"){var q=this._input.peek(1);q==="!"&&(ce=this.__patterns.comment.read(),ce?(X=L.get_directives(ce),X&&X.ignore==="start"&&(ce+=L.readIgnored(this._input))):ce=this.__patterns.cdata.read()),ce&&(re=this._create_token(b.COMMENT,ce),re.directives=X)}return re},D.prototype._read_processing=function(I){var re=null,ce=null,X=null;if(I==="<"){var q=this._input.peek(1);(q==="!"||q==="?")&&(ce=this.__patterns.conditional_comment.read(),ce=ce||this.__patterns.processing.read()),ce&&(re=this._create_token(b.COMMENT,ce),re.directives=X)}return re},D.prototype._read_open=function(I,re){var ce=null,X=null;return(!re||re.type===b.CONTROL_FLOW_OPEN)&&I==="<"&&(ce=this._input.next(),this._input.peek()==="/"&&(ce+=this._input.next()),ce+=this.__patterns.element_name.read(),X=this._create_token(b.TAG_OPEN,ce)),X},D.prototype._read_open_handlebars=function(I,re){var ce=null,X=null;return(!re||re.type===b.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&I==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(ce=this.__patterns.handlebars_comment.read(),ce=ce||this.__patterns.handlebars.read(),X=this._create_token(b.COMMENT,ce)):(ce=this.__patterns.handlebars_open.read(),X=this._create_token(b.TAG_OPEN,ce))),X},D.prototype._read_control_flows=function(I,re){var ce="",X=null;if(!this._options.templating.includes("angular"))return X;if(I==="@"){if(ce=this.__patterns.angular_control_flow_start.read(),ce==="")return X;for(var q=ce.endsWith("(")?1:0,oe=0;!(ce.endsWith("{")&&q===oe);){var pe=this._input.next();if(pe===null)break;pe==="("?q++:pe===")"&&oe++,ce+=pe}X=this._create_token(b.CONTROL_FLOW_OPEN,ce)}else I==="}"&&re&&re.type===b.CONTROL_FLOW_OPEN&&(ce=this._input.next(),X=this._create_token(b.CONTROL_FLOW_CLOSE,ce));return X},D.prototype._read_close=function(I,re){var ce=null,X=null;return re&&re.type===b.TAG_OPEN&&(re.text[0]==="<"&&(I===">"||I==="/"&&this._input.peek(1)===">")?(ce=this._input.next(),I==="/"&&(ce+=this._input.next()),X=this._create_token(b.TAG_CLOSE,ce)):re.text[0]==="{"&&I==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),X=this._create_token(b.TAG_CLOSE,"}}"))),X},D.prototype._read_attribute=function(I,re,ce){var X=null,q="";if(ce&&ce.text[0]==="<")if(I==="=")X=this._create_token(b.EQUALS,this._input.next());else if(I==='"'||I==="'"){var oe=this._input.next();I==='"'?oe+=this.__patterns.double_quote.read():oe+=this.__patterns.single_quote.read(),X=this._create_token(b.VALUE,oe)}else q=this.__patterns.attribute.read(),q&&(re.type===b.EQUALS?X=this._create_token(b.VALUE,q):X=this._create_token(b.ATTRIBUTE,q));return X},D.prototype._is_content_unformatted=function(I){return this._options.void_elements.indexOf(I)===-1&&(this._options.content_unformatted.indexOf(I)!==-1||this._options.unformatted.indexOf(I)!==-1)},D.prototype._read_raw_content=function(I,re,ce){var X="";if(ce&&ce.text[0]==="{")X=this.__patterns.handlebars_raw_close.read();else if(re.type===b.TAG_CLOSE&&re.opened.text[0]==="<"&&re.text[0]!=="/"){var q=re.opened.text.substr(1).toLowerCase();this._is_content_unformatted(q)&&(X=this._input.readUntil(new RegExp("</"+q+"[\\n\\r\\t ]*?>","ig")))}return X?this._create_token(b.TEXT,X):null},D.prototype._read_script_and_style=function(I,re){if(re.type===b.TAG_CLOSE&&re.opened.text[0]==="<"&&re.text[0]!=="/"){var ce=re.opened.text.substr(1).toLowerCase();if(ce==="script"||ce==="style"){var X=this._read_comment_or_cdata(I);if(X)return X.type=b.TEXT,X;var q=this._input.readUntil(new RegExp("</"+ce+"[\\n\\r\\t ]*?>","ig"));if(q)return this._create_token(b.TEXT,q)}}return null},D.prototype._read_content_word=function(I,re){var ce="";return this._options.unformatted_content_delimiter&&I===this._options.unformatted_content_delimiter[0]&&(ce=this.__patterns.unformatted_content_delimiter.read()),ce||(ce=re&&re.type===b.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),ce?this._create_token(b.TEXT,ce):null},T.exports.Tokenizer=D,T.exports.TOKEN=b}],ie={};function A(T){var p=ie[T];if(p!==void 0)return p.exports;var v=ie[T]={exports:{}};return ge[T](v,v.exports,A),v.exports}var B=A(18);ve=B})();var le=ve;if(1)N=[C,C(58553),C(87804)],ae=function(ge){var ie=C(58553),A=C(87804);return{html_beautify:function(B,T){return le(B,T,ie.js_beautify,A.css_beautify)}}}.apply(st,N),ae!==void 0&&(Fn.exports=ae);else var Q,h})()},58553:function(Fn,st){var C,N;(function(){var ae;(function(){"use strict";var le=[function(ie,A,B){var T=B(1).Beautifier,p=B(5).Options;function v(E,S){var F=new T(E,S);return F.beautify()}ie.exports=v,ie.exports.defaultOptions=function(){return new p}},function(ie,A,B){var T=B(2).Output,p=B(3).Token,v=B(4),E=B(5).Options,S=B(7).Tokenizer,F=B(7).line_starters,O=B(7).positionable_operators,Z=B(7).TOKEN;function b(_,V){return V.indexOf(_)!==-1}function L(_){return _.replace(/^\s+/g,"")}function D(_){for(var V={},de=0;de<_.length;de++)V[_[de].replace(/-/g,"_")]=_[de];return V}function I(_,V){return _&&_.type===Z.RESERVED&&_.text===V}function re(_,V){return _&&_.type===Z.RESERVED&&b(_.text,V)}var ce=["case","return","do","if","throw","else","await","break","continue","async"],X=["before-newline","after-newline","preserve-newline"],q=D(X),oe=[q.before_newline,q.preserve_newline],pe={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function _e(_,V){V.multiline_frame||V.mode===pe.ForInitializer||V.mode===pe.Conditional||_.remove_indent(V.start_line_index)}function j(_){_=_.replace(v.allLineBreaks,`
|
|
`);for(var V=[],de=_.indexOf(`
|
|
`);de!==-1;)V.push(_.substring(0,de)),_=_.substring(de+1),de=_.indexOf(`
|
|
`);return _.length&&V.push(_),V}function K(_){return _===pe.ArrayLiteral}function ee(_){return b(_,[pe.Expression,pe.ForInitializer,pe.Conditional])}function z(_,V){for(var de=0;de<_.length;de++){var We=_[de].trim();if(We.charAt(0)!==V)return!1}return!0}function Ae(_,V){for(var de=0,We=_.length,Qe;de<We;de++)if(Qe=_[de],Qe&&Qe.indexOf(V)!==0)return!1;return!0}function Y(_,V){V=V||{},this._source_text=_||"",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 E(V)}Y.prototype.create_flags=function(_,V){var de=0;_&&(de=_.indentation_level,!this._output.just_added_newline()&&_.line_indent_level>de&&(de=_.line_indent_level));var We={mode:V,parent:_,last_token:_?_.last_token:new p(Z.START_BLOCK,""),last_word:_?_.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:de,alignment:0,line_indent_level:_?_.line_indent_level:de,start_line_index:this._output.get_line_number(),ternary_depth:0};return We},Y.prototype._reset=function(_){var V=_.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new T(this._options,V),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(pe.BlockStatement);var de=new S(_,this._options);return this._tokens=de.tokenize(),_},Y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _,V=this._reset(this._source_text),de=this._options.eol;this._options.eol==="auto"&&(de=`
|
|
`,V&&v.lineBreak.test(V||"")&&(de=V.match(v.lineBreak)[0]));for(var We=this._tokens.next();We;)this.handle_token(We),this._last_last_text=this._flags.last_token.text,this._flags.last_token=We,We=this._tokens.next();return _=this._output.get_code(de),_},Y.prototype.handle_token=function(_,V){_.type===Z.START_EXPR?this.handle_start_expr(_):_.type===Z.END_EXPR?this.handle_end_expr(_):_.type===Z.START_BLOCK?this.handle_start_block(_):_.type===Z.END_BLOCK?this.handle_end_block(_):_.type===Z.WORD?this.handle_word(_):_.type===Z.RESERVED?this.handle_word(_):_.type===Z.SEMICOLON?this.handle_semicolon(_):_.type===Z.STRING?this.handle_string(_):_.type===Z.EQUALS?this.handle_equals(_):_.type===Z.OPERATOR?this.handle_operator(_):_.type===Z.COMMA?this.handle_comma(_):_.type===Z.BLOCK_COMMENT?this.handle_block_comment(_,V):_.type===Z.COMMENT?this.handle_comment(_,V):_.type===Z.DOT?this.handle_dot(_):_.type===Z.EOF?this.handle_eof(_):_.type===Z.UNKNOWN?this.handle_unknown(_,V):this.handle_unknown(_,V)},Y.prototype.handle_whitespace_and_comments=function(_,V){var de=_.newlines,We=this._options.keep_array_indentation&&K(this._flags.mode);if(_.comments_before)for(var Qe=_.comments_before.next();Qe;)this.handle_whitespace_and_comments(Qe,V),this.handle_token(Qe,V),Qe=_.comments_before.next();if(We)for(var ct=0;ct<de;ct+=1)this.print_newline(ct>0,V);else if(this._options.max_preserve_newlines&&de>this._options.max_preserve_newlines&&(de=this._options.max_preserve_newlines),this._options.preserve_newlines&&de>1){this.print_newline(!1,V);for(var Et=1;Et<de;Et+=1)this.print_newline(!0,V)}};var y=["async","break","continue","return","throw","yield"];Y.prototype.allow_wrap_or_preserved_newline=function(_,V){if(V=V===void 0?!1:V,!this._output.just_added_newline()){var de=this._options.preserve_newlines&&_.newlines||V,We=b(this._flags.last_token.text,O)||b(_.text,O);if(We){var Qe=b(this._flags.last_token.text,O)&&b(this._options.operator_position,oe)||b(_.text,O);de=de&&Qe}if(de)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(re(this._flags.last_token,y))return;this._output.set_wrap_point()}}},Y.prototype.print_newline=function(_,V){if(!V&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==Z.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var de=this._tokens.peek();this._flags.mode===pe.Statement&&!(this._flags.if_block&&I(de,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(_)&&(this._flags.multiline_frame=!0)},Y.prototype.print_token_line_indentation=function(_){this._output.just_added_newline()&&(this._options.keep_array_indentation&&_.newlines&&(_.text==="["||K(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(_.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))},Y.prototype.print_token=function(_){if(this._output.raw){this._output.add_raw_token(_);return}if(this._options.comma_first&&_.previous&&_.previous.type===Z.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var V=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(V),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(_),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(_),this._output.non_breaking_space=!0,this._output.add_token(_.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},Y.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Y.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))},Y.prototype.set_mode=function(_){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,_),this._flags=this.create_flags(this._previous_flags,_),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Y.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===pe.Statement&&_e(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},Y.prototype.start_of_object_property=function(){return this._flags.parent.mode===pe.ObjectLiteral&&this._flags.mode===pe.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||re(this._flags.last_token,["get","set"]))},Y.prototype.start_of_statement=function(_){var V=!1;return V=V||re(this._flags.last_token,["var","let","const"])&&_.type===Z.WORD,V=V||I(this._flags.last_token,"do"),V=V||!(this._flags.parent.mode===pe.ObjectLiteral&&this._flags.mode===pe.Statement)&&re(this._flags.last_token,y)&&!_.newlines,V=V||I(this._flags.last_token,"else")&&!(I(_,"if")&&!_.comments_before),V=V||this._flags.last_token.type===Z.END_EXPR&&(this._previous_flags.mode===pe.ForInitializer||this._previous_flags.mode===pe.Conditional),V=V||this._flags.last_token.type===Z.WORD&&this._flags.mode===pe.BlockStatement&&!this._flags.in_case&&!(_.text==="--"||_.text==="++")&&this._last_last_text!=="function"&&_.type!==Z.WORD&&_.type!==Z.RESERVED,V=V||this._flags.mode===pe.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||re(this._flags.last_token,["get","set"])),V?(this.set_mode(pe.Statement),this.indent(),this.handle_whitespace_and_comments(_,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_,re(_,["do","for","if","while"])),!0):!1},Y.prototype.handle_start_expr=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_);var V=pe.Expression;if(_.text==="["){if(this._flags.last_token.type===Z.WORD||this._flags.last_token.text===")"){re(this._flags.last_token,F)&&(this._output.space_before_token=!0),this.print_token(_),this.set_mode(V),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}V=pe.ArrayLiteral,K(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()),b(this._flags.last_token.type,[Z.START_EXPR,Z.END_EXPR,Z.WORD,Z.OPERATOR,Z.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===Z.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,V=pe.ForInitializer):b(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,V=pe.Conditional):b(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&_.whitespace_before===""?this._output.space_before_token=!1:(b(this._flags.last_token.text,F)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===Z.EQUALS||this._flags.last_token.type===Z.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_);else if(this._flags.last_token.type===Z.WORD){this._output.space_before_token=!1;var de=this._tokens.peek(-3);if(this._options.space_after_named_function&&de){var We=this._tokens.peek(-4);re(de,["async","function"])||de.text==="*"&&re(We,["async","function"])?this._output.space_before_token=!0:this._flags.mode===pe.ObjectLiteral?(de.text==="{"||de.text===","||de.text==="*"&&(We.text==="{"||We.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(_);(this._flags.last_token.type===Z.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(b(this._last_last_text,["function","yield"])||this._flags.mode===pe.ObjectLiteral&&b(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===Z.START_BLOCK?this.print_newline():(this._flags.last_token.type===Z.END_EXPR||this._flags.last_token.type===Z.START_EXPR||this._flags.last_token.type===Z.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===Z.COMMA)&&this.allow_wrap_or_preserved_newline(_,_.newlines),this.print_token(_),this.set_mode(V),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},Y.prototype.handle_end_expr=function(_){for(;this._flags.mode===pe.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(_,_.text==="]"&&K(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===Z.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(_),this.restore_mode(),_e(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===pe.Conditional&&(this._previous_flags.mode=pe.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},Y.prototype.handle_start_block=function(_){this.handle_whitespace_and_comments(_);var V=this._tokens.peek(),de=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===Z.END_EXPR?(this.set_mode(pe.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(pe.BlockStatement):de&&(b(de.text,[":",","])&&b(V.type,[Z.STRING,Z.WORD,Z.RESERVED])||b(V.text,["get","set","..."])&&b(de.type,[Z.WORD,Z.RESERVED]))?b(this._last_last_text,["class","interface"])&&!b(de.text,[":",","])?this.set_mode(pe.BlockStatement):this.set_mode(pe.ObjectLiteral):this._flags.last_token.type===Z.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(pe.BlockStatement):b(this._flags.last_token.type,[Z.EQUALS,Z.START_EXPR,Z.COMMA,Z.OPERATOR])||re(this._flags.last_token,["return","throw","import","default"])?this.set_mode(pe.ObjectLiteral):this.set_mode(pe.BlockStatement),this._flags.last_token&&re(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var We=!V.comments_before&&V.text==="}",Qe=We&&this._flags.last_word==="function"&&this._flags.last_token.type===Z.END_EXPR;if(this._options.brace_preserve_inline){var ct=0,Et=null;this._flags.inline_frame=!0;do if(ct+=1,Et=this._tokens.peek(ct-1),Et.newlines){this._flags.inline_frame=!1;break}while(Et.type!==Z.EOF&&!(Et.type===Z.END_BLOCK&&Et.opened===_))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==Z.OPERATOR&&(Qe||this._flags.last_token.type===Z.EQUALS||re(this._flags.last_token,ce)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(K(this._previous_flags.mode)&&(this._flags.last_token.type===Z.START_EXPR||this._flags.last_token.type===Z.COMMA)&&((this._flags.last_token.type===Z.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===Z.COMMA||this._flags.last_token.type===Z.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(_),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==Z.OPERATOR&&this._flags.last_token.type!==Z.START_EXPR&&(b(this._flags.last_token.type,[Z.START_BLOCK,Z.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(_),this.indent(),!We&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},Y.prototype.handle_end_block=function(_){for(this.handle_whitespace_and_comments(_);this._flags.mode===pe.Statement;)this.restore_mode();var V=this._flags.last_token.type===Z.START_BLOCK;this._flags.inline_frame&&!V?this._output.space_before_token=!0:this._options.brace_style==="expand"?V||this.print_newline():V||(K(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(_)},Y.prototype.handle_word=function(_){if(_.type===Z.RESERVED){if(b(_.text,["set","get"])&&this._flags.mode!==pe.ObjectLiteral)_.type=Z.WORD;else if(_.text==="import"&&b(this._tokens.peek().text,["(","."]))_.type=Z.WORD;else if(b(_.text,["as","from"])&&!this._flags.import_block)_.type=Z.WORD;else if(this._flags.mode===pe.ObjectLiteral){var V=this._tokens.peek();V.text===":"&&(_.type=Z.WORD)}}if(this.start_of_statement(_)?re(this._flags.last_token,["var","let","const"])&&_.type===Z.WORD&&(this._flags.declaration_statement=!0):_.newlines&&!ee(this._flags.mode)&&(this._flags.last_token.type!==Z.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==Z.EQUALS&&(this._options.preserve_newlines||!re(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(_),this.print_newline()):this.handle_whitespace_and_comments(_),this._flags.do_block&&!this._flags.do_while)if(I(_,"while")){this._output.space_before_token=!0,this.print_token(_),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&&I(_,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===pe.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&re(_,["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(_),this._flags.in_case=!0;return}if((this._flags.last_token.type===Z.COMMA||this._flags.last_token.type===Z.START_EXPR||this._flags.last_token.type===Z.EQUALS||this._flags.last_token.type===Z.OPERATOR)&&!this.start_of_object_property()&&!(b(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===pe.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(_),I(_,"function")){(b(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(b(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===Z.OPERATOR))&&!this._output.just_added_blankline()&&!_.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===Z.RESERVED||this._flags.last_token.type===Z.WORD?re(this._flags.last_token,["get","set","new","export"])||re(this._flags.last_token,y)?this._output.space_before_token=!0:I(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===Z.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(ee(this._flags.mode)||K(this._flags.mode))||this.print_newline(),this.print_token(_),this._flags.last_word=_.text;return}var de="NONE";if(this._flags.last_token.type===Z.END_BLOCK?this._previous_flags.inline_frame?de="SPACE":re(_,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines?de="NEWLINE":(de="SPACE",this._output.space_before_token=!0):de="NEWLINE":this._flags.last_token.type===Z.SEMICOLON&&this._flags.mode===pe.BlockStatement?de="NEWLINE":this._flags.last_token.type===Z.SEMICOLON&&ee(this._flags.mode)?de="SPACE":this._flags.last_token.type===Z.STRING?de="NEWLINE":this._flags.last_token.type===Z.RESERVED||this._flags.last_token.type===Z.WORD||this._flags.last_token.text==="*"&&(b(this._last_last_text,["function","yield"])||this._flags.mode===pe.ObjectLiteral&&b(this._last_last_text,["{",","]))?de="SPACE":this._flags.last_token.type===Z.START_BLOCK?this._flags.inline_frame?de="SPACE":de="NEWLINE":this._flags.last_token.type===Z.END_EXPR&&(this._output.space_before_token=!0,de="NEWLINE"),re(_,F)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?de="SPACE":de="NEWLINE"),re(_,["else","catch","finally"]))if((!(this._flags.last_token.type===Z.END_BLOCK&&this._previous_flags.mode===pe.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var We=this._output.current_line;We.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else de==="NEWLINE"?re(this._flags.last_token,ce)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&re(_,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==Z.END_EXPR?(this._flags.last_token.type!==Z.START_EXPR||!re(_,["var","let","const"]))&&this._flags.last_token.text!==":"&&(I(_,"if")&&I(_.previous,"else")?this._output.space_before_token=!0:this.print_newline()):re(_,F)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&K(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():de==="SPACE"&&(this._output.space_before_token=!0);_.previous&&(_.previous.type===Z.WORD||_.previous.type===Z.RESERVED)&&(this._output.space_before_token=!0),this.print_token(_),this._flags.last_word=_.text,_.type===Z.RESERVED&&(_.text==="do"?this._flags.do_block=!0:_.text==="if"?this._flags.if_block=!0:_.text==="import"?this._flags.import_block=!0:this._flags.import_block&&I(_,"from")&&(this._flags.import_block=!1))},Y.prototype.handle_semicolon=function(_){this.start_of_statement(_)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(_);for(var V=this._tokens.peek();this._flags.mode===pe.Statement&&!(this._flags.if_block&&I(V,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(_)},Y.prototype.handle_string=function(_){_.text.startsWith("`")&&_.newlines===0&&_.whitespace_before===""&&(_.previous.text===")"||this._flags.last_token.type===Z.WORD)||(this.start_of_statement(_)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(_),this._flags.last_token.type===Z.RESERVED||this._flags.last_token.type===Z.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===Z.COMMA||this._flags.last_token.type===Z.START_EXPR||this._flags.last_token.type===Z.EQUALS||this._flags.last_token.type===Z.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_):_.text.startsWith("`")&&this._flags.last_token.type===Z.END_EXPR&&(_.previous.text==="]"||_.previous.text===")")&&_.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(_)},Y.prototype.handle_equals=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0},Y.prototype.handle_comma=function(_){this.handle_whitespace_and_comments(_,!0),this.print_token(_),this._output.space_before_token=!0,this._flags.declaration_statement?(ee(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(_)):this._flags.mode===pe.ObjectLiteral||this._flags.mode===pe.Statement&&this._flags.parent.mode===pe.ObjectLiteral?(this._flags.mode===pe.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)},Y.prototype.handle_operator=function(_){var V=_.text==="*"&&(re(this._flags.last_token,["function","yield"])||b(this._flags.last_token.type,[Z.START_BLOCK,Z.COMMA,Z.END_BLOCK,Z.SEMICOLON])),de=b(_.text,["-","+"])&&(b(this._flags.last_token.type,[Z.START_BLOCK,Z.START_EXPR,Z.EQUALS,Z.OPERATOR])||b(this._flags.last_token.text,F)||this._flags.last_token.text===",");if(!this.start_of_statement(_)){var We=!V;this.handle_whitespace_and_comments(_,We)}if(_.text==="*"&&this._flags.last_token.type===Z.DOT){this.print_token(_);return}if(_.text==="::"){this.print_token(_);return}if(b(_.text,["-","+"])&&this.start_of_object_property()){this.print_token(_);return}if(this._flags.last_token.type===Z.OPERATOR&&b(this._options.operator_position,oe)&&this.allow_wrap_or_preserved_newline(_),_.text===":"&&this._flags.in_case){this.print_token(_),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==Z.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 Qe=!0,ct=!0,Et=!1;if(_.text===":"?this._flags.ternary_depth===0?Qe=!1:(this._flags.ternary_depth-=1,Et=!0):_.text==="?"&&(this._flags.ternary_depth+=1),!de&&!V&&this._options.preserve_newlines&&b(_.text,O)){var Mt=_.text===":",Ot=Mt&&Et,Fe=Mt&&!Et;switch(this._options.operator_position){case q.before_newline:this._output.space_before_token=!Fe,this.print_token(_),(!Mt||Ot)&&this.allow_wrap_or_preserved_newline(_),this._output.space_before_token=!0;return;case q.after_newline:this._output.space_before_token=!0,!Mt||Ot?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(_):this._output.space_before_token=!1,this.print_token(_),this._output.space_before_token=!0;return;case q.preserve_newline:Fe||this.allow_wrap_or_preserved_newline(_),Qe=!(this._output.just_added_newline()||Fe),this._output.space_before_token=Qe,this.print_token(_),this._output.space_before_token=!0;return}}if(V){this.allow_wrap_or_preserved_newline(_),Qe=!1;var kt=this._tokens.peek();ct=kt&&b(kt.type,[Z.WORD,Z.RESERVED])}else if(_.text==="...")this.allow_wrap_or_preserved_newline(_),Qe=this._flags.last_token.type===Z.START_BLOCK,ct=!1;else if(b(_.text,["--","++","!","~"])||de){if((this._flags.last_token.type===Z.COMMA||this._flags.last_token.type===Z.START_EXPR)&&this.allow_wrap_or_preserved_newline(_),Qe=!1,ct=!1,_.newlines&&(_.text==="--"||_.text==="++"||_.text==="~")){var sn=re(this._flags.last_token,ce)&&_.newlines;sn&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(sn,!0)}this._flags.last_token.text===";"&&ee(this._flags.mode)&&(Qe=!0),this._flags.last_token.type===Z.RESERVED?Qe=!0:this._flags.last_token.type===Z.END_EXPR?Qe=!(this._flags.last_token.text==="]"&&(_.text==="--"||_.text==="++")):this._flags.last_token.type===Z.OPERATOR&&(Qe=b(_.text,["--","-","++","+"])&&b(this._flags.last_token.text,["--","-","++","+"]),b(_.text,["+","-"])&&b(this._flags.last_token.text,["--","++"])&&(ct=!0)),(this._flags.mode===pe.BlockStatement&&!this._flags.inline_frame||this._flags.mode===pe.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Qe,this.print_token(_),this._output.space_before_token=ct},Y.prototype.handle_block_comment=function(_,V){if(this._output.raw){this._output.add_raw_token(_),_.directives&&_.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(_.directives){this.print_newline(!1,V),this.print_token(_),_.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!v.newline.test(_.text)&&!_.newlines){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0;return}else this.print_block_commment(_,V)},Y.prototype.print_block_commment=function(_,V){var de=j(_.text),We,Qe=!1,ct=!1,Et=_.whitespace_before,Mt=Et.length;if(this.print_newline(!1,V),this.print_token_line_indentation(_),this._output.add_token(de[0]),this.print_newline(!1,V),de.length>1){for(de=de.slice(1),Qe=z(de,"*"),ct=Ae(de,Et),Qe&&(this._flags.alignment=1),We=0;We<de.length;We++)Qe?(this.print_token_line_indentation(_),this._output.add_token(L(de[We]))):ct&&de[We]?(this.print_token_line_indentation(_),this._output.add_token(de[We].substring(Mt))):(this._output.current_line.set_indent(-1),this._output.add_token(de[We])),this.print_newline(!1,V);this._flags.alignment=0}},Y.prototype.handle_comment=function(_,V){_.newlines?this.print_newline(!1,V):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(_),this.print_newline(!1,V)},Y.prototype.handle_dot=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),re(this._flags.last_token,ce)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(_,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(_)},Y.prototype.handle_unknown=function(_,V){this.print_token(_),_.text[_.text.length-1]===`
|
|
`&&this.print_newline(!1,V)},Y.prototype.handle_eof=function(_){for(;this._flags.mode===pe.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_)},ie.exports.Beautifier=Y},function(ie){function A(p){this.__parent=p,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}A.prototype.clone_empty=function(){var p=new A(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},A.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},A.prototype.has_match=function(p){for(var v=this.__items.length-1;v>=0;v--)if(this.__items[v].match(p))return!0;return!1},A.prototype.set_indent=function(p,v){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=v||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},A.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)},A.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},A.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},A.prototype.is_empty=function(){return this.__items.length===0},A.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},A.prototype.push=function(p){this.__items.push(p);var v=p.lastIndexOf(`
|
|
`);v!==-1?this.__character_count=p.length-v:this.__character_count+=p.length},A.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},A.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},A.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},A.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},A.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function B(p,v){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),v=v||"",p.indent_level>0&&(v=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=v,this.__base_string_length=v.length}B.prototype.get_indent_size=function(p,v){var E=this.__base_string_length;return v=v||0,p<0&&(E=0),E+=p*this.__indent_size,E+=v,E},B.prototype.get_indent_string=function(p,v){var E=this.__base_string;return v=v||0,p<0&&(p=0,E=""),v+=p*this.__indent_size,this.__ensure_cache(v),E+=this.__cache[v],E},B.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},B.prototype.__add_column=function(){var p=this.__cache.length,v=0,E="";this.__indent_size&&p>=this.__indent_size&&(v=Math.floor(p/this.__indent_size),p-=v*this.__indent_size,E=new Array(v+1).join(this.__indent_string)),p&&(E+=new Array(p+1).join(" ")),this.__cache.push(E)};function T(p,v){this.__indent_cache=new B(p,v),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new A(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}T.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},T.prototype.get_line_number=function(){return this.__lines.length},T.prototype.get_indent_string=function(p,v){return this.__indent_cache.get_indent_string(p,v)},T.prototype.get_indent_size=function(p,v){return this.__indent_cache.get_indent_size(p,v)},T.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},T.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},T.prototype.get_code=function(p){this.trim(!0);var v=this.current_line.pop();v&&(v[v.length-1]===`
|
|
`&&(v=v.replace(/\n+$/g,"")),this.current_line.push(v)),this._end_with_newline&&this.__add_outputline();var E=this.__lines.join(`
|
|
`);return p!==`
|
|
`&&(E=E.replace(/[\n]/g,p)),E},T.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},T.prototype.set_indent=function(p,v){return p=p||0,v=v||0,this.next_line.set_indent(p,v),this.__lines.length>1?(this.current_line.set_indent(p,v),!0):(this.current_line.set_indent(),!1)},T.prototype.add_raw_token=function(p){for(var v=0;v<p.newlines;v++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(p.whitespace_before),this.current_line.push(p.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},T.prototype.add_token=function(p){this.__add_space_before_token(),this.current_line.push(p),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},T.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(" "))},T.prototype.remove_indent=function(p){for(var v=this.__lines.length;p<v;)this.__lines[p]._remove_indent(),p++;this.current_line._remove_wrap_indent()},T.prototype.trim=function(p){for(p=p===void 0?!1:p,this.current_line.trim();p&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},T.prototype.just_added_newline=function(){return this.current_line.is_empty()},T.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},T.prototype.ensure_empty_line_above=function(p,v){for(var E=this.__lines.length-2;E>=0;){var S=this.__lines[E];if(S.is_empty())break;if(S.item(0).indexOf(p)!==0&&S.item(-1)!==v){this.__lines.splice(E+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}E--}},ie.exports.Output=T},function(ie){function A(B,T,p,v){this.type=B,this.text=T,this.comments_before=null,this.newlines=p||0,this.whitespace_before=v||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}ie.exports.Token=A},function(ie,A){var B="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",T="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",p="\\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",v="\\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",E="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",S="(?:"+E+"|["+B+p+"])",F="(?:"+E+"|["+T+p+v+"])*";A.identifier=new RegExp(S+F,"g"),A.identifierStart=new RegExp(S),A.identifierMatch=new RegExp("(?:"+E+"|["+T+p+v+"])+");var O=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;A.newline=/[\n\r\u2028\u2029]/,A.lineBreak=new RegExp(`\r
|
|
|`+A.newline.source),A.allLineBreaks=new RegExp(A.lineBreak.source,"g")},function(ie,A,B){var T=B(6).Options,p=["before-newline","after-newline","preserve-newline"];function v(E){T.call(this,E,"js");var S=this.raw_options.brace_style||null;S==="expand-strict"?this.raw_options.brace_style="expand":S==="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 F=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var O=0;O<F.length;O++)F[O]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=F[O];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",p),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}v.prototype=new T,ie.exports.Options=v},function(ie){function A(p,v){this.raw_options=B(p,v),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"])}A.prototype._get_array=function(p,v){var E=this.raw_options[p],S=v||[];return typeof E=="object"?E!==null&&typeof E.concat=="function"&&(S=E.concat()):typeof E=="string"&&(S=E.split(/[^a-zA-Z0-9_\/\-]+/)),S},A.prototype._get_boolean=function(p,v){var E=this.raw_options[p],S=E===void 0?!!v:!!E;return S},A.prototype._get_characters=function(p,v){var E=this.raw_options[p],S=v||"";return typeof E=="string"&&(S=E.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),S},A.prototype._get_number=function(p,v){var E=this.raw_options[p];v=parseInt(v,10),isNaN(v)&&(v=0);var S=parseInt(E,10);return isNaN(S)&&(S=v),S},A.prototype._get_selection=function(p,v,E){var S=this._get_selection_list(p,v,E);if(S.length!==1)throw new Error("Invalid Option Value: The option '"+p+`' can only be one of the following values:
|
|
`+v+`
|
|
You passed in: '`+this.raw_options[p]+"'");return S[0]},A.prototype._get_selection_list=function(p,v,E){if(!v||v.length===0)throw new Error("Selection list cannot be empty.");if(E=E||[v[0]],!this._is_valid_selection(E,v))throw new Error("Invalid Default Value!");var S=this._get_array(p,E);if(!this._is_valid_selection(S,v))throw new Error("Invalid Option Value: The option '"+p+`' can contain only the following values:
|
|
`+v+`
|
|
You passed in: '`+this.raw_options[p]+"'");return S},A.prototype._is_valid_selection=function(p,v){return p.length&&v.length&&!p.some(function(E){return v.indexOf(E)===-1})};function B(p,v){var E={};p=T(p);var S;for(S in p)S!==v&&(E[S]=p[S]);if(v&&p[v])for(S in p[v])E[S]=p[v][S];return E}function T(p){var v={},E;for(E in p){var S=E.replace(/-/g,"_");v[S]=p[E]}return v}ie.exports.Options=A,ie.exports.normalizeOpts=T,ie.exports.mergeOpts=B},function(ie,A,B){var T=B(8).InputScanner,p=B(9).Tokenizer,v=B(9).TOKEN,E=B(13).Directives,S=B(4),F=B(12).Pattern,O=B(14).TemplatablePattern;function Z(z,Ae){return Ae.indexOf(z)!==-1}var b={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:v.START,RAW:v.RAW,EOF:v.EOF},L=new E(/\/\*/,/\*\//),D=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,I=/[0-9]/,re=/[^\d\.]/,ce=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),X=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";X=X.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),X="\\?\\.(?!\\d) "+X,X=X.replace(/ /g,"|");var q=new RegExp(X),oe="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),pe=oe.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),_e=new RegExp("^(?:"+pe.join("|")+")$"),j,K=function(z,Ae){p.call(this,z,Ae),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var Y=new F(this._input),y=new O(this._input).read_options(this._options);this.__patterns={template:y,identifier:y.starting_with(S.identifier).matching(S.identifierMatch),number:Y.matching(D),punct:Y.matching(q),comment:Y.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:Y.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:Y.matching(/<!--/),html_comment_end:Y.matching(/-->/),include:Y.starting_with(/#include/).until_after(S.lineBreak),shebang:Y.starting_with(/#!/).until_after(S.lineBreak),xml:Y.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:y.until(/['\\\n\r\u2028\u2029]/),double_quote:y.until(/["\\\n\r\u2028\u2029]/),template_text:y.until(/[`\\$]/),template_expression:y.until(/[`}\\]/)}};K.prototype=new p,K.prototype._is_comment=function(z){return z.type===b.COMMENT||z.type===b.BLOCK_COMMENT||z.type===b.UNKNOWN},K.prototype._is_opening=function(z){return z.type===b.START_BLOCK||z.type===b.START_EXPR},K.prototype._is_closing=function(z,Ae){return(z.type===b.END_BLOCK||z.type===b.END_EXPR)&&Ae&&(z.text==="]"&&Ae.text==="["||z.text===")"&&Ae.text==="("||z.text==="}"&&Ae.text==="{")},K.prototype._reset=function(){j=!1},K.prototype._get_next_token=function(z,Ae){var Y=null;this._readWhitespace();var y=this._input.peek();return y===null?this._create_token(b.EOF,""):(Y=Y||this._read_non_javascript(y),Y=Y||this._read_string(y),Y=Y||this._read_pair(y,this._input.peek(1)),Y=Y||this._read_word(z),Y=Y||this._read_singles(y),Y=Y||this._read_comment(y),Y=Y||this._read_regexp(y,z),Y=Y||this._read_xml(y,z),Y=Y||this._read_punctuation(),Y=Y||this._create_token(b.UNKNOWN,this._input.next()),Y)},K.prototype._read_word=function(z){var Ae;if(Ae=this.__patterns.identifier.read(),Ae!=="")return Ae=Ae.replace(S.allLineBreaks,`
|
|
`),!(z.type===b.DOT||z.type===b.RESERVED&&(z.text==="set"||z.text==="get"))&&_e.test(Ae)?(Ae==="in"||Ae==="of")&&(z.type===b.WORD||z.type===b.STRING)?this._create_token(b.OPERATOR,Ae):this._create_token(b.RESERVED,Ae):this._create_token(b.WORD,Ae);if(Ae=this.__patterns.number.read(),Ae!=="")return this._create_token(b.WORD,Ae)},K.prototype._read_singles=function(z){var Ae=null;return z==="("||z==="["?Ae=this._create_token(b.START_EXPR,z):z===")"||z==="]"?Ae=this._create_token(b.END_EXPR,z):z==="{"?Ae=this._create_token(b.START_BLOCK,z):z==="}"?Ae=this._create_token(b.END_BLOCK,z):z===";"?Ae=this._create_token(b.SEMICOLON,z):z==="."&&re.test(this._input.peek(1))?Ae=this._create_token(b.DOT,z):z===","&&(Ae=this._create_token(b.COMMA,z)),Ae&&this._input.next(),Ae},K.prototype._read_pair=function(z,Ae){var Y=null;return z==="#"&&Ae==="{"&&(Y=this._create_token(b.START_BLOCK,z+Ae)),Y&&(this._input.next(),this._input.next()),Y},K.prototype._read_punctuation=function(){var z=this.__patterns.punct.read();if(z!=="")return z==="="?this._create_token(b.EQUALS,z):z==="?."?this._create_token(b.DOT,z):this._create_token(b.OPERATOR,z)},K.prototype._read_non_javascript=function(z){var Ae="";if(z==="#"){if(this._is_first_token()&&(Ae=this.__patterns.shebang.read(),Ae))return this._create_token(b.UNKNOWN,Ae.trim()+`
|
|
`);if(Ae=this.__patterns.include.read(),Ae)return this._create_token(b.UNKNOWN,Ae.trim()+`
|
|
`);z=this._input.next();var Y="#";if(this._input.hasNext()&&this._input.testChar(I)){do z=this._input.next(),Y+=z;while(this._input.hasNext()&&z!=="#"&&z!=="=");return z==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(Y+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(Y+="{}",this._input.next(),this._input.next())),this._create_token(b.WORD,Y)}this._input.back()}else if(z==="<"&&this._is_first_token()){if(Ae=this.__patterns.html_comment_start.read(),Ae){for(;this._input.hasNext()&&!this._input.testChar(S.newline);)Ae+=this._input.next();return j=!0,this._create_token(b.COMMENT,Ae)}}else if(j&&z==="-"&&(Ae=this.__patterns.html_comment_end.read(),Ae))return j=!1,this._create_token(b.COMMENT,Ae);return null},K.prototype._read_comment=function(z){var Ae=null;if(z==="/"){var Y="";if(this._input.peek(1)==="*"){Y=this.__patterns.block_comment.read();var y=L.get_directives(Y);y&&y.ignore==="start"&&(Y+=L.readIgnored(this._input)),Y=Y.replace(S.allLineBreaks,`
|
|
`),Ae=this._create_token(b.BLOCK_COMMENT,Y),Ae.directives=y}else this._input.peek(1)==="/"&&(Y=this.__patterns.comment.read(),Ae=this._create_token(b.COMMENT,Y))}return Ae},K.prototype._read_string=function(z){if(z==="`"||z==="'"||z==='"'){var Ae=this._input.next();return this.has_char_escapes=!1,z==="`"?Ae+=this._read_string_recursive("`",!0,"${"):Ae+=this._read_string_recursive(z),this.has_char_escapes&&this._options.unescape_strings&&(Ae=ee(Ae)),this._input.peek()===z&&(Ae+=this._input.next()),Ae=Ae.replace(S.allLineBreaks,`
|
|
`),this._create_token(b.STRING,Ae)}return null},K.prototype._allow_regexp_or_xml=function(z){return z.type===b.RESERVED&&Z(z.text,["return","case","throw","else","do","typeof","yield"])||z.type===b.END_EXPR&&z.text===")"&&z.opened.previous.type===b.RESERVED&&Z(z.opened.previous.text,["if","while","for"])||Z(z.type,[b.COMMENT,b.START_EXPR,b.START_BLOCK,b.START,b.END_BLOCK,b.OPERATOR,b.EQUALS,b.EOF,b.SEMICOLON,b.COMMA])},K.prototype._read_regexp=function(z,Ae){if(z==="/"&&this._allow_regexp_or_xml(Ae)){for(var Y=this._input.next(),y=!1,_=!1;this._input.hasNext()&&(y||_||this._input.peek()!==z)&&!this._input.testChar(S.newline);)Y+=this._input.peek(),y?y=!1:(y=this._input.peek()==="\\",this._input.peek()==="["?_=!0:this._input.peek()==="]"&&(_=!1)),this._input.next();return this._input.peek()===z&&(Y+=this._input.next(),Y+=this._input.read(S.identifier)),this._create_token(b.STRING,Y)}return null},K.prototype._read_xml=function(z,Ae){if(this._options.e4x&&z==="<"&&this._allow_regexp_or_xml(Ae)){var Y="",y=this.__patterns.xml.read_match();if(y){for(var _=y[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),V=_.indexOf("{")===0,de=0;y;){var We=!!y[1],Qe=y[2],ct=!!y[y.length-1]||Qe.slice(0,8)==="![CDATA[";if(!ct&&(Qe===_||V&&Qe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(We?--de:++de),Y+=y[0],de<=0)break;y=this.__patterns.xml.read_match()}return y||(Y+=this._input.match(/[\s\S]*/g)[0]),Y=Y.replace(S.allLineBreaks,`
|
|
`),this._create_token(b.STRING,Y)}}return null};function ee(z){for(var Ae="",Y=0,y=new T(z),_=null;y.hasNext();)if(_=y.match(/([\s]|[^\\]|\\\\)+/g),_&&(Ae+=_[0]),y.peek()==="\\"){if(y.next(),y.peek()==="x")_=y.match(/x([0-9A-Fa-f]{2})/g);else if(y.peek()==="u")_=y.match(/u([0-9A-Fa-f]{4})/g),_||(_=y.match(/u\{([0-9A-Fa-f]+)\}/g));else{Ae+="\\",y.hasNext()&&(Ae+=y.next());continue}if(!_||(Y=parseInt(_[1],16),Y>126&&Y<=255&&_[0].indexOf("x")===0))return z;Y>=0&&Y<32||Y>1114111?Ae+="\\"+_[0]:Y===34||Y===39||Y===92?Ae+="\\"+String.fromCharCode(Y):Ae+=String.fromCharCode(Y)}return Ae}K.prototype._read_string_recursive=function(z,Ae,Y){var y,_;z==="'"?_=this.__patterns.single_quote:z==='"'?_=this.__patterns.double_quote:z==="`"?_=this.__patterns.template_text:z==="}"&&(_=this.__patterns.template_expression);for(var V=_.read(),de="";this._input.hasNext();){if(de=this._input.next(),de===z||!Ae&&S.newline.test(de)){this._input.back();break}else de==="\\"&&this._input.hasNext()?(y=this._input.peek(),y==="x"||y==="u"?this.has_char_escapes=!0:y==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),de+=this._input.next()):Y&&(Y==="${"&&de==="$"&&this._input.peek()==="{"&&(de+=this._input.next()),Y===de&&(z==="`"?de+=this._read_string_recursive("}",Ae,"`"):de+=this._read_string_recursive("`",Ae,"${"),this._input.hasNext()&&(de+=this._input.next())));de+=_.read(),V+=de}return V},ie.exports.Tokenizer=K,ie.exports.TOKEN=b,ie.exports.positionable_operators=ce.slice(),ie.exports.line_starters=oe.slice()},function(ie){var A=RegExp.prototype.hasOwnProperty("sticky");function B(T){this.__input=T||"",this.__input_length=this.__input.length,this.__position=0}B.prototype.restart=function(){this.__position=0},B.prototype.back=function(){this.__position>0&&(this.__position-=1)},B.prototype.hasNext=function(){return this.__position<this.__input_length},B.prototype.next=function(){var T=null;return this.hasNext()&&(T=this.__input.charAt(this.__position),this.__position+=1),T},B.prototype.peek=function(T){var p=null;return T=T||0,T+=this.__position,T>=0&&T<this.__input_length&&(p=this.__input.charAt(T)),p},B.prototype.__match=function(T,p){T.lastIndex=p;var v=T.exec(this.__input);return v&&!(A&&T.sticky)&&v.index!==p&&(v=null),v},B.prototype.test=function(T,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(T,p):!1},B.prototype.testChar=function(T,p){var v=this.peek(p);return T.lastIndex=0,v!==null&&T.test(v)},B.prototype.match=function(T){var p=this.__match(T,this.__position);return p?this.__position+=p[0].length:p=null,p},B.prototype.read=function(T,p,v){var E="",S;return T&&(S=this.match(T),S&&(E+=S[0])),p&&(S||!T)&&(E+=this.readUntil(p,v)),E},B.prototype.readUntil=function(T,p){var v="",E=this.__position;T.lastIndex=this.__position;var S=T.exec(this.__input);return S?(E=S.index,p&&(E+=S[0].length)):E=this.__input_length,v=this.__input.substring(this.__position,E),this.__position=E,v},B.prototype.readUntilAfter=function(T){return this.readUntil(T,!0)},B.prototype.get_regexp=function(T,p){var v=null,E="g";return p&&A&&(E="y"),typeof T=="string"&&T!==""?v=new RegExp(T,E):T&&(v=new RegExp(T.source,E)),v},B.prototype.get_literal_regexp=function(T){return RegExp(T.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},B.prototype.peekUntilAfter=function(T){var p=this.__position,v=this.readUntilAfter(T);return this.__position=p,v},B.prototype.lookBack=function(T){var p=this.__position-1;return p>=T.length&&this.__input.substring(p-T.length,p).toLowerCase()===T},ie.exports.InputScanner=B},function(ie,A,B){var T=B(8).InputScanner,p=B(3).Token,v=B(10).TokenStream,E=B(11).WhitespacePattern,S={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},F=function(O,Z){this._input=new T(O),this._options=Z||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new E(this._input)};F.prototype.tokenize=function(){this._input.restart(),this.__tokens=new v,this._reset();for(var O,Z=new p(S.START,""),b=null,L=[],D=new v;Z.type!==S.EOF;){for(O=this._get_next_token(Z,b);this._is_comment(O);)D.add(O),O=this._get_next_token(Z,b);D.isEmpty()||(O.comments_before=D,D=new v),O.parent=b,this._is_opening(O)?(L.push(b),b=O):b&&this._is_closing(O,b)&&(O.opened=b,b.closed=O,b=L.pop(),O.parent=b),O.previous=Z,Z.next=O,this.__tokens.add(O),Z=O}return this.__tokens},F.prototype._is_first_token=function(){return this.__tokens.isEmpty()},F.prototype._reset=function(){},F.prototype._get_next_token=function(O,Z){this._readWhitespace();var b=this._input.read(/.+/g);return b?this._create_token(S.RAW,b):this._create_token(S.EOF,"")},F.prototype._is_comment=function(O){return!1},F.prototype._is_opening=function(O){return!1},F.prototype._is_closing=function(O,Z){return!1},F.prototype._create_token=function(O,Z){var b=new p(O,Z,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return b},F.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},ie.exports.Tokenizer=F,ie.exports.TOKEN=S},function(ie){function A(B){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=B}A.prototype.restart=function(){this.__position=0},A.prototype.isEmpty=function(){return this.__tokens_length===0},A.prototype.hasNext=function(){return this.__position<this.__tokens_length},A.prototype.next=function(){var B=null;return this.hasNext()&&(B=this.__tokens[this.__position],this.__position+=1),B},A.prototype.peek=function(B){var T=null;return B=B||0,B+=this.__position,B>=0&&B<this.__tokens_length&&(T=this.__tokens[B]),T},A.prototype.add=function(B){this.__parent_token&&(B.parent=this.__parent_token),this.__tokens.push(B),this.__tokens_length+=1},ie.exports.TokenStream=A},function(ie,A,B){var T=B(12).Pattern;function p(v,E){T.call(this,v,E),E?this._line_regexp=this._input.get_regexp(E._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}p.prototype=new T,p.prototype.__set_whitespace_patterns=function(v,E){v+="\\t ",E+="\\n\\r",this._match_pattern=this._input.get_regexp("["+v+E+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+E+"]")},p.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var v=this._input.read(this._match_pattern);if(v===" ")this.whitespace_before_token=" ";else if(v){var E=this.__split(this._newline_regexp,v);this.newline_count=E.length-1,this.whitespace_before_token=E[this.newline_count]}return v},p.prototype.matching=function(v,E){var S=this._create();return S.__set_whitespace_patterns(v,E),S._update(),S},p.prototype._create=function(){return new p(this._input,this)},p.prototype.__split=function(v,E){v.lastIndex=0;for(var S=0,F=[],O=v.exec(E);O;)F.push(E.substring(S,O.index)),S=O.index+O[0].length,O=v.exec(E);return S<E.length?F.push(E.substring(S,E.length)):F.push(""),F},ie.exports.WhitespacePattern=p},function(ie){function A(B,T){this._input=B,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,T&&(this._starting_pattern=this._input.get_regexp(T._starting_pattern,!0),this._match_pattern=this._input.get_regexp(T._match_pattern,!0),this._until_pattern=this._input.get_regexp(T._until_pattern),this._until_after=T._until_after)}A.prototype.read=function(){var B=this._input.read(this._starting_pattern);return(!this._starting_pattern||B)&&(B+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),B},A.prototype.read_match=function(){return this._input.match(this._match_pattern)},A.prototype.until_after=function(B){var T=this._create();return T._until_after=!0,T._until_pattern=this._input.get_regexp(B),T._update(),T},A.prototype.until=function(B){var T=this._create();return T._until_after=!1,T._until_pattern=this._input.get_regexp(B),T._update(),T},A.prototype.starting_with=function(B){var T=this._create();return T._starting_pattern=this._input.get_regexp(B,!0),T._update(),T},A.prototype.matching=function(B){var T=this._create();return T._match_pattern=this._input.get_regexp(B,!0),T._update(),T},A.prototype._create=function(){return new A(this._input,this)},A.prototype._update=function(){},ie.exports.Pattern=A},function(ie){function A(B,T){B=typeof B=="string"?B:B.source,T=typeof T=="string"?T:T.source,this.__directives_block_pattern=new RegExp(B+/ beautify( \w+[:]\w+)+ /.source+T,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(B+/\sbeautify\signore:end\s/.source+T,"g")}A.prototype.get_directives=function(B){if(!B.match(this.__directives_block_pattern))return null;var T={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(B);p;)T[p[1]]=p[2],p=this.__directive_pattern.exec(B);return T},A.prototype.readIgnored=function(B){return B.readUntilAfter(this.__directives_end_ignore_pattern)},ie.exports.Directives=A},function(ie,A,B){var T=B(12).Pattern,p={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function v(E,S){T.call(this,E,S),this.__template_pattern=null,this._disabled=Object.assign({},p),this._excluded=Object.assign({},p),S&&(this.__template_pattern=this._input.get_regexp(S.__template_pattern),this._excluded=Object.assign(this._excluded,S._excluded),this._disabled=Object.assign(this._disabled,S._disabled));var F=new T(E);this.__patterns={handlebars_comment:F.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:F.starting_with(/{{{/).until_after(/}}}/),handlebars:F.starting_with(/{{/).until_after(/}}/),php:F.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:F.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:F.starting_with(/{%/).until_after(/%}/),django_value:F.starting_with(/{{/).until_after(/}}/),django_comment:F.starting_with(/{#/).until_after(/#}/),smarty:F.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:F.starting_with(/{\*/).until_after(/\*}/),smarty_literal:F.starting_with(/{literal}/).until_after(/{\/literal}/)}}v.prototype=new T,v.prototype._create=function(){return new v(this._input,this)},v.prototype._update=function(){this.__set_templated_pattern()},v.prototype.disable=function(E){var S=this._create();return S._disabled[E]=!0,S._update(),S},v.prototype.read_options=function(E){var S=this._create();for(var F in p)S._disabled[F]=E.templating.indexOf(F)===-1;return S._update(),S},v.prototype.exclude=function(E){var S=this._create();return S._excluded[E]=!0,S._update(),S},v.prototype.read=function(){var E="";this._match_pattern?E=this._input.read(this._starting_pattern):E=this._input.read(this._starting_pattern,this.__template_pattern);for(var S=this._read_template();S;)this._match_pattern?S+=this._input.read(this._match_pattern):S+=this._input.readUntil(this.__template_pattern),E+=S,S=this._read_template();return this._until_after&&(E+=this._input.readUntilAfter(this._until_pattern)),E},v.prototype.__set_templated_pattern=function(){var E=[];this._disabled.php||E.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||E.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||E.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||E.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(E.push(this.__patterns.django._starting_pattern.source),E.push(this.__patterns.django_value._starting_pattern.source),E.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||E.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&E.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+E.join("|")+")")},v.prototype._read_template=function(){var E="",S=this._input.peek();if(S==="<"){var F=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&F==="?"&&(E=E||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&F==="%"&&(E=E||this.__patterns.erb.read())}else S==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(E=E||this.__patterns.handlebars_comment.read(),E=E||this.__patterns.handlebars_unescaped.read(),E=E||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(E=E||this.__patterns.django_value.read()),this._excluded.django||(E=E||this.__patterns.django_comment.read(),E=E||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(E=E||this.__patterns.smarty_comment.read(),E=E||this.__patterns.smarty_literal.read(),E=E||this.__patterns.smarty.read()));return E},ie.exports.TemplatablePattern=v}],Q={};function h(ie){var A=Q[ie];if(A!==void 0)return A.exports;var B=Q[ie]={exports:{}};return le[ie](B,B.exports,h),B.exports}var ge=h(0);ae=ge})();var ve=ae;C=[],N=function(){return{js_beautify:ve}}.apply(st,C),N!==void 0&&(Fn.exports=N)})()},32834:function(Fn){(function(st,C){Fn.exports=C()})(this,function(){"use strict";function st(Ye,Ge){for(var He=0;He<Ge.length;He++){var ne=Ge[He];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(Ye,ne.key,ne)}}function C(Ye,Ge,He){return Ge&&st(Ye.prototype,Ge),He&&st(Ye,He),Ye}function N(Ye,Ge){if(Ye){if(typeof Ye=="string")return ae(Ye,Ge);var He=Object.prototype.toString.call(Ye).slice(8,-1);if(He==="Object"&&Ye.constructor&&(He=Ye.constructor.name),He==="Map"||He==="Set")return Array.from(Ye);if(He==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(He))return ae(Ye,Ge)}}function ae(Ye,Ge){(Ge==null||Ge>Ye.length)&&(Ge=Ye.length);for(var He=0,ne=new Array(Ge);He<Ge;He++)ne[He]=Ye[He];return ne}function ve(Ye,Ge){var He=typeof Symbol!="undefined"&&Ye[Symbol.iterator]||Ye["@@iterator"];if(He)return(He=He.call(Ye)).next.bind(He);if(Array.isArray(Ye)||(He=N(Ye))||Ge&&Ye&&typeof Ye.length=="number"){He&&(Ye=He);var ne=0;return function(){return ne>=Ye.length?{done:!0}:{done:!1,value:Ye[ne++]}}}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 le={exports:{}};function Q(){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 h(Ye){le.exports.defaults=Ye}le.exports={defaults:Q(),getDefaults:Q,changeDefaults:h};var ge=/[&<>"']/,ie=/[&<>"']/g,A=/[<>"']|&(?!#?\w+;)/,B=/[<>"']|&(?!#?\w+;)/g,T={"&":"&","<":"<",">":">",'"':""","'":"'"},p=function(Ge){return T[Ge]};function v(Ye,Ge){if(Ge){if(ge.test(Ye))return Ye.replace(ie,p)}else if(A.test(Ye))return Ye.replace(B,p);return Ye}var E=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function S(Ye){return Ye.replace(E,function(Ge,He){return He=He.toLowerCase(),He==="colon"?":":He.charAt(0)==="#"?He.charAt(1)==="x"?String.fromCharCode(parseInt(He.substring(2),16)):String.fromCharCode(+He.substring(1)):""})}var F=/(^|[^\[])\^/g;function O(Ye,Ge){Ye=Ye.source||Ye,Ge=Ge||"";var He={replace:function(fe,ye){return ye=ye.source||ye,ye=ye.replace(F,"$1"),Ye=Ye.replace(fe,ye),He},getRegex:function(){return new RegExp(Ye,Ge)}};return He}var Z=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(Ye,Ge,He){if(Ye){var ne;try{ne=decodeURIComponent(S(He)).replace(Z,"").toLowerCase()}catch(fe){return null}if(ne.indexOf("javascript:")===0||ne.indexOf("vbscript:")===0||ne.indexOf("data:")===0)return null}Ge&&!b.test(He)&&(He=X(Ge,He));try{He=encodeURI(He).replace(/%25/g,"%")}catch(fe){return null}return He}var D={},I=/^[^:]+:\/*[^/]*$/,re=/^([^:]+:)[\s\S]*$/,ce=/^([^:]+:\/*[^/]*)[\s\S]*$/;function X(Ye,Ge){D[" "+Ye]||(I.test(Ye)?D[" "+Ye]=Ye+"/":D[" "+Ye]=_e(Ye,"/",!0)),Ye=D[" "+Ye];var He=Ye.indexOf(":")===-1;return Ge.substring(0,2)==="//"?He?Ge:Ye.replace(re,"$1")+Ge:Ge.charAt(0)==="/"?He?Ge:Ye.replace(ce,"$1")+Ge:Ye+Ge}var q={exec:function(){}};function oe(Ye){for(var Ge=1,He,ne;Ge<arguments.length;Ge++){He=arguments[Ge];for(ne in He)Object.prototype.hasOwnProperty.call(He,ne)&&(Ye[ne]=He[ne])}return Ye}function pe(Ye,Ge){var He=Ye.replace(/\|/g,function(ye,Ee,Te){for(var xt=!1,Wt=Ee;--Wt>=0&&Te[Wt]==="\\";)xt=!xt;return xt?"|":" |"}),ne=He.split(/ \|/),fe=0;if(ne.length>Ge)ne.splice(Ge);else for(;ne.length<Ge;)ne.push("");for(;fe<ne.length;fe++)ne[fe]=ne[fe].trim().replace(/\\\|/g,"|");return ne}function _e(Ye,Ge,He){var ne=Ye.length;if(ne===0)return"";for(var fe=0;fe<ne;){var ye=Ye.charAt(ne-fe-1);if(ye===Ge&&!He)fe++;else if(ye!==Ge&&He)fe++;else break}return Ye.substr(0,ne-fe)}function j(Ye,Ge){if(Ye.indexOf(Ge[1])===-1)return-1;for(var He=Ye.length,ne=0,fe=0;fe<He;fe++)if(Ye[fe]==="\\")fe++;else if(Ye[fe]===Ge[0])ne++;else if(Ye[fe]===Ge[1]&&(ne--,ne<0))return fe;return-1}function K(Ye){Ye&&Ye.sanitize&&!Ye.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function ee(Ye,Ge){if(Ge<1)return"";for(var He="";Ge>1;)Ge&1&&(He+=Ye),Ge>>=1,Ye+=Ye;return He+Ye}var z={escape:v,unescape:S,edit:O,cleanUrl:L,resolveUrl:X,noopTest:q,merge:oe,splitCells:pe,rtrim:_e,findClosingBracket:j,checkSanitizeDeprecation:K,repeatString:ee},Ae=le.exports.defaults,Y=z.rtrim,y=z.splitCells,_=z.escape,V=z.findClosingBracket;function de(Ye,Ge,He){var ne=Ge.href,fe=Ge.title?_(Ge.title):null,ye=Ye[1].replace(/\\([\[\]])/g,"$1");return Ye[0].charAt(0)!=="!"?{type:"link",raw:He,href:ne,title:fe,text:ye}:{type:"image",raw:He,href:ne,title:fe,text:_(ye)}}function We(Ye,Ge){var He=Ye.match(/^(\s+)(?:```)/);if(He===null)return Ge;var ne=He[1];return Ge.split(`
|
|
`).map(function(fe){var ye=fe.match(/^\s+/);if(ye===null)return fe;var Ee=ye[0];return Ee.length>=ne.length?fe.slice(ne.length):fe}).join(`
|
|
`)}var Qe=function(){function Ye(He){this.options=He||Ae}var Ge=Ye.prototype;return Ge.space=function(ne){var fe=this.rules.block.newline.exec(ne);if(fe)return fe[0].length>1?{type:"space",raw:fe[0]}:{raw:`
|
|
`}},Ge.code=function(ne){var fe=this.rules.block.code.exec(ne);if(fe){var ye=fe[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:fe[0],codeBlockStyle:"indented",text:this.options.pedantic?ye:Y(ye,`
|
|
`)}}},Ge.fences=function(ne){var fe=this.rules.block.fences.exec(ne);if(fe){var ye=fe[0],Ee=We(ye,fe[3]||"");return{type:"code",raw:ye,lang:fe[2]?fe[2].trim():fe[2],text:Ee}}},Ge.heading=function(ne){var fe=this.rules.block.heading.exec(ne);if(fe){var ye=fe[2].trim();if(/#$/.test(ye)){var Ee=Y(ye,"#");(this.options.pedantic||!Ee||/ $/.test(Ee))&&(ye=Ee.trim())}return{type:"heading",raw:fe[0],depth:fe[1].length,text:ye}}},Ge.nptable=function(ne){var fe=this.rules.block.nptable.exec(ne);if(fe){var ye={type:"table",header:y(fe[1].replace(/^ *| *\| *$/g,"")),align:fe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:fe[3]?fe[3].replace(/\n$/,"").split(`
|
|
`):[],raw:fe[0]};if(ye.header.length===ye.align.length){var Ee=ye.align.length,Te;for(Te=0;Te<Ee;Te++)/^ *-+: *$/.test(ye.align[Te])?ye.align[Te]="right":/^ *:-+: *$/.test(ye.align[Te])?ye.align[Te]="center":/^ *:-+ *$/.test(ye.align[Te])?ye.align[Te]="left":ye.align[Te]=null;for(Ee=ye.cells.length,Te=0;Te<Ee;Te++)ye.cells[Te]=y(ye.cells[Te],ye.header.length);return ye}}},Ge.hr=function(ne){var fe=this.rules.block.hr.exec(ne);if(fe)return{type:"hr",raw:fe[0]}},Ge.blockquote=function(ne){var fe=this.rules.block.blockquote.exec(ne);if(fe){var ye=fe[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:fe[0],text:ye}}},Ge.list=function(ne){var fe=this.rules.block.list.exec(ne);if(fe){var ye=fe[0],Ee=fe[2],Te=Ee.length>1,xt={type:"list",raw:ye,ordered:Te,start:Te?+Ee.slice(0,-1):"",loose:!1,items:[]},Wt=fe[0].match(this.rules.block.item),nn=!1,Cn,Wn,zn,vn,Dn,or,pr,rr,cr,Jn=Wt.length;zn=this.rules.block.listItemStart.exec(Wt[0]);for(var kn=0;kn<Jn;kn++){if(Cn=Wt[kn],ye=Cn,this.options.pedantic||(cr=Cn.match(new RegExp("\\n\\s*\\n {0,"+(zn[0].length-1)+"}\\S")),cr&&(Dn=Cn.length-cr.index+Wt.slice(kn+1).join(`
|
|
`).length,xt.raw=xt.raw.substring(0,xt.raw.length-Dn),Cn=Cn.substring(0,cr.index),ye=Cn,Jn=kn+1)),kn!==Jn-1){if(vn=this.rules.block.listItemStart.exec(Wt[kn+1]),this.options.pedantic?vn[1].length>zn[1].length:vn[1].length>=zn[0].length||vn[1].length>3){Wt.splice(kn,2,Wt[kn]+(!this.options.pedantic&&vn[1].length<zn[0].length&&!Wt[kn].match(/\n$/)?"":`
|
|
`)+Wt[kn+1]),kn--,Jn--;continue}else(!this.options.pedantic||this.options.smartLists?vn[2][vn[2].length-1]!==Ee[Ee.length-1]:Te===(vn[2].length===1))&&(Dn=Wt.slice(kn+1).join(`
|
|
`).length,xt.raw=xt.raw.substring(0,xt.raw.length-Dn),kn=Jn-1);zn=vn}Wn=Cn.length,Cn=Cn.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Cn.indexOf(`
|
|
`)&&(Wn-=Cn.length,Cn=this.options.pedantic?Cn.replace(/^ {1,4}/gm,""):Cn.replace(new RegExp("^ {1,"+Wn+"}","gm"),"")),Cn=Y(Cn,`
|
|
`),kn!==Jn-1&&(ye=ye+`
|
|
`),or=nn||/\n\n(?!\s*$)/.test(ye),kn!==Jn-1&&(nn=ye.slice(-2)===`
|
|
|
|
`,or||(or=nn)),or&&(xt.loose=!0),this.options.gfm&&(pr=/^\[[ xX]\] /.test(Cn),rr=void 0,pr&&(rr=Cn[1]!==" ",Cn=Cn.replace(/^\[[ xX]\] +/,""))),xt.items.push({type:"list_item",raw:ye,task:pr,checked:rr,loose:or,text:Cn})}return xt}},Ge.html=function(ne){var fe=this.rules.block.html.exec(ne);if(fe)return{type:this.options.sanitize?"paragraph":"html",raw:fe[0],pre:!this.options.sanitizer&&(fe[1]==="pre"||fe[1]==="script"||fe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):_(fe[0]):fe[0]}},Ge.def=function(ne){var fe=this.rules.block.def.exec(ne);if(fe){fe[3]&&(fe[3]=fe[3].substring(1,fe[3].length-1));var ye=fe[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:ye,raw:fe[0],href:fe[2],title:fe[3]}}},Ge.table=function(ne){var fe=this.rules.block.table.exec(ne);if(fe){var ye={type:"table",header:y(fe[1].replace(/^ *| *\| *$/g,"")),align:fe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:fe[3]?fe[3].replace(/\n$/,"").split(`
|
|
`):[]};if(ye.header.length===ye.align.length){ye.raw=fe[0];var Ee=ye.align.length,Te;for(Te=0;Te<Ee;Te++)/^ *-+: *$/.test(ye.align[Te])?ye.align[Te]="right":/^ *:-+: *$/.test(ye.align[Te])?ye.align[Te]="center":/^ *:-+ *$/.test(ye.align[Te])?ye.align[Te]="left":ye.align[Te]=null;for(Ee=ye.cells.length,Te=0;Te<Ee;Te++)ye.cells[Te]=y(ye.cells[Te].replace(/^ *\| *| *\| *$/g,""),ye.header.length);return ye}}},Ge.lheading=function(ne){var fe=this.rules.block.lheading.exec(ne);if(fe)return{type:"heading",raw:fe[0],depth:fe[2].charAt(0)==="="?1:2,text:fe[1]}},Ge.paragraph=function(ne){var fe=this.rules.block.paragraph.exec(ne);if(fe)return{type:"paragraph",raw:fe[0],text:fe[1].charAt(fe[1].length-1)===`
|
|
`?fe[1].slice(0,-1):fe[1]}},Ge.text=function(ne){var fe=this.rules.block.text.exec(ne);if(fe)return{type:"text",raw:fe[0],text:fe[0]}},Ge.escape=function(ne){var fe=this.rules.inline.escape.exec(ne);if(fe)return{type:"escape",raw:fe[0],text:_(fe[1])}},Ge.tag=function(ne,fe,ye){var Ee=this.rules.inline.tag.exec(ne);if(Ee)return!fe&&/^<a /i.test(Ee[0])?fe=!0:fe&&/^<\/a>/i.test(Ee[0])&&(fe=!1),!ye&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ee[0])?ye=!0:ye&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ee[0])&&(ye=!1),{type:this.options.sanitize?"text":"html",raw:Ee[0],inLink:fe,inRawBlock:ye,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ee[0]):_(Ee[0]):Ee[0]}},Ge.link=function(ne){var fe=this.rules.inline.link.exec(ne);if(fe){var ye=fe[2].trim();if(!this.options.pedantic&&/^</.test(ye)){if(!/>$/.test(ye))return;var Ee=Y(ye.slice(0,-1),"\\");if((ye.length-Ee.length)%2===0)return}else{var Te=V(fe[2],"()");if(Te>-1){var xt=fe[0].indexOf("!")===0?5:4,Wt=xt+fe[1].length+Te;fe[2]=fe[2].substring(0,Te),fe[0]=fe[0].substring(0,Wt).trim(),fe[3]=""}}var nn=fe[2],Cn="";if(this.options.pedantic){var Wn=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(nn);Wn&&(nn=Wn[1],Cn=Wn[3])}else Cn=fe[3]?fe[3].slice(1,-1):"";return nn=nn.trim(),/^</.test(nn)&&(this.options.pedantic&&!/>$/.test(ye)?nn=nn.slice(1):nn=nn.slice(1,-1)),de(fe,{href:nn&&nn.replace(this.rules.inline._escapes,"$1"),title:Cn&&Cn.replace(this.rules.inline._escapes,"$1")},fe[0])}},Ge.reflink=function(ne,fe){var ye;if((ye=this.rules.inline.reflink.exec(ne))||(ye=this.rules.inline.nolink.exec(ne))){var Ee=(ye[2]||ye[1]).replace(/\s+/g," ");if(Ee=fe[Ee.toLowerCase()],!Ee||!Ee.href){var Te=ye[0].charAt(0);return{type:"text",raw:Te,text:Te}}return de(ye,Ee,ye[0])}},Ge.emStrong=function(ne,fe,ye){ye===void 0&&(ye="");var Ee=this.rules.inline.emStrong.lDelim.exec(ne);if(Ee&&!(Ee[3]&&ye.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 Te=Ee[1]||Ee[2]||"";if(!Te||Te&&(ye===""||this.rules.inline.punctuation.exec(ye))){var xt=Ee[0].length-1,Wt,nn,Cn=xt,Wn=0,zn=Ee[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(zn.lastIndex=0,fe=fe.slice(-1*ne.length+xt);(Ee=zn.exec(fe))!=null;)if(Wt=Ee[1]||Ee[2]||Ee[3]||Ee[4]||Ee[5]||Ee[6],!!Wt){if(nn=Wt.length,Ee[3]||Ee[4]){Cn+=nn;continue}else if((Ee[5]||Ee[6])&&xt%3&&!((xt+nn)%3)){Wn+=nn;continue}if(Cn-=nn,!(Cn>0))return nn=Math.min(nn,nn+Cn+Wn),Math.min(xt,nn)%2?{type:"em",raw:ne.slice(0,xt+Ee.index+nn+1),text:ne.slice(1,xt+Ee.index+nn)}:{type:"strong",raw:ne.slice(0,xt+Ee.index+nn+1),text:ne.slice(2,xt+Ee.index+nn-1)}}}}},Ge.codespan=function(ne){var fe=this.rules.inline.code.exec(ne);if(fe){var ye=fe[2].replace(/\n/g," "),Ee=/[^ ]/.test(ye),Te=/^ /.test(ye)&&/ $/.test(ye);return Ee&&Te&&(ye=ye.substring(1,ye.length-1)),ye=_(ye,!0),{type:"codespan",raw:fe[0],text:ye}}},Ge.br=function(ne){var fe=this.rules.inline.br.exec(ne);if(fe)return{type:"br",raw:fe[0]}},Ge.del=function(ne){var fe=this.rules.inline.del.exec(ne);if(fe)return{type:"del",raw:fe[0],text:fe[2]}},Ge.autolink=function(ne,fe){var ye=this.rules.inline.autolink.exec(ne);if(ye){var Ee,Te;return ye[2]==="@"?(Ee=_(this.options.mangle?fe(ye[1]):ye[1]),Te="mailto:"+Ee):(Ee=_(ye[1]),Te=Ee),{type:"link",raw:ye[0],text:Ee,href:Te,tokens:[{type:"text",raw:Ee,text:Ee}]}}},Ge.url=function(ne,fe){var ye;if(ye=this.rules.inline.url.exec(ne)){var Ee,Te;if(ye[2]==="@")Ee=_(this.options.mangle?fe(ye[0]):ye[0]),Te="mailto:"+Ee;else{var xt;do xt=ye[0],ye[0]=this.rules.inline._backpedal.exec(ye[0])[0];while(xt!==ye[0]);Ee=_(ye[0]),ye[1]==="www."?Te="http://"+Ee:Te=Ee}return{type:"link",raw:ye[0],text:Ee,href:Te,tokens:[{type:"text",raw:Ee,text:Ee}]}}},Ge.inlineText=function(ne,fe,ye){var Ee=this.rules.inline.text.exec(ne);if(Ee){var Te;return fe?Te=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ee[0]):_(Ee[0]):Ee[0]:Te=_(this.options.smartypants?ye(Ee[0]):Ee[0]),{type:"text",raw:Ee[0],text:Te}}},Ye}(),ct=z.noopTest,Et=z.edit,Mt=z.merge,Ot={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:ct,table:ct,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ot._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ot._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ot.def=Et(Ot.def).replace("label",Ot._label).replace("title",Ot._title).getRegex(),Ot.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ot.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Ot.item=Et(Ot.item,"gm").replace(/bull/g,Ot.bullet).getRegex(),Ot.listItemStart=Et(/^( *)(bull) */).replace("bull",Ot.bullet).getRegex(),Ot.list=Et(Ot.list).replace(/bull/g,Ot.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ot.def.source+")").getRegex(),Ot._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",Ot._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Ot.html=Et(Ot.html,"i").replace("comment",Ot._comment).replace("tag",Ot._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ot.paragraph=Et(Ot._paragraph).replace("hr",Ot.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",Ot._tag).getRegex(),Ot.blockquote=Et(Ot.blockquote).replace("paragraph",Ot.paragraph).getRegex(),Ot.normal=Mt({},Ot),Ot.gfm=Mt({},Ot.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*|$)"}),Ot.gfm.nptable=Et(Ot.gfm.nptable).replace("hr",Ot.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",Ot._tag).getRegex(),Ot.gfm.table=Et(Ot.gfm.table).replace("hr",Ot.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",Ot._tag).getRegex(),Ot.pedantic=Mt({},Ot.normal,{html:Et(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ot._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:ct,paragraph:Et(Ot.normal._paragraph).replace("hr",Ot.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",Ot.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Fe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ct,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:ct,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Fe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Fe.punctuation=Et(Fe.punctuation).replace(/punctuation/g,Fe._punctuation).getRegex(),Fe.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Fe.escapedEmSt=/\\\*|\\_/g,Fe._comment=Et(Ot._comment).replace("(?:-->|$)","-->").getRegex(),Fe.emStrong.lDelim=Et(Fe.emStrong.lDelim).replace(/punct/g,Fe._punctuation).getRegex(),Fe.emStrong.rDelimAst=Et(Fe.emStrong.rDelimAst,"g").replace(/punct/g,Fe._punctuation).getRegex(),Fe.emStrong.rDelimUnd=Et(Fe.emStrong.rDelimUnd,"g").replace(/punct/g,Fe._punctuation).getRegex(),Fe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Fe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Fe._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])?)+(?![-_])/,Fe.autolink=Et(Fe.autolink).replace("scheme",Fe._scheme).replace("email",Fe._email).getRegex(),Fe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Fe.tag=Et(Fe.tag).replace("comment",Fe._comment).replace("attribute",Fe._attribute).getRegex(),Fe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Fe._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Fe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Fe.link=Et(Fe.link).replace("label",Fe._label).replace("href",Fe._href).replace("title",Fe._title).getRegex(),Fe.reflink=Et(Fe.reflink).replace("label",Fe._label).getRegex(),Fe.reflinkSearch=Et(Fe.reflinkSearch,"g").replace("reflink",Fe.reflink).replace("nolink",Fe.nolink).getRegex(),Fe.normal=Mt({},Fe),Fe.pedantic=Mt({},Fe.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:Et(/^!?\[(label)\]\((.*?)\)/).replace("label",Fe._label).getRegex(),reflink:Et(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Fe._label).getRegex()}),Fe.gfm=Mt({},Fe.normal,{escape:Et(Fe.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Fe.gfm.url=Et(Fe.gfm.url,"i").replace("email",Fe.gfm._extended_email).getRegex(),Fe.breaks=Mt({},Fe.gfm,{br:Et(Fe.br).replace("{2,}","*").getRegex(),text:Et(Fe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var kt={block:Ot,inline:Fe},sn=Qe,jt=le.exports.defaults,pn=kt.block,mt=kt.inline,ke=z.repeatString;function xe(Ye){return Ye.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 W(Ye){var Ge="",He,ne,fe=Ye.length;for(He=0;He<fe;He++)ne=Ye.charCodeAt(He),Math.random()>.5&&(ne="x"+ne.toString(16)),Ge+="&#"+ne+";";return Ge}var Re=function(){function Ye(He){this.tokens=[],this.tokens.links=Object.create(null),this.options=He||jt,this.options.tokenizer=this.options.tokenizer||new sn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ne={block:pn.normal,inline:mt.normal};this.options.pedantic?(ne.block=pn.pedantic,ne.inline=mt.pedantic):this.options.gfm&&(ne.block=pn.gfm,this.options.breaks?ne.inline=mt.breaks:ne.inline=mt.gfm),this.tokenizer.rules=ne}Ye.lex=function(ne,fe){var ye=new Ye(fe);return ye.lex(ne)},Ye.lexInline=function(ne,fe){var ye=new Ye(fe);return ye.inlineTokens(ne)};var Ge=Ye.prototype;return Ge.lex=function(ne){return ne=ne.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(ne,this.tokens,!0),this.inline(this.tokens),this.tokens},Ge.blockTokens=function(ne,fe,ye){fe===void 0&&(fe=[]),ye===void 0&&(ye=!0),this.options.pedantic&&(ne=ne.replace(/^ +$/gm,""));for(var Ee,Te,xt,Wt;ne;){if(Ee=this.tokenizer.space(ne)){ne=ne.substring(Ee.raw.length),Ee.type&&fe.push(Ee);continue}if(Ee=this.tokenizer.code(ne)){ne=ne.substring(Ee.raw.length),Wt=fe[fe.length-1],Wt&&Wt.type==="paragraph"?(Wt.raw+=`
|
|
`+Ee.raw,Wt.text+=`
|
|
`+Ee.text):fe.push(Ee);continue}if(Ee=this.tokenizer.fences(ne)){ne=ne.substring(Ee.raw.length),fe.push(Ee);continue}if(Ee=this.tokenizer.heading(ne)){ne=ne.substring(Ee.raw.length),fe.push(Ee);continue}if(Ee=this.tokenizer.nptable(ne)){ne=ne.substring(Ee.raw.length),fe.push(Ee);continue}if(Ee=this.tokenizer.hr(ne)){ne=ne.substring(Ee.raw.length),fe.push(Ee);continue}if(Ee=this.tokenizer.blockquote(ne)){ne=ne.substring(Ee.raw.length),Ee.tokens=this.blockTokens(Ee.text,[],ye),fe.push(Ee);continue}if(Ee=this.tokenizer.list(ne)){for(ne=ne.substring(Ee.raw.length),xt=Ee.items.length,Te=0;Te<xt;Te++)Ee.items[Te].tokens=this.blockTokens(Ee.items[Te].text,[],!1);fe.push(Ee);continue}if(Ee=this.tokenizer.html(ne)){ne=ne.substring(Ee.raw.length),fe.push(Ee);continue}if(ye&&(Ee=this.tokenizer.def(ne))){ne=ne.substring(Ee.raw.length),this.tokens.links[Ee.tag]||(this.tokens.links[Ee.tag]={href:Ee.href,title:Ee.title});continue}if(Ee=this.tokenizer.table(ne)){ne=ne.substring(Ee.raw.length),fe.push(Ee);continue}if(Ee=this.tokenizer.lheading(ne)){ne=ne.substring(Ee.raw.length),fe.push(Ee);continue}if(ye&&(Ee=this.tokenizer.paragraph(ne))){ne=ne.substring(Ee.raw.length),fe.push(Ee);continue}if(Ee=this.tokenizer.text(ne)){ne=ne.substring(Ee.raw.length),Wt=fe[fe.length-1],Wt&&Wt.type==="text"?(Wt.raw+=`
|
|
`+Ee.raw,Wt.text+=`
|
|
`+Ee.text):fe.push(Ee);continue}if(ne){var nn="Infinite loop on byte: "+ne.charCodeAt(0);if(this.options.silent){console.error(nn);break}else throw new Error(nn)}}return fe},Ge.inline=function(ne){var fe,ye,Ee,Te,xt,Wt,nn=ne.length;for(fe=0;fe<nn;fe++)switch(Wt=ne[fe],Wt.type){case"paragraph":case"text":case"heading":{Wt.tokens=[],this.inlineTokens(Wt.text,Wt.tokens);break}case"table":{for(Wt.tokens={header:[],cells:[]},Te=Wt.header.length,ye=0;ye<Te;ye++)Wt.tokens.header[ye]=[],this.inlineTokens(Wt.header[ye],Wt.tokens.header[ye]);for(Te=Wt.cells.length,ye=0;ye<Te;ye++)for(xt=Wt.cells[ye],Wt.tokens.cells[ye]=[],Ee=0;Ee<xt.length;Ee++)Wt.tokens.cells[ye][Ee]=[],this.inlineTokens(xt[Ee],Wt.tokens.cells[ye][Ee]);break}case"blockquote":{this.inline(Wt.tokens);break}case"list":{for(Te=Wt.items.length,ye=0;ye<Te;ye++)this.inline(Wt.items[ye].tokens);break}}return ne},Ge.inlineTokens=function(ne,fe,ye,Ee){fe===void 0&&(fe=[]),ye===void 0&&(ye=!1),Ee===void 0&&(Ee=!1);var Te,xt,Wt=ne,nn,Cn,Wn;if(this.tokens.links){var zn=Object.keys(this.tokens.links);if(zn.length>0)for(;(nn=this.tokenizer.rules.inline.reflinkSearch.exec(Wt))!=null;)zn.includes(nn[0].slice(nn[0].lastIndexOf("[")+1,-1))&&(Wt=Wt.slice(0,nn.index)+"["+ke("a",nn[0].length-2)+"]"+Wt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(nn=this.tokenizer.rules.inline.blockSkip.exec(Wt))!=null;)Wt=Wt.slice(0,nn.index)+"["+ke("a",nn[0].length-2)+"]"+Wt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(nn=this.tokenizer.rules.inline.escapedEmSt.exec(Wt))!=null;)Wt=Wt.slice(0,nn.index)+"++"+Wt.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;ne;){if(Cn||(Wn=""),Cn=!1,Te=this.tokenizer.escape(ne)){ne=ne.substring(Te.raw.length),fe.push(Te);continue}if(Te=this.tokenizer.tag(ne,ye,Ee)){ne=ne.substring(Te.raw.length),ye=Te.inLink,Ee=Te.inRawBlock;var vn=fe[fe.length-1];vn&&Te.type==="text"&&vn.type==="text"?(vn.raw+=Te.raw,vn.text+=Te.text):fe.push(Te);continue}if(Te=this.tokenizer.link(ne)){ne=ne.substring(Te.raw.length),Te.type==="link"&&(Te.tokens=this.inlineTokens(Te.text,[],!0,Ee)),fe.push(Te);continue}if(Te=this.tokenizer.reflink(ne,this.tokens.links)){ne=ne.substring(Te.raw.length);var Dn=fe[fe.length-1];Te.type==="link"?(Te.tokens=this.inlineTokens(Te.text,[],!0,Ee),fe.push(Te)):Dn&&Te.type==="text"&&Dn.type==="text"?(Dn.raw+=Te.raw,Dn.text+=Te.text):fe.push(Te);continue}if(Te=this.tokenizer.emStrong(ne,Wt,Wn)){ne=ne.substring(Te.raw.length),Te.tokens=this.inlineTokens(Te.text,[],ye,Ee),fe.push(Te);continue}if(Te=this.tokenizer.codespan(ne)){ne=ne.substring(Te.raw.length),fe.push(Te);continue}if(Te=this.tokenizer.br(ne)){ne=ne.substring(Te.raw.length),fe.push(Te);continue}if(Te=this.tokenizer.del(ne)){ne=ne.substring(Te.raw.length),Te.tokens=this.inlineTokens(Te.text,[],ye,Ee),fe.push(Te);continue}if(Te=this.tokenizer.autolink(ne,W)){ne=ne.substring(Te.raw.length),fe.push(Te);continue}if(!ye&&(Te=this.tokenizer.url(ne,W))){ne=ne.substring(Te.raw.length),fe.push(Te);continue}if(Te=this.tokenizer.inlineText(ne,Ee,xe)){ne=ne.substring(Te.raw.length),Te.raw.slice(-1)!=="_"&&(Wn=Te.raw.slice(-1)),Cn=!0,xt=fe[fe.length-1],xt&&xt.type==="text"?(xt.raw+=Te.raw,xt.text+=Te.text):fe.push(Te);continue}if(ne){var or="Infinite loop on byte: "+ne.charCodeAt(0);if(this.options.silent){console.error(or);break}else throw new Error(or)}}return fe},C(Ye,null,[{key:"rules",get:function(){return{block:pn,inline:mt}}}]),Ye}(),$e=le.exports.defaults,J=z.cleanUrl,R=z.escape,k=function(){function Ye(He){this.options=He||$e}var Ge=Ye.prototype;return Ge.code=function(ne,fe,ye){var Ee=(fe||"").match(/\S*/)[0];if(this.options.highlight){var Te=this.options.highlight(ne,Ee);Te!=null&&Te!==ne&&(ye=!0,ne=Te)}return ne=ne.replace(/\n$/,"")+`
|
|
`,Ee?'<pre><code class="'+this.options.langPrefix+R(Ee,!0)+'">'+(ye?ne:R(ne,!0))+`</code></pre>
|
|
`:"<pre><code>"+(ye?ne:R(ne,!0))+`</code></pre>
|
|
`},Ge.blockquote=function(ne){return`<blockquote>
|
|
`+ne+`</blockquote>
|
|
`},Ge.html=function(ne){return ne},Ge.heading=function(ne,fe,ye,Ee){return this.options.headerIds?"<h"+fe+' id="'+this.options.headerPrefix+Ee.slug(ye)+'">'+ne+"</h"+fe+`>
|
|
`:"<h"+fe+">"+ne+"</h"+fe+`>
|
|
`},Ge.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Ge.list=function(ne,fe,ye){var Ee=fe?"ol":"ul",Te=fe&&ye!==1?' start="'+ye+'"':"";return"<"+Ee+Te+`>
|
|
`+ne+"</"+Ee+`>
|
|
`},Ge.listitem=function(ne){return"<li>"+ne+`</li>
|
|
`},Ge.checkbox=function(ne){return"<input "+(ne?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ge.paragraph=function(ne){return"<p>"+ne+`</p>
|
|
`},Ge.table=function(ne,fe){return fe&&(fe="<tbody>"+fe+"</tbody>"),`<table>
|
|
<thead>
|
|
`+ne+`</thead>
|
|
`+fe+`</table>
|
|
`},Ge.tablerow=function(ne){return`<tr>
|
|
`+ne+`</tr>
|
|
`},Ge.tablecell=function(ne,fe){var ye=fe.header?"th":"td",Ee=fe.align?"<"+ye+' align="'+fe.align+'">':"<"+ye+">";return Ee+ne+"</"+ye+`>
|
|
`},Ge.strong=function(ne){return"<strong>"+ne+"</strong>"},Ge.em=function(ne){return"<em>"+ne+"</em>"},Ge.codespan=function(ne){return"<code>"+ne+"</code>"},Ge.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ge.del=function(ne){return"<del>"+ne+"</del>"},Ge.link=function(ne,fe,ye){if(ne=J(this.options.sanitize,this.options.baseUrl,ne),ne===null)return ye;var Ee='<a href="'+R(ne)+'"';return fe&&(Ee+=' title="'+fe+'"'),Ee+=">"+ye+"</a>",Ee},Ge.image=function(ne,fe,ye){if(ne=J(this.options.sanitize,this.options.baseUrl,ne),ne===null)return ye;var Ee='<img src="'+ne+'" alt="'+ye+'"';return fe&&(Ee+=' title="'+fe+'"'),Ee+=this.options.xhtml?"/>":">",Ee},Ge.text=function(ne){return ne},Ye}(),se=function(){function Ye(){}var Ge=Ye.prototype;return Ge.strong=function(ne){return ne},Ge.em=function(ne){return ne},Ge.codespan=function(ne){return ne},Ge.del=function(ne){return ne},Ge.html=function(ne){return ne},Ge.text=function(ne){return ne},Ge.link=function(ne,fe,ye){return""+ye},Ge.image=function(ne,fe,ye){return""+ye},Ge.br=function(){return""},Ye}(),$=function(){function Ye(){this.seen={}}var Ge=Ye.prototype;return Ge.serialize=function(ne){return ne.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Ge.getNextSafeSlug=function(ne,fe){var ye=ne,Ee=0;if(this.seen.hasOwnProperty(ye)){Ee=this.seen[ne];do Ee++,ye=ne+"-"+Ee;while(this.seen.hasOwnProperty(ye))}return fe||(this.seen[ne]=Ee,this.seen[ye]=0),ye},Ge.slug=function(ne,fe){fe===void 0&&(fe={});var ye=this.serialize(ne);return this.getNextSafeSlug(ye,fe.dryrun)},Ye}(),G=k,te=se,Ce=$,we=le.exports.defaults,Se=z.unescape,Ie=function(){function Ye(He){this.options=He||we,this.options.renderer=this.options.renderer||new G,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new te,this.slugger=new Ce}Ye.parse=function(ne,fe){var ye=new Ye(fe);return ye.parse(ne)},Ye.parseInline=function(ne,fe){var ye=new Ye(fe);return ye.parseInline(ne)};var Ge=Ye.prototype;return Ge.parse=function(ne,fe){fe===void 0&&(fe=!0);var ye="",Ee,Te,xt,Wt,nn,Cn,Wn,zn,vn,Dn,or,pr,rr,cr,Jn,kn,qn,vr,br=ne.length;for(Ee=0;Ee<br;Ee++)switch(Dn=ne[Ee],Dn.type){case"space":continue;case"hr":{ye+=this.renderer.hr();continue}case"heading":{ye+=this.renderer.heading(this.parseInline(Dn.tokens),Dn.depth,Se(this.parseInline(Dn.tokens,this.textRenderer)),this.slugger);continue}case"code":{ye+=this.renderer.code(Dn.text,Dn.lang,Dn.escaped);continue}case"table":{for(zn="",Wn="",Wt=Dn.header.length,Te=0;Te<Wt;Te++)Wn+=this.renderer.tablecell(this.parseInline(Dn.tokens.header[Te]),{header:!0,align:Dn.align[Te]});for(zn+=this.renderer.tablerow(Wn),vn="",Wt=Dn.cells.length,Te=0;Te<Wt;Te++){for(Cn=Dn.tokens.cells[Te],Wn="",nn=Cn.length,xt=0;xt<nn;xt++)Wn+=this.renderer.tablecell(this.parseInline(Cn[xt]),{header:!1,align:Dn.align[xt]});vn+=this.renderer.tablerow(Wn)}ye+=this.renderer.table(zn,vn);continue}case"blockquote":{vn=this.parse(Dn.tokens),ye+=this.renderer.blockquote(vn);continue}case"list":{for(or=Dn.ordered,pr=Dn.start,rr=Dn.loose,Wt=Dn.items.length,vn="",Te=0;Te<Wt;Te++)Jn=Dn.items[Te],kn=Jn.checked,qn=Jn.task,cr="",Jn.task&&(vr=this.renderer.checkbox(kn),rr?Jn.tokens.length>0&&Jn.tokens[0].type==="text"?(Jn.tokens[0].text=vr+" "+Jn.tokens[0].text,Jn.tokens[0].tokens&&Jn.tokens[0].tokens.length>0&&Jn.tokens[0].tokens[0].type==="text"&&(Jn.tokens[0].tokens[0].text=vr+" "+Jn.tokens[0].tokens[0].text)):Jn.tokens.unshift({type:"text",text:vr}):cr+=vr),cr+=this.parse(Jn.tokens,rr),vn+=this.renderer.listitem(cr,qn,kn);ye+=this.renderer.list(vn,or,pr);continue}case"html":{ye+=this.renderer.html(Dn.text);continue}case"paragraph":{ye+=this.renderer.paragraph(this.parseInline(Dn.tokens));continue}case"text":{for(vn=Dn.tokens?this.parseInline(Dn.tokens):Dn.text;Ee+1<br&&ne[Ee+1].type==="text";)Dn=ne[++Ee],vn+=`
|
|
`+(Dn.tokens?this.parseInline(Dn.tokens):Dn.text);ye+=fe?this.renderer.paragraph(vn):vn;continue}default:{var je='Token with "'+Dn.type+'" type was not found.';if(this.options.silent){console.error(je);return}else throw new Error(je)}}return ye},Ge.parseInline=function(ne,fe){fe=fe||this.renderer;var ye="",Ee,Te,xt=ne.length;for(Ee=0;Ee<xt;Ee++)switch(Te=ne[Ee],Te.type){case"escape":{ye+=fe.text(Te.text);break}case"html":{ye+=fe.html(Te.text);break}case"link":{ye+=fe.link(Te.href,Te.title,this.parseInline(Te.tokens,fe));break}case"image":{ye+=fe.image(Te.href,Te.title,Te.text);break}case"strong":{ye+=fe.strong(this.parseInline(Te.tokens,fe));break}case"em":{ye+=fe.em(this.parseInline(Te.tokens,fe));break}case"codespan":{ye+=fe.codespan(Te.text);break}case"br":{ye+=fe.br();break}case"del":{ye+=fe.del(this.parseInline(Te.tokens,fe));break}case"text":{ye+=fe.text(Te.text);break}default:{var Wt='Token with "'+Te.type+'" type was not found.';if(this.options.silent){console.error(Wt);return}else throw new Error(Wt)}}return ye},Ye}(),Ne=Re,qe=Ie,et=Qe,ft=k,Kt=se,Ct=$,vt=z.merge,en=z.checkSanitizeDeprecation,on=z.escape,Vt=le.exports.getDefaults,gn=le.exports.changeDefaults,Pn=le.exports.defaults;function Gt(Ye,Ge,He){if(typeof Ye=="undefined"||Ye===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ye!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ye)+", string expected");if(typeof Ge=="function"&&(He=Ge,Ge=null),Ge=vt({},Gt.defaults,Ge||{}),en(Ge),He){var ne=Ge.highlight,fe;try{fe=Ne.lex(Ye,Ge)}catch(xt){return He(xt)}var ye=function(Wt){var nn;if(!Wt)try{Ge.walkTokens&&Gt.walkTokens(fe,Ge.walkTokens),nn=qe.parse(fe,Ge)}catch(Cn){Wt=Cn}return Ge.highlight=ne,Wt?He(Wt):He(null,nn)};if(!ne||ne.length<3||(delete Ge.highlight,!fe.length))return ye();var Ee=0;Gt.walkTokens(fe,function(xt){xt.type==="code"&&(Ee++,setTimeout(function(){ne(xt.text,xt.lang,function(Wt,nn){if(Wt)return ye(Wt);nn!=null&&nn!==xt.text&&(xt.text=nn,xt.escaped=!0),Ee--,Ee===0&&ye()})},0))}),Ee===0&&ye();return}try{var Te=Ne.lex(Ye,Ge);return Ge.walkTokens&&Gt.walkTokens(Te,Ge.walkTokens),qe.parse(Te,Ge)}catch(xt){if(xt.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Ge.silent)return"<p>An error occurred:</p><pre>"+on(xt.message+"",!0)+"</pre>";throw xt}}Gt.options=Gt.setOptions=function(Ye){return vt(Gt.defaults,Ye),gn(Gt.defaults),Gt},Gt.getDefaults=Vt,Gt.defaults=Pn,Gt.use=function(Ye){var Ge=vt({},Ye);if(Ye.renderer&&function(){var ne=Gt.defaults.renderer||new ft,fe=function(Te){var xt=ne[Te];ne[Te]=function(){for(var Wt=arguments.length,nn=new Array(Wt),Cn=0;Cn<Wt;Cn++)nn[Cn]=arguments[Cn];var Wn=Ye.renderer[Te].apply(ne,nn);return Wn===!1&&(Wn=xt.apply(ne,nn)),Wn}};for(var ye in Ye.renderer)fe(ye);Ge.renderer=ne}(),Ye.tokenizer&&function(){var ne=Gt.defaults.tokenizer||new et,fe=function(Te){var xt=ne[Te];ne[Te]=function(){for(var Wt=arguments.length,nn=new Array(Wt),Cn=0;Cn<Wt;Cn++)nn[Cn]=arguments[Cn];var Wn=Ye.tokenizer[Te].apply(ne,nn);return Wn===!1&&(Wn=xt.apply(ne,nn)),Wn}};for(var ye in Ye.tokenizer)fe(ye);Ge.tokenizer=ne}(),Ye.walkTokens){var He=Gt.defaults.walkTokens;Ge.walkTokens=function(ne){Ye.walkTokens(ne),He&&He(ne)}}Gt.setOptions(Ge)},Gt.walkTokens=function(Ye,Ge){for(var He=ve(Ye),ne;!(ne=He()).done;){var fe=ne.value;switch(Ge(fe),fe.type){case"table":{for(var ye=ve(fe.tokens.header),Ee;!(Ee=ye()).done;){var Te=Ee.value;Gt.walkTokens(Te,Ge)}for(var xt=ve(fe.tokens.cells),Wt;!(Wt=xt()).done;)for(var nn=Wt.value,Cn=ve(nn),Wn;!(Wn=Cn()).done;){var zn=Wn.value;Gt.walkTokens(zn,Ge)}break}case"list":{Gt.walkTokens(fe.items,Ge);break}default:fe.tokens&&Gt.walkTokens(fe.tokens,Ge)}}},Gt.parseInline=function(Ye,Ge){if(typeof Ye=="undefined"||Ye===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Ye!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Ye)+", string expected");Ge=vt({},Gt.defaults,Ge||{}),en(Ge);try{var He=Ne.lexInline(Ye,Ge);return Ge.walkTokens&&Gt.walkTokens(He,Ge.walkTokens),qe.parseInline(He,Ge)}catch(ne){if(ne.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Ge.silent)return"<p>An error occurred:</p><pre>"+on(ne.message+"",!0)+"</pre>";throw ne}},Gt.Parser=qe,Gt.parser=qe.parse,Gt.Renderer=ft,Gt.TextRenderer=Kt,Gt.Lexer=Ne,Gt.lexer=Ne.lex,Gt.Tokenizer=et,Gt.Slugger=Ct,Gt.parse=Gt;var mn=Gt;return mn})},11690:function(Fn){const st=/[&<>"']/,C=/[&<>"']/g,N=/[<>"']|&(?!#?\w+;)/,ae=/[<>"']|&(?!#?\w+;)/g,ve={"&":"&","<":"<",">":">",'"':""","'":"'"},le=X=>ve[X];function Q(X,q){if(q){if(st.test(X))return X.replace(C,le)}else if(N.test(X))return X.replace(ae,le);return X}const h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ge(X){return X.replace(h,(q,oe)=>(oe=oe.toLowerCase(),oe==="colon"?":":oe.charAt(0)==="#"?oe.charAt(1)==="x"?String.fromCharCode(parseInt(oe.substring(2),16)):String.fromCharCode(+oe.substring(1)):""))}const ie=/(^|[^\[])\^/g;function A(X,q){X=X.source||X,q=q||"";const oe={replace:(pe,_e)=>(_e=_e.source||_e,_e=_e.replace(ie,"$1"),X=X.replace(pe,_e),oe),getRegex:()=>new RegExp(X,q)};return oe}const B=/[^\w:]/g,T=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(X,q,oe){if(X){let pe;try{pe=decodeURIComponent(ge(oe)).replace(B,"").toLowerCase()}catch(_e){return null}if(pe.indexOf("javascript:")===0||pe.indexOf("vbscript:")===0||pe.indexOf("data:")===0)return null}q&&!T.test(oe)&&(oe=O(q,oe));try{oe=encodeURI(oe).replace(/%25/g,"%")}catch(pe){return null}return oe}const v={},E=/^[^:]+:\/*[^/]*$/,S=/^([^:]+:)[\s\S]*$/,F=/^([^:]+:\/*[^/]*)[\s\S]*$/;function O(X,q){v[" "+X]||(E.test(X)?v[" "+X]=X+"/":v[" "+X]=D(X,"/",!0)),X=v[" "+X];const oe=X.indexOf(":")===-1;return q.substring(0,2)==="//"?oe?q:X.replace(S,"$1")+q:q.charAt(0)==="/"?oe?q:X.replace(F,"$1")+q:X+q}const Z={exec:function(){}};function b(X){let q=1,oe,pe;for(;q<arguments.length;q++){oe=arguments[q];for(pe in oe)Object.prototype.hasOwnProperty.call(oe,pe)&&(X[pe]=oe[pe])}return X}function L(X,q){const oe=X.replace(/\|/g,(j,K,ee)=>{let z=!1,Ae=K;for(;--Ae>=0&&ee[Ae]==="\\";)z=!z;return z?"|":" |"}),pe=oe.split(/ \|/);let _e=0;if(pe.length>q)pe.splice(q);else for(;pe.length<q;)pe.push("");for(;_e<pe.length;_e++)pe[_e]=pe[_e].trim().replace(/\\\|/g,"|");return pe}function D(X,q,oe){const pe=X.length;if(pe===0)return"";let _e=0;for(;_e<pe;){const j=X.charAt(pe-_e-1);if(j===q&&!oe)_e++;else if(j!==q&&oe)_e++;else break}return X.substr(0,pe-_e)}function I(X,q){if(X.indexOf(q[1])===-1)return-1;const oe=X.length;let pe=0,_e=0;for(;_e<oe;_e++)if(X[_e]==="\\")_e++;else if(X[_e]===q[0])pe++;else if(X[_e]===q[1]&&(pe--,pe<0))return _e;return-1}function re(X){X&&X.sanitize&&!X.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 ce(X,q){if(q<1)return"";let oe="";for(;q>1;)q&1&&(oe+=X),q>>=1,X+=X;return oe+X}Fn.exports={escape:Q,unescape:ge,edit:A,cleanUrl:p,resolveUrl:O,noopTest:Z,merge:b,splitCells:L,rtrim:D,findClosingBracket:I,checkSanitizeDeprecation:re,repeatString:ce}},75918:function(Fn,st,C){"use strict";C.d(st,{Wi:function(){return h},Z0:function(){return ge},aU:function(){return Q},eZ:function(){return A},wY:function(){return ie}});var N=C(4348),ae=C(69323),ve=C(13268),le=function(B,T,p,v){function E(S){return S instanceof p?S:new p(function(F){F(S)})}return new(p||(p=Promise))(function(S,F){function O(L){try{b(v.next(L))}catch(D){F(D)}}function Z(L){try{b(v.throw(L))}catch(D){F(D)}}function b(L){L.done?S(L.value):E(L.value).then(O,Z)}b((v=v.apply(B,T||[])).next())})};class Q extends ae.JT{constructor(T,p="",v="",E=!0,S){super(),this._onDidChange=this._register(new N.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=T,this._label=p,this._cssClass=v,this._enabled=E,this._actionCallback=S}get id(){return this._id}get label(){return this._label}set label(T){this._setLabel(T)}_setLabel(T){this._label!==T&&(this._label=T,this._onDidChange.fire({label:T}))}get tooltip(){return this._tooltip||""}set tooltip(T){this._setTooltip(T)}_setTooltip(T){this._tooltip!==T&&(this._tooltip=T,this._onDidChange.fire({tooltip:T}))}get class(){return this._cssClass}set class(T){this._setClass(T)}_setClass(T){this._cssClass!==T&&(this._cssClass=T,this._onDidChange.fire({class:T}))}get enabled(){return this._enabled}set enabled(T){this._setEnabled(T)}_setEnabled(T){this._enabled!==T&&(this._enabled=T,this._onDidChange.fire({enabled:T}))}get checked(){return this._checked}set checked(T){this._setChecked(T)}_setChecked(T){this._checked!==T&&(this._checked=T,this._onDidChange.fire({checked:T}))}run(T,p){return le(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(T))})}}class h extends ae.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new N.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new N.Q5),this.onDidRun=this._onDidRun.event}run(T,p){return le(this,void 0,void 0,function*(){if(!T.enabled)return;this._onBeforeRun.fire({action:T});let v;try{yield this.runAction(T,p)}catch(E){v=E}this._onDidRun.fire({action:T,error:v})})}runAction(T,p){return le(this,void 0,void 0,function*(){yield T.run(p)})}}class ge extends Q{constructor(T){super(ge.ID,T,T?"separator text":"separator"),this.checked=!1,this.enabled=!1}}ge.ID="vs.actions.separator";class ie{constructor(T,p,v,E){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=T,this.label=p,this.class=E,this._actions=v}get actions(){return this._actions}dispose(){}run(){return le(this,void 0,void 0,function*(){})}}class A extends Q{constructor(){super(A.ID,ve.N("submenu.empty","(empty)"),void 0,!1)}}A.ID="vs.actions.empty"},76068:function(Fn,st,C){"use strict";C.d(st,{ok:function(){return N}});function N(ae,ve){if(!ae)throw new Error(ve?`Assertion failed (${ve})`:"Assertion Failed")}},52615:function(Fn,st,C){"use strict";C.d(st,{CM:function(){return Q},JL:function(){return h},dT:function(){return ie},fK:function(){return le},lA:function(){return ge}});var N=C(4348);class ae{constructor(){this._icons=new Map,this._onDidRegister=new N.Q5}add(B){const T=this._icons.get(B.id);T?B.description?T.description=B.description:console.error(`Duplicate registration of codicon ${B.id}`):(this._icons.set(B.id,B),this._onDidRegister.fire(B))}get(B){return this._icons.get(B)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const ve=new ae,le=ve;function Q(A,B){return new ge(A,B)}function h(A){return A?A.replace(/\$\((.*?)\)/g,(B,T)=>` ${T} `).trim():""}class ge{constructor(B,T,p){this.id=B,this.definition=T,this.description=p,ve.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var ie;(function(A){A.iconNameSegment="[A-Za-z0-9]+",A.iconNameExpression="[A-Za-z0-9\\-]+",A.iconModifierExpression="~[A-Za-z]+";const B=new RegExp(`^(${A.iconNameExpression})(${A.iconModifierExpression})?$`);function T(E){if(E instanceof ge)return["codicon","codicon-"+E.id];const S=B.exec(E.id);if(!S)return T(ge.error);let[,F,O]=S;const Z=["codicon","codicon-"+F];return O&&Z.push("codicon-modifier-"+O.substr(1)),Z}A.asClassNameArray=T;function p(E){return T(E).join(" ")}A.asClassName=p;function v(E){return"."+T(E).join(".")}A.asCSSSelector=v})(ie||(ie={})),function(A){A.add=new A("add",{fontCharacter:"\\ea60"}),A.plus=new A("plus",A.add.definition),A.gistNew=new A("gist-new",A.add.definition),A.repoCreate=new A("repo-create",A.add.definition),A.lightbulb=new A("lightbulb",{fontCharacter:"\\ea61"}),A.lightBulb=new A("light-bulb",{fontCharacter:"\\ea61"}),A.repo=new A("repo",{fontCharacter:"\\ea62"}),A.repoDelete=new A("repo-delete",{fontCharacter:"\\ea62"}),A.gistFork=new A("gist-fork",{fontCharacter:"\\ea63"}),A.repoForked=new A("repo-forked",{fontCharacter:"\\ea63"}),A.gitPullRequest=new A("git-pull-request",{fontCharacter:"\\ea64"}),A.gitPullRequestAbandoned=new A("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),A.recordKeys=new A("record-keys",{fontCharacter:"\\ea65"}),A.keyboard=new A("keyboard",{fontCharacter:"\\ea65"}),A.tag=new A("tag",{fontCharacter:"\\ea66"}),A.tagAdd=new A("tag-add",{fontCharacter:"\\ea66"}),A.tagRemove=new A("tag-remove",{fontCharacter:"\\ea66"}),A.person=new A("person",{fontCharacter:"\\ea67"}),A.personFollow=new A("person-follow",{fontCharacter:"\\ea67"}),A.personOutline=new A("person-outline",{fontCharacter:"\\ea67"}),A.personFilled=new A("person-filled",{fontCharacter:"\\ea67"}),A.gitBranch=new A("git-branch",{fontCharacter:"\\ea68"}),A.gitBranchCreate=new A("git-branch-create",{fontCharacter:"\\ea68"}),A.gitBranchDelete=new A("git-branch-delete",{fontCharacter:"\\ea68"}),A.sourceControl=new A("source-control",{fontCharacter:"\\ea68"}),A.mirror=new A("mirror",{fontCharacter:"\\ea69"}),A.mirrorPublic=new A("mirror-public",{fontCharacter:"\\ea69"}),A.star=new A("star",{fontCharacter:"\\ea6a"}),A.starAdd=new A("star-add",{fontCharacter:"\\ea6a"}),A.starDelete=new A("star-delete",{fontCharacter:"\\ea6a"}),A.starEmpty=new A("star-empty",{fontCharacter:"\\ea6a"}),A.comment=new A("comment",{fontCharacter:"\\ea6b"}),A.commentAdd=new A("comment-add",{fontCharacter:"\\ea6b"}),A.alert=new A("alert",{fontCharacter:"\\ea6c"}),A.warning=new A("warning",{fontCharacter:"\\ea6c"}),A.search=new A("search",{fontCharacter:"\\ea6d"}),A.searchSave=new A("search-save",{fontCharacter:"\\ea6d"}),A.logOut=new A("log-out",{fontCharacter:"\\ea6e"}),A.signOut=new A("sign-out",{fontCharacter:"\\ea6e"}),A.logIn=new A("log-in",{fontCharacter:"\\ea6f"}),A.signIn=new A("sign-in",{fontCharacter:"\\ea6f"}),A.eye=new A("eye",{fontCharacter:"\\ea70"}),A.eyeUnwatch=new A("eye-unwatch",{fontCharacter:"\\ea70"}),A.eyeWatch=new A("eye-watch",{fontCharacter:"\\ea70"}),A.circleFilled=new A("circle-filled",{fontCharacter:"\\ea71"}),A.primitiveDot=new A("primitive-dot",{fontCharacter:"\\ea71"}),A.closeDirty=new A("close-dirty",{fontCharacter:"\\ea71"}),A.debugBreakpoint=new A("debug-breakpoint",{fontCharacter:"\\ea71"}),A.debugBreakpointDisabled=new A("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),A.debugHint=new A("debug-hint",{fontCharacter:"\\ea71"}),A.primitiveSquare=new A("primitive-square",{fontCharacter:"\\ea72"}),A.edit=new A("edit",{fontCharacter:"\\ea73"}),A.pencil=new A("pencil",{fontCharacter:"\\ea73"}),A.info=new A("info",{fontCharacter:"\\ea74"}),A.issueOpened=new A("issue-opened",{fontCharacter:"\\ea74"}),A.gistPrivate=new A("gist-private",{fontCharacter:"\\ea75"}),A.gitForkPrivate=new A("git-fork-private",{fontCharacter:"\\ea75"}),A.lock=new A("lock",{fontCharacter:"\\ea75"}),A.mirrorPrivate=new A("mirror-private",{fontCharacter:"\\ea75"}),A.close=new A("close",{fontCharacter:"\\ea76"}),A.removeClose=new A("remove-close",{fontCharacter:"\\ea76"}),A.x=new A("x",{fontCharacter:"\\ea76"}),A.repoSync=new A("repo-sync",{fontCharacter:"\\ea77"}),A.sync=new A("sync",{fontCharacter:"\\ea77"}),A.clone=new A("clone",{fontCharacter:"\\ea78"}),A.desktopDownload=new A("desktop-download",{fontCharacter:"\\ea78"}),A.beaker=new A("beaker",{fontCharacter:"\\ea79"}),A.microscope=new A("microscope",{fontCharacter:"\\ea79"}),A.vm=new A("vm",{fontCharacter:"\\ea7a"}),A.deviceDesktop=new A("device-desktop",{fontCharacter:"\\ea7a"}),A.file=new A("file",{fontCharacter:"\\ea7b"}),A.fileText=new A("file-text",{fontCharacter:"\\ea7b"}),A.more=new A("more",{fontCharacter:"\\ea7c"}),A.ellipsis=new A("ellipsis",{fontCharacter:"\\ea7c"}),A.kebabHorizontal=new A("kebab-horizontal",{fontCharacter:"\\ea7c"}),A.mailReply=new A("mail-reply",{fontCharacter:"\\ea7d"}),A.reply=new A("reply",{fontCharacter:"\\ea7d"}),A.organization=new A("organization",{fontCharacter:"\\ea7e"}),A.organizationFilled=new A("organization-filled",{fontCharacter:"\\ea7e"}),A.organizationOutline=new A("organization-outline",{fontCharacter:"\\ea7e"}),A.newFile=new A("new-file",{fontCharacter:"\\ea7f"}),A.fileAdd=new A("file-add",{fontCharacter:"\\ea7f"}),A.newFolder=new A("new-folder",{fontCharacter:"\\ea80"}),A.fileDirectoryCreate=new A("file-directory-create",{fontCharacter:"\\ea80"}),A.trash=new A("trash",{fontCharacter:"\\ea81"}),A.trashcan=new A("trashcan",{fontCharacter:"\\ea81"}),A.history=new A("history",{fontCharacter:"\\ea82"}),A.clock=new A("clock",{fontCharacter:"\\ea82"}),A.folder=new A("folder",{fontCharacter:"\\ea83"}),A.fileDirectory=new A("file-directory",{fontCharacter:"\\ea83"}),A.symbolFolder=new A("symbol-folder",{fontCharacter:"\\ea83"}),A.logoGithub=new A("logo-github",{fontCharacter:"\\ea84"}),A.markGithub=new A("mark-github",{fontCharacter:"\\ea84"}),A.github=new A("github",{fontCharacter:"\\ea84"}),A.terminal=new A("terminal",{fontCharacter:"\\ea85"}),A.console=new A("console",{fontCharacter:"\\ea85"}),A.repl=new A("repl",{fontCharacter:"\\ea85"}),A.zap=new A("zap",{fontCharacter:"\\ea86"}),A.symbolEvent=new A("symbol-event",{fontCharacter:"\\ea86"}),A.error=new A("error",{fontCharacter:"\\ea87"}),A.stop=new A("stop",{fontCharacter:"\\ea87"}),A.variable=new A("variable",{fontCharacter:"\\ea88"}),A.symbolVariable=new A("symbol-variable",{fontCharacter:"\\ea88"}),A.array=new A("array",{fontCharacter:"\\ea8a"}),A.symbolArray=new A("symbol-array",{fontCharacter:"\\ea8a"}),A.symbolModule=new A("symbol-module",{fontCharacter:"\\ea8b"}),A.symbolPackage=new A("symbol-package",{fontCharacter:"\\ea8b"}),A.symbolNamespace=new A("symbol-namespace",{fontCharacter:"\\ea8b"}),A.symbolObject=new A("symbol-object",{fontCharacter:"\\ea8b"}),A.symbolMethod=new A("symbol-method",{fontCharacter:"\\ea8c"}),A.symbolFunction=new A("symbol-function",{fontCharacter:"\\ea8c"}),A.symbolConstructor=new A("symbol-constructor",{fontCharacter:"\\ea8c"}),A.symbolBoolean=new A("symbol-boolean",{fontCharacter:"\\ea8f"}),A.symbolNull=new A("symbol-null",{fontCharacter:"\\ea8f"}),A.symbolNumeric=new A("symbol-numeric",{fontCharacter:"\\ea90"}),A.symbolNumber=new A("symbol-number",{fontCharacter:"\\ea90"}),A.symbolStructure=new A("symbol-structure",{fontCharacter:"\\ea91"}),A.symbolStruct=new A("symbol-struct",{fontCharacter:"\\ea91"}),A.symbolParameter=new A("symbol-parameter",{fontCharacter:"\\ea92"}),A.symbolTypeParameter=new A("symbol-type-parameter",{fontCharacter:"\\ea92"}),A.symbolKey=new A("symbol-key",{fontCharacter:"\\ea93"}),A.symbolText=new A("symbol-text",{fontCharacter:"\\ea93"}),A.symbolReference=new A("symbol-reference",{fontCharacter:"\\ea94"}),A.goToFile=new A("go-to-file",{fontCharacter:"\\ea94"}),A.symbolEnum=new A("symbol-enum",{fontCharacter:"\\ea95"}),A.symbolValue=new A("symbol-value",{fontCharacter:"\\ea95"}),A.symbolRuler=new A("symbol-ruler",{fontCharacter:"\\ea96"}),A.symbolUnit=new A("symbol-unit",{fontCharacter:"\\ea96"}),A.activateBreakpoints=new A("activate-breakpoints",{fontCharacter:"\\ea97"}),A.archive=new A("archive",{fontCharacter:"\\ea98"}),A.arrowBoth=new A("arrow-both",{fontCharacter:"\\ea99"}),A.arrowDown=new A("arrow-down",{fontCharacter:"\\ea9a"}),A.arrowLeft=new A("arrow-left",{fontCharacter:"\\ea9b"}),A.arrowRight=new A("arrow-right",{fontCharacter:"\\ea9c"}),A.arrowSmallDown=new A("arrow-small-down",{fontCharacter:"\\ea9d"}),A.arrowSmallLeft=new A("arrow-small-left",{fontCharacter:"\\ea9e"}),A.arrowSmallRight=new A("arrow-small-right",{fontCharacter:"\\ea9f"}),A.arrowSmallUp=new A("arrow-small-up",{fontCharacter:"\\eaa0"}),A.arrowUp=new A("arrow-up",{fontCharacter:"\\eaa1"}),A.bell=new A("bell",{fontCharacter:"\\eaa2"}),A.bold=new A("bold",{fontCharacter:"\\eaa3"}),A.book=new A("book",{fontCharacter:"\\eaa4"}),A.bookmark=new A("bookmark",{fontCharacter:"\\eaa5"}),A.debugBreakpointConditionalUnverified=new A("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),A.debugBreakpointConditional=new A("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),A.debugBreakpointConditionalDisabled=new A("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),A.debugBreakpointDataUnverified=new A("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),A.debugBreakpointData=new A("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),A.debugBreakpointDataDisabled=new A("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),A.debugBreakpointLogUnverified=new A("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),A.debugBreakpointLog=new A("debug-breakpoint-log",{fontCharacter:"\\eaab"}),A.debugBreakpointLogDisabled=new A("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),A.briefcase=new A("briefcase",{fontCharacter:"\\eaac"}),A.broadcast=new A("broadcast",{fontCharacter:"\\eaad"}),A.browser=new A("browser",{fontCharacter:"\\eaae"}),A.bug=new A("bug",{fontCharacter:"\\eaaf"}),A.calendar=new A("calendar",{fontCharacter:"\\eab0"}),A.caseSensitive=new A("case-sensitive",{fontCharacter:"\\eab1"}),A.check=new A("check",{fontCharacter:"\\eab2"}),A.checklist=new A("checklist",{fontCharacter:"\\eab3"}),A.chevronDown=new A("chevron-down",{fontCharacter:"\\eab4"}),A.dropDownButton=new A("drop-down-button",A.chevronDown.definition),A.chevronLeft=new A("chevron-left",{fontCharacter:"\\eab5"}),A.chevronRight=new A("chevron-right",{fontCharacter:"\\eab6"}),A.chevronUp=new A("chevron-up",{fontCharacter:"\\eab7"}),A.chromeClose=new A("chrome-close",{fontCharacter:"\\eab8"}),A.chromeMaximize=new A("chrome-maximize",{fontCharacter:"\\eab9"}),A.chromeMinimize=new A("chrome-minimize",{fontCharacter:"\\eaba"}),A.chromeRestore=new A("chrome-restore",{fontCharacter:"\\eabb"}),A.circleOutline=new A("circle-outline",{fontCharacter:"\\eabc"}),A.debugBreakpointUnverified=new A("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),A.circleSlash=new A("circle-slash",{fontCharacter:"\\eabd"}),A.circuitBoard=new A("circuit-board",{fontCharacter:"\\eabe"}),A.clearAll=new A("clear-all",{fontCharacter:"\\eabf"}),A.clippy=new A("clippy",{fontCharacter:"\\eac0"}),A.closeAll=new A("close-all",{fontCharacter:"\\eac1"}),A.cloudDownload=new A("cloud-download",{fontCharacter:"\\eac2"}),A.cloudUpload=new A("cloud-upload",{fontCharacter:"\\eac3"}),A.code=new A("code",{fontCharacter:"\\eac4"}),A.collapseAll=new A("collapse-all",{fontCharacter:"\\eac5"}),A.colorMode=new A("color-mode",{fontCharacter:"\\eac6"}),A.commentDiscussion=new A("comment-discussion",{fontCharacter:"\\eac7"}),A.compareChanges=new A("compare-changes",{fontCharacter:"\\eafd"}),A.creditCard=new A("credit-card",{fontCharacter:"\\eac9"}),A.dash=new A("dash",{fontCharacter:"\\eacc"}),A.dashboard=new A("dashboard",{fontCharacter:"\\eacd"}),A.database=new A("database",{fontCharacter:"\\eace"}),A.debugContinue=new A("debug-continue",{fontCharacter:"\\eacf"}),A.debugDisconnect=new A("debug-disconnect",{fontCharacter:"\\ead0"}),A.debugPause=new A("debug-pause",{fontCharacter:"\\ead1"}),A.debugRestart=new A("debug-restart",{fontCharacter:"\\ead2"}),A.debugStart=new A("debug-start",{fontCharacter:"\\ead3"}),A.debugStepInto=new A("debug-step-into",{fontCharacter:"\\ead4"}),A.debugStepOut=new A("debug-step-out",{fontCharacter:"\\ead5"}),A.debugStepOver=new A("debug-step-over",{fontCharacter:"\\ead6"}),A.debugStop=new A("debug-stop",{fontCharacter:"\\ead7"}),A.debug=new A("debug",{fontCharacter:"\\ead8"}),A.deviceCameraVideo=new A("device-camera-video",{fontCharacter:"\\ead9"}),A.deviceCamera=new A("device-camera",{fontCharacter:"\\eada"}),A.deviceMobile=new A("device-mobile",{fontCharacter:"\\eadb"}),A.diffAdded=new A("diff-added",{fontCharacter:"\\eadc"}),A.diffIgnored=new A("diff-ignored",{fontCharacter:"\\eadd"}),A.diffModified=new A("diff-modified",{fontCharacter:"\\eade"}),A.diffRemoved=new A("diff-removed",{fontCharacter:"\\eadf"}),A.diffRenamed=new A("diff-renamed",{fontCharacter:"\\eae0"}),A.diff=new A("diff",{fontCharacter:"\\eae1"}),A.discard=new A("discard",{fontCharacter:"\\eae2"}),A.editorLayout=new A("editor-layout",{fontCharacter:"\\eae3"}),A.emptyWindow=new A("empty-window",{fontCharacter:"\\eae4"}),A.exclude=new A("exclude",{fontCharacter:"\\eae5"}),A.extensions=new A("extensions",{fontCharacter:"\\eae6"}),A.eyeClosed=new A("eye-closed",{fontCharacter:"\\eae7"}),A.fileBinary=new A("file-binary",{fontCharacter:"\\eae8"}),A.fileCode=new A("file-code",{fontCharacter:"\\eae9"}),A.fileMedia=new A("file-media",{fontCharacter:"\\eaea"}),A.filePdf=new A("file-pdf",{fontCharacter:"\\eaeb"}),A.fileSubmodule=new A("file-submodule",{fontCharacter:"\\eaec"}),A.fileSymlinkDirectory=new A("file-symlink-directory",{fontCharacter:"\\eaed"}),A.fileSymlinkFile=new A("file-symlink-file",{fontCharacter:"\\eaee"}),A.fileZip=new A("file-zip",{fontCharacter:"\\eaef"}),A.files=new A("files",{fontCharacter:"\\eaf0"}),A.filter=new A("filter",{fontCharacter:"\\eaf1"}),A.flame=new A("flame",{fontCharacter:"\\eaf2"}),A.foldDown=new A("fold-down",{fontCharacter:"\\eaf3"}),A.foldUp=new A("fold-up",{fontCharacter:"\\eaf4"}),A.fold=new A("fold",{fontCharacter:"\\eaf5"}),A.folderActive=new A("folder-active",{fontCharacter:"\\eaf6"}),A.folderOpened=new A("folder-opened",{fontCharacter:"\\eaf7"}),A.gear=new A("gear",{fontCharacter:"\\eaf8"}),A.gift=new A("gift",{fontCharacter:"\\eaf9"}),A.gistSecret=new A("gist-secret",{fontCharacter:"\\eafa"}),A.gist=new A("gist",{fontCharacter:"\\eafb"}),A.gitCommit=new A("git-commit",{fontCharacter:"\\eafc"}),A.gitCompare=new A("git-compare",{fontCharacter:"\\eafd"}),A.gitMerge=new A("git-merge",{fontCharacter:"\\eafe"}),A.githubAction=new A("github-action",{fontCharacter:"\\eaff"}),A.githubAlt=new A("github-alt",{fontCharacter:"\\eb00"}),A.globe=new A("globe",{fontCharacter:"\\eb01"}),A.grabber=new A("grabber",{fontCharacter:"\\eb02"}),A.graph=new A("graph",{fontCharacter:"\\eb03"}),A.gripper=new A("gripper",{fontCharacter:"\\eb04"}),A.heart=new A("heart",{fontCharacter:"\\eb05"}),A.home=new A("home",{fontCharacter:"\\eb06"}),A.horizontalRule=new A("horizontal-rule",{fontCharacter:"\\eb07"}),A.hubot=new A("hubot",{fontCharacter:"\\eb08"}),A.inbox=new A("inbox",{fontCharacter:"\\eb09"}),A.issueClosed=new A("issue-closed",{fontCharacter:"\\eba4"}),A.issueReopened=new A("issue-reopened",{fontCharacter:"\\eb0b"}),A.issues=new A("issues",{fontCharacter:"\\eb0c"}),A.italic=new A("italic",{fontCharacter:"\\eb0d"}),A.jersey=new A("jersey",{fontCharacter:"\\eb0e"}),A.json=new A("json",{fontCharacter:"\\eb0f"}),A.kebabVertical=new A("kebab-vertical",{fontCharacter:"\\eb10"}),A.key=new A("key",{fontCharacter:"\\eb11"}),A.law=new A("law",{fontCharacter:"\\eb12"}),A.lightbulbAutofix=new A("lightbulb-autofix",{fontCharacter:"\\eb13"}),A.linkExternal=new A("link-external",{fontCharacter:"\\eb14"}),A.link=new A("link",{fontCharacter:"\\eb15"}),A.listOrdered=new A("list-ordered",{fontCharacter:"\\eb16"}),A.listUnordered=new A("list-unordered",{fontCharacter:"\\eb17"}),A.liveShare=new A("live-share",{fontCharacter:"\\eb18"}),A.loading=new A("loading",{fontCharacter:"\\eb19"}),A.location=new A("location",{fontCharacter:"\\eb1a"}),A.mailRead=new A("mail-read",{fontCharacter:"\\eb1b"}),A.mail=new A("mail",{fontCharacter:"\\eb1c"}),A.markdown=new A("markdown",{fontCharacter:"\\eb1d"}),A.megaphone=new A("megaphone",{fontCharacter:"\\eb1e"}),A.mention=new A("mention",{fontCharacter:"\\eb1f"}),A.milestone=new A("milestone",{fontCharacter:"\\eb20"}),A.mortarBoard=new A("mortar-board",{fontCharacter:"\\eb21"}),A.move=new A("move",{fontCharacter:"\\eb22"}),A.multipleWindows=new A("multiple-windows",{fontCharacter:"\\eb23"}),A.mute=new A("mute",{fontCharacter:"\\eb24"}),A.noNewline=new A("no-newline",{fontCharacter:"\\eb25"}),A.note=new A("note",{fontCharacter:"\\eb26"}),A.octoface=new A("octoface",{fontCharacter:"\\eb27"}),A.openPreview=new A("open-preview",{fontCharacter:"\\eb28"}),A.package_=new A("package",{fontCharacter:"\\eb29"}),A.paintcan=new A("paintcan",{fontCharacter:"\\eb2a"}),A.pin=new A("pin",{fontCharacter:"\\eb2b"}),A.play=new A("play",{fontCharacter:"\\eb2c"}),A.run=new A("run",{fontCharacter:"\\eb2c"}),A.plug=new A("plug",{fontCharacter:"\\eb2d"}),A.preserveCase=new A("preserve-case",{fontCharacter:"\\eb2e"}),A.preview=new A("preview",{fontCharacter:"\\eb2f"}),A.project=new A("project",{fontCharacter:"\\eb30"}),A.pulse=new A("pulse",{fontCharacter:"\\eb31"}),A.question=new A("question",{fontCharacter:"\\eb32"}),A.quote=new A("quote",{fontCharacter:"\\eb33"}),A.radioTower=new A("radio-tower",{fontCharacter:"\\eb34"}),A.reactions=new A("reactions",{fontCharacter:"\\eb35"}),A.references=new A("references",{fontCharacter:"\\eb36"}),A.refresh=new A("refresh",{fontCharacter:"\\eb37"}),A.regex=new A("regex",{fontCharacter:"\\eb38"}),A.remoteExplorer=new A("remote-explorer",{fontCharacter:"\\eb39"}),A.remote=new A("remote",{fontCharacter:"\\eb3a"}),A.remove=new A("remove",{fontCharacter:"\\eb3b"}),A.replaceAll=new A("replace-all",{fontCharacter:"\\eb3c"}),A.replace=new A("replace",{fontCharacter:"\\eb3d"}),A.repoClone=new A("repo-clone",{fontCharacter:"\\eb3e"}),A.repoForcePush=new A("repo-force-push",{fontCharacter:"\\eb3f"}),A.repoPull=new A("repo-pull",{fontCharacter:"\\eb40"}),A.repoPush=new A("repo-push",{fontCharacter:"\\eb41"}),A.report=new A("report",{fontCharacter:"\\eb42"}),A.requestChanges=new A("request-changes",{fontCharacter:"\\eb43"}),A.rocket=new A("rocket",{fontCharacter:"\\eb44"}),A.rootFolderOpened=new A("root-folder-opened",{fontCharacter:"\\eb45"}),A.rootFolder=new A("root-folder",{fontCharacter:"\\eb46"}),A.rss=new A("rss",{fontCharacter:"\\eb47"}),A.ruby=new A("ruby",{fontCharacter:"\\eb48"}),A.saveAll=new A("save-all",{fontCharacter:"\\eb49"}),A.saveAs=new A("save-as",{fontCharacter:"\\eb4a"}),A.save=new A("save",{fontCharacter:"\\eb4b"}),A.screenFull=new A("screen-full",{fontCharacter:"\\eb4c"}),A.screenNormal=new A("screen-normal",{fontCharacter:"\\eb4d"}),A.searchStop=new A("search-stop",{fontCharacter:"\\eb4e"}),A.server=new A("server",{fontCharacter:"\\eb50"}),A.settingsGear=new A("settings-gear",{fontCharacter:"\\eb51"}),A.settings=new A("settings",{fontCharacter:"\\eb52"}),A.shield=new A("shield",{fontCharacter:"\\eb53"}),A.smiley=new A("smiley",{fontCharacter:"\\eb54"}),A.sortPrecedence=new A("sort-precedence",{fontCharacter:"\\eb55"}),A.splitHorizontal=new A("split-horizontal",{fontCharacter:"\\eb56"}),A.splitVertical=new A("split-vertical",{fontCharacter:"\\eb57"}),A.squirrel=new A("squirrel",{fontCharacter:"\\eb58"}),A.starFull=new A("star-full",{fontCharacter:"\\eb59"}),A.starHalf=new A("star-half",{fontCharacter:"\\eb5a"}),A.symbolClass=new A("symbol-class",{fontCharacter:"\\eb5b"}),A.symbolColor=new A("symbol-color",{fontCharacter:"\\eb5c"}),A.symbolConstant=new A("symbol-constant",{fontCharacter:"\\eb5d"}),A.symbolEnumMember=new A("symbol-enum-member",{fontCharacter:"\\eb5e"}),A.symbolField=new A("symbol-field",{fontCharacter:"\\eb5f"}),A.symbolFile=new A("symbol-file",{fontCharacter:"\\eb60"}),A.symbolInterface=new A("symbol-interface",{fontCharacter:"\\eb61"}),A.symbolKeyword=new A("symbol-keyword",{fontCharacter:"\\eb62"}),A.symbolMisc=new A("symbol-misc",{fontCharacter:"\\eb63"}),A.symbolOperator=new A("symbol-operator",{fontCharacter:"\\eb64"}),A.symbolProperty=new A("symbol-property",{fontCharacter:"\\eb65"}),A.wrench=new A("wrench",{fontCharacter:"\\eb65"}),A.wrenchSubaction=new A("wrench-subaction",{fontCharacter:"\\eb65"}),A.symbolSnippet=new A("symbol-snippet",{fontCharacter:"\\eb66"}),A.tasklist=new A("tasklist",{fontCharacter:"\\eb67"}),A.telescope=new A("telescope",{fontCharacter:"\\eb68"}),A.textSize=new A("text-size",{fontCharacter:"\\eb69"}),A.threeBars=new A("three-bars",{fontCharacter:"\\eb6a"}),A.thumbsdown=new A("thumbsdown",{fontCharacter:"\\eb6b"}),A.thumbsup=new A("thumbsup",{fontCharacter:"\\eb6c"}),A.tools=new A("tools",{fontCharacter:"\\eb6d"}),A.triangleDown=new A("triangle-down",{fontCharacter:"\\eb6e"}),A.triangleLeft=new A("triangle-left",{fontCharacter:"\\eb6f"}),A.triangleRight=new A("triangle-right",{fontCharacter:"\\eb70"}),A.triangleUp=new A("triangle-up",{fontCharacter:"\\eb71"}),A.twitter=new A("twitter",{fontCharacter:"\\eb72"}),A.unfold=new A("unfold",{fontCharacter:"\\eb73"}),A.unlock=new A("unlock",{fontCharacter:"\\eb74"}),A.unmute=new A("unmute",{fontCharacter:"\\eb75"}),A.unverified=new A("unverified",{fontCharacter:"\\eb76"}),A.verified=new A("verified",{fontCharacter:"\\eb77"}),A.versions=new A("versions",{fontCharacter:"\\eb78"}),A.vmActive=new A("vm-active",{fontCharacter:"\\eb79"}),A.vmOutline=new A("vm-outline",{fontCharacter:"\\eb7a"}),A.vmRunning=new A("vm-running",{fontCharacter:"\\eb7b"}),A.watch=new A("watch",{fontCharacter:"\\eb7c"}),A.whitespace=new A("whitespace",{fontCharacter:"\\eb7d"}),A.wholeWord=new A("whole-word",{fontCharacter:"\\eb7e"}),A.window=new A("window",{fontCharacter:"\\eb7f"}),A.wordWrap=new A("word-wrap",{fontCharacter:"\\eb80"}),A.zoomIn=new A("zoom-in",{fontCharacter:"\\eb81"}),A.zoomOut=new A("zoom-out",{fontCharacter:"\\eb82"}),A.listFilter=new A("list-filter",{fontCharacter:"\\eb83"}),A.listFlat=new A("list-flat",{fontCharacter:"\\eb84"}),A.listSelection=new A("list-selection",{fontCharacter:"\\eb85"}),A.selection=new A("selection",{fontCharacter:"\\eb85"}),A.listTree=new A("list-tree",{fontCharacter:"\\eb86"}),A.debugBreakpointFunctionUnverified=new A("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),A.debugBreakpointFunction=new A("debug-breakpoint-function",{fontCharacter:"\\eb88"}),A.debugBreakpointFunctionDisabled=new A("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),A.debugStackframeActive=new A("debug-stackframe-active",{fontCharacter:"\\eb89"}),A.debugStackframeDot=new A("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),A.debugStackframe=new A("debug-stackframe",{fontCharacter:"\\eb8b"}),A.debugStackframeFocused=new A("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),A.debugBreakpointUnsupported=new A("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),A.symbolString=new A("symbol-string",{fontCharacter:"\\eb8d"}),A.debugReverseContinue=new A("debug-reverse-continue",{fontCharacter:"\\eb8e"}),A.debugStepBack=new A("debug-step-back",{fontCharacter:"\\eb8f"}),A.debugRestartFrame=new A("debug-restart-frame",{fontCharacter:"\\eb90"}),A.callIncoming=new A("call-incoming",{fontCharacter:"\\eb92"}),A.callOutgoing=new A("call-outgoing",{fontCharacter:"\\eb93"}),A.menu=new A("menu",{fontCharacter:"\\eb94"}),A.expandAll=new A("expand-all",{fontCharacter:"\\eb95"}),A.feedback=new A("feedback",{fontCharacter:"\\eb96"}),A.groupByRefType=new A("group-by-ref-type",{fontCharacter:"\\eb97"}),A.ungroupByRefType=new A("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),A.account=new A("account",{fontCharacter:"\\eb99"}),A.bellDot=new A("bell-dot",{fontCharacter:"\\eb9a"}),A.debugConsole=new A("debug-console",{fontCharacter:"\\eb9b"}),A.library=new A("library",{fontCharacter:"\\eb9c"}),A.output=new A("output",{fontCharacter:"\\eb9d"}),A.runAll=new A("run-all",{fontCharacter:"\\eb9e"}),A.syncIgnored=new A("sync-ignored",{fontCharacter:"\\eb9f"}),A.pinned=new A("pinned",{fontCharacter:"\\eba0"}),A.githubInverted=new A("github-inverted",{fontCharacter:"\\eba1"}),A.debugAlt=new A("debug-alt",{fontCharacter:"\\eb91"}),A.serverProcess=new A("server-process",{fontCharacter:"\\eba2"}),A.serverEnvironment=new A("server-environment",{fontCharacter:"\\eba3"}),A.pass=new A("pass",{fontCharacter:"\\eba4"}),A.stopCircle=new A("stop-circle",{fontCharacter:"\\eba5"}),A.playCircle=new A("play-circle",{fontCharacter:"\\eba6"}),A.record=new A("record",{fontCharacter:"\\eba7"}),A.debugAltSmall=new A("debug-alt-small",{fontCharacter:"\\eba8"}),A.vmConnect=new A("vm-connect",{fontCharacter:"\\eba9"}),A.cloud=new A("cloud",{fontCharacter:"\\ebaa"}),A.merge=new A("merge",{fontCharacter:"\\ebab"}),A.exportIcon=new A("export",{fontCharacter:"\\ebac"}),A.graphLeft=new A("graph-left",{fontCharacter:"\\ebad"}),A.magnet=new A("magnet",{fontCharacter:"\\ebae"}),A.notebook=new A("notebook",{fontCharacter:"\\ebaf"}),A.redo=new A("redo",{fontCharacter:"\\ebb0"}),A.checkAll=new A("check-all",{fontCharacter:"\\ebb1"}),A.pinnedDirty=new A("pinned-dirty",{fontCharacter:"\\ebb2"}),A.passFilled=new A("pass-filled",{fontCharacter:"\\ebb3"}),A.circleLargeFilled=new A("circle-large-filled",{fontCharacter:"\\ebb4"}),A.circleLargeOutline=new A("circle-large-outline",{fontCharacter:"\\ebb5"}),A.combine=new A("combine",{fontCharacter:"\\ebb6"}),A.gather=new A("gather",{fontCharacter:"\\ebb6"}),A.table=new A("table",{fontCharacter:"\\ebb7"}),A.variableGroup=new A("variable-group",{fontCharacter:"\\ebb8"}),A.typeHierarchy=new A("type-hierarchy",{fontCharacter:"\\ebb9"}),A.typeHierarchySub=new A("type-hierarchy-sub",{fontCharacter:"\\ebba"}),A.typeHierarchySuper=new A("type-hierarchy-super",{fontCharacter:"\\ebbb"}),A.gitPullRequestCreate=new A("git-pull-request-create",{fontCharacter:"\\ebbc"}),A.runAbove=new A("run-above",{fontCharacter:"\\ebbd"}),A.runBelow=new A("run-below",{fontCharacter:"\\ebbe"}),A.notebookTemplate=new A("notebook-template",{fontCharacter:"\\ebbf"}),A.debugRerun=new A("debug-rerun",{fontCharacter:"\\ebc0"}),A.workspaceTrusted=new A("workspace-trusted",{fontCharacter:"\\ebc1"}),A.workspaceUntrusted=new A("workspace-untrusted",{fontCharacter:"\\ebc2"}),A.workspaceUnspecified=new A("workspace-unspecified",{fontCharacter:"\\ebc3"}),A.terminalCmd=new A("terminal-cmd",{fontCharacter:"\\ebc4"}),A.terminalDebian=new A("terminal-debian",{fontCharacter:"\\ebc5"}),A.terminalLinux=new A("terminal-linux",{fontCharacter:"\\ebc6"}),A.terminalPowershell=new A("terminal-powershell",{fontCharacter:"\\ebc7"}),A.terminalTmux=new A("terminal-tmux",{fontCharacter:"\\ebc8"}),A.terminalUbuntu=new A("terminal-ubuntu",{fontCharacter:"\\ebc9"}),A.terminalBash=new A("terminal-bash",{fontCharacter:"\\ebca"}),A.arrowSwap=new A("arrow-swap",{fontCharacter:"\\ebcb"}),A.copy=new A("copy",{fontCharacter:"\\ebcc"}),A.personAdd=new A("person-add",{fontCharacter:"\\ebcd"}),A.filterFilled=new A("filter-filled",{fontCharacter:"\\ebce"}),A.wand=new A("wand",{fontCharacter:"\\ebcf"}),A.debugLineByLine=new A("debug-line-by-line",{fontCharacter:"\\ebd0"}),A.inspect=new A("inspect",{fontCharacter:"\\ebd1"}),A.layers=new A("layers",{fontCharacter:"\\ebd2"}),A.layersDot=new A("layers-dot",{fontCharacter:"\\ebd3"}),A.layersActive=new A("layers-active",{fontCharacter:"\\ebd4"}),A.compass=new A("compass",{fontCharacter:"\\ebd5"}),A.compassDot=new A("compass-dot",{fontCharacter:"\\ebd6"}),A.compassActive=new A("compass-active",{fontCharacter:"\\ebd7"}),A.azure=new A("azure",{fontCharacter:"\\ebd8"}),A.issueDraft=new A("issue-draft",{fontCharacter:"\\ebd9"}),A.gitPullRequestClosed=new A("git-pull-request-closed",{fontCharacter:"\\ebda"}),A.gitPullRequestDraft=new A("git-pull-request-draft",{fontCharacter:"\\ebdb"}),A.debugAll=new A("debug-all",{fontCharacter:"\\ebdc"}),A.debugCoverage=new A("debug-coverage",{fontCharacter:"\\ebdd"}),A.runErrors=new A("run-errors",{fontCharacter:"\\ebde"}),A.folderLibrary=new A("folder-library",{fontCharacter:"\\ebdf"}),A.debugContinueSmall=new A("debug-continue-small",{fontCharacter:"\\ebe0"}),A.beakerStop=new A("beaker-stop",{fontCharacter:"\\ebe1"}),A.graphLine=new A("graph-line",{fontCharacter:"\\ebe2"}),A.graphScatter=new A("graph-scatter",{fontCharacter:"\\ebe3"}),A.pieChart=new A("pie-chart",{fontCharacter:"\\ebe4"}),A.bracket=new A("bracket",A.json.definition),A.bracketDot=new A("bracket-dot",{fontCharacter:"\\ebe5"}),A.bracketError=new A("bracket-error",{fontCharacter:"\\ebe6"}),A.lockSmall=new A("lock-small",{fontCharacter:"\\ebe7"}),A.azureDevops=new A("azure-devops",{fontCharacter:"\\ebe8"}),A.verifiedFilled=new A("verified-filled",{fontCharacter:"\\ebe9"})}(ge||(ge={}))},79881:function(Fn,st,C){"use strict";C.d(st,{B8:function(){return T},Cp:function(){return le},F0:function(){return ie},L6:function(){return B},VV:function(){return ge},b1:function(){return A},dL:function(){return ve},ri:function(){return Q}});class N{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(v){setTimeout(()=>{throw v.stack?new Error(v.message+`
|
|
|
|
`+v.stack):v},0)}}emit(v){this.listeners.forEach(E=>{E(v)})}onUnexpectedError(v){this.unexpectedErrorHandler(v),this.emit(v)}onUnexpectedExternalError(v){this.unexpectedErrorHandler(v)}}const ae=new N;function ve(p){ge(p)||ae.onUnexpectedError(p)}function le(p){ge(p)||ae.onUnexpectedExternalError(p)}function Q(p){if(p instanceof Error){let{name:v,message:E}=p;const S=p.stacktrace||p.stack;return{$isError:!0,name:v,message:E,stack:S}}return p}const h="Canceled";function ge(p){return p instanceof Error&&p.name===h&&p.message===h}function ie(){const p=new Error(h);return p.name=p.message,p}function A(p){return p?new Error(`Illegal argument: ${p}`):new Error("Illegal argument")}function B(p){return p?new Error(`Illegal state: ${p}`):new Error("Illegal state")}class T extends Error{constructor(v){super("NotSupported"),v&&(this.message=v)}}},4348:function(Fn,st,C){"use strict";C.d(st,{D0:function(){return T},E7:function(){return p},K3:function(){return B},Q5:function(){return A},ZD:function(){return v},ju:function(){return Q}});var N=C(79881),ae=C(69323),ve=C(34502),le=C(95830),Q;(function(E){E.None=()=>ae.JT.None;function S(ee){return(z,Ae=null,Y)=>{let y=!1,_;return _=ee(V=>{if(!y)return _?_.dispose():y=!0,z.call(Ae,V)},null,Y),y&&_.dispose(),_}}E.once=S;function F(ee,z){return I((Ae,Y=null,y)=>ee(_=>Ae.call(Y,z(_)),null,y))}E.map=F;function O(ee,z){return I((Ae,Y=null,y)=>ee(_=>{z(_),Ae.call(Y,_)},null,y))}E.forEach=O;function Z(ee,z){return I((Ae,Y=null,y)=>ee(_=>z(_)&&Ae.call(Y,_),null,y))}E.filter=Z;function b(ee){return ee}E.signal=b;function L(...ee){return(z,Ae=null,Y)=>(0,ae.F8)(...ee.map(y=>y(_=>z.call(Ae,_),null,Y)))}E.any=L;function D(ee,z,Ae){let Y=Ae;return F(ee,y=>(Y=z(Y,y),Y))}E.reduce=D;function I(ee){let z;const Ae=new A({onFirstListenerAdd(){z=ee(Ae.fire,Ae)},onLastListenerRemove(){z.dispose()}});return Ae.event}function re(ee,z,Ae=100,Y=!1,y){let _,V,de,We=0;const Qe=new A({leakWarningThreshold:y,onFirstListenerAdd(){_=ee(ct=>{We++,V=z(V,ct),Y&&!de&&(Qe.fire(V),V=void 0),clearTimeout(de),de=setTimeout(()=>{const Et=V;V=void 0,de=void 0,(!Y||We>1)&&Qe.fire(Et),We=0},Ae)})},onLastListenerRemove(){_.dispose()}});return Qe.event}E.debounce=re;function ce(ee,z=(Ae,Y)=>Ae===Y){let Ae=!0,Y;return Z(ee,y=>{const _=Ae||!z(y,Y);return Ae=!1,Y=y,_})}E.latch=ce;function X(ee,z){return[E.filter(ee,z),E.filter(ee,Ae=>!z(Ae))]}E.split=X;function q(ee,z=!1,Ae=[]){let Y=Ae.slice(),y=ee(de=>{Y?Y.push(de):V.fire(de)});const _=()=>{Y&&Y.forEach(de=>V.fire(de)),Y=null},V=new A({onFirstListenerAdd(){y||(y=ee(de=>V.fire(de)))},onFirstListenerDidAdd(){Y&&(z?setTimeout(_):_())},onLastListenerRemove(){y&&y.dispose(),y=null}});return V.event}E.buffer=q;class oe{constructor(z){this.event=z}map(z){return new oe(F(this.event,z))}forEach(z){return new oe(O(this.event,z))}filter(z){return new oe(Z(this.event,z))}reduce(z,Ae){return new oe(D(this.event,z,Ae))}latch(){return new oe(ce(this.event))}debounce(z,Ae=100,Y=!1,y){return new oe(re(this.event,z,Ae,Y,y))}on(z,Ae,Y){return this.event(z,Ae,Y)}once(z,Ae,Y){return S(this.event)(z,Ae,Y)}}function pe(ee){return new oe(ee)}E.chain=pe;function _e(ee,z,Ae=Y=>Y){const Y=(...de)=>V.fire(Ae(...de)),y=()=>ee.on(z,Y),_=()=>ee.removeListener(z,Y),V=new A({onFirstListenerAdd:y,onLastListenerRemove:_});return V.event}E.fromNodeEventEmitter=_e;function j(ee,z,Ae=Y=>Y){const Y=(...de)=>V.fire(Ae(...de)),y=()=>ee.addEventListener(z,Y),_=()=>ee.removeEventListener(z,Y),V=new A({onFirstListenerAdd:y,onLastListenerRemove:_});return V.event}E.fromDOMEventEmitter=j;function K(ee){return new Promise(z=>S(ee)(z))}E.toPromise=K})(Q||(Q={}));class h{constructor(S){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${S}_${h._idPool++}`}start(S){this._stopWatch=new le.G(!0),this._listenerCount=S}stop(){if(this._stopWatch){const S=this._stopWatch.elapsed();this._elapsedOverall+=S,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${S.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}h._idPool=0;let ge=-1;class ie{constructor(S,F=Math.random().toString(18).slice(2,5)){this.customThreshold=S,this.name=F,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(S){let F=ge;if(typeof this.customThreshold=="number"&&(F=this.customThreshold),F<=0||S<F)return;this._stacks||(this._stacks=new Map);const O=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),Z=this._stacks.get(O)||0;if(this._stacks.set(O,Z+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=F*.5;let b,L=0;for(const[D,I]of this._stacks)(!b||L<I)&&(b=D,L=I);console.warn(`[${this.name}] potential listener LEAK detected, having ${S} listeners already. MOST frequent listener (${L}):`),console.warn(b)}return()=>{const b=this._stacks.get(O)||0;this._stacks.set(O,b-1)}}}class A{constructor(S){var F;this._disposed=!1,this._options=S,this._leakageMon=ge>0?new ie(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((F=this._options)===null||F===void 0)&&F._profName?new h(this._options._profName):void 0}get event(){return this._event||(this._event=(S,F,O)=>{var Z;this._listeners||(this._listeners=new ve.S);const b=this._listeners.isEmpty();b&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const L=this._listeners.push(F?[S,F]:S);b&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,S,F);const D=(Z=this._leakageMon)===null||Z===void 0?void 0:Z.check(this._listeners.size),I=(0,ae.OF)(()=>{D&&D(),this._disposed||(L(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return O instanceof ae.SL?O.add(I):Array.isArray(O)&&O.push(I),I}),this._event}fire(S){var F,O;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new ve.S);for(let Z of this._listeners)this._deliveryQueue.push([Z,S]);for((F=this._perfMon)===null||F===void 0||F.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[Z,b]=this._deliveryQueue.shift();try{typeof Z=="function"?Z.call(void 0,b):Z[0].call(Z[1],b)}catch(L){(0,N.dL)(L)}}(O=this._perfMon)===null||O===void 0||O.stop()}}dispose(){var S,F,O,Z,b;this._disposed||(this._disposed=!0,(S=this._listeners)===null||S===void 0||S.clear(),(F=this._deliveryQueue)===null||F===void 0||F.clear(),(Z=(O=this._options)===null||O===void 0?void 0:O.onLastListenerRemove)===null||Z===void 0||Z.call(O),(b=this._leakageMon)===null||b===void 0||b.dispose())}}class B extends A{constructor(S){super(S),this._isPaused=0,this._eventQueue=new ve.S,this._mergeFn=S==null?void 0:S.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const S=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(S))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(S){this._listeners&&(this._isPaused!==0?this._eventQueue.push(S):super.fire(S))}}class T extends B{constructor(S){var F;super(S),this._delay=(F=S.delay)!==null&&F!==void 0?F:100}fire(S){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(S)}}class p{constructor(){this.buffers=[]}wrapEvent(S){return(F,O,Z)=>S(b=>{const L=this.buffers[this.buffers.length-1];L?L.push(()=>F.call(O,b)):F.call(O,b)},void 0,Z)}bufferEvents(S){const F=[];this.buffers.push(F);const O=S();return this.buffers.pop(),F.forEach(Z=>Z()),O}}class v{constructor(){this.listening=!1,this.inputEvent=Q.None,this.inputEventListener=ae.JT.None,this.emitter=new A({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(S){this.inputEvent=S,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=S(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Fn,st,C){"use strict";C.d(st,{I:function(){return N}});function N(ae){const ve=this;let le=!1,Q;return function(){return le||(le=!0,Q=ae.apply(ve,arguments)),Q}}},88226:function(Fn,st,C){"use strict";C.d(st,{$:function(){return N}});var N;(function(ae){function ve(L){return L&&typeof L=="object"&&typeof L[Symbol.iterator]=="function"}ae.is=ve;const le=Object.freeze([]);function Q(){return le}ae.empty=Q;function*h(L){yield L}ae.single=h;function ge(L){return L||le}ae.from=ge;function ie(L){return!L||L[Symbol.iterator]().next().done===!0}ae.isEmpty=ie;function A(L){return L[Symbol.iterator]().next().value}ae.first=A;function B(L,D){for(const I of L)if(D(I))return!0;return!1}ae.some=B;function T(L,D){for(const I of L)if(D(I))return I}ae.find=T;function*p(L,D){for(const I of L)D(I)&&(yield I)}ae.filter=p;function*v(L,D){let I=0;for(const re of L)yield D(re,I++)}ae.map=v;function*E(...L){for(const D of L)for(const I of D)yield I}ae.concat=E;function*S(L){for(const D of L)for(const I of D)yield I}ae.concatNested=S;function F(L,D,I){let re=I;for(const ce of L)re=D(re,ce);return re}ae.reduce=F;function*O(L,D,I=L.length){for(D<0&&(D+=L.length),I<0?I+=L.length:I>L.length&&(I=L.length);D<I;D++)yield L[D]}ae.slice=O;function Z(L,D=Number.POSITIVE_INFINITY){const I=[];if(D===0)return[I,L];const re=L[Symbol.iterator]();for(let ce=0;ce<D;ce++){const X=re.next();if(X.done)return[I,ae.empty()];I.push(X.value)}return[I,{[Symbol.iterator](){return re}}]}ae.consume=Z;function b(L,D,I=(re,ce)=>re===ce){const re=L[Symbol.iterator](),ce=D[Symbol.iterator]();for(;;){const X=re.next(),q=ce.next();if(X.done!==q.done)return!1;if(X.done)return!0;if(!I(X.value,q.value))return!1}}ae.equals=b})(N||(N={}))},69323:function(Fn,st,C){"use strict";C.d(st,{B9:function(){return v},F8:function(){return E},JT:function(){return O},Jz:function(){return b},OF:function(){return S},SL:function(){return F},Wf:function(){return p},XK:function(){return Z},dk:function(){return B}});var N=C(17845),ae=C(88226);const ve=!1;let le=null;function Q(L){le=L}if(ve){const L="__is_disposable_tracked__";Q(new class{trackDisposable(D){const I=new Error("Potentially leaked disposable").stack;setTimeout(()=>{D[L]||console.log(I)},3e3)}setParent(D,I){if(D&&D!==O.None)try{D[L]=!0}catch(re){}}markAsDisposed(D){if(D&&D!==O.None)try{D[L]=!0}catch(I){}}markAsSingleton(D){}})}function h(L){return le==null||le.trackDisposable(L),L}function ge(L){le==null||le.markAsDisposed(L)}function ie(L,D){le==null||le.setParent(L,D)}function A(L,D){if(le)for(const I of L)le.setParent(I,D)}function B(L){return le==null||le.markAsSingleton(L),L}class T extends Error{constructor(D){super(`Encountered errors while disposing of store. Errors: [${D.join(", ")}]`),this.errors=D}}function p(L){return typeof L.dispose=="function"&&L.dispose.length===0}function v(L){if(ae.$.is(L)){let D=[];for(const I of L)if(I)try{I.dispose()}catch(re){D.push(re)}if(D.length===1)throw D[0];if(D.length>1)throw new T(D);return Array.isArray(L)?[]:L}else if(L)return L.dispose(),L}function E(...L){const D=S(()=>v(L));return A(L,D),D}function S(L){const D=h({dispose:(0,N.I)(()=>{ge(D),L()})});return D}class F{constructor(){this._toDispose=new Set,this._isDisposed=!1,h(this)}dispose(){this._isDisposed||(ge(this),this._isDisposed=!0,this.clear())}clear(){try{v(this._toDispose.values())}finally{this._toDispose.clear()}}add(D){if(!D)return D;if(D===this)throw new Error("Cannot register a disposable on itself!");return ie(D,this),this._isDisposed?F.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(D),D}}F.DISABLE_DISPOSED_WARNING=!1;class O{constructor(){this._store=new F,h(this),ie(this._store,this)}dispose(){ge(this),this._store.dispose()}_register(D){if(D===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(D)}}O.None=Object.freeze({dispose(){}});class Z{constructor(){this._isDisposed=!1,h(this)}get value(){return this._isDisposed?void 0:this._value}set value(D){var I;this._isDisposed||D===this._value||((I=this._value)===null||I===void 0||I.dispose(),D&&ie(D,this),this._value=D)}clear(){this.value=void 0}dispose(){var D;this._isDisposed=!0,ge(this),(D=this._value)===null||D===void 0||D.dispose(),this._value=void 0}clearAndLeak(){const D=this._value;return this._value=void 0,D&&ie(D,null),D}}class b{constructor(D){this.object=D}dispose(){}}},34502:function(Fn,st,C){"use strict";C.d(st,{S:function(){return ae}});class N{constructor(le){this.element=le,this.next=N.Undefined,this.prev=N.Undefined}}N.Undefined=new N(void 0);class ae{constructor(){this._first=N.Undefined,this._last=N.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===N.Undefined}clear(){let le=this._first;for(;le!==N.Undefined;){const Q=le.next;le.prev=N.Undefined,le.next=N.Undefined,le=Q}this._first=N.Undefined,this._last=N.Undefined,this._size=0}unshift(le){return this._insert(le,!1)}push(le){return this._insert(le,!0)}_insert(le,Q){const h=new N(le);if(this._first===N.Undefined)this._first=h,this._last=h;else if(Q){const ie=this._last;this._last=h,h.prev=ie,ie.next=h}else{const ie=this._first;this._first=h,h.next=ie,ie.prev=h}this._size+=1;let ge=!1;return()=>{ge||(ge=!0,this._remove(h))}}shift(){if(this._first!==N.Undefined){const le=this._first.element;return this._remove(this._first),le}}pop(){if(this._last!==N.Undefined){const le=this._last.element;return this._remove(this._last),le}}_remove(le){if(le.prev!==N.Undefined&&le.next!==N.Undefined){const Q=le.prev;Q.next=le.next,le.next.prev=Q}else le.prev===N.Undefined&&le.next===N.Undefined?(this._first=N.Undefined,this._last=N.Undefined):le.next===N.Undefined?(this._last=this._last.prev,this._last.next=N.Undefined):le.prev===N.Undefined&&(this._first=this._first.next,this._first.prev=N.Undefined);this._size-=1}*[Symbol.iterator](){let le=this._first;for(;le!==N.Undefined;)yield le.element,le=le.next}}},23345:function(Fn,st,C){"use strict";C.d(st,{$L:function(){return re},ED:function(){return b},IJ:function(){return D},OS:function(){return oe},WE:function(){return X},dz:function(){return L},gn:function(){return ce},li:function(){return S},r:function(){return j},tY:function(){return I},xS:function(){return q}});var N=C(97671),ae;const ve="en";let le=!1,Q=!1,h=!1,ge=!1,ie=!1,A=!1,B=!1,T,p=null,v=null,E;const S=typeof self=="object"?self:typeof C.g=="object"?C.g:{};let F;typeof S.vscode!="undefined"&&typeof S.vscode.process!="undefined"?F=S.vscode.process:typeof N!="undefined"&&(F=N);const O=typeof((ae=F==null?void 0:F.versions)===null||ae===void 0?void 0:ae.electron)=="string"&&F.type==="renderer";if(typeof navigator=="object"&&!O)E=navigator.userAgent,le=E.indexOf("Windows")>=0,Q=E.indexOf("Macintosh")>=0,B=(E.indexOf("Macintosh")>=0||E.indexOf("iPad")>=0||E.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,h=E.indexOf("Linux")>=0,A=!0,T=navigator.language,p=T;else if(typeof F=="object"){le=F.platform==="win32",Q=F.platform==="darwin",h=F.platform==="linux",ge=h&&!!F.env.SNAP&&!!F.env.SNAP_REVISION,T=ve,p=ve;const K=F.env.VSCODE_NLS_CONFIG;if(K)try{const ee=JSON.parse(K),z=ee.availableLanguages["*"];T=ee.locale,p=z||ve,v=ee._translationsConfigFile}catch(ee){}ie=!0}else console.error("Unable to resolve platform.");let Z=0;Q?Z=1:le?Z=3:h&&(Z=2);const b=le,L=Q,D=h,I=ie,re=A,ce=B,X=E,q=function(){if(S.setImmediate)return S.setImmediate.bind(S);if(typeof S.postMessage=="function"&&!S.importScripts){let z=[];S.addEventListener("message",Y=>{if(Y.data&&Y.data.vscodeSetImmediateId)for(let y=0,_=z.length;y<_;y++){const V=z[y];if(V.id===Y.data.vscodeSetImmediateId){z.splice(y,1),V.callback();return}}});let Ae=0;return Y=>{const y=++Ae;z.push({id:y,callback:Y}),S.postMessage({vscodeSetImmediateId:y},"*")}}if(typeof(F==null?void 0:F.nextTick)=="function")return F.nextTick.bind(F);const ee=Promise.resolve();return z=>ee.then(z)}(),oe=Q||B?2:le?1:3;let pe=!0,_e=!1;function j(){if(!_e){_e=!0;const K=new Uint8Array(2);K[0]=1,K[1]=2,pe=new Uint16Array(K.buffer)[0]===513}return pe}},95830:function(Fn,st,C){"use strict";C.d(st,{G:function(){return ve}});var N=C(23345);const ae=N.li.performance&&typeof N.li.performance.now=="function";class ve{constructor(Q){this._highResolution=ae&&Q,this._startTime=this._now(),this._stopTime=-1}static create(Q=!0){return new ve(Q)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?N.li.performance.now():Date.now()}}},82983:function(Fn,st,C){"use strict";C.d(st,{$i:function(){return We},C8:function(){return Ot},GF:function(){return T},HO:function(){return Ae},IO:function(){return p},K7:function(){return Mt},Kw:function(){return sn},LC:function(){return S},Mh:function(){return q},P1:function(){return oe},PJ:function(){return jt},Qe:function(){return Qe},R1:function(){return B},RP:function(){return V},S6:function(){return pn},TT:function(){return b},Ut:function(){return y},V8:function(){return F},WU:function(){return ve},YK:function(){return _e},YU:function(){return le},ZG:function(){return pe},ZH:function(){return K},ab:function(){return ct},c1:function(){return Fe},df:function(){return re},ec:function(){return Q},fi:function(){return mt},fy:function(){return h},j3:function(){return ge},j_:function(){return D},m5:function(){return N},mK:function(){return I},mr:function(){return v},oH:function(){return W},oL:function(){return ie},ok:function(){return X},ow:function(){return O},qq:function(){return ce},qu:function(){return Z},rL:function(){return j},uS:function(){return kt},un:function(){return A},uq:function(){return E},vH:function(){return z},xe:function(){return Et},zY:function(){return L}});function N(R){return!R||typeof R!="string"?!0:R.trim().length===0}const ae=/{(\d+)}/g;function ve(R,...k){return k.length===0?R:R.replace(ae,function(se,$){const G=parseInt($,10);return isNaN(G)||G<0||G>=k.length?se:k[G]})}function le(R){return R.replace(/[<>&]/g,function(k){switch(k){case"<":return"<";case">":return">";case"&":return"&";default:return k}})}function Q(R){return R.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function h(R,k=" "){const se=ge(R,k);return ie(se,k)}function ge(R,k){if(!R||!k)return R;const se=k.length;if(se===0||R.length===0)return R;let $=0;for(;R.indexOf(k,$)===$;)$=$+se;return R.substring($)}function ie(R,k){if(!R||!k)return R;const se=k.length,$=R.length;if(se===0||$===0)return R;let G=$,te=-1;for(;te=R.lastIndexOf(k,G-1),!(te===-1||te+se!==G);){if(te===0)return"";G=te}return R.substring(0,G)}function A(R){return R.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function B(R){return R.replace(/\*/g,"")}function T(R,k,se={}){if(!R)throw new Error("Cannot create regex from empty string");k||(R=Q(R)),se.wholeWord&&(/\B/.test(R.charAt(0))||(R="\\b"+R),/\B/.test(R.charAt(R.length-1))||(R=R+"\\b"));let $="";return se.global&&($+="g"),se.matchCase||($+="i"),se.multiline&&($+="m"),se.unicode&&($+="u"),new RegExp(R,$)}function p(R){return R.source==="^"||R.source==="^$"||R.source==="$"||R.source==="^\\s*$"?!1:!!(R.exec("")&&R.lastIndex===0)}function v(R){return(R.global?"g":"")+(R.ignoreCase?"i":"")+(R.multiline?"m":"")+(R.unicode?"u":"")}function E(R){return R.split(/\r\n|\r|\n/)}function S(R){for(let k=0,se=R.length;k<se;k++){const $=R.charCodeAt(k);if($!==32&&$!==9)return k}return-1}function F(R,k=0,se=R.length){for(let $=k;$<se;$++){const G=R.charCodeAt($);if(G!==32&&G!==9)return R.substring(k,$)}return R.substring(k,se)}function O(R,k=R.length-1){for(let se=k;se>=0;se--){const $=R.charCodeAt(se);if($!==32&&$!==9)return se}return-1}function Z(R,k){return R<k?-1:R>k?1:0}function b(R,k,se=0,$=R.length,G=0,te=k.length){for(;se<$&&G<te;se++,G++){let Se=R.charCodeAt(se),Ie=k.charCodeAt(G);if(Se<Ie)return-1;if(Se>Ie)return 1}const Ce=$-se,we=te-G;return Ce<we?-1:Ce>we?1:0}function L(R,k){return D(R,k,0,R.length,0,k.length)}function D(R,k,se=0,$=R.length,G=0,te=k.length){for(;se<$&&G<te;se++,G++){let Se=R.charCodeAt(se),Ie=k.charCodeAt(G);if(Se===Ie)continue;if(Se>=128||Ie>=128)return b(R.toLowerCase(),k.toLowerCase(),se,$,G,te);I(Se)&&(Se-=32),I(Ie)&&(Ie-=32);const Ne=Se-Ie;if(Ne!==0)return Ne}const Ce=$-se,we=te-G;return Ce<we?-1:Ce>we?1:0}function I(R){return R>=97&&R<=122}function re(R){return R>=65&&R<=90}function ce(R,k){return R.length===k.length&&D(R,k)===0}function X(R,k){const se=k.length;return k.length>R.length?!1:D(R,k,0,se)===0}function q(R,k){let se,$=Math.min(R.length,k.length);for(se=0;se<$;se++)if(R.charCodeAt(se)!==k.charCodeAt(se))return se;return $}function oe(R,k){let se,$=Math.min(R.length,k.length);const G=R.length-1,te=k.length-1;for(se=0;se<$;se++)if(R.charCodeAt(G-se)!==k.charCodeAt(te-se))return se;return $}function pe(R){return 55296<=R&&R<=56319}function _e(R){return 56320<=R&&R<=57343}function j(R,k){return(R-55296<<10)+(k-56320)+65536}function K(R,k,se){const $=R.charCodeAt(se);if(pe($)&&se+1<k){const G=R.charCodeAt(se+1);if(_e(G))return j($,G)}return $}function ee(R,k){const se=R.charCodeAt(k-1);if(_e(se)&&k>1){const $=R.charCodeAt(k-2);if(pe($))return j($,se)}return se}function z(R,k){const se=ke.getInstance(),$=k,G=R.length,te=K(R,G,k);k+=te>=65536?2:1;let Ce=se.getGraphemeBreakType(te);for(;k<G;){const we=K(R,G,k),Se=se.getGraphemeBreakType(we);if(mt(Ce,Se))break;k+=we>=65536?2:1,Ce=Se}return k-$}function Ae(R,k){const se=ke.getInstance(),$=k,G=ee(R,k);k-=G>=65536?2:1;let te=se.getGraphemeBreakType(G);for(;k>0;){const Ce=ee(R,k),we=se.getGraphemeBreakType(Ce);if(mt(we,te))break;k-=Ce>=65536?2:1,te=we}return $-k}const Y=/(?:[\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 y(R){return Y.test(R)}const _=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function V(R){return _.test(R)}const de=/^[\t\n\r\x20-\x7E]*$/;function We(R){return de.test(R)}const Qe=/[\u2028\u2029]/;function ct(R){return Qe.test(R)}function Et(R){for(let k=0,se=R.length;k<se;k++)if(Mt(R.charCodeAt(k)))return!0;return!1}function Mt(R){return R=+R,R>=11904&&R<=55215||R>=63744&&R<=64255||R>=65281&&R<=65374}function Ot(R){return R>=127462&&R<=127487||R===8986||R===8987||R===9200||R===9203||R>=9728&&R<=10175||R===11088||R===11093||R>=127744&&R<=128591||R>=128640&&R<=128764||R>=128992&&R<=129003||R>=129280&&R<=129535||R>=129648&&R<=129750}const Fe="\uFEFF";function kt(R){return!!(R&&R.length>0&&R.charCodeAt(0)===65279)}function sn(R,k=!1){return R?(k&&(R=R.replace(/\\./g,"")),R.toLowerCase()!==R):!1}function jt(R){return R=R%(2*26),R<26?String.fromCharCode(97+R):String.fromCharCode(65+R-26)}function pn(R){return ke.getInstance().getGraphemeBreakType(R)}function mt(R,k){return R===0?k!==5&&k!==7:R===2&&k===3?!1:R===4||R===2||R===3||k===4||k===2||k===3?!0:!(R===8&&(k===8||k===9||k===11||k===12)||(R===11||R===9)&&(k===9||k===10)||(R===12||R===10)&&k===10||k===5||k===13||k===7||R===1||R===13&&k===14||R===6&&k===6)}class ke{constructor(){this._data=xe()}static getInstance(){return ke._INSTANCE||(ke._INSTANCE=new ke),ke._INSTANCE}getGraphemeBreakType(k){if(k<32)return k===10?3:k===13?2:4;if(k<127)return 0;const se=this._data,$=se.length/3;let G=1;for(;G<=$;)if(k<se[3*G])G=2*G;else if(k>se[3*G+1])G=2*G+1;else return se[3*G+2];return 0}}ke._INSTANCE=null;function xe(){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 W(R,k){if(R===0)return 0;const se=Re(R,k);if(se!==void 0)return se;const $=ee(k,R);return R-=$e($),R}function Re(R,k){let se=ee(k,R);for(R-=$e(se);J(se)||se===65039||se===8419;){if(R===0)return;se=ee(k,R),R-=$e(se)}if(Ot(se)){if(R>=0){const $=ee(k,R);$===8205&&(R-=$e($))}return R}}function $e(R){return R>=65536?2:1}function J(R){return 127995<=R&&R<=127999}},72999:function(Fn,st,C){"use strict";C.d(st,{$E:function(){return S},$K:function(){return ge},D8:function(){return p},HD:function(){return ae},IU:function(){return F},Jp:function(){return ie},Kn:function(){return ve},cW:function(){return B},f6:function(){return O},hj:function(){return le},jn:function(){return Q},kJ:function(){return N},mf:function(){return T},o8:function(){return h},p_:function(){return A},vE:function(){return Z}});function N(b){return Array.isArray(b)}function ae(b){return typeof b=="string"}function ve(b){return typeof b=="object"&&b!==null&&!Array.isArray(b)&&!(b instanceof RegExp)&&!(b instanceof Date)}function le(b){return typeof b=="number"&&!isNaN(b)}function Q(b){return b===!0||b===!1}function h(b){return typeof b=="undefined"}function ge(b){return!ie(b)}function ie(b){return h(b)||b===null}function A(b,L){if(!b)throw new Error(L?`Unexpected type, expected '${L}'`:"Unexpected type")}function B(b){if(ie(b))throw new Error("Assertion Failed: argument is undefined or null");return b}function T(b){return typeof b=="function"}function p(b,L){const D=Math.min(b.length,L.length);for(let I=0;I<D;I++)v(b[I],L[I])}function v(b,L){if(ae(L)){if(typeof b!==L)throw new Error(`argument does not match constraint: typeof ${L}`)}else if(T(L)){try{if(b instanceof L)return}catch(D){}if(!ie(b)&&b.constructor===L||L.length===1&&L.call(void 0,b)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function E(b){let L=[],D=Object.getPrototypeOf(b);for(;Object.prototype!==D;)L=L.concat(Object.getOwnPropertyNames(D)),D=Object.getPrototypeOf(D);return L}function S(b){const L=[];for(const D of E(b))typeof b[D]=="function"&&L.push(D);return L}function F(b,L){const D=re=>function(){const ce=Array.prototype.slice.call(arguments,0);return L(re,ce)};let I={};for(const re of b)I[re]=D(re);return I}function O(b){return b===null?void 0:b}function Z(b,L="Unreachable"){throw new Error(L)}},13268:function(Fn,st,C){"use strict";C.d(st,{N:function(){return ae}});function N(ve,le){let Q;return le.length===0?Q=ve:Q=ve.replace(/\{(\d+)\}/g,function(h,ge){const ie=ge[0];return typeof le[ie]!="undefined"?le[ie]:h}),Q}function ae(ve,le,...Q){return N(le,Q)}},96236:function(Fn,st,C){"use strict";C.d(st,{BH:function(){return F},NZ:function(){return O},U8:function(){return Z},co:function(){return S},eH:function(){return E},vr:function(){return v}});var N=C(75918),ae=C(52615),ve=C(4348),le=C(88226),Q=C(69323),h=C(34502),ge=C(35884),ie=C(90689),A=C(16925),B=C(49055),T=function(b,L,D,I){var re=arguments.length,ce=re<3?L:I===null?I=Object.getOwnPropertyDescriptor(L,D):I,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(b,L,D,I);else for(var q=b.length-1;q>=0;q--)(X=b[q])&&(ce=(re<3?X(ce):re>3?X(L,D,ce):X(L,D))||ce);return re>3&&ce&&Object.defineProperty(L,D,ce),ce},p=function(b,L){return function(D,I){L(D,I,b)}};function v(b){return b.command!==void 0}class E{constructor(L){this.id=E._idPool++,this._debugName=L}}E._idPool=0,E.CommandPalette=new E("CommandPalette"),E.EditorContext=new E("EditorContext"),E.SimpleEditorContext=new E("SimpleEditorContext"),E.EditorContextCopy=new E("EditorContextCopy"),E.EditorContextPeek=new E("EditorContextPeek"),E.MenubarEditMenu=new E("MenubarEditMenu"),E.MenubarCopy=new E("MenubarCopy"),E.MenubarGoMenu=new E("MenubarGoMenu"),E.MenubarSelectionMenu=new E("MenubarSelectionMenu"),E.InlineCompletionsActions=new E("InlineCompletionsActions");const S=(0,A.yh)("menuService"),F=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new ve.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:b=>b===E.CommandPalette}}addCommand(b){return this.addCommands(le.$.single(b))}addCommands(b){for(const L of b)this._commands.set(L.id,L);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,Q.OF)(()=>{let L=!1;for(const D of b)L=this._commands.delete(D.id)||L;L&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(b){return this._commands.get(b)}getCommands(){const b=new Map;return this._commands.forEach((L,D)=>b.set(D,L)),b}appendMenuItem(b,L){return this.appendMenuItems(le.$.single({id:b,item:L}))}appendMenuItems(b){const L=new Set,D=new h.S;for(const{id:I,item:re}of b){let ce=this._menuItems.get(I);ce||(ce=new h.S,this._menuItems.set(I,ce)),D.push(ce.push(re)),L.add(I)}return this._onDidChangeMenu.fire(L),(0,Q.OF)(()=>{if(D.size>0){for(let I of D)I();this._onDidChangeMenu.fire(L),D.clear()}})}getMenuItems(b){let L;return this._menuItems.has(b)?L=[...this._menuItems.get(b)]:L=[],b===E.CommandPalette&&this._appendImplicitItems(L),L}_appendImplicitItems(b){const L=new Set;for(const D of b)v(D)&&(L.add(D.command.id),D.alt&&L.add(D.alt.id));this._commands.forEach((D,I)=>{L.has(I)||b.push({command:D})})}};class O extends N.wY{constructor(L,D,I,re){super(`submenuitem.${L.submenu.id}`,typeof L.title=="string"?L.title:L.title.value,[],"submenu"),this.item=L,this._menuService=D,this._contextKeyService=I,this._options=re}get actions(){const L=[],D=this._menuService.createMenu(this.item.submenu,this._contextKeyService),I=D.getActions(this._options);D.dispose();for(const[,re]of I)re.length>0&&(L.push(...re),L.push(new N.Z0));return L.length&&L.pop(),L}}let Z=class sc{constructor(L,D,I,re,ce){var X,q;if(this._commandService=ce,this.id=L.id,this.label=I!=null&&I.renderShortTitle&&L.shortTitle?typeof L.shortTitle=="string"?L.shortTitle:L.shortTitle.value:typeof L.title=="string"?L.title:L.title.value,this.tooltip=(q=typeof L.tooltip=="string"?L.tooltip:(X=L.tooltip)===null||X===void 0?void 0:X.value)!==null&&q!==void 0?q:"",this.enabled=!L.precondition||re.contextMatchesRules(L.precondition),this.checked=void 0,L.toggled){const oe=L.toggled.condition?L.toggled:{condition:L.toggled};this.checked=re.contextMatchesRules(oe.condition),this.checked&&oe.tooltip&&(this.tooltip=typeof oe.tooltip=="string"?oe.tooltip:oe.tooltip.value),oe.title&&(this.label=typeof oe.title=="string"?oe.title:oe.title.value)}this.item=L,this.alt=D?new sc(D,void 0,I,re,ce):void 0,this._options=I,B.kS.isThemeIcon(L.icon)&&(this.class=ae.dT.asClassName(L.icon))}dispose(){}run(...L){var D,I;let re=[];return!((D=this._options)===null||D===void 0)&&D.arg&&(re=[...re,this._options.arg]),!((I=this._options)===null||I===void 0)&&I.shouldForwardArgs&&(re=[...re,...L]),this._commandService.executeCommand(this.id,...re)}};Z=T([p(3,ie.i6),p(4,ge.H)],Z)},35884:function(Fn,st,C){"use strict";C.d(st,{H:function(){return ge},P:function(){return ie}});var N=C(4348),ae=C(88226),ve=C(69323),le=C(34502),Q=C(72999),h=C(16925);const ge=(0,h.yh)("commandService"),ie=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new N.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(A,B){if(!A)throw new Error("invalid command");if(typeof A=="string"){if(!B)throw new Error("invalid command");return this.registerCommand({id:A,handler:B})}if(A.description){const S=[];for(let O of A.description.args)S.push(O.constraint);const F=A.handler;A.handler=function(O,...Z){return(0,Q.D8)(Z,S),F(O,...Z)}}const{id:T}=A;let p=this._commands.get(T);p||(p=new le.S,this._commands.set(T,p));let v=p.unshift(A),E=(0,ve.OF)(()=>{v();const S=this._commands.get(T);S!=null&&S.isEmpty()&&this._commands.delete(T)});return this._onDidRegisterCommand.fire(T),E}registerCommandAlias(A,B){return ie.registerCommand(A,(T,...p)=>T.get(ge).executeCommand(B,...p))}getCommand(A){const B=this._commands.get(A);if(!(!B||B.isEmpty()))return ae.$.first(B)}getCommands(){const A=new Map;for(const B of this._commands.keys()){const T=this.getCommand(B);T&&A.set(B,T)}return A}};ie.registerCommand("noop",()=>{})},90689:function(Fn,st,C){"use strict";C.d(st,{Ao:function(){return ge},Eq:function(){return j},Fb:function(){return ie},K8:function(){return z},i6:function(){return _e},uy:function(){return pe}});var N=C(23345),ae=C(82983),ve=C(16925);let le=N.WE||"";const Q=new Map;Q.set("false",!1),Q.set("true",!0),Q.set("isMac",N.dz),Q.set("isLinux",N.IJ),Q.set("isWindows",N.ED),Q.set("isWeb",N.$L),Q.set("isMacNative",N.dz&&!N.$L),Q.set("isEdge",le.indexOf("Edg/")>=0),Q.set("isFirefox",le.indexOf("Firefox")>=0),Q.set("isChrome",le.indexOf("Chrome")>=0),Q.set("isSafari",le.indexOf("Safari")>=0);const h=Object.prototype.hasOwnProperty;class ge{static has(y){return p.create(y)}static equals(y,_){return v.create(y,_)}static regex(y,_){return re.create(y,_)}static not(y){return O.create(y)}static and(...y){return q.create(y,null)}static or(...y){return oe.create(y,null,!0)}static deserialize(y,_=!1){if(y)return this._deserializeOrExpression(y,_)}static _deserializeOrExpression(y,_){let V=y.split("||");return oe.create(V.map(de=>this._deserializeAndExpression(de,_)),null,!0)}static _deserializeAndExpression(y,_){let V=y.split("&&");return q.create(V.map(de=>this._deserializeOne(de,_)),null)}static _deserializeOne(y,_){if(y=y.trim(),y.indexOf("!=")>=0){let V=y.split("!=");return F.create(V[0].trim(),this._deserializeValue(V[1],_))}if(y.indexOf("==")>=0){let V=y.split("==");return v.create(V[0].trim(),this._deserializeValue(V[1],_))}if(y.indexOf("=~")>=0){let V=y.split("=~");return re.create(V[0].trim(),this._deserializeRegexValue(V[1],_))}if(y.indexOf(" in ")>=0){let V=y.split(" in ");return E.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(y)){const V=y.split(">=");return L.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(y)){const V=y.split(">");return b.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(y)){const V=y.split("<=");return I.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(y)){const V=y.split("<");return D.create(V[0].trim(),V[1].trim())}return/^\!\s*/.test(y)?O.create(y.substr(1).trim()):p.create(y)}static _deserializeValue(y,_){if(y=y.trim(),y==="true")return!0;if(y==="false")return!1;let V=/^'([^']*)'$/.exec(y);return V?V[1].trim():y}static _deserializeRegexValue(y,_){if((0,ae.m5)(y)){if(_)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let V=y.indexOf("/"),de=y.lastIndexOf("/");if(V===de||V<0){if(_)throw new Error(`bad regexp-value '${y}', missing /-enclosure`);return console.warn(`bad regexp-value '${y}', missing /-enclosure`),null}let We=y.slice(V+1,de),Qe=y[de+1]==="i"?"i":"";try{return new RegExp(We,Qe)}catch(ct){if(_)throw new Error(`bad regexp-value '${y}', parse error: ${ct}`);return console.warn(`bad regexp-value '${y}', parse error: ${ct}`),null}}}function ie(Y,y){const _=Y?Y.substituteConstants():void 0,V=y?y.substituteConstants():void 0;return!_&&!V?!0:!_||!V?!1:_.equals(V)}function A(Y,y){return Y.cmp(y)}class B{constructor(){this.type=0}cmp(y){return this.type-y.type}equals(y){return y.type===this.type}substituteConstants(){return this}evaluate(y){return!1}serialize(){return"false"}keys(){return[]}negate(){return T.INSTANCE}}B.INSTANCE=new B;class T{constructor(){this.type=1}cmp(y){return this.type-y.type}equals(y){return y.type===this.type}substituteConstants(){return this}evaluate(y){return!0}serialize(){return"true"}keys(){return[]}negate(){return B.INSTANCE}}T.INSTANCE=new T;class p{constructor(y,_){this.key=y,this.negated=_,this.type=2}static create(y,_=null){const V=Q.get(y);return typeof V=="boolean"?V?T.INSTANCE:B.INSTANCE:new p(y,_)}cmp(y){return y.type!==this.type?this.type-y.type:K(this.key,y.key)}equals(y){return y.type===this.type?this.key===y.key:!1}substituteConstants(){const y=Q.get(this.key);return typeof y=="boolean"?y?T.INSTANCE:B.INSTANCE:this}evaluate(y){return!!y.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this)),this.negated}}class v{constructor(y,_,V){this.key=y,this.value=_,this.negated=V,this.type=4}static create(y,_,V=null){if(typeof _=="boolean")return _?p.create(y,V):O.create(y,V);const de=Q.get(y);return typeof de=="boolean"?_===(de?"true":"false")?T.INSTANCE:B.INSTANCE:new v(y,_,V)}cmp(y){return y.type!==this.type?this.type-y.type:ee(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){const y=Q.get(this.key);if(typeof y=="boolean"){const _=y?"true":"false";return this.value===_?T.INSTANCE:B.INSTANCE}return this}evaluate(y){return y.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 E{constructor(y,_){this.key=y,this.valueKey=_,this.type=10,this.negated=null}static create(y,_){return new E(y,_)}cmp(y){return y.type!==this.type?this.type-y.type:ee(this.key,this.valueKey,y.key,y.valueKey)}equals(y){return y.type===this.type?this.key===y.key&&this.valueKey===y.valueKey:!1}substituteConstants(){return this}evaluate(y){const _=y.getValue(this.valueKey),V=y.getValue(this.key);return Array.isArray(_)?_.indexOf(V)>=0:typeof V=="string"&&typeof _=="object"&&_!==null?h.call(_,V):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=S.create(this)),this.negated}}class S{constructor(y){this._actual=y,this.type=11}static create(y){return new S(y)}cmp(y){return y.type!==this.type?this.type-y.type:this._actual.cmp(y._actual)}equals(y){return y.type===this.type?this._actual.equals(y._actual):!1}substituteConstants(){return this}evaluate(y){return!this._actual.evaluate(y)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class F{constructor(y,_,V){this.key=y,this.value=_,this.negated=V,this.type=5}static create(y,_,V=null){if(typeof _=="boolean")return _?O.create(y,V):p.create(y,V);const de=Q.get(y);return typeof de=="boolean"?_===(de?"true":"false")?B.INSTANCE:T.INSTANCE:new F(y,_,V)}cmp(y){return y.type!==this.type?this.type-y.type:ee(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){const y=Q.get(this.key);if(typeof y=="boolean"){const _=y?"true":"false";return this.value===_?B.INSTANCE:T.INSTANCE}return this}evaluate(y){return y.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this.value,this)),this.negated}}class O{constructor(y,_){this.key=y,this.negated=_,this.type=3}static create(y,_=null){const V=Q.get(y);return typeof V=="boolean"?V?B.INSTANCE:T.INSTANCE:new O(y,_)}cmp(y){return y.type!==this.type?this.type-y.type:K(this.key,y.key)}equals(y){return y.type===this.type?this.key===y.key:!1}substituteConstants(){const y=Q.get(this.key);return typeof y=="boolean"?y?B.INSTANCE:T.INSTANCE:this}evaluate(y){return!y.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this)),this.negated}}function Z(Y,y){if(typeof Y=="string"){const _=parseFloat(Y);isNaN(_)||(Y=_)}return typeof Y=="string"||typeof Y=="number"?y(Y):B.INSTANCE}class b{constructor(y,_,V){this.key=y,this.value=_,this.negated=V,this.type=12}static create(y,_,V=null){return Z(_,de=>new b(y,de,V))}cmp(y){return y.type!==this.type?this.type-y.type:ee(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.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 L{constructor(y,_,V){this.key=y,this.value=_,this.negated=V,this.type=13}static create(y,_,V=null){return Z(_,de=>new L(y,de,V))}cmp(y){return y.type!==this.type?this.type-y.type:ee(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}class D{constructor(y,_,V){this.key=y,this.value=_,this.negated=V,this.type=14}static create(y,_,V=null){return Z(_,de=>new D(y,de,V))}cmp(y){return y.type!==this.type?this.type-y.type:ee(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L.create(this.key,this.value,this)),this.negated}}class I{constructor(y,_,V){this.key=y,this.value=_,this.negated=V,this.type=15}static create(y,_,V=null){return Z(_,de=>new I(y,de,V))}cmp(y){return y.type!==this.type?this.type-y.type:ee(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class re{constructor(y,_){this.key=y,this.regexp=_,this.type=7,this.negated=null}static create(y,_){return new re(y,_)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.key<y.key)return-1;if(this.key>y.key)return 1;const _=this.regexp?this.regexp.source:"",V=y.regexp?y.regexp.source:"";return _<V?-1:_>V?1:0}equals(y){if(y.type===this.type){const _=this.regexp?this.regexp.source:"",V=y.regexp?y.regexp.source:"";return this.key===y.key&&_===V}return!1}substituteConstants(){return this}evaluate(y){let _=y.getValue(this.key);return this.regexp?this.regexp.test(_):!1}serialize(){const y=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${y}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ce.create(this)),this.negated}}class ce{constructor(y){this._actual=y,this.type=8}static create(y){return new ce(y)}cmp(y){return y.type!==this.type?this.type-y.type:this._actual.cmp(y._actual)}equals(y){return y.type===this.type?this._actual.equals(y._actual):!1}substituteConstants(){return this}evaluate(y){return!this._actual.evaluate(y)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function X(Y){let y=null;for(let _=0,V=Y.length;_<V;_++){const de=Y[_].substituteConstants();if(Y[_]!==de&&y===null){y=[];for(let We=0;We<_;We++)y[We]=Y[We]}y!==null&&(y[_]=de)}return y===null?Y:y}class q{constructor(y,_){this.expr=y,this.negated=_,this.type=6}static create(y,_){return q._normalizeArr(y,_)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.expr.length<y.expr.length)return-1;if(this.expr.length>y.expr.length)return 1;for(let _=0,V=this.expr.length;_<V;_++){const de=A(this.expr[_],y.expr[_]);if(de!==0)return de}return 0}equals(y){if(y.type===this.type){if(this.expr.length!==y.expr.length)return!1;for(let _=0,V=this.expr.length;_<V;_++)if(!this.expr[_].equals(y.expr[_]))return!1;return!0}return!1}substituteConstants(){const y=X(this.expr);return y===this.expr?this:q.create(y,this.negated)}evaluate(y){for(let _=0,V=this.expr.length;_<V;_++)if(!this.expr[_].evaluate(y))return!1;return!0}static _normalizeArr(y,_){const V=[];let de=!1;for(const We of y)if(We){if(We.type===1){de=!0;continue}if(We.type===0)return B.INSTANCE;if(We.type===6){V.push(...We.expr);continue}V.push(We)}if(V.length===0&&de)return T.INSTANCE;if(V.length!==0){if(V.length===1)return V[0];V.sort(A);for(let We=1;We<V.length;We++)V[We-1].equals(V[We])&&(V.splice(We,1),We--);if(V.length===1)return V[0];for(;V.length>1;){const We=V[V.length-1];if(We.type!==9)break;V.pop();const Qe=V.pop(),ct=V.length===0,Et=oe.create(We.expr.map(Mt=>q.create([Mt,Qe],null)),null,ct);Et&&(V.push(Et),V.sort(A))}return V.length===1?V[0]:new q(V,_)}}serialize(){return this.expr.map(y=>y.serialize()).join(" && ")}keys(){const y=[];for(let _ of this.expr)y.push(..._.keys());return y}negate(){if(!this.negated){const y=[];for(let _ of this.expr)y.push(_.negate());this.negated=oe.create(y,this,!0)}return this.negated}}class oe{constructor(y,_){this.expr=y,this.negated=_,this.type=9}static create(y,_,V){return oe._normalizeArr(y,_,V)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.expr.length<y.expr.length)return-1;if(this.expr.length>y.expr.length)return 1;for(let _=0,V=this.expr.length;_<V;_++){const de=A(this.expr[_],y.expr[_]);if(de!==0)return de}return 0}equals(y){if(y.type===this.type){if(this.expr.length!==y.expr.length)return!1;for(let _=0,V=this.expr.length;_<V;_++)if(!this.expr[_].equals(y.expr[_]))return!1;return!0}return!1}substituteConstants(){const y=X(this.expr);return y===this.expr?this:oe.create(y,this.negated,!1)}evaluate(y){for(let _=0,V=this.expr.length;_<V;_++)if(this.expr[_].evaluate(y))return!0;return!1}static _normalizeArr(y,_,V){let de=[],We=!1;if(y){for(let Qe=0,ct=y.length;Qe<ct;Qe++){const Et=y[Qe];if(Et){if(Et.type===0){We=!0;continue}if(Et.type===1)return T.INSTANCE;if(Et.type===9){de=de.concat(Et.expr);continue}de.push(Et)}}if(de.length===0&&We)return B.INSTANCE;de.sort(A)}if(de.length!==0){if(de.length===1)return de[0];for(let Qe=1;Qe<de.length;Qe++)de[Qe-1].equals(de[Qe])&&(de.splice(Qe,1),Qe--);if(de.length===1)return de[0];if(V){for(let Qe=0;Qe<de.length;Qe++)for(let ct=Qe+1;ct<de.length;ct++)z(de[Qe],de[ct])&&(de.splice(ct,1),ct--);if(de.length===1)return de[0]}return new oe(de,_)}}serialize(){return this.expr.map(y=>y.serialize()).join(" || ")}keys(){const y=[];for(let _ of this.expr)y.push(..._.keys());return y}negate(){if(!this.negated){let y=[];for(let _ of this.expr)y.push(_.negate());for(;y.length>1;){const _=y.shift(),V=y.shift(),de=[];for(const Qe of Ae(_))for(const ct of Ae(V))de.push(q.create([Qe,ct],null));const We=y.length===0;y.unshift(oe.create(de,null,We))}this.negated=y[0]}return this.negated}}class pe extends p{constructor(y,_,V){super(y,null),this._defaultValue=_,typeof V=="object"?pe._info.push(Object.assign(Object.assign({},V),{key:y})):V!==!0&&pe._info.push({key:y,description:V,type:_!=null?typeof _:void 0})}static all(){return pe._info.values()}bindTo(y){return y.createKey(this.key,this._defaultValue)}getValue(y){return y.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(y){return v.create(this.key,y)}}pe._info=[];const _e=(0,ve.yh)("contextKeyService"),j="setContext";function K(Y,y){return Y<y?-1:Y>y?1:0}function ee(Y,y,_,V){return Y<_?-1:Y>_?1:y<V?-1:y>V?1:0}function z(Y,y){if(y.type===6&&Y.type!==9&&Y.type!==6){for(const de of y.expr)if(Y.equals(de))return!0}const _=Y.negate(),V=Ae(_).concat(Ae(y));V.sort(A);for(let de=0;de<V.length;de++){const Qe=V[de].negate();for(let ct=de+1;ct<V.length;ct++){const Et=V[ct];if(Qe.equals(Et))return!0}}return!1}function Ae(Y){return Y.type===9?Y.expr:[Y]}},16925:function(Fn,st,C){"use strict";C.d(st,{I8:function(){return N},TG:function(){return ae},jt:function(){return Q},yh:function(){return le}});var N;(function(h){h.serviceIds=new Map,h.DI_TARGET="$di$target",h.DI_DEPENDENCIES="$di$dependencies";function ge(ie){return ie[h.DI_DEPENDENCIES]||[]}h.getServiceDependencies=ge})(N||(N={}));const ae=le("instantiationService");function ve(h,ge,ie,A){ge[N.DI_TARGET]===ge?ge[N.DI_DEPENDENCIES].push({id:h,index:ie,optional:A}):(ge[N.DI_DEPENDENCIES]=[{id:h,index:ie,optional:A}],ge[N.DI_TARGET]=ge)}function le(h){if(N.serviceIds.has(h))return N.serviceIds.get(h);const ge=function(ie,A,B){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ve(ge,ie,B,!1)};return ge.toString=()=>h,N.serviceIds.set(h,ge),ge}function Q(h){return function(ge,ie,A){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");ve(h,ge,A,!0)}}},44650:function(Fn,st,C){"use strict";C.d(st,{B:function(){return le}});var N=C(76068),ae=C(72999);class ve{constructor(){this.data=new Map}add(h,ge){N.ok(ae.HD(h)),N.ok(ae.Kn(ge)),N.ok(!this.data.has(h),"There is already an extension with this id"),this.data.set(h,ge)}as(h){return this.data.get(h)||null}}const le=new ve},66213:function(Fn,st,C){"use strict";C.d(st,{e:function(){return N}});var N;(function(ae){ae.DARK="dark",ae.LIGHT="light",ae.HIGH_CONTRAST="hc"})(N||(N={}))},49055:function(Fn,st,C){"use strict";C.d(st,{EN:function(){return A},IP:function(){return p},Ic:function(){return S},XE:function(){return ge},bB:function(){return F},kS:function(){return B},m6:function(){return T}});var N=C(52615),ae=C(4348),ve=C(69323),le=C(16925),Q=C(44650),h=C(66213);const ge=(0,le.yh)("themeService");var ie;(function(O){function Z(b){return b&&typeof b=="object"&&typeof b.id=="string"}O.isThemeColor=Z})(ie||(ie={}));function A(O){return{id:O}}var B;(function(O){function Z(ce){return ce&&typeof ce=="object"&&typeof ce.id=="string"&&(typeof ce.color=="undefined"||ie.isThemeColor(ce.color))}O.isThemeIcon=Z;const b=new RegExp(`^\\$\\((${N.dT.iconNameExpression}(?:${N.dT.iconModifierExpression})?)\\)$`);function L(ce){const X=b.exec(ce);if(!X)return;let[,q]=X;return{id:q}}O.fromString=L;function D(ce,X){let q=ce.id;const oe=q.lastIndexOf("~");return oe!==-1&&(q=q.substring(0,oe)),X&&(q=`${q}~${X}`),{id:q}}O.modify=D;function I(ce,X){var q,oe;return ce.id===X.id&&((q=ce.color)===null||q===void 0?void 0:q.id)===((oe=X.color)===null||oe===void 0?void 0:oe.id)}O.isEqual=I;function re(ce,X){return{id:ce.id,color:X?A(X):void 0}}O.asThemeIcon=re,O.asClassNameArray=N.dT.asClassNameArray,O.asClassName=N.dT.asClassName,O.asCSSSelector=N.dT.asCSSSelector})(B||(B={}));function T(O){switch(O){case h.e.DARK:return"vs-dark";case h.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const p={ThemingContribution:"base.contributions.theming"};class v{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new ae.Q5}onColorThemeChange(Z){return this.themingParticipants.push(Z),this.onThemingParticipantAddedEmitter.fire(Z),(0,ve.OF)(()=>{const b=this.themingParticipants.indexOf(Z);this.themingParticipants.splice(b,1)})}getThemingParticipants(){return this.themingParticipants}}let E=new v;Q.B.add(p.ThemingContribution,E);function S(O){return E.onColorThemeChange(O)}class F extends ve.JT{constructor(Z){super(),this.themeService=Z,this.theme=Z.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(b=>this.onThemeChange(b)))}onThemeChange(Z){this.theme=Z,this.updateStyles()}updateStyles(){}}},16632:function(Fn,st,C){"use strict";var N=C(14809),ae=C(20439),ve=C(4635),le=C(50298),Q=C(62646),h=C(92310),ge=C.n(h),ie=C(18929),A=C(59301),B=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],T=(0,A.forwardRef)(function(p,v){var E=p.prefixCls,S=E===void 0?"rc-checkbox":E,F=p.className,O=p.style,Z=p.checked,b=p.disabled,L=p.defaultChecked,D=L===void 0?!1:L,I=p.type,re=I===void 0?"checkbox":I,ce=p.title,X=p.onChange,q=(0,Q.Z)(p,B),oe=(0,A.useRef)(null),pe=(0,A.useRef)(null),_e=(0,ie.Z)(D,{value:Z}),j=(0,le.Z)(_e,2),K=j[0],ee=j[1];(0,A.useImperativeHandle)(v,function(){return{focus:function(y){var _;(_=oe.current)===null||_===void 0||_.focus(y)},blur:function(){var y;(y=oe.current)===null||y===void 0||y.blur()},input:oe.current,nativeElement:pe.current}});var z=ge()(S,F,(0,ve.Z)((0,ve.Z)({},"".concat(S,"-checked"),K),"".concat(S,"-disabled"),b)),Ae=function(y){b||("checked"in p||ee(y.target.checked),X==null||X({target:(0,ae.Z)((0,ae.Z)({},p),{},{type:re,checked:y.target.checked}),stopPropagation:function(){y.stopPropagation()},preventDefault:function(){y.preventDefault()},nativeEvent:y.nativeEvent}))};return A.createElement("span",{className:z,title:ce,style:O,ref:pe},A.createElement("input",(0,N.Z)({},q,{className:"".concat(S,"-input"),ref:oe,onChange:Ae,disabled:b,checked:!!K,type:re})),A.createElement("span",{className:"".concat(S,"-inner")}))});st.Z=T},96478:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return ce}});var N=C(14809),ae=C(4635),ve=C(50298),le=C(62646),Q=C(65966),h=C(92310),ge=C.n(h),ie=C(8654),A=C(59301),B=C(10228),T=C(16089),p=B.Z.ESC,v=B.Z.TAB;function E(X){var q=X.visible,oe=X.triggerRef,pe=X.onVisibleChange,_e=X.autoFocus,j=X.overlayRef,K=A.useRef(!1),ee=function(){if(q){var y,_;(y=oe.current)===null||y===void 0||(_=y.focus)===null||_===void 0||_.call(y),pe==null||pe(!1)}},z=function(){var y;return(y=j.current)!==null&&y!==void 0&&y.focus?(j.current.focus(),K.current=!0,!0):!1},Ae=function(y){switch(y.keyCode){case p:ee();break;case v:{var _=!1;K.current||(_=z()),_?y.preventDefault():ee();break}}};A.useEffect(function(){return q?(window.addEventListener("keydown",Ae),_e&&(0,T.Z)(z,3),function(){window.removeEventListener("keydown",Ae),K.current=!1}):function(){K.current=!1}},[q])}var S=(0,A.forwardRef)(function(X,q){var oe=X.overlay,pe=X.arrow,_e=X.prefixCls,j=(0,A.useMemo)(function(){var ee;return typeof oe=="function"?ee=oe():ee=oe,ee},[oe]),K=(0,ie.sQ)(q,(0,ie.C4)(j));return A.createElement(A.Fragment,null,pe&&A.createElement("div",{className:"".concat(_e,"-arrow")}),A.cloneElement(j,{ref:(0,ie.Yr)(j)?K:void 0}))}),F=S,O={adjustX:1,adjustY:1},Z=[0,0],b={topLeft:{points:["bl","tl"],overflow:O,offset:[0,-4],targetOffset:Z},top:{points:["bc","tc"],overflow:O,offset:[0,-4],targetOffset:Z},topRight:{points:["br","tr"],overflow:O,offset:[0,-4],targetOffset:Z},bottomLeft:{points:["tl","bl"],overflow:O,offset:[0,4],targetOffset:Z},bottom:{points:["tc","bc"],overflow:O,offset:[0,4],targetOffset:Z},bottomRight:{points:["tr","br"],overflow:O,offset:[0,4],targetOffset:Z}},L=b,D=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function I(X,q){var oe,pe=X.arrow,_e=pe===void 0?!1:pe,j=X.prefixCls,K=j===void 0?"rc-dropdown":j,ee=X.transitionName,z=X.animation,Ae=X.align,Y=X.placement,y=Y===void 0?"bottomLeft":Y,_=X.placements,V=_===void 0?L:_,de=X.getPopupContainer,We=X.showAction,Qe=X.hideAction,ct=X.overlayClassName,Et=X.overlayStyle,Mt=X.visible,Ot=X.trigger,Fe=Ot===void 0?["hover"]:Ot,kt=X.autoFocus,sn=X.overlay,jt=X.children,pn=X.onVisibleChange,mt=(0,le.Z)(X,D),ke=A.useState(),xe=(0,ve.Z)(ke,2),W=xe[0],Re=xe[1],$e="visible"in X?Mt:W,J=A.useRef(null),R=A.useRef(null),k=A.useRef(null);A.useImperativeHandle(q,function(){return J.current});var se=function(qe){Re(qe),pn==null||pn(qe)};E({visible:$e,triggerRef:k,onVisibleChange:se,autoFocus:kt,overlayRef:R});var $=function(qe){var et=X.onOverlayClick;Re(!1),et&&et(qe)},G=function(){return A.createElement(F,{ref:R,overlay:sn,prefixCls:K,arrow:_e})},te=function(){return typeof sn=="function"?G:G()},Ce=function(){var qe=X.minOverlayWidthMatchTrigger,et=X.alignPoint;return"minOverlayWidthMatchTrigger"in X?qe:!et},we=function(){var qe=X.openClassName;return qe!==void 0?qe:"".concat(K,"-open")},Se=A.cloneElement(jt,{className:ge()((oe=jt.props)===null||oe===void 0?void 0:oe.className,$e&&we()),ref:(0,ie.Yr)(jt)?(0,ie.sQ)(k,(0,ie.C4)(jt)):void 0}),Ie=Qe;return!Ie&&Fe.indexOf("contextMenu")!==-1&&(Ie=["click"]),A.createElement(Q.Z,(0,N.Z)({builtinPlacements:V},mt,{prefixCls:K,ref:J,popupClassName:ge()(ct,(0,ae.Z)({},"".concat(K,"-show-arrow"),_e)),popupStyle:Et,action:Fe,showAction:We,hideAction:Ie,popupPlacement:y,popupAlign:Ae,popupTransitionName:ee,popupAnimation:z,popupVisible:$e,stretch:Ce()?"minWidth":"",popup:te(),onPopupVisibleChange:se,onPopupClick:$,getPopupContainer:de}),Se)}var re=A.forwardRef(I),ce=re},66003:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return ge}});var N=C(62646),ae=C(20439),ve=C(93664),le=C(59301),Q=["show"];function h(ie,A){if(!A.max)return!0;var B=A.strategy(ie);return B<=A.max}function ge(ie,A){return le.useMemo(function(){var B={};A&&(B.show=(0,ve.Z)(A)==="object"&&A.formatter?A.formatter:!!A),B=(0,ae.Z)((0,ae.Z)({},B),ie);var T=B,p=T.show,v=(0,N.Z)(T,Q);return(0,ae.Z)((0,ae.Z)({},v),{},{show:!!p,showFormatter:typeof p=="function"?p:void 0,strategy:v.strategy||function(E){return E.length}})},[ie,A])}},36901:function(Fn,st,C){"use strict";C.r(st),C.d(st,{BaseInput:function(){return B},default:function(){return L}});var N=C(20439),ae=C(14809),ve=C(4635),le=C(93664),Q=C(92310),h=C.n(Q),ge=C(59301),ie=C(30292),A=ge.forwardRef(function(D,I){var re,ce,X,q=D.inputElement,oe=D.children,pe=D.prefixCls,_e=D.prefix,j=D.suffix,K=D.addonBefore,ee=D.addonAfter,z=D.className,Ae=D.style,Y=D.disabled,y=D.readOnly,_=D.focused,V=D.triggerFocus,de=D.allowClear,We=D.value,Qe=D.handleReset,ct=D.hidden,Et=D.classes,Mt=D.classNames,Ot=D.dataAttrs,Fe=D.styles,kt=D.components,sn=D.onClear,jt=oe!=null?oe:q,pn=(kt==null?void 0:kt.affixWrapper)||"span",mt=(kt==null?void 0:kt.groupWrapper)||"span",ke=(kt==null?void 0:kt.wrapper)||"span",xe=(kt==null?void 0:kt.groupAddon)||"span",W=(0,ge.useRef)(null),Re=function(Kt){var Ct;(Ct=W.current)!==null&&Ct!==void 0&&Ct.contains(Kt.target)&&(V==null||V())},$e=(0,ie.X3)(D),J=(0,ge.cloneElement)(jt,{value:We,className:h()((re=jt.props)===null||re===void 0?void 0:re.className,!$e&&(Mt==null?void 0:Mt.variant))||null}),R=(0,ge.useRef)(null);if(ge.useImperativeHandle(I,function(){return{nativeElement:R.current||W.current}}),$e){var k=null;if(de){var se=!Y&&!y&&We,$="".concat(pe,"-clear-icon"),G=(0,le.Z)(de)==="object"&&de!==null&&de!==void 0&&de.clearIcon?de.clearIcon:"\u2716";k=ge.createElement("button",{type:"button",tabIndex:-1,onClick:function(Kt){Qe==null||Qe(Kt),sn==null||sn()},onMouseDown:function(Kt){return Kt.preventDefault()},className:h()($,(0,ve.Z)((0,ve.Z)({},"".concat($,"-hidden"),!se),"".concat($,"-has-suffix"),!!j))},G)}var te="".concat(pe,"-affix-wrapper"),Ce=h()(te,(0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(pe,"-disabled"),Y),"".concat(te,"-disabled"),Y),"".concat(te,"-focused"),_),"".concat(te,"-readonly"),y),"".concat(te,"-input-with-clear-btn"),j&&de&&We),Et==null?void 0:Et.affixWrapper,Mt==null?void 0:Mt.affixWrapper,Mt==null?void 0:Mt.variant),we=(j||de)&&ge.createElement("span",{className:h()("".concat(pe,"-suffix"),Mt==null?void 0:Mt.suffix),style:Fe==null?void 0:Fe.suffix},k,j);J=ge.createElement(pn,(0,ae.Z)({className:Ce,style:Fe==null?void 0:Fe.affixWrapper,onClick:Re},Ot==null?void 0:Ot.affixWrapper,{ref:W}),_e&&ge.createElement("span",{className:h()("".concat(pe,"-prefix"),Mt==null?void 0:Mt.prefix),style:Fe==null?void 0:Fe.prefix},_e),J,we)}if((0,ie.He)(D)){var Se="".concat(pe,"-group"),Ie="".concat(Se,"-addon"),Ne="".concat(Se,"-wrapper"),qe=h()("".concat(pe,"-wrapper"),Se,Et==null?void 0:Et.wrapper,Mt==null?void 0:Mt.wrapper),et=h()(Ne,(0,ve.Z)({},"".concat(Ne,"-disabled"),Y),Et==null?void 0:Et.group,Mt==null?void 0:Mt.groupWrapper);J=ge.createElement(mt,{className:et,ref:R},ge.createElement(ke,{className:qe},K&&ge.createElement(xe,{className:Ie},K),J,ee&&ge.createElement(xe,{className:Ie},ee)))}return ge.cloneElement(J,{className:h()((ce=J.props)===null||ce===void 0?void 0:ce.className,z)||null,style:(0,N.Z)((0,N.Z)({},(X=J.props)===null||X===void 0?void 0:X.style),Ae),hidden:ct})}),B=A,T=C(95190),p=C(50298),v=C(62646),E=C(18929),S=C(2738),F=C(66003),O=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],Z=(0,ge.forwardRef)(function(D,I){var re=D.autoComplete,ce=D.onChange,X=D.onFocus,q=D.onBlur,oe=D.onPressEnter,pe=D.onKeyDown,_e=D.onKeyUp,j=D.prefixCls,K=j===void 0?"rc-input":j,ee=D.disabled,z=D.htmlSize,Ae=D.className,Y=D.maxLength,y=D.suffix,_=D.showCount,V=D.count,de=D.type,We=de===void 0?"text":de,Qe=D.classes,ct=D.classNames,Et=D.styles,Mt=D.onCompositionStart,Ot=D.onCompositionEnd,Fe=(0,v.Z)(D,O),kt=(0,ge.useState)(!1),sn=(0,p.Z)(kt,2),jt=sn[0],pn=sn[1],mt=(0,ge.useRef)(!1),ke=(0,ge.useRef)(!1),xe=(0,ge.useRef)(null),W=(0,ge.useRef)(null),Re=function(mn){xe.current&&(0,ie.nH)(xe.current,mn)},$e=(0,E.Z)(D.defaultValue,{value:D.value}),J=(0,p.Z)($e,2),R=J[0],k=J[1],se=R==null?"":String(R),$=(0,ge.useState)(null),G=(0,p.Z)($,2),te=G[0],Ce=G[1],we=(0,F.Z)(V,_),Se=we.max||Y,Ie=we.strategy(se),Ne=!!Se&&Ie>Se;(0,ge.useImperativeHandle)(I,function(){var Gt;return{focus:Re,blur:function(){var Ye;(Ye=xe.current)===null||Ye===void 0||Ye.blur()},setSelectionRange:function(Ye,Ge,He){var ne;(ne=xe.current)===null||ne===void 0||ne.setSelectionRange(Ye,Ge,He)},select:function(){var Ye;(Ye=xe.current)===null||Ye===void 0||Ye.select()},input:xe.current,nativeElement:((Gt=W.current)===null||Gt===void 0?void 0:Gt.nativeElement)||xe.current}}),(0,ge.useEffect)(function(){ke.current&&(ke.current=!1),pn(function(Gt){return Gt&&ee?!1:Gt})},[ee]);var qe=function(mn,Ye,Ge){var He=Ye;if(!mt.current&&we.exceedFormatter&&we.max&&we.strategy(Ye)>we.max){if(He=we.exceedFormatter(Ye,{max:we.max}),Ye!==He){var ne,fe;Ce([((ne=xe.current)===null||ne===void 0?void 0:ne.selectionStart)||0,((fe=xe.current)===null||fe===void 0?void 0:fe.selectionEnd)||0])}}else if(Ge.source==="compositionEnd")return;k(He),xe.current&&(0,ie.rJ)(xe.current,mn,ce,He)};(0,ge.useEffect)(function(){if(te){var Gt;(Gt=xe.current)===null||Gt===void 0||Gt.setSelectionRange.apply(Gt,(0,T.Z)(te))}},[te]);var et=function(mn){qe(mn,mn.target.value,{source:"change"})},ft=function(mn){mt.current=!1,qe(mn,mn.currentTarget.value,{source:"compositionEnd"}),Ot==null||Ot(mn)},Kt=function(mn){oe&&mn.key==="Enter"&&!ke.current&&(ke.current=!0,oe(mn)),pe==null||pe(mn)},Ct=function(mn){mn.key==="Enter"&&(ke.current=!1),_e==null||_e(mn)},vt=function(mn){pn(!0),X==null||X(mn)},en=function(mn){ke.current&&(ke.current=!1),pn(!1),q==null||q(mn)},on=function(mn){k(""),Re(),xe.current&&(0,ie.rJ)(xe.current,mn,ce)},Vt=Ne&&"".concat(K,"-out-of-range"),gn=function(){var mn=(0,S.Z)(D,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return ge.createElement("input",(0,ae.Z)({autoComplete:re},mn,{onChange:et,onFocus:vt,onBlur:en,onKeyDown:Kt,onKeyUp:Ct,className:h()(K,(0,ve.Z)({},"".concat(K,"-disabled"),ee),ct==null?void 0:ct.input),style:Et==null?void 0:Et.input,ref:xe,size:z,type:We,onCompositionStart:function(Ge){mt.current=!0,Mt==null||Mt(Ge)},onCompositionEnd:ft}))},Pn=function(){var mn=Number(Se)>0;if(y||we.show){var Ye=we.showFormatter?we.showFormatter({value:se,count:Ie,maxLength:Se}):"".concat(Ie).concat(mn?" / ".concat(Se):"");return ge.createElement(ge.Fragment,null,we.show&&ge.createElement("span",{className:h()("".concat(K,"-show-count-suffix"),(0,ve.Z)({},"".concat(K,"-show-count-has-suffix"),!!y),ct==null?void 0:ct.count),style:(0,N.Z)({},Et==null?void 0:Et.count)},Ye),y)}return null};return ge.createElement(B,(0,ae.Z)({},Fe,{prefixCls:K,className:h()(Ae,Vt),handleReset:on,value:se,focused:jt,triggerFocus:Re,suffix:Pn(),disabled:ee,classes:Qe,classNames:ct,styles:Et}),gn())}),b=Z,L=b},30292:function(Fn,st,C){"use strict";C.d(st,{He:function(){return N},X3:function(){return ae},nH:function(){return Q},rJ:function(){return le}});function N(h){return!!(h.addonBefore||h.addonAfter)}function ae(h){return!!(h.prefix||h.suffix||h.allowClear)}function ve(h,ge,ie){var A=ge.cloneNode(!0),B=Object.create(h,{target:{value:A},currentTarget:{value:A}});return A.value=ie,typeof ge.selectionStart=="number"&&typeof ge.selectionEnd=="number"&&(A.selectionStart=ge.selectionStart,A.selectionEnd=ge.selectionEnd),A.setSelectionRange=function(){ge.setSelectionRange.apply(ge,arguments)},B}function le(h,ge,ie,A){if(ie){var B=ge;if(ge.type==="click"){B=ve(ge,h,""),ie(B);return}if(h.type!=="file"&&A!==void 0){B=ve(ge,h,A),ie(B);return}ie(B)}}function Q(h,ge){if(h){h.focus(ge);var ie=ge||{},A=ie.cursor;if(A){var B=h.value.length;switch(A){case"start":h.setSelectionRange(0,0);break;case"end":h.setSelectionRange(B,B);break;default:h.setSelectionRange(0,B)}}}}},28321:function(Fn,st,C){"use strict";C.d(st,{iz:function(){return je},ck:function(){return He},BW:function(){return An},sN:function(){return He},Wd:function(){return vr},ZP:function(){return $t},Xl:function(){return oe}});var N=C(14809),ae=C(4635),ve=C(20439),le=C(95190),Q=C(50298),h=C(62646),ge=C(92310),ie=C.n(ge),A=C(11780),B=C(18929),T=C(13697),p=C(48736),v=C(59301),E=C(4676),S=v.createContext(null);function F(Le,Xe){return Le===void 0?null:"".concat(Le,"-").concat(Xe)}function O(Le){var Xe=v.useContext(S);return F(Xe,Le)}var Z=C(80547),b=["children","locked"],L=v.createContext(null);function D(Le,Xe){var gt=(0,ve.Z)({},Le);return Object.keys(Xe).forEach(function(_t){var Qt=Xe[_t];Qt!==void 0&&(gt[_t]=Qt)}),gt}function I(Le){var Xe=Le.children,gt=Le.locked,_t=(0,h.Z)(Le,b),Qt=v.useContext(L),Xt=(0,Z.Z)(function(){return D(Qt,_t)},[Qt,_t],function(Rt,Jt){return!gt&&(Rt[0]!==Jt[0]||!(0,T.Z)(Rt[1],Jt[1],!0))});return v.createElement(L.Provider,{value:Xt},Xe)}var re=[],ce=v.createContext(null);function X(){return v.useContext(ce)}var q=v.createContext(re);function oe(Le){var Xe=v.useContext(q);return v.useMemo(function(){return Le!==void 0?[].concat((0,le.Z)(Xe),[Le]):Xe},[Xe,Le])}var pe=v.createContext(null),_e=v.createContext({}),j=_e,K=C(29194);function ee(Le){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,K.Z)(Le)){var gt=Le.nodeName.toLowerCase(),_t=["input","select","textarea","button"].includes(gt)||Le.isContentEditable||gt==="a"&&!!Le.getAttribute("href"),Qt=Le.getAttribute("tabindex"),Xt=Number(Qt),Rt=null;return Qt&&!Number.isNaN(Xt)?Rt=Xt:_t&&Rt===null&&(Rt=0),_t&&Le.disabled&&(Rt=null),Rt!==null&&(Rt>=0||Xe&&Rt<0)}return!1}function z(Le){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,gt=(0,le.Z)(Le.querySelectorAll("*")).filter(function(_t){return ee(_t,Xe)});return ee(Le,Xe)&>.unshift(Le),gt}var Ae=null;function Y(){Ae=document.activeElement}function y(){Ae=null}function _(){if(Ae)try{Ae.focus()}catch(Le){}}function V(Le,Xe){if(Xe.keyCode===9){var gt=z(Le),_t=gt[Xe.shiftKey?0:gt.length-1],Qt=_t===document.activeElement||Le===document.activeElement;if(Qt){var Xt=gt[Xe.shiftKey?gt.length-1:0];Xt.focus(),Xe.preventDefault()}}}var de=C(10228),We=C(16089),Qe=de.Z.LEFT,ct=de.Z.RIGHT,Et=de.Z.UP,Mt=de.Z.DOWN,Ot=de.Z.ENTER,Fe=de.Z.ESC,kt=de.Z.HOME,sn=de.Z.END,jt=[Et,Mt,Qe,ct];function pn(Le,Xe,gt,_t){var Qt,Xt="prev",Rt="next",Jt="children",fn="parent";if(Le==="inline"&&_t===Ot)return{inlineTrigger:!0};var bn=(0,ae.Z)((0,ae.Z)({},Et,Xt),Mt,Rt),nt=(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},Qe,gt?Rt:Xt),ct,gt?Xt:Rt),Mt,Jt),Ot,Jt),cn=(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},Et,Xt),Mt,Rt),Ot,Jt),Fe,fn),Qe,gt?Jt:fn),ct,gt?fn:Jt),_n={inline:bn,horizontal:nt,vertical:cn,inlineSub:bn,horizontalSub:cn,verticalSub:cn},U=(Qt=_n["".concat(Le).concat(Xe?"":"Sub")])===null||Qt===void 0?void 0:Qt[_t];switch(U){case Xt:return{offset:-1,sibling:!0};case Rt:return{offset:1,sibling:!0};case fn:return{offset:-1,sibling:!1};case Jt:return{offset:1,sibling:!1};default:return null}}function mt(Le){for(var Xe=Le;Xe;){if(Xe.getAttribute("data-menu-list"))return Xe;Xe=Xe.parentElement}return null}function ke(Le,Xe){for(var gt=Le||document.activeElement;gt;){if(Xe.has(gt))return gt;gt=gt.parentElement}return null}function xe(Le,Xe){var gt=z(Le,!0);return gt.filter(function(_t){return Xe.has(_t)})}function W(Le,Xe,gt){var _t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Le)return null;var Qt=xe(Le,Xe),Xt=Qt.length,Rt=Qt.findIndex(function(Jt){return gt===Jt});return _t<0?Rt===-1?Rt=Xt-1:Rt-=1:_t>0&&(Rt+=1),Rt=(Rt+Xt)%Xt,Qt[Rt]}var Re=function(Xe,gt){var _t=new Set,Qt=new Map,Xt=new Map;return Xe.forEach(function(Rt){var Jt=document.querySelector("[data-menu-id='".concat(F(gt,Rt),"']"));Jt&&(_t.add(Jt),Xt.set(Jt,Rt),Qt.set(Rt,Jt))}),{elements:_t,key2element:Qt,element2key:Xt}};function $e(Le,Xe,gt,_t,Qt,Xt,Rt,Jt,fn,bn){var nt=v.useRef(),cn=v.useRef();cn.current=Xe;var _n=function(){We.Z.cancel(nt.current)};return v.useEffect(function(){return function(){_n()}},[]),function(U){var M=U.which;if([].concat(jt,[Ot,Fe,kt,sn]).includes(M)){var he=Xt(),Be=Re(he,_t),Ze=Be,ze=Ze.elements,ht=Ze.key2element,wt=Ze.element2key,zt=ht.get(Xe),St=ke(zt,ze),Tt=wt.get(St),tn=pn(Le,Rt(Tt,!0).length===1,gt,M);if(!tn&&M!==kt&&M!==sn)return;(jt.includes(M)||[kt,sn].includes(M))&&U.preventDefault();var ue=function(lt){if(lt){var Ke=lt,tt=lt.querySelector("a");tt!=null&&tt.getAttribute("href")&&(Ke=tt);var at=wt.get(lt);Jt(at),_n(),nt.current=(0,We.Z)(function(){cn.current===at&&Ke.focus()})}};if([kt,sn].includes(M)||tn.sibling||!St){var Oe;!St||Le==="inline"?Oe=Qt.current:Oe=mt(St);var Pe,Me=xe(Oe,ze);M===kt?Pe=Me[0]:M===sn?Pe=Me[Me.length-1]:Pe=W(Oe,ze,St,tn.offset),ue(Pe)}else if(tn.inlineTrigger)fn(Tt);else if(tn.offset>0)fn(Tt,!0),_n(),nt.current=(0,We.Z)(function(){Be=Re(he,_t);var Bt=St.getAttribute("aria-controls"),lt=document.getElementById(Bt),Ke=W(lt,Be.elements);ue(Ke)},5);else if(tn.offset<0){var Je=Rt(Tt,!0),ut=Je[Je.length-2],It=ht.get(ut);fn(ut,!1),ue(It)}}bn==null||bn(U)}}function J(Le){Promise.resolve().then(Le)}var R="__RC_UTIL_PATH_SPLIT__",k=function(Xe){return Xe.join(R)},se=function(Xe){return Xe.split(R)},$="rc-menu-more";function G(){var Le=v.useState({}),Xe=(0,Q.Z)(Le,2),gt=Xe[1],_t=(0,v.useRef)(new Map),Qt=(0,v.useRef)(new Map),Xt=v.useState([]),Rt=(0,Q.Z)(Xt,2),Jt=Rt[0],fn=Rt[1],bn=(0,v.useRef)(0),nt=(0,v.useRef)(!1),cn=function(){nt.current||gt({})},_n=(0,v.useCallback)(function(ht,wt){var zt=k(wt);Qt.current.set(zt,ht),_t.current.set(ht,zt),bn.current+=1;var St=bn.current;J(function(){St===bn.current&&cn()})},[]),U=(0,v.useCallback)(function(ht,wt){var zt=k(wt);Qt.current.delete(zt),_t.current.delete(ht)},[]),M=(0,v.useCallback)(function(ht){fn(ht)},[]),he=(0,v.useCallback)(function(ht,wt){var zt=_t.current.get(ht)||"",St=se(zt);return wt&&Jt.includes(St[0])&&St.unshift($),St},[Jt]),Be=(0,v.useCallback)(function(ht,wt){return ht.filter(function(zt){return zt!==void 0}).some(function(zt){var St=he(zt,!0);return St.includes(wt)})},[he]),Ze=function(){var wt=(0,le.Z)(_t.current.keys());return Jt.length&&wt.push($),wt},ze=(0,v.useCallback)(function(ht){var wt="".concat(_t.current.get(ht)).concat(R),zt=new Set;return(0,le.Z)(Qt.current.keys()).forEach(function(St){St.startsWith(wt)&&zt.add(Qt.current.get(St))}),zt},[]);return v.useEffect(function(){return function(){nt.current=!0}},[]),{registerPath:_n,unregisterPath:U,refreshOverflowKeys:M,isSubPathKey:Be,getKeyPath:he,getKeys:Ze,getSubPathKeys:ze}}function te(Le){var Xe=v.useRef(Le);Xe.current=Le;var gt=v.useCallback(function(){for(var _t,Qt=arguments.length,Xt=new Array(Qt),Rt=0;Rt<Qt;Rt++)Xt[Rt]=arguments[Rt];return(_t=Xe.current)===null||_t===void 0?void 0:_t.call.apply(_t,[Xe].concat(Xt))},[]);return Le?gt:void 0}var Ce=Math.random().toFixed(5).toString().slice(2),we=0;function Se(Le){var Xe=(0,B.Z)(Le,{value:Le}),gt=(0,Q.Z)(Xe,2),_t=gt[0],Qt=gt[1];return v.useEffect(function(){we+=1;var Xt="".concat(Ce,"-").concat(we);Qt("rc-menu-uuid-".concat(Xt))},[]),_t}var Ie=C(99153),Ne=C(84851),qe=C(19257),et=C(93046),ft=C(2738),Kt=C(8654);function Ct(Le,Xe,gt,_t){var Qt=v.useContext(L),Xt=Qt.activeKey,Rt=Qt.onActive,Jt=Qt.onInactive,fn={active:Xt===Le};return Xe||(fn.onMouseEnter=function(bn){gt==null||gt({key:Le,domEvent:bn}),Rt(Le)},fn.onMouseLeave=function(bn){_t==null||_t({key:Le,domEvent:bn}),Jt(Le)}),fn}function vt(Le){var Xe=v.useContext(L),gt=Xe.mode,_t=Xe.rtl,Qt=Xe.inlineIndent;if(gt!=="inline")return null;var Xt=Le;return _t?{paddingRight:Xt*Qt}:{paddingLeft:Xt*Qt}}function en(Le){var Xe=Le.icon,gt=Le.props,_t=Le.children,Qt;return Xe===null||Xe===!1?null:(typeof Xe=="function"?Qt=v.createElement(Xe,(0,ve.Z)({},gt)):typeof Xe!="boolean"&&(Qt=Xe),Qt||_t||null)}var on=["item"];function Vt(Le){var Xe=Le.item,gt=(0,h.Z)(Le,on);return Object.defineProperty(gt,"item",{get:function(){return(0,p.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Xe}}),gt}var gn=["title","attribute","elementRef"],Pn=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Gt=["active"],mn=function(Le){(0,qe.Z)(gt,Le);var Xe=(0,et.Z)(gt);function gt(){return(0,Ie.Z)(this,gt),Xe.apply(this,arguments)}return(0,Ne.Z)(gt,[{key:"render",value:function(){var Qt=this.props,Xt=Qt.title,Rt=Qt.attribute,Jt=Qt.elementRef,fn=(0,h.Z)(Qt,gn),bn=(0,ft.Z)(fn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,p.ZP)(!Rt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),v.createElement(A.Z.Item,(0,N.Z)({},Rt,{title:typeof Xt=="string"?Xt:void 0},bn,{ref:Jt}))}}]),gt}(v.Component),Ye=v.forwardRef(function(Le,Xe){var gt=Le.style,_t=Le.className,Qt=Le.eventKey,Xt=Le.warnKey,Rt=Le.disabled,Jt=Le.itemIcon,fn=Le.children,bn=Le.role,nt=Le.onMouseEnter,cn=Le.onMouseLeave,_n=Le.onClick,U=Le.onKeyDown,M=Le.onFocus,he=(0,h.Z)(Le,Pn),Be=O(Qt),Ze=v.useContext(L),ze=Ze.prefixCls,ht=Ze.onItemClick,wt=Ze.disabled,zt=Ze.overflowDisabled,St=Ze.itemIcon,Tt=Ze.selectedKeys,tn=Ze.onActive,ue=v.useContext(j),Oe=ue._internalRenderMenuItem,Pe="".concat(ze,"-item"),Me=v.useRef(),Je=v.useRef(),ut=wt||Rt,It=(0,Kt.x1)(Xe,Je),Bt=oe(Qt),lt=function(hn){return{key:Qt,keyPath:(0,le.Z)(Bt).reverse(),item:Me.current,domEvent:hn}},Ke=Jt||St,tt=Ct(Qt,ut,nt,cn),at=tt.active,it=(0,h.Z)(tt,Gt),At=Tt.includes(Qt),Ht=vt(Bt.length),qt=function(hn){if(!ut){var Vn=lt(hn);_n==null||_n(Vt(Vn)),ht(Vn)}},an=function(hn){if(U==null||U(hn),hn.which===de.Z.ENTER){var Vn=lt(hn);_n==null||_n(Vt(Vn)),ht(Vn)}},Sn=function(hn){tn(Qt),M==null||M(hn)},Rn={};Le.role==="option"&&(Rn["aria-selected"]=At);var yn=v.createElement(mn,(0,N.Z)({ref:Me,elementRef:It,role:bn===null?"none":bn||"menuitem",tabIndex:Rt?null:-1,"data-menu-id":zt&&Be?null:Be},(0,ft.Z)(he,["extra"]),it,Rn,{component:"li","aria-disabled":Rt,style:(0,ve.Z)((0,ve.Z)({},Ht),gt),className:ie()(Pe,(0,ae.Z)((0,ae.Z)((0,ae.Z)({},"".concat(Pe,"-active"),at),"".concat(Pe,"-selected"),At),"".concat(Pe,"-disabled"),ut),_t),onClick:qt,onKeyDown:an,onFocus:Sn}),fn,v.createElement(en,{props:(0,ve.Z)((0,ve.Z)({},Le),{},{isSelected:At}),icon:Ke}));return Oe&&(yn=Oe(yn,Le,{selected:At})),yn});function Ge(Le,Xe){var gt=Le.eventKey,_t=X(),Qt=oe(gt);return v.useEffect(function(){if(_t)return _t.registerPath(gt,Qt),function(){_t.unregisterPath(gt,Qt)}},[Qt]),_t?null:v.createElement(Ye,(0,N.Z)({},Le,{ref:Xe}))}var He=v.forwardRef(Ge),ne=["className","children"],fe=function(Xe,gt){var _t=Xe.className,Qt=Xe.children,Xt=(0,h.Z)(Xe,ne),Rt=v.useContext(L),Jt=Rt.prefixCls,fn=Rt.mode,bn=Rt.rtl;return v.createElement("ul",(0,N.Z)({className:ie()(Jt,bn&&"".concat(Jt,"-rtl"),"".concat(Jt,"-sub"),"".concat(Jt,"-").concat(fn==="inline"?"inline":"vertical"),_t),role:"menu"},Xt,{"data-menu-list":!0,ref:gt}),Qt)},ye=v.forwardRef(fe);ye.displayName="SubMenuList";var Ee=ye,Te=C(11592);function xt(Le,Xe){return(0,Te.Z)(Le).map(function(gt,_t){if(v.isValidElement(gt)){var Qt,Xt,Rt=gt.key,Jt=(Qt=(Xt=gt.props)===null||Xt===void 0?void 0:Xt.eventKey)!==null&&Qt!==void 0?Qt:Rt,fn=Jt==null;fn&&(Jt="tmp_key-".concat([].concat((0,le.Z)(Xe),[_t]).join("-")));var bn={key:Jt,eventKey:Jt};return v.cloneElement(gt,bn)}return gt})}var Wt=C(65966),nn={adjustX:1,adjustY:1},Cn={topLeft:{points:["bl","tl"],overflow:nn},topRight:{points:["br","tr"],overflow:nn},bottomLeft:{points:["tl","bl"],overflow:nn},bottomRight:{points:["tr","br"],overflow:nn},leftTop:{points:["tr","tl"],overflow:nn},leftBottom:{points:["br","bl"],overflow:nn},rightTop:{points:["tl","tr"],overflow:nn},rightBottom:{points:["bl","br"],overflow:nn}},Wn={topLeft:{points:["bl","tl"],overflow:nn},topRight:{points:["br","tr"],overflow:nn},bottomLeft:{points:["tl","bl"],overflow:nn},bottomRight:{points:["tr","br"],overflow:nn},rightTop:{points:["tr","tl"],overflow:nn},rightBottom:{points:["br","bl"],overflow:nn},leftTop:{points:["tl","tr"],overflow:nn},leftBottom:{points:["bl","br"],overflow:nn}},zn=null;function vn(Le,Xe,gt){if(Xe)return Xe;if(gt)return gt[Le]||gt.other}var Dn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function or(Le){var Xe=Le.prefixCls,gt=Le.visible,_t=Le.children,Qt=Le.popup,Xt=Le.popupStyle,Rt=Le.popupClassName,Jt=Le.popupOffset,fn=Le.disabled,bn=Le.mode,nt=Le.onVisibleChange,cn=v.useContext(L),_n=cn.getPopupContainer,U=cn.rtl,M=cn.subMenuOpenDelay,he=cn.subMenuCloseDelay,Be=cn.builtinPlacements,Ze=cn.triggerSubMenuAction,ze=cn.forceSubMenuRender,ht=cn.rootClassName,wt=cn.motion,zt=cn.defaultMotions,St=v.useState(!1),Tt=(0,Q.Z)(St,2),tn=Tt[0],ue=Tt[1],Oe=U?(0,ve.Z)((0,ve.Z)({},Wn),Be):(0,ve.Z)((0,ve.Z)({},Cn),Be),Pe=Dn[bn],Me=vn(bn,wt,zt),Je=v.useRef(Me);bn!=="inline"&&(Je.current=Me);var ut=(0,ve.Z)((0,ve.Z)({},Je.current),{},{leavedClassName:"".concat(Xe,"-hidden"),removeOnLeave:!1,motionAppear:!0}),It=v.useRef();return v.useEffect(function(){return It.current=(0,We.Z)(function(){ue(gt)}),function(){We.Z.cancel(It.current)}},[gt]),v.createElement(Wt.Z,{prefixCls:Xe,popupClassName:ie()("".concat(Xe,"-popup"),(0,ae.Z)({},"".concat(Xe,"-rtl"),U),Rt,ht),stretch:bn==="horizontal"?"minWidth":null,getPopupContainer:_n,builtinPlacements:Oe,popupPlacement:Pe,popupVisible:tn,popup:Qt,popupStyle:Xt,popupAlign:Jt&&{offset:Jt},action:fn?[]:[Ze],mouseEnterDelay:M,mouseLeaveDelay:he,onPopupVisibleChange:nt,forceRender:ze,popupMotion:ut,fresh:!0},_t)}var pr=C(77900);function rr(Le){var Xe=Le.id,gt=Le.open,_t=Le.keyPath,Qt=Le.children,Xt="inline",Rt=v.useContext(L),Jt=Rt.prefixCls,fn=Rt.forceSubMenuRender,bn=Rt.motion,nt=Rt.defaultMotions,cn=Rt.mode,_n=v.useRef(!1);_n.current=cn===Xt;var U=v.useState(!_n.current),M=(0,Q.Z)(U,2),he=M[0],Be=M[1],Ze=_n.current?gt:!1;v.useEffect(function(){_n.current&&Be(!1)},[cn]);var ze=(0,ve.Z)({},vn(Xt,bn,nt));_t.length>1&&(ze.motionAppear=!1);var ht=ze.onVisibleChanged;return ze.onVisibleChanged=function(wt){return!_n.current&&!wt&&Be(!0),ht==null?void 0:ht(wt)},he?null:v.createElement(I,{mode:Xt,locked:!_n.current},v.createElement(pr.default,(0,N.Z)({visible:Ze},ze,{forceRender:fn,removeOnLeave:!1,leavedClassName:"".concat(Jt,"-hidden")}),function(wt){var zt=wt.className,St=wt.style;return v.createElement(Ee,{id:Xe,className:zt,style:St},Qt)}))}var cr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Jn=["active"],kn=v.forwardRef(function(Le,Xe){var gt=Le.style,_t=Le.className,Qt=Le.title,Xt=Le.eventKey,Rt=Le.warnKey,Jt=Le.disabled,fn=Le.internalPopupClose,bn=Le.children,nt=Le.itemIcon,cn=Le.expandIcon,_n=Le.popupClassName,U=Le.popupOffset,M=Le.popupStyle,he=Le.onClick,Be=Le.onMouseEnter,Ze=Le.onMouseLeave,ze=Le.onTitleClick,ht=Le.onTitleMouseEnter,wt=Le.onTitleMouseLeave,zt=(0,h.Z)(Le,cr),St=O(Xt),Tt=v.useContext(L),tn=Tt.prefixCls,ue=Tt.mode,Oe=Tt.openKeys,Pe=Tt.disabled,Me=Tt.overflowDisabled,Je=Tt.activeKey,ut=Tt.selectedKeys,It=Tt.itemIcon,Bt=Tt.expandIcon,lt=Tt.onItemClick,Ke=Tt.onOpenChange,tt=Tt.onActive,at=v.useContext(j),it=at._internalRenderSubMenuItem,At=v.useContext(pe),Ht=At.isSubPathKey,qt=oe(),an="".concat(tn,"-submenu"),Sn=Pe||Jt,Rn=v.useRef(),yn=v.useRef(),On=nt!=null?nt:It,hn=cn!=null?cn:Bt,Vn=Oe.includes(Xt),Mn=!Me&&Vn,En=Ht(ut,Xt),Hn=Ct(Xt,Sn,ht,wt),Gn=Hn.active,er=(0,h.Z)(Hn,Jn),jn=v.useState(!1),$n=(0,Q.Z)(jn,2),Nn=$n[0],In=$n[1],Bn=function(yr){Sn||In(yr)},ir=function(yr){Bn(!0),Be==null||Be({key:Xt,domEvent:yr})},mr=function(yr){Bn(!1),Ze==null||Ze({key:Xt,domEvent:yr})},fr=v.useMemo(function(){return Gn||(ue!=="inline"?Nn||Ht([Je],Xt):!1)},[ue,Gn,Je,Nn,Xt,Ht]),dr=vt(qt.length),kr=function(yr){Sn||(ze==null||ze({key:Xt,domEvent:yr}),ue==="inline"&&Ke(Xt,!Vn))},Wr=te(function(Zn){he==null||he(Vt(Zn)),lt(Zn)}),Kr=function(yr){ue!=="inline"&&Ke(Xt,yr)},Ai=function(){tt(Xt)},Jr=St&&"".concat(St,"-popup"),ei=v.useMemo(function(){return v.createElement(en,{icon:ue!=="horizontal"?hn:void 0,props:(0,ve.Z)((0,ve.Z)({},Le),{},{isOpen:Mn,isSubMenu:!0})},v.createElement("i",{className:"".concat(an,"-arrow")}))},[ue,hn,Le,Mn,an]),Tr=v.createElement("div",(0,N.Z)({role:"menuitem",style:dr,className:"".concat(an,"-title"),tabIndex:Sn?null:-1,ref:Rn,title:typeof Qt=="string"?Qt:null,"data-menu-id":Me&&St?null:St,"aria-expanded":Mn,"aria-haspopup":!0,"aria-controls":Jr,"aria-disabled":Sn,onClick:kr,onFocus:Ai},er),Qt,ei),Rr=v.useRef(ue);if(ue!=="inline"&&qt.length>1?Rr.current="vertical":Rr.current=ue,!Me){var ti=Rr.current;Tr=v.createElement(or,{mode:ti,prefixCls:an,visible:!fn&&Mn&&ue!=="inline",popupClassName:_n,popupOffset:U,popupStyle:M,popup:v.createElement(I,{mode:ti==="horizontal"?"vertical":ti},v.createElement(Ee,{id:Jr,ref:yn},bn)),disabled:Sn,onVisibleChange:Kr},Tr)}var Cr=v.createElement(A.Z.Item,(0,N.Z)({ref:Xe,role:"none"},zt,{component:"li",style:gt,className:ie()(an,"".concat(an,"-").concat(ue),_t,(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},"".concat(an,"-open"),Mn),"".concat(an,"-active"),fr),"".concat(an,"-selected"),En),"".concat(an,"-disabled"),Sn)),onMouseEnter:ir,onMouseLeave:mr}),Tr,!Me&&v.createElement(rr,{id:Jr,open:Mn,keyPath:qt},bn));return it&&(Cr=it(Cr,Le,{selected:En,active:fr,open:Mn,disabled:Sn})),v.createElement(I,{onItemClick:Wr,mode:ue==="horizontal"?"vertical":ue,itemIcon:On,expandIcon:hn},Cr)}),qn=v.forwardRef(function(Le,Xe){var gt=Le.eventKey,_t=Le.children,Qt=oe(gt),Xt=xt(_t,Qt),Rt=X();v.useEffect(function(){if(Rt)return Rt.registerPath(gt,Qt),function(){Rt.unregisterPath(gt,Qt)}},[Qt]);var Jt;return Rt?Jt=Xt:Jt=v.createElement(kn,(0,N.Z)({ref:Xe},Le),Xt),v.createElement(q.Provider,{value:Qt},Jt)}),vr=qn,br=C(93664);function je(Le){var Xe=Le.className,gt=Le.style,_t=v.useContext(L),Qt=_t.prefixCls,Xt=X();return Xt?null:v.createElement("li",{role:"separator",className:ie()("".concat(Qt,"-item-divider"),Xe),style:gt})}var Ve=["className","title","eventKey","children"],Yt=v.forwardRef(function(Le,Xe){var gt=Le.className,_t=Le.title,Qt=Le.eventKey,Xt=Le.children,Rt=(0,h.Z)(Le,Ve),Jt=v.useContext(L),fn=Jt.prefixCls,bn="".concat(fn,"-item-group");return v.createElement("li",(0,N.Z)({ref:Xe,role:"presentation"},Rt,{onClick:function(cn){return cn.stopPropagation()},className:ie()(bn,gt)}),v.createElement("div",{role:"presentation",className:"".concat(bn,"-title"),title:typeof _t=="string"?_t:void 0},_t),v.createElement("ul",{role:"group",className:"".concat(bn,"-list")},Xt))}),Pt=v.forwardRef(function(Le,Xe){var gt=Le.eventKey,_t=Le.children,Qt=oe(gt),Xt=xt(_t,Qt),Rt=X();return Rt?Xt:v.createElement(Yt,(0,N.Z)({ref:Xe},(0,ft.Z)(Le,["warnKey"])),Xt)}),An=Pt,un=["label","children","key","type","extra"];function yt(Le,Xe,gt){var _t=Xe.item,Qt=Xe.group,Xt=Xe.submenu,Rt=Xe.divider;return(Le||[]).map(function(Jt,fn){if(Jt&&(0,br.Z)(Jt)==="object"){var bn=Jt,nt=bn.label,cn=bn.children,_n=bn.key,U=bn.type,M=bn.extra,he=(0,h.Z)(bn,un),Be=_n!=null?_n:"tmp-".concat(fn);return cn||U==="group"?U==="group"?v.createElement(Qt,(0,N.Z)({key:Be},he,{title:nt}),yt(cn,Xe,gt)):v.createElement(Xt,(0,N.Z)({key:Be},he,{title:nt}),yt(cn,Xe,gt)):U==="divider"?v.createElement(Rt,(0,N.Z)({key:Be},he)):v.createElement(_t,(0,N.Z)({key:Be},he,{extra:M}),nt,(!!M||M===0)&&v.createElement("span",{className:"".concat(gt,"-item-extra")},M))}return null}).filter(function(Jt){return Jt})}function pt(Le,Xe,gt,_t,Qt){var Xt=Le,Rt=(0,ve.Z)({divider:je,item:He,group:An,submenu:vr},_t);return Xe&&(Xt=yt(Xe,Rt,Qt)),xt(Xt,gt)}var Lt=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],rn=[],dn=v.forwardRef(function(Le,Xe){var gt,_t=Le,Qt=_t.prefixCls,Xt=Qt===void 0?"rc-menu":Qt,Rt=_t.rootClassName,Jt=_t.style,fn=_t.className,bn=_t.tabIndex,nt=bn===void 0?0:bn,cn=_t.items,_n=_t.children,U=_t.direction,M=_t.id,he=_t.mode,Be=he===void 0?"vertical":he,Ze=_t.inlineCollapsed,ze=_t.disabled,ht=_t.disabledOverflow,wt=_t.subMenuOpenDelay,zt=wt===void 0?.1:wt,St=_t.subMenuCloseDelay,Tt=St===void 0?.1:St,tn=_t.forceSubMenuRender,ue=_t.defaultOpenKeys,Oe=_t.openKeys,Pe=_t.activeKey,Me=_t.defaultActiveFirst,Je=_t.selectable,ut=Je===void 0?!0:Je,It=_t.multiple,Bt=It===void 0?!1:It,lt=_t.defaultSelectedKeys,Ke=_t.selectedKeys,tt=_t.onSelect,at=_t.onDeselect,it=_t.inlineIndent,At=it===void 0?24:it,Ht=_t.motion,qt=_t.defaultMotions,an=_t.triggerSubMenuAction,Sn=an===void 0?"hover":an,Rn=_t.builtinPlacements,yn=_t.itemIcon,On=_t.expandIcon,hn=_t.overflowedIndicator,Vn=hn===void 0?"...":hn,Mn=_t.overflowedIndicatorPopupClassName,En=_t.getPopupContainer,Hn=_t.onClick,Gn=_t.onOpenChange,er=_t.onKeyDown,jn=_t.openAnimation,$n=_t.openTransitionName,Nn=_t._internalRenderMenuItem,In=_t._internalRenderSubMenuItem,Bn=_t._internalComponents,ir=(0,h.Z)(_t,Lt),mr=v.useMemo(function(){return[pt(_n,cn,rn,Bn,Xt),pt(_n,cn,rn,{},Xt)]},[_n,cn,Bn]),fr=(0,Q.Z)(mr,2),dr=fr[0],kr=fr[1],Wr=v.useState(!1),Kr=(0,Q.Z)(Wr,2),Ai=Kr[0],Jr=Kr[1],ei=v.useRef(),Tr=Se(M),Rr=U==="rtl",ti=(0,B.Z)(ue,{value:Oe,postState:function(Zt){return Zt||rn}}),Cr=(0,Q.Z)(ti,2),Zn=Cr[0],yr=Cr[1],Qn=function(Zt){var zr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function pi(){yr(Zt),Gn==null||Gn(Zt)}zr?(0,E.flushSync)(pi):pi()},Ar=v.useState(Zn),ur=(0,Q.Z)(Ar,2),hr=ur[0],Er=ur[1],Fr=v.useRef(!1),wn=v.useMemo(function(){return(Be==="inline"||Be==="vertical")&&Ze?["vertical",Ze]:[Be,!1]},[Be,Ze]),tr=(0,Q.Z)(wn,2),Ir=tr[0],nr=tr[1],wr=Ir==="inline",Nr=v.useState(Ir),Yr=(0,Q.Z)(Nr,2),ri=Yr[0],Pr=Yr[1],wi=v.useState(nr),Ur=(0,Q.Z)(wi,2),ls=Ur[0],li=Ur[1];v.useEffect(function(){Pr(Ir),li(nr),Fr.current&&(wr?yr(hr):Qn(rn))},[Ir,nr]);var bi=v.useState(0),Gr=(0,Q.Z)(bi,2),Zi=Gr[0],Wi=Gr[1],ns=Zi>=dr.length-1||ri!=="horizontal"||ht;v.useEffect(function(){wr&&Er(Zn)},[Zn]),v.useEffect(function(){return Fr.current=!0,function(){Fr.current=!1}},[]);var Fi=G(),zi=Fi.registerPath,Ui=Fi.unregisterPath,us=Fi.refreshOverflowKeys,fi=Fi.isSubPathKey,di=Fi.getKeyPath,Ci=Fi.getKeys,ai=Fi.getSubPathKeys,Di=v.useMemo(function(){return{registerPath:zi,unregisterPath:Ui}},[zi,Ui]),hs=v.useMemo(function(){return{isSubPathKey:fi}},[fi]);v.useEffect(function(){us(ns?rn:dr.slice(Zi+1).map(function(si){return si.key}))},[Zi,ns]);var rs=(0,B.Z)(Pe||Me&&((gt=dr[0])===null||gt===void 0?void 0:gt.key),{value:Pe}),gi=(0,Q.Z)(rs,2),ci=gi[0],Dr=gi[1],xr=te(function(si){Dr(si)}),Hr=te(function(){Dr(void 0)});(0,v.useImperativeHandle)(Xe,function(){return{list:ei.current,focus:function(Zt){var zr,pi=Ci(),hi=Re(pi,Tr),ki=hi.elements,cs=hi.key2element,Bs=hi.element2key,Qs=xe(ei.current,ki),fs=ci!=null?ci:Qs[0]?Bs.get(Qs[0]):(zr=dr.find(function(Ri){return!Ri.props.disabled}))===null||zr===void 0?void 0:zr.key,ss=cs.get(fs);if(fs&&ss){var ji;ss==null||(ji=ss.focus)===null||ji===void 0||ji.call(ss,Zt)}}}});var ni=(0,B.Z)(lt||[],{value:Ke,postState:function(Zt){return Array.isArray(Zt)?Zt:Zt==null?rn:[Zt]}}),ii=(0,Q.Z)(ni,2),qr=ii[0],xi=ii[1],Si=function(Zt){if(ut){var zr=Zt.key,pi=qr.includes(zr),hi;Bt?pi?hi=qr.filter(function(cs){return cs!==zr}):hi=[].concat((0,le.Z)(qr),[zr]):hi=[zr],xi(hi);var ki=(0,ve.Z)((0,ve.Z)({},Zt),{},{selectedKeys:hi});pi?at==null||at(ki):tt==null||tt(ki)}!Bt&&Zn.length&&ri!=="inline"&&Qn(rn)},Ti=te(function(si){Hn==null||Hn(Vt(si)),Si(si)}),Vr=te(function(si,Zt){var zr=Zn.filter(function(hi){return hi!==si});if(Zt)zr.push(si);else if(ri!=="inline"){var pi=ai(si);zr=zr.filter(function(hi){return!pi.has(hi)})}(0,T.Z)(Zn,zr,!0)||Qn(zr,!0)}),mi=function(Zt,zr){var pi=zr!=null?zr:!Zn.includes(Zt);Vr(Zt,pi)},Ni=$e(ri,ci,Rr,Tr,ei,Ci,di,Dr,mi,er);v.useEffect(function(){Jr(!0)},[]);var Hi=v.useMemo(function(){return{_internalRenderMenuItem:Nn,_internalRenderSubMenuItem:In}},[Nn,In]),is=ri!=="horizontal"||ht?dr:dr.map(function(si,Zt){return v.createElement(I,{key:si.key,overflowDisabled:Zt>Zi},si)}),gs=v.createElement(A.Z,(0,N.Z)({id:M,ref:ei,prefixCls:"".concat(Xt,"-overflow"),component:"ul",itemComponent:He,className:ie()(Xt,"".concat(Xt,"-root"),"".concat(Xt,"-").concat(ri),fn,(0,ae.Z)((0,ae.Z)({},"".concat(Xt,"-inline-collapsed"),ls),"".concat(Xt,"-rtl"),Rr),Rt),dir:U,style:Jt,role:"menu",tabIndex:nt,data:is,renderRawItem:function(Zt){return Zt},renderRawRest:function(Zt){var zr=Zt.length,pi=zr?dr.slice(-zr):null;return v.createElement(vr,{eventKey:$,title:Vn,disabled:ns,internalPopupClose:zr===0,popupClassName:Mn},pi)},maxCount:ri!=="horizontal"||ht?A.Z.INVALIDATE:A.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Zt){Wi(Zt)},onKeyDown:Ni},ir));return v.createElement(j.Provider,{value:Hi},v.createElement(S.Provider,{value:Tr},v.createElement(I,{prefixCls:Xt,rootClassName:Rt,mode:ri,openKeys:Zn,rtl:Rr,disabled:ze,motion:Ai?Ht:null,defaultMotions:Ai?qt:null,activeKey:ci,onActive:xr,onInactive:Hr,selectedKeys:qr,inlineIndent:At,subMenuOpenDelay:zt,subMenuCloseDelay:Tt,forceSubMenuRender:tn,builtinPlacements:Rn,triggerSubMenuAction:Sn,getPopupContainer:En,itemIcon:yn,expandIcon:On,onItemClick:Ti,onOpenChange:Vr},v.createElement(pe.Provider,{value:hs},gs),v.createElement("div",{style:{display:"none"},"aria-hidden":!0},v.createElement(ce.Provider,{value:Di},kr)))))}),xn=dn,dt=xn;dt.Item=He,dt.SubMenu=vr,dt.ItemGroup=An,dt.Divider=je;var $t=dt},11780:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return Y}});var N=C(14809),ae=C(20439),ve=C(50298),le=C(62646),Q=C(59301),h=C(92310),ge=C.n(h),ie=C(29301),A=C(34280),B=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],T=void 0;function p(y,_){var V=y.prefixCls,de=y.invalidate,We=y.item,Qe=y.renderItem,ct=y.responsive,Et=y.responsiveDisabled,Mt=y.registerSize,Ot=y.itemKey,Fe=y.className,kt=y.style,sn=y.children,jt=y.display,pn=y.order,mt=y.component,ke=mt===void 0?"div":mt,xe=(0,le.Z)(y,B),W=ct&&!jt;function Re(se){Mt(Ot,se)}Q.useEffect(function(){return function(){Re(null)}},[]);var $e=Qe&&We!==T?Qe(We,{index:pn}):sn,J;de||(J={opacity:W?0:1,height:W?0:T,overflowY:W?"hidden":T,order:ct?pn:T,pointerEvents:W?"none":T,position:W?"absolute":T});var R={};W&&(R["aria-hidden"]=!0);var k=Q.createElement(ke,(0,N.Z)({className:ge()(!de&&V,Fe),style:(0,ae.Z)((0,ae.Z)({},J),kt)},R,xe,{ref:_}),$e);return ct&&(k=Q.createElement(ie.Z,{onResize:function($){var G=$.offsetWidth;Re(G)},disabled:Et},k)),k}var v=Q.forwardRef(p);v.displayName="Item";var E=v,S=C(6089),F=C(4676),O=C(16089);function Z(y){if(typeof MessageChannel=="undefined")(0,O.Z)(y);else{var _=new MessageChannel;_.port1.onmessage=function(){return y()},_.port2.postMessage(void 0)}}function b(){var y=Q.useRef(null),_=function(de){y.current||(y.current=[],Z(function(){(0,F.unstable_batchedUpdates)(function(){y.current.forEach(function(We){We()}),y.current=null})})),y.current.push(de)};return _}function L(y,_){var V=Q.useState(_),de=(0,ve.Z)(V,2),We=de[0],Qe=de[1],ct=(0,S.Z)(function(Et){y(function(){Qe(Et)})});return[We,ct]}var D=Q.createContext(null),I=["component"],re=["className"],ce=["className"],X=function(_,V){var de=Q.useContext(D);if(!de){var We=_.component,Qe=We===void 0?"div":We,ct=(0,le.Z)(_,I);return Q.createElement(Qe,(0,N.Z)({},ct,{ref:V}))}var Et=de.className,Mt=(0,le.Z)(de,re),Ot=_.className,Fe=(0,le.Z)(_,ce);return Q.createElement(D.Provider,{value:null},Q.createElement(E,(0,N.Z)({ref:V,className:ge()(Et,Ot)},Mt,Fe)))},q=Q.forwardRef(X);q.displayName="RawItem";var oe=q,pe=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],_e="responsive",j="invalidate";function K(y){return"+ ".concat(y.length," ...")}function ee(y,_){var V=y.prefixCls,de=V===void 0?"rc-overflow":V,We=y.data,Qe=We===void 0?[]:We,ct=y.renderItem,Et=y.renderRawItem,Mt=y.itemKey,Ot=y.itemWidth,Fe=Ot===void 0?10:Ot,kt=y.ssr,sn=y.style,jt=y.className,pn=y.maxCount,mt=y.renderRest,ke=y.renderRawRest,xe=y.suffix,W=y.component,Re=W===void 0?"div":W,$e=y.itemComponent,J=y.onVisibleChange,R=(0,le.Z)(y,pe),k=kt==="full",se=b(),$=L(se,null),G=(0,ve.Z)($,2),te=G[0],Ce=G[1],we=te||0,Se=L(se,new Map),Ie=(0,ve.Z)(Se,2),Ne=Ie[0],qe=Ie[1],et=L(se,0),ft=(0,ve.Z)(et,2),Kt=ft[0],Ct=ft[1],vt=L(se,0),en=(0,ve.Z)(vt,2),on=en[0],Vt=en[1],gn=L(se,0),Pn=(0,ve.Z)(gn,2),Gt=Pn[0],mn=Pn[1],Ye=(0,Q.useState)(null),Ge=(0,ve.Z)(Ye,2),He=Ge[0],ne=Ge[1],fe=(0,Q.useState)(null),ye=(0,ve.Z)(fe,2),Ee=ye[0],Te=ye[1],xt=Q.useMemo(function(){return Ee===null&&k?Number.MAX_SAFE_INTEGER:Ee||0},[Ee,te]),Wt=(0,Q.useState)(!1),nn=(0,ve.Z)(Wt,2),Cn=nn[0],Wn=nn[1],zn="".concat(de,"-item"),vn=Math.max(Kt,on),Dn=pn===_e,or=Qe.length&&Dn,pr=pn===j,rr=or||typeof pn=="number"&&Qe.length>pn,cr=(0,Q.useMemo)(function(){var dt=Qe;return or?te===null&&k?dt=Qe:dt=Qe.slice(0,Math.min(Qe.length,we/Fe)):typeof pn=="number"&&(dt=Qe.slice(0,pn)),dt},[Qe,Fe,te,pn,or]),Jn=(0,Q.useMemo)(function(){return or?Qe.slice(xt+1):Qe.slice(cr.length)},[Qe,cr,or,xt]),kn=(0,Q.useCallback)(function(dt,$t){var Le;return typeof Mt=="function"?Mt(dt):(Le=Mt&&(dt==null?void 0:dt[Mt]))!==null&&Le!==void 0?Le:$t},[Mt]),qn=(0,Q.useCallback)(ct||function(dt){return dt},[ct]);function vr(dt,$t,Le){Ee===dt&&($t===void 0||$t===He)||(Te(dt),Le||(Wn(dt<Qe.length-1),J==null||J(dt)),$t!==void 0&&ne($t))}function br(dt,$t){Ce($t.clientWidth)}function je(dt,$t){qe(function(Le){var Xe=new Map(Le);return $t===null?Xe.delete(dt):Xe.set(dt,$t),Xe})}function Ve(dt,$t){Vt($t),Ct(on)}function Yt(dt,$t){mn($t)}function Pt(dt){return Ne.get(kn(cr[dt],dt))}(0,A.Z)(function(){if(we&&typeof vn=="number"&&cr){var dt=Gt,$t=cr.length,Le=$t-1;if(!$t){vr(0,null);return}for(var Xe=0;Xe<$t;Xe+=1){var gt=Pt(Xe);if(k&&(gt=gt||0),gt===void 0){vr(Xe-1,void 0,!0);break}if(dt+=gt,Le===0&&dt<=we||Xe===Le-1&&dt+Pt(Le)<=we){vr(Le,null);break}else if(dt+vn>we){vr(Xe-1,dt-gt-Gt+on);break}}xe&&Pt(0)+Gt>we&&ne(null)}},[we,Ne,on,Gt,kn,cr]);var An=Cn&&!!Jn.length,un={};He!==null&&or&&(un={position:"absolute",left:He,top:0});var yt={prefixCls:zn,responsive:or,component:$e,invalidate:pr},pt=Et?function(dt,$t){var Le=kn(dt,$t);return Q.createElement(D.Provider,{key:Le,value:(0,ae.Z)((0,ae.Z)({},yt),{},{order:$t,item:dt,itemKey:Le,registerSize:je,display:$t<=xt})},Et(dt,$t))}:function(dt,$t){var Le=kn(dt,$t);return Q.createElement(E,(0,N.Z)({},yt,{order:$t,key:Le,item:dt,renderItem:qn,itemKey:Le,registerSize:je,display:$t<=xt}))},Lt={order:An?xt:Number.MAX_SAFE_INTEGER,className:"".concat(zn,"-rest"),registerSize:Ve,display:An},rn=mt||K,dn=ke?Q.createElement(D.Provider,{value:(0,ae.Z)((0,ae.Z)({},yt),Lt)},ke(Jn)):Q.createElement(E,(0,N.Z)({},yt,Lt),typeof rn=="function"?rn(Jn):rn),xn=Q.createElement(Re,(0,N.Z)({className:ge()(!pr&&de,jt),style:sn,ref:_},R),cr.map(pt),rr?dn:null,xe&&Q.createElement(E,(0,N.Z)({},yt,{responsive:Dn,responsiveDisabled:!or,order:xt,className:"".concat(zn,"-suffix"),registerSize:Yt,display:!0,style:un}),xe));return Dn?Q.createElement(ie.Z,{onResize:br,disabled:!or},xn):xn}var z=Q.forwardRef(ee);z.displayName="Overflow",z.Item=oe,z.RESPONSIVE=_e,z.INVALIDATE=j;var Ae=z,Y=Ae},23425:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return ce}});var N=C(4635),ae=C(14809),ve=C(93664),le=C(20439),Q=C(50298),h=C(92310),ge=C.n(h),ie=C(18929),A=C(10228),B=C(26112),T=C(48736),p=C(59301),v=C(17119),E=[10,20,50,100],S=function(q){var oe=q.pageSizeOptions,pe=oe===void 0?E:oe,_e=q.locale,j=q.changeSize,K=q.pageSize,ee=q.goButton,z=q.quickGo,Ae=q.rootPrefixCls,Y=q.disabled,y=q.buildOptionText,_=q.showSizeChanger,V=q.sizeChangerRender,de=p.useState(""),We=(0,Q.Z)(de,2),Qe=We[0],ct=We[1],Et=function(){return!Qe||Number.isNaN(Qe)?void 0:Number(Qe)},Mt=typeof y=="function"?y:function(xe){return"".concat(xe," ").concat(_e.items_per_page)},Ot=function(W){ct(W.target.value)},Fe=function(W){ee||Qe===""||(ct(""),!(W.relatedTarget&&(W.relatedTarget.className.indexOf("".concat(Ae,"-item-link"))>=0||W.relatedTarget.className.indexOf("".concat(Ae,"-item"))>=0))&&(z==null||z(Et())))},kt=function(W){Qe!==""&&(W.keyCode===A.Z.ENTER||W.type==="click")&&(ct(""),z==null||z(Et()))},sn=function(){return pe.some(function(W){return W.toString()===K.toString()})?pe:pe.concat([K]).sort(function(W,Re){var $e=Number.isNaN(Number(W))?0:Number(W),J=Number.isNaN(Number(Re))?0:Number(Re);return $e-J})},jt="".concat(Ae,"-options");if(!_&&!z)return null;var pn=null,mt=null,ke=null;return _&&V&&(pn=V({disabled:Y,size:K,onSizeChange:function(W){j==null||j(Number(W))},"aria-label":_e.page_size,className:"".concat(jt,"-size-changer"),options:sn().map(function(xe){return{label:Mt(xe),value:xe}})})),z&&(ee&&(ke=typeof ee=="boolean"?p.createElement("button",{type:"button",onClick:kt,onKeyUp:kt,disabled:Y,className:"".concat(jt,"-quick-jumper-button")},_e.jump_to_confirm):p.createElement("span",{onClick:kt,onKeyUp:kt},ee)),mt=p.createElement("div",{className:"".concat(jt,"-quick-jumper")},_e.jump_to,p.createElement("input",{disabled:Y,type:"text",value:Qe,onChange:Ot,onKeyUp:kt,onBlur:Fe,"aria-label":_e.page}),_e.page,ke)),p.createElement("li",{className:jt},pn,mt)},F=S,O=function(q){var oe=q.rootPrefixCls,pe=q.page,_e=q.active,j=q.className,K=q.showTitle,ee=q.onClick,z=q.onKeyPress,Ae=q.itemRender,Y="".concat(oe,"-item"),y=ge()(Y,"".concat(Y,"-").concat(pe),(0,N.Z)((0,N.Z)({},"".concat(Y,"-active"),_e),"".concat(Y,"-disabled"),!pe),j),_=function(){ee(pe)},V=function(Qe){z(Qe,ee,pe)},de=Ae(pe,"page",p.createElement("a",{rel:"nofollow"},pe));return de?p.createElement("li",{title:K?String(pe):null,className:y,onClick:_,onKeyDown:V,tabIndex:0},de):null},Z=O,b=function(q,oe,pe){return pe};function L(){}function D(X){var q=Number(X);return typeof q=="number"&&!Number.isNaN(q)&&isFinite(q)&&Math.floor(q)===q}function I(X,q,oe){var pe=typeof X=="undefined"?q:X;return Math.floor((oe-1)/pe)+1}var re=function(q){var oe=q.prefixCls,pe=oe===void 0?"rc-pagination":oe,_e=q.selectPrefixCls,j=_e===void 0?"rc-select":_e,K=q.className,ee=q.current,z=q.defaultCurrent,Ae=z===void 0?1:z,Y=q.total,y=Y===void 0?0:Y,_=q.pageSize,V=q.defaultPageSize,de=V===void 0?10:V,We=q.onChange,Qe=We===void 0?L:We,ct=q.hideOnSinglePage,Et=q.align,Mt=q.showPrevNextJumpers,Ot=Mt===void 0?!0:Mt,Fe=q.showQuickJumper,kt=q.showLessItems,sn=q.showTitle,jt=sn===void 0?!0:sn,pn=q.onShowSizeChange,mt=pn===void 0?L:pn,ke=q.locale,xe=ke===void 0?v.Z:ke,W=q.style,Re=q.totalBoundaryShowSizeChanger,$e=Re===void 0?50:Re,J=q.disabled,R=q.simple,k=q.showTotal,se=q.showSizeChanger,$=se===void 0?y>$e:se,G=q.sizeChangerRender,te=q.pageSizeOptions,Ce=q.itemRender,we=Ce===void 0?b:Ce,Se=q.jumpPrevIcon,Ie=q.jumpNextIcon,Ne=q.prevIcon,qe=q.nextIcon,et=p.useRef(null),ft=(0,ie.Z)(10,{value:_,defaultValue:de}),Kt=(0,Q.Z)(ft,2),Ct=Kt[0],vt=Kt[1],en=(0,ie.Z)(1,{value:ee,defaultValue:Ae,postState:function(ht){return Math.max(1,Math.min(ht,I(void 0,Ct,y)))}}),on=(0,Q.Z)(en,2),Vt=on[0],gn=on[1],Pn=p.useState(Vt),Gt=(0,Q.Z)(Pn,2),mn=Gt[0],Ye=Gt[1];(0,p.useEffect)(function(){Ye(Vt)},[Vt]);var Ge=Qe!==L,He="current"in q,ne=Math.max(1,Vt-(kt?3:5)),fe=Math.min(I(void 0,Ct,y),Vt+(kt?3:5));function ye(ze,ht){var wt=ze||p.createElement("button",{type:"button","aria-label":ht,className:"".concat(pe,"-item-link")});return typeof ze=="function"&&(wt=p.createElement(ze,(0,le.Z)({},q))),wt}function Ee(ze){var ht=ze.target.value,wt=I(void 0,Ct,y),zt;return ht===""?zt=ht:Number.isNaN(Number(ht))?zt=mn:ht>=wt?zt=wt:zt=Number(ht),zt}function Te(ze){return D(ze)&&ze!==Vt&&D(y)&&y>0}var xt=y>Ct?Fe:!1;function Wt(ze){(ze.keyCode===A.Z.UP||ze.keyCode===A.Z.DOWN)&&ze.preventDefault()}function nn(ze){var ht=Ee(ze);switch(ht!==mn&&Ye(ht),ze.keyCode){case A.Z.ENTER:zn(ht);break;case A.Z.UP:zn(ht-1);break;case A.Z.DOWN:zn(ht+1);break;default:break}}function Cn(ze){zn(Ee(ze))}function Wn(ze){var ht=I(ze,Ct,y),wt=Vt>ht&&ht!==0?ht:Vt;vt(ze),Ye(wt),mt==null||mt(Vt,ze),gn(wt),Qe==null||Qe(wt,ze)}function zn(ze){if(Te(ze)&&!J){var ht=I(void 0,Ct,y),wt=ze;return ze>ht?wt=ht:ze<1&&(wt=1),wt!==mn&&Ye(wt),gn(wt),Qe==null||Qe(wt,Ct),wt}return Vt}var vn=Vt>1,Dn=Vt<I(void 0,Ct,y);function or(){vn&&zn(Vt-1)}function pr(){Dn&&zn(Vt+1)}function rr(){zn(ne)}function cr(){zn(fe)}function Jn(ze,ht){if(ze.key==="Enter"||ze.charCode===A.Z.ENTER||ze.keyCode===A.Z.ENTER){for(var wt=arguments.length,zt=new Array(wt>2?wt-2:0),St=2;St<wt;St++)zt[St-2]=arguments[St];ht.apply(void 0,zt)}}function kn(ze){Jn(ze,or)}function qn(ze){Jn(ze,pr)}function vr(ze){Jn(ze,rr)}function br(ze){Jn(ze,cr)}function je(ze){var ht=we(ze,"prev",ye(Ne,"prev page"));return p.isValidElement(ht)?p.cloneElement(ht,{disabled:!vn}):ht}function Ve(ze){var ht=we(ze,"next",ye(qe,"next page"));return p.isValidElement(ht)?p.cloneElement(ht,{disabled:!Dn}):ht}function Yt(ze){(ze.type==="click"||ze.keyCode===A.Z.ENTER)&&zn(mn)}var Pt=null,An=(0,B.Z)(q,{aria:!0,data:!0}),un=k&&p.createElement("li",{className:"".concat(pe,"-total-text")},k(y,[y===0?0:(Vt-1)*Ct+1,Vt*Ct>y?y:Vt*Ct])),yt=null,pt=I(void 0,Ct,y);if(ct&&y<=Ct)return null;var Lt=[],rn={rootPrefixCls:pe,onClick:zn,onKeyPress:Jn,showTitle:jt,itemRender:we,page:-1},dn=Vt-1>0?Vt-1:0,xn=Vt+1<pt?Vt+1:pt,dt=Fe&&Fe.goButton,$t=(0,ve.Z)(R)==="object"?R.readOnly:!R,Le=dt,Xe=null;R&&(dt&&(typeof dt=="boolean"?Le=p.createElement("button",{type:"button",onClick:Yt,onKeyUp:Yt},xe.jump_to_confirm):Le=p.createElement("span",{onClick:Yt,onKeyUp:Yt},dt),Le=p.createElement("li",{title:jt?"".concat(xe.jump_to).concat(Vt,"/").concat(pt):null,className:"".concat(pe,"-simple-pager")},Le)),Xe=p.createElement("li",{title:jt?"".concat(Vt,"/").concat(pt):null,className:"".concat(pe,"-simple-pager")},$t?mn:p.createElement("input",{type:"text","aria-label":xe.jump_to,value:mn,disabled:J,onKeyDown:Wt,onKeyUp:nn,onChange:nn,onBlur:Cn,size:3}),p.createElement("span",{className:"".concat(pe,"-slash")},"/"),pt));var gt=kt?1:2;if(pt<=3+gt*2){pt||Lt.push(p.createElement(Z,(0,ae.Z)({},rn,{key:"noPager",page:1,className:"".concat(pe,"-item-disabled")})));for(var _t=1;_t<=pt;_t+=1)Lt.push(p.createElement(Z,(0,ae.Z)({},rn,{key:_t,page:_t,active:Vt===_t})))}else{var Qt=kt?xe.prev_3:xe.prev_5,Xt=kt?xe.next_3:xe.next_5,Rt=we(ne,"jump-prev",ye(Se,"prev page")),Jt=we(fe,"jump-next",ye(Ie,"next page"));Ot&&(Pt=Rt?p.createElement("li",{title:jt?Qt:null,key:"prev",onClick:rr,tabIndex:0,onKeyDown:vr,className:ge()("".concat(pe,"-jump-prev"),(0,N.Z)({},"".concat(pe,"-jump-prev-custom-icon"),!!Se))},Rt):null,yt=Jt?p.createElement("li",{title:jt?Xt:null,key:"next",onClick:cr,tabIndex:0,onKeyDown:br,className:ge()("".concat(pe,"-jump-next"),(0,N.Z)({},"".concat(pe,"-jump-next-custom-icon"),!!Ie))},Jt):null);var fn=Math.max(1,Vt-gt),bn=Math.min(Vt+gt,pt);Vt-1<=gt&&(bn=1+gt*2),pt-Vt<=gt&&(fn=pt-gt*2);for(var nt=fn;nt<=bn;nt+=1)Lt.push(p.createElement(Z,(0,ae.Z)({},rn,{key:nt,page:nt,active:Vt===nt})));if(Vt-1>=gt*2&&Vt!==3&&(Lt[0]=p.cloneElement(Lt[0],{className:ge()("".concat(pe,"-item-after-jump-prev"),Lt[0].props.className)}),Lt.unshift(Pt)),pt-Vt>=gt*2&&Vt!==pt-2){var cn=Lt[Lt.length-1];Lt[Lt.length-1]=p.cloneElement(cn,{className:ge()("".concat(pe,"-item-before-jump-next"),cn.props.className)}),Lt.push(yt)}fn!==1&&Lt.unshift(p.createElement(Z,(0,ae.Z)({},rn,{key:1,page:1}))),bn!==pt&&Lt.push(p.createElement(Z,(0,ae.Z)({},rn,{key:pt,page:pt})))}var _n=je(dn);if(_n){var U=!vn||!pt;_n=p.createElement("li",{title:jt?xe.prev_page:null,onClick:or,tabIndex:U?null:0,onKeyDown:kn,className:ge()("".concat(pe,"-prev"),(0,N.Z)({},"".concat(pe,"-disabled"),U)),"aria-disabled":U},_n)}var M=Ve(xn);if(M){var he,Be;R?(he=!Dn,Be=vn?0:null):(he=!Dn||!pt,Be=he?null:0),M=p.createElement("li",{title:jt?xe.next_page:null,onClick:pr,tabIndex:Be,onKeyDown:qn,className:ge()("".concat(pe,"-next"),(0,N.Z)({},"".concat(pe,"-disabled"),he)),"aria-disabled":he},M)}var Ze=ge()(pe,K,(0,N.Z)((0,N.Z)((0,N.Z)((0,N.Z)((0,N.Z)({},"".concat(pe,"-start"),Et==="start"),"".concat(pe,"-center"),Et==="center"),"".concat(pe,"-end"),Et==="end"),"".concat(pe,"-simple"),R),"".concat(pe,"-disabled"),J));return p.createElement("ul",(0,ae.Z)({className:Ze,style:W,ref:et},An),un,_n,R?Xe:Lt,M,p.createElement(F,{locale:xe,rootPrefixCls:pe,disabled:J,selectPrefixCls:j,changeSize:Wn,pageSize:Ct,pageSizeOptions:te,quickGo:xt?zn:null,goButton:Le,showSizeChanger:$,sizeChangerRender:G}))},ce=re},29301:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return j}});var N=C(14809),ae=C(59301),ve=C(11592),le=C(48736),Q=C(20439),h=C(93664),ge=C(76846),ie=C(8654),A=ae.createContext(null);function B(K){var ee=K.children,z=K.onBatchResize,Ae=ae.useRef(0),Y=ae.useRef([]),y=ae.useContext(A),_=ae.useCallback(function(V,de,We){Ae.current+=1;var Qe=Ae.current;Y.current.push({size:V,element:de,data:We}),Promise.resolve().then(function(){Qe===Ae.current&&(z==null||z(Y.current),Y.current=[])}),y==null||y(V,de,We)},[z,y]);return ae.createElement(A.Provider,{value:_},ee)}var T=C(76374),p=new Map;function v(K){K.forEach(function(ee){var z,Ae=ee.target;(z=p.get(Ae))===null||z===void 0||z.forEach(function(Y){return Y(Ae)})})}var E=new T.Z(v),S=null,F=null;function O(K,ee){p.has(K)||(p.set(K,new Set),E.observe(K)),p.get(K).add(ee)}function Z(K,ee){p.has(K)&&(p.get(K).delete(ee),p.get(K).size||(E.unobserve(K),p.delete(K)))}var b=C(99153),L=C(84851),D=C(19257),I=C(93046),re=function(K){(0,D.Z)(z,K);var ee=(0,I.Z)(z);function z(){return(0,b.Z)(this,z),ee.apply(this,arguments)}return(0,L.Z)(z,[{key:"render",value:function(){return this.props.children}}]),z}(ae.Component);function ce(K,ee){var z=K.children,Ae=K.disabled,Y=ae.useRef(null),y=ae.useRef(null),_=ae.useContext(A),V=typeof z=="function",de=V?z(Y):z,We=ae.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Qe=!V&&ae.isValidElement(de)&&(0,ie.Yr)(de),ct=Qe?(0,ie.C4)(de):null,Et=(0,ie.x1)(ct,Y),Mt=function(){var sn;return(0,ge.ZP)(Y.current)||(Y.current&&(0,h.Z)(Y.current)==="object"?(0,ge.ZP)((sn=Y.current)===null||sn===void 0?void 0:sn.nativeElement):null)||(0,ge.ZP)(y.current)};ae.useImperativeHandle(ee,function(){return Mt()});var Ot=ae.useRef(K);Ot.current=K;var Fe=ae.useCallback(function(kt){var sn=Ot.current,jt=sn.onResize,pn=sn.data,mt=kt.getBoundingClientRect(),ke=mt.width,xe=mt.height,W=kt.offsetWidth,Re=kt.offsetHeight,$e=Math.floor(ke),J=Math.floor(xe);if(We.current.width!==$e||We.current.height!==J||We.current.offsetWidth!==W||We.current.offsetHeight!==Re){var R={width:$e,height:J,offsetWidth:W,offsetHeight:Re};We.current=R;var k=W===Math.round(ke)?ke:W,se=Re===Math.round(xe)?xe:Re,$=(0,Q.Z)((0,Q.Z)({},R),{},{offsetWidth:k,offsetHeight:se});_==null||_($,kt,pn),jt&&Promise.resolve().then(function(){jt($,kt)})}},[]);return ae.useEffect(function(){var kt=Mt();return kt&&!Ae&&O(kt,Fe),function(){return Z(kt,Fe)}},[Y.current,Ae]),ae.createElement(re,{ref:y},Qe?ae.cloneElement(de,{ref:Et}):de)}var X=ae.forwardRef(ce),q=X,oe="rc-observer-key";function pe(K,ee){var z=K.children,Ae=typeof z=="function"?[z]:(0,ve.Z)(z);return Ae.map(function(Y,y){var _=(Y==null?void 0:Y.key)||"".concat(oe,"-").concat(y);return ae.createElement(q,(0,N.Z)({},K,{key:_,ref:y===0?ee:void 0}),Y)})}var _e=ae.forwardRef(pe);_e.Collection=B;var j=_e},6551:function(Fn,st,C){"use strict";C.d(st,{ZP:function(){return ge}});var N=C(50298),ae=C(59301),ve=C(47273),le=0,Q=(0,ve.Z)();function h(){var ie;return Q?(ie=le,le+=1):ie="TEST_OR_SSR",ie}function ge(ie){var A=ae.useState(),B=(0,N.Z)(A,2),T=B[0],p=B[1];return ae.useEffect(function(){p("rc_select_".concat(h()))},[]),ie||T}},37463:function(Fn,st,C){"use strict";C.d(st,{Ac:function(){return ft},Xo:function(){return Ct},Wx:function(){return en},ZP:function(){return br},lk:function(){return L}});var N=C(14809),ae=C(95190),ve=C(4635),le=C(20439),Q=C(50298),h=C(62646),ge=C(93664),ie=C(18929),A=C(48736),B=C(59301),T=C(92310),p=C.n(T),v=C(34280),E=C(49658),S=C(8654),F=function(Ve){var Yt=Ve.className,Pt=Ve.customizeIcon,An=Ve.customizeIconProps,un=Ve.children,yt=Ve.onMouseDown,pt=Ve.onClick,Lt=typeof Pt=="function"?Pt(An):Pt;return B.createElement("span",{className:Yt,onMouseDown:function(dn){dn.preventDefault(),yt==null||yt(dn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:pt,"aria-hidden":!0},Lt!==void 0?Lt:B.createElement("span",{className:p()(Yt.split(/\s+/).map(function(rn){return"".concat(rn,"-icon")}))},un))},O=F,Z=function(Ve,Yt,Pt,An,un){var yt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,pt=arguments.length>6?arguments[6]:void 0,Lt=arguments.length>7?arguments[7]:void 0,rn=B.useMemo(function(){if((0,ge.Z)(An)==="object")return An.clearIcon;if(un)return un},[An,un]),dn=B.useMemo(function(){return!!(!yt&&An&&(Pt.length||pt)&&!(Lt==="combobox"&&pt===""))},[An,yt,Pt.length,pt,Lt]);return{allowClear:dn,clearIcon:B.createElement(O,{className:"".concat(Ve,"-clear"),onMouseDown:Yt,customizeIcon:rn},"\xD7")}},b=B.createContext(null);function L(){return B.useContext(b)}function D(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ve=B.useState(!1),Yt=(0,Q.Z)(Ve,2),Pt=Yt[0],An=Yt[1],un=B.useRef(null),yt=function(){window.clearTimeout(un.current)};B.useEffect(function(){return yt},[]);var pt=function(rn,dn){yt(),un.current=window.setTimeout(function(){An(rn),dn&&dn()},je)};return[Pt,pt,yt]}function I(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ve=B.useRef(null),Yt=B.useRef(null);B.useEffect(function(){return function(){window.clearTimeout(Yt.current)}},[]);function Pt(An){(An||Ve.current===null)&&(Ve.current=An),window.clearTimeout(Yt.current),Yt.current=window.setTimeout(function(){Ve.current=null},je)}return[function(){return Ve.current},Pt]}function re(je,Ve,Yt,Pt){var An=B.useRef(null);An.current={open:Ve,triggerOpen:Yt,customizedTrigger:Pt},B.useEffect(function(){function un(yt){var pt;if(!((pt=An.current)!==null&&pt!==void 0&&pt.customizedTrigger)){var Lt=yt.target;Lt.shadowRoot&&yt.composed&&(Lt=yt.composedPath()[0]||Lt),An.current.open&&je().filter(function(rn){return rn}).every(function(rn){return!rn.contains(Lt)&&rn!==Lt})&&An.current.triggerOpen(!1)}}return window.addEventListener("mousedown",un),function(){return window.removeEventListener("mousedown",un)}},[])}var ce=C(10228);function X(je){return je&&![ce.Z.ESC,ce.Z.SHIFT,ce.Z.BACKSPACE,ce.Z.TAB,ce.Z.WIN_KEY,ce.Z.ALT,ce.Z.META,ce.Z.WIN_KEY_RIGHT,ce.Z.CTRL,ce.Z.SEMICOLON,ce.Z.EQUALS,ce.Z.CAPS_LOCK,ce.Z.CONTEXT_MENU,ce.Z.F1,ce.Z.F2,ce.Z.F3,ce.Z.F4,ce.Z.F5,ce.Z.F6,ce.Z.F7,ce.Z.F8,ce.Z.F9,ce.Z.F10,ce.Z.F11,ce.Z.F12].includes(je)}var q=C(26112),oe=C(11780);function pe(je,Ve,Yt){var Pt=(0,le.Z)((0,le.Z)({},je),Yt?Ve:{});return Object.keys(Ve).forEach(function(An){var un=Ve[An];typeof un=="function"&&(Pt[An]=function(){for(var yt,pt=arguments.length,Lt=new Array(pt),rn=0;rn<pt;rn++)Lt[rn]=arguments[rn];return un.apply(void 0,Lt),(yt=je[An])===null||yt===void 0?void 0:yt.call.apply(yt,[je].concat(Lt))})}),Pt}var _e=pe,j=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],K=function(Ve,Yt){var Pt=Ve.prefixCls,An=Ve.id,un=Ve.inputElement,yt=Ve.autoFocus,pt=Ve.autoComplete,Lt=Ve.editable,rn=Ve.activeDescendantId,dn=Ve.value,xn=Ve.open,dt=Ve.attrs,$t=(0,h.Z)(Ve,j),Le=un||B.createElement("input",null),Xe=Le,gt=Xe.ref,_t=Xe.props;return(0,A.Kp)(!("maxLength"in Le.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Le=B.cloneElement(Le,(0,le.Z)((0,le.Z)((0,le.Z)({type:"search"},_e($t,_t,!0)),{},{id:An,ref:(0,S.sQ)(Yt,gt),autoComplete:pt||"off",autoFocus:yt,className:p()("".concat(Pt,"-selection-search-input"),_t==null?void 0:_t.className),role:"combobox","aria-expanded":xn||!1,"aria-haspopup":"listbox","aria-owns":"".concat(An,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(An,"_list"),"aria-activedescendant":xn?rn:void 0},dt),{},{value:Lt?dn:"",readOnly:!Lt,unselectable:Lt?null:"on",style:(0,le.Z)((0,le.Z)({},_t.style),{},{opacity:Lt?null:0})})),Le},ee=B.forwardRef(K),z=ee;function Ae(je){return Array.isArray(je)?je:je!==void 0?[je]:[]}var Y=typeof window!="undefined"&&window.document&&window.document.documentElement,y=Y;function _(je){return je!=null}function V(je){return!je&&je!==0}function de(je){return["string","number"].includes((0,ge.Z)(je))}function We(je){var Ve=void 0;return je&&(de(je.title)?Ve=je.title.toString():de(je.label)&&(Ve=je.label.toString())),Ve}function Qe(je,Ve){y?B.useLayoutEffect(je,Ve):B.useEffect(je,Ve)}function ct(je){var Ve;return(Ve=je.key)!==null&&Ve!==void 0?Ve:je.value}var Et=function(Ve){Ve.preventDefault(),Ve.stopPropagation()},Mt=function(Ve){var Yt=Ve.id,Pt=Ve.prefixCls,An=Ve.values,un=Ve.open,yt=Ve.searchValue,pt=Ve.autoClearSearchValue,Lt=Ve.inputRef,rn=Ve.placeholder,dn=Ve.disabled,xn=Ve.mode,dt=Ve.showSearch,$t=Ve.autoFocus,Le=Ve.autoComplete,Xe=Ve.activeDescendantId,gt=Ve.tabIndex,_t=Ve.removeIcon,Qt=Ve.maxTagCount,Xt=Ve.maxTagTextLength,Rt=Ve.maxTagPlaceholder,Jt=Rt===void 0?function(at){return"+ ".concat(at.length," ...")}:Rt,fn=Ve.tagRender,bn=Ve.onToggleOpen,nt=Ve.onRemove,cn=Ve.onInputChange,_n=Ve.onInputPaste,U=Ve.onInputKeyDown,M=Ve.onInputMouseDown,he=Ve.onInputCompositionStart,Be=Ve.onInputCompositionEnd,Ze=Ve.onInputBlur,ze=B.useRef(null),ht=(0,B.useState)(0),wt=(0,Q.Z)(ht,2),zt=wt[0],St=wt[1],Tt=(0,B.useState)(!1),tn=(0,Q.Z)(Tt,2),ue=tn[0],Oe=tn[1],Pe="".concat(Pt,"-selection"),Me=un||xn==="multiple"&&pt===!1||xn==="tags"?yt:"",Je=xn==="tags"||xn==="multiple"&&pt===!1||dt&&(un||ue);Qe(function(){St(ze.current.scrollWidth)},[Me]);var ut=function(it,At,Ht,qt,an){return B.createElement("span",{title:We(it),className:p()("".concat(Pe,"-item"),(0,ve.Z)({},"".concat(Pe,"-item-disabled"),Ht))},B.createElement("span",{className:"".concat(Pe,"-item-content")},At),qt&&B.createElement(O,{className:"".concat(Pe,"-item-remove"),onMouseDown:Et,onClick:an,customizeIcon:_t},"\xD7"))},It=function(it,At,Ht,qt,an,Sn){var Rn=function(On){Et(On),bn(!un)};return B.createElement("span",{onMouseDown:Rn},fn({label:At,value:it,disabled:Ht,closable:qt,onClose:an,isMaxTag:!!Sn}))},Bt=function(it){var At=it.disabled,Ht=it.label,qt=it.value,an=!dn&&!At,Sn=Ht;if(typeof Xt=="number"&&(typeof Ht=="string"||typeof Ht=="number")){var Rn=String(Sn);Rn.length>Xt&&(Sn="".concat(Rn.slice(0,Xt),"..."))}var yn=function(hn){hn&&hn.stopPropagation(),nt(it)};return typeof fn=="function"?It(qt,Sn,At,an,yn):ut(it,Sn,At,an,yn)},lt=function(it){if(!An.length)return null;var At=typeof Jt=="function"?Jt(it):Jt;return typeof fn=="function"?It(void 0,At,!1,!1,void 0,!0):ut({title:At},At,!1)},Ke=B.createElement("div",{className:"".concat(Pe,"-search"),style:{width:zt},onFocus:function(){Oe(!0)},onBlur:function(){Oe(!1)}},B.createElement(z,{ref:Lt,open:un,prefixCls:Pt,id:Yt,inputElement:null,disabled:dn,autoFocus:$t,autoComplete:Le,editable:Je,activeDescendantId:Xe,value:Me,onKeyDown:U,onMouseDown:M,onChange:cn,onPaste:_n,onCompositionStart:he,onCompositionEnd:Be,onBlur:Ze,tabIndex:gt,attrs:(0,q.Z)(Ve,!0)}),B.createElement("span",{ref:ze,className:"".concat(Pe,"-search-mirror"),"aria-hidden":!0},Me,"\xA0")),tt=B.createElement(oe.Z,{prefixCls:"".concat(Pe,"-overflow"),data:An,renderItem:Bt,renderRest:lt,suffix:Ke,itemKey:ct,maxCount:Qt});return B.createElement("span",{className:"".concat(Pe,"-wrap")},tt,!An.length&&!Me&&B.createElement("span",{className:"".concat(Pe,"-placeholder")},rn))},Ot=Mt,Fe=function(Ve){var Yt=Ve.inputElement,Pt=Ve.prefixCls,An=Ve.id,un=Ve.inputRef,yt=Ve.disabled,pt=Ve.autoFocus,Lt=Ve.autoComplete,rn=Ve.activeDescendantId,dn=Ve.mode,xn=Ve.open,dt=Ve.values,$t=Ve.placeholder,Le=Ve.tabIndex,Xe=Ve.showSearch,gt=Ve.searchValue,_t=Ve.activeValue,Qt=Ve.maxLength,Xt=Ve.onInputKeyDown,Rt=Ve.onInputMouseDown,Jt=Ve.onInputChange,fn=Ve.onInputPaste,bn=Ve.onInputCompositionStart,nt=Ve.onInputCompositionEnd,cn=Ve.onInputBlur,_n=Ve.title,U=B.useState(!1),M=(0,Q.Z)(U,2),he=M[0],Be=M[1],Ze=dn==="combobox",ze=Ze||Xe,ht=dt[0],wt=gt||"";Ze&&_t&&!he&&(wt=_t),B.useEffect(function(){Ze&&Be(!1)},[Ze,_t]);var zt=dn!=="combobox"&&!xn&&!Xe?!1:!!wt,St=_n===void 0?We(ht):_n,Tt=B.useMemo(function(){return ht?null:B.createElement("span",{className:"".concat(Pt,"-selection-placeholder"),style:zt?{visibility:"hidden"}:void 0},$t)},[ht,zt,$t,Pt]);return B.createElement("span",{className:"".concat(Pt,"-selection-wrap")},B.createElement("span",{className:"".concat(Pt,"-selection-search")},B.createElement(z,{ref:un,prefixCls:Pt,id:An,open:xn,inputElement:Yt,disabled:yt,autoFocus:pt,autoComplete:Lt,editable:ze,activeDescendantId:rn,value:wt,onKeyDown:Xt,onMouseDown:Rt,onChange:function(ue){Be(!0),Jt(ue)},onPaste:fn,onCompositionStart:bn,onCompositionEnd:nt,onBlur:cn,tabIndex:Le,attrs:(0,q.Z)(Ve,!0),maxLength:Ze?Qt:void 0})),!Ze&&ht?B.createElement("span",{className:"".concat(Pt,"-selection-item"),title:St,style:zt?{visibility:"hidden"}:void 0},ht.label):null,Tt)},kt=Fe,sn=function(Ve,Yt){var Pt=(0,B.useRef)(null),An=(0,B.useRef)(!1),un=Ve.prefixCls,yt=Ve.open,pt=Ve.mode,Lt=Ve.showSearch,rn=Ve.tokenWithEnter,dn=Ve.disabled,xn=Ve.prefix,dt=Ve.autoClearSearchValue,$t=Ve.onSearch,Le=Ve.onSearchSubmit,Xe=Ve.onToggleOpen,gt=Ve.onInputKeyDown,_t=Ve.onInputBlur,Qt=Ve.domRef;B.useImperativeHandle(Yt,function(){return{focus:function(St){Pt.current.focus(St)},blur:function(){Pt.current.blur()}}});var Xt=I(0),Rt=(0,Q.Z)(Xt,2),Jt=Rt[0],fn=Rt[1],bn=function(St){var Tt=St.which,tn=Pt.current instanceof HTMLTextAreaElement;!tn&&yt&&(Tt===ce.Z.UP||Tt===ce.Z.DOWN)&&St.preventDefault(),gt&>(St),Tt===ce.Z.ENTER&&pt==="tags"&&!An.current&&!yt&&(Le==null||Le(St.target.value)),!(tn&&!yt&&~[ce.Z.UP,ce.Z.DOWN,ce.Z.LEFT,ce.Z.RIGHT].indexOf(Tt))&&X(Tt)&&Xe(!0)},nt=function(){fn(!0)},cn=(0,B.useRef)(null),_n=function(St){$t(St,!0,An.current)!==!1&&Xe(!0)},U=function(){An.current=!0},M=function(St){An.current=!1,pt!=="combobox"&&_n(St.target.value)},he=function(St){var Tt=St.target.value;if(rn&&cn.current&&/[\r\n]/.test(cn.current)){var tn=cn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Tt=Tt.replace(tn,cn.current)}cn.current=null,_n(Tt)},Be=function(St){var Tt=St.clipboardData,tn=Tt==null?void 0:Tt.getData("text");cn.current=tn||""},Ze=function(St){var Tt=St.target;if(Tt!==Pt.current){var tn=document.body.style.msTouchAction!==void 0;tn?setTimeout(function(){Pt.current.focus()}):Pt.current.focus()}},ze=function(St){var Tt=Jt();St.target!==Pt.current&&!Tt&&!(pt==="combobox"&&dn)&&St.preventDefault(),(pt!=="combobox"&&(!Lt||!Tt)||!yt)&&(yt&&dt!==!1&&$t("",!0,!1),Xe())},ht={inputRef:Pt,onInputKeyDown:bn,onInputMouseDown:nt,onInputChange:he,onInputPaste:Be,onInputCompositionStart:U,onInputCompositionEnd:M,onInputBlur:_t},wt=pt==="multiple"||pt==="tags"?B.createElement(Ot,(0,N.Z)({},Ve,ht)):B.createElement(kt,(0,N.Z)({},Ve,ht));return B.createElement("div",{ref:Qt,className:"".concat(un,"-selector"),onClick:Ze,onMouseDown:ze},xn&&B.createElement("div",{className:"".concat(un,"-prefix")},xn),wt)},jt=B.forwardRef(sn),pn=jt,mt=C(65966),ke=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],xe=function(Ve){var Yt=Ve===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Yt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Yt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Yt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Yt,adjustY:1},htmlRegion:"scroll"}}},W=function(Ve,Yt){var Pt=Ve.prefixCls,An=Ve.disabled,un=Ve.visible,yt=Ve.children,pt=Ve.popupElement,Lt=Ve.animation,rn=Ve.transitionName,dn=Ve.dropdownStyle,xn=Ve.dropdownClassName,dt=Ve.direction,$t=dt===void 0?"ltr":dt,Le=Ve.placement,Xe=Ve.builtinPlacements,gt=Ve.dropdownMatchSelectWidth,_t=Ve.dropdownRender,Qt=Ve.dropdownAlign,Xt=Ve.getPopupContainer,Rt=Ve.empty,Jt=Ve.getTriggerDOMNode,fn=Ve.onPopupVisibleChange,bn=Ve.onPopupMouseEnter,nt=(0,h.Z)(Ve,ke),cn="".concat(Pt,"-dropdown"),_n=pt;_t&&(_n=_t(pt));var U=B.useMemo(function(){return Xe||xe(gt)},[Xe,gt]),M=Lt?"".concat(cn,"-").concat(Lt):rn,he=typeof gt=="number",Be=B.useMemo(function(){return he?null:gt===!1?"minWidth":"width"},[gt,he]),Ze=dn;he&&(Ze=(0,le.Z)((0,le.Z)({},Ze),{},{width:gt}));var ze=B.useRef(null);return B.useImperativeHandle(Yt,function(){return{getPopupElement:function(){var wt;return(wt=ze.current)===null||wt===void 0?void 0:wt.popupElement}}}),B.createElement(mt.Z,(0,N.Z)({},nt,{showAction:fn?["click"]:[],hideAction:fn?["click"]:[],popupPlacement:Le||($t==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:U,prefixCls:cn,popupTransitionName:M,popup:B.createElement("div",{onMouseEnter:bn},_n),ref:ze,stretch:Be,popupAlign:Qt,popupVisible:un,getPopupContainer:Xt,popupClassName:p()(xn,(0,ve.Z)({},"".concat(cn,"-empty"),Rt)),popupStyle:Ze,getTriggerDOMNode:Jt,onPopupVisibleChange:fn}),yt)},Re=B.forwardRef(W),$e=Re,J=C(21696);function R(je,Ve){var Yt=je.key,Pt;return"value"in je&&(Pt=je.value),Yt!=null?Yt:Pt!==void 0?Pt:"rc-index-key-".concat(Ve)}function k(je){return typeof je!="undefined"&&!Number.isNaN(je)}function se(je,Ve){var Yt=je||{},Pt=Yt.label,An=Yt.value,un=Yt.options,yt=Yt.groupLabel,pt=Pt||(Ve?"children":"label");return{label:pt,value:An||"value",options:un||"options",groupLabel:yt||pt}}function $(je){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Yt=Ve.fieldNames,Pt=Ve.childrenAsData,An=[],un=se(Yt,!1),yt=un.label,pt=un.value,Lt=un.options,rn=un.groupLabel;function dn(xn,dt){Array.isArray(xn)&&xn.forEach(function($t){if(dt||!(Lt in $t)){var Le=$t[pt];An.push({key:R($t,An.length),groupOption:dt,data:$t,label:$t[yt],value:Le})}else{var Xe=$t[rn];Xe===void 0&&Pt&&(Xe=$t.label),An.push({key:R($t,An.length),group:!0,data:$t,label:Xe}),dn($t[Lt],!0)}})}return dn(je,!1),An}function G(je){var Ve=(0,le.Z)({},je);return"props"in Ve||Object.defineProperty(Ve,"props",{get:function(){return(0,A.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ve}}),Ve}var te=function(Ve,Yt,Pt){if(!Yt||!Yt.length)return null;var An=!1,un=function pt(Lt,rn){var dn=(0,J.Z)(rn),xn=dn[0],dt=dn.slice(1);if(!xn)return[Lt];var $t=Lt.split(xn);return An=An||$t.length>1,$t.reduce(function(Le,Xe){return[].concat((0,ae.Z)(Le),(0,ae.Z)(pt(Xe,dt)))},[]).filter(Boolean)},yt=un(Ve,Yt);return An?typeof Pt!="undefined"?yt.slice(0,Pt):yt:null},Ce=B.createContext(null),we=Ce;function Se(je){var Ve=je.visible,Yt=je.values;if(!Ve)return null;var Pt=50;return B.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Yt.slice(0,Pt).map(function(An){var un=An.label,yt=An.value;return["number","string"].includes((0,ge.Z)(un))?un:yt}).join(", ")),Yt.length>Pt?", ...":null)}var Ie=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Ne=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],qe=function(Ve){return Ve==="tags"||Ve==="multiple"},et=B.forwardRef(function(je,Ve){var Yt,Pt=je.id,An=je.prefixCls,un=je.className,yt=je.showSearch,pt=je.tagRender,Lt=je.direction,rn=je.omitDomProps,dn=je.displayValues,xn=je.onDisplayValuesChange,dt=je.emptyOptions,$t=je.notFoundContent,Le=$t===void 0?"Not Found":$t,Xe=je.onClear,gt=je.mode,_t=je.disabled,Qt=je.loading,Xt=je.getInputElement,Rt=je.getRawInputElement,Jt=je.open,fn=je.defaultOpen,bn=je.onDropdownVisibleChange,nt=je.activeValue,cn=je.onActiveValueChange,_n=je.activeDescendantId,U=je.searchValue,M=je.autoClearSearchValue,he=je.onSearch,Be=je.onSearchSplit,Ze=je.tokenSeparators,ze=je.allowClear,ht=je.prefix,wt=je.suffixIcon,zt=je.clearIcon,St=je.OptionList,Tt=je.animation,tn=je.transitionName,ue=je.dropdownStyle,Oe=je.dropdownClassName,Pe=je.dropdownMatchSelectWidth,Me=je.dropdownRender,Je=je.dropdownAlign,ut=je.placement,It=je.builtinPlacements,Bt=je.getPopupContainer,lt=je.showAction,Ke=lt===void 0?[]:lt,tt=je.onFocus,at=je.onBlur,it=je.onKeyUp,At=je.onKeyDown,Ht=je.onMouseDown,qt=(0,h.Z)(je,Ie),an=qe(gt),Sn=(yt!==void 0?yt:an)||gt==="combobox",Rn=(0,le.Z)({},qt);Ne.forEach(function(Dr){delete Rn[Dr]}),rn==null||rn.forEach(function(Dr){delete Rn[Dr]});var yn=B.useState(!1),On=(0,Q.Z)(yn,2),hn=On[0],Vn=On[1];B.useEffect(function(){Vn((0,E.Z)())},[]);var Mn=B.useRef(null),En=B.useRef(null),Hn=B.useRef(null),Gn=B.useRef(null),er=B.useRef(null),jn=B.useRef(!1),$n=D(),Nn=(0,Q.Z)($n,3),In=Nn[0],Bn=Nn[1],ir=Nn[2];B.useImperativeHandle(Ve,function(){var Dr,xr;return{focus:(Dr=Gn.current)===null||Dr===void 0?void 0:Dr.focus,blur:(xr=Gn.current)===null||xr===void 0?void 0:xr.blur,scrollTo:function(ni){var ii;return(ii=er.current)===null||ii===void 0?void 0:ii.scrollTo(ni)},nativeElement:Mn.current||En.current}});var mr=B.useMemo(function(){var Dr;if(gt!=="combobox")return U;var xr=(Dr=dn[0])===null||Dr===void 0?void 0:Dr.value;return typeof xr=="string"||typeof xr=="number"?String(xr):""},[U,gt,dn]),fr=gt==="combobox"&&typeof Xt=="function"&&Xt()||null,dr=typeof Rt=="function"&&Rt(),kr=(0,S.x1)(En,dr==null||(Yt=dr.props)===null||Yt===void 0?void 0:Yt.ref),Wr=B.useState(!1),Kr=(0,Q.Z)(Wr,2),Ai=Kr[0],Jr=Kr[1];(0,v.Z)(function(){Jr(!0)},[]);var ei=(0,ie.Z)(!1,{defaultValue:fn,value:Jt}),Tr=(0,Q.Z)(ei,2),Rr=Tr[0],ti=Tr[1],Cr=Ai?Rr:!1,Zn=!Le&&dt;(_t||Zn&&Cr&>==="combobox")&&(Cr=!1);var yr=Zn?!1:Cr,Qn=B.useCallback(function(Dr){var xr=Dr!==void 0?Dr:!Cr;_t||(ti(xr),Cr!==xr&&(bn==null||bn(xr)))},[_t,Cr,ti,bn]),Ar=B.useMemo(function(){return(Ze||[]).some(function(Dr){return[`
|
|
`,`\r
|
|
`].includes(Dr)})},[Ze]),ur=B.useContext(we)||{},hr=ur.maxCount,Er=ur.rawValues,Fr=function(xr,Hr,ni){if(!(an&&k(hr)&&(Er==null?void 0:Er.size)>=hr)){var ii=!0,qr=xr;cn==null||cn(null);var xi=te(xr,Ze,k(hr)?hr-Er.size:void 0),Si=ni?null:xi;return gt!=="combobox"&&Si&&(qr="",Be==null||Be(Si),Qn(!1),ii=!1),he&&mr!==qr&&he(qr,{source:Hr?"typing":"effect"}),ii}},wn=function(xr){!xr||!xr.trim()||he(xr,{source:"submit"})};B.useEffect(function(){!Cr&&!an&>!=="combobox"&&Fr("",!1,!1)},[Cr]),B.useEffect(function(){Rr&&_t&&ti(!1),_t&&!jn.current&&Bn(!1)},[_t]);var tr=I(),Ir=(0,Q.Z)(tr,2),nr=Ir[0],wr=Ir[1],Nr=B.useRef(!1),Yr=function(xr){var Hr=nr(),ni=xr.key,ii=ni==="Enter";if(ii&&(gt!=="combobox"&&xr.preventDefault(),Cr||Qn(!0)),wr(!!mr),ni==="Backspace"&&!Hr&&an&&!mr&&dn.length){for(var qr=(0,ae.Z)(dn),xi=null,Si=qr.length-1;Si>=0;Si-=1){var Ti=qr[Si];if(!Ti.disabled){qr.splice(Si,1),xi=Ti;break}}xi&&xn(qr,{type:"remove",values:[xi]})}for(var Vr=arguments.length,mi=new Array(Vr>1?Vr-1:0),Ni=1;Ni<Vr;Ni++)mi[Ni-1]=arguments[Ni];if(Cr&&(!ii||!Nr.current)){var Hi;ii&&(Nr.current=!0),(Hi=er.current)===null||Hi===void 0||Hi.onKeyDown.apply(Hi,[xr].concat(mi))}At==null||At.apply(void 0,[xr].concat(mi))},ri=function(xr){for(var Hr=arguments.length,ni=new Array(Hr>1?Hr-1:0),ii=1;ii<Hr;ii++)ni[ii-1]=arguments[ii];if(Cr){var qr;(qr=er.current)===null||qr===void 0||qr.onKeyUp.apply(qr,[xr].concat(ni))}xr.key==="Enter"&&(Nr.current=!1),it==null||it.apply(void 0,[xr].concat(ni))},Pr=function(xr){var Hr=dn.filter(function(ni){return ni!==xr});xn(Hr,{type:"remove",values:[xr]})},wi=function(){Nr.current=!1},Ur=B.useRef(!1),ls=function(){Bn(!0),_t||(tt&&!Ur.current&&tt.apply(void 0,arguments),Ke.includes("focus")&&Qn(!0)),Ur.current=!0},li=function(){jn.current=!0,Bn(!1,function(){Ur.current=!1,jn.current=!1,Qn(!1)}),!_t&&(mr&&(gt==="tags"?he(mr,{source:"submit"}):gt==="multiple"&&he("",{source:"blur"})),at&&at.apply(void 0,arguments))},bi=[];B.useEffect(function(){return function(){bi.forEach(function(Dr){return clearTimeout(Dr)}),bi.splice(0,bi.length)}},[]);var Gr=function(xr){var Hr,ni=xr.target,ii=(Hr=Hn.current)===null||Hr===void 0?void 0:Hr.getPopupElement();if(ii&&ii.contains(ni)){var qr=setTimeout(function(){var Vr=bi.indexOf(qr);if(Vr!==-1&&bi.splice(Vr,1),ir(),!hn&&!ii.contains(document.activeElement)){var mi;(mi=Gn.current)===null||mi===void 0||mi.focus()}});bi.push(qr)}for(var xi=arguments.length,Si=new Array(xi>1?xi-1:0),Ti=1;Ti<xi;Ti++)Si[Ti-1]=arguments[Ti];Ht==null||Ht.apply(void 0,[xr].concat(Si))},Zi=B.useState({}),Wi=(0,Q.Z)(Zi,2),ns=Wi[1];function Fi(){ns({})}var zi;dr&&(zi=function(xr){Qn(xr)}),re(function(){var Dr;return[Mn.current,(Dr=Hn.current)===null||Dr===void 0?void 0:Dr.getPopupElement()]},yr,Qn,!!dr);var Ui=B.useMemo(function(){return(0,le.Z)((0,le.Z)({},je),{},{notFoundContent:Le,open:Cr,triggerOpen:yr,id:Pt,showSearch:Sn,multiple:an,toggleOpen:Qn})},[je,Le,yr,Cr,Pt,Sn,an,Qn]),us=!!wt||Qt,fi;us&&(fi=B.createElement(O,{className:p()("".concat(An,"-arrow"),(0,ve.Z)({},"".concat(An,"-arrow-loading"),Qt)),customizeIcon:wt,customizeIconProps:{loading:Qt,searchValue:mr,open:Cr,focused:In,showSearch:Sn}}));var di=function(){var xr;Xe==null||Xe(),(xr=Gn.current)===null||xr===void 0||xr.focus(),xn([],{type:"clear",values:dn}),Fr("",!1,!1)},Ci=Z(An,di,dn,ze,zt,_t,mr,gt),ai=Ci.allowClear,Di=Ci.clearIcon,hs=B.createElement(St,{ref:er}),rs=p()(An,un,(0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(An,"-focused"),In),"".concat(An,"-multiple"),an),"".concat(An,"-single"),!an),"".concat(An,"-allow-clear"),ze),"".concat(An,"-show-arrow"),us),"".concat(An,"-disabled"),_t),"".concat(An,"-loading"),Qt),"".concat(An,"-open"),Cr),"".concat(An,"-customize-input"),fr),"".concat(An,"-show-search"),Sn)),gi=B.createElement($e,{ref:Hn,disabled:_t,prefixCls:An,visible:yr,popupElement:hs,animation:Tt,transitionName:tn,dropdownStyle:ue,dropdownClassName:Oe,direction:Lt,dropdownMatchSelectWidth:Pe,dropdownRender:Me,dropdownAlign:Je,placement:ut,builtinPlacements:It,getPopupContainer:Bt,empty:dt,getTriggerDOMNode:function(xr){return En.current||xr},onPopupVisibleChange:zi,onPopupMouseEnter:Fi},dr?B.cloneElement(dr,{ref:kr}):B.createElement(pn,(0,N.Z)({},je,{domRef:En,prefixCls:An,inputElement:fr,ref:Gn,id:Pt,prefix:ht,showSearch:Sn,autoClearSearchValue:M,mode:gt,activeDescendantId:_n,tagRender:pt,values:dn,open:Cr,onToggleOpen:Qn,activeValue:nt,searchValue:mr,onSearch:Fr,onSearchSubmit:wn,onRemove:Pr,tokenWithEnter:Ar,onInputBlur:wi}))),ci;return dr?ci=gi:ci=B.createElement("div",(0,N.Z)({className:rs},Rn,{ref:Mn,onMouseDown:Gr,onKeyDown:Yr,onKeyUp:ri,onFocus:ls,onBlur:li}),B.createElement(Se,{visible:In&&!Cr,values:dn}),gi,fi,ai&&Di),B.createElement(b.Provider,{value:Ui},ci)}),ft=et,Kt=function(){return null};Kt.isSelectOptGroup=!0;var Ct=Kt,vt=function(){return null};vt.isSelectOption=!0;var en=vt,on=C(80547),Vt=C(2738),gn=C(65283);function Pn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Gt=["disabled","title","children","style","className"];function mn(je){return typeof je=="string"||typeof je=="number"}var Ye=function(Ve,Yt){var Pt=L(),An=Pt.prefixCls,un=Pt.id,yt=Pt.open,pt=Pt.multiple,Lt=Pt.mode,rn=Pt.searchValue,dn=Pt.toggleOpen,xn=Pt.notFoundContent,dt=Pt.onPopupScroll,$t=B.useContext(we),Le=$t.maxCount,Xe=$t.flattenOptions,gt=$t.onActiveValue,_t=$t.defaultActiveFirstOption,Qt=$t.onSelect,Xt=$t.menuItemSelectedIcon,Rt=$t.rawValues,Jt=$t.fieldNames,fn=$t.virtual,bn=$t.direction,nt=$t.listHeight,cn=$t.listItemHeight,_n=$t.optionRender,U="".concat(An,"-item"),M=(0,on.Z)(function(){return Xe},[yt,Xe],function(lt,Ke){return Ke[0]&<[1]!==Ke[1]}),he=B.useRef(null),Be=B.useMemo(function(){return pt&&k(Le)&&(Rt==null?void 0:Rt.size)>=Le},[pt,Le,Rt==null?void 0:Rt.size]),Ze=function(Ke){Ke.preventDefault()},ze=function(Ke){var tt;(tt=he.current)===null||tt===void 0||tt.scrollTo(typeof Ke=="number"?{index:Ke}:Ke)},ht=B.useCallback(function(lt){return Lt==="combobox"?!1:Rt.has(lt)},[Lt,(0,ae.Z)(Rt).toString(),Rt.size]),wt=function(Ke){for(var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,at=M.length,it=0;it<at;it+=1){var At=(Ke+it*tt+at)%at,Ht=M[At]||{},qt=Ht.group,an=Ht.data;if(!qt&&!(an!=null&&an.disabled)&&(ht(an.value)||!Be))return At}return-1},zt=B.useState(function(){return wt(0)}),St=(0,Q.Z)(zt,2),Tt=St[0],tn=St[1],ue=function(Ke){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;tn(Ke);var at={source:tt?"keyboard":"mouse"},it=M[Ke];if(!it){gt(null,-1,at);return}gt(it.value,Ke,at)};(0,B.useEffect)(function(){ue(_t!==!1?wt(0):-1)},[M.length,rn]);var Oe=B.useCallback(function(lt){return Lt==="combobox"?String(lt).toLowerCase()===rn.toLowerCase():Rt.has(lt)},[Lt,rn,(0,ae.Z)(Rt).toString(),Rt.size]);(0,B.useEffect)(function(){var lt=setTimeout(function(){if(!pt&&yt&&Rt.size===1){var tt=Array.from(Rt)[0],at=M.findIndex(function(it){var At=it.data;return rn?String(At.value).startsWith(rn):At.value===tt});at!==-1&&(ue(at),ze(at))}});if(yt){var Ke;(Ke=he.current)===null||Ke===void 0||Ke.scrollTo(void 0)}return function(){return clearTimeout(lt)}},[yt,rn]);var Pe=function(Ke){Ke!==void 0&&Qt(Ke,{selected:!Rt.has(Ke)}),pt||dn(!1)};if(B.useImperativeHandle(Yt,function(){return{onKeyDown:function(Ke){var tt=Ke.which,at=Ke.ctrlKey;switch(tt){case ce.Z.N:case ce.Z.P:case ce.Z.UP:case ce.Z.DOWN:{var it=0;if(tt===ce.Z.UP?it=-1:tt===ce.Z.DOWN?it=1:Pn()&&at&&(tt===ce.Z.N?it=1:tt===ce.Z.P&&(it=-1)),it!==0){var At=wt(Tt+it,it);ze(At),ue(At,!0)}break}case ce.Z.TAB:case ce.Z.ENTER:{var Ht,qt=M[Tt];qt&&!(qt!=null&&(Ht=qt.data)!==null&&Ht!==void 0&&Ht.disabled)&&!Be?Pe(qt.value):Pe(void 0),yt&&Ke.preventDefault();break}case ce.Z.ESC:dn(!1),yt&&Ke.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ke){ze(Ke)}}}),M.length===0)return B.createElement("div",{role:"listbox",id:"".concat(un,"_list"),className:"".concat(U,"-empty"),onMouseDown:Ze},xn);var Me=Object.keys(Jt).map(function(lt){return Jt[lt]}),Je=function(Ke){return Ke.label};function ut(lt,Ke){var tt=lt.group;return{role:tt?"presentation":"option",id:"".concat(un,"_list_").concat(Ke)}}var It=function(Ke){var tt=M[Ke];if(!tt)return null;var at=tt.data||{},it=at.value,At=tt.group,Ht=(0,q.Z)(at,!0),qt=Je(tt);return tt?B.createElement("div",(0,N.Z)({"aria-label":typeof qt=="string"&&!At?qt:null},Ht,{key:Ke},ut(tt,Ke),{"aria-selected":Oe(it)}),it):null},Bt={role:"listbox",id:"".concat(un,"_list")};return B.createElement(B.Fragment,null,fn&&B.createElement("div",(0,N.Z)({},Bt,{style:{height:0,width:0,overflow:"hidden"}}),It(Tt-1),It(Tt),It(Tt+1)),B.createElement(gn.Z,{itemKey:"key",ref:he,data:M,height:nt,itemHeight:cn,fullHeight:!1,onMouseDown:Ze,onScroll:dt,virtual:fn,direction:bn,innerProps:fn?null:Bt},function(lt,Ke){var tt=lt.group,at=lt.groupOption,it=lt.data,At=lt.label,Ht=lt.value,qt=it.key;if(tt){var an,Sn=(an=it.title)!==null&&an!==void 0?an:mn(At)?At.toString():void 0;return B.createElement("div",{className:p()(U,"".concat(U,"-group"),it.className),title:Sn},At!==void 0?At:qt)}var Rn=it.disabled,yn=it.title,On=it.children,hn=it.style,Vn=it.className,Mn=(0,h.Z)(it,Gt),En=(0,Vt.Z)(Mn,Me),Hn=ht(Ht),Gn=Rn||!Hn&&Be,er="".concat(U,"-option"),jn=p()(U,er,Vn,(0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(er,"-grouped"),at),"".concat(er,"-active"),Tt===Ke&&!Gn),"".concat(er,"-disabled"),Gn),"".concat(er,"-selected"),Hn)),$n=Je(lt),Nn=!Xt||typeof Xt=="function"||Hn,In=typeof $n=="number"?$n:$n||Ht,Bn=mn(In)?In.toString():void 0;return yn!==void 0&&(Bn=yn),B.createElement("div",(0,N.Z)({},(0,q.Z)(En),fn?{}:ut(lt,Ke),{"aria-selected":Oe(Ht),className:jn,title:Bn,onMouseMove:function(){Tt===Ke||Gn||ue(Ke)},onClick:function(){Gn||Pe(Ht)},style:hn}),B.createElement("div",{className:"".concat(er,"-content")},typeof _n=="function"?_n(lt,{index:Ke}):In),B.isValidElement(Xt)||Hn,Nn&&B.createElement(O,{className:"".concat(U,"-option-state"),customizeIcon:Xt,customizeIconProps:{value:Ht,disabled:Gn,isSelected:Hn}},Hn?"\u2713":null))}))},Ge=B.forwardRef(Ye),He=Ge,ne=function(je,Ve){var Yt=B.useRef({values:new Map,options:new Map}),Pt=B.useMemo(function(){var un=Yt.current,yt=un.values,pt=un.options,Lt=je.map(function(xn){if(xn.label===void 0){var dt;return(0,le.Z)((0,le.Z)({},xn),{},{label:(dt=yt.get(xn.value))===null||dt===void 0?void 0:dt.label})}return xn}),rn=new Map,dn=new Map;return Lt.forEach(function(xn){rn.set(xn.value,xn),dn.set(xn.value,Ve.get(xn.value)||pt.get(xn.value))}),Yt.current.values=rn,Yt.current.options=dn,Lt},[je,Ve]),An=B.useCallback(function(un){return Ve.get(un)||Yt.current.options.get(un)},[Ve]);return[Pt,An]};function fe(je,Ve){return Ae(je).join("").toUpperCase().includes(Ve)}var ye=function(je,Ve,Yt,Pt,An){return B.useMemo(function(){if(!Yt||Pt===!1)return je;var un=Ve.options,yt=Ve.label,pt=Ve.value,Lt=[],rn=typeof Pt=="function",dn=Yt.toUpperCase(),xn=rn?Pt:function($t,Le){return An?fe(Le[An],dn):Le[un]?fe(Le[yt!=="children"?yt:"label"],dn):fe(Le[pt],dn)},dt=rn?function($t){return G($t)}:function($t){return $t};return je.forEach(function($t){if($t[un]){var Le=xn(Yt,dt($t));if(Le)Lt.push($t);else{var Xe=$t[un].filter(function(gt){return xn(Yt,dt(gt))});Xe.length&&Lt.push((0,le.Z)((0,le.Z)({},$t),{},(0,ve.Z)({},un,Xe)))}return}xn(Yt,dt($t))&&Lt.push($t)}),Lt},[je,Pt,An,Yt,Ve])},Ee=C(6551),Te=C(11592),xt=["children","value"],Wt=["children"];function nn(je){var Ve=je,Yt=Ve.key,Pt=Ve.props,An=Pt.children,un=Pt.value,yt=(0,h.Z)(Pt,xt);return(0,le.Z)({key:Yt,value:un!==void 0?un:Yt,children:An},yt)}function Cn(je){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Te.Z)(je).map(function(Yt,Pt){if(!B.isValidElement(Yt)||!Yt.type)return null;var An=Yt,un=An.type.isSelectOptGroup,yt=An.key,pt=An.props,Lt=pt.children,rn=(0,h.Z)(pt,Wt);return Ve||!un?nn(Yt):(0,le.Z)((0,le.Z)({key:"__RC_SELECT_GRP__".concat(yt===null?Pt:yt,"__"),label:yt},rn),{},{options:Cn(Lt)})}).filter(function(Yt){return Yt})}var Wn=function(Ve,Yt,Pt,An,un){return B.useMemo(function(){var yt=Ve,pt=!Ve;pt&&(yt=Cn(Yt));var Lt=new Map,rn=new Map,dn=function($t,Le,Xe){Xe&&typeof Xe=="string"&&$t.set(Le[Xe],Le)},xn=function dt($t){for(var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xe=0;Xe<$t.length;Xe+=1){var gt=$t[Xe];!gt[Pt.options]||Le?(Lt.set(gt[Pt.value],gt),dn(rn,gt,Pt.label),dn(rn,gt,An),dn(rn,gt,un)):dt(gt[Pt.options],!0)}};return xn(yt),{options:yt,valueOptions:Lt,labelOptions:rn}},[Ve,Yt,Pt,An,un])},zn=Wn;function vn(je){var Ve=B.useRef();Ve.current=je;var Yt=B.useCallback(function(){return Ve.current.apply(Ve,arguments)},[]);return Yt}function Dn(je){var Ve=je.mode,Yt=je.options,Pt=je.children,An=je.backfill,un=je.allowClear,yt=je.placeholder,pt=je.getInputElement,Lt=je.showSearch,rn=je.onSearch,dn=je.defaultOpen,xn=je.autoFocus,dt=je.labelInValue,$t=je.value,Le=je.inputValue,Xe=je.optionLabelProp,gt=isMultiple(Ve),_t=Lt!==void 0?Lt:gt||Ve==="combobox",Qt=Yt||convertChildrenToData(Pt);if(warning(Ve!=="tags"||Qt.every(function(fn){return!fn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ve==="tags"||Ve==="combobox"){var Xt=Qt.some(function(fn){return fn.options?fn.options.some(function(bn){return typeof("value"in bn?bn.value:bn.key)=="number"}):typeof("value"in fn?fn.value:fn.key)=="number"});warning(!Xt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ve!=="combobox"||!Xe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ve==="combobox"||!An,"`backfill` only works with `combobox` mode."),warning(Ve==="combobox"||!pt,"`getInputElement` only work with `combobox` mode."),noteOnce(Ve!=="combobox"||!pt||!un||!yt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),rn&&!_t&&Ve!=="combobox"&&Ve!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!dn||xn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),$t!=null){var Rt=toArray($t);warning(!dt||Rt.every(function(fn){return _typeof(fn)==="object"&&("key"in fn||"value"in fn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!gt||Array.isArray($t),"`value` should be array when `mode` is `multiple` or `tags`")}if(Pt){var Jt=null;toNodeArray(Pt).some(function(fn){if(!React.isValidElement(fn)||!fn.type)return!1;var bn=fn,nt=bn.type;if(nt.isSelectOption)return!1;if(nt.isSelectOptGroup){var cn=toNodeArray(fn.props.children).every(function(_n){return!React.isValidElement(_n)||!fn.type||_n.type.isSelectOption?!0:(Jt=_n.type,!1)});return!cn}return Jt=nt,!0}),Jt&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Jt.displayName||Jt.name||Jt,"`.")),warning(Le===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function or(je,Ve){if(je){var Yt=function Pt(An){for(var un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yt=0;yt<An.length;yt++){var pt=An[yt];if(pt[Ve==null?void 0:Ve.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!un&&Array.isArray(pt[Ve==null?void 0:Ve.options])&&Pt(pt[Ve==null?void 0:Ve.options],!0))break}};Yt(je)}}var pr=null,rr=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],cr=["inputValue"];function Jn(je){return!je||(0,ge.Z)(je)!=="object"}var kn=B.forwardRef(function(je,Ve){var Yt=je.id,Pt=je.mode,An=je.prefixCls,un=An===void 0?"rc-select":An,yt=je.backfill,pt=je.fieldNames,Lt=je.inputValue,rn=je.searchValue,dn=je.onSearch,xn=je.autoClearSearchValue,dt=xn===void 0?!0:xn,$t=je.onSelect,Le=je.onDeselect,Xe=je.dropdownMatchSelectWidth,gt=Xe===void 0?!0:Xe,_t=je.filterOption,Qt=je.filterSort,Xt=je.optionFilterProp,Rt=je.optionLabelProp,Jt=je.options,fn=je.optionRender,bn=je.children,nt=je.defaultActiveFirstOption,cn=je.menuItemSelectedIcon,_n=je.virtual,U=je.direction,M=je.listHeight,he=M===void 0?200:M,Be=je.listItemHeight,Ze=Be===void 0?20:Be,ze=je.labelRender,ht=je.value,wt=je.defaultValue,zt=je.labelInValue,St=je.onChange,Tt=je.maxCount,tn=(0,h.Z)(je,rr),ue=(0,Ee.ZP)(Yt),Oe=qe(Pt),Pe=!!(!Jt&&bn),Me=B.useMemo(function(){return _t===void 0&&Pt==="combobox"?!1:_t},[_t,Pt]),Je=B.useMemo(function(){return se(pt,Pe)},[JSON.stringify(pt),Pe]),ut=(0,ie.Z)("",{value:rn!==void 0?rn:Lt,postState:function(Ar){return Ar||""}}),It=(0,Q.Z)(ut,2),Bt=It[0],lt=It[1],Ke=zn(Jt,bn,Je,Xt,Rt),tt=Ke.valueOptions,at=Ke.labelOptions,it=Ke.options,At=B.useCallback(function(Qn){var Ar=Ae(Qn);return Ar.map(function(ur){var hr,Er,Fr,wn,tr;if(Jn(ur))hr=ur;else{var Ir;Fr=ur.key,Er=ur.label,hr=(Ir=ur.value)!==null&&Ir!==void 0?Ir:Fr}var nr=tt.get(hr);if(nr){var wr;if(Er===void 0&&(Er=nr==null?void 0:nr[Rt||Je.label]),Fr===void 0&&(Fr=(wr=nr==null?void 0:nr.key)!==null&&wr!==void 0?wr:hr),wn=nr==null?void 0:nr.disabled,tr=nr==null?void 0:nr.title,0)var Nr}return{label:Er,value:hr,key:Fr,disabled:wn,title:tr}})},[Je,Rt,tt]),Ht=(0,ie.Z)(wt,{value:ht}),qt=(0,Q.Z)(Ht,2),an=qt[0],Sn=qt[1],Rn=B.useMemo(function(){var Qn,Ar=Oe&&an===null?[]:an,ur=At(Ar);return Pt==="combobox"&&V((Qn=ur[0])===null||Qn===void 0?void 0:Qn.value)?[]:ur},[an,At,Pt,Oe]),yn=ne(Rn,tt),On=(0,Q.Z)(yn,2),hn=On[0],Vn=On[1],Mn=B.useMemo(function(){if(!Pt&&hn.length===1){var Qn=hn[0];if(Qn.value===null&&(Qn.label===null||Qn.label===void 0))return[]}return hn.map(function(Ar){var ur;return(0,le.Z)((0,le.Z)({},Ar),{},{label:(ur=typeof ze=="function"?ze(Ar):Ar.label)!==null&&ur!==void 0?ur:Ar.value})})},[Pt,hn,ze]),En=B.useMemo(function(){return new Set(hn.map(function(Qn){return Qn.value}))},[hn]);B.useEffect(function(){if(Pt==="combobox"){var Qn,Ar=(Qn=hn[0])===null||Qn===void 0?void 0:Qn.value;lt(_(Ar)?String(Ar):"")}},[hn]);var Hn=vn(function(Qn,Ar){var ur=Ar!=null?Ar:Qn;return(0,ve.Z)((0,ve.Z)({},Je.value,Qn),Je.label,ur)}),Gn=B.useMemo(function(){if(Pt!=="tags")return it;var Qn=(0,ae.Z)(it),Ar=function(hr){return tt.has(hr)};return(0,ae.Z)(hn).sort(function(ur,hr){return ur.value<hr.value?-1:1}).forEach(function(ur){var hr=ur.value;Ar(hr)||Qn.push(Hn(hr,ur.label))}),Qn},[Hn,it,tt,hn,Pt]),er=ye(Gn,Je,Bt,Me,Xt),jn=B.useMemo(function(){return Pt!=="tags"||!Bt||er.some(function(Qn){return Qn[Xt||"value"]===Bt})||er.some(function(Qn){return Qn[Je.value]===Bt})?er:[Hn(Bt)].concat((0,ae.Z)(er))},[Hn,Xt,Pt,er,Bt,Je]),$n=function Qn(Ar){var ur=(0,ae.Z)(Ar).sort(function(hr,Er){return Qt(hr,Er,{searchValue:Bt})});return ur.map(function(hr){return Array.isArray(hr.options)?(0,le.Z)((0,le.Z)({},hr),{},{options:hr.options.length>0?Qn(hr.options):hr.options}):hr})},Nn=B.useMemo(function(){return Qt?$n(jn):jn},[jn,Qt,Bt]),In=B.useMemo(function(){return $(Nn,{fieldNames:Je,childrenAsData:Pe})},[Nn,Je,Pe]),Bn=function(Ar){var ur=At(Ar);if(Sn(ur),St&&(ur.length!==hn.length||ur.some(function(Fr,wn){var tr;return((tr=hn[wn])===null||tr===void 0?void 0:tr.value)!==(Fr==null?void 0:Fr.value)}))){var hr=zt?ur:ur.map(function(Fr){return Fr.value}),Er=ur.map(function(Fr){return G(Vn(Fr.value))});St(Oe?hr:hr[0],Oe?Er:Er[0])}},ir=B.useState(null),mr=(0,Q.Z)(ir,2),fr=mr[0],dr=mr[1],kr=B.useState(0),Wr=(0,Q.Z)(kr,2),Kr=Wr[0],Ai=Wr[1],Jr=nt!==void 0?nt:Pt!=="combobox",ei=B.useCallback(function(Qn,Ar){var ur=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},hr=ur.source,Er=hr===void 0?"keyboard":hr;Ai(Ar),yt&&Pt==="combobox"&&Qn!==null&&Er==="keyboard"&&dr(String(Qn))},[yt,Pt]),Tr=function(Ar,ur,hr){var Er=function(){var Pr,wi=Vn(Ar);return[zt?{label:wi==null?void 0:wi[Je.label],value:Ar,key:(Pr=wi==null?void 0:wi.key)!==null&&Pr!==void 0?Pr:Ar}:Ar,G(wi)]};if(ur&&$t){var Fr=Er(),wn=(0,Q.Z)(Fr,2),tr=wn[0],Ir=wn[1];$t(tr,Ir)}else if(!ur&&Le&&hr!=="clear"){var nr=Er(),wr=(0,Q.Z)(nr,2),Nr=wr[0],Yr=wr[1];Le(Nr,Yr)}},Rr=vn(function(Qn,Ar){var ur,hr=Oe?Ar.selected:!0;hr?ur=Oe?[].concat((0,ae.Z)(hn),[Qn]):[Qn]:ur=hn.filter(function(Er){return Er.value!==Qn}),Bn(ur),Tr(Qn,hr),Pt==="combobox"?dr(""):(!qe||dt)&&(lt(""),dr(""))}),ti=function(Ar,ur){Bn(Ar);var hr=ur.type,Er=ur.values;(hr==="remove"||hr==="clear")&&Er.forEach(function(Fr){Tr(Fr.value,!1,hr)})},Cr=function(Ar,ur){if(lt(Ar),dr(null),ur.source==="submit"){var hr=(Ar||"").trim();if(hr){var Er=Array.from(new Set([].concat((0,ae.Z)(En),[hr])));Bn(Er),Tr(hr,!0),lt("")}return}ur.source!=="blur"&&(Pt==="combobox"&&Bn(Ar),dn==null||dn(Ar))},Zn=function(Ar){var ur=Ar;Pt!=="tags"&&(ur=Ar.map(function(Er){var Fr=at.get(Er);return Fr==null?void 0:Fr.value}).filter(function(Er){return Er!==void 0}));var hr=Array.from(new Set([].concat((0,ae.Z)(En),(0,ae.Z)(ur))));Bn(hr),hr.forEach(function(Er){Tr(Er,!0)})},yr=B.useMemo(function(){var Qn=_n!==!1&>!==!1;return(0,le.Z)((0,le.Z)({},Ke),{},{flattenOptions:In,onActiveValue:ei,defaultActiveFirstOption:Jr,onSelect:Rr,menuItemSelectedIcon:cn,rawValues:En,fieldNames:Je,virtual:Qn,direction:U,listHeight:he,listItemHeight:Ze,childrenAsData:Pe,maxCount:Tt,optionRender:fn})},[Tt,Ke,In,ei,Jr,Rr,cn,En,Je,_n,gt,U,he,Ze,Pe,fn]);return B.createElement(we.Provider,{value:yr},B.createElement(ft,(0,N.Z)({},tn,{id:ue,prefixCls:un,ref:Ve,omitDomProps:cr,mode:Pt,displayValues:Mn,onDisplayValuesChange:ti,direction:U,searchValue:Bt,onSearch:Cr,autoClearSearchValue:dt,onSearchSplit:Zn,dropdownMatchSelectWidth:gt,OptionList:He,emptyOptions:!In.length,activeValue:fr,activeDescendantId:"".concat(ue,"_list_").concat(Kr)})))}),qn=kn;qn.Option=en,qn.OptGroup=Ct;var vr=qn,br=vr},86351:function(Fn,st,C){"use strict";C.d(st,{R:function(){return ae},w:function(){return N}});var N={},ae="rc-table-internal-hook"},97347:function(Fn,st,C){"use strict";C.d(st,{L:function(){return F},Z:function(){return D}});var N=C(50298),ae=C(4635),ve=C(95190),le=C(93664),Q=C(20439),h=C(62646),ge=C(11592),ie=C(48736),A=C(59301),B=C(86351),T=C(54451);function p(I){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof re=="number"?re:re.endsWith("%")?I*parseFloat(re)/100:null}function v(I,re,ce){return A.useMemo(function(){if(re&&re>0){var X=0,q=0;I.forEach(function(Ae){var Y=p(re,Ae.width);Y?X+=Y:q+=1});var oe=Math.max(re,ce),pe=Math.max(oe-X,q),_e=q,j=pe/q,K=0,ee=I.map(function(Ae){var Y=(0,Q.Z)({},Ae),y=p(re,Y.width);if(y)Y.width=y;else{var _=Math.floor(j);Y.width=_e===1?pe:_,pe-=_,_e-=1}return K+=Y.width,Y});if(K<oe){var z=oe/K;pe=oe,ee.forEach(function(Ae,Y){var y=Math.floor(Ae.width*z);Ae.width=Y===ee.length-1?pe:y,pe-=y})}return[ee,Math.max(K,oe)]}return[I,re]},[I,re,ce])}var E=["children"],S=["fixed"];function F(I){return(0,ge.Z)(I).filter(function(re){return A.isValidElement(re)}).map(function(re){var ce=re.key,X=re.props,q=X.children,oe=(0,h.Z)(X,E),pe=(0,Q.Z)({key:ce},oe);return q&&(pe.children=F(q)),pe})}function O(I){return I.filter(function(re){return re&&(0,le.Z)(re)==="object"&&!re.hidden}).map(function(re){var ce=re.children;return ce&&ce.length>0?(0,Q.Z)((0,Q.Z)({},re),{},{children:O(ce)}):re})}function Z(I){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return I.filter(function(ce){return ce&&(0,le.Z)(ce)==="object"}).reduce(function(ce,X,q){var oe=X.fixed,pe=oe===!0?"left":oe,_e="".concat(re,"-").concat(q),j=X.children;return j&&j.length>0?[].concat((0,ve.Z)(ce),(0,ve.Z)(Z(j,_e).map(function(K){return(0,Q.Z)({fixed:pe},K)}))):[].concat((0,ve.Z)(ce),[(0,Q.Z)((0,Q.Z)({key:_e},X),{},{fixed:pe})])},[])}function b(I){return I.map(function(re){var ce=re.fixed,X=(0,h.Z)(re,S),q=ce;return ce==="left"?q="right":ce==="right"&&(q="left"),(0,Q.Z)({fixed:q},X)})}function L(I,re){var ce=I.prefixCls,X=I.columns,q=I.children,oe=I.expandable,pe=I.expandedKeys,_e=I.columnTitle,j=I.getRowKey,K=I.onTriggerExpand,ee=I.expandIcon,z=I.rowExpandable,Ae=I.expandIconColumnIndex,Y=I.direction,y=I.expandRowByClick,_=I.columnWidth,V=I.fixed,de=I.scrollWidth,We=I.clientWidth,Qe=A.useMemo(function(){var pn=X||F(q)||[];return O(pn.slice())},[X,q]),ct=A.useMemo(function(){if(oe){var pn=Qe.slice();if(!pn.includes(B.w)){var mt=Ae||0;mt>=0&&(mt||V==="left"||!V)&&pn.splice(mt,0,B.w),V==="right"&&pn.splice(Qe.length,0,B.w)}var ke=pn.indexOf(B.w);pn=pn.filter(function($e,J){return $e!==B.w||J===ke});var xe=Qe[ke],W;V?W=V:W=xe?xe.fixed:null;var Re=(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},T.v,{className:"".concat(ce,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",_e),"fixed",W),"className","".concat(ce,"-row-expand-icon-cell")),"width",_),"render",function(J,R,k){var se=j(R,k),$=pe.has(se),G=z?z(R):!0,te=ee({prefixCls:ce,expanded:$,expandable:G,record:R,onExpand:K});return y?A.createElement("span",{onClick:function(we){return we.stopPropagation()}},te):te});return pn.map(function($e){return $e===B.w?Re:$e})}return Qe.filter(function($e){return $e!==B.w})},[oe,Qe,j,pe,ee,Y]),Et=A.useMemo(function(){var pn=ct;return re&&(pn=re(pn)),pn.length||(pn=[{render:function(){return null}}]),pn},[re,ct,Y]),Mt=A.useMemo(function(){return Y==="rtl"?b(Z(Et)):Z(Et)},[Et,Y,de]),Ot=A.useMemo(function(){for(var pn=-1,mt=Mt.length-1;mt>=0;mt-=1){var ke=Mt[mt].fixed;if(ke==="left"||ke===!0){pn=mt;break}}if(pn>=0)for(var xe=0;xe<=pn;xe+=1){var W=Mt[xe].fixed;if(W!=="left"&&W!==!0)return!0}var Re=Mt.findIndex(function(R){var k=R.fixed;return k==="right"});if(Re>=0)for(var $e=Re;$e<Mt.length;$e+=1){var J=Mt[$e].fixed;if(J!=="right")return!0}return!1},[Mt]),Fe=v(Mt,de,We),kt=(0,N.Z)(Fe,2),sn=kt[0],jt=kt[1];return[Et,sn,jt,Ot]}var D=L},4030:function(Fn,st,C){"use strict";C.d(st,{w2:function(){return N.w},vP:function(){return mn.v},RQ:function(){return N.R},ER:function(){return se},Q$:function(){return _t},TN:function(){return St}});var N=C(86351),ae=C(50298),ve=C(6089),le=C(34280),Q=C(13697),h=C(59301),ge=C(4676);function ie(ue){var Oe=h.createContext(void 0),Pe=function(Je){var ut=Je.value,It=Je.children,Bt=h.useRef(ut);Bt.current=ut;var lt=h.useState(function(){return{getValue:function(){return Bt.current},listeners:new Set}}),Ke=(0,ae.Z)(lt,1),tt=Ke[0];return(0,le.Z)(function(){(0,ge.unstable_batchedUpdates)(function(){tt.listeners.forEach(function(at){at(ut)})})},[ut]),h.createElement(Oe.Provider,{value:tt},It)};return{Context:Oe,Provider:Pe,defaultValue:ue}}function A(ue,Oe){var Pe=(0,ve.Z)(typeof Oe=="function"?Oe:function(at){if(Oe===void 0)return at;if(!Array.isArray(Oe))return at[Oe];var it={};return Oe.forEach(function(At){it[At]=at[At]}),it}),Me=h.useContext(ue==null?void 0:ue.Context),Je=Me||{},ut=Je.listeners,It=Je.getValue,Bt=h.useRef();Bt.current=Pe(Me?It():ue==null?void 0:ue.defaultValue);var lt=h.useState({}),Ke=(0,ae.Z)(lt,2),tt=Ke[1];return(0,le.Z)(function(){if(!Me)return;function at(it){var At=Pe(it);(0,Q.Z)(Bt.current,At,!0)||tt({})}return ut.add(at),function(){ut.delete(at)}},[Me]),Bt.current}var B=C(14809),T=C(8654);function p(){var ue=h.createContext(null);function Oe(){return h.useContext(ue)}function Pe(Je,ut){var It=(0,T.Yr)(Je),Bt=function(Ke,tt){var at=It?{ref:tt}:{},it=h.useRef(0),At=h.useRef(Ke),Ht=Oe();return Ht!==null?h.createElement(Je,(0,B.Z)({},Ke,at)):((!ut||ut(At.current,Ke))&&(it.current+=1),At.current=Ke,h.createElement(ue.Provider,{value:it.current},h.createElement(Je,(0,B.Z)({},Ke,at))))};return It?h.forwardRef(Bt):Bt}function Me(Je,ut){var It=(0,T.Yr)(Je),Bt=function(Ke,tt){var at=It?{ref:tt}:{};return Oe(),h.createElement(Je,(0,B.Z)({},Ke,at))};return It?h.memo(h.forwardRef(Bt),ut):h.memo(Bt,ut)}return{makeImmutable:Pe,responseImmutable:Me,useImmutableMark:Oe}}var v=p(),E=v.makeImmutable,S=v.responseImmutable,F=v.useImmutableMark,O=p(),Z=O.makeImmutable,b=O.responseImmutable,L=O.useImmutableMark,D=ie(),I=D;function re(ue,Oe){var Pe=React.useRef(0);Pe.current+=1;var Me=React.useRef(ue),Je=[];Object.keys(ue||{}).map(function(It){var Bt;(ue==null?void 0:ue[It])!==((Bt=Me.current)===null||Bt===void 0?void 0:Bt[It])&&Je.push(It)}),Me.current=ue;var ut=React.useRef([]);return Je.length&&(ut.current=Je),React.useDebugValue(Pe.current),React.useDebugValue(ut.current.join(", ")),Oe&&console.log("".concat(Oe,":"),Pe.current,ut.current),Pe.current}var ce=null,X=null,q=C(93664),oe=C(20439),pe=C(4635),_e=C(92310),j=C.n(_e),K=C(80547),ee=C(97938),z=C(48736),Ae=h.createContext({renderWithProps:!1}),Y=Ae,y="RC_TABLE_KEY";function _(ue){return ue==null?[]:Array.isArray(ue)?ue:[ue]}function V(ue){var Oe=[],Pe={};return ue.forEach(function(Me){for(var Je=Me||{},ut=Je.key,It=Je.dataIndex,Bt=ut||_(It).join("-")||y;Pe[Bt];)Bt="".concat(Bt,"_next");Pe[Bt]=!0,Oe.push(Bt)}),Oe}function de(ue){return ue!=null}function We(ue){return typeof ue=="number"&&!Number.isNaN(ue)}function Qe(ue){return ue&&(0,q.Z)(ue)==="object"&&!Array.isArray(ue)&&!h.isValidElement(ue)}function ct(ue,Oe,Pe,Me,Je,ut){var It=h.useContext(Y),Bt=L(),lt=(0,K.Z)(function(){if(de(Me))return[Me];var Ke=Oe==null||Oe===""?[]:Array.isArray(Oe)?Oe:[Oe],tt=(0,ee.Z)(ue,Ke),at=tt,it=void 0;if(Je){var At=Je(tt,ue,Pe);Qe(At)?(at=At.children,it=At.props,It.renderWithProps=!0):at=At}return[at,it]},[Bt,ue,Me,Oe,Je,Pe],function(Ke,tt){if(ut){var at=(0,ae.Z)(Ke,2),it=at[1],At=(0,ae.Z)(tt,2),Ht=At[1];return ut(Ht,it)}return It.renderWithProps?!0:!(0,Q.Z)(Ke,tt,!0)});return lt}function Et(ue,Oe,Pe,Me){var Je=ue+Oe-1;return ue<=Me&&Je>=Pe}function Mt(ue,Oe){return A(I,function(Pe){var Me=Et(ue,Oe||1,Pe.hoverStartRow,Pe.hoverEndRow);return[Me,Pe.onHover]})}var Ot=C(70425),Fe=function(Oe){var Pe=Oe.ellipsis,Me=Oe.rowType,Je=Oe.children,ut,It=Pe===!0?{showTitle:!0}:Pe;return It&&(It.showTitle||Me==="header")&&(typeof Je=="string"||typeof Je=="number"?ut=Je.toString():h.isValidElement(Je)&&typeof Je.props.children=="string"&&(ut=Je.props.children)),ut};function kt(ue){var Oe,Pe,Me,Je,ut,It,Bt,lt,Ke=ue.component,tt=ue.children,at=ue.ellipsis,it=ue.scope,At=ue.prefixCls,Ht=ue.className,qt=ue.align,an=ue.record,Sn=ue.render,Rn=ue.dataIndex,yn=ue.renderIndex,On=ue.shouldCellUpdate,hn=ue.index,Vn=ue.rowType,Mn=ue.colSpan,En=ue.rowSpan,Hn=ue.fixLeft,Gn=ue.fixRight,er=ue.firstFixLeft,jn=ue.lastFixLeft,$n=ue.firstFixRight,Nn=ue.lastFixRight,In=ue.appendNode,Bn=ue.additionalProps,ir=Bn===void 0?{}:Bn,mr=ue.isSticky,fr="".concat(At,"-cell"),dr=A(I,["supportSticky","allColumnsFixedLeft","rowHoverable"]),kr=dr.supportSticky,Wr=dr.allColumnsFixedLeft,Kr=dr.rowHoverable,Ai=ct(an,Rn,yn,tt,Sn,On),Jr=(0,ae.Z)(Ai,2),ei=Jr[0],Tr=Jr[1],Rr={},ti=typeof Hn=="number"&&kr,Cr=typeof Gn=="number"&&kr;ti&&(Rr.position="sticky",Rr.left=Hn),Cr&&(Rr.position="sticky",Rr.right=Gn);var Zn=(Oe=(Pe=(Me=Tr==null?void 0:Tr.colSpan)!==null&&Me!==void 0?Me:ir.colSpan)!==null&&Pe!==void 0?Pe:Mn)!==null&&Oe!==void 0?Oe:1,yr=(Je=(ut=(It=Tr==null?void 0:Tr.rowSpan)!==null&&It!==void 0?It:ir.rowSpan)!==null&&ut!==void 0?ut:En)!==null&&Je!==void 0?Je:1,Qn=Mt(hn,yr),Ar=(0,ae.Z)(Qn,2),ur=Ar[0],hr=Ar[1],Er=(0,Ot.zX)(function(Nr){var Yr;an&&hr(hn,hn+yr-1),ir==null||(Yr=ir.onMouseEnter)===null||Yr===void 0||Yr.call(ir,Nr)}),Fr=(0,Ot.zX)(function(Nr){var Yr;an&&hr(-1,-1),ir==null||(Yr=ir.onMouseLeave)===null||Yr===void 0||Yr.call(ir,Nr)});if(Zn===0||yr===0)return null;var wn=(Bt=ir.title)!==null&&Bt!==void 0?Bt:Fe({rowType:Vn,ellipsis:at,children:ei}),tr=j()(fr,Ht,(lt={},(0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)(lt,"".concat(fr,"-fix-left"),ti&&kr),"".concat(fr,"-fix-left-first"),er&&kr),"".concat(fr,"-fix-left-last"),jn&&kr),"".concat(fr,"-fix-left-all"),jn&&Wr&&kr),"".concat(fr,"-fix-right"),Cr&&kr),"".concat(fr,"-fix-right-first"),$n&&kr),"".concat(fr,"-fix-right-last"),Nn&&kr),"".concat(fr,"-ellipsis"),at),"".concat(fr,"-with-append"),In),"".concat(fr,"-fix-sticky"),(ti||Cr)&&mr&&kr),(0,pe.Z)(lt,"".concat(fr,"-row-hover"),!Tr&&ur)),ir.className,Tr==null?void 0:Tr.className),Ir={};qt&&(Ir.textAlign=qt);var nr=(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},Tr==null?void 0:Tr.style),Rr),Ir),ir.style),wr=ei;return(0,q.Z)(wr)==="object"&&!Array.isArray(wr)&&!h.isValidElement(wr)&&(wr=null),at&&(jn||$n)&&(wr=h.createElement("span",{className:"".concat(fr,"-content")},wr)),h.createElement(Ke,(0,B.Z)({},Tr,ir,{className:tr,style:nr,title:wn,scope:it,onMouseEnter:Kr?Er:void 0,onMouseLeave:Kr?Fr:void 0,colSpan:Zn!==1?Zn:null,rowSpan:yr!==1?yr:null}),In,wr)}var sn=h.memo(kt);function jt(ue,Oe,Pe,Me,Je){var ut=Pe[ue]||{},It=Pe[Oe]||{},Bt,lt;ut.fixed==="left"?Bt=Me.left[Je==="rtl"?Oe:ue]:It.fixed==="right"&&(lt=Me.right[Je==="rtl"?ue:Oe]);var Ke=!1,tt=!1,at=!1,it=!1,At=Pe[Oe+1],Ht=Pe[ue-1],qt=At&&!At.fixed||Ht&&!Ht.fixed||Pe.every(function(On){return On.fixed==="left"});if(Je==="rtl"){if(Bt!==void 0){var an=Ht&&Ht.fixed==="left";it=!an&&qt}else if(lt!==void 0){var Sn=At&&At.fixed==="right";at=!Sn&&qt}}else if(Bt!==void 0){var Rn=At&&At.fixed==="left";Ke=!Rn&&qt}else if(lt!==void 0){var yn=Ht&&Ht.fixed==="right";tt=!yn&&qt}return{fixLeft:Bt,fixRight:lt,lastFixLeft:Ke,firstFixRight:tt,lastFixRight:at,firstFixLeft:it,isSticky:Me.isSticky}}var pn=h.createContext({}),mt=pn;function ke(ue){var Oe=ue.className,Pe=ue.index,Me=ue.children,Je=ue.colSpan,ut=Je===void 0?1:Je,It=ue.rowSpan,Bt=ue.align,lt=A(I,["prefixCls","direction"]),Ke=lt.prefixCls,tt=lt.direction,at=h.useContext(mt),it=at.scrollColumnIndex,At=at.stickyOffsets,Ht=at.flattenColumns,qt=Pe+ut-1,an=qt+1===it?ut+1:ut,Sn=jt(Pe,Pe+an-1,Ht,At,tt);return h.createElement(sn,(0,B.Z)({className:Oe,index:Pe,component:"td",prefixCls:Ke,record:null,dataIndex:null,align:Bt,colSpan:an,rowSpan:It,render:function(){return Me}},Sn))}var xe=C(62646),W=["children"];function Re(ue){var Oe=ue.children,Pe=(0,xe.Z)(ue,W);return h.createElement("tr",Pe,Oe)}function $e(ue){var Oe=ue.children;return Oe}$e.Row=Re,$e.Cell=ke;var J=$e;function R(ue){var Oe=ue.children,Pe=ue.stickyOffsets,Me=ue.flattenColumns,Je=A(I,"prefixCls"),ut=Me.length-1,It=Me[ut],Bt=h.useMemo(function(){return{stickyOffsets:Pe,flattenColumns:Me,scrollColumnIndex:It!=null&&It.scrollbar?ut:null}},[It,Me,ut,Pe]);return h.createElement(mt.Provider,{value:Bt},h.createElement("tfoot",{className:"".concat(Je,"-summary")},Oe))}var k=b(R),se=J,$=C(29301),G=C(24514),te=C(75152),Ce=C(26112);function we(ue,Oe,Pe,Me,Je,ut,It){ue.push({record:Oe,indent:Pe,index:It});var Bt=ut(Oe),lt=Je==null?void 0:Je.has(Bt);if(Oe&&Array.isArray(Oe[Me])&<)for(var Ke=0;Ke<Oe[Me].length;Ke+=1)we(ue,Oe[Me][Ke],Pe+1,Me,Je,ut,Ke)}function Se(ue,Oe,Pe,Me){var Je=h.useMemo(function(){if(Pe!=null&&Pe.size){for(var ut=[],It=0;It<(ue==null?void 0:ue.length);It+=1){var Bt=ue[It];we(ut,Bt,0,Oe,Pe,Me,It)}return ut}return ue==null?void 0:ue.map(function(lt,Ke){return{record:lt,indent:0,index:Ke}})},[ue,Oe,Pe,Me]);return Je}function Ie(ue,Oe,Pe,Me){var Je=A(I,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),ut=Je.flattenColumns,It=Je.expandableType,Bt=Je.expandedKeys,lt=Je.childrenColumnName,Ke=Je.onTriggerExpand,tt=Je.rowExpandable,at=Je.onRow,it=Je.expandRowByClick,At=Je.rowClassName,Ht=It==="nest",qt=It==="row"&&(!tt||tt(ue)),an=qt||Ht,Sn=Bt&&Bt.has(Oe),Rn=lt&&ue&&ue[lt],yn=(0,Ot.zX)(Ke),On=at==null?void 0:at(ue,Pe),hn=On==null?void 0:On.onClick,Vn=function(Gn){it&&an&&Ke(ue,Gn);for(var er=arguments.length,jn=new Array(er>1?er-1:0),$n=1;$n<er;$n++)jn[$n-1]=arguments[$n];hn==null||hn.apply(void 0,[Gn].concat(jn))},Mn;typeof At=="string"?Mn=At:typeof At=="function"&&(Mn=At(ue,Pe,Me));var En=V(ut);return(0,oe.Z)((0,oe.Z)({},Je),{},{columnsKey:En,nestExpandable:Ht,expanded:Sn,hasNestChildren:Rn,record:ue,onTriggerExpand:yn,rowSupportExpand:qt,expandable:an,rowProps:(0,oe.Z)((0,oe.Z)({},On),{},{className:j()(Mn,On==null?void 0:On.className),onClick:Vn})})}function Ne(ue){var Oe=ue.prefixCls,Pe=ue.children,Me=ue.component,Je=ue.cellComponent,ut=ue.className,It=ue.expanded,Bt=ue.colSpan,lt=ue.isEmpty,Ke=A(I,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),tt=Ke.scrollbarSize,at=Ke.fixHeader,it=Ke.fixColumn,At=Ke.componentWidth,Ht=Ke.horizonScroll,qt=Pe;return(lt?Ht&&At:it)&&(qt=h.createElement("div",{style:{width:At-(at&&!lt?tt:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Oe,"-expanded-row-fixed")},qt)),h.createElement(Me,{className:ut,style:{display:It?null:"none"}},h.createElement(sn,{component:Je,prefixCls:Oe,colSpan:Bt},qt))}var qe=Ne;function et(ue){var Oe=ue.prefixCls,Pe=ue.record,Me=ue.onExpand,Je=ue.expanded,ut=ue.expandable,It="".concat(Oe,"-row-expand-icon");if(!ut)return h.createElement("span",{className:j()(It,"".concat(Oe,"-row-spaced"))});var Bt=function(Ke){Me(Pe,Ke),Ke.stopPropagation()};return h.createElement("span",{className:j()(It,(0,pe.Z)((0,pe.Z)({},"".concat(Oe,"-row-expanded"),Je),"".concat(Oe,"-row-collapsed"),!Je)),onClick:Bt})}function ft(ue,Oe,Pe){var Me=[];function Je(ut){(ut||[]).forEach(function(It,Bt){Me.push(Oe(It,Bt)),Je(It[Pe])})}return Je(ue),Me}function Kt(ue,Oe,Pe,Me){return typeof ue=="string"?ue:typeof ue=="function"?ue(Oe,Pe,Me):""}function Ct(ue,Oe,Pe,Me,Je){var ut=ue.record,It=ue.prefixCls,Bt=ue.columnsKey,lt=ue.fixedInfoList,Ke=ue.expandIconColumnIndex,tt=ue.nestExpandable,at=ue.indentSize,it=ue.expandIcon,At=ue.expanded,Ht=ue.hasNestChildren,qt=ue.onTriggerExpand,an=Bt[Pe],Sn=lt[Pe],Rn;Pe===(Ke||0)&&tt&&(Rn=h.createElement(h.Fragment,null,h.createElement("span",{style:{paddingLeft:"".concat(at*Me,"px")},className:"".concat(It,"-row-indent indent-level-").concat(Me)}),it({prefixCls:It,expanded:At,expandable:Ht,record:ut,onExpand:qt})));var yn;return Oe.onCell&&(yn=Oe.onCell(ut,Je)),{key:an,fixedInfo:Sn,appendCellNode:Rn,additionalCellProps:yn||{}}}function vt(ue){var Oe=ue.className,Pe=ue.style,Me=ue.record,Je=ue.index,ut=ue.renderIndex,It=ue.rowKey,Bt=ue.indent,lt=Bt===void 0?0:Bt,Ke=ue.rowComponent,tt=ue.cellComponent,at=ue.scopeCellComponent,it=Ie(Me,It,Je,lt),At=it.prefixCls,Ht=it.flattenColumns,qt=it.expandedRowClassName,an=it.expandedRowRender,Sn=it.rowProps,Rn=it.expanded,yn=it.rowSupportExpand,On=h.useRef(!1);On.current||(On.current=Rn);var hn=Kt(qt,Me,Je,lt),Vn=h.createElement(Ke,(0,B.Z)({},Sn,{"data-row-key":It,className:j()(Oe,"".concat(At,"-row"),"".concat(At,"-row-level-").concat(lt),Sn==null?void 0:Sn.className,(0,pe.Z)({},hn,lt>=1)),style:(0,oe.Z)((0,oe.Z)({},Pe),Sn==null?void 0:Sn.style)}),Ht.map(function(Hn,Gn){var er=Hn.render,jn=Hn.dataIndex,$n=Hn.className,Nn=Ct(it,Hn,Gn,lt,Je),In=Nn.key,Bn=Nn.fixedInfo,ir=Nn.appendCellNode,mr=Nn.additionalCellProps;return h.createElement(sn,(0,B.Z)({className:$n,ellipsis:Hn.ellipsis,align:Hn.align,scope:Hn.rowScope,component:Hn.rowScope?at:tt,prefixCls:At,key:In,record:Me,index:Je,renderIndex:ut,dataIndex:jn,render:er,shouldCellUpdate:Hn.shouldCellUpdate},Bn,{appendNode:ir,additionalProps:mr}))})),Mn;if(yn&&(On.current||Rn)){var En=an(Me,Je,lt+1,Rn);Mn=h.createElement(qe,{expanded:Rn,className:j()("".concat(At,"-expanded-row"),"".concat(At,"-expanded-row-level-").concat(lt+1),hn),prefixCls:At,component:Ke,cellComponent:tt,colSpan:Ht.length,isEmpty:!1},En)}return h.createElement(h.Fragment,null,Vn,Mn)}var en=b(vt);function on(ue){var Oe=ue.columnKey,Pe=ue.onColumnResize,Me=h.useRef();return(0,le.Z)(function(){Me.current&&Pe(Oe,Me.current.offsetWidth)},[]),h.createElement($.Z,{data:Oe},h.createElement("td",{ref:Me,style:{padding:0,border:0,height:0}},h.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Vt=C(29194);function gn(ue){var Oe=ue.prefixCls,Pe=ue.columnsKey,Me=ue.onColumnResize,Je=h.useRef(null);return h.createElement("tr",{"aria-hidden":"true",className:"".concat(Oe,"-measure-row"),style:{height:0,fontSize:0},ref:Je},h.createElement($.Z.Collection,{onBatchResize:function(It){(0,Vt.Z)(Je.current)&&It.forEach(function(Bt){var lt=Bt.data,Ke=Bt.size;Me(lt,Ke.offsetWidth)})}},Pe.map(function(ut){return h.createElement(on,{key:ut,columnKey:ut,onColumnResize:Me})})))}function Pn(ue){var Oe=ue.data,Pe=ue.measureColumnWidth,Me=A(I,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Je=Me.prefixCls,ut=Me.getComponent,It=Me.onColumnResize,Bt=Me.flattenColumns,lt=Me.getRowKey,Ke=Me.expandedKeys,tt=Me.childrenColumnName,at=Me.emptyNode,it=Se(Oe,tt,Ke,lt),At=h.useRef({renderWithProps:!1}),Ht=ut(["body","wrapper"],"tbody"),qt=ut(["body","row"],"tr"),an=ut(["body","cell"],"td"),Sn=ut(["body","cell"],"th"),Rn;Oe.length?Rn=it.map(function(On,hn){var Vn=On.record,Mn=On.indent,En=On.index,Hn=lt(Vn,hn);return h.createElement(en,{key:Hn,rowKey:Hn,record:Vn,index:hn,renderIndex:En,rowComponent:qt,cellComponent:an,scopeCellComponent:Sn,indent:Mn})}):Rn=h.createElement(qe,{expanded:!0,className:"".concat(Je,"-placeholder"),prefixCls:Je,component:qt,cellComponent:an,colSpan:Bt.length,isEmpty:!0},at);var yn=V(Bt);return h.createElement(Y.Provider,{value:At.current},h.createElement(Ht,{className:"".concat(Je,"-tbody")},Pe&&h.createElement(gn,{prefixCls:Je,columnsKey:yn,onColumnResize:It}),Rn))}var Gt=b(Pn),mn=C(54451),Ye=["columnType"];function Ge(ue){for(var Oe=ue.colWidths,Pe=ue.columns,Me=ue.columCount,Je=A(I,["tableLayout"]),ut=Je.tableLayout,It=[],Bt=Me||Pe.length,lt=!1,Ke=Bt-1;Ke>=0;Ke-=1){var tt=Oe[Ke],at=Pe&&Pe[Ke],it=void 0,At=void 0;if(at&&(it=at[mn.v],ut==="auto"&&(At=at.minWidth)),tt||At||it||lt){var Ht=it||{},qt=Ht.columnType,an=(0,xe.Z)(Ht,Ye);It.unshift(h.createElement("col",(0,B.Z)({key:Ke,style:{width:tt,minWidth:At}},an))),lt=!0}}return h.createElement("colgroup",null,It)}var He=Ge,ne=C(95190),fe=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function ye(ue,Oe){return(0,h.useMemo)(function(){for(var Pe=[],Me=0;Me<Oe;Me+=1){var Je=ue[Me];if(Je!==void 0)Pe[Me]=Je;else return null}return Pe},[ue.join("_"),Oe])}var Ee=h.forwardRef(function(ue,Oe){var Pe=ue.className,Me=ue.noData,Je=ue.columns,ut=ue.flattenColumns,It=ue.colWidths,Bt=ue.columCount,lt=ue.stickyOffsets,Ke=ue.direction,tt=ue.fixHeader,at=ue.stickyTopOffset,it=ue.stickyBottomOffset,At=ue.stickyClassName,Ht=ue.onScroll,qt=ue.maxContentScroll,an=ue.children,Sn=(0,xe.Z)(ue,fe),Rn=A(I,["prefixCls","scrollbarSize","isSticky","getComponent"]),yn=Rn.prefixCls,On=Rn.scrollbarSize,hn=Rn.isSticky,Vn=Rn.getComponent,Mn=Vn(["header","table"],"table"),En=hn&&!tt?0:On,Hn=h.useRef(null),Gn=h.useCallback(function(mr){(0,T.mH)(Oe,mr),(0,T.mH)(Hn,mr)},[]);h.useEffect(function(){var mr;function fr(dr){var kr=dr,Wr=kr.currentTarget,Kr=kr.deltaX;Kr&&(Ht({currentTarget:Wr,scrollLeft:Wr.scrollLeft+Kr}),dr.preventDefault())}return(mr=Hn.current)===null||mr===void 0||mr.addEventListener("wheel",fr,{passive:!1}),function(){var dr;(dr=Hn.current)===null||dr===void 0||dr.removeEventListener("wheel",fr)}},[]);var er=h.useMemo(function(){return ut.every(function(mr){return mr.width})},[ut]),jn=ut[ut.length-1],$n={fixed:jn?jn.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(yn,"-cell-scrollbar")}}},Nn=(0,h.useMemo)(function(){return En?[].concat((0,ne.Z)(Je),[$n]):Je},[En,Je]),In=(0,h.useMemo)(function(){return En?[].concat((0,ne.Z)(ut),[$n]):ut},[En,ut]),Bn=(0,h.useMemo)(function(){var mr=lt.right,fr=lt.left;return(0,oe.Z)((0,oe.Z)({},lt),{},{left:Ke==="rtl"?[].concat((0,ne.Z)(fr.map(function(dr){return dr+En})),[0]):fr,right:Ke==="rtl"?mr:[].concat((0,ne.Z)(mr.map(function(dr){return dr+En})),[0]),isSticky:hn})},[En,lt,hn]),ir=ye(It,Bt);return h.createElement("div",{style:(0,oe.Z)({overflow:"hidden"},hn?{top:at,bottom:it}:{}),ref:Gn,className:j()(Pe,(0,pe.Z)({},At,!!At))},h.createElement(Mn,{style:{tableLayout:"fixed",visibility:Me||ir?null:"hidden"}},(!Me||!qt||er)&&h.createElement(He,{colWidths:ir?[].concat((0,ne.Z)(ir),[En]):[],columCount:Bt+1,columns:In}),an((0,oe.Z)((0,oe.Z)({},Sn),{},{stickyOffsets:Bn,columns:Nn,flattenColumns:In}))))}),Te=h.memo(Ee),xt=function(Oe){var Pe=Oe.cells,Me=Oe.stickyOffsets,Je=Oe.flattenColumns,ut=Oe.rowComponent,It=Oe.cellComponent,Bt=Oe.onHeaderRow,lt=Oe.index,Ke=A(I,["prefixCls","direction"]),tt=Ke.prefixCls,at=Ke.direction,it;Bt&&(it=Bt(Pe.map(function(Ht){return Ht.column}),lt));var At=V(Pe.map(function(Ht){return Ht.column}));return h.createElement(ut,it,Pe.map(function(Ht,qt){var an=Ht.column,Sn=jt(Ht.colStart,Ht.colEnd,Je,Me,at),Rn;return an&&an.onHeaderCell&&(Rn=Ht.column.onHeaderCell(an)),h.createElement(sn,(0,B.Z)({},Ht,{scope:an.title?Ht.colSpan>1?"colgroup":"col":null,ellipsis:an.ellipsis,align:an.align,component:It,prefixCls:tt,key:At[qt]},Sn,{additionalProps:Rn,rowType:"header"}))}))},Wt=xt;function nn(ue){var Oe=[];function Pe(It,Bt){var lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Oe[lt]=Oe[lt]||[];var Ke=Bt,tt=It.filter(Boolean).map(function(at){var it={key:at.key,className:at.className||"",children:at.title,column:at,colStart:Ke},At=1,Ht=at.children;return Ht&&Ht.length>0&&(At=Pe(Ht,Ke,lt+1).reduce(function(qt,an){return qt+an},0),it.hasSubColumns=!0),"colSpan"in at&&(At=at.colSpan),"rowSpan"in at&&(it.rowSpan=at.rowSpan),it.colSpan=At,it.colEnd=it.colStart+At-1,Oe[lt].push(it),Ke+=At,At});return tt}Pe(ue,0);for(var Me=Oe.length,Je=function(Bt){Oe[Bt].forEach(function(lt){!("rowSpan"in lt)&&!lt.hasSubColumns&&(lt.rowSpan=Me-Bt)})},ut=0;ut<Me;ut+=1)Je(ut);return Oe}var Cn=function(Oe){var Pe=Oe.stickyOffsets,Me=Oe.columns,Je=Oe.flattenColumns,ut=Oe.onHeaderRow,It=A(I,["prefixCls","getComponent"]),Bt=It.prefixCls,lt=It.getComponent,Ke=h.useMemo(function(){return nn(Me)},[Me]),tt=lt(["header","wrapper"],"thead"),at=lt(["header","row"],"tr"),it=lt(["header","cell"],"th");return h.createElement(tt,{className:"".concat(Bt,"-thead")},Ke.map(function(At,Ht){var qt=h.createElement(Wt,{key:Ht,flattenColumns:Je,cells:At,stickyOffsets:Pe,rowComponent:at,cellComponent:it,onHeaderRow:ut,index:Ht});return qt}))},Wn=b(Cn),zn=C(97347);function vn(ue,Oe,Pe){var Me=(0,mn.g)(ue),Je=Me.expandIcon,ut=Me.expandedRowKeys,It=Me.defaultExpandedRowKeys,Bt=Me.defaultExpandAllRows,lt=Me.expandedRowRender,Ke=Me.onExpand,tt=Me.onExpandedRowsChange,at=Me.childrenColumnName,it=Je||et,At=at||"children",Ht=h.useMemo(function(){return lt?"row":ue.expandable&&ue.internalHooks===N.R&&ue.expandable.__PARENT_RENDER_ICON__||Oe.some(function(hn){return hn&&(0,q.Z)(hn)==="object"&&hn[At]})?"nest":!1},[!!lt,Oe]),qt=h.useState(function(){return It||(Bt?ft(Oe,Pe,At):[])}),an=(0,ae.Z)(qt,2),Sn=an[0],Rn=an[1],yn=h.useMemo(function(){return new Set(ut||Sn||[])},[ut,Sn]),On=h.useCallback(function(hn){var Vn=Pe(hn,Oe.indexOf(hn)),Mn,En=yn.has(Vn);En?(yn.delete(Vn),Mn=(0,ne.Z)(yn)):Mn=[].concat((0,ne.Z)(yn),[Vn]),Rn(Mn),Ke&&Ke(!En,hn),tt&&tt(Mn)},[Pe,yn,Oe,Ke,tt]);return[Me,Ht,yn,it,At,On]}function Dn(ue,Oe,Pe){var Me=ue.map(function(Je,ut){return jt(ut,ut,ue,Oe,Pe)});return(0,K.Z)(function(){return Me},[Me],function(Je,ut){return!(0,Q.Z)(Je,ut)})}function or(ue){var Oe=(0,h.useRef)(ue),Pe=(0,h.useState)({}),Me=(0,ae.Z)(Pe,2),Je=Me[1],ut=(0,h.useRef)(null),It=(0,h.useRef)([]);function Bt(lt){It.current.push(lt);var Ke=Promise.resolve();ut.current=Ke,Ke.then(function(){if(ut.current===Ke){var tt=It.current,at=Oe.current;It.current=[],tt.forEach(function(it){Oe.current=it(Oe.current)}),ut.current=null,at!==Oe.current&&Je({})}})}return(0,h.useEffect)(function(){return function(){ut.current=null}},[]),[Oe.current,Bt]}function pr(ue){var Oe=(0,h.useRef)(ue||null),Pe=(0,h.useRef)();function Me(){window.clearTimeout(Pe.current)}function Je(It){Oe.current=It,Me(),Pe.current=window.setTimeout(function(){Oe.current=null,Pe.current=void 0},100)}function ut(){return Oe.current}return(0,h.useEffect)(function(){return Me},[]),[Je,ut]}function rr(){var ue=h.useState(-1),Oe=(0,ae.Z)(ue,2),Pe=Oe[0],Me=Oe[1],Je=h.useState(-1),ut=(0,ae.Z)(Je,2),It=ut[0],Bt=ut[1],lt=h.useCallback(function(Ke,tt){Me(Ke),Bt(tt)},[]);return[Pe,It,lt]}var cr=C(47273),Jn=(0,cr.Z)()?window:null;function kn(ue,Oe){var Pe=(0,q.Z)(ue)==="object"?ue:{},Me=Pe.offsetHeader,Je=Me===void 0?0:Me,ut=Pe.offsetSummary,It=ut===void 0?0:ut,Bt=Pe.offsetScroll,lt=Bt===void 0?0:Bt,Ke=Pe.getContainer,tt=Ke===void 0?function(){return Jn}:Ke,at=tt()||Jn,it=!!ue;return h.useMemo(function(){return{isSticky:it,stickyClassName:it?"".concat(Oe,"-sticky-holder"):"",offsetHeader:Je,offsetSummary:It,offsetScroll:lt,container:at}},[it,lt,Je,It,Oe,at])}function qn(ue,Oe,Pe){var Me=(0,h.useMemo)(function(){var Je=Oe.length,ut=function(Ke,tt,at){for(var it=[],At=0,Ht=Ke;Ht!==tt;Ht+=at)it.push(At),Oe[Ht].fixed&&(At+=ue[Ht]||0);return it},It=ut(0,Je,1),Bt=ut(Je-1,-1,-1).reverse();return Pe==="rtl"?{left:Bt,right:It}:{left:It,right:Bt}},[ue,Oe,Pe]);return Me}var vr=qn;function br(ue){var Oe=ue.className,Pe=ue.children;return h.createElement("div",{className:Oe},Pe)}var je=br,Ve=C(8224),Yt=C(16089),Pt=C(76846);function An(ue){var Oe=(0,Pt.bn)(ue),Pe=Oe.getBoundingClientRect(),Me=document.documentElement;return{left:Pe.left+(window.pageXOffset||Me.scrollLeft)-(Me.clientLeft||document.body.clientLeft||0),top:Pe.top+(window.pageYOffset||Me.scrollTop)-(Me.clientTop||document.body.clientTop||0)}}var un=function(Oe,Pe){var Me,Je,ut=Oe.scrollBodyRef,It=Oe.onScroll,Bt=Oe.offsetScroll,lt=Oe.container,Ke=Oe.direction,tt=A(I,"prefixCls"),at=((Me=ut.current)===null||Me===void 0?void 0:Me.scrollWidth)||0,it=((Je=ut.current)===null||Je===void 0?void 0:Je.clientWidth)||0,At=at&&it*(it/at),Ht=h.useRef(),qt=or({scrollLeft:0,isHiddenScrollBar:!0}),an=(0,ae.Z)(qt,2),Sn=an[0],Rn=an[1],yn=h.useRef({delta:0,x:0}),On=h.useState(!1),hn=(0,ae.Z)(On,2),Vn=hn[0],Mn=hn[1],En=h.useRef(null);h.useEffect(function(){return function(){Yt.Z.cancel(En.current)}},[]);var Hn=function(){Mn(!1)},Gn=function(In){In.persist(),yn.current.delta=In.pageX-Sn.scrollLeft,yn.current.x=0,Mn(!0),In.preventDefault()},er=function(In){var Bn,ir=In||((Bn=window)===null||Bn===void 0?void 0:Bn.event),mr=ir.buttons;if(!Vn||mr===0){Vn&&Mn(!1);return}var fr=yn.current.x+In.pageX-yn.current.x-yn.current.delta,dr=Ke==="rtl";fr=Math.max(dr?At-it:0,Math.min(dr?0:it-At,fr));var kr=!dr||Math.abs(fr)+Math.abs(At)<it;kr&&(It({scrollLeft:fr/it*(at+2)}),yn.current.x=In.pageX)},jn=function(){Yt.Z.cancel(En.current),En.current=(0,Yt.Z)(function(){if(ut.current){var In=An(ut.current).top,Bn=In+ut.current.offsetHeight,ir=lt===window?document.documentElement.scrollTop+window.innerHeight:An(lt).top+lt.clientHeight;Bn-(0,te.Z)()<=ir||In>=ir-Bt?Rn(function(mr){return(0,oe.Z)((0,oe.Z)({},mr),{},{isHiddenScrollBar:!0})}):Rn(function(mr){return(0,oe.Z)((0,oe.Z)({},mr),{},{isHiddenScrollBar:!1})})}})},$n=function(In){Rn(function(Bn){return(0,oe.Z)((0,oe.Z)({},Bn),{},{scrollLeft:In/at*it||0})})};return h.useImperativeHandle(Pe,function(){return{setScrollLeft:$n,checkScrollBarVisible:jn}}),h.useEffect(function(){var Nn=(0,Ve.Z)(document.body,"mouseup",Hn,!1),In=(0,Ve.Z)(document.body,"mousemove",er,!1);return jn(),function(){Nn.remove(),In.remove()}},[At,Vn]),h.useEffect(function(){if(ut.current){for(var Nn=[],In=(0,Pt.bn)(ut.current);In;)Nn.push(In),In=In.parentElement;return Nn.forEach(function(Bn){return Bn.addEventListener("scroll",jn,!1)}),window.addEventListener("resize",jn,!1),window.addEventListener("scroll",jn,!1),lt.addEventListener("scroll",jn,!1),function(){Nn.forEach(function(Bn){return Bn.removeEventListener("scroll",jn)}),window.removeEventListener("resize",jn),window.removeEventListener("scroll",jn),lt.removeEventListener("scroll",jn)}}},[lt]),h.useEffect(function(){Sn.isHiddenScrollBar||Rn(function(Nn){var In=ut.current;return In?(0,oe.Z)((0,oe.Z)({},Nn),{},{scrollLeft:In.scrollLeft/In.scrollWidth*In.clientWidth}):Nn})},[Sn.isHiddenScrollBar]),at<=it||!At||Sn.isHiddenScrollBar?null:h.createElement("div",{style:{height:(0,te.Z)(),width:it,bottom:Bt},className:"".concat(tt,"-sticky-scroll")},h.createElement("div",{onMouseDown:Gn,ref:Ht,className:j()("".concat(tt,"-sticky-scroll-bar"),(0,pe.Z)({},"".concat(tt,"-sticky-scroll-bar-active"),Vn)),style:{width:"".concat(At,"px"),transform:"translate3d(".concat(Sn.scrollLeft,"px, 0, 0)")}}))},yt=h.forwardRef(un);function pt(ue){return null}var Lt=pt;function rn(ue){return null}var dn=rn,xn="rc-table",dt=[],$t={};function Le(){return"No Data"}function Xe(ue,Oe){var Pe=(0,oe.Z)({rowKey:"key",prefixCls:xn,emptyText:Le},ue),Me=Pe.prefixCls,Je=Pe.className,ut=Pe.rowClassName,It=Pe.style,Bt=Pe.data,lt=Pe.rowKey,Ke=Pe.scroll,tt=Pe.tableLayout,at=Pe.direction,it=Pe.title,At=Pe.footer,Ht=Pe.summary,qt=Pe.caption,an=Pe.id,Sn=Pe.showHeader,Rn=Pe.components,yn=Pe.emptyText,On=Pe.onRow,hn=Pe.onHeaderRow,Vn=Pe.onScroll,Mn=Pe.internalHooks,En=Pe.transformColumns,Hn=Pe.internalRefs,Gn=Pe.tailor,er=Pe.getContainerWidth,jn=Pe.sticky,$n=Pe.rowHoverable,Nn=$n===void 0?!0:$n,In=Bt||dt,Bn=!!In.length,ir=Mn===N.R,mr=h.useCallback(function(Or,Qr){return(0,ee.Z)(Rn,Or)||Qr},[Rn]),fr=h.useMemo(function(){return typeof lt=="function"?lt:function(Or){var Qr=Or&&Or[lt];return Qr}},[lt]),dr=mr(["body"]),kr=rr(),Wr=(0,ae.Z)(kr,3),Kr=Wr[0],Ai=Wr[1],Jr=Wr[2],ei=vn(Pe,In,fr),Tr=(0,ae.Z)(ei,6),Rr=Tr[0],ti=Tr[1],Cr=Tr[2],Zn=Tr[3],yr=Tr[4],Qn=Tr[5],Ar=Ke==null?void 0:Ke.x,ur=h.useState(0),hr=(0,ae.Z)(ur,2),Er=hr[0],Fr=hr[1],wn=(0,zn.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},Pe),Rr),{},{expandable:!!Rr.expandedRowRender,columnTitle:Rr.columnTitle,expandedKeys:Cr,getRowKey:fr,onTriggerExpand:Qn,expandIcon:Zn,expandIconColumnIndex:Rr.expandIconColumnIndex,direction:at,scrollWidth:ir&&Gn&&typeof Ar=="number"?Ar:null,clientWidth:Er}),ir?En:null),tr=(0,ae.Z)(wn,4),Ir=tr[0],nr=tr[1],wr=tr[2],Nr=tr[3],Yr=wr!=null?wr:Ar,ri=h.useMemo(function(){return{columns:Ir,flattenColumns:nr}},[Ir,nr]),Pr=h.useRef(),wi=h.useRef(),Ur=h.useRef(),ls=h.useRef();h.useImperativeHandle(Oe,function(){return{nativeElement:Pr.current,scrollTo:function(Qr){var vi;if(Ur.current instanceof HTMLElement){var Ii=Qr.index,_i=Qr.top,bs=Qr.key;if(We(_i)){var ms;(ms=Ur.current)===null||ms===void 0||ms.scrollTo({top:_i})}else{var vs,Rs=bs!=null?bs:fr(In[Ii]);(vs=Ur.current.querySelector('[data-row-key="'.concat(Rs,'"]')))===null||vs===void 0||vs.scrollIntoView()}}else(vi=Ur.current)!==null&&vi!==void 0&&vi.scrollTo&&Ur.current.scrollTo(Qr)}}});var li=h.useRef(),bi=h.useState(!1),Gr=(0,ae.Z)(bi,2),Zi=Gr[0],Wi=Gr[1],ns=h.useState(!1),Fi=(0,ae.Z)(ns,2),zi=Fi[0],Ui=Fi[1],us=h.useState(new Map),fi=(0,ae.Z)(us,2),di=fi[0],Ci=fi[1],ai=V(nr),Di=ai.map(function(Or){return di.get(Or)}),hs=h.useMemo(function(){return Di},[Di.join("_")]),rs=vr(hs,nr,at),gi=Ke&&de(Ke.y),ci=Ke&&de(Yr)||!!Rr.fixed,Dr=ci&&nr.some(function(Or){var Qr=Or.fixed;return Qr}),xr=h.useRef(),Hr=kn(jn,Me),ni=Hr.isSticky,ii=Hr.offsetHeader,qr=Hr.offsetSummary,xi=Hr.offsetScroll,Si=Hr.stickyClassName,Ti=Hr.container,Vr=h.useMemo(function(){return Ht==null?void 0:Ht(In)},[Ht,In]),mi=(gi||ni)&&h.isValidElement(Vr)&&Vr.type===J&&Vr.props.fixed,Ni,Hi,is;gi&&(Hi={overflowY:Bn?"scroll":"auto",maxHeight:Ke.y}),ci&&(Ni={overflowX:"auto"},gi||(Hi={overflowY:"hidden"}),is={width:Yr===!0?"auto":Yr,minWidth:"100%"});var gs=h.useCallback(function(Or,Qr){Ci(function(vi){if(vi.get(Or)!==Qr){var Ii=new Map(vi);return Ii.set(Or,Qr),Ii}return vi})},[]),si=pr(null),Zt=(0,ae.Z)(si,2),zr=Zt[0],pi=Zt[1];function hi(Or,Qr){Qr&&(typeof Qr=="function"?Qr(Or):Qr.scrollLeft!==Or&&(Qr.scrollLeft=Or,Qr.scrollLeft!==Or&&setTimeout(function(){Qr.scrollLeft=Or},0)))}var ki=(0,ve.Z)(function(Or){var Qr=Or.currentTarget,vi=Or.scrollLeft,Ii=at==="rtl",_i=typeof vi=="number"?vi:Qr.scrollLeft,bs=Qr||$t;if(!pi()||pi()===bs){var ms;zr(bs),hi(_i,wi.current),hi(_i,Ur.current),hi(_i,li.current),hi(_i,(ms=xr.current)===null||ms===void 0?void 0:ms.setScrollLeft)}var vs=Qr||wi.current;if(vs){var Rs=ir&&Gn&&typeof Yr=="number"?Yr:vs.scrollWidth,la=vs.clientWidth;if(Rs===la){Wi(!1),Ui(!1);return}Ii?(Wi(-_i<Rs-la),Ui(-_i>0)):(Wi(_i>0),Ui(_i<Rs-la))}}),cs=(0,ve.Z)(function(Or){ki(Or),Vn==null||Vn(Or)}),Bs=function(){if(ci&&Ur.current){var Qr;ki({currentTarget:(0,Pt.bn)(Ur.current),scrollLeft:(Qr=Ur.current)===null||Qr===void 0?void 0:Qr.scrollLeft})}else Wi(!1),Ui(!1)},Qs=function(Qr){var vi,Ii=Qr.width;(vi=xr.current)===null||vi===void 0||vi.checkScrollBarVisible();var _i=Pr.current?Pr.current.offsetWidth:Ii;ir&&er&&Pr.current&&(_i=er(Pr.current,_i)||_i),_i!==Er&&(Bs(),Fr(_i))},fs=h.useRef(!1);h.useEffect(function(){fs.current&&Bs()},[ci,Bt,Ir.length]),h.useEffect(function(){fs.current=!0},[]);var ss=h.useState(0),ji=(0,ae.Z)(ss,2),Ri=ji[0],xa=ji[1],Sa=h.useState(!0),Ta=(0,ae.Z)(Sa,2),Ia=Ta[0],Fa=Ta[1];(0,le.Z)(function(){(!Gn||!ir)&&(Ur.current instanceof Element?xa((0,te.o)(Ur.current).width):xa((0,te.o)(ls.current).width)),Fa((0,G.G)("position","sticky"))},[]),h.useEffect(function(){ir&&Hn&&(Hn.body.current=Ur.current)});var oa=h.useCallback(function(Or){return h.createElement(h.Fragment,null,h.createElement(Wn,Or),mi==="top"&&h.createElement(k,Or,Vr))},[mi,Vr]),Ms=h.useCallback(function(Or){return h.createElement(k,Or,Vr)},[Vr]),Ki=mr(["table"],"table"),Ns=h.useMemo(function(){return tt||(Dr?Yr==="max-content"?"auto":"fixed":gi||ni||nr.some(function(Or){var Qr=Or.ellipsis;return Qr})?"fixed":"auto")},[gi,Dr,nr,tt,ni]),Hs,ps={colWidths:hs,columCount:nr.length,stickyOffsets:rs,onHeaderRow:hn,fixHeader:gi,scroll:Ke},Ks=h.useMemo(function(){return Bn?null:typeof yn=="function"?yn():yn},[Bn,yn]),Da=h.createElement(Gt,{data:In,measureColumnWidth:gi||ci||ni}),Fs=h.createElement(He,{colWidths:nr.map(function(Or){var Qr=Or.width;return Qr}),columns:nr}),Ra=qt!=null?h.createElement("caption",{className:"".concat(Me,"-caption")},qt):void 0,Gs=(0,Ce.Z)(Pe,{data:!0}),Aa=(0,Ce.Z)(Pe,{aria:!0});if(gi||ni){var $s;typeof dr=="function"?($s=dr(In,{scrollbarSize:Ri,ref:Ur,onScroll:ki}),ps.colWidths=nr.map(function(Or,Qr){var vi=Or.width,Ii=Qr===nr.length-1?vi-Ri:vi;return typeof Ii=="number"&&!Number.isNaN(Ii)?Ii:0})):$s=h.createElement("div",{style:(0,oe.Z)((0,oe.Z)({},Ni),Hi),onScroll:cs,ref:Ur,className:j()("".concat(Me,"-body"))},h.createElement(Ki,(0,B.Z)({style:(0,oe.Z)((0,oe.Z)({},is),{},{tableLayout:Ns})},Aa),Ra,Fs,Da,!mi&&Vr&&h.createElement(k,{stickyOffsets:rs,flattenColumns:nr},Vr)));var La=(0,oe.Z)((0,oe.Z)((0,oe.Z)({noData:!In.length,maxContentScroll:ci&&Yr==="max-content"},ps),ri),{},{direction:at,stickyClassName:Si,onScroll:ki});Hs=h.createElement(h.Fragment,null,Sn!==!1&&h.createElement(Te,(0,B.Z)({},La,{stickyTopOffset:ii,className:"".concat(Me,"-header"),ref:wi}),oa),$s,mi&&mi!=="top"&&h.createElement(Te,(0,B.Z)({},La,{stickyBottomOffset:qr,className:"".concat(Me,"-summary"),ref:li}),Ms),ni&&Ur.current&&Ur.current instanceof Element&&h.createElement(yt,{ref:xr,offsetScroll:xi,scrollBodyRef:Ur,onScroll:ki,container:Ti,direction:at}))}else Hs=h.createElement("div",{style:(0,oe.Z)((0,oe.Z)({},Ni),Hi),className:j()("".concat(Me,"-content")),onScroll:ki,ref:Ur},h.createElement(Ki,(0,B.Z)({style:(0,oe.Z)((0,oe.Z)({},is),{},{tableLayout:Ns})},Aa),Ra,Fs,Sn!==!1&&h.createElement(Wn,(0,B.Z)({},ps,ri)),Da,Vr&&h.createElement(k,{stickyOffsets:rs,flattenColumns:nr},Vr)));var Vs=h.createElement("div",(0,B.Z)({className:j()(Me,Je,(0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)((0,pe.Z)({},"".concat(Me,"-rtl"),at==="rtl"),"".concat(Me,"-ping-left"),Zi),"".concat(Me,"-ping-right"),zi),"".concat(Me,"-layout-fixed"),tt==="fixed"),"".concat(Me,"-fixed-header"),gi),"".concat(Me,"-fixed-column"),Dr),"".concat(Me,"-fixed-column-gapped"),Dr&&Nr),"".concat(Me,"-scroll-horizontal"),ci),"".concat(Me,"-has-fix-left"),nr[0]&&nr[0].fixed),"".concat(Me,"-has-fix-right"),nr[nr.length-1]&&nr[nr.length-1].fixed==="right")),style:It,id:an,ref:Pr},Gs),it&&h.createElement(je,{className:"".concat(Me,"-title")},it(In)),h.createElement("div",{ref:ls,className:"".concat(Me,"-container")},Hs),At&&h.createElement(je,{className:"".concat(Me,"-footer")},At(In)));ci&&(Vs=h.createElement($.Z,{onResize:Qs},Vs));var Ds=Dn(nr,rs,at),po=h.useMemo(function(){return{scrollX:Yr,prefixCls:Me,getComponent:mr,scrollbarSize:Ri,direction:at,fixedInfoList:Ds,isSticky:ni,supportSticky:Ia,componentWidth:Er,fixHeader:gi,fixColumn:Dr,horizonScroll:ci,tableLayout:Ns,rowClassName:ut,expandedRowClassName:Rr.expandedRowClassName,expandIcon:Zn,expandableType:ti,expandRowByClick:Rr.expandRowByClick,expandedRowRender:Rr.expandedRowRender,onTriggerExpand:Qn,expandIconColumnIndex:Rr.expandIconColumnIndex,indentSize:Rr.indentSize,allColumnsFixedLeft:nr.every(function(Or){return Or.fixed==="left"}),emptyNode:Ks,columns:Ir,flattenColumns:nr,onColumnResize:gs,hoverStartRow:Kr,hoverEndRow:Ai,onHover:Jr,rowExpandable:Rr.rowExpandable,onRow:On,getRowKey:fr,expandedKeys:Cr,childrenColumnName:yr,rowHoverable:Nn}},[Yr,Me,mr,Ri,at,Ds,ni,Ia,Er,gi,Dr,ci,Ns,ut,Rr.expandedRowClassName,Zn,ti,Rr.expandRowByClick,Rr.expandedRowRender,Qn,Rr.expandIconColumnIndex,Rr.indentSize,Ks,Ir,nr,gs,Kr,Ai,Jr,Rr.rowExpandable,On,fr,Cr,yr,Nn]);return h.createElement(I.Provider,{value:po},Vs)}var gt=h.forwardRef(Xe);function _t(ue){return Z(gt,ue)}var Qt=_t();Qt.EXPAND_COLUMN=N.w,Qt.INTERNAL_HOOKS=N.R,Qt.Column=Lt,Qt.ColumnGroup=dn,Qt.Summary=se;var Xt=Qt,Rt=C(65283),Jt=ie(null),fn=ie(null);function bn(ue,Oe,Pe){var Me=Oe||1;return Pe[ue+Me]-(Pe[ue]||0)}function nt(ue){var Oe=ue.rowInfo,Pe=ue.column,Me=ue.colIndex,Je=ue.indent,ut=ue.index,It=ue.component,Bt=ue.renderIndex,lt=ue.record,Ke=ue.style,tt=ue.className,at=ue.inverse,it=ue.getHeight,At=Pe.render,Ht=Pe.dataIndex,qt=Pe.className,an=Pe.width,Sn=A(fn,["columnsOffset"]),Rn=Sn.columnsOffset,yn=Ct(Oe,Pe,Me,Je,ut),On=yn.key,hn=yn.fixedInfo,Vn=yn.appendCellNode,Mn=yn.additionalCellProps,En=Mn.style,Hn=Mn.colSpan,Gn=Hn===void 0?1:Hn,er=Mn.rowSpan,jn=er===void 0?1:er,$n=Me-1,Nn=bn($n,Gn,Rn),In=Gn>1?an-Nn:0,Bn=(0,oe.Z)((0,oe.Z)((0,oe.Z)({},En),Ke),{},{flex:"0 0 ".concat(Nn,"px"),width:"".concat(Nn,"px"),marginRight:In,pointerEvents:"auto"}),ir=h.useMemo(function(){return at?jn<=1:Gn===0||jn===0||jn>1},[jn,Gn,at]);ir?Bn.visibility="hidden":at&&(Bn.height=it==null?void 0:it(jn));var mr=ir?function(){return null}:At,fr={};return(jn===0||Gn===0)&&(fr.rowSpan=1,fr.colSpan=1),h.createElement(sn,(0,B.Z)({className:j()(qt,tt),ellipsis:Pe.ellipsis,align:Pe.align,scope:Pe.rowScope,component:It,prefixCls:Oe.prefixCls,key:On,record:lt,index:ut,renderIndex:Bt,dataIndex:Ht,render:mr,shouldCellUpdate:Pe.shouldCellUpdate},hn,{appendNode:Vn,additionalProps:(0,oe.Z)((0,oe.Z)({},Mn),{},{style:Bn},fr)}))}var cn=nt,_n=["data","index","className","rowKey","style","extra","getHeight"],U=h.forwardRef(function(ue,Oe){var Pe=ue.data,Me=ue.index,Je=ue.className,ut=ue.rowKey,It=ue.style,Bt=ue.extra,lt=ue.getHeight,Ke=(0,xe.Z)(ue,_n),tt=Pe.record,at=Pe.indent,it=Pe.index,At=A(I,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Ht=At.scrollX,qt=At.flattenColumns,an=At.prefixCls,Sn=At.fixColumn,Rn=At.componentWidth,yn=A(Jt,["getComponent"]),On=yn.getComponent,hn=Ie(tt,ut,Me,at),Vn=On(["body","row"],"div"),Mn=On(["body","cell"],"div"),En=hn.rowSupportExpand,Hn=hn.expanded,Gn=hn.rowProps,er=hn.expandedRowRender,jn=hn.expandedRowClassName,$n;if(En&&Hn){var Nn=er(tt,Me,at+1,Hn),In=Kt(jn,tt,Me,at),Bn={};Sn&&(Bn={style:(0,pe.Z)({},"--virtual-width","".concat(Rn,"px"))});var ir="".concat(an,"-expanded-row-cell");$n=h.createElement(Vn,{className:j()("".concat(an,"-expanded-row"),"".concat(an,"-expanded-row-level-").concat(at+1),In)},h.createElement(sn,{component:Mn,prefixCls:an,className:j()(ir,(0,pe.Z)({},"".concat(ir,"-fixed"),Sn)),additionalProps:Bn},Nn))}var mr=(0,oe.Z)((0,oe.Z)({},It),{},{width:Ht});Bt&&(mr.position="absolute",mr.pointerEvents="none");var fr=h.createElement(Vn,(0,B.Z)({},Gn,Ke,{"data-row-key":ut,ref:En?null:Oe,className:j()(Je,"".concat(an,"-row"),Gn==null?void 0:Gn.className,(0,pe.Z)({},"".concat(an,"-row-extra"),Bt)),style:(0,oe.Z)((0,oe.Z)({},mr),Gn==null?void 0:Gn.style)}),qt.map(function(dr,kr){return h.createElement(cn,{key:kr,component:Mn,rowInfo:hn,column:dr,colIndex:kr,indent:at,index:Me,renderIndex:it,record:tt,inverse:Bt,getHeight:lt})}));return En?h.createElement("div",{ref:Oe},fr,$n):fr}),M=b(U),he=M,Be=h.forwardRef(function(ue,Oe){var Pe=ue.data,Me=ue.onScroll,Je=A(I,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),ut=Je.flattenColumns,It=Je.onColumnResize,Bt=Je.getRowKey,lt=Je.expandedKeys,Ke=Je.prefixCls,tt=Je.childrenColumnName,at=Je.scrollX,it=Je.direction,At=A(Jt),Ht=At.sticky,qt=At.scrollY,an=At.listItemHeight,Sn=At.getComponent,Rn=At.onScroll,yn=h.useRef(),On=Se(Pe,tt,lt,Bt),hn=h.useMemo(function(){var $n=0;return ut.map(function(Nn){var In=Nn.width,Bn=Nn.key;return $n+=In,[Bn,In,$n]})},[ut]),Vn=h.useMemo(function(){return hn.map(function($n){return $n[2]})},[hn]);h.useEffect(function(){hn.forEach(function($n){var Nn=(0,ae.Z)($n,2),In=Nn[0],Bn=Nn[1];It(In,Bn)})},[hn]),h.useImperativeHandle(Oe,function(){var $n,Nn={scrollTo:function(Bn){var ir;(ir=yn.current)===null||ir===void 0||ir.scrollTo(Bn)},nativeElement:($n=yn.current)===null||$n===void 0?void 0:$n.nativeElement};return Object.defineProperty(Nn,"scrollLeft",{get:function(){var Bn;return((Bn=yn.current)===null||Bn===void 0?void 0:Bn.getScrollInfo().x)||0},set:function(Bn){var ir;(ir=yn.current)===null||ir===void 0||ir.scrollTo({left:Bn})}}),Nn});var Mn=function(Nn,In){var Bn,ir=(Bn=On[In])===null||Bn===void 0?void 0:Bn.record,mr=Nn.onCell;if(mr){var fr,dr=mr(ir,In);return(fr=dr==null?void 0:dr.rowSpan)!==null&&fr!==void 0?fr:1}return 1},En=function(Nn){var In=Nn.start,Bn=Nn.end,ir=Nn.getSize,mr=Nn.offsetY;if(Bn<0)return null;for(var fr=ut.filter(function(Zn){return Mn(Zn,In)===0}),dr=In,kr=function(yr){if(fr=fr.filter(function(Qn){return Mn(Qn,yr)===0}),!fr.length)return dr=yr,1},Wr=In;Wr>=0&&!kr(Wr);Wr-=1);for(var Kr=ut.filter(function(Zn){return Mn(Zn,Bn)!==1}),Ai=Bn,Jr=function(yr){if(Kr=Kr.filter(function(Qn){return Mn(Qn,yr)!==1}),!Kr.length)return Ai=Math.max(yr-1,Bn),1},ei=Bn;ei<On.length&&!Jr(ei);ei+=1);for(var Tr=[],Rr=function(yr){var Qn=On[yr];if(!Qn)return 1;ut.some(function(Ar){return Mn(Ar,yr)>1})&&Tr.push(yr)},ti=dr;ti<=Ai;ti+=1)Rr(ti);var Cr=Tr.map(function(Zn){var yr=On[Zn],Qn=Bt(yr.record,Zn),Ar=function(Er){var Fr=Zn+Er-1,wn=Bt(On[Fr].record,Fr),tr=ir(Qn,wn);return tr.bottom-tr.top},ur=ir(Qn);return h.createElement(he,{key:Zn,data:yr,rowKey:Qn,index:Zn,style:{top:-mr+ur.top},extra:!0,getHeight:Ar})});return Cr},Hn=h.useMemo(function(){return{columnsOffset:Vn}},[Vn]),Gn="".concat(Ke,"-tbody"),er=Sn(["body","wrapper"]),jn={};return Ht&&(jn.position="sticky",jn.bottom=0,(0,q.Z)(Ht)==="object"&&Ht.offsetScroll&&(jn.bottom=Ht.offsetScroll)),h.createElement(fn.Provider,{value:Hn},h.createElement(Rt.Z,{fullHeight:!1,ref:yn,prefixCls:"".concat(Gn,"-virtual"),styles:{horizontalScrollBar:jn},className:Gn,height:qt,itemHeight:an||24,data:On,itemKey:function(Nn){return Bt(Nn.record)},component:er,scrollWidth:at,direction:it,onVirtualScroll:function(Nn){var In,Bn=Nn.x;Me({currentTarget:(In=yn.current)===null||In===void 0?void 0:In.nativeElement,scrollLeft:Bn})},onScroll:Rn,extraRender:En},function($n,Nn,In){var Bn=Bt($n.record,Nn);return h.createElement(he,{data:$n,rowKey:Bn,index:Nn,style:In.style})}))}),Ze=b(Be),ze=Ze,ht=function(Oe,Pe){var Me=Pe.ref,Je=Pe.onScroll;return h.createElement(ze,{ref:Me,data:Oe,onScroll:Je})};function wt(ue,Oe){var Pe=ue.data,Me=ue.columns,Je=ue.scroll,ut=ue.sticky,It=ue.prefixCls,Bt=It===void 0?xn:It,lt=ue.className,Ke=ue.listItemHeight,tt=ue.components,at=ue.onScroll,it=Je||{},At=it.x,Ht=it.y;typeof At!="number"&&(At=1),typeof Ht!="number"&&(Ht=500);var qt=(0,Ot.zX)(function(Rn,yn){return(0,ee.Z)(tt,Rn)||yn}),an=(0,Ot.zX)(at),Sn=h.useMemo(function(){return{sticky:ut,scrollY:Ht,listItemHeight:Ke,getComponent:qt,onScroll:an}},[ut,Ht,Ke,qt,an]);return h.createElement(Jt.Provider,{value:Sn},h.createElement(Xt,(0,B.Z)({},ue,{className:j()(lt,"".concat(Bt,"-virtual")),scroll:(0,oe.Z)((0,oe.Z)({},Je),{},{x:At}),components:(0,oe.Z)((0,oe.Z)({},tt),{},{body:Pe!=null&&Pe.length?ht:void 0}),columns:Me,internalHooks:N.R,tailor:!0,ref:Oe})))}var zt=h.forwardRef(wt);function St(ue){return Z(zt,ue)}var Tt=St(),tn=null},54451:function(Fn,st,C){"use strict";C.d(st,{g:function(){return h},v:function(){return Q}});var N=C(20439),ae=C(62646),ve=C(48736),le=["expandable"],Q="RC_TABLE_INTERNAL_COL_DEFINE";function h(ge){var ie=ge.expandable,A=(0,ae.Z)(ge,le),B;return"expandable"in ge?B=(0,N.Z)((0,N.Z)({},A),ie):B=A,B.showExpandColumn===!1&&(B.expandIconColumnIndex=-1),B}},22711:function(Fn,st,C){"use strict";C.r(st),C.d(st,{ResizableTextArea:function(){return _e},default:function(){return z}});var N=C(14809),ae=C(4635),ve=C(20439),le=C(95190),Q=C(50298),h=C(62646),ge=C(92310),ie=C.n(ge),A=C(36901),B=C(66003),T=C(30292),p=C(18929),v=C(59301),E=C(93664),S=C(29301),F=C(34280),O=C(16089),Z=`
|
|
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;
|
|
`,b=["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"],L={},D;function I(Ae){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=Ae.getAttribute("id")||Ae.getAttribute("data-reactid")||Ae.getAttribute("name");if(Y&&L[y])return L[y];var _=window.getComputedStyle(Ae),V=_.getPropertyValue("box-sizing")||_.getPropertyValue("-moz-box-sizing")||_.getPropertyValue("-webkit-box-sizing"),de=parseFloat(_.getPropertyValue("padding-bottom"))+parseFloat(_.getPropertyValue("padding-top")),We=parseFloat(_.getPropertyValue("border-bottom-width"))+parseFloat(_.getPropertyValue("border-top-width")),Qe=b.map(function(Et){return"".concat(Et,":").concat(_.getPropertyValue(Et))}).join(";"),ct={sizingStyle:Qe,paddingSize:de,borderSize:We,boxSizing:V};return Y&&y&&(L[y]=ct),ct}function re(Ae){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,_=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;D||(D=document.createElement("textarea"),D.setAttribute("tab-index","-1"),D.setAttribute("aria-hidden","true"),D.setAttribute("name","hiddenTextarea"),document.body.appendChild(D)),Ae.getAttribute("wrap")?D.setAttribute("wrap",Ae.getAttribute("wrap")):D.removeAttribute("wrap");var V=I(Ae,Y),de=V.paddingSize,We=V.borderSize,Qe=V.boxSizing,ct=V.sizingStyle;D.setAttribute("style","".concat(ct,";").concat(Z)),D.value=Ae.value||Ae.placeholder||"";var Et=void 0,Mt=void 0,Ot,Fe=D.scrollHeight;if(Qe==="border-box"?Fe+=We:Qe==="content-box"&&(Fe-=de),y!==null||_!==null){D.value=" ";var kt=D.scrollHeight-de;y!==null&&(Et=kt*y,Qe==="border-box"&&(Et=Et+de+We),Fe=Math.max(Et,Fe)),_!==null&&(Mt=kt*_,Qe==="border-box"&&(Mt=Mt+de+We),Ot=Fe>Mt?"":"hidden",Fe=Math.min(Mt,Fe))}var sn={height:Fe,overflowY:Ot,resize:"none"};return Et&&(sn.minHeight=Et),Mt&&(sn.maxHeight=Mt),sn}var ce=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],X=0,q=1,oe=2,pe=v.forwardRef(function(Ae,Y){var y=Ae,_=y.prefixCls,V=y.defaultValue,de=y.value,We=y.autoSize,Qe=y.onResize,ct=y.className,Et=y.style,Mt=y.disabled,Ot=y.onChange,Fe=y.onInternalAutoSize,kt=(0,h.Z)(y,ce),sn=(0,p.Z)(V,{value:de,postState:function(en){return en!=null?en:""}}),jt=(0,Q.Z)(sn,2),pn=jt[0],mt=jt[1],ke=function(en){mt(en.target.value),Ot==null||Ot(en)},xe=v.useRef();v.useImperativeHandle(Y,function(){return{textArea:xe.current}});var W=v.useMemo(function(){return We&&(0,E.Z)(We)==="object"?[We.minRows,We.maxRows]:[]},[We]),Re=(0,Q.Z)(W,2),$e=Re[0],J=Re[1],R=!!We,k=function(){try{if(document.activeElement===xe.current){var en=xe.current,on=en.selectionStart,Vt=en.selectionEnd,gn=en.scrollTop;xe.current.setSelectionRange(on,Vt),xe.current.scrollTop=gn}}catch(Pn){}},se=v.useState(oe),$=(0,Q.Z)(se,2),G=$[0],te=$[1],Ce=v.useState(),we=(0,Q.Z)(Ce,2),Se=we[0],Ie=we[1],Ne=function(){te(X)};(0,F.Z)(function(){R&&Ne()},[de,$e,J,R]),(0,F.Z)(function(){if(G===X)te(q);else if(G===q){var vt=re(xe.current,!1,$e,J);te(oe),Ie(vt)}else k()},[G]);var qe=v.useRef(),et=function(){O.Z.cancel(qe.current)},ft=function(en){G===oe&&(Qe==null||Qe(en),We&&(et(),qe.current=(0,O.Z)(function(){Ne()})))};v.useEffect(function(){return et},[]);var Kt=R?Se:null,Ct=(0,ve.Z)((0,ve.Z)({},Et),Kt);return(G===X||G===q)&&(Ct.overflowY="hidden",Ct.overflowX="hidden"),v.createElement(S.Z,{onResize:ft,disabled:!(We||Qe)},v.createElement("textarea",(0,N.Z)({},kt,{ref:xe,style:Ct,className:ie()(_,ct,(0,ae.Z)({},"".concat(_,"-disabled"),Mt)),disabled:Mt,value:pn,onChange:ke})))}),_e=pe,j=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],K=v.forwardRef(function(Ae,Y){var y,_=Ae.defaultValue,V=Ae.value,de=Ae.onFocus,We=Ae.onBlur,Qe=Ae.onChange,ct=Ae.allowClear,Et=Ae.maxLength,Mt=Ae.onCompositionStart,Ot=Ae.onCompositionEnd,Fe=Ae.suffix,kt=Ae.prefixCls,sn=kt===void 0?"rc-textarea":kt,jt=Ae.showCount,pn=Ae.count,mt=Ae.className,ke=Ae.style,xe=Ae.disabled,W=Ae.hidden,Re=Ae.classNames,$e=Ae.styles,J=Ae.onResize,R=Ae.onClear,k=Ae.onPressEnter,se=Ae.readOnly,$=Ae.autoSize,G=Ae.onKeyDown,te=(0,h.Z)(Ae,j),Ce=(0,p.Z)(_,{value:V,defaultValue:_}),we=(0,Q.Z)(Ce,2),Se=we[0],Ie=we[1],Ne=Se==null?"":String(Se),qe=v.useState(!1),et=(0,Q.Z)(qe,2),ft=et[0],Kt=et[1],Ct=v.useRef(!1),vt=v.useState(null),en=(0,Q.Z)(vt,2),on=en[0],Vt=en[1],gn=(0,v.useRef)(null),Pn=(0,v.useRef)(null),Gt=function(){var qn;return(qn=Pn.current)===null||qn===void 0?void 0:qn.textArea},mn=function(){Gt().focus()};(0,v.useImperativeHandle)(Y,function(){var kn;return{resizableTextArea:Pn.current,focus:mn,blur:function(){Gt().blur()},nativeElement:((kn=gn.current)===null||kn===void 0?void 0:kn.nativeElement)||Gt()}}),(0,v.useEffect)(function(){Kt(function(kn){return!xe&&kn})},[xe]);var Ye=v.useState(null),Ge=(0,Q.Z)(Ye,2),He=Ge[0],ne=Ge[1];v.useEffect(function(){if(He){var kn;(kn=Gt()).setSelectionRange.apply(kn,(0,le.Z)(He))}},[He]);var fe=(0,B.Z)(pn,jt),ye=(y=fe.max)!==null&&y!==void 0?y:Et,Ee=Number(ye)>0,Te=fe.strategy(Ne),xt=!!ye&&Te>ye,Wt=function(qn,vr){var br=vr;!Ct.current&&fe.exceedFormatter&&fe.max&&fe.strategy(vr)>fe.max&&(br=fe.exceedFormatter(vr,{max:fe.max}),vr!==br&&ne([Gt().selectionStart||0,Gt().selectionEnd||0])),Ie(br),(0,T.rJ)(qn.currentTarget,qn,Qe,br)},nn=function(qn){Ct.current=!0,Mt==null||Mt(qn)},Cn=function(qn){Ct.current=!1,Wt(qn,qn.currentTarget.value),Ot==null||Ot(qn)},Wn=function(qn){Wt(qn,qn.target.value)},zn=function(qn){qn.key==="Enter"&&k&&k(qn),G==null||G(qn)},vn=function(qn){Kt(!0),de==null||de(qn)},Dn=function(qn){Kt(!1),We==null||We(qn)},or=function(qn){Ie(""),mn(),(0,T.rJ)(Gt(),qn,Qe)},pr=Fe,rr;fe.show&&(fe.showFormatter?rr=fe.showFormatter({value:Ne,count:Te,maxLength:ye}):rr="".concat(Te).concat(Ee?" / ".concat(ye):""),pr=v.createElement(v.Fragment,null,pr,v.createElement("span",{className:ie()("".concat(sn,"-data-count"),Re==null?void 0:Re.count),style:$e==null?void 0:$e.count},rr)));var cr=function(qn){var vr;J==null||J(qn),(vr=Gt())!==null&&vr!==void 0&&vr.style.height&&Vt(!0)},Jn=!$&&!jt&&!ct;return v.createElement(A.BaseInput,{ref:gn,value:Ne,allowClear:ct,handleReset:or,suffix:pr,prefixCls:sn,classNames:(0,ve.Z)((0,ve.Z)({},Re),{},{affixWrapper:ie()(Re==null?void 0:Re.affixWrapper,(0,ae.Z)((0,ae.Z)({},"".concat(sn,"-show-count"),jt),"".concat(sn,"-textarea-allow-clear"),ct))}),disabled:xe,focused:ft,className:ie()(mt,xt&&"".concat(sn,"-out-of-range")),style:(0,ve.Z)((0,ve.Z)({},ke),on&&!Jn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof rr=="string"?rr:void 0}},hidden:W,readOnly:se,onClear:R},v.createElement(_e,(0,N.Z)({},te,{autoSize:$,maxLength:Et,onKeyDown:zn,onChange:Wn,onFocus:vn,onBlur:Dn,onCompositionStart:nn,onCompositionEnd:Cn,className:ie()(Re==null?void 0:Re.textarea),style:(0,ve.Z)((0,ve.Z)({},$e==null?void 0:$e.textarea),{},{resize:ke==null?void 0:ke.resize}),disabled:xe,prefixCls:sn,onResize:cr,ref:Pn,readOnly:se})))}),ee=K,z=ee},29125:function(Fn,st,C){"use strict";C.d(st,{G:function(){return le},Z:function(){return Z}});var N=C(92310),ae=C.n(N),ve=C(59301);function le(b){var L=b.children,D=b.prefixCls,I=b.id,re=b.overlayInnerStyle,ce=b.bodyClassName,X=b.className,q=b.style;return ve.createElement("div",{className:ae()("".concat(D,"-content"),X),style:q},ve.createElement("div",{className:ae()("".concat(D,"-inner"),ce),id:I,role:"tooltip",style:re},typeof L=="function"?L():L))}var Q=C(14809),h=C(20439),ge=C(62646),ie=C(65966),A={shiftX:64,adjustY:1},B={adjustX:1,shiftY:!0},T=[0,0],p={left:{points:["cr","cl"],overflow:B,offset:[-4,0],targetOffset:T},right:{points:["cl","cr"],overflow:B,offset:[4,0],targetOffset:T},top:{points:["bc","tc"],overflow:A,offset:[0,-4],targetOffset:T},bottom:{points:["tc","bc"],overflow:A,offset:[0,4],targetOffset:T},topLeft:{points:["bl","tl"],overflow:A,offset:[0,-4],targetOffset:T},leftTop:{points:["tr","tl"],overflow:B,offset:[-4,0],targetOffset:T},topRight:{points:["br","tr"],overflow:A,offset:[0,-4],targetOffset:T},rightTop:{points:["tl","tr"],overflow:B,offset:[4,0],targetOffset:T},bottomRight:{points:["tr","br"],overflow:A,offset:[0,4],targetOffset:T},rightBottom:{points:["bl","br"],overflow:B,offset:[4,0],targetOffset:T},bottomLeft:{points:["tl","bl"],overflow:A,offset:[0,4],targetOffset:T},leftBottom:{points:["br","bl"],overflow:B,offset:[-4,0],targetOffset:T}},v=null,E=C(80402),S=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],F=function(L,D){var I=L.overlayClassName,re=L.trigger,ce=re===void 0?["hover"]:re,X=L.mouseEnterDelay,q=X===void 0?0:X,oe=L.mouseLeaveDelay,pe=oe===void 0?.1:oe,_e=L.overlayStyle,j=L.prefixCls,K=j===void 0?"rc-tooltip":j,ee=L.children,z=L.onVisibleChange,Ae=L.afterVisibleChange,Y=L.transitionName,y=L.animation,_=L.motion,V=L.placement,de=V===void 0?"right":V,We=L.align,Qe=We===void 0?{}:We,ct=L.destroyTooltipOnHide,Et=ct===void 0?!1:ct,Mt=L.defaultVisible,Ot=L.getTooltipContainer,Fe=L.overlayInnerStyle,kt=L.arrowContent,sn=L.overlay,jt=L.id,pn=L.showArrow,mt=pn===void 0?!0:pn,ke=L.classNames,xe=L.styles,W=(0,ge.Z)(L,S),Re=(0,E.Z)(jt),$e=(0,ve.useRef)(null);(0,ve.useImperativeHandle)(D,function(){return $e.current});var J=(0,h.Z)({},W);"visible"in L&&(J.popupVisible=L.visible);var R=function(){return ve.createElement(le,{key:"content",prefixCls:K,id:Re,bodyClassName:ke==null?void 0:ke.body,overlayInnerStyle:(0,h.Z)((0,h.Z)({},Fe),xe==null?void 0:xe.body)},sn)},k=function(){var $=ve.Children.only(ee),G=($==null?void 0:$.props)||{},te=(0,h.Z)((0,h.Z)({},G),{},{"aria-describedby":sn?Re:null});return ve.cloneElement(ee,te)};return ve.createElement(ie.Z,(0,Q.Z)({popupClassName:ae()(I,ke==null?void 0:ke.root),prefixCls:K,popup:R,action:ce,builtinPlacements:p,popupPlacement:de,ref:$e,popupAlign:Qe,getPopupContainer:Ot,onPopupVisibleChange:z,afterPopupVisibleChange:Ae,popupTransitionName:Y,popupAnimation:y,popupMotion:_,defaultPopupVisible:Mt,autoDestroy:Et,mouseLeaveDelay:pe,popupStyle:(0,h.Z)((0,h.Z)({},_e),xe==null?void 0:xe.root),mouseEnterDelay:q,arrow:mt},J),k())},O=(0,ve.forwardRef)(F),Z=O},639:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return L}});var N=C(14809),ae=C(4635),ve=C(20439),le=C(50298),Q=C(62646),h=C(59301),ge=C(92310),ie=C.n(ge),A=C(26112),B=C(30699),T=function(I){for(var re=I.prefixCls,ce=I.level,X=I.isStart,q=I.isEnd,oe="".concat(re,"-indent-unit"),pe=[],_e=0;_e<ce;_e+=1)pe.push(h.createElement("span",{key:_e,className:ie()(oe,(0,ae.Z)((0,ae.Z)({},"".concat(oe,"-start"),X[_e]),"".concat(oe,"-end"),q[_e]))}));return h.createElement("span",{"aria-hidden":"true",className:"".concat(re,"-indent")},pe)},p=h.memo(T),v=C(65065),E=C(34061),S=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],F="open",O="close",Z="---",b=function(I){var re,ce,X,q=I.eventKey,oe=I.className,pe=I.style,_e=I.dragOver,j=I.dragOverGapTop,K=I.dragOverGapBottom,ee=I.isLeaf,z=I.isStart,Ae=I.isEnd,Y=I.expanded,y=I.selected,_=I.checked,V=I.halfChecked,de=I.loading,We=I.domRef,Qe=I.active,ct=I.data,Et=I.onMouseMove,Mt=I.selectable,Ot=(0,Q.Z)(I,S),Fe=h.useContext(B.k),kt=h.useContext(B.y),sn=h.useRef(null),jt=h.useState(!1),pn=(0,le.Z)(jt,2),mt=pn[0],ke=pn[1],xe=!!(Fe.disabled||I.disabled||(re=kt.nodeDisabled)!==null&&re!==void 0&&re.call(kt,ct)),W=h.useMemo(function(){return!Fe.checkable||I.checkable===!1?!1:Fe.checkable},[Fe.checkable,I.checkable]),Re=function(Te){xe||Fe.onNodeSelect(Te,(0,E.F)(I))},$e=function(Te){xe||!W||I.disableCheckbox||Fe.onNodeCheck(Te,(0,E.F)(I),!_)},J=h.useMemo(function(){return typeof Mt=="boolean"?Mt:Fe.selectable},[Mt,Fe.selectable]),R=function(Te){Fe.onNodeClick(Te,(0,E.F)(I)),J?Re(Te):$e(Te)},k=function(Te){Fe.onNodeDoubleClick(Te,(0,E.F)(I))},se=function(Te){Fe.onNodeMouseEnter(Te,(0,E.F)(I))},$=function(Te){Fe.onNodeMouseLeave(Te,(0,E.F)(I))},G=function(Te){Fe.onNodeContextMenu(Te,(0,E.F)(I))},te=h.useMemo(function(){return!!(Fe.draggable&&(!Fe.draggable.nodeDraggable||Fe.draggable.nodeDraggable(ct)))},[Fe.draggable,ct]),Ce=function(Te){Te.stopPropagation(),ke(!0),Fe.onNodeDragStart(Te,I);try{Te.dataTransfer.setData("text/plain","")}catch(xt){}},we=function(Te){Te.preventDefault(),Te.stopPropagation(),Fe.onNodeDragEnter(Te,I)},Se=function(Te){Te.preventDefault(),Te.stopPropagation(),Fe.onNodeDragOver(Te,I)},Ie=function(Te){Te.stopPropagation(),Fe.onNodeDragLeave(Te,I)},Ne=function(Te){Te.stopPropagation(),ke(!1),Fe.onNodeDragEnd(Te,I)},qe=function(Te){Te.preventDefault(),Te.stopPropagation(),ke(!1),Fe.onNodeDrop(Te,I)},et=function(Te){de||Fe.onNodeExpand(Te,(0,E.F)(I))},ft=h.useMemo(function(){var Ee=(0,v.Z)(Fe.keyEntities,q)||{},Te=Ee.children;return!!(Te||[]).length},[Fe.keyEntities,q]),Kt=h.useMemo(function(){return ee===!1?!1:ee||!Fe.loadData&&!ft||Fe.loadData&&I.loaded&&!ft},[ee,Fe.loadData,ft,I.loaded]);h.useEffect(function(){de||typeof Fe.loadData=="function"&&Y&&!Kt&&!I.loaded&&Fe.onNodeLoad((0,E.F)(I))},[de,Fe.loadData,Fe.onNodeLoad,Y,Kt,I]);var Ct=h.useMemo(function(){var Ee;return(Ee=Fe.draggable)!==null&&Ee!==void 0&&Ee.icon?h.createElement("span",{className:"".concat(Fe.prefixCls,"-draggable-icon")},Fe.draggable.icon):null},[Fe.draggable]),vt=function(Te){var xt=I.switcherIcon||Fe.switcherIcon;return typeof xt=="function"?xt((0,ve.Z)((0,ve.Z)({},I),{},{isLeaf:Te})):xt},en=function(){if(Kt){var Te=vt(!0);return Te!==!1?h.createElement("span",{className:ie()("".concat(Fe.prefixCls,"-switcher"),"".concat(Fe.prefixCls,"-switcher-noop"))},Te):null}var xt=vt(!1);return xt!==!1?h.createElement("span",{onClick:et,className:ie()("".concat(Fe.prefixCls,"-switcher"),"".concat(Fe.prefixCls,"-switcher_").concat(Y?F:O))},xt):null},on=h.useMemo(function(){if(!W)return null;var Ee=typeof W!="boolean"?W:null;return h.createElement("span",{className:ie()("".concat(Fe.prefixCls,"-checkbox"),(0,ae.Z)((0,ae.Z)((0,ae.Z)({},"".concat(Fe.prefixCls,"-checkbox-checked"),_),"".concat(Fe.prefixCls,"-checkbox-indeterminate"),!_&&V),"".concat(Fe.prefixCls,"-checkbox-disabled"),xe||I.disableCheckbox)),onClick:$e,role:"checkbox","aria-checked":V?"mixed":_,"aria-disabled":xe||I.disableCheckbox,"aria-label":"Select ".concat(typeof I.title=="string"?I.title:"tree node")},Ee)},[W,_,V,xe,I.disableCheckbox,I.title]),Vt=h.useMemo(function(){return Kt?null:Y?F:O},[Kt,Y]),gn=h.useMemo(function(){return h.createElement("span",{className:ie()("".concat(Fe.prefixCls,"-iconEle"),"".concat(Fe.prefixCls,"-icon__").concat(Vt||"docu"),(0,ae.Z)({},"".concat(Fe.prefixCls,"-icon_loading"),de))})},[Fe.prefixCls,Vt,de]),Pn=h.useMemo(function(){var Ee=!!Fe.draggable,Te=!I.disabled&&Ee&&Fe.dragOverNodeKey===q;return Te?Fe.dropIndicatorRender({dropPosition:Fe.dropPosition,dropLevelOffset:Fe.dropLevelOffset,indent:Fe.indent,prefixCls:Fe.prefixCls,direction:Fe.direction}):null},[Fe.dropPosition,Fe.dropLevelOffset,Fe.indent,Fe.prefixCls,Fe.direction,Fe.draggable,Fe.dragOverNodeKey,Fe.dropIndicatorRender]),Gt=h.useMemo(function(){var Ee=I.title,Te=Ee===void 0?Z:Ee,xt="".concat(Fe.prefixCls,"-node-content-wrapper"),Wt;if(Fe.showIcon){var nn=I.icon||Fe.icon;Wt=nn?h.createElement("span",{className:ie()("".concat(Fe.prefixCls,"-iconEle"),"".concat(Fe.prefixCls,"-icon__customize"))},typeof nn=="function"?nn(I):nn):gn}else Fe.loadData&&de&&(Wt=gn);var Cn;return typeof Te=="function"?Cn=Te(ct):Fe.titleRender?Cn=Fe.titleRender(ct):Cn=Te,h.createElement("span",{ref:sn,title:typeof Te=="string"?Te:"",className:ie()(xt,"".concat(xt,"-").concat(Vt||"normal"),(0,ae.Z)({},"".concat(Fe.prefixCls,"-node-selected"),!xe&&(y||mt))),onMouseEnter:se,onMouseLeave:$,onContextMenu:G,onClick:R,onDoubleClick:k},Wt,h.createElement("span",{className:"".concat(Fe.prefixCls,"-title")},Cn),Pn)},[Fe.prefixCls,Fe.showIcon,I,Fe.icon,gn,Fe.titleRender,ct,Vt,se,$,G,R,k]),mn=(0,A.Z)(Ot,{aria:!0,data:!0}),Ye=(0,v.Z)(Fe.keyEntities,q)||{},Ge=Ye.level,He=Ae[Ae.length-1],ne=!xe&&te,fe=Fe.draggingNodeKey===q,ye=Mt!==void 0?{"aria-selected":!!Mt}:void 0;return h.createElement("div",(0,N.Z)({ref:We,role:"treeitem","aria-expanded":ee?void 0:Y,className:ie()(oe,"".concat(Fe.prefixCls,"-treenode"),(X={},(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)(X,"".concat(Fe.prefixCls,"-treenode-disabled"),xe),"".concat(Fe.prefixCls,"-treenode-switcher-").concat(Y?"open":"close"),!ee),"".concat(Fe.prefixCls,"-treenode-checkbox-checked"),_),"".concat(Fe.prefixCls,"-treenode-checkbox-indeterminate"),V),"".concat(Fe.prefixCls,"-treenode-selected"),y),"".concat(Fe.prefixCls,"-treenode-loading"),de),"".concat(Fe.prefixCls,"-treenode-active"),Qe),"".concat(Fe.prefixCls,"-treenode-leaf-last"),He),"".concat(Fe.prefixCls,"-treenode-draggable"),te),"dragging",fe),(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)(X,"drop-target",Fe.dropTargetKey===q),"drop-container",Fe.dropContainerKey===q),"drag-over",!xe&&_e),"drag-over-gap-top",!xe&&j),"drag-over-gap-bottom",!xe&&K),"filter-node",(ce=Fe.filterTreeNode)===null||ce===void 0?void 0:ce.call(Fe,(0,E.F)(I))),"".concat(Fe.prefixCls,"-treenode-leaf"),Kt))),style:pe,draggable:ne,onDragStart:ne?Ce:void 0,onDragEnter:te?we:void 0,onDragOver:te?Se:void 0,onDragLeave:te?Ie:void 0,onDrop:te?qe:void 0,onDragEnd:te?Ne:void 0,onMouseMove:Et},ye,mn),h.createElement(p,{prefixCls:Fe.prefixCls,level:Ge,isStart:z,isEnd:Ae}),Ct,en(),on,Gt)};b.isTreeNode=1;var L=b},30699:function(Fn,st,C){"use strict";C.d(st,{k:function(){return ae},y:function(){return ve}});var N=C(59301),ae=N.createContext(null),ve=N.createContext({})},29530:function(Fn,st,C){"use strict";C.d(st,{OF:function(){return q.Z},y6:function(){return O.y},ZP:function(){return xe}});var N=C(14809),ae=C(93664),ve=C(20439),le=C(95190),Q=C(99153),h=C(84851),ge=C(13028),ie=C(19257),A=C(93046),B=C(4635),T=C(92310),p=C.n(T),v=C(10228),E=C(26112),S=C(48736),F=C(59301),O=C(30699),Z=function(Re){var $e=Re.dropPosition,J=Re.dropLevelOffset,R=Re.indent,k={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch($e){case-1:k.top=0,k.left=-J*R;break;case 1:k.bottom=0,k.left=-J*R;break;case 0:k.bottom=0,k.left=R;break}return F.createElement("div",{style:k})},b=Z;function L(W){if(W==null)throw new TypeError("Cannot destructure "+W)}var D=C(50298),I=C(62646),re=C(34280),ce=C(65283),X=C(77900),q=C(639);function oe(W,Re){var $e=F.useState(!1),J=(0,D.Z)($e,2),R=J[0],k=J[1];(0,re.Z)(function(){if(R)return W(),function(){Re()}},[R]),(0,re.Z)(function(){return k(!0),function(){k(!1)}},[])}var pe=oe,_e=C(34061),j=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],K=F.forwardRef(function(W,Re){var $e=W.className,J=W.style,R=W.motion,k=W.motionNodes,se=W.motionType,$=W.onMotionStart,G=W.onMotionEnd,te=W.active,Ce=W.treeNodeRequiredProps,we=(0,I.Z)(W,j),Se=F.useState(!0),Ie=(0,D.Z)(Se,2),Ne=Ie[0],qe=Ie[1],et=F.useContext(O.k),ft=et.prefixCls,Kt=k&&se!=="hide";(0,re.Z)(function(){k&&Kt!==Ne&&qe(Kt)},[k]);var Ct=function(){k&&$()},vt=F.useRef(!1),en=function(){k&&!vt.current&&(vt.current=!0,G())};pe(Ct,en);var on=function(gn){Kt===gn&&en()};return k?F.createElement(X.default,(0,N.Z)({ref:Re,visible:Ne},R,{motionAppear:se==="show",onVisibleChanged:on}),function(Vt,gn){var Pn=Vt.className,Gt=Vt.style;return F.createElement("div",{ref:gn,className:p()("".concat(ft,"-treenode-motion"),Pn),style:Gt},k.map(function(mn){var Ye=Object.assign({},(L(mn.data),mn.data)),Ge=mn.title,He=mn.key,ne=mn.isStart,fe=mn.isEnd;delete Ye.children;var ye=(0,_e.H8)(He,Ce);return F.createElement(q.Z,(0,N.Z)({},Ye,ye,{title:Ge,active:te,data:mn.data,key:He,isStart:ne,isEnd:fe}))}))}):F.createElement(q.Z,(0,N.Z)({domRef:Re,className:$e,style:J},we,{active:te}))}),ee=K;function z(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],$e=W.length,J=Re.length;if(Math.abs($e-J)!==1)return{add:!1,key:null};function R(k,se){var $=new Map;k.forEach(function(te){$.set(te,!0)});var G=se.filter(function(te){return!$.has(te)});return G.length===1?G[0]:null}return $e<J?{add:!0,key:R(W,Re)}:{add:!1,key:R(Re,W)}}function Ae(W,Re,$e){var J=W.findIndex(function($){return $.key===$e}),R=W[J+1],k=Re.findIndex(function($){return $.key===$e});if(R){var se=Re.findIndex(function($){return $.key===R.key});return Re.slice(k+1,se)}return Re.slice(k+1)}var Y=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],y={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},_=function(){},V="RC_TREE_MOTION_".concat(Math.random()),de={key:V},We={key:V,level:0,index:0,pos:"0",node:de,nodes:[de]},Qe={parent:null,children:[],pos:We.pos,data:de,title:null,key:V,isStart:[],isEnd:[]};function ct(W,Re,$e,J){return Re===!1||!$e?W:W.slice(0,Math.ceil($e/J)+1)}function Et(W){var Re=W.key,$e=W.pos;return(0,_e.km)(Re,$e)}function Mt(W){for(var Re=String(W.data.key),$e=W;$e.parent;)$e=$e.parent,Re="".concat($e.data.key," > ").concat(Re);return Re}var Ot=F.forwardRef(function(W,Re){var $e=W.prefixCls,J=W.data,R=W.selectable,k=W.checkable,se=W.expandedKeys,$=W.selectedKeys,G=W.checkedKeys,te=W.loadedKeys,Ce=W.loadingKeys,we=W.halfCheckedKeys,Se=W.keyEntities,Ie=W.disabled,Ne=W.dragging,qe=W.dragOverNodeKey,et=W.dropPosition,ft=W.motion,Kt=W.height,Ct=W.itemHeight,vt=W.virtual,en=W.scrollWidth,on=W.focusable,Vt=W.activeItem,gn=W.focused,Pn=W.tabIndex,Gt=W.onKeyDown,mn=W.onFocus,Ye=W.onBlur,Ge=W.onActiveChange,He=W.onListChangeStart,ne=W.onListChangeEnd,fe=(0,I.Z)(W,Y),ye=F.useRef(null),Ee=F.useRef(null);F.useImperativeHandle(Re,function(){return{scrollTo:function(pt){ye.current.scrollTo(pt)},getIndentWidth:function(){return Ee.current.offsetWidth}}});var Te=F.useState(se),xt=(0,D.Z)(Te,2),Wt=xt[0],nn=xt[1],Cn=F.useState(J),Wn=(0,D.Z)(Cn,2),zn=Wn[0],vn=Wn[1],Dn=F.useState(J),or=(0,D.Z)(Dn,2),pr=or[0],rr=or[1],cr=F.useState([]),Jn=(0,D.Z)(cr,2),kn=Jn[0],qn=Jn[1],vr=F.useState(null),br=(0,D.Z)(vr,2),je=br[0],Ve=br[1],Yt=F.useRef(J);Yt.current=J;function Pt(){var yt=Yt.current;vn(yt),rr(yt),qn([]),Ve(null),ne()}(0,re.Z)(function(){nn(se);var yt=z(Wt,se);if(yt.key!==null)if(yt.add){var pt=zn.findIndex(function($t){var Le=$t.key;return Le===yt.key}),Lt=ct(Ae(zn,J,yt.key),vt,Kt,Ct),rn=zn.slice();rn.splice(pt+1,0,Qe),rr(rn),qn(Lt),Ve("show")}else{var dn=J.findIndex(function($t){var Le=$t.key;return Le===yt.key}),xn=ct(Ae(J,zn,yt.key),vt,Kt,Ct),dt=J.slice();dt.splice(dn+1,0,Qe),rr(dt),qn(xn),Ve("hide")}else zn!==J&&(vn(J),rr(J))},[se,J]),F.useEffect(function(){Ne||Pt()},[Ne]);var An=ft?pr:J,un={expandedKeys:se,selectedKeys:$,loadedKeys:te,loadingKeys:Ce,checkedKeys:G,halfCheckedKeys:we,dragOverNodeKey:qe,dropPosition:et,keyEntities:Se};return F.createElement(F.Fragment,null,gn&&Vt&&F.createElement("span",{style:y,"aria-live":"assertive"},Mt(Vt)),F.createElement("div",null,F.createElement("input",{style:y,disabled:on===!1||Ie,tabIndex:on!==!1?Pn:null,onKeyDown:Gt,onFocus:mn,onBlur:Ye,value:"",onChange:_,"aria-label":"for screen reader"})),F.createElement("div",{className:"".concat($e,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},F.createElement("div",{className:"".concat($e,"-indent")},F.createElement("div",{ref:Ee,className:"".concat($e,"-indent-unit")}))),F.createElement(ce.Z,(0,N.Z)({},fe,{data:An,itemKey:Et,height:Kt,fullHeight:!1,virtual:vt,itemHeight:Ct,scrollWidth:en,prefixCls:"".concat($e,"-list"),ref:ye,role:"tree",onVisibleChange:function(pt){pt.every(function(Lt){return Et(Lt)!==V})&&Pt()}}),function(yt){var pt=yt.pos,Lt=Object.assign({},(L(yt.data),yt.data)),rn=yt.title,dn=yt.key,xn=yt.isStart,dt=yt.isEnd,$t=(0,_e.km)(dn,pt);delete Lt.key,delete Lt.children;var Le=(0,_e.H8)($t,un);return F.createElement(ee,(0,N.Z)({},Lt,Le,{title:rn,active:!!Vt&&dn===Vt.key,pos:pt,data:yt.data,isStart:xn,isEnd:dt,motion:ft,motionNodes:dn===V?kn:null,motionType:je,onMotionStart:He,onMotionEnd:Pt,treeNodeRequiredProps:un,onMouseMove:function(){Ge(null)}}))}))}),Fe=Ot,kt=C(82661),sn=C(34643),jt=C(65065),pn=10,mt=function(W){(0,ie.Z)($e,W);var Re=(0,A.Z)($e);function $e(){var J;(0,Q.Z)(this,$e);for(var R=arguments.length,k=new Array(R),se=0;se<R;se++)k[se]=arguments[se];return J=Re.call.apply(Re,[this].concat(k)),(0,B.Z)((0,ge.Z)(J),"destroyed",!1),(0,B.Z)((0,ge.Z)(J),"delayedDragEnterLogic",void 0),(0,B.Z)((0,ge.Z)(J),"loadingRetryTimes",{}),(0,B.Z)((0,ge.Z)(J),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,_e.w$)()}),(0,B.Z)((0,ge.Z)(J),"dragStartMousePosition",null),(0,B.Z)((0,ge.Z)(J),"dragNodeProps",null),(0,B.Z)((0,ge.Z)(J),"currentMouseOverDroppableNodeKey",null),(0,B.Z)((0,ge.Z)(J),"listRef",F.createRef()),(0,B.Z)((0,ge.Z)(J),"onNodeDragStart",function($,G){var te=J.state,Ce=te.expandedKeys,we=te.keyEntities,Se=J.props.onDragStart,Ie=G.eventKey;J.dragNodeProps=G,J.dragStartMousePosition={x:$.clientX,y:$.clientY};var Ne=(0,kt._5)(Ce,Ie);J.setState({draggingNodeKey:Ie,dragChildrenKeys:(0,kt.wA)(Ie,we),indent:J.listRef.current.getIndentWidth()}),J.setExpandedKeys(Ne),window.addEventListener("dragend",J.onWindowDragEnd),Se==null||Se({event:$,node:(0,_e.F)(G)})}),(0,B.Z)((0,ge.Z)(J),"onNodeDragEnter",function($,G){var te=J.state,Ce=te.expandedKeys,we=te.keyEntities,Se=te.dragChildrenKeys,Ie=te.flattenNodes,Ne=te.indent,qe=J.props,et=qe.onDragEnter,ft=qe.onExpand,Kt=qe.allowDrop,Ct=qe.direction,vt=G.pos,en=G.eventKey;if(J.currentMouseOverDroppableNodeKey!==en&&(J.currentMouseOverDroppableNodeKey=en),!J.dragNodeProps){J.resetDragState();return}var on=(0,kt.OM)($,J.dragNodeProps,G,Ne,J.dragStartMousePosition,Kt,Ie,we,Ce,Ct),Vt=on.dropPosition,gn=on.dropLevelOffset,Pn=on.dropTargetKey,Gt=on.dropContainerKey,mn=on.dropTargetPos,Ye=on.dropAllowed,Ge=on.dragOverNodeKey;if(Se.includes(Pn)||!Ye){J.resetDragState();return}if(J.delayedDragEnterLogic||(J.delayedDragEnterLogic={}),Object.keys(J.delayedDragEnterLogic).forEach(function(He){clearTimeout(J.delayedDragEnterLogic[He])}),J.dragNodeProps.eventKey!==G.eventKey&&($.persist(),J.delayedDragEnterLogic[vt]=window.setTimeout(function(){if(J.state.draggingNodeKey!==null){var He=(0,le.Z)(Ce),ne=(0,jt.Z)(we,G.eventKey);ne&&(ne.children||[]).length&&(He=(0,kt.L0)(Ce,G.eventKey)),J.props.hasOwnProperty("expandedKeys")||J.setExpandedKeys(He),ft==null||ft(He,{node:(0,_e.F)(G),expanded:!0,nativeEvent:$.nativeEvent})}},800)),J.dragNodeProps.eventKey===Pn&&gn===0){J.resetDragState();return}J.setState({dragOverNodeKey:Ge,dropPosition:Vt,dropLevelOffset:gn,dropTargetKey:Pn,dropContainerKey:Gt,dropTargetPos:mn,dropAllowed:Ye}),et==null||et({event:$,node:(0,_e.F)(G),expandedKeys:Ce})}),(0,B.Z)((0,ge.Z)(J),"onNodeDragOver",function($,G){var te=J.state,Ce=te.dragChildrenKeys,we=te.flattenNodes,Se=te.keyEntities,Ie=te.expandedKeys,Ne=te.indent,qe=J.props,et=qe.onDragOver,ft=qe.allowDrop,Kt=qe.direction;if(J.dragNodeProps){var Ct=(0,kt.OM)($,J.dragNodeProps,G,Ne,J.dragStartMousePosition,ft,we,Se,Ie,Kt),vt=Ct.dropPosition,en=Ct.dropLevelOffset,on=Ct.dropTargetKey,Vt=Ct.dropContainerKey,gn=Ct.dropTargetPos,Pn=Ct.dropAllowed,Gt=Ct.dragOverNodeKey;Ce.includes(on)||!Pn||(J.dragNodeProps.eventKey===on&&en===0?J.state.dropPosition===null&&J.state.dropLevelOffset===null&&J.state.dropTargetKey===null&&J.state.dropContainerKey===null&&J.state.dropTargetPos===null&&J.state.dropAllowed===!1&&J.state.dragOverNodeKey===null||J.resetDragState():vt===J.state.dropPosition&&en===J.state.dropLevelOffset&&on===J.state.dropTargetKey&&Vt===J.state.dropContainerKey&&gn===J.state.dropTargetPos&&Pn===J.state.dropAllowed&&Gt===J.state.dragOverNodeKey||J.setState({dropPosition:vt,dropLevelOffset:en,dropTargetKey:on,dropContainerKey:Vt,dropTargetPos:gn,dropAllowed:Pn,dragOverNodeKey:Gt}),et==null||et({event:$,node:(0,_e.F)(G)}))}}),(0,B.Z)((0,ge.Z)(J),"onNodeDragLeave",function($,G){J.currentMouseOverDroppableNodeKey===G.eventKey&&!$.currentTarget.contains($.relatedTarget)&&(J.resetDragState(),J.currentMouseOverDroppableNodeKey=null);var te=J.props.onDragLeave;te==null||te({event:$,node:(0,_e.F)(G)})}),(0,B.Z)((0,ge.Z)(J),"onWindowDragEnd",function($){J.onNodeDragEnd($,null,!0),window.removeEventListener("dragend",J.onWindowDragEnd)}),(0,B.Z)((0,ge.Z)(J),"onNodeDragEnd",function($,G){var te=J.props.onDragEnd;J.setState({dragOverNodeKey:null}),J.cleanDragState(),te==null||te({event:$,node:(0,_e.F)(G)}),J.dragNodeProps=null,window.removeEventListener("dragend",J.onWindowDragEnd)}),(0,B.Z)((0,ge.Z)(J),"onNodeDrop",function($,G){var te,Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,we=J.state,Se=we.dragChildrenKeys,Ie=we.dropPosition,Ne=we.dropTargetKey,qe=we.dropTargetPos,et=we.dropAllowed;if(et){var ft=J.props.onDrop;if(J.setState({dragOverNodeKey:null}),J.cleanDragState(),Ne!==null){var Kt=(0,ve.Z)((0,ve.Z)({},(0,_e.H8)(Ne,J.getTreeNodeRequiredProps())),{},{active:((te=J.getActiveItem())===null||te===void 0?void 0:te.key)===Ne,data:(0,jt.Z)(J.state.keyEntities,Ne).node}),Ct=Se.includes(Ne);(0,S.ZP)(!Ct,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var vt=(0,kt.yx)(qe),en={event:$,node:(0,_e.F)(Kt),dragNode:J.dragNodeProps?(0,_e.F)(J.dragNodeProps):null,dragNodesKeys:[J.dragNodeProps.eventKey].concat(Se),dropToGap:Ie!==0,dropPosition:Ie+Number(vt[vt.length-1])};Ce||ft==null||ft(en),J.dragNodeProps=null}}}),(0,B.Z)((0,ge.Z)(J),"cleanDragState",function(){var $=J.state.draggingNodeKey;$!==null&&J.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),J.dragStartMousePosition=null,J.currentMouseOverDroppableNodeKey=null}),(0,B.Z)((0,ge.Z)(J),"triggerExpandActionExpand",function($,G){var te=J.state,Ce=te.expandedKeys,we=te.flattenNodes,Se=G.expanded,Ie=G.key,Ne=G.isLeaf;if(!(Ne||$.shiftKey||$.metaKey||$.ctrlKey)){var qe=we.filter(function(ft){return ft.key===Ie})[0],et=(0,_e.F)((0,ve.Z)((0,ve.Z)({},(0,_e.H8)(Ie,J.getTreeNodeRequiredProps())),{},{data:qe.data}));J.setExpandedKeys(Se?(0,kt._5)(Ce,Ie):(0,kt.L0)(Ce,Ie)),J.onNodeExpand($,et)}}),(0,B.Z)((0,ge.Z)(J),"onNodeClick",function($,G){var te=J.props,Ce=te.onClick,we=te.expandAction;we==="click"&&J.triggerExpandActionExpand($,G),Ce==null||Ce($,G)}),(0,B.Z)((0,ge.Z)(J),"onNodeDoubleClick",function($,G){var te=J.props,Ce=te.onDoubleClick,we=te.expandAction;we==="doubleClick"&&J.triggerExpandActionExpand($,G),Ce==null||Ce($,G)}),(0,B.Z)((0,ge.Z)(J),"onNodeSelect",function($,G){var te=J.state.selectedKeys,Ce=J.state,we=Ce.keyEntities,Se=Ce.fieldNames,Ie=J.props,Ne=Ie.onSelect,qe=Ie.multiple,et=G.selected,ft=G[Se.key],Kt=!et;Kt?qe?te=(0,kt.L0)(te,ft):te=[ft]:te=(0,kt._5)(te,ft);var Ct=te.map(function(vt){var en=(0,jt.Z)(we,vt);return en?en.node:null}).filter(Boolean);J.setUncontrolledState({selectedKeys:te}),Ne==null||Ne(te,{event:"select",selected:Kt,node:G,selectedNodes:Ct,nativeEvent:$.nativeEvent})}),(0,B.Z)((0,ge.Z)(J),"onNodeCheck",function($,G,te){var Ce=J.state,we=Ce.keyEntities,Se=Ce.checkedKeys,Ie=Ce.halfCheckedKeys,Ne=J.props,qe=Ne.checkStrictly,et=Ne.onCheck,ft=G.key,Kt,Ct={event:"check",node:G,checked:te,nativeEvent:$.nativeEvent};if(qe){var vt=te?(0,kt.L0)(Se,ft):(0,kt._5)(Se,ft),en=(0,kt._5)(Ie,ft);Kt={checked:vt,halfChecked:en},Ct.checkedNodes=vt.map(function(mn){return(0,jt.Z)(we,mn)}).filter(Boolean).map(function(mn){return mn.node}),J.setUncontrolledState({checkedKeys:vt})}else{var on=(0,sn.S)([].concat((0,le.Z)(Se),[ft]),!0,we),Vt=on.checkedKeys,gn=on.halfCheckedKeys;if(!te){var Pn=new Set(Vt);Pn.delete(ft);var Gt=(0,sn.S)(Array.from(Pn),{checked:!1,halfCheckedKeys:gn},we);Vt=Gt.checkedKeys,gn=Gt.halfCheckedKeys}Kt=Vt,Ct.checkedNodes=[],Ct.checkedNodesPositions=[],Ct.halfCheckedKeys=gn,Vt.forEach(function(mn){var Ye=(0,jt.Z)(we,mn);if(Ye){var Ge=Ye.node,He=Ye.pos;Ct.checkedNodes.push(Ge),Ct.checkedNodesPositions.push({node:Ge,pos:He})}}),J.setUncontrolledState({checkedKeys:Vt},!1,{halfCheckedKeys:gn})}et==null||et(Kt,Ct)}),(0,B.Z)((0,ge.Z)(J),"onNodeLoad",function($){var G,te=$.key,Ce=J.state.keyEntities,we=(0,jt.Z)(Ce,te);if(!(we!=null&&(G=we.children)!==null&&G!==void 0&&G.length)){var Se=new Promise(function(Ie,Ne){J.setState(function(qe){var et=qe.loadedKeys,ft=et===void 0?[]:et,Kt=qe.loadingKeys,Ct=Kt===void 0?[]:Kt,vt=J.props,en=vt.loadData,on=vt.onLoad;if(!en||ft.includes(te)||Ct.includes(te))return null;var Vt=en($);return Vt.then(function(){var gn=J.state.loadedKeys,Pn=(0,kt.L0)(gn,te);on==null||on(Pn,{event:"load",node:$}),J.setUncontrolledState({loadedKeys:Pn}),J.setState(function(Gt){return{loadingKeys:(0,kt._5)(Gt.loadingKeys,te)}}),Ie()}).catch(function(gn){if(J.setState(function(Gt){return{loadingKeys:(0,kt._5)(Gt.loadingKeys,te)}}),J.loadingRetryTimes[te]=(J.loadingRetryTimes[te]||0)+1,J.loadingRetryTimes[te]>=pn){var Pn=J.state.loadedKeys;(0,S.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),J.setUncontrolledState({loadedKeys:(0,kt.L0)(Pn,te)}),Ie()}Ne(gn)}),{loadingKeys:(0,kt.L0)(Ct,te)}})});return Se.catch(function(){}),Se}}),(0,B.Z)((0,ge.Z)(J),"onNodeMouseEnter",function($,G){var te=J.props.onMouseEnter;te==null||te({event:$,node:G})}),(0,B.Z)((0,ge.Z)(J),"onNodeMouseLeave",function($,G){var te=J.props.onMouseLeave;te==null||te({event:$,node:G})}),(0,B.Z)((0,ge.Z)(J),"onNodeContextMenu",function($,G){var te=J.props.onRightClick;te&&($.preventDefault(),te({event:$,node:G}))}),(0,B.Z)((0,ge.Z)(J),"onFocus",function(){var $=J.props.onFocus;J.setState({focused:!0});for(var G=arguments.length,te=new Array(G),Ce=0;Ce<G;Ce++)te[Ce]=arguments[Ce];$==null||$.apply(void 0,te)}),(0,B.Z)((0,ge.Z)(J),"onBlur",function(){var $=J.props.onBlur;J.setState({focused:!1}),J.onActiveChange(null);for(var G=arguments.length,te=new Array(G),Ce=0;Ce<G;Ce++)te[Ce]=arguments[Ce];$==null||$.apply(void 0,te)}),(0,B.Z)((0,ge.Z)(J),"getTreeNodeRequiredProps",function(){var $=J.state,G=$.expandedKeys,te=$.selectedKeys,Ce=$.loadedKeys,we=$.loadingKeys,Se=$.checkedKeys,Ie=$.halfCheckedKeys,Ne=$.dragOverNodeKey,qe=$.dropPosition,et=$.keyEntities;return{expandedKeys:G||[],selectedKeys:te||[],loadedKeys:Ce||[],loadingKeys:we||[],checkedKeys:Se||[],halfCheckedKeys:Ie||[],dragOverNodeKey:Ne,dropPosition:qe,keyEntities:et}}),(0,B.Z)((0,ge.Z)(J),"setExpandedKeys",function($){var G=J.state,te=G.treeData,Ce=G.fieldNames,we=(0,_e.oH)(te,$,Ce);J.setUncontrolledState({expandedKeys:$,flattenNodes:we},!0)}),(0,B.Z)((0,ge.Z)(J),"onNodeExpand",function($,G){var te=J.state.expandedKeys,Ce=J.state,we=Ce.listChanging,Se=Ce.fieldNames,Ie=J.props,Ne=Ie.onExpand,qe=Ie.loadData,et=G.expanded,ft=G[Se.key];if(!we){var Kt=te.includes(ft),Ct=!et;if((0,S.ZP)(et&&Kt||!et&&!Kt,"Expand state not sync with index check"),te=Ct?(0,kt.L0)(te,ft):(0,kt._5)(te,ft),J.setExpandedKeys(te),Ne==null||Ne(te,{node:G,expanded:Ct,nativeEvent:$.nativeEvent}),Ct&&qe){var vt=J.onNodeLoad(G);vt&&vt.then(function(){var en=(0,_e.oH)(J.state.treeData,te,Se);J.setUncontrolledState({flattenNodes:en})}).catch(function(){var en=J.state.expandedKeys,on=(0,kt._5)(en,ft);J.setExpandedKeys(on)})}}}),(0,B.Z)((0,ge.Z)(J),"onListChangeStart",function(){J.setUncontrolledState({listChanging:!0})}),(0,B.Z)((0,ge.Z)(J),"onListChangeEnd",function(){setTimeout(function(){J.setUncontrolledState({listChanging:!1})})}),(0,B.Z)((0,ge.Z)(J),"onActiveChange",function($){var G=J.state.activeKey,te=J.props,Ce=te.onActiveChange,we=te.itemScrollOffset,Se=we===void 0?0:we;G!==$&&(J.setState({activeKey:$}),$!==null&&J.scrollTo({key:$,offset:Se}),Ce==null||Ce($))}),(0,B.Z)((0,ge.Z)(J),"getActiveItem",function(){var $=J.state,G=$.activeKey,te=$.flattenNodes;return G===null?null:te.find(function(Ce){var we=Ce.key;return we===G})||null}),(0,B.Z)((0,ge.Z)(J),"offsetActiveKey",function($){var G=J.state,te=G.flattenNodes,Ce=G.activeKey,we=te.findIndex(function(Ne){var qe=Ne.key;return qe===Ce});we===-1&&$<0&&(we=te.length),we=(we+$+te.length)%te.length;var Se=te[we];if(Se){var Ie=Se.key;J.onActiveChange(Ie)}else J.onActiveChange(null)}),(0,B.Z)((0,ge.Z)(J),"onKeyDown",function($){var G=J.state,te=G.activeKey,Ce=G.expandedKeys,we=G.checkedKeys,Se=G.fieldNames,Ie=J.props,Ne=Ie.onKeyDown,qe=Ie.checkable,et=Ie.selectable;switch($.which){case v.Z.UP:{J.offsetActiveKey(-1),$.preventDefault();break}case v.Z.DOWN:{J.offsetActiveKey(1),$.preventDefault();break}}var ft=J.getActiveItem();if(ft&&ft.data){var Kt=J.getTreeNodeRequiredProps(),Ct=ft.data.isLeaf===!1||!!(ft.data[Se.children]||[]).length,vt=(0,_e.F)((0,ve.Z)((0,ve.Z)({},(0,_e.H8)(te,Kt)),{},{data:ft.data,active:!0}));switch($.which){case v.Z.LEFT:{Ct&&Ce.includes(te)?J.onNodeExpand({},vt):ft.parent&&J.onActiveChange(ft.parent.key),$.preventDefault();break}case v.Z.RIGHT:{Ct&&!Ce.includes(te)?J.onNodeExpand({},vt):ft.children&&ft.children.length&&J.onActiveChange(ft.children[0].key),$.preventDefault();break}case v.Z.ENTER:case v.Z.SPACE:{qe&&!vt.disabled&&vt.checkable!==!1&&!vt.disableCheckbox?J.onNodeCheck({},vt,!we.includes(te)):!qe&&et&&!vt.disabled&&vt.selectable!==!1&&J.onNodeSelect({},vt);break}}}Ne==null||Ne($)}),(0,B.Z)((0,ge.Z)(J),"setUncontrolledState",function($){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!J.destroyed){var Ce=!1,we=!0,Se={};Object.keys($).forEach(function(Ie){if(J.props.hasOwnProperty(Ie)){we=!1;return}Ce=!0,Se[Ie]=$[Ie]}),Ce&&(!G||we)&&J.setState((0,ve.Z)((0,ve.Z)({},Se),te))}}),(0,B.Z)((0,ge.Z)(J),"scrollTo",function($){J.listRef.current.scrollTo($)}),J}return(0,h.Z)($e,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var R=this.props,k=R.activeKey,se=R.itemScrollOffset,$=se===void 0?0:se;k!==void 0&&k!==this.state.activeKey&&(this.setState({activeKey:k}),k!==null&&this.scrollTo({key:k,offset:$}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var R=this.state,k=R.focused,se=R.flattenNodes,$=R.keyEntities,G=R.draggingNodeKey,te=R.activeKey,Ce=R.dropLevelOffset,we=R.dropContainerKey,Se=R.dropTargetKey,Ie=R.dropPosition,Ne=R.dragOverNodeKey,qe=R.indent,et=this.props,ft=et.prefixCls,Kt=et.className,Ct=et.style,vt=et.showLine,en=et.focusable,on=et.tabIndex,Vt=on===void 0?0:on,gn=et.selectable,Pn=et.showIcon,Gt=et.icon,mn=et.switcherIcon,Ye=et.draggable,Ge=et.checkable,He=et.checkStrictly,ne=et.disabled,fe=et.motion,ye=et.loadData,Ee=et.filterTreeNode,Te=et.height,xt=et.itemHeight,Wt=et.scrollWidth,nn=et.virtual,Cn=et.titleRender,Wn=et.dropIndicatorRender,zn=et.onContextMenu,vn=et.onScroll,Dn=et.direction,or=et.rootClassName,pr=et.rootStyle,rr=(0,E.Z)(this.props,{aria:!0,data:!0}),cr;Ye&&((0,ae.Z)(Ye)==="object"?cr=Ye:typeof Ye=="function"?cr={nodeDraggable:Ye}:cr={});var Jn={prefixCls:ft,selectable:gn,showIcon:Pn,icon:Gt,switcherIcon:mn,draggable:cr,draggingNodeKey:G,checkable:Ge,checkStrictly:He,disabled:ne,keyEntities:$,dropLevelOffset:Ce,dropContainerKey:we,dropTargetKey:Se,dropPosition:Ie,dragOverNodeKey:Ne,indent:qe,direction:Dn,dropIndicatorRender:Wn,loadData:ye,filterTreeNode:Ee,titleRender:Cn,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return F.createElement(O.k.Provider,{value:Jn},F.createElement("div",{className:p()(ft,Kt,or,(0,B.Z)((0,B.Z)((0,B.Z)({},"".concat(ft,"-show-line"),vt),"".concat(ft,"-focused"),k),"".concat(ft,"-active-focused"),te!==null)),style:pr},F.createElement(Fe,(0,N.Z)({ref:this.listRef,prefixCls:ft,style:Ct,data:se,disabled:ne,selectable:gn,checkable:!!Ge,motion:fe,dragging:G!==null,height:Te,itemHeight:xt,virtual:nn,focusable:en,focused:k,tabIndex:Vt,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:zn,onScroll:vn,scrollWidth:Wt},this.getTreeNodeRequiredProps(),rr))))}}],[{key:"getDerivedStateFromProps",value:function(R,k){var se=k.prevProps,$={prevProps:R};function G(Vt){return!se&&R.hasOwnProperty(Vt)||se&&se[Vt]!==R[Vt]}var te,Ce=k.fieldNames;if(G("fieldNames")&&(Ce=(0,_e.w$)(R.fieldNames),$.fieldNames=Ce),G("treeData")?te=R.treeData:G("children")&&((0,S.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),te=(0,_e.zn)(R.children)),te){$.treeData=te;var we=(0,_e.I8)(te,{fieldNames:Ce});$.keyEntities=(0,ve.Z)((0,B.Z)({},V,We),we.keyEntities)}var Se=$.keyEntities||k.keyEntities;if(G("expandedKeys")||se&&G("autoExpandParent"))$.expandedKeys=R.autoExpandParent||!se&&R.defaultExpandParent?(0,kt.r7)(R.expandedKeys,Se):R.expandedKeys;else if(!se&&R.defaultExpandAll){var Ie=(0,ve.Z)({},Se);delete Ie[V];var Ne=[];Object.keys(Ie).forEach(function(Vt){var gn=Ie[Vt];gn.children&&gn.children.length&&Ne.push(gn.key)}),$.expandedKeys=Ne}else!se&&R.defaultExpandedKeys&&($.expandedKeys=R.autoExpandParent||R.defaultExpandParent?(0,kt.r7)(R.defaultExpandedKeys,Se):R.defaultExpandedKeys);if($.expandedKeys||delete $.expandedKeys,te||$.expandedKeys){var qe=(0,_e.oH)(te||k.treeData,$.expandedKeys||k.expandedKeys,Ce);$.flattenNodes=qe}if(R.selectable&&(G("selectedKeys")?$.selectedKeys=(0,kt.BT)(R.selectedKeys,R):!se&&R.defaultSelectedKeys&&($.selectedKeys=(0,kt.BT)(R.defaultSelectedKeys,R))),R.checkable){var et;if(G("checkedKeys")?et=(0,kt.E6)(R.checkedKeys)||{}:!se&&R.defaultCheckedKeys?et=(0,kt.E6)(R.defaultCheckedKeys)||{}:te&&(et=(0,kt.E6)(R.checkedKeys)||{checkedKeys:k.checkedKeys,halfCheckedKeys:k.halfCheckedKeys}),et){var ft=et,Kt=ft.checkedKeys,Ct=Kt===void 0?[]:Kt,vt=ft.halfCheckedKeys,en=vt===void 0?[]:vt;if(!R.checkStrictly){var on=(0,sn.S)(Ct,!0,Se);Ct=on.checkedKeys,en=on.halfCheckedKeys}$.checkedKeys=Ct,$.halfCheckedKeys=en}}return G("loadedKeys")&&($.loadedKeys=R.loadedKeys),$}}]),$e}(F.Component);(0,B.Z)(mt,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:b,allowDrop:function(){return!0},expandAction:!1}),(0,B.Z)(mt,"TreeNode",q.Z);var ke=mt,xe=ke},82661:function(Fn,st,C){"use strict";C.d(st,{BT:function(){return F},E6:function(){return b},L0:function(){return B},OM:function(){return S},_5:function(){return A},r7:function(){return L},wA:function(){return p},yx:function(){return T}});var N=C(95190),ae=C(93664),ve=C(48736),le=C(59301),Q=C(639),h=C(65065),ge=C(34061),ie=null;function A(D,I){if(!D)return[];var re=D.slice(),ce=re.indexOf(I);return ce>=0&&re.splice(ce,1),re}function B(D,I){var re=(D||[]).slice();return re.indexOf(I)===-1&&re.push(I),re}function T(D){return D.split("-")}function p(D,I){var re=[],ce=(0,h.Z)(I,D);function X(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];q.forEach(function(oe){var pe=oe.key,_e=oe.children;re.push(pe),X(_e)})}return X(ce.children),re}function v(D){if(D.parent){var I=T(D.pos);return Number(I[I.length-1])===D.parent.children.length-1}return!1}function E(D){var I=T(D.pos);return Number(I[I.length-1])===0}function S(D,I,re,ce,X,q,oe,pe,_e,j){var K,ee=D.clientX,z=D.clientY,Ae=D.target.getBoundingClientRect(),Y=Ae.top,y=Ae.height,_=(j==="rtl"?-1:1)*(((X==null?void 0:X.x)||0)-ee),V=(_-12)/ce,de=_e.filter(function(xe){var W;return(W=pe[xe])===null||W===void 0||(W=W.children)===null||W===void 0?void 0:W.length}),We=(0,h.Z)(pe,re.eventKey);if(z<Y+y/2){var Qe=oe.findIndex(function(xe){return xe.key===We.key}),ct=Qe<=0?0:Qe-1,Et=oe[ct].key;We=(0,h.Z)(pe,Et)}var Mt=We.key,Ot=We,Fe=We.key,kt=0,sn=0;if(!de.includes(Mt))for(var jt=0;jt<V&&v(We);jt+=1)We=We.parent,sn+=1;var pn=I.data,mt=We.node,ke=!0;return E(We)&&We.level===0&&z<Y+y/2&&q({dragNode:pn,dropNode:mt,dropPosition:-1})&&We.key===re.eventKey?kt=-1:(Ot.children||[]).length&&de.includes(Fe)?q({dragNode:pn,dropNode:mt,dropPosition:0})?kt=0:ke=!1:sn===0?V>-1.5?q({dragNode:pn,dropNode:mt,dropPosition:1})?kt=1:ke=!1:q({dragNode:pn,dropNode:mt,dropPosition:0})?kt=0:q({dragNode:pn,dropNode:mt,dropPosition:1})?kt=1:ke=!1:q({dragNode:pn,dropNode:mt,dropPosition:1})?kt=1:ke=!1,{dropPosition:kt,dropLevelOffset:sn,dropTargetKey:We.key,dropTargetPos:We.pos,dragOverNodeKey:Fe,dropContainerKey:kt===0?null:((K=We.parent)===null||K===void 0?void 0:K.key)||null,dropAllowed:ke}}function F(D,I){if(D){var re=I.multiple;return re?D.slice():D.length?[D[0]]:D}}var O=function(I){return I};function Z(D,I){if(!D)return[];var re=I||{},ce=re.processProps,X=ce===void 0?O:ce,q=Array.isArray(D)?D:[D];return q.map(function(oe){var pe=oe.children,_e=_objectWithoutProperties(oe,ie),j=Z(pe,I);return React.createElement(TreeNode,_extends({key:_e.key},X(_e)),j)})}function b(D){if(!D)return null;var I;if(Array.isArray(D))I={checkedKeys:D,halfCheckedKeys:void 0};else if((0,ae.Z)(D)==="object")I={checkedKeys:D.checked||void 0,halfCheckedKeys:D.halfChecked||void 0};else return(0,ve.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return I}function L(D,I){var re=new Set;function ce(X){if(!re.has(X)){var q=(0,h.Z)(I,X);if(q){re.add(X);var oe=q.parent,pe=q.node;pe.disabled||oe&&ce(oe.key)}}}return(D||[]).forEach(function(X){ce(X)}),(0,N.Z)(re)}},34643:function(Fn,st,C){"use strict";C.d(st,{S:function(){return ge}});var N=C(48736),ae=C(65065);function ve(ie,A){var B=new Set;return ie.forEach(function(T){A.has(T)||B.add(T)}),B}function le(ie){var A=ie||{},B=A.disabled,T=A.disableCheckbox,p=A.checkable;return!!(B||T)||p===!1}function Q(ie,A,B,T){for(var p=new Set(ie),v=new Set,E=0;E<=B;E+=1){var S=A.get(E)||new Set;S.forEach(function(b){var L=b.key,D=b.node,I=b.children,re=I===void 0?[]:I;p.has(L)&&!T(D)&&re.filter(function(ce){return!T(ce.node)}).forEach(function(ce){p.add(ce.key)})})}for(var F=new Set,O=B;O>=0;O-=1){var Z=A.get(O)||new Set;Z.forEach(function(b){var L=b.parent,D=b.node;if(!(T(D)||!b.parent||F.has(b.parent.key))){if(T(b.parent.node)){F.add(L.key);return}var I=!0,re=!1;(L.children||[]).filter(function(ce){return!T(ce.node)}).forEach(function(ce){var X=ce.key,q=p.has(X);I&&!q&&(I=!1),!re&&(q||v.has(X))&&(re=!0)}),I&&p.add(L.key),re&&v.add(L.key),F.add(L.key)}})}return{checkedKeys:Array.from(p),halfCheckedKeys:Array.from(ve(v,p))}}function h(ie,A,B,T,p){for(var v=new Set(ie),E=new Set(A),S=0;S<=T;S+=1){var F=B.get(S)||new Set;F.forEach(function(L){var D=L.key,I=L.node,re=L.children,ce=re===void 0?[]:re;!v.has(D)&&!E.has(D)&&!p(I)&&ce.filter(function(X){return!p(X.node)}).forEach(function(X){v.delete(X.key)})})}E=new Set;for(var O=new Set,Z=T;Z>=0;Z-=1){var b=B.get(Z)||new Set;b.forEach(function(L){var D=L.parent,I=L.node;if(!(p(I)||!L.parent||O.has(L.parent.key))){if(p(L.parent.node)){O.add(D.key);return}var re=!0,ce=!1;(D.children||[]).filter(function(X){return!p(X.node)}).forEach(function(X){var q=X.key,oe=v.has(q);re&&!oe&&(re=!1),!ce&&(oe||E.has(q))&&(ce=!0)}),re||v.delete(D.key),ce&&E.add(D.key),O.add(D.key)}})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(ve(E,v))}}function ge(ie,A,B,T){var p=[],v;T?v=T:v=le;var E=new Set(ie.filter(function(Z){var b=!!(0,ae.Z)(B,Z);return b||p.push(Z),b})),S=new Map,F=0;Object.keys(B).forEach(function(Z){var b=B[Z],L=b.level,D=S.get(L);D||(D=new Set,S.set(L,D)),D.add(b),F=Math.max(F,L)}),(0,N.ZP)(!p.length,"Tree missing follow keys: ".concat(p.slice(0,100).map(function(Z){return"'".concat(Z,"'")}).join(", ")));var O;return A===!0?O=Q(E,S,F,v):O=h(E,A.halfCheckedKeys,S,F,v),O}},65065:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return N}});function N(ae,ve){return ae[ve]}},34061:function(Fn,st,C){"use strict";C.d(st,{F:function(){return L},H8:function(){return b},I8:function(){return Z},km:function(){return p},oH:function(){return F},w$:function(){return v},zn:function(){return S}});var N=C(93664),ae=C(95190),ve=C(20439),le=C(62646),Q=C(11592),h=C(2738),ge=C(48736),ie=C(65065),A=["children"];function B(D,I){return"".concat(D,"-").concat(I)}function T(D){return D&&D.type&&D.type.isTreeNode}function p(D,I){return D!=null?D:I}function v(D){var I=D||{},re=I.title,ce=I._title,X=I.key,q=I.children,oe=re||"title";return{title:oe,_title:ce||[oe],key:X||"key",children:q||"children"}}function E(D,I){var re=new Map;function ce(X){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(X||[]).forEach(function(oe){var pe=oe[I.key],_e=oe[I.children];warning(pe!=null,"Tree node must have a certain key: [".concat(q).concat(pe,"]"));var j=String(pe);warning(!re.has(j)||pe===null||pe===void 0,"Same 'key' exist in the Tree: ".concat(j)),re.set(j,!0),ce(_e,"".concat(q).concat(j," > "))})}ce(D)}function S(D){function I(re){var ce=(0,Q.Z)(re);return ce.map(function(X){if(!T(X))return(0,ge.ZP)(!X,"Tree/TreeNode can only accept TreeNode as children."),null;var q=X.key,oe=X.props,pe=oe.children,_e=(0,le.Z)(oe,A),j=(0,ve.Z)({key:q},_e),K=I(pe);return K.length&&(j.children=K),j}).filter(function(X){return X})}return I(D)}function F(D,I,re){var ce=v(re),X=ce._title,q=ce.key,oe=ce.children,pe=new Set(I===!0?[]:I),_e=[];function j(K){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return K.map(function(z,Ae){for(var Y=B(ee?ee.pos:"0",Ae),y=p(z[q],Y),_,V=0;V<X.length;V+=1){var de=X[V];if(z[de]!==void 0){_=z[de];break}}var We=Object.assign((0,h.Z)(z,[].concat((0,ae.Z)(X),[q,oe])),{title:_,key:y,parent:ee,pos:Y,children:null,data:z,isStart:[].concat((0,ae.Z)(ee?ee.isStart:[]),[Ae===0]),isEnd:[].concat((0,ae.Z)(ee?ee.isEnd:[]),[Ae===K.length-1])});return _e.push(We),I===!0||pe.has(y)?We.children=j(z[oe]||[],We):We.children=[],We})}return j(D),_e}function O(D,I,re){var ce={};(0,N.Z)(re)==="object"?ce=re:ce={externalGetKey:re},ce=ce||{};var X=ce,q=X.childrenPropName,oe=X.externalGetKey,pe=X.fieldNames,_e=v(pe),j=_e.key,K=_e.children,ee=q||K,z;oe?typeof oe=="string"?z=function(y){return y[oe]}:typeof oe=="function"&&(z=function(y){return oe(y)}):z=function(y,_){return p(y[j],_)};function Ae(Y,y,_,V){var de=Y?Y[ee]:D,We=Y?B(_.pos,y):"0",Qe=Y?[].concat((0,ae.Z)(V),[Y]):[];if(Y){var ct=z(Y,We),Et={node:Y,index:y,pos:We,key:ct,parentPos:_.node?_.pos:null,level:_.level+1,nodes:Qe};I(Et)}de&&de.forEach(function(Mt,Ot){Ae(Mt,Ot,{node:Y,pos:We,level:_?_.level+1:-1},Qe)})}Ae(null)}function Z(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},re=I.initWrapper,ce=I.processEntity,X=I.onProcessFinished,q=I.externalGetKey,oe=I.childrenPropName,pe=I.fieldNames,_e=arguments.length>2?arguments[2]:void 0,j=q||_e,K={},ee={},z={posEntities:K,keyEntities:ee};return re&&(z=re(z)||z),O(D,function(Ae){var Y=Ae.node,y=Ae.index,_=Ae.pos,V=Ae.key,de=Ae.parentPos,We=Ae.level,Qe=Ae.nodes,ct={node:Y,nodes:Qe,index:y,key:V,pos:_,level:We},Et=p(V,_);K[_]=ct,ee[Et]=ct,ct.parent=K[de],ct.parent&&(ct.parent.children=ct.parent.children||[],ct.parent.children.push(ct)),ce&&ce(ct,z)},{externalGetKey:j,childrenPropName:oe,fieldNames:pe}),X&&X(z),z}function b(D,I){var re=I.expandedKeys,ce=I.selectedKeys,X=I.loadedKeys,q=I.loadingKeys,oe=I.checkedKeys,pe=I.halfCheckedKeys,_e=I.dragOverNodeKey,j=I.dropPosition,K=I.keyEntities,ee=(0,ie.Z)(K,D),z={eventKey:D,expanded:re.indexOf(D)!==-1,selected:ce.indexOf(D)!==-1,loaded:X.indexOf(D)!==-1,loading:q.indexOf(D)!==-1,checked:oe.indexOf(D)!==-1,halfChecked:pe.indexOf(D)!==-1,pos:String(ee?ee.pos:""),dragOver:_e===D&&j===0,dragOverGapTop:_e===D&&j===-1,dragOverGapBottom:_e===D&&j===1};return z}function L(D){var I=D.data,re=D.expanded,ce=D.selected,X=D.checked,q=D.loaded,oe=D.loading,pe=D.halfChecked,_e=D.dragOver,j=D.dragOverGapTop,K=D.dragOverGapBottom,ee=D.pos,z=D.active,Ae=D.eventKey,Y=(0,ve.Z)((0,ve.Z)({},I),{},{expanded:re,selected:ce,checked:X,loaded:q,loading:oe,halfChecked:pe,dragOver:_e,dragOverGapTop:j,dragOverGapBottom:K,pos:ee,active:z,key:Ae});return"props"in Y||Object.defineProperty(Y,"props",{get:function(){return(0,ge.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),D}}),Y}},8224:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return ae}});var N=C(4676);function ae(ve,le,Q,h){var ge=N.unstable_batchedUpdates?function(A){N.unstable_batchedUpdates(Q,A)}:Q;return ve!=null&&ve.addEventListener&&ve.addEventListener(le,ge,h),{remove:function(){ve!=null&&ve.removeEventListener&&ve.removeEventListener(le,ge,h)}}}},24514:function(Fn,st,C){"use strict";C.d(st,{G:function(){return le}});var N=C(47273),ae=function(h){if((0,N.Z)()&&window.document.documentElement){var ge=Array.isArray(h)?h:[h],ie=window.document.documentElement;return ge.some(function(A){return A in ie.style})}return!1},ve=function(h,ge){if(!ae(h))return!1;var ie=document.createElement("div"),A=ie.style[h];return ie.style[h]=ge,ie.style[h]!==A};function le(Q,h){return!Array.isArray(Q)&&h!==void 0?ve(Q,h):ae(Q)}},49658:function(Fn,st){"use strict";st.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var C=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(C)||/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(C==null?void 0:C.substr(0,4))}},65283:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return pn}});var N=C(14809),ae=C(93664),ve=C(20439),le=C(4635),Q=C(50298),h=C(62646),ge=C(92310),ie=C.n(ge),A=C(29301),B=C(70425),T=C(34280),p=C(59301),v=C(4676),E=p.forwardRef(function(mt,ke){var xe=mt.height,W=mt.offsetY,Re=mt.offsetX,$e=mt.children,J=mt.prefixCls,R=mt.onInnerResize,k=mt.innerProps,se=mt.rtl,$=mt.extra,G={},te={display:"flex",flexDirection:"column"};return W!==void 0&&(G={height:xe,position:"relative",overflow:"hidden"},te=(0,ve.Z)((0,ve.Z)({},te),{},(0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)({transform:"translateY(".concat(W,"px)")},se?"marginRight":"marginLeft",-Re),"position","absolute"),"left",0),"right",0),"top",0))),p.createElement("div",{style:G},p.createElement(A.Z,{onResize:function(we){var Se=we.offsetHeight;Se&&R&&R()}},p.createElement("div",(0,N.Z)({style:te,className:ie()((0,le.Z)({},"".concat(J,"-holder-inner"),J)),ref:ke},k),$e,$)))});E.displayName="Filler";var S=E;function F(mt){var ke=mt.children,xe=mt.setRef,W=p.useCallback(function(Re){xe(Re)},[]);return p.cloneElement(ke,{ref:W})}function O(mt,ke,xe,W,Re,$e,J,R){var k=R.getKey;return mt.slice(ke,xe+1).map(function(se,$){var G=ke+$,te=J(se,G,{style:{width:W},offsetX:Re}),Ce=k(se);return p.createElement(F,{key:Ce,setRef:function(Se){return $e(se,Se)}},te)})}function Z(mt,ke,xe,W){var Re=xe-mt,$e=ke-xe,J=Math.min(Re,$e)*2;if(W<=J){var R=Math.floor(W/2);return W%2?xe+R+1:xe-R}return Re>$e?xe-(W-$e):xe+(W-Re)}function b(mt,ke,xe){var W=mt.length,Re=ke.length,$e,J;if(W===0&&Re===0)return null;W<Re?($e=mt,J=ke):($e=ke,J=mt);var R={__EMPTY_ITEM__:!0};function k(we){return we!==void 0?xe(we):R}for(var se=null,$=Math.abs(W-Re)!==1,G=0;G<J.length;G+=1){var te=k($e[G]),Ce=k(J[G]);if(te!==Ce){se=G,$=$||te!==k(J[G+1]);break}}return se===null?null:{index:se,multiple:$}}function L(mt,ke,xe){var W=p.useState(mt),Re=(0,Q.Z)(W,2),$e=Re[0],J=Re[1],R=p.useState(null),k=(0,Q.Z)(R,2),se=k[0],$=k[1];return p.useEffect(function(){var G=b($e||[],mt||[],ke);(G==null?void 0:G.index)!==void 0&&(xe==null||xe(G.index),$(mt[G.index])),J(mt)},[mt]),[se]}var D=C(16089),I=(typeof navigator=="undefined"?"undefined":(0,ae.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),re=I,ce=function(mt,ke,xe,W){var Re=(0,p.useRef)(!1),$e=(0,p.useRef)(null);function J(){clearTimeout($e.current),Re.current=!0,$e.current=setTimeout(function(){Re.current=!1},50)}var R=(0,p.useRef)({top:mt,bottom:ke,left:xe,right:W});return R.current.top=mt,R.current.bottom=ke,R.current.left=xe,R.current.right=W,function(k,se){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,G=k?se<0&&R.current.left||se>0&&R.current.right:se<0&&R.current.top||se>0&&R.current.bottom;return $&&G?(clearTimeout($e.current),Re.current=!1):(!G||Re.current)&&J(),!Re.current&&G}};function X(mt,ke,xe,W,Re,$e,J){var R=(0,p.useRef)(0),k=(0,p.useRef)(null),se=(0,p.useRef)(null),$=(0,p.useRef)(!1),G=ce(ke,xe,W,Re);function te(qe,et){if(D.Z.cancel(k.current),!G(!1,et)){var ft=qe;if(!ft._virtualHandled)ft._virtualHandled=!0;else return;R.current+=et,se.current=et,re||ft.preventDefault(),k.current=(0,D.Z)(function(){var Kt=$.current?10:1;J(R.current*Kt,!1),R.current=0})}}function Ce(qe,et){J(et,!0),re||qe.preventDefault()}var we=(0,p.useRef)(null),Se=(0,p.useRef)(null);function Ie(qe){if(mt){D.Z.cancel(Se.current),Se.current=(0,D.Z)(function(){we.current=null},2);var et=qe.deltaX,ft=qe.deltaY,Kt=qe.shiftKey,Ct=et,vt=ft;(we.current==="sx"||!we.current&&Kt&&ft&&!et)&&(Ct=ft,vt=0,we.current="sx");var en=Math.abs(Ct),on=Math.abs(vt);we.current===null&&(we.current=$e&&en>on?"x":"y"),we.current==="y"?te(qe,vt):Ce(qe,Ct)}}function Ne(qe){mt&&($.current=qe.detail===se.current)}return[Ie,Ne]}function q(mt,ke,xe,W){var Re=p.useMemo(function(){return[new Map,[]]},[mt,xe.id,W]),$e=(0,Q.Z)(Re,2),J=$e[0],R=$e[1],k=function($){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$,te=J.get($),Ce=J.get(G);if(te===void 0||Ce===void 0)for(var we=mt.length,Se=R.length;Se<we;Se+=1){var Ie,Ne=mt[Se],qe=ke(Ne);J.set(qe,Se);var et=(Ie=xe.get(qe))!==null&&Ie!==void 0?Ie:W;if(R[Se]=(R[Se-1]||0)+et,qe===$&&(te=Se),qe===G&&(Ce=Se),te!==void 0&&Ce!==void 0)break}return{top:R[te-1]||0,bottom:R[Ce]}};return k}var oe=C(99153),pe=C(84851),_e=function(){function mt(){(0,oe.Z)(this,mt),(0,le.Z)(this,"maps",void 0),(0,le.Z)(this,"id",0),(0,le.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,pe.Z)(mt,[{key:"set",value:function(xe,W){this.diffRecords.set(xe,this.maps[xe]),this.maps[xe]=W,this.id+=1}},{key:"get",value:function(xe){return this.maps[xe]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),mt}(),j=_e;function K(mt){var ke=parseFloat(mt);return isNaN(ke)?0:ke}function ee(mt,ke,xe){var W=p.useState(0),Re=(0,Q.Z)(W,2),$e=Re[0],J=Re[1],R=(0,p.useRef)(new Map),k=(0,p.useRef)(new j),se=(0,p.useRef)(0);function $(){se.current+=1}function G(){var Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;$();var we=function(){var Ne=!1;R.current.forEach(function(qe,et){if(qe&&qe.offsetParent){var ft=qe.offsetHeight,Kt=getComputedStyle(qe),Ct=Kt.marginTop,vt=Kt.marginBottom,en=K(Ct),on=K(vt),Vt=ft+en+on;k.current.get(et)!==Vt&&(k.current.set(et,Vt),Ne=!0)}}),Ne&&J(function(qe){return qe+1})};if(Ce)we();else{se.current+=1;var Se=se.current;Promise.resolve().then(function(){Se===se.current&&we()})}}function te(Ce,we){var Se=mt(Ce),Ie=R.current.get(Se);we?(R.current.set(Se,we),G()):R.current.delete(Se),!Ie!=!we&&(we?ke==null||ke(Ce):xe==null||xe(Ce))}return(0,p.useEffect)(function(){return $},[]),[te,G,k.current,$e]}var z=14/15;function Ae(mt,ke,xe){var W=(0,p.useRef)(!1),Re=(0,p.useRef)(0),$e=(0,p.useRef)(0),J=(0,p.useRef)(null),R=(0,p.useRef)(null),k,se=function(Ce){if(W.current){var we=Math.ceil(Ce.touches[0].pageX),Se=Math.ceil(Ce.touches[0].pageY),Ie=Re.current-we,Ne=$e.current-Se,qe=Math.abs(Ie)>Math.abs(Ne);qe?Re.current=we:$e.current=Se;var et=xe(qe,qe?Ie:Ne,!1,Ce);et&&Ce.preventDefault(),clearInterval(R.current),et&&(R.current=setInterval(function(){qe?Ie*=z:Ne*=z;var ft=Math.floor(qe?Ie:Ne);(!xe(qe,ft,!0)||Math.abs(ft)<=.1)&&clearInterval(R.current)},16))}},$=function(){W.current=!1,k()},G=function(Ce){k(),Ce.touches.length===1&&!W.current&&(W.current=!0,Re.current=Math.ceil(Ce.touches[0].pageX),$e.current=Math.ceil(Ce.touches[0].pageY),J.current=Ce.target,J.current.addEventListener("touchmove",se,{passive:!1}),J.current.addEventListener("touchend",$,{passive:!0}))};k=function(){J.current&&(J.current.removeEventListener("touchmove",se),J.current.removeEventListener("touchend",$))},(0,T.Z)(function(){return mt&&ke.current.addEventListener("touchstart",G,{passive:!0}),function(){var te;(te=ke.current)===null||te===void 0||te.removeEventListener("touchstart",G),k(),clearInterval(R.current)}},[mt])}function Y(mt){return Math.floor(Math.pow(mt,.5))}function y(mt,ke){var xe="touches"in mt?mt.touches[0]:mt;return xe[ke?"pageX":"pageY"]-window[ke?"scrollX":"scrollY"]}function _(mt,ke,xe){p.useEffect(function(){var W=ke.current;if(mt&&W){var Re=!1,$e,J,R=function(){D.Z.cancel($e)},k=function te(){R(),$e=(0,D.Z)(function(){xe(J),te()})},se=function(Ce){if(!(Ce.target.draggable||Ce.button!==0)){var we=Ce;we._virtualHandled||(we._virtualHandled=!0,Re=!0)}},$=function(){Re=!1,R()},G=function(Ce){if(Re){var we=y(Ce,!1),Se=W.getBoundingClientRect(),Ie=Se.top,Ne=Se.bottom;if(we<=Ie){var qe=Ie-we;J=-Y(qe),k()}else if(we>=Ne){var et=we-Ne;J=Y(et),k()}else R()}};return W.addEventListener("mousedown",se),W.ownerDocument.addEventListener("mouseup",$),W.ownerDocument.addEventListener("mousemove",G),function(){W.removeEventListener("mousedown",se),W.ownerDocument.removeEventListener("mouseup",$),W.ownerDocument.removeEventListener("mousemove",G),R()}}},[mt])}var V=10;function de(mt,ke,xe,W,Re,$e,J,R){var k=p.useRef(),se=p.useState(null),$=(0,Q.Z)(se,2),G=$[0],te=$[1];return(0,T.Z)(function(){if(G&&G.times<V){if(!mt.current){te(function(fe){return(0,ve.Z)({},fe)});return}$e();var Ce=G.targetAlign,we=G.originAlign,Se=G.index,Ie=G.offset,Ne=mt.current.clientHeight,qe=!1,et=Ce,ft=null;if(Ne){for(var Kt=Ce||we,Ct=0,vt=0,en=0,on=Math.min(ke.length-1,Se),Vt=0;Vt<=on;Vt+=1){var gn=Re(ke[Vt]);vt=Ct;var Pn=xe.get(gn);en=vt+(Pn===void 0?W:Pn),Ct=en}for(var Gt=Kt==="top"?Ie:Ne-Ie,mn=on;mn>=0;mn-=1){var Ye=Re(ke[mn]),Ge=xe.get(Ye);if(Ge===void 0){qe=!0;break}if(Gt-=Ge,Gt<=0)break}switch(Kt){case"top":ft=vt-Ie;break;case"bottom":ft=en-Ne+Ie;break;default:{var He=mt.current.scrollTop,ne=He+Ne;vt<He?et="top":en>ne&&(et="bottom")}}ft!==null&&J(ft),ft!==G.lastTop&&(qe=!0)}qe&&te((0,ve.Z)((0,ve.Z)({},G),{},{times:G.times+1,targetAlign:et,lastTop:ft}))}},[G,mt.current]),function(Ce){if(Ce==null){R();return}if(D.Z.cancel(k.current),typeof Ce=="number")J(Ce);else if(Ce&&(0,ae.Z)(Ce)==="object"){var we,Se=Ce.align;"index"in Ce?we=Ce.index:we=ke.findIndex(function(qe){return Re(qe)===Ce.key});var Ie=Ce.offset,Ne=Ie===void 0?0:Ie;te({times:0,index:we,offset:Ne,originAlign:Se})}}}var We=p.forwardRef(function(mt,ke){var xe=mt.prefixCls,W=mt.rtl,Re=mt.scrollOffset,$e=mt.scrollRange,J=mt.onStartMove,R=mt.onStopMove,k=mt.onScroll,se=mt.horizontal,$=mt.spinSize,G=mt.containerSize,te=mt.style,Ce=mt.thumbStyle,we=mt.showScrollBar,Se=p.useState(!1),Ie=(0,Q.Z)(Se,2),Ne=Ie[0],qe=Ie[1],et=p.useState(null),ft=(0,Q.Z)(et,2),Kt=ft[0],Ct=ft[1],vt=p.useState(null),en=(0,Q.Z)(vt,2),on=en[0],Vt=en[1],gn=!W,Pn=p.useRef(),Gt=p.useRef(),mn=p.useState(we),Ye=(0,Q.Z)(mn,2),Ge=Ye[0],He=Ye[1],ne=p.useRef(),fe=function(){we===!0||we===!1||(clearTimeout(ne.current),He(!0),ne.current=setTimeout(function(){He(!1)},3e3))},ye=$e-G||0,Ee=G-$||0,Te=p.useMemo(function(){if(Re===0||ye===0)return 0;var or=Re/ye;return or*Ee},[Re,ye,Ee]),xt=function(pr){pr.stopPropagation(),pr.preventDefault()},Wt=p.useRef({top:Te,dragging:Ne,pageY:Kt,startTop:on});Wt.current={top:Te,dragging:Ne,pageY:Kt,startTop:on};var nn=function(pr){qe(!0),Ct(y(pr,se)),Vt(Wt.current.top),J(),pr.stopPropagation(),pr.preventDefault()};p.useEffect(function(){var or=function(Jn){Jn.preventDefault()},pr=Pn.current,rr=Gt.current;return pr.addEventListener("touchstart",or,{passive:!1}),rr.addEventListener("touchstart",nn,{passive:!1}),function(){pr.removeEventListener("touchstart",or),rr.removeEventListener("touchstart",nn)}},[]);var Cn=p.useRef();Cn.current=ye;var Wn=p.useRef();Wn.current=Ee,p.useEffect(function(){if(Ne){var or,pr=function(Jn){var kn=Wt.current,qn=kn.dragging,vr=kn.pageY,br=kn.startTop;D.Z.cancel(or);var je=Pn.current.getBoundingClientRect(),Ve=G/(se?je.width:je.height);if(qn){var Yt=(y(Jn,se)-vr)*Ve,Pt=br;!gn&&se?Pt-=Yt:Pt+=Yt;var An=Cn.current,un=Wn.current,yt=un?Pt/un:0,pt=Math.ceil(yt*An);pt=Math.max(pt,0),pt=Math.min(pt,An),or=(0,D.Z)(function(){k(pt,se)})}},rr=function(){qe(!1),R()};return window.addEventListener("mousemove",pr,{passive:!0}),window.addEventListener("touchmove",pr,{passive:!0}),window.addEventListener("mouseup",rr,{passive:!0}),window.addEventListener("touchend",rr,{passive:!0}),function(){window.removeEventListener("mousemove",pr),window.removeEventListener("touchmove",pr),window.removeEventListener("mouseup",rr),window.removeEventListener("touchend",rr),D.Z.cancel(or)}}},[Ne]),p.useEffect(function(){return fe(),function(){clearTimeout(ne.current)}},[Re]),p.useImperativeHandle(ke,function(){return{delayHidden:fe}});var zn="".concat(xe,"-scrollbar"),vn={position:"absolute",visibility:Ge?null:"hidden"},Dn={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return se?(vn.height=8,vn.left=0,vn.right=0,vn.bottom=0,Dn.height="100%",Dn.width=$,gn?Dn.left=Te:Dn.right=Te):(vn.width=8,vn.top=0,vn.bottom=0,gn?vn.right=0:vn.left=0,Dn.width="100%",Dn.height=$,Dn.top=Te),p.createElement("div",{ref:Pn,className:ie()(zn,(0,le.Z)((0,le.Z)((0,le.Z)({},"".concat(zn,"-horizontal"),se),"".concat(zn,"-vertical"),!se),"".concat(zn,"-visible"),Ge)),style:(0,ve.Z)((0,ve.Z)({},vn),te),onMouseDown:xt,onMouseMove:fe},p.createElement("div",{ref:Gt,className:ie()("".concat(zn,"-thumb"),(0,le.Z)({},"".concat(zn,"-thumb-moving"),Ne)),style:(0,ve.Z)((0,ve.Z)({},Dn),Ce),onMouseDown:nn}))}),Qe=We,ct=20;function Et(){var mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,xe=mt/ke*mt;return isNaN(xe)&&(xe=0),xe=Math.max(xe,ct),Math.floor(xe)}var Mt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ot=[],Fe={overflowY:"auto",overflowAnchor:"none"};function kt(mt,ke){var xe=mt.prefixCls,W=xe===void 0?"rc-virtual-list":xe,Re=mt.className,$e=mt.height,J=mt.itemHeight,R=mt.fullHeight,k=R===void 0?!0:R,se=mt.style,$=mt.data,G=mt.children,te=mt.itemKey,Ce=mt.virtual,we=mt.direction,Se=mt.scrollWidth,Ie=mt.component,Ne=Ie===void 0?"div":Ie,qe=mt.onScroll,et=mt.onVirtualScroll,ft=mt.onVisibleChange,Kt=mt.innerProps,Ct=mt.extraRender,vt=mt.styles,en=mt.showScrollBar,on=en===void 0?"optional":en,Vt=(0,h.Z)(mt,Mt),gn=p.useCallback(function(Ke){return typeof te=="function"?te(Ke):Ke==null?void 0:Ke[te]},[te]),Pn=ee(gn,null,null),Gt=(0,Q.Z)(Pn,4),mn=Gt[0],Ye=Gt[1],Ge=Gt[2],He=Gt[3],ne=!!(Ce!==!1&&$e&&J),fe=p.useMemo(function(){return Object.values(Ge.maps).reduce(function(Ke,tt){return Ke+tt},0)},[Ge.id,Ge.maps]),ye=ne&&$&&(Math.max(J*$.length,fe)>$e||!!Se),Ee=we==="rtl",Te=ie()(W,(0,le.Z)({},"".concat(W,"-rtl"),Ee),Re),xt=$||Ot,Wt=(0,p.useRef)(),nn=(0,p.useRef)(),Cn=(0,p.useRef)(),Wn=(0,p.useState)(0),zn=(0,Q.Z)(Wn,2),vn=zn[0],Dn=zn[1],or=(0,p.useState)(0),pr=(0,Q.Z)(or,2),rr=pr[0],cr=pr[1],Jn=(0,p.useState)(!1),kn=(0,Q.Z)(Jn,2),qn=kn[0],vr=kn[1],br=function(){vr(!0)},je=function(){vr(!1)},Ve={getKey:gn};function Yt(Ke){Dn(function(tt){var at;typeof Ke=="function"?at=Ke(tt):at=Ke;var it=nt(at);return Wt.current.scrollTop=it,it})}var Pt=(0,p.useRef)({start:0,end:xt.length}),An=(0,p.useRef)(),un=L(xt,gn),yt=(0,Q.Z)(un,1),pt=yt[0];An.current=pt;var Lt=p.useMemo(function(){if(!ne)return{scrollHeight:void 0,start:0,end:xt.length-1,offset:void 0};if(!ye){var Ke;return{scrollHeight:((Ke=nn.current)===null||Ke===void 0?void 0:Ke.offsetHeight)||0,start:0,end:xt.length-1,offset:void 0}}for(var tt=0,at,it,At,Ht=xt.length,qt=0;qt<Ht;qt+=1){var an=xt[qt],Sn=gn(an),Rn=Ge.get(Sn),yn=tt+(Rn===void 0?J:Rn);yn>=vn&&at===void 0&&(at=qt,it=tt),yn>vn+$e&&At===void 0&&(At=qt),tt=yn}return at===void 0&&(at=0,it=0,At=Math.ceil($e/J)),At===void 0&&(At=xt.length-1),At=Math.min(At+1,xt.length-1),{scrollHeight:tt,start:at,end:At,offset:it}},[ye,ne,vn,xt,He,$e]),rn=Lt.scrollHeight,dn=Lt.start,xn=Lt.end,dt=Lt.offset;Pt.current.start=dn,Pt.current.end=xn,p.useLayoutEffect(function(){var Ke=Ge.getRecord();if(Ke.size===1){var tt=Array.from(Ke.keys())[0],at=Ke.get(tt),it=xt[dn];if(it&&at===void 0){var At=gn(it);if(At===tt){var Ht=Ge.get(tt),qt=Ht-J;Yt(function(an){return an+qt})}}}Ge.resetRecord()},[rn]);var $t=p.useState({width:0,height:$e}),Le=(0,Q.Z)($t,2),Xe=Le[0],gt=Le[1],_t=function(tt){gt({width:tt.offsetWidth,height:tt.offsetHeight})},Qt=(0,p.useRef)(),Xt=(0,p.useRef)(),Rt=p.useMemo(function(){return Et(Xe.width,Se)},[Xe.width,Se]),Jt=p.useMemo(function(){return Et(Xe.height,rn)},[Xe.height,rn]),fn=rn-$e,bn=(0,p.useRef)(fn);bn.current=fn;function nt(Ke){var tt=Ke;return Number.isNaN(bn.current)||(tt=Math.min(tt,bn.current)),tt=Math.max(tt,0),tt}var cn=vn<=0,_n=vn>=fn,U=rr<=0,M=rr>=Se,he=ce(cn,_n,U,M),Be=function(){return{x:Ee?-rr:rr,y:vn}},Ze=(0,p.useRef)(Be()),ze=(0,B.zX)(function(Ke){if(et){var tt=(0,ve.Z)((0,ve.Z)({},Be()),Ke);(Ze.current.x!==tt.x||Ze.current.y!==tt.y)&&(et(tt),Ze.current=tt)}});function ht(Ke,tt){var at=Ke;tt?((0,v.flushSync)(function(){cr(at)}),ze()):Yt(at)}function wt(Ke){var tt=Ke.currentTarget.scrollTop;tt!==vn&&Yt(tt),qe==null||qe(Ke),ze()}var zt=function(tt){var at=tt,it=Se?Se-Xe.width:0;return at=Math.max(at,0),at=Math.min(at,it),at},St=(0,B.zX)(function(Ke,tt){tt?((0,v.flushSync)(function(){cr(function(at){var it=at+(Ee?-Ke:Ke);return zt(it)})}),ze()):Yt(function(at){var it=at+Ke;return it})}),Tt=X(ne,cn,_n,U,M,!!Se,St),tn=(0,Q.Z)(Tt,2),ue=tn[0],Oe=tn[1];Ae(ne,Wt,function(Ke,tt,at,it){var At=it;return he(Ke,tt,at)?!1:!At||!At._virtualHandled?(At&&(At._virtualHandled=!0),ue({preventDefault:function(){},deltaX:Ke?tt:0,deltaY:Ke?0:tt}),!0):!1}),_(ye,Wt,function(Ke){Yt(function(tt){return tt+Ke})}),(0,T.Z)(function(){function Ke(at){var it=cn&&at.detail<0,At=_n&&at.detail>0;ne&&!it&&!At&&at.preventDefault()}var tt=Wt.current;return tt.addEventListener("wheel",ue,{passive:!1}),tt.addEventListener("DOMMouseScroll",Oe,{passive:!0}),tt.addEventListener("MozMousePixelScroll",Ke,{passive:!1}),function(){tt.removeEventListener("wheel",ue),tt.removeEventListener("DOMMouseScroll",Oe),tt.removeEventListener("MozMousePixelScroll",Ke)}},[ne,cn,_n]),(0,T.Z)(function(){if(Se){var Ke=zt(rr);cr(Ke),ze({x:Ke})}},[Xe.width,Se]);var Pe=function(){var tt,at;(tt=Qt.current)===null||tt===void 0||tt.delayHidden(),(at=Xt.current)===null||at===void 0||at.delayHidden()},Me=de(Wt,xt,Ge,J,gn,function(){return Ye(!0)},Yt,Pe);p.useImperativeHandle(ke,function(){return{nativeElement:Cn.current,getScrollInfo:Be,scrollTo:function(tt){function at(it){return it&&(0,ae.Z)(it)==="object"&&("left"in it||"top"in it)}at(tt)?(tt.left!==void 0&&cr(zt(tt.left)),Me(tt.top)):Me(tt)}}}),(0,T.Z)(function(){if(ft){var Ke=xt.slice(dn,xn+1);ft(Ke,xt)}},[dn,xn,xt]);var Je=q(xt,gn,Ge,J),ut=Ct==null?void 0:Ct({start:dn,end:xn,virtual:ye,offsetX:rr,offsetY:dt,rtl:Ee,getSize:Je}),It=O(xt,dn,xn,Se,rr,mn,G,Ve),Bt=null;$e&&(Bt=(0,ve.Z)((0,le.Z)({},k?"height":"maxHeight",$e),Fe),ne&&(Bt.overflowY="hidden",Se&&(Bt.overflowX="hidden"),qn&&(Bt.pointerEvents="none")));var lt={};return Ee&&(lt.dir="rtl"),p.createElement("div",(0,N.Z)({ref:Cn,style:(0,ve.Z)((0,ve.Z)({},se),{},{position:"relative"}),className:Te},lt,Vt),p.createElement(A.Z,{onResize:_t},p.createElement(Ne,{className:"".concat(W,"-holder"),style:Bt,ref:Wt,onScroll:wt,onMouseEnter:Pe},p.createElement(S,{prefixCls:W,height:rn,offsetX:rr,offsetY:dt,scrollWidth:Se,onInnerResize:Ye,ref:nn,innerProps:Kt,rtl:Ee,extra:ut},It))),ye&&rn>$e&&p.createElement(Qe,{ref:Qt,prefixCls:W,scrollOffset:vn,scrollRange:rn,rtl:Ee,onScroll:ht,onStartMove:br,onStopMove:je,spinSize:Jt,containerSize:Xe.height,style:vt==null?void 0:vt.verticalScrollBar,thumbStyle:vt==null?void 0:vt.verticalScrollBarThumb,showScrollBar:on}),ye&&Se>Xe.width&&p.createElement(Qe,{ref:Xt,prefixCls:W,scrollOffset:rr,scrollRange:Se,rtl:Ee,onScroll:ht,onStartMove:br,onStopMove:je,spinSize:Rt,containerSize:Xe.width,horizontal:!0,style:vt==null?void 0:vt.horizontalScrollBar,thumbStyle:vt==null?void 0:vt.horizontalScrollBarThumb,showScrollBar:on}))}var sn=p.forwardRef(kt);sn.displayName="List";var jt=sn,pn=jt},83145:function(Fn,st,C){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.CopyToClipboard=void 0;var N=ve(C(59301)),ae=ve(C(25769));function ve(b){return b&&b.__esModule?b:{default:b}}function le(b){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?le=function(D){return typeof D}:le=function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},le(b)}function Q(b,L){var D=Object.keys(b);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(b);L&&(I=I.filter(function(re){return Object.getOwnPropertyDescriptor(b,re).enumerable})),D.push.apply(D,I)}return D}function h(b){for(var L=1;L<arguments.length;L++){var D=arguments[L]!=null?arguments[L]:{};L%2?Q(D,!0).forEach(function(I){O(b,I,D[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(D)):Q(D).forEach(function(I){Object.defineProperty(b,I,Object.getOwnPropertyDescriptor(D,I))})}return b}function ge(b,L){if(b==null)return{};var D=ie(b,L),I,re;if(Object.getOwnPropertySymbols){var ce=Object.getOwnPropertySymbols(b);for(re=0;re<ce.length;re++)I=ce[re],!(L.indexOf(I)>=0)&&Object.prototype.propertyIsEnumerable.call(b,I)&&(D[I]=b[I])}return D}function ie(b,L){if(b==null)return{};var D={},I=Object.keys(b),re,ce;for(ce=0;ce<I.length;ce++)re=I[ce],!(L.indexOf(re)>=0)&&(D[re]=b[re]);return D}function A(b,L){if(!(b instanceof L))throw new TypeError("Cannot call a class as a function")}function B(b,L){for(var D=0;D<L.length;D++){var I=L[D];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(b,I.key,I)}}function T(b,L,D){return L&&B(b.prototype,L),D&&B(b,D),b}function p(b,L){return L&&(le(L)==="object"||typeof L=="function")?L:E(b)}function v(b){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(D){return D.__proto__||Object.getPrototypeOf(D)},v(b)}function E(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function S(b,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(L&&L.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),L&&F(b,L)}function F(b,L){return F=Object.setPrototypeOf||function(I,re){return I.__proto__=re,I},F(b,L)}function O(b,L,D){return L in b?Object.defineProperty(b,L,{value:D,enumerable:!0,configurable:!0,writable:!0}):b[L]=D,b}var Z=function(b){S(L,b);function L(){var D,I;A(this,L);for(var re=arguments.length,ce=new Array(re),X=0;X<re;X++)ce[X]=arguments[X];return I=p(this,(D=v(L)).call.apply(D,[this].concat(ce))),O(E(I),"onClick",function(q){var oe=I.props,pe=oe.text,_e=oe.onCopy,j=oe.children,K=oe.options,ee=N.default.Children.only(j),z=(0,ae.default)(pe,K);_e&&_e(pe,z),ee&&ee.props&&typeof ee.props.onClick=="function"&&ee.props.onClick(q)}),I}return T(L,[{key:"render",value:function(){var I=this.props,re=I.text,ce=I.onCopy,X=I.options,q=I.children,oe=ge(I,["text","onCopy","options","children"]),pe=N.default.Children.only(q);return N.default.cloneElement(pe,h({},oe,{onClick:this.onClick}))}}]),L}(N.default.PureComponent);st.CopyToClipboard=Z,O(Z,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Fn,st,C){"use strict";var N=C(83145),ae=N.CopyToClipboard;ae.CopyToClipboard=ae,Fn.exports=ae},76374:function(Fn,st,C){"use strict";var N=function(){if(typeof Map!="undefined")return Map;function j(K,ee){var z=-1;return K.some(function(Ae,Y){return Ae[0]===ee?(z=Y,!0):!1}),z}return function(){function K(){this.__entries__=[]}return Object.defineProperty(K.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),K.prototype.get=function(ee){var z=j(this.__entries__,ee),Ae=this.__entries__[z];return Ae&&Ae[1]},K.prototype.set=function(ee,z){var Ae=j(this.__entries__,ee);~Ae?this.__entries__[Ae][1]=z:this.__entries__.push([ee,z])},K.prototype.delete=function(ee){var z=this.__entries__,Ae=j(z,ee);~Ae&&z.splice(Ae,1)},K.prototype.has=function(ee){return!!~j(this.__entries__,ee)},K.prototype.clear=function(){this.__entries__.splice(0)},K.prototype.forEach=function(ee,z){z===void 0&&(z=null);for(var Ae=0,Y=this.__entries__;Ae<Y.length;Ae++){var y=Y[Ae];ee.call(z,y[1],y[0])}},K}()}(),ae=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,ve=function(){return typeof C.g!="undefined"&&C.g.Math===Math?C.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),le=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(ve):function(j){return setTimeout(function(){return j(Date.now())},1e3/60)}}(),Q=2;function h(j,K){var ee=!1,z=!1,Ae=0;function Y(){ee&&(ee=!1,j()),z&&_()}function y(){le(Y)}function _(){var V=Date.now();if(ee){if(V-Ae<Q)return;z=!0}else ee=!0,z=!1,setTimeout(y,K);Ae=V}return _}var ge=20,ie=["top","right","bottom","left","width","height","size","weight"],A=typeof MutationObserver!="undefined",B=function(){function j(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=h(this.refresh.bind(this),ge)}return j.prototype.addObserver=function(K){~this.observers_.indexOf(K)||this.observers_.push(K),this.connected_||this.connect_()},j.prototype.removeObserver=function(K){var ee=this.observers_,z=ee.indexOf(K);~z&&ee.splice(z,1),!ee.length&&this.connected_&&this.disconnect_()},j.prototype.refresh=function(){var K=this.updateObservers_();K&&this.refresh()},j.prototype.updateObservers_=function(){var K=this.observers_.filter(function(ee){return ee.gatherActive(),ee.hasActive()});return K.forEach(function(ee){return ee.broadcastActive()}),K.length>0},j.prototype.connect_=function(){!ae||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),A?(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)},j.prototype.disconnect_=function(){!ae||!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)},j.prototype.onTransitionEnd_=function(K){var ee=K.propertyName,z=ee===void 0?"":ee,Ae=ie.some(function(Y){return!!~z.indexOf(Y)});Ae&&this.refresh()},j.getInstance=function(){return this.instance_||(this.instance_=new j),this.instance_},j.instance_=null,j}(),T=function(j,K){for(var ee=0,z=Object.keys(K);ee<z.length;ee++){var Ae=z[ee];Object.defineProperty(j,Ae,{value:K[Ae],enumerable:!1,writable:!1,configurable:!0})}return j},p=function(j){var K=j&&j.ownerDocument&&j.ownerDocument.defaultView;return K||ve},v=re(0,0,0,0);function E(j){return parseFloat(j)||0}function S(j){for(var K=[],ee=1;ee<arguments.length;ee++)K[ee-1]=arguments[ee];return K.reduce(function(z,Ae){var Y=j["border-"+Ae+"-width"];return z+E(Y)},0)}function F(j){for(var K=["top","right","bottom","left"],ee={},z=0,Ae=K;z<Ae.length;z++){var Y=Ae[z],y=j["padding-"+Y];ee[Y]=E(y)}return ee}function O(j){var K=j.getBBox();return re(0,0,K.width,K.height)}function Z(j){var K=j.clientWidth,ee=j.clientHeight;if(!K&&!ee)return v;var z=p(j).getComputedStyle(j),Ae=F(z),Y=Ae.left+Ae.right,y=Ae.top+Ae.bottom,_=E(z.width),V=E(z.height);if(z.boxSizing==="border-box"&&(Math.round(_+Y)!==K&&(_-=S(z,"left","right")+Y),Math.round(V+y)!==ee&&(V-=S(z,"top","bottom")+y)),!L(j)){var de=Math.round(_+Y)-K,We=Math.round(V+y)-ee;Math.abs(de)!==1&&(_-=de),Math.abs(We)!==1&&(V-=We)}return re(Ae.left,Ae.top,_,V)}var b=function(){return typeof SVGGraphicsElement!="undefined"?function(j){return j instanceof p(j).SVGGraphicsElement}:function(j){return j instanceof p(j).SVGElement&&typeof j.getBBox=="function"}}();function L(j){return j===p(j).document.documentElement}function D(j){return ae?b(j)?O(j):Z(j):v}function I(j){var K=j.x,ee=j.y,z=j.width,Ae=j.height,Y=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,y=Object.create(Y.prototype);return T(y,{x:K,y:ee,width:z,height:Ae,top:ee,right:K+z,bottom:Ae+ee,left:K}),y}function re(j,K,ee,z){return{x:j,y:K,width:ee,height:z}}var ce=function(){function j(K){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=re(0,0,0,0),this.target=K}return j.prototype.isActive=function(){var K=D(this.target);return this.contentRect_=K,K.width!==this.broadcastWidth||K.height!==this.broadcastHeight},j.prototype.broadcastRect=function(){var K=this.contentRect_;return this.broadcastWidth=K.width,this.broadcastHeight=K.height,K},j}(),X=function(){function j(K,ee){var z=I(ee);T(this,{target:K,contentRect:z})}return j}(),q=function(){function j(K,ee,z){if(this.activeObservations_=[],this.observations_=new N,typeof K!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=K,this.controller_=ee,this.callbackCtx_=z}return j.prototype.observe=function(K){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(K instanceof p(K).Element))throw new TypeError('parameter 1 is not of type "Element".');var ee=this.observations_;ee.has(K)||(ee.set(K,new ce(K)),this.controller_.addObserver(this),this.controller_.refresh())}},j.prototype.unobserve=function(K){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(K instanceof p(K).Element))throw new TypeError('parameter 1 is not of type "Element".');var ee=this.observations_;ee.has(K)&&(ee.delete(K),ee.size||this.controller_.removeObserver(this))}},j.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},j.prototype.gatherActive=function(){var K=this;this.clearActive(),this.observations_.forEach(function(ee){ee.isActive()&&K.activeObservations_.push(ee)})},j.prototype.broadcastActive=function(){if(this.hasActive()){var K=this.callbackCtx_,ee=this.activeObservations_.map(function(z){return new X(z.target,z.broadcastRect())});this.callback_.call(K,ee,K),this.clearActive()}},j.prototype.clearActive=function(){this.activeObservations_.splice(0)},j.prototype.hasActive=function(){return this.activeObservations_.length>0},j}(),oe=typeof WeakMap!="undefined"?new WeakMap:new N,pe=function(){function j(K){if(!(this instanceof j))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var ee=B.getInstance(),z=new q(K,ee,this);oe.set(this,z)}return j}();["observe","unobserve","disconnect"].forEach(function(j){pe.prototype[j]=function(){var K;return(K=oe.get(this))[j].apply(K,arguments)}});var _e=function(){return typeof ve.ResizeObserver!="undefined"?ve.ResizeObserver:pe}();st.Z=_e},27774:function(Fn,st){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.SizeSensorId=st.SensorTabIndex=st.SensorClassName=void 0;var C="size-sensor-id";st.SizeSensorId=C;var N="size-sensor-object";st.SensorClassName=N;var ae="-1";st.SensorTabIndex=ae},79301:function(Fn,st){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.default=void 0;var C=function(ae){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,le=null;return function(){for(var Q=this,h=arguments.length,ge=new Array(h),ie=0;ie<h;ie++)ge[ie]=arguments[ie];clearTimeout(le),le=setTimeout(function(){ae.apply(Q,ge)},ve)}};st.default=C},79789:function(Fn,st){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.default=void 0;var C=1,N=function(){return"".concat(C++)};st.default=N},47242:function(Fn,st,C){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.ver=st.clear=st.bind=void 0;var N=C(95270),ae=function(h,ge){var ie=(0,N.getSensor)(h);return ie.bind(ge),function(){ie.unbind(ge)}};st.bind=ae;var ve=function(h){var ge=(0,N.getSensor)(h);(0,N.removeSensor)(ge)};st.clear=ve;var le="1.0.2";st.ver=le},95270:function(Fn,st,C){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.removeSensor=st.getSensor=st.Sensors=void 0;var N=le(C(79789)),ae=C(57829),ve=C(27774);function le(A){return A&&A.__esModule?A:{default:A}}var Q={};st.Sensors=Q;function h(A){A&&Q[A]&&delete Q[A]}var ge=function(B){var T=B.getAttribute(ve.SizeSensorId);if(T&&Q[T])return Q[T];var p=(0,N.default)();B.setAttribute(ve.SizeSensorId,p);var v=(0,ae.createSensor)(B,function(){return h(p)});return Q[p]=v,v};st.getSensor=ge;var ie=function(B){var T=B.element.getAttribute(ve.SizeSensorId);B.destroy(),h(T)};st.removeSensor=ie},57829:function(Fn,st,C){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.createSensor=void 0;var N=C(20953),ae=C(55202),ve=typeof ResizeObserver!="undefined"?ae.createSensor:N.createSensor;st.createSensor=ve},20953:function(Fn,st,C){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.createSensor=void 0;var N=ve(C(79301)),ae=C(27774);function ve(Q){return Q&&Q.__esModule?Q:{default:Q}}var le=function(h,ge){var ie=void 0,A=[],B=function(){getComputedStyle(h).position==="static"&&(h.style.position="relative");var F=document.createElement("object");return F.onload=function(){F.contentDocument.defaultView.addEventListener("resize",T),T()},F.style.display="block",F.style.position="absolute",F.style.top="0",F.style.left="0",F.style.height="100%",F.style.width="100%",F.style.overflow="hidden",F.style.pointerEvents="none",F.style.zIndex="-1",F.style.opacity="0",F.setAttribute("class",ae.SensorClassName),F.setAttribute("tabindex",ae.SensorTabIndex),F.type="text/html",h.appendChild(F),F.data="about:blank",F},T=(0,N.default)(function(){A.forEach(function(S){S(h)})}),p=function(F){ie||(ie=B()),A.indexOf(F)===-1&&A.push(F)},v=function(){ie&&ie.parentNode&&(ie.contentDocument&&ie.contentDocument.defaultView.removeEventListener("resize",T),ie.parentNode.removeChild(ie),h.removeAttribute(ae.SizeSensorId),ie=void 0,A=[],ge&&ge())},E=function(F){var O=A.indexOf(F);O!==-1&&A.splice(O,1),A.length===0&&ie&&v()};return{element:h,bind:p,destroy:v,unbind:E}};st.createSensor=le},55202:function(Fn,st,C){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.createSensor=void 0;var N=C(27774),ae=ve(C(79301));function ve(Q){return Q&&Q.__esModule?Q:{default:Q}}var le=function(h,ge){var ie=void 0,A=[],B=(0,ae.default)(function(){A.forEach(function(S){S(h)})}),T=function(){var F=new ResizeObserver(B);return F.observe(h),B(),F},p=function(F){ie||(ie=T()),A.indexOf(F)===-1&&A.push(F)},v=function(){ie.disconnect(),A=[],ie=void 0,h.removeAttribute(N.SizeSensorId),ge&&ge()},E=function(F){var O=A.indexOf(F);O!==-1&&A.splice(O,1),A.length===0&&ie&&v()};return{element:h,bind:p,destroy:v,unbind:E}};st.createSensor=le},98040:function(Fn){Fn.exports=function(){var st=document.getSelection();if(!st.rangeCount)return function(){};for(var C=document.activeElement,N=[],ae=0;ae<st.rangeCount;ae++)N.push(st.getRangeAt(ae));switch(C.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":C.blur();break;default:C=null;break}return st.removeAllRanges(),function(){st.type==="Caret"&&st.removeAllRanges(),st.rangeCount||N.forEach(function(ve){st.addRange(ve)}),C&&C.focus()}}},93314:function(Fn){"use strict";Fn.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=="},15360:function(Fn,st,C){"use strict";C.d(st,{ZP:function(){return c}});const N=Number.isFinite||function(i){return typeof i=="number"&&isFinite(i)},ae=Number.isSafeInteger||function(i){return typeof i=="number"&&Math.abs(i)<=ve},ve=Number.MAX_SAFE_INTEGER||9007199254740991;let le=function(i){return i.NETWORK_ERROR="networkError",i.MEDIA_ERROR="mediaError",i.KEY_SYSTEM_ERROR="keySystemError",i.MUX_ERROR="muxError",i.OTHER_ERROR="otherError",i}({}),Q=function(i){return i.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",i.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",i.KEY_SYSTEM_NO_SESSION="keySystemNoSession",i.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",i.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",i.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",i.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",i.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",i.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",i.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",i.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",i.MANIFEST_LOAD_ERROR="manifestLoadError",i.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",i.MANIFEST_PARSING_ERROR="manifestParsingError",i.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",i.LEVEL_EMPTY_ERROR="levelEmptyError",i.LEVEL_LOAD_ERROR="levelLoadError",i.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",i.LEVEL_PARSING_ERROR="levelParsingError",i.LEVEL_SWITCH_ERROR="levelSwitchError",i.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",i.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",i.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",i.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",i.FRAG_LOAD_ERROR="fragLoadError",i.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",i.FRAG_DECRYPT_ERROR="fragDecryptError",i.FRAG_PARSING_ERROR="fragParsingError",i.FRAG_GAP="fragGap",i.REMUX_ALLOC_ERROR="remuxAllocError",i.KEY_LOAD_ERROR="keyLoadError",i.KEY_LOAD_TIMEOUT="keyLoadTimeOut",i.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",i.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",i.BUFFER_APPEND_ERROR="bufferAppendError",i.BUFFER_APPENDING_ERROR="bufferAppendingError",i.BUFFER_STALLED_ERROR="bufferStalledError",i.BUFFER_FULL_ERROR="bufferFullError",i.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",i.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",i.ASSET_LIST_LOAD_ERROR="assetListLoadError",i.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",i.ASSET_LIST_PARSING_ERROR="assetListParsingError",i.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",i.INTERNAL_EXCEPTION="internalException",i.INTERNAL_ABORTED="aborted",i.ATTACH_MEDIA_ERROR="attachMediaError",i.UNKNOWN="unknown",i}({}),h=function(i){return i.MEDIA_ATTACHING="hlsMediaAttaching",i.MEDIA_ATTACHED="hlsMediaAttached",i.MEDIA_DETACHING="hlsMediaDetaching",i.MEDIA_DETACHED="hlsMediaDetached",i.MEDIA_ENDED="hlsMediaEnded",i.STALL_RESOLVED="hlsStallResolved",i.BUFFER_RESET="hlsBufferReset",i.BUFFER_CODECS="hlsBufferCodecs",i.BUFFER_CREATED="hlsBufferCreated",i.BUFFER_APPENDING="hlsBufferAppending",i.BUFFER_APPENDED="hlsBufferAppended",i.BUFFER_EOS="hlsBufferEos",i.BUFFERED_TO_END="hlsBufferedToEnd",i.BUFFER_FLUSHING="hlsBufferFlushing",i.BUFFER_FLUSHED="hlsBufferFlushed",i.MANIFEST_LOADING="hlsManifestLoading",i.MANIFEST_LOADED="hlsManifestLoaded",i.MANIFEST_PARSED="hlsManifestParsed",i.LEVEL_SWITCHING="hlsLevelSwitching",i.LEVEL_SWITCHED="hlsLevelSwitched",i.LEVEL_LOADING="hlsLevelLoading",i.LEVEL_LOADED="hlsLevelLoaded",i.LEVEL_UPDATED="hlsLevelUpdated",i.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",i.LEVELS_UPDATED="hlsLevelsUpdated",i.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",i.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",i.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",i.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",i.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",i.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",i.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",i.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",i.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",i.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",i.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",i.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",i.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",i.CUES_PARSED="hlsCuesParsed",i.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",i.INIT_PTS_FOUND="hlsInitPtsFound",i.FRAG_LOADING="hlsFragLoading",i.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",i.FRAG_LOADED="hlsFragLoaded",i.FRAG_DECRYPTED="hlsFragDecrypted",i.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",i.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",i.FRAG_PARSING_METADATA="hlsFragParsingMetadata",i.FRAG_PARSED="hlsFragParsed",i.FRAG_BUFFERED="hlsFragBuffered",i.FRAG_CHANGED="hlsFragChanged",i.FPS_DROP="hlsFpsDrop",i.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",i.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",i.ERROR="hlsError",i.DESTROYING="hlsDestroying",i.KEY_LOADING="hlsKeyLoading",i.KEY_LOADED="hlsKeyLoaded",i.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",i.BACK_BUFFER_REACHED="hlsBackBufferReached",i.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",i.ASSET_LIST_LOADING="hlsAssetListLoading",i.ASSET_LIST_LOADED="hlsAssetListLoaded",i.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",i.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",i.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",i.INTERSTITIAL_STARTED="hlsInterstitialStarted",i.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",i.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",i.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",i.INTERSTITIAL_ENDED="hlsInterstitialEnded",i.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",i.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",i.EVENT_CUE_ENTER="hlsEventCueEnter",i}({});var ge={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ie={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class A{constructor(e,t=0,n=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class B{constructor(e,t,n,r=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new A(e),this.fast_=new A(t),this.defaultTTFB_=r,this.ttfb_=new A(e)}update(e,t){const{slow_:n,fast_:r,ttfb_:s}=this;n.halfLife!==e&&(this.slow_=new A(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new A(t,r.getEstimate(),r.getTotalWeight())),s.halfLife!==e&&(this.ttfb_=new A(e,s.getEstimate(),s.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const n=8*t,r=e/1e3,s=n/r;this.fast_.sample(r,s),this.slow_.sample(r,s)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function T(i,e,t){return(e=F(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function p(){return p=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},p.apply(null,arguments)}function v(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function E(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?v(Object(t),!0).forEach(function(n){T(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}function S(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var n=t.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function F(i){var e=S(i,"string");return typeof e=="symbol"?e:e+""}class O{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const n=`[${e}]:`;this.trace=Z,this.debug=t.debug.bind(null,n),this.log=t.log.bind(null,n),this.warn=t.warn.bind(null,n),this.info=t.info.bind(null,n),this.error=t.error.bind(null,n)}}const Z=function(){},b={trace:Z,debug:Z,log:Z,warn:Z,info:Z,error:Z};function L(){return p({},b)}function D(i,e){const t=self.console[i];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${i}] >`):Z}function I(i,e,t){return e[i]?e[i].bind(e):D(i,t)}const re=L();function ce(i,e,t){const n=L();if(typeof console=="object"&&i===!0||typeof i=="object"){const r=["debug","log","info","warn","error"];r.forEach(s=>{n[s]=I(s,i,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.5`)}catch(s){return L()}r.forEach(s=>{re[s]=I(s,i)})}else p(re,n);return n}const X=re;function q(i=!0){return typeof self=="undefined"?void 0:(i||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function oe(i){return typeof self!="undefined"&&i===self.ManagedMediaSource}function pe(i,e){const t=Object.keys(i),n=Object.keys(e),r=t.length,s=n.length;return!r||!s||r===s&&!t.some(a=>n.indexOf(a)===-1)}function _e(i,e=!1){if(typeof TextDecoder!="undefined"){const l=new TextDecoder("utf-8").decode(i);if(e){const d=l.indexOf("\0");return d!==-1?l.substring(0,d):l}return l.replace(/\0/g,"")}const t=i.length;let n,r,s,a="",o=0;for(;o<t;){if(n=i[o++],n===0&&e)return a;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:a+=String.fromCharCode(n);break;case 12:case 13:r=i[o++],a+=String.fromCharCode((n&31)<<6|r&63);break;case 14:r=i[o++],s=i[o++],a+=String.fromCharCode((n&15)<<12|(r&63)<<6|(s&63)<<0);break}}return a}const j={hexDump:function(i){let e="";for(let t=0;t<i.length;t++){let n=i[t].toString(16);n.length<2&&(n="0"+n),e+=n}return e}};function K(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ee={exports:{}},z;function Ae(){return z||(z=1,function(i,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,s=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(u,l,d){if(d=d||{},u=u.trim(),l=l.trim(),!l){if(!d.alwaysNormalize)return u;var g=o.parseURL(u);if(!g)throw new Error("Error trying to parse base URL.");return g.path=o.normalizePath(g.path),o.buildURLFromParts(g)}var m=o.parseURL(l);if(!m)throw new Error("Error trying to parse relative URL.");if(m.scheme)return d.alwaysNormalize?(m.path=o.normalizePath(m.path),o.buildURLFromParts(m)):l;var w=o.parseURL(u);if(!w)throw new Error("Error trying to parse base URL.");if(!w.netLoc&&w.path&&w.path[0]!=="/"){var x=r.exec(w.path);w.netLoc=x[1],w.path=x[2]}w.netLoc&&!w.path&&(w.path="/");var H={scheme:w.scheme,netLoc:m.netLoc,path:null,params:m.params,query:m.query,fragment:m.fragment};if(!m.netLoc&&(H.netLoc=w.netLoc,m.path[0]!=="/"))if(!m.path)H.path=w.path,m.params||(H.params=w.params,m.query||(H.query=w.query));else{var P=w.path,me=P.substring(0,P.lastIndexOf("/")+1)+m.path;H.path=o.normalizePath(me)}return H.path===null&&(H.path=d.alwaysNormalize?o.normalizePath(m.path):m.path),o.buildURLFromParts(H)},parseURL:function(u){var l=n.exec(u);return l?{scheme:l[1]||"",netLoc:l[2]||"",path:l[3]||"",params:l[4]||"",query:l[5]||"",fragment:l[6]||""}:null},normalizePath:function(u){for(u=u.split("").reverse().join("").replace(s,"");u.length!==(u=u.replace(a,"")).length;);return u.split("").reverse().join("")},buildURLFromParts:function(u){return u.scheme+u.netLoc+u.path+u.params+u.query+u.fragment}};i.exports=o})()}(ee)),ee.exports}var Y=Ae();class y{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 _={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class V{constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,typeof e=="string"&&(e={url:e}),this.base=e,Et(this,"stats")}setByteRange(e,t){const n=e.split("@",2);let r;n.length===1?r=(t==null?void 0:t.byteRangeEndOffset)||0:r=parseInt(n[1]),this._byteRange=[r,parseInt(n[0])+r]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[_.AUDIO]:null,[_.VIDEO]:null,[_.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new y),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Y.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[_.AUDIO]=null,e[_.VIDEO]=null,e[_.AUDIOVIDEO]=null}}function de(i){return i.sn!=="initSegment"}class We extends V{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange){const e=this.byteRange[0],t=this.byteRange[1];if(N(e)&&N(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){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 n=Object.keys(this.levelkeys);if(n.length===1)return this._decryptdata=this.levelkeys[n[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=N(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),n=t.length;if(n>1||n===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!N(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return de(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){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,n,r,s,a=!1){const{elementaryStreams:o}=this,u=o[e];if(!u){o[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:s,partial:a};return}u.startPTS=Math.min(u.startPTS,t),u.endPTS=Math.max(u.endPTS,n),u.startDTS=Math.min(u.startDTS,r),u.endDTS=Math.max(u.endDTS,s)}}class Qe extends V{constructor(e,t,n,r,s){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=r;const a=e.enumeratedString("BYTERANGE");a&&this.setByteRange(a,s),s&&(this.fragOffset=s.fragOffset+s.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function ct(i,e){const t=Object.getPrototypeOf(i);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||ct(t,e)}}function Et(i,e){const t=ct(i,e);t&&(t.enumerable=!0,Object.defineProperty(i,e,t))}const Mt=Math.pow(2,32)-1,Ot=[].push,Fe={video:1,audio:2,id3:3,text:4};function kt(i){return String.fromCharCode.apply(null,i)}function sn(i,e){const t=i[e]<<8|i[e+1];return t<0?65536+t:t}function jt(i,e){const t=mt(i,e);return t<0?4294967296+t:t}function pn(i,e){let t=jt(i,e);return t*=Math.pow(2,32),t+=jt(i,e+4),t}function mt(i,e){return i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3]}function ke(i,e,t){i[e]=t>>24,i[e+1]=t>>16&255,i[e+2]=t>>8&255,i[e+3]=t&255}function xe(i){const e=i.byteLength;for(let t=0;t<e;){const n=jt(i,t);if(n>8&&i[t+4]===109&&i[t+5]===111&&i[t+6]===111&&i[t+7]===102)return!0;t=n>1?t+n:e}return!1}function W(i,e){const t=[];if(!e.length)return t;const n=i.byteLength;for(let r=0;r<n;){const s=jt(i,r),a=kt(i.subarray(r+4,r+8)),o=s>1?r+s:n;if(a===e[0])if(e.length===1)t.push(i.subarray(r+8,o));else{const u=W(i.subarray(r+8,o),e.slice(1));u.length&&Ot.apply(t,u)}r=o}return t}function Re(i){const e=[],t=i[0];let n=8;const r=jt(i,n);n+=4;let s=0,a=0;t===0?(s=jt(i,n),a=jt(i,n+4),n+=8):(s=pn(i,n),a=pn(i,n+8),n+=16),n+=2;let o=i.length+a;const u=sn(i,n);n+=2;for(let l=0;l<u;l++){let d=n;const g=jt(i,d);d+=4;const m=g&2147483647;if((g&2147483648)>>>31===1)return X.warn("SIDX has hierarchical references (not supported)"),null;const x=jt(i,d);d+=4,e.push({referenceSize:m,subsegmentDuration:x,info:{duration:x/r,start:o,end:o+m-1}}),o+=m,d+=4,n=d}return{earliestPresentationTime:s,timescale:r,version:t,referencesCount:u,references:e}}function $e(i){const e=[],t=W(i,["moov","trak"]);for(let r=0;r<t.length;r++){const s=t[r],a=W(s,["tkhd"])[0];if(a){let o=a[0];const u=jt(a,o===0?12:20),l=W(s,["mdia","mdhd"])[0];if(l){o=l[0];const d=jt(l,o===0?12:20),g=W(s,["mdia","hdlr"])[0];if(g){const m=kt(g.subarray(8,12)),w={soun:_.AUDIO,vide:_.VIDEO}[m],x=W(s,["mdia","minf","stbl","stsd"])[0],H=J(x);w?(e[u]={timescale:d,type:w,stsd:H},e[w]=E({timescale:d,id:u},H)):e[u]={timescale:d,type:m,stsd:H}}}}}return W(i,["moov","mvex","trex"]).forEach(r=>{const s=jt(r,4),a=e[s];a&&(a.default={duration:jt(r,12),flags:jt(r,20)})}),e}function J(i){const e=i.subarray(8),t=e.subarray(86),n=kt(e.subarray(4,8));let r=n,s;const a=n==="enca"||n==="encv";if(a){const l=W(e,[n])[0].subarray(n==="enca"?28:78);W(l,["sinf"]).forEach(g=>{const m=W(g,["schm"])[0];if(m){const w=kt(m.subarray(4,8));if(w==="cbcs"||w==="cenc"){const x=W(g,["frma"])[0];x&&(r=kt(x))}}})}const o=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const u=W(t,["avcC"])[0];u&&u.length>3&&(r+="."+$(u[1])+$(u[2])+$(u[3]),s=R(o==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const u=W(e,[n])[0],l=W(u.subarray(28),["esds"])[0];if(l&&l.length>7){let d=4;if(l[d++]!==3)break;d=se(l,d),d+=2;const g=l[d++];if(g&128&&(d+=2),g&64&&(d+=l[d++]),l[d++]!==4)break;d=se(l,d);const m=l[d++];if(m===64)r+="."+$(m);else break;if(d+=12,l[d++]!==5)break;d=se(l,d);const w=l[d++];let x=(w&248)>>3;x===31&&(x+=1+((w&7)<<3)+((l[d]&224)>>5)),r+="."+x}break}case"hvc1":case"hev1":{const u=W(t,["hvcC"])[0];if(u&&u.length>12){const l=u[1],d=["","A","B","C"][l>>6],g=l&31,m=jt(u,2),w=(l&32)>>5?"H":"L",x=u[12],H=u.subarray(6,12);r+="."+d+g,r+="."+k(m).toString(16).toUpperCase(),r+="."+w+x;let P="";for(let me=H.length;me--;){const De=H[me];(De||P)&&(P="."+De.toString(16).toUpperCase()+P)}r+=P}s=R(o=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=R(r,t)||r;break}case"vp09":{const u=W(t,["vpcC"])[0];if(u&&u.length>6){const l=u[4],d=u[5],g=u[6]>>4&15;r+="."+G(l)+"."+G(d)+"."+G(g)}break}case"av01":{const u=W(t,["av1C"])[0];if(u&&u.length>2){const l=u[1]>>>5,d=u[1]&31,g=u[2]>>>7?"H":"M",m=(u[2]&64)>>6,w=(u[2]&32)>>5,x=l===2&&m?w?12:10:m?10:8,H=(u[2]&16)>>4,P=(u[2]&8)>>3,me=(u[2]&4)>>2,De=u[2]&3;r+="."+l+"."+G(d)+g+"."+G(x)+"."+H+"."+P+me+De+"."+G(1)+"."+G(1)+"."+G(1)+"."+0,s=R("dav1",t)}break}}return{codec:r,encrypted:a,supplemental:s}}function R(i,e){const t=W(e,["dvvC"]),n=t.length?t[0]:W(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,s=n[2]<<5&32|n[3]>>3&31;return i+"."+G(r)+"."+G(s)}}function k(i){let e=0;for(let t=0;t<32;t++)e|=(i>>t&1)<<31-t;return e>>>0}function se(i,e){const t=e+5;for(;i[e++]&128&&e<t;);return e}function $(i){return("0"+i.toString(16).toUpperCase()).slice(-2)}function G(i){return(i<10?"0":"")+i}function te(i,e){if(!i||!e)return i;const t=e.keyId;return t&&e.isCommonEncryption&&W(i,["moov","trak"]).forEach(r=>{const a=W(r,["mdia","minf","stbl","stsd"])[0].subarray(8);let o=W(a,["enca"]);const u=o.length>0;u||(o=W(a,["encv"])),o.forEach(l=>{const d=u?l.subarray(28):l.subarray(78);W(d,["sinf"]).forEach(m=>{const w=Ce(m);if(w){const x=w.subarray(8,24);x.some(H=>H!==0)||(X.log(`[eme] Patching keyId in 'enc${u?"a":"v"}>sinf>>tenc' box: ${j.hexDump(x)} -> ${j.hexDump(t)}`),w.set(t,8))}})})}),i}function Ce(i){const e=W(i,["schm"])[0];if(e){const t=kt(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return W(i,["schi","tenc"])[0]}return null}function we(i,e,t){const n={},r=W(i,["moof","traf"]);for(let s=0;s<r.length;s++){const a=r[s],o=W(a,["tfhd"])[0],u=jt(o,4),l=e[u];if(!l)continue;const d=n[u]||(n[u]={start:NaN,duration:0,sampleCount:0,timescale:l.timescale,type:l.type}),g=W(a,["tfdt"])[0];if(g){const be=g[0];let Ue=jt(g,4);be===1&&(Ue===Mt?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(Ue*=Mt+1,Ue+=jt(g,8))),N(Ue)&&(!N(d.start)||Ue<d.start)&&(d.start=Ue)}const m=l.default,w=jt(o,0)|(m==null?void 0:m.flags);let x=(m==null?void 0:m.duration)||0;w&8&&(w&2?x=jt(o,12):x=jt(o,8));const H=W(a,["trun"]);let P=d.start||0,me=0,De=x;for(let be=0;be<H.length;be++){const Ue=H[be],ot=jt(Ue,4),Dt=d.sampleCount;d.sampleCount+=ot;const rt=Ue[3]&1,Ft=Ue[3]&4,Nt=Ue[2]&1,bt=Ue[2]&2,ln=Ue[2]&4,Ln=Ue[2]&8;let _r=8,Yn=ot;for(rt&&(_r+=4),Ft&&ot&&(!(Ue[_r+1]&1)&&d.keyFrameIndex===void 0&&(d.keyFrameIndex=Dt),_r+=4,Nt?(De=jt(Ue,_r),_r+=4):De=x,bt&&(_r+=4),Ln&&(_r+=4),P+=De,me+=De,Yn--);Yn--;)Nt?(De=jt(Ue,_r),_r+=4):De=x,bt&&(_r+=4),ln&&(Ue[_r+1]&1||d.keyFrameIndex===void 0&&(d.keyFrameIndex=d.sampleCount-(Yn+1),d.keyFrameStart=P),_r+=4),Ln&&(_r+=4),P+=De,me+=De;!me&&x&&(me+=x*ot)}d.duration+=me}if(!Object.keys(n).some(s=>n[s].duration)){let s=1/0,a=0;const o=W(i,["sidx"]);for(let u=0;u<o.length;u++){const l=Re(o[u]);if(l!=null&&l.references){s=Math.min(s,l.earliestPresentationTime/l.timescale);const d=l.references.reduce((g,m)=>g+m.info.duration||0,0);a=Math.max(a,d+l.earliestPresentationTime/l.timescale)}}a&&N(a)&&Object.keys(n).forEach(u=>{n[u].duration||(n[u].duration=a*n[u].timescale-n[u].start)})}return n}function Se(i,e,t){W(e,["moof","traf"]).forEach(n=>{W(n,["tfhd"]).forEach(r=>{const s=jt(r,4),a=i[s];if(!a)return;const o=a.timescale||9e4;W(n,["tfdt"]).forEach(u=>{const l=u[0],d=t*o;if(d){let g=jt(u,4);if(l===0)g-=d,g=Math.max(g,0),ke(u,4,g);else{g*=Math.pow(2,32),g+=jt(u,8),g-=d,g=Math.max(g,0);const m=Math.floor(g/(Mt+1)),w=Math.floor(g%(Mt+1));ke(u,4,m),ke(u,8,w)}}})})})}function Ie(i){const e={valid:null,remainder:null},t=W(i,["moof"]);if(t.length<2)return e.remainder=i,e;const n=t[t.length-1];return e.valid=i.slice(0,n.byteOffset-8),e.remainder=i.slice(n.byteOffset-8),e}function Ne(i,e){const t=new Uint8Array(i.length+e.length);return t.set(i),t.set(e,i.length),t}function qe(i,e){const t=[],n=e.samples,r=e.timescale,s=e.id;let a=!1;return W(n,["moof"]).map(u=>{const l=u.byteOffset-8;W(u,["traf"]).map(g=>{const m=W(g,["tfdt"]).map(w=>{const x=w[0];let H=jt(w,4);return x===1&&(H*=Math.pow(2,32),H+=jt(w,8)),H/r})[0];return m!==void 0&&(i=m),W(g,["tfhd"]).map(w=>{const x=jt(w,4),H=jt(w,0)&16777215,P=(H&1)!==0,me=(H&2)!==0,De=(H&8)!==0;let be=0;const Ue=(H&16)!==0;let ot=0;const Dt=(H&32)!==0;let rt=8;x===s&&(P&&(rt+=8),me&&(rt+=4),De&&(be=jt(w,rt),rt+=4),Ue&&(ot=jt(w,rt),rt+=4),Dt&&(rt+=4),e.type==="video"&&(a=et(e.codec)),W(g,["trun"]).map(Ft=>{const Nt=Ft[0],bt=jt(Ft,0)&16777215,ln=(bt&1)!==0;let Ln=0;const _r=(bt&4)!==0,Yn=(bt&256)!==0;let Xn=0;const Kn=(bt&512)!==0;let ar=0;const gr=(bt&1024)!==0,Tn=(bt&2048)!==0;let Un=0;const Sr=jt(Ft,4);let Br=8;ln&&(Ln=jt(Ft,Br),Br+=4),_r&&(Br+=4);let Lr=Ln+l;for(let Mr=0;Mr<Sr;Mr++){if(Yn?(Xn=jt(Ft,Br),Br+=4):Xn=be,Kn?(ar=jt(Ft,Br),Br+=4):ar=ot,gr&&(Br+=4),Tn&&(Nt===0?Un=jt(Ft,Br):Un=mt(Ft,Br),Br+=4),e.type===_.VIDEO){let $r=0;for(;$r<ar;){const oi=jt(n,Lr);if(Lr+=4,ft(a,n[Lr])){const Vi=n.subarray(Lr,Lr+oi);Kt(Vi,a?2:1,i+Un/r,t)}Lr+=oi,$r+=oi+4}}i+=Xn/r}}))})})}),t}function et(i){if(!i)return!1;const e=i.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function ft(i,e){if(i){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function Kt(i,e,t,n){const r=Ct(i);let s=0;s+=e;let a=0,o=0,u=0;for(;s<r.length;){a=0;do{if(s>=r.length)break;u=r[s++],a+=u}while(u===255);o=0;do{if(s>=r.length)break;u=r[s++],o+=u}while(u===255);const l=r.length-s;let d=s;if(o<l)s+=o;else if(o>l){X.error(`Malformed SEI payload. ${o} is too small, only ${l} bytes left to parse.`);break}if(a===4){if(r[d++]===181){const m=sn(r,d);if(d+=2,m===49){const w=jt(r,d);if(d+=4,w===1195456820){const x=r[d++];if(x===3){const H=r[d++],P=31&H,me=64&H,De=me?2+P*3:0,be=new Uint8Array(De);if(me){be[0]=H;for(let Ue=1;Ue<De;Ue++)be[Ue]=r[d++]}n.push({type:x,payloadType:a,pts:t,bytes:be})}}}}}else if(a===5&&o>16){const g=[];for(let x=0;x<16;x++){const H=r[d++].toString(16);g.push(H.length==1?"0"+H:H),(x===3||x===5||x===7||x===9)&&g.push("-")}const m=o-16,w=new Uint8Array(m);for(let x=0;x<m;x++)w[x]=r[d++];n.push({payloadType:a,pts:t,uuid:g.join(""),userData:_e(w),userDataBytes:w})}}}function Ct(i){const e=i.byteLength,t=[];let n=1;for(;n<e-2;)i[n]===0&&i[n+1]===0&&i[n+2]===3?(t.push(n+2),n+=2):n++;if(t.length===0)return i;const r=e-t.length,s=new Uint8Array(r);let a=0;for(n=0;n<r;a++,n++)a===t[0]&&(a++,t.shift()),s[n]=i[a];return s}function vt(i){const e=i[0];let t="",n="",r=0,s=0,a=0,o=0,u=0,l=0;if(e===0){for(;kt(i.subarray(l,l+1))!=="\0";)t+=kt(i.subarray(l,l+1)),l+=1;for(t+=kt(i.subarray(l,l+1)),l+=1;kt(i.subarray(l,l+1))!=="\0";)n+=kt(i.subarray(l,l+1)),l+=1;n+=kt(i.subarray(l,l+1)),l+=1,r=jt(i,12),s=jt(i,16),o=jt(i,20),u=jt(i,24),l=28}else if(e===1){l+=4,r=jt(i,l),l+=4;const g=jt(i,l);l+=4;const m=jt(i,l);for(l+=4,a=rc(2,32)*g+m,ae(a)||(a=Number.MAX_SAFE_INTEGER,X.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=jt(i,l),l+=4,u=jt(i,l),l+=4;kt(i.subarray(l,l+1))!=="\0";)t+=kt(i.subarray(l,l+1)),l+=1;for(t+=kt(i.subarray(l,l+1)),l+=1;kt(i.subarray(l,l+1))!=="\0";)n+=kt(i.subarray(l,l+1)),l+=1;n+=kt(i.subarray(l,l+1)),l+=1}const d=i.subarray(l,i.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:a,presentationTimeDelta:s,eventDuration:o,id:u,payload:d}}function en(i,...e){const t=e.length;let n=8,r=t;for(;r--;)n+=e[r].byteLength;const s=new Uint8Array(n);for(s[0]=n>>24&255,s[1]=n>>16&255,s[2]=n>>8&255,s[3]=n&255,s.set(i,4),r=0,n=8;r<t;r++)s.set(e[r],n),n+=e[r].byteLength;return s}function on(i,e,t){if(i.byteLength!==16)throw new RangeError("Invalid system id");let n,r;n=0,r=new Uint8Array;let s;n>0?(s=new Uint8Array(4),e.length>0&&new DataView(s.buffer).setUint32(0,e.length,!1)):s=new Uint8Array;const a=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(a.buffer).setUint32(0,t.byteLength,!1),en([112,115,115,104],new Uint8Array([n,0,0,0]),i,s,r,a,t||new Uint8Array)}function Vt(i){const e=[];if(i instanceof ArrayBuffer){const t=i.byteLength;let n=0;for(;n+32<t;){const r=new DataView(i,n),s=gn(r);e.push(s),n+=s.size}}return e}function gn(i){const e=i.getUint32(0),t=i.byteOffset,n=i.byteLength;if(n<e)return{offset:t,size:n};if(i.getUint32(4)!==1886614376)return{offset:t,size:e};const s=i.getUint32(8)>>>24;if(s!==0&&s!==1)return{offset:t,size:e};const a=i.buffer,o=j.hexDump(new Uint8Array(a,t+12,16)),u=i.getUint32(28);let l=null,d=null;if(s===0){if(e-32<u||u<22)return{offset:t,size:e};d=new Uint8Array(a,t+32,u)}else if(s===1){if(!u||n<t+32+u*16+16)return{offset:t,size:e};l=[];for(let g=0;g<u;g++)l.push(new Uint8Array(a,t+32+g*16,16))}return{version:s,systemId:o,kids:l,data:d,offset:t,size:e}}const Pn=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),Gt={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function mn(i,e){const t=Gt[e];return!!t&&!!t[i.slice(0,4)]}function Ye(i,e,t=!0){return!i.split(",").some(n=>!Ge(n,e,t))}function Ge(i,e,t=!0){var n;const r=q(t);return(n=r==null?void 0:r.isTypeSupported(He(i,e)))!=null?n:!1}function He(i,e){return`${e}/mp4;codecs=${i}`}function ne(i){if(i){const e=i.substring(0,4);return Gt.video[e]}return 2}function fe(i){const e=Pn();return i.split(",").reduce((t,n)=>{const s=e&&et(n)?9:Gt.video[n];return s?(s*2+t)/(t?3:2):(Gt.audio[n]+t)/(t?2:1)},0)}const ye={};function Ee(i,e=!0){if(ye[i])return ye[i];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[i];for(let r=0;r<t.length;r++){var n;if(Ge(t[r],"audio",e))return ye[i]=t[r],t[r];if(t[r]==="mp3"&&(n=q(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return i}const Te=/flac|opus|mp4a\.40\.34/i;function xt(i,e=!0){return i.replace(Te,t=>Ee(t.toLowerCase(),e))}function Wt(i,e){const t=[];if(i){const n=i.split(",");for(let r=0;r<n.length;r++)mn(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function nn(i,e){if(i&&(i.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(i)!==-1))return i;if(e){const t=e.split(",");if(t.length>1){if(i){for(let n=t.length;n--;)if(t[n].substring(0,4)===i.substring(0,4))return t[n]}return t[0]}}return e||i}function Cn(i){const e=i.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");n.length>2&&n[0]==="avc1"&&(e[t]=`avc1.${parseInt(n[1]).toString(16)}${("000"+parseInt(n[2]).toString(16)).slice(-4)}`)}return e.join(",")}function Wn(i){if(i.startsWith("av01.")){const e=i.split("."),t=["0","111","01","01","01","0"];for(let n=e.length;n>4&&n<10;n++)e[n]=t[n-4];return e.join(".")}return i}function zn(i){const e=q(i)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function vn(i){return i.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const Dn={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function or(i,e){return{supported:!1,configurations:e,decodingInfoResults:[{supported:!1,smooth:!1,powerEfficient:!1}],error:i}}const pr={};function rr(i,e,t,n,r,s){const a=i.audioCodec?i.audioGroups:null,o=s==null?void 0:s.audioCodec,u=s==null?void 0:s.channels,l=u?parseInt(u):o?1/0:2;let d=null;if(a!=null&&a.length)try{a.length===1&&a[0]?d=e.groups[a[0]].channels:d=a.reduce((g,m)=>{if(m){const w=e.groups[m];if(!w)throw new Error(`Audio track group ${m} not found`);Object.keys(w.channels).forEach(x=>{g[x]=(g[x]||0)+w.channels[x]})}return g},{2:0})}catch(g){return!0}return i.videoCodec!==void 0&&(i.width>1920&&i.height>1088||i.height>1920&&i.width>1088||i.frameRate>Math.max(n,30)||i.videoRange!=="SDR"&&i.videoRange!==t||i.bitrate>Math.max(r,8e6))||!!d&&N(l)&&Object.keys(d).some(g=>parseInt(g)>l)}function cr(i,e,t){const n=i.videoCodec,r=i.audioCodec;if(!n&&!r||!t)return Promise.resolve(Dn);const s=[];if(n){const a={width:i.width,height:i.height,bitrate:Math.ceil(Math.max(i.bitrate*.9,i.averageBitrate)),framerate:i.frameRate||30},o=i.videoRange;o!=="SDR"&&(a.transferFunction=o.toLowerCase());const u=n.split(","),l=navigator.userAgent;if(u.some(d=>et(d))&&Pn())return Promise.resolve(or(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent sting: (${l})`),s));s.push.apply(s,u.map(d=>({type:"media-source",video:E(E({},a),{},{contentType:He(Wn(d),"video")})})))}return r&&i.audioGroups&&i.audioGroups.forEach(a=>{var o;a&&((o=e.groups[a])==null||o.tracks.forEach(u=>{if(u.groupId===a){const l=u.channels||"",d=parseFloat(l);N(d)&&d>2&&s.push.apply(s,r.split(",").map(g=>({type:"media-source",audio:{contentType:He(g,"audio"),channels:""+d}})))}}))}),Promise.all(s.map(a=>{const o=Jn(a);return pr[o]||(pr[o]=t.decodingInfo(a))})).then(a=>({supported:!a.some(o=>!o.supported),configurations:s,decodingInfoResults:a})).catch(a=>({supported:!1,configurations:s,decodingInfoResults:[],error:a}))}function Jn(i){const{audio:e,video:t}=i,n=t||e;if(n){const r=vn(n.contentType);if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${r}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${r}`}return""}const kn=["NONE","TYPE-0","TYPE-1",null];function qn(i){return kn.indexOf(i)>-1}const vr=["SDR","PQ","HLG"];function br(i){return!!i&&vr.indexOf(i)>-1}var je={No:"",Yes:"YES",v2:"v2"};function Ve(i){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=i,r=n<e/2;return e&&r?t?je.v2:je.Yes:je.No}class Yt{constructor(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Pt{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(n=>!!n).map(n=>n.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const n=(t=e.supplemental)==null?void 0:t.videoCodec;n&&n!==e.videoCodec&&(this.codecSet+=`,${n.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return An(this._audioGroups,e)}hasSubtitleGroup(e){return An(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let n=this._audioGroups;n||(n=this._audioGroups=[]),n.indexOf(t)===-1&&n.push(t)}else if(e==="text"){let n=this._subtitleGroups;n||(n=this._subtitleGroups=[]),n.indexOf(t)===-1&&n.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function An(i,e){return!e||!i?!1:i.indexOf(e)!==-1}function un(){if(typeof matchMedia=="function"){const i=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(i.media!==e.media)return i.matches===!0}return!1}function yt(i,e){let t=!1,n=[];if(i&&(t=i!=="SDR",n=[i]),e){n=e.allowedVideoRanges||vr.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&un(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const pt=i=>{const e=new WeakSet;return(t,n)=>{if(i&&(n=i(t,n)),typeof n=="object"&&n!==null){if(e.has(n))return;e.add(n)}return n}},Lt=(i,e)=>JSON.stringify(i,pt(e));function rn(i,e,t,n,r){const s=Object.keys(i),a=n==null?void 0:n.channels,o=n==null?void 0:n.audioCodec,u=r==null?void 0:r.videoCodec,l=a&&parseInt(a)===2;let d=!1,g=!1,m=1/0,w=1/0,x=1/0,H=1/0,P=0,me=[];const{preferHDR:De,allowedVideoRanges:be}=yt(e,r);for(let Ft=s.length;Ft--;){const Nt=i[s[Ft]];d||(d=Nt.channels[2]>0),m=Math.min(m,Nt.minHeight),w=Math.min(w,Nt.minFramerate),x=Math.min(x,Nt.minBitrate),be.filter(ln=>Nt.videoRanges[ln]>0).length>0&&(g=!0)}m=N(m)?m:0,w=N(w)?w:0;const Ue=Math.max(1080,m),ot=Math.max(30,w);x=N(x)?x:t,t=Math.max(x,t),g||(e=void 0);const Dt=s.length>1;return{codecSet:s.reduce((Ft,Nt)=>{const bt=i[Nt];if(Nt===Ft)return Ft;if(me=g?be.filter(ln=>bt.videoRanges[ln]>0):[],Dt){if(bt.minBitrate>t)return dn(Nt,`min bitrate of ${bt.minBitrate} > current estimate of ${t}`),Ft;if(!bt.hasDefaultAudio)return dn(Nt,"no renditions with default or auto-select sound found"),Ft;if(o&&Nt.indexOf(o.substring(0,4))%5!==0)return dn(Nt,`audio codec preference "${o}" not found`),Ft;if(a&&!l){if(!bt.channels[a])return dn(Nt,`no renditions with ${a} channel sound found (channels options: ${Object.keys(bt.channels)})`),Ft}else if((!o||l)&&d&&bt.channels[2]===0)return dn(Nt,"no renditions with stereo sound found"),Ft;if(bt.minHeight>Ue)return dn(Nt,`min resolution of ${bt.minHeight} > maximum of ${Ue}`),Ft;if(bt.minFramerate>ot)return dn(Nt,`min framerate of ${bt.minFramerate} > maximum of ${ot}`),Ft;if(!me.some(ln=>bt.videoRanges[ln]>0))return dn(Nt,`no variants with VIDEO-RANGE of ${Lt(me)} found`),Ft;if(u&&Nt.indexOf(u.substring(0,4))%5!==0)return dn(Nt,`video codec preference "${u}" not found`),Ft;if(bt.maxScore<P)return dn(Nt,`max score of ${bt.maxScore} < selected max of ${P}`),Ft}return Ft&&(fe(Nt)>=fe(Ft)||bt.fragmentError>i[Ft].fragmentError)?Ft:(H=bt.minIndex,P=bt.maxScore,Nt)},void 0),videoRanges:me,preferHDR:De,minFramerate:w,minBitrate:x,minIndex:H}}function dn(i,e){X.log(`[abr] start candidates with "${i}" ignored because ${e}`)}function xn(i){return i.reduce((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const r=t.channels||"2";return n.channels[r]=(n.channels[r]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function dt(i,e,t,n){return i.slice(t,n+1).reduce((r,s,a)=>{if(!s.codecSet)return r;const o=s.audioGroups;let u=r[s.codecSet];u||(r[s.codecSet]=u={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:a,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!o,fragmentError:0}),u.minBitrate=Math.min(u.minBitrate,s.bitrate);const l=Math.min(s.height,s.width);return u.minHeight=Math.min(u.minHeight,l),u.minFramerate=Math.min(u.minFramerate,s.frameRate),u.minIndex=Math.min(u.minIndex,a),u.maxScore=Math.max(u.maxScore,s.score),u.fragmentError+=s.fragmentError,u.videoRanges[s.videoRange]=(u.videoRanges[s.videoRange]||0)+1,o&&o.forEach(d=>{if(!d)return;const g=e.groups[d];g&&(u.hasDefaultAudio=u.hasDefaultAudio||e.hasDefaultAudio?g.hasDefault:g.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(g.channels).forEach(m=>{u.channels[m]=(u.channels[m]||0)+g.channels[m]}))}),r},{})}function $t(i){if(!i)return i;const{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:s}=i;return{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:s}}function Le(i,e,t){if("attrs"in i){const n=e.indexOf(i);if(n!==-1)return n}for(let n=0;n<e.length;n++){const r=e[n];if(Xe(i,r,t))return n}return-1}function Xe(i,e,t){const{groupId:n,name:r,lang:s,assocLang:a,default:o}=i,u=i.forced;return(n===void 0||e.groupId===n)&&(r===void 0||e.name===r)&&(s===void 0||gt(s,e.lang))&&(s===void 0||e.assocLang===a)&&(o===void 0||e.default===o)&&(u===void 0||e.forced===u)&&(!("characteristics"in i)||_t(i.characteristics||"",e.characteristics))&&(t===void 0||t(i,e))}function gt(i,e="--"){return i.length===e.length?i===e:i.startsWith(e)||e.startsWith(i)}function _t(i,e=""){const t=i.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function Qt(i,e){const{audioCodec:t,channels:n}=i;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function Xt(i,e,t,n,r){const s=e[n],o=e.reduce((m,w,x)=>{const H=w.uri;return(m[H]||(m[H]=[])).push(x),m},{})[s.uri];o.length>1&&(n=Math.max.apply(Math,o));const u=s.videoRange,l=s.frameRate,d=s.codecSet.substring(0,4),g=Rt(e,n,m=>{if(m.videoRange!==u||m.frameRate!==l||m.codecSet.substring(0,4)!==d)return!1;const w=m.audioGroups,x=t.filter(H=>!w||w.indexOf(H.groupId)!==-1);return Le(i,x,r)>-1});return g>-1?g:Rt(e,n,m=>{const w=m.audioGroups,x=t.filter(H=>!w||w.indexOf(H.groupId)!==-1);return Le(i,x,r)>-1})}function Rt(i,e,t){for(let n=e;n>-1;n--)if(t(i[n]))return n;for(let n=e+1;n<i.length;n++)if(t(i[n]))return n;return-1}function Jt(i,e){var t;return!!i&&i!==((t=e.loadLevelObj)==null?void 0:t.uri)}class fn extends O{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var n;const{fragCurrent:r,partCurrent:s,hls:a}=this,{autoLevelEnabled:o,media:u}=a;if(!r||!u)return;const l=performance.now(),d=s?s.stats:r.stats,g=s?s.duration:r.duration,m=l-d.loading.start,w=a.minAutoLevel,x=r.level,H=this._nextAutoLevel;if(d.aborted||d.loaded&&d.loaded===d.total||x<=w){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o)return;const P=H>-1&&H!==x,me=!!t||P;if(!me&&(u.paused||!u.playbackRate||!u.readyState))return;const De=a.mainForwardBufferInfo;if(!me&&De===null)return;const be=this.bwEstimator.getEstimateTTFB(),Ue=Math.abs(u.playbackRate);if(m<=Math.max(be,1e3*(g/(Ue*2))))return;const ot=De?De.len/Ue:0,Dt=d.loading.first?d.loading.first-d.loading.start:-1,rt=d.loaded&&Dt>-1,Ft=this.getBwEstimate(),Nt=a.levels,bt=Nt[x],ln=Math.max(d.loaded,Math.round(g*(r.bitrate||bt.averageBitrate)/8));let Ln=rt?m-Dt:m;Ln<1&&rt&&(Ln=Math.min(m,d.loaded*8/Ft));const _r=rt?d.loaded*1e3/Ln:0,Yn=be/1e3,Xn=_r?(ln-d.loaded)/_r:ln*8/Ft+Yn;if(Xn<=ot)return;const Kn=_r?_r*8:Ft,ar=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,gr=this.hls.config.abrBandWidthUpFactor;let Tn=Number.POSITIVE_INFINITY,Un;for(Un=x-1;Un>w;Un--){const Mr=Nt[Un].maxBitrate,$r=!Nt[Un].details||ar;if(Tn=this.getTimeToLoadFrag(Yn,Kn,g*Mr,$r),Tn<Math.min(ot,g+Yn))break}if(Tn>=Xn||Tn>g*10)return;rt?this.bwEstimator.sample(m-Math.min(be,Dt),d.loaded):this.bwEstimator.sampleTTFB(m);const Sr=Nt[Un].maxBitrate;this.getBwEstimate()*gr>Sr&&this.resetEstimator(Sr);const Br=this.findBestLevel(Sr,w,Un,0,ot,1,1);Br>-1&&(Un=Br),this.warn(`Fragment ${r.sn}${s?" part "+s.index:""} of level ${x} is loading too slowly;
|
|
Fragment duration: ${r.duration.toFixed(3)}
|
|
Time to underbuffer: ${ot.toFixed(3)} s
|
|
Estimated load time for current fragment: ${Xn.toFixed(3)} s
|
|
Estimated load time for down switch fragment: ${Tn.toFixed(3)} s
|
|
TTFB estimate: ${Dt|0} ms
|
|
Current BW estimate: ${N(Ft)?Ft|0:"Unknown"} bps
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
Switching to level ${Un} @ ${Sr|0} bps`),a.nextLoadLevel=a.nextAutoLevel=Un,this.clearTimer();const Lr=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===Un&&Un>0){const Mr=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Un>0?"and switching down":""}
|
|
Fragment duration: ${r.duration.toFixed(3)} s
|
|
Time to underbuffer: ${Mr.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,Un>w){let $r=this.findBestLevel(this.hls.levels[w].bitrate,w,Un,0,Mr,1,1);$r===-1&&($r=w),this.hls.nextLoadLevel=this.hls.nextAutoLevel=$r,this.resetEstimator(this.hls.levels[$r].bitrate)}}};P||Xn>Tn*2?Lr():this.timer=self.setInterval(Lr,Tn*1e3),a.trigger(h.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:s,stats:d})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new B(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.FRAG_LOADING,this.onFragLoading,this),e.on(h.FRAG_LOADED,this.onFragLoaded,this),e.on(h.FRAG_BUFFERED,this.onFragBuffered,this),e.on(h.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(h.LEVEL_LOADED,this.onLevelLoaded,this),e.on(h.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(h.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(h.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.FRAG_LOADING,this.onFragLoading,this),e.off(h.FRAG_LOADED,this.onFragLoaded,this),e.off(h.FRAG_BUFFERED,this.onFragBuffered,this),e.off(h.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(h.LEVEL_LOADED,this.onLevelLoaded,this),e.off(h.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(h.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(h.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 n=t.frag;if(!this.ignoreFragment(n)){if(!n.bitrateTest){var r;this.fragCurrent=n,this.partCurrent=(r=t.part)!=null?r:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case Q.BUFFER_ADD_CODEC_ERROR:case Q.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case Q.FRAG_LOAD_TIMEOUT:{const n=t.frag,{fragCurrent:r,partCurrent:s}=this;if(n&&r&&n.sn===r.sn&&n.level===r.level){const a=performance.now(),o=s?s.stats:n.stats,u=a-o.loading.start,l=o.loading.first?o.loading.first-o.loading.start:-1;if(o.loaded&&l>-1){const g=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(u-Math.min(g,l),o.loaded)}else this.bwEstimator.sampleTTFB(u)}break}}}getTimeToLoadFrag(e,t,n,r){const s=e+n/t,a=r?e+this.lastLevelLoadSec:0;return s+a}onLevelLoaded(e,t){const n=this.hls.config,{loading:r}=t.stats,s=r.end-r.first;N(s)&&(this.lastLevelLoadSec=s/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:n}){const r=n?n.stats:t.stats;if(t.type===ie.MAIN&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const s=n?n.duration:t.duration,a=this.hls.levels[t.level],o=(a.loaded?a.loaded.bytes:0)+r.loaded,u=(a.loaded?a.loaded.duration:0)+s;a.loaded={bytes:o,duration:u},a.realBitrate=Math.round(8*o/u)}if(t.bitrateTest){const s={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(h.FRAG_BUFFERED,s),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:r}=t,s=r!=null&&r.stats.loaded?r.stats:n.stats;if(s.aborted||this.ignoreFragment(n))return;const a=s.parsing.end-s.loading.start-Math.min(s.loading.first-s.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,s.loaded),s.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==ie.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,n=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,s=this.findBestLevel(n,t,e,0,r,1,1);if(s>-1)return s;const a=this.hls.firstLevel,o=Math.min(Math.max(a,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${a} clamped to ${o}`),o}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,n=this.bwEstimator.canEstimate(),r=this.lastLoadedFragLevel>-1;if(e!==-1&&(!n||!r||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const s=n&&r?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const a=this.hls.levels;if(a.length>Math.max(e,s)&&a[e].loadError<=a[s].loadError)return e}return this._nextAutoLevel=s,this.nextAutoLevelKey=this.getAutoLevelKey(),s}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:n}=this;if(n.levels.length<=1)return n.loadLevel;const{maxAutoLevel:r,config:s,minAutoLevel:a}=n,o=t?t.duration:e?e.duration:0,u=this.getBwEstimate(),l=this.getStarvationDelay();let d=s.abrBandWidthFactor,g=s.abrBandWidthUpFactor;if(l){const P=this.findBestLevel(u,a,r,l,0,d,g);if(P>=0)return this.rebufferNotice=-1,P}let m=o?Math.min(o,s.maxStarvationDelay):s.maxStarvationDelay;if(!l){const P=this.bitrateTestDelay;P&&(m=(o?Math.min(o,s.maxLoadingDelay):s.maxLoadingDelay)-P,this.info(`bitrate test took ${Math.round(1e3*P)}ms, set first fragment max fetchDuration to ${Math.round(1e3*m)} ms`),d=g=1)}const w=this.findBestLevel(u,a,r,l,m,d,g);if(this.rebufferNotice!==w&&(this.rebufferNotice=w,this.info(`${l?"rebuffering expected":"buffer is empty"}, optimal quality level ${w}`)),w>-1)return w;const x=n.levels[a],H=n.loadLevelObj;return H&&(x==null?void 0:x.bitrate)<H.bitrate?a:n.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const n=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,r=e.mainForwardBufferInfo;return(r?r.len:0)/n}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,n,r,s,a,o){var u;const l=r+s,d=this.lastLoadedFragLevel,g=d===-1?this.hls.firstLevel:d,{fragCurrent:m,partCurrent:w}=this,{levels:x,allAudioTracks:H,loadLevel:P,config:me}=this.hls;if(x.length===1)return 0;const De=x[g],be=!!((u=this.hls.latestLevelDetails)!=null&&u.live),Ue=P===-1||d===-1;let ot,Dt="SDR",rt=(De==null?void 0:De.frameRate)||0;const{audioPreference:Ft,videoPreference:Nt}=me,bt=this.audioTracksByGroup||(this.audioTracksByGroup=xn(H));let ln=-1;if(Ue){if(this.firstSelection!==-1)return this.firstSelection;const Kn=this.codecTiers||(this.codecTiers=dt(x,bt,t,n)),ar=rn(Kn,Dt,e,Ft,Nt),{codecSet:gr,videoRanges:Tn,minFramerate:Un,minBitrate:Sr,minIndex:Br,preferHDR:Lr}=ar;ln=Br,ot=gr,Dt=Lr?Tn[Tn.length-1]:Tn[0],rt=Un,e=Math.max(e,Sr),this.log(`picked start tier ${Lt(ar)}`)}else ot=De==null?void 0:De.codecSet,Dt=De==null?void 0:De.videoRange;const Ln=w?w.duration:m?m.duration:0,_r=this.bwEstimator.getEstimateTTFB()/1e3,Yn=[];for(let Kn=n;Kn>=t;Kn--){var Xn;const ar=x[Kn],gr=Kn>g;if(!ar)continue;if(me.useMediaCapabilities&&!ar.supportedResult&&!ar.supportedPromise){const $r=navigator.mediaCapabilities;typeof($r==null?void 0:$r.decodingInfo)=="function"&&(rr(ar,bt,Dt,rt,e,Ft)||et(ar.videoCodec))?(ar.supportedPromise=cr(ar,bt,$r),ar.supportedPromise.then(oi=>{if(!this.hls)return;ar.supportedResult=oi;const Vi=this.hls.levels,ts=Vi.indexOf(ar);oi.error?this.warn(`MediaCapabilities decodingInfo error: "${oi.error}" for level ${ts} ${Lt(oi)}`):oi.supported||(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${ts} ${Lt(oi)}`),ts>-1&&Vi.length>1&&(this.log(`Removing unsupported level ${ts}`),this.hls.removeLevel(ts),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))})):ar.supportedResult=Dn}if((ot&&ar.codecSet!==ot||Dt&&ar.videoRange!==Dt||gr&&rt>ar.frameRate||!gr&&rt>0&&rt<ar.frameRate||ar.supportedResult&&!((Xn=ar.supportedResult.decodingInfoResults)!=null&&Xn[0].smooth))&&(!Ue||Kn!==ln)){Yn.push(Kn);continue}const Tn=ar.details,Un=(w?Tn==null?void 0:Tn.partTarget:Tn==null?void 0:Tn.averagetargetduration)||Ln;let Sr;gr?Sr=o*e:Sr=a*e;const Br=Ln&&r>=Ln*2&&s===0?ar.averageBitrate:ar.maxBitrate,Lr=this.getTimeToLoadFrag(_r,Sr,Br*Un,Tn===void 0);if(Sr>=Br&&(Kn===d||ar.loadError===0&&ar.fragmentError===0)&&(Lr<=_r||!N(Lr)||be&&!this.bitrateTestDelay||Lr<l)){const $r=this.forcedAutoLevel;return Kn!==P&&($r===-1||$r!==P)&&(Yn.length&&this.trace(`Skipped level(s) ${Yn.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${x[Yn[0]].codecs}" ${x[Yn[0]].videoRange}; not compatible with "${ot}" ${Dt}`),this.info(`switch candidate:${g}->${Kn} adjustedbw(${Math.round(Sr)})-bitrate=${Math.round(Sr-Br)} ttfb:${_r.toFixed(1)} avgDuration:${Un.toFixed(1)} maxFetchDuration:${l.toFixed(1)} fetchDuration:${Lr.toFixed(1)} firstSelection:${Ue} codecSet:${ar.codecSet} videoRange:${ar.videoRange} hls.loadLevel:${P}`)),Ue&&(this.firstSelection=Kn),Kn}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls;return Math.min(Math.max(e,n),t)}}const bn={search:function(i,e){let t=0,n=i.length-1,r=null,s=null;for(;t<=n;){r=(t+n)/2|0,s=i[r];const a=e(s);if(a>0)t=r+1;else if(a<0)n=r-1;else return s}return null}};function nt(i,e,t){if(e===null||!Array.isArray(i)||!i.length||!N(e))return null;const n=i[0].programDateTime;if(e<(n||0))return null;const r=i[i.length-1].endProgramDateTime;if(e>=(r||0))return null;for(let s=0;s<i.length;++s){const a=i[s];if(M(e,t,a))return a}return null}function cn(i,e,t=0,n=0,r=.005){let s=null;if(i){s=e[1+i.sn-e[0].sn]||null;const o=i.endDTS-t;o>0&&o<15e-7&&(t+=15e-7),s&&i.level!==s.level&&s.end<=i.end&&(s=e[2+i.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(s=e[0]);if(s&&((!i||i.level===s.level)&&U(t,n,s)===0||_n(s,i,Math.min(r,n))))return s;const a=bn.search(e,U.bind(null,t,n));return a&&(a!==i||!s)?a:s}function _n(i,e,t){if(e&&e.start===0&&e.level<i.level&&(e.endPTS||0)>0){const n=e.tagList.reduce((r,s)=>(s[0]==="INF"&&(r+=parseFloat(s[1])),r),t);return i.start<=n}return!1}function U(i=0,e=0,t){if(t.start<=i&&t.start+t.duration>i)return 0;const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-n<=i?1:t.start-n>i&&t.start?-1:0}function M(i,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>i}function he(i,e,t){if(i&&i.startCC<=e&&i.endCC>=e){let n=i.fragments;const{fragmentHint:r}=i;r&&(n=n.concat(r));let s;return bn.search(n,a=>a.cc<e?1:a.cc>e?-1:(s=a,a.end<=t?1:a.start>t?-1:0)),s||null}return null}function Be(i){switch(i.details){case Q.FRAG_LOAD_TIMEOUT:case Q.KEY_LOAD_TIMEOUT:case Q.LEVEL_LOAD_TIMEOUT:case Q.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Ze(i,e){const t=Be(e);return i.default[`${t?"timeout":"error"}Retry`]}function ze(i,e){const t=i.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*i.retryDelayMs,i.maxRetryDelayMs)}function ht(i){return E(E({},i),{errorRetry:null,timeoutRetry:null})}function wt(i,e,t,n){if(!i)return!1;const r=n==null?void 0:n.code,s=e<i.maxNumRetry&&(zt(r)||!!t);return i.shouldRetry?i.shouldRetry(i,e,t,n,s):s}function zt(i){return i===0&&navigator.onLine===!1||!!i&&(i<400||i>499)}var St={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Tt={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class tn extends O{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(h.ERROR,this.onError,this),e.on(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(h.ERROR,this.onError,this),e.off(h.ERROR,this.onErrorOut,this),e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.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)===ie.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var n;if(t.fatal)return;const r=this.hls,s=t.context;switch(t.details){case Q.FRAG_LOAD_ERROR:case Q.FRAG_LOAD_TIMEOUT:case Q.KEY_LOAD_ERROR:case Q.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case Q.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=ue();return}case Q.FRAG_GAP:case Q.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=St.SendAlternateToPenaltyBox;return}case Q.LEVEL_EMPTY_ERROR:case Q.LEVEL_PARSING_ERROR:{var a,o;const l=t.parent===ie.MAIN?t.level:r.loadLevel;t.details===Q.LEVEL_EMPTY_ERROR&&((a=t.context)!=null&&(o=a.levelDetails)!=null&&o.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,l):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,l))}return;case Q.LEVEL_LOAD_ERROR:case Q.LEVEL_LOAD_TIMEOUT:typeof(s==null?void 0:s.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,s.level));return;case Q.AUDIO_TRACK_LOAD_ERROR:case Q.AUDIO_TRACK_LOAD_TIMEOUT:case Q.SUBTITLE_LOAD_ERROR:case Q.SUBTITLE_TRACK_LOAD_TIMEOUT:if(s){const l=r.loadLevelObj;if(l&&(s.type===ge.AUDIO_TRACK&&l.hasAudioGroup(s.groupId)||s.type===ge.SUBTITLE_TRACK&&l.hasSubtitleGroup(s.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=St.SendAlternateToPenaltyBox,t.errorAction.flags=Tt.MoveAllAlternatesMatchingHost;return}}return;case Q.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const l=r.loadLevelObj,d=l==null?void 0:l.attrs["HDCP-LEVEL"];d?t.errorAction={action:St.SendAlternateToPenaltyBox,flags:Tt.MoveAllAlternatesMatchingHDCP,hdcpLevel:d}:this.keySystemError(t)}return;case Q.BUFFER_ADD_CODEC_ERROR:case Q.REMUX_ALLOC_ERROR:case Q.BUFFER_APPEND_ERROR:if(!t.errorAction){var u;t.errorAction=this.getLevelSwitchAction(t,(u=t.level)!=null?u:r.loadLevel)}return;case Q.INTERNAL_EXCEPTION:case Q.BUFFER_APPENDING_ERROR:case Q.BUFFER_FULL_ERROR:case Q.LEVEL_SWITCH_ERROR:case Q.BUFFER_STALLED_ERROR:case Q.BUFFER_SEEK_OVER_HOLE:case Q.BUFFER_NUDGE_ON_STALL:t.errorAction=ue();return}t.type===le.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 n=this.hls,r=Ze(n.config.playlistLoadPolicy,e),s=this.playlistError++;if(wt(r,s,Be(e),e.response))return{action:St.RetryRequest,flags:Tt.None,retryConfig:r,retryCount:s};const o=this.getLevelSwitchAction(e,t);return r&&(o.retryConfig=r,o.retryCount=s),o}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:s,keyLoadPolicy:a}=t.config,o=Ze(e.details.startsWith("key")?a:s,e),u=t.levels.reduce((d,g)=>d+g.fragmentError,0);if(r&&(e.details!==Q.FRAG_GAP&&r.fragmentError++,wt(o,u,Be(e),e.response)))return{action:St.RetryRequest,flags:Tt.None,retryConfig:o,retryCount:u};const l=this.getLevelSwitchAction(e,n);return o&&(l.retryConfig=o,l.retryCount=u),l}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const r=this.hls.levels[t];if(r){var s,a;const l=e.details;r.loadError++,l===Q.BUFFER_APPEND_ERROR&&r.fragmentError++;let d=-1;const{levels:g,loadLevel:m,minAutoLevel:w,maxAutoLevel:x}=n;!n.autoLevelEnabled&&!n.config.preserveManualLevelOnError&&(n.loadLevel=-1);const H=(s=e.frag)==null?void 0:s.type,me=(H===ie.AUDIO&&l===Q.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(l===Q.BUFFER_ADD_CODEC_ERROR||l===Q.BUFFER_APPEND_ERROR))&&g.some(({audioCodec:Dt})=>r.audioCodec!==Dt),be=e.sourceBufferName==="video"&&(l===Q.BUFFER_ADD_CODEC_ERROR||l===Q.BUFFER_APPEND_ERROR)&&g.some(({codecSet:Dt,audioCodec:rt})=>r.codecSet!==Dt&&r.audioCodec===rt),{type:Ue,groupId:ot}=(a=e.context)!=null?a:{};for(let Dt=g.length;Dt--;){const rt=(Dt+m)%g.length;if(rt!==m&&rt>=w&&rt<=x&&g[rt].loadError===0){var o,u;const Ft=g[rt];if(l===Q.FRAG_GAP&&H===ie.MAIN&&e.frag){const Nt=g[rt].details;if(Nt){const bt=cn(e.frag,Nt.fragments,e.frag.start);if(bt!=null&&bt.gap)continue}}else{if(Ue===ge.AUDIO_TRACK&&Ft.hasAudioGroup(ot)||Ue===ge.SUBTITLE_TRACK&&Ft.hasSubtitleGroup(ot))continue;if(H===ie.AUDIO&&(o=r.audioGroups)!=null&&o.some(Nt=>Ft.hasAudioGroup(Nt))||H===ie.SUBTITLE&&(u=r.subtitleGroups)!=null&&u.some(Nt=>Ft.hasSubtitleGroup(Nt))||me&&r.audioCodec===Ft.audioCodec||!me&&r.audioCodec!==Ft.audioCodec||be&&r.codecSet===Ft.codecSet)continue}d=rt;break}}if(d>-1&&n.loadLevel!==d)return e.levelRetry=!0,this.playlistError=0,{action:St.SendAlternateToPenaltyBox,flags:Tt.None,nextAutoLevel:d}}return{action:St.SendAlternateToPenaltyBox,flags:Tt.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case St.DoNothing:break;case St.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==Q.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 St.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:r,hdcpLevel:s,nextAutoLevel:a}=n;switch(r){case Tt.None:this.switchLevel(e,a);break;case Tt.MoveAllAlternatesMatchingHDCP:s&&(t.maxHdcpLevel=kn[kn.indexOf(s)-1],n.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}n.resolved||this.switchLevel(e,a)}switchLevel(e,t){if(t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===Q.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=vn(e.mimeType),r=this.hls.levels;for(let s=r.length;s--;)r[s][`${e.sourceBufferName}Codec`]===n&&this.hls.removeLevel(s)}}}function ue(i){const e={action:St.DoNothing,flags:Tt.None};return i&&(e.resolved=!0),e}var Oe={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Pe{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(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.BUFFER_APPENDED,this.onBufferAppended,this),e.on(h.FRAG_BUFFERED,this.onFragBuffered,this),e.on(h.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.BUFFER_APPENDED,this.onBufferAppended,this),e.off(h.FRAG_BUFFERED,this.onFragBuffered,this),e.off(h.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const n=this.activePartLists[t];if(n)for(let r=n.length;r--;){const s=n[r];if(!s)break;const a=s.end;if(s.start<=e&&a!==null&&e<=a)return s}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,n){const{fragments:r}=this,s=Object.keys(r);for(let a=s.length;a--;){const o=r[s[a]];if((o==null?void 0:o.body.type)===t&&(!n||o.buffered)){const u=o.body;if(u.start<=e&&e<=u.end)return u}}return null}detectEvictedFragments(e,t,n,r,s){this.timeRanges&&(this.timeRanges[e]=t);const a=(r==null?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach(o=>{const u=this.fragments[o];if(!u||a>=u.body.sn)return;if(!u.buffered&&(!u.loaded||s)){u.body.type===n&&this.removeFragment(u.body);return}const l=u.range[e];if(l){if(l.time.length===0){this.removeFragment(u.body);return}l.time.some(d=>{const g=!this.isTimeBuffered(d.startPTS,d.endPTS,t);return g&&this.removeFragment(u.body),g})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=Je(n),s=this.fragments[r];if(!s||s.buffered&&n.gap)return;const a=!n.relurl;Object.keys(t).forEach(o=>{const u=n.elementaryStreams[o];if(!u)return;const l=t[o],d=a||u.partial===!0;s.range[o]=this.getBufferedTimes(n,e.part,d,l)}),s.loaded=null,Object.keys(s.range).length?(s.buffered=!0,(s.body.endList=n.endList||s.body.endList)&&(this.endListFragments[s.body.type]=s),Me(s)||this.removeParts(n.sn-1,n.type)):this.removeFragment(s.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=ut(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=Je(e);let r=this.fragments[n];!r&&t&&(r=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,r.buffered=!0)}getBufferedTimes(e,t,n,r){const s={time:[],partial:n},a=e.start,o=e.end,u=e.minEndPTS||o,l=e.maxStartPTS||a;for(let d=0;d<r.length;d++){const g=r.start(d)-this.bufferPadding,m=r.end(d)+this.bufferPadding;if(l>=g&&u<=m){s.time.push({startPTS:Math.max(a,r.start(d)),endPTS:Math.min(o,r.end(d))});break}else if(a<m&&o>g){const w=Math.max(a,r.start(d)),x=Math.min(o,r.end(d));x>w&&(s.partial=!0,s.time.push({startPTS:w,endPTS:x}))}else if(o<=g)break}return s}getPartialFragment(e){let t=null,n,r,s,a=0;const{bufferPadding:o,fragments:u}=this;return Object.keys(u).forEach(l=>{const d=u[l];d&&Me(d)&&(r=d.body.start-o,s=d.body.end+o,e>=r&&e<=s&&(n=Math.min(e-r,s-e),a<=n&&(t=d.body,a=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Me(t))}getState(e){const t=Je(e),n=this.fragments[t];return n?n.buffered?Me(n)?Oe.PARTIAL:Oe.OK:Oe.APPENDING:Oe.NOT_LOADED}isTimeBuffered(e,t,n){let r,s;for(let a=0;a<n.length;a++){if(r=n.start(a)-this.bufferPadding,s=n.end(a)+this.bufferPadding,e>=r&&t<=s)return!0;if(t<=r)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const n=t.frag,r=t.part?null:t,s=Je(n);this.fragments[s]={body:n,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:r,timeRanges:s,type:a}=t;if(n.sn==="initSegment")return;const o=n.type;if(r){let l=this.activePartLists[o];l||(this.activePartLists[o]=l=[]),l.push(r)}this.timeRanges=s;const u=s[a];this.detectEvictedFragments(a,u,o,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Je(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,n=Object.keys(t);if(!e)return n.length>0;for(let r=n.length;r--;){const s=t[n[r]];if((s==null?void 0:s.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,n,r,s){r&&!this.hasGaps||Object.keys(this.fragments).forEach(a=>{const o=this.fragments[a];if(!o)return;const u=o.body;u.type!==n||r&&!u.gap||u.start<t&&u.end>e&&(o.buffered||s)&&this.removeFragment(u)})}removeFragment(e){const t=Je(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=ut(n,s=>s.fragment.sn!==r)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e,t;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const n=(e=this.hls)==null||(t=e.latestLevelDetails)==null?void 0:t.partList;n&&n.forEach(r=>r.clearElementaryStreamInfo())}}function Me(i){var e,t,n;return i.buffered&&(i.body.gap||((e=i.range.video)==null?void 0:e.partial)||((t=i.range.audio)==null?void 0:t.partial)||((n=i.range.audiovideo)==null?void 0:n.partial))}function Je(i){return`${i.type}_${i.level}_${i.sn}`}function ut(i,e){return i.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var It={cbc:0,ctr:1};class Bt{constructor(e,t,n){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=n}decrypt(e,t){switch(this.aesMode){case It.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case It.ctr:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},t,e);default:throw new Error(`[AESCrypto] invalid aes mode ${this.aesMode}`)}}}function lt(i){const e=i.byteLength,t=e&&new DataView(i.buffer).getUint8(e-1);return t?i.slice(0,e-t):i}class Ke{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),n=new Uint32Array(4);for(let r=0;r<4;r++)n[r]=t.getUint32(r*4);return n}initTable(){const e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],s=n[1],a=n[2],o=n[3],u=this.invSubMix,l=u[0],d=u[1],g=u[2],m=u[3],w=new Uint32Array(256);let x=0,H=0,P=0;for(P=0;P<256;P++)P<128?w[P]=P<<1:w[P]=P<<1^283;for(P=0;P<256;P++){let me=H^H<<1^H<<2^H<<3^H<<4;me=me>>>8^me&255^99,e[x]=me,t[me]=x;const De=w[x],be=w[De],Ue=w[be];let ot=w[me]*257^me*16843008;r[x]=ot<<24|ot>>>8,s[x]=ot<<16|ot>>>16,a[x]=ot<<8|ot>>>24,o[x]=ot,ot=Ue*16843009^be*65537^De*257^x*16843008,l[me]=ot<<24|ot>>>8,d[me]=ot<<16|ot>>>16,g[me]=ot<<8|ot>>>24,m[me]=ot,x?(x=De^w[w[w[Ue^De]]],H^=w[w[H]]):x=H=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,r=0;for(;r<t.length&&n;)n=t[r]===this.key[r],r++;if(n)return;this.key=t;const s=this.keySize=t.length;if(s!==4&&s!==6&&s!==8)throw new Error("Invalid aes key size="+s);const a=this.ksRows=(s+6+1)*4;let o,u;const l=this.keySchedule=new Uint32Array(a),d=this.invKeySchedule=new Uint32Array(a),g=this.sBox,m=this.rcon,w=this.invSubMix,x=w[0],H=w[1],P=w[2],me=w[3];let De,be;for(o=0;o<a;o++){if(o<s){De=l[o]=t[o];continue}be=De,o%s===0?(be=be<<8|be>>>24,be=g[be>>>24]<<24|g[be>>>16&255]<<16|g[be>>>8&255]<<8|g[be&255],be^=m[o/s|0]<<24):s>6&&o%s===4&&(be=g[be>>>24]<<24|g[be>>>16&255]<<16|g[be>>>8&255]<<8|g[be&255]),l[o]=De=(l[o-s]^be)>>>0}for(u=0;u<a;u++)o=a-u,u&3?be=l[o]:be=l[o-4],u<4||o<=4?d[u]=be:d[u]=x[g[be>>>24]]^H[g[be>>>16&255]]^P[g[be>>>8&255]]^me[g[be&255]],d[u]=d[u]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,n){const r=this.keySize+6,s=this.invKeySchedule,a=this.invSBox,o=this.invSubMix,u=o[0],l=o[1],d=o[2],g=o[3],m=this.uint8ArrayToUint32Array_(n);let w=m[0],x=m[1],H=m[2],P=m[3];const me=new Int32Array(e),De=new Int32Array(me.length);let be,Ue,ot,Dt,rt,Ft,Nt,bt,ln,Ln,_r,Yn,Xn,Kn;const ar=this.networkToHostOrderSwap;for(;t<me.length;){for(ln=ar(me[t]),Ln=ar(me[t+1]),_r=ar(me[t+2]),Yn=ar(me[t+3]),rt=ln^s[0],Ft=Yn^s[1],Nt=_r^s[2],bt=Ln^s[3],Xn=4,Kn=1;Kn<r;Kn++)be=u[rt>>>24]^l[Ft>>16&255]^d[Nt>>8&255]^g[bt&255]^s[Xn],Ue=u[Ft>>>24]^l[Nt>>16&255]^d[bt>>8&255]^g[rt&255]^s[Xn+1],ot=u[Nt>>>24]^l[bt>>16&255]^d[rt>>8&255]^g[Ft&255]^s[Xn+2],Dt=u[bt>>>24]^l[rt>>16&255]^d[Ft>>8&255]^g[Nt&255]^s[Xn+3],rt=be,Ft=Ue,Nt=ot,bt=Dt,Xn=Xn+4;be=a[rt>>>24]<<24^a[Ft>>16&255]<<16^a[Nt>>8&255]<<8^a[bt&255]^s[Xn],Ue=a[Ft>>>24]<<24^a[Nt>>16&255]<<16^a[bt>>8&255]<<8^a[rt&255]^s[Xn+1],ot=a[Nt>>>24]<<24^a[bt>>16&255]<<16^a[rt>>8&255]<<8^a[Ft&255]^s[Xn+2],Dt=a[bt>>>24]<<24^a[rt>>16&255]<<16^a[Ft>>8&255]<<8^a[Nt&255]^s[Xn+3],De[t]=ar(be^w),De[t+1]=ar(Dt^x),De[t+2]=ar(ot^H),De[t+3]=ar(Ue^P),w=ln,x=Ln,H=_r,P=Yn,t=t+4}return De.buffer}}class tt{constructor(e,t,n){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=n}expandKey(){const e=at(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function at(i){switch(i){case It.cbc:return"AES-CBC";case It.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${i}`)}}const it=16;class At{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(n){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const n=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?lt(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n,r){return this.useSoftware?new Promise((s,a)=>{const o=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(o,t,n,r);const u=this.flush();u?s(u.buffer):a(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,n,r)}softwareDecrypt(e,t,n,r){const{currentIV:s,currentResult:a,remainderData:o}=this;if(r!==It.cbc||t.byteLength!==16)return X.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),o&&(e=Ne(o,e),this.remainderData=null);const u=this.getValidChunk(e);if(!u.length)return null;s&&(n=s);let l=this.softwareDecrypter;l||(l=this.softwareDecrypter=new Ke),l.expandKey(t);const d=a;return this.currentResult=l.decrypt(u.buffer,0,n),this.currentIV=u.slice(-16).buffer,d||null}webCryptoDecrypt(e,t,n,r){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,n,r));this.key=t,this.fastAesKey=new tt(this.subtle,t,r)}return this.fastAesKey.expandKey().then(s=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new Bt(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,s)):Promise.reject(new Error("web crypto not initialized"))).catch(s=>(X.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`),this.onWebCryptoError(e,t,n,r)))}onWebCryptoError(e,t,n,r){const s=this.enableSoftwareAES;if(s){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n,r);const a=this.flush();if(a)return a.buffer}throw new Error("WebCrypto"+(s?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const n=e.length-e.length%it;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(X.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Ht=Math.pow(2,17);class qt{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const n=e.url;if(!n)return Promise.reject(new yn({type:le.NETWORK_ERROR,details:Q.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${n?"part list":"url"}`),networkDetails:null}));this.abort();const r=this.config,s=r.fLoader,a=r.loader;return new Promise((o,u)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(x=>x[0]==="GAP")){u(Sn(e));return}else e.gap=!1;const l=this.loader=s?new s(r):new a(r),d=an(e);e.loader=l;const g=ht(r.fragLoadPolicy.default),m={loadPolicy:g,timeout:g.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Ht};e.stats=l.stats;const w={onSuccess:(x,H,P,me)=>{this.resetLoader(e,l);let De=x.data;P.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(De.slice(0,16)),De=De.slice(16)),o({frag:e,part:null,payload:De,networkDetails:me})},onError:(x,H,P,me)=>{this.resetLoader(e,l),u(new yn({type:le.NETWORK_ERROR,details:Q.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:E({url:n,data:void 0},x),error:new Error(`HTTP Error ${x.code} ${x.text}`),networkDetails:P,stats:me}))},onAbort:(x,H,P)=>{this.resetLoader(e,l),u(new yn({type:le.NETWORK_ERROR,details:Q.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:P,stats:x}))},onTimeout:(x,H,P)=>{this.resetLoader(e,l),u(new yn({type:le.NETWORK_ERROR,details:Q.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${m.timeout}ms`),networkDetails:P,stats:x}))}};t&&(w.onProgress=(x,H,P,me)=>t({frag:e,part:null,payload:P,networkDetails:me})),l.load(d,m,w)})}loadPart(e,t,n){this.abort();const r=this.config,s=r.fLoader,a=r.loader;return new Promise((o,u)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){u(Sn(e,t));return}const l=this.loader=s?new s(r):new a(r),d=an(e,t);e.loader=l;const g=ht(r.fragLoadPolicy.default),m={loadPolicy:g,timeout:g.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Ht};t.stats=l.stats,l.load(d,m,{onSuccess:(w,x,H,P)=>{this.resetLoader(e,l),this.updateStatsFromPart(e,t);const me={frag:e,part:t,payload:w.data,networkDetails:P};n(me),o(me)},onError:(w,x,H,P)=>{this.resetLoader(e,l),u(new yn({type:le.NETWORK_ERROR,details:Q.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:E({url:d.url,data:void 0},w),error:new Error(`HTTP Error ${w.code} ${w.text}`),networkDetails:H,stats:P}))},onAbort:(w,x,H)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,l),u(new yn({type:le.NETWORK_ERROR,details:Q.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:H,stats:w}))},onTimeout:(w,x,H)=>{this.resetLoader(e,l),u(new yn({type:le.NETWORK_ERROR,details:Q.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${m.timeout}ms`),networkDetails:H,stats:w}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,s=r.total;if(n.loaded+=r.loaded,s){const u=Math.round(e.duration/t.duration),l=Math.min(Math.round(n.loaded/s),u),g=(u-l)*Math.round(n.loaded/l);n.total=n.loaded+g}else n.total=Math.max(n.loaded,n.total);const a=n.loading,o=r.loading;a.start?a.first+=o.first-o.start:(a.start=o.start,a.first=o.first),a.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function an(i,e=null){const t=e||i,n={frag:i,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},r=t.byteRangeStartOffset,s=t.byteRangeEndOffset;if(N(r)&&N(s)){var a;let o=r,u=s;if(i.sn==="initSegment"&&Rn((a=i.decryptdata)==null?void 0:a.method)){const l=s-r;l%16&&(u=s+(16-l%16)),r!==0&&(n.resetIV=!0,o=r-16)}n.rangeStart=o,n.rangeEnd=u}return n}function Sn(i,e){const t=new Error(`GAP ${i.gap?"tag":"attribute"} found`),n={type:le.MEDIA_ERROR,details:Q.FRAG_GAP,fatal:!1,frag:i,error:t,networkDetails:null};return e&&(n.part=e),(e||i).stats.aborted=!0,new yn(n)}function Rn(i){return i==="AES-128"||i==="AES-256"}class yn extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class On extends O{constructor(e,t){super(e,t),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}class hn{constructor(e,t,n,r=0,s=-1,a=!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=Vn(),this.buffering={audio:Vn(),video:Vn(),audiovideo:Vn()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=s,this.partial=a}}function Vn(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Mn={length:0,start:()=>0,end:()=>0};class En{static isBuffered(e,t){if(e){const n=En.getBuffered(e);for(let r=n.length;r--;)if(t>=n.start(r)&&t<=n.end(r))return!0}return!1}static bufferedRanges(e){if(e){const t=En.getBuffered(e);return En.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}static bufferInfo(e,t,n){if(e){const r=En.bufferedRanges(e);if(r.length)return En.bufferedInfo(r,t,n)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,n){t=Math.max(0,t),e.length>1&&e.sort((d,g)=>d.start-g.start||g.end-d.end);let r=-1,s=[];if(n)for(let d=0;d<e.length;d++){t>=e[d].start&&t<=e[d].end&&(r=d);const g=s.length;if(g){const m=s[g-1].end;e[d].start-m<n?e[d].end>m&&(s[g-1].end=e[d].end):s.push(e[d])}else s.push(e[d])}else s=e;let a=0,o,u=t,l=t;for(let d=0;d<s.length;d++){const g=s[d].start,m=s[d].end;if(r===-1&&t>=g&&t<=m&&(r=d),t+n>=g&&t<m)u=g,l=m,a=l-t;else if(t+n<g){o=g;break}}return{len:a,start:u||0,end:l||0,nextStart:o,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||Mn}catch(t){return X.log("failed to get media.buffered",t),Mn}}}const Hn=/\{\$([a-zA-Z0-9-_]+)\}/g;function Gn(i){return Hn.test(i)}function er(i,e){if(i.variableList!==null||i.hasVariableRefs){const t=i.variableList;return e.replace(Hn,n=>{const r=n.substring(2,n.length-1),s=t==null?void 0:t[r];return s===void 0?(i.playlistParsingError||(i.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${r}"`)),n):s})}return e}function jn(i,e,t){let n=i.variableList;n||(i.variableList=n={});let r,s;if("QUERYPARAM"in e){r=e.QUERYPARAM;try{const a=new self.URL(t).searchParams;if(a.has(r))s=a.get(r);else throw new Error(`"${r}" does not match any query parameter in URI: "${t}"`)}catch(a){i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${a.message}`))}}else r=e.NAME,s=e.VALUE;r in n?i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${r}"`)):n[r]=s||""}function $n(i,e,t){const n=e.IMPORT;if(t&&n in t){let r=i.variableList;r||(i.variableList=r={}),r[n]=t[n]}else i.playlistParsingError||(i.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}const Nn=/^(\d+)x(\d+)$/,In=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Bn{constructor(e,t){typeof e=="string"&&(e=Bn.parseAttrList(e,t)),p(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const n=new Uint8Array(t.length/2);for(let r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(r*2,r*2+2),16);return n}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const n=this[e];return(n?n.split(/[ ,]+/):[]).reduce((r,s)=>(r[s.toLowerCase()]=!0,r),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=Nn.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let n;const r={},s='"';for(In.lastIndex=0;(n=In.exec(e))!==null;){const a=n[1].trim();let o=n[2];const u=o.indexOf(s)===0&&o.lastIndexOf(s)===o.length-1;let l=!1;if(u)o=o.slice(1,-1);else switch(a){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":l=!0}if(t&&(u||l))o=er(t,o);else if(!l&&!u)switch(a){case"CLOSED-CAPTIONS":if(o==="NONE")break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":X.warn(`${e}: attribute ${a} is missing quotes`)}r[a]=o}return r}}const ir="com.apple.hls.interstitial";function mr(i){return i!=="ID"&&i!=="CLASS"&&i!=="CUE"&&i!=="START-DATE"&&i!=="DURATION"&&i!=="END-DATE"&&i!=="END-ON-NEXT"}function fr(i){return i==="SCTE35-OUT"||i==="SCTE35-IN"||i==="SCTE35-CMD"}class dr{constructor(e,t,n=0){var r;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(t==null?void 0:t.tagAnchor)||null,this.tagOrder=(r=t==null?void 0:t.tagOrder)!=null?r:n,t){const s=t.attr;for(const a in s)if(Object.prototype.hasOwnProperty.call(e,a)&&e[a]!==s[a]){X.warn(`DATERANGE tag attribute: "${a}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=a;break}e=p(new Bn({}),s,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const s=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);N(s.getTime())&&(this._endDate=s)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return e===void 0?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return e===null||e.programDateTime===null?(X.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return t!==null?this._dateAtEnd=new Date(this._startDate.getTime()+t*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(N(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return this.class===ir}get isValid(){return!!this.id&&!this._badValueForSameId&&N(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}const kr=10;class Wr{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}get hasProgramDateTime(){return this.fragments.length?N(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||kr}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(t!==-1){for(let n=e.length;n--;)if(e[n].index>t)return e[n].index;return t}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function Kr(i){return i==="AES-128"||i==="AES-256"||i==="AES-256-CTR"}function Ai(i){switch(i){case"AES-128":case"AES-256":return It.cbc;case"AES-256-CTR":return It.ctr;default:throw new Error(`invalid full segment method ${i}`)}}function Jr(i){return Uint8Array.from(atob(i),e=>e.charCodeAt(0))}function ei(i){return Uint8Array.from(unescape(encodeURIComponent(i)),e=>e.charCodeAt(0))}function Tr(i){const e=ei(i).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Rr(i){const e=function(n,r,s){const a=n[r];n[r]=n[s],n[s]=a};e(i,0,3),e(i,1,2),e(i,4,5),e(i,6,7)}function ti(i){const e=i.split(":");let t=null;if(e[0]==="data"&&e.length===2){const n=e[1].split(";"),r=n[n.length-1].split(",");if(r.length===2){const s=r[0]==="base64",a=r[1];s?(n.splice(-1,1),t=Jr(a)):t=Tr(a)}}return t}const Cr=typeof self!="undefined"?self:void 0;var Zn={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},yr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Qn(i){switch(i){case yr.FAIRPLAY:return Zn.FAIRPLAY;case yr.PLAYREADY:return Zn.PLAYREADY;case yr.WIDEVINE:return Zn.WIDEVINE;case yr.CLEARKEY:return Zn.CLEARKEY}}var Ar={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function ur(i){if(i===Ar.WIDEVINE)return Zn.WIDEVINE;if(i===Ar.PLAYREADY)return Zn.PLAYREADY;if(i===Ar.CENC||i===Ar.CLEARKEY)return Zn.CLEARKEY}function hr(i){switch(i){case Zn.FAIRPLAY:return yr.FAIRPLAY;case Zn.PLAYREADY:return yr.PLAYREADY;case Zn.WIDEVINE:return yr.WIDEVINE;case Zn.CLEARKEY:return yr.CLEARKEY}}function Er(i){const{drmSystems:e,widevineLicenseUrl:t}=i,n=e?[Zn.FAIRPLAY,Zn.WIDEVINE,Zn.PLAYREADY,Zn.CLEARKEY].filter(r=>!!e[r]):[];return!n[Zn.WIDEVINE]&&t&&n.push(Zn.WIDEVINE),n}const Fr=function(i){return Cr!=null&&(i=Cr.navigator)!=null&&i.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function wn(i,e,t,n){let r;switch(i){case Zn.FAIRPLAY:r=["cenc","sinf"];break;case Zn.WIDEVINE:case Zn.PLAYREADY:r=["cenc"];break;case Zn.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${i}`)}return tr(r,e,t,n)}function tr(i,e,t,n){return[{initDataTypes:i,persistentState:n.persistentState||"optional",distinctiveIdentifier:n.distinctiveIdentifier||"optional",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(s=>({contentType:`audio/mp4; codecs=${s}`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:t.map(s=>({contentType:`video/mp4; codecs=${s}`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function Ir(i){var e;return i.sessionType==="persistent-license"||!!((e=i.sessionTypes)!=null&&e.some(t=>t==="persistent-license"))}function nr(i){const e=new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),n=t.substring(t.indexOf("<"),t.length),a=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(a){const o=a.childNodes[0]?a.childNodes[0].nodeValue:a.getAttribute("VALUE");if(o){const u=Jr(o).subarray(0,16);return Rr(u),u}}return null}let wr={};class Nr{static clearKeyUriToKeyIdMap(){wr={}}constructor(e,t,n,r=[1],s=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=n,this.keyFormatVersions=r,this.iv=s,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!Kr(e)}isSupported(){if(this.method){if(Kr(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case yr.FAIRPLAY:case yr.WIDEVINE:case yr.PLAYREADY:case yr.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(Kr(this.method)&&this.uri&&!this.iv){typeof e!="number"&&(X.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const n=Yr(e);return new Nr(this.method,this.uri,"identity",this.keyFormatVersions,n)}const t=ti(this.uri);if(t)switch(this.keyFormat){case yr.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case yr.PLAYREADY:{const n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=on(n,null,t),this.keyId=nr(t);break}default:{let n=t.subarray(0,16);if(n.length!==16){const r=new Uint8Array(16);r.set(n,16-n.length),n=r}this.keyId=n;break}}if(!this.keyId||this.keyId.byteLength!==16){let n=wr[this.uri];if(!n){const r=Object.keys(wr).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,r),wr[this.uri]=n}this.keyId=n}return this}}function Yr(i){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=i>>8*(15-t)&255;return e}const ri=/#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,Pr=/#EXT-X-MEDIA:(.*)/g,wi=/^#EXT(?:INF|-X-TARGETDURATION):/m,Ur=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),ls=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class li{static findGroup(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r.id===t)return r}}static resolve(e,t){return Y.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return wi.test(e)}static parseMasterPlaylist(e,t){const n=Gn(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},s=[];ri.lastIndex=0;let a;for(;(a=ri.exec(e))!=null;)if(a[1]){var o;const l=new Bn(a[1],r),d=er(r,a[2]),g={attrs:l,bitrate:l.decimalInteger("BANDWIDTH")||l.decimalInteger("AVERAGE-BANDWIDTH"),name:l.NAME,url:li.resolve(d,t)},m=l.decimalResolution("RESOLUTION");m&&(g.width=m.width,g.height=m.height),ns(l.CODECS,g);const w=l["SUPPLEMENTAL-CODECS"];w&&(g.supplemental={},ns(w,g.supplemental)),(o=g.unknownCodecs)!=null&&o.length||s.push(g),r.levels.push(g)}else if(a[3]){const l=a[3],d=a[4];switch(l){case"SESSION-DATA":{const g=new Bn(d,r),m=g["DATA-ID"];m&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[m]=g);break}case"SESSION-KEY":{const g=Zi(d,t,r);g.encrypted&&g.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(g)):X.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${d}"`);break}case"DEFINE":{{const g=new Bn(d,r);jn(r,g,t)}break}case"CONTENT-STEERING":{const g=new Bn(d,r);r.contentSteering={uri:li.resolve(g["SERVER-URI"],t),pathwayId:g["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=Wi(d);break}}}const u=s.length>0&&s.length<r.levels.length;return r.levels=u?s:r.levels,r.levels.length===0&&(r.playlistParsingError=new Error("no levels found in manifest")),r}static parseMasterPlaylistMedia(e,t,n){let r;const s={},a=n.levels,o={AUDIO:a.map(l=>({id:l.attrs.AUDIO,audioCodec:l.audioCodec})),SUBTITLES:a.map(l=>({id:l.attrs.SUBTITLES,textCodec:l.textCodec})),"CLOSED-CAPTIONS":[]};let u=0;for(Pr.lastIndex=0;(r=Pr.exec(e))!==null;){const l=new Bn(r[1],n),d=l.TYPE;if(d){const g=o[d],m=s[d]||[];s[d]=m;const w=l.LANGUAGE,x=l["ASSOC-LANGUAGE"],H=l.CHANNELS,P=l.CHARACTERISTICS,me=l["INSTREAM-ID"],De={attrs:l,bitrate:0,id:u++,groupId:l["GROUP-ID"]||"",name:l.NAME||w||"",type:d,default:l.bool("DEFAULT"),autoselect:l.bool("AUTOSELECT"),forced:l.bool("FORCED"),lang:w,url:l.URI?li.resolve(l.URI,t):""};if(x&&(De.assocLang=x),H&&(De.channels=H),P&&(De.characteristics=P),me&&(De.instreamId=me),g!=null&&g.length){const be=li.findGroup(g,De.groupId)||g[0];Fi(De,be,"audioCodec"),Fi(De,be,"textCodec")}m.push(De)}}return s}static parseLevelPlaylist(e,t,n,r,s,a){var o;const u={url:t},l=new Wr(t),d=l.fragments,g=[];let m=null,w=0,x=0,H=0,P=0,me=0,De=null,be=new We(r,u),Ue,ot,Dt,rt=-1,Ft=!1,Nt=null,bt;if(Ur.lastIndex=0,l.m3u8=e,l.hasVariableRefs=Gn(e),((o=Ur.exec(e))==null?void 0:o[0])!=="#EXTM3U")return l.playlistParsingError=new Error("Missing format identifier #EXTM3U"),l;for(;(Ue=Ur.exec(e))!==null;){Ft&&(Ft=!1,be=new We(r,u),be.playlistOffset=H,be.start=H,be.sn=w,be.cc=P,me&&(be.bitrate=me),be.level=n,m&&(be.initSegment=m,m.rawProgramDateTime&&(be.rawProgramDateTime=m.rawProgramDateTime,m.rawProgramDateTime=null),Nt&&(be.setByteRange(Nt),Nt=null)));const Yn=Ue[1];if(Yn){be.duration=parseFloat(Yn);const Xn=(" "+Ue[2]).slice(1);be.title=Xn||null,be.tagList.push(Xn?["INF",Yn,Xn]:["INF",Yn])}else if(Ue[3]){if(N(be.duration)){be.playlistOffset=H,be.start=H,Dt&&fi(be,Dt,l),be.sn=w,be.level=n,be.cc=P,d.push(be);const Xn=(" "+Ue[3]).slice(1);be.relurl=er(l,Xn),Ui(be,De,g),De=be,H+=be.duration,w++,x=0,Ft=!0}}else{if(Ue=Ue[0].match(ls),!Ue){X.warn("No matches on slow regex match for level playlist!");continue}for(ot=1;ot<Ue.length&&Ue[ot]===void 0;ot++);const Xn=(" "+Ue[ot]).slice(1),Kn=(" "+Ue[ot+1]).slice(1),ar=Ue[ot+2]?(" "+Ue[ot+2]).slice(1):null;switch(Xn){case"BYTERANGE":De?be.setByteRange(Kn,De):be.setByteRange(Kn);break;case"PROGRAM-DATE-TIME":be.rawProgramDateTime=Kn,be.tagList.push(["PROGRAM-DATE-TIME",Kn]),rt===-1&&(rt=d.length);break;case"PLAYLIST-TYPE":l.type&&di(l,Xn,Ue),l.type=Kn.toUpperCase();break;case"MEDIA-SEQUENCE":l.startSN!==0?di(l,Xn,Ue):d.length>0&&Ci(l,Xn,Ue),w=l.startSN=parseInt(Kn);break;case"SKIP":{l.skippedSegments&&di(l,Xn,Ue);const gr=new Bn(Kn,l),Tn=gr.decimalInteger("SKIPPED-SEGMENTS");if(N(Tn)){l.skippedSegments+=Tn;for(let Sr=Tn;Sr--;)d.push(null);w+=Tn}const Un=gr.enumeratedString("RECENTLY-REMOVED-DATERANGES");Un&&(l.recentlyRemovedDateranges=(l.recentlyRemovedDateranges||[]).concat(Un.split(" ")));break}case"TARGETDURATION":l.targetduration!==0&&di(l,Xn,Ue),l.targetduration=Math.max(parseInt(Kn),1);break;case"VERSION":l.version!==null&&di(l,Xn,Ue),l.version=parseInt(Kn);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":l.live||di(l,Xn,Ue),l.live=!1;break;case"#":(Kn||ar)&&be.tagList.push(ar?[Kn,ar]:[Kn]);break;case"DISCONTINUITY":P++,be.tagList.push(["DIS"]);break;case"GAP":be.gap=!0,be.tagList.push([Xn]);break;case"BITRATE":be.tagList.push([Xn,Kn]),me=parseInt(Kn)*1e3,N(me)?be.bitrate=me:me=0;break;case"DATERANGE":{const gr=new Bn(Kn,l),Tn=new dr(gr,l.dateRanges[gr.ID],l.dateRangeTagCount);l.dateRangeTagCount++,Tn.isValid||l.skippedSegments?l.dateRanges[Tn.id]=Tn:X.warn(`Ignoring invalid DATERANGE tag: "${Kn}"`),be.tagList.push(["EXT-X-DATERANGE",Kn]);break}case"DEFINE":{{const gr=new Bn(Kn,l);"IMPORT"in gr?$n(l,gr,a):jn(l,gr,t)}break}case"DISCONTINUITY-SEQUENCE":l.startCC!==0?di(l,Xn,Ue):d.length>0&&Ci(l,Xn,Ue),l.startCC=P=parseInt(Kn);break;case"KEY":{const gr=Zi(Kn,t,l);if(gr.isSupported()){if(gr.method==="NONE"){Dt=void 0;break}Dt||(Dt={}),Dt[gr.keyFormat]&&(Dt=p({},Dt)),Dt[gr.keyFormat]=gr}else X.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${Kn}"`);break}case"START":l.startTimeOffset=Wi(Kn);break;case"MAP":{const gr=new Bn(Kn,l);if(be.duration){const Tn=new We(r,u);us(Tn,gr,n,Dt),m=Tn,be.initSegment=m,m.rawProgramDateTime&&!be.rawProgramDateTime&&(be.rawProgramDateTime=m.rawProgramDateTime)}else{const Tn=be.byteRangeEndOffset;if(Tn){const Un=be.byteRangeStartOffset;Nt=`${Tn-Un}@${Un}`}else Nt=null;us(be,gr,n,Dt),m=be,Ft=!0}m.cc=P;break}case"SERVER-CONTROL":{bt&&di(l,Xn,Ue),bt=new Bn(Kn),l.canBlockReload=bt.bool("CAN-BLOCK-RELOAD"),l.canSkipUntil=bt.optionalFloat("CAN-SKIP-UNTIL",0),l.canSkipDateRanges=l.canSkipUntil>0&&bt.bool("CAN-SKIP-DATERANGES"),l.partHoldBack=bt.optionalFloat("PART-HOLD-BACK",0),l.holdBack=bt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{l.partTarget&&di(l,Xn,Ue);const gr=new Bn(Kn);l.partTarget=gr.decimalFloatingPoint("PART-TARGET");break}case"PART":{let gr=l.partList;gr||(gr=l.partList=[]);const Tn=x>0?gr[gr.length-1]:void 0,Un=x++,Sr=new Bn(Kn,l),Br=new Qe(Sr,be,u,Un,Tn);gr.push(Br),be.duration+=Br.duration;break}case"PRELOAD-HINT":{const gr=new Bn(Kn,l);l.preloadHint=gr;break}case"RENDITION-REPORT":{const gr=new Bn(Kn,l);l.renditionReports=l.renditionReports||[],l.renditionReports.push(gr);break}default:X.warn(`line parsed but not handled: ${Ue}`);break}}}De&&!De.relurl?(d.pop(),H-=De.duration,l.partList&&(l.fragmentHint=De)):l.partList&&(Ui(be,De,g),be.cc=P,l.fragmentHint=be,Dt&&fi(be,Dt,l)),l.targetduration||(l.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));const ln=d.length,Ln=d[0],_r=d[ln-1];if(H+=l.skippedSegments*l.targetduration,H>0&&ln&&_r){l.averagetargetduration=H/ln;const Yn=_r.sn;l.endSN=Yn!=="initSegment"?Yn:0,l.live||(_r.endList=!0),Ln&&l.startCC===void 0&&(l.startCC=Ln.cc),rt>0&&(zi(d,rt),Ln&&g.unshift(Ln))}else l.endSN=0,l.startCC=0;return l.fragmentHint&&(H+=l.fragmentHint.duration),l.totalduration=H,g.length&&l.dateRangeTagCount&&Ln&&bi(g,l),l.endCC=P,l}}function bi(i,e){const t=i.length;if(!t)return;const n=i[t-1],r=e.live?1/0:e.totalduration,s=Object.keys(e.dateRanges);for(let a=s.length;a--;){const o=e.dateRanges[s[a]],u=o.startDate.getTime();o.tagAnchor=n.ref;for(let l=t;l--;){const d=Gr(e,u,i,l,r);if(d!==-1){o.tagAnchor=e.fragments[d].ref;break}}}}function Gr(i,e,t,n,r){const s=t[n];if(s){const o=s.programDateTime;if(e>=o||n===0){var a;const u=(((a=t[n+1])==null?void 0:a.start)||r)-s.start;if(e<=o+u*1e3){const l=t[n].sn-i.startSN,d=i.fragments;if(d.length>t.length){const m=(t[n+1]||d[d.length-1]).sn-i.startSN;for(let w=m;w>l;w--){const x=d[w].programDateTime;if(e>=x&&e<x+d[w].duration*1e3)return w}}return l}}}return-1}function Zi(i,e,t){var n,r;const s=new Bn(i,t),a=(n=s.METHOD)!=null?n:"",o=s.URI,u=s.hexadecimalInteger("IV"),l=s.KEYFORMATVERSIONS,d=(r=s.KEYFORMAT)!=null?r:"identity";o&&s.IV&&!u&&X.error(`Invalid IV: ${s.IV}`);const g=o?li.resolve(o,e):"",m=(l||"1").split("/").map(Number).filter(Number.isFinite);return new Nr(a,g,d,m,u)}function Wi(i){const t=new Bn(i).decimalFloatingPoint("TIME-OFFSET");return N(t)?t:null}function ns(i,e){let t=(i||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(s=>mn(s,n));r.length&&(e[`${n}Codec`]=r.map(s=>s.split("/")[0]).join(","),t=t.filter(s=>r.indexOf(s)===-1))}),e.unknownCodecs=t}function Fi(i,e,t){const n=e[t];n&&(i[t]=n)}function zi(i,e){let t=i[e];for(let n=e;n--;){const r=i[n];if(!r)return;r.programDateTime=t.programDateTime-r.duration*1e3,t=r}}function Ui(i,e,t){i.rawProgramDateTime?t.push(i):e!=null&&e.programDateTime&&(i.programDateTime=e.endProgramDateTime)}function us(i,e,t,n){i.relurl=e.URI,e.BYTERANGE&&i.setByteRange(e.BYTERANGE),i.level=t,i.sn="initSegment",n&&(i.levelkeys=n),i.initSegment=null}function fi(i,e,t){i.levelkeys=e;const{encryptedFragments:n}=t;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(r=>e[r].isCommonEncryption)&&n.push(i)}function di(i,e,t){i.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function Ci(i,e,t){i.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function ai(i,e){const t=e.startPTS;if(N(t)){let n=0,r;e.sn>i.sn?(n=t-i.start,r=i):(n=i.start-t,r=e),r.duration!==n&&r.setDuration(n)}else e.sn>i.sn?i.cc===e.cc&&i.minEndPTS?e.setStart(i.start+(i.minEndPTS-i.start)):e.setStart(i.start+i.duration):e.setStart(Math.max(i.start-e.duration,0))}function Di(i,e,t,n,r,s){n-t<=0&&(X.warn("Fragment should have a positive duration",e),n=t+e.duration,s=r+e.duration);let o=t,u=n;const l=e.startPTS,d=e.endPTS;if(N(l)){const P=Math.abs(l-t);N(e.deltaPTS)?e.deltaPTS=Math.max(P,e.deltaPTS):e.deltaPTS=P,o=Math.max(t,l),t=Math.min(t,l),r=Math.min(r,e.startDTS),u=Math.min(n,d),n=Math.max(n,d),s=Math.max(s,e.endDTS)}const g=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=o,e.startDTS=r,e.endPTS=n,e.minEndPTS=u,e.endDTS=s;const m=e.sn;if(!i||m<i.startSN||m>i.endSN)return 0;let w;const x=m-i.startSN,H=i.fragments;for(H[x]=e,w=x;w>0;w--)ai(H[w],H[w-1]);for(w=x;w<H.length-1;w++)ai(H[w],H[w+1]);return i.fragmentHint&&ai(H[H.length-1],i.fragmentHint),i.PTSKnown=i.alignedSliding=!0,g}function hs(i,e){if(i===e)return;let t=null;const n=i.fragments;for(let l=n.length-1;l>=0;l--){const d=n[l].initSegment;if(d){t=d;break}}i.fragmentHint&&delete i.fragmentHint.endPTS;let r;ci(i,e,(l,d,g,m)=>{if((!e.startCC||e.skippedSegments)&&d.cc!==l.cc){const w=l.cc-d.cc;for(let x=g;x<m.length;x++)m[x].cc+=w;e.endCC=m[m.length-1].cc}N(l.startPTS)&&N(l.endPTS)&&(d.setStart(d.startPTS=l.startPTS),d.startDTS=l.startDTS,d.maxStartPTS=l.maxStartPTS,d.endPTS=l.endPTS,d.endDTS=l.endDTS,d.minEndPTS=l.minEndPTS,d.setDuration(l.endPTS-l.startPTS),d.duration&&(r=d),e.PTSKnown=e.alignedSliding=!0),l.hasStreams&&(d.elementaryStreams=l.elementaryStreams),d.loader=l.loader,l.hasStats&&(d.stats=l.stats),l.initSegment&&(d.initSegment=l.initSegment,t=l.initSegment)});const s=e.fragments,a=e.fragmentHint?s.concat(e.fragmentHint):s;if(t&&a.forEach(l=>{var d;l&&(!l.initSegment||l.initSegment.relurl===((d=t)==null?void 0:d.relurl))&&(l.initSegment=t)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(l=>!l),e.deltaUpdateFailed){X.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let l=e.skippedSegments;l--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=rs(i.dateRanges,e));const l=i.fragments.filter(d=>d.rawProgramDateTime);if(i.hasProgramDateTime&&!e.hasProgramDateTime)for(let d=1;d<a.length;d++)a[d].programDateTime===null&&Ui(a[d],a[d-1],l);bi(l,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var o;const l=ii(i,e.startSN-1);e.startCC=(o=l==null?void 0:l.cc)!=null?o:s[0].cc}gi(i.partList,e.partList,(l,d)=>{d.elementaryStreams=l.elementaryStreams,d.stats=l.stats}),r?Di(e,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):xr(i,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=i.driftStartTime,e.driftStart=i.driftStart;const u=e.advancedDateTime;if(e.advanced&&u){const l=e.edge;e.driftStart||(e.driftStartTime=u,e.driftStart=l),e.driftEndTime=u,e.driftEnd=l}else e.driftEndTime=i.driftEndTime,e.driftEnd=i.driftEnd,e.advancedDateTime=i.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=i.requestScheduled)}function rs(i,e){const{dateRanges:t,recentlyRemovedDateranges:n}=e,r=p({},i);n&&n.forEach(o=>{delete r[o]});const a=Object.keys(r).length;return a&&Object.keys(t).forEach(o=>{const u=r[o],l=new dr(t[o].attr,u);l.isValid?(r[o]=l,u||(l.tagOrder+=a)):X.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${Lt(t[o].attr)}"`)}),r}function gi(i,e,t){if(i&&e){let n=0;for(let r=0,s=i.length;r<=s;r++){const a=i[r],o=e[r+n];a&&o&&a.index===o.index&&a.fragment.sn===o.fragment.sn?t(a,o):n--}}}function ci(i,e,t){const n=e.skippedSegments,r=Math.max(i.startSN,e.startSN)-e.startSN,s=(i.fragmentHint?1:0)+(n?e.endSN:Math.min(i.endSN,e.endSN))-e.startSN,a=e.startSN-i.startSN,o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,u=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments;for(let l=r;l<=s;l++){const d=u[a+l];let g=o[l];if(n&&!g&&d&&(g=e.fragments[l]=d),d&&g){if(t(d,g,l,o),d.url&&d.url!==g.url){e.playlistParsingError=Dr(`media sequence mismatch ${g.sn}:`,i,e,d,g);return}else if(d.cc!==g.cc){e.playlistParsingError=Dr(`discontinuity sequence mismatch (${d.cc}!=${g.cc})`,i,e,d,g);return}}}}function Dr(i,e,t,n,r){return new Error(`${i} ${r.url}
|
|
Playlist starting @${e.startSN}
|
|
${e.m3u8}
|
|
|
|
Playlist starting @${t.startSN}
|
|
${t.m3u8}`)}function xr(i,e,t=!0){const n=e.startSN+e.skippedSegments-i.startSN,r=i.fragments,s=n>=0;let a=0;if(s&&n<r.length)a=r[n].start;else if(s&&e.startSN===i.endSN+1)a=i.fragmentEnd;else if(s&&t)a=i.fragmentStart+n*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)a=i.fragmentStart;else return;Hr(e,a)}function Hr(i,e){if(e){const t=i.fragments;for(let n=i.skippedSegments;n<t.length;n++)t[n].addStart(e);i.fragmentHint&&i.fragmentHint.addStart(e)}}function ni(i,e=1/0){let t=1e3*i.targetduration;if(i.updated){const n=i.fragments;if(n.length&&t*4>e){const s=n[n.length-1].duration*1e3;s<t&&(t=s)}}else t/=2;return Math.round(t)}function ii(i,e,t){if(!i)return null;let n=i.fragments[e-i.startSN];return n||(n=i.fragmentHint,n&&n.sn===e)?n:e<i.startSN&&t&&t.sn===e?t:null}function qr(i,e,t){return i?xi(i.partList,e,t):null}function xi(i,e,t){if(i)for(let n=i.length;n--;){const r=i[n];if(r.index===t&&r.fragment.sn===e)return r}return null}function Si(i){i.forEach((e,t)=>{var n;(n=e.details)==null||n.fragments.forEach(r=>{r.level=t,r.initSegment&&(r.initSegment.level=t)})})}function Ti(i,e){for(let n=0,r=i.length;n<r;n++){var t;if(((t=i[n])==null?void 0:t.cc)===e)return i[n]}return null}function Vr(i,e){return!!(i&&e.startCC<i.endCC&&e.endCC>i.startCC)}function mi(i,e){if(i){const t=i.start+e;i.start=i.startPTS=t,i.endPTS=t+i.duration}}function Ni(i,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)mi(t[n],i);e.fragmentHint&&mi(e.fragmentHint,i),e.alignedSliding=!0}function Hi(i,e){i&&(is(e,i),!e.alignedSliding&&i&&gs(e,i),!e.alignedSliding&&i&&!e.skippedSegments&&xr(i,e,!1))}function is(i,e){if(!Vr(e,i))return;const t=Math.min(e.endCC,i.endCC),n=Ti(e.fragments,t),r=Ti(i.fragments,t);if(!n||!r)return;X.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const s=n.start-r.start;Ni(s,i)}function gs(i,e){if(!i.hasProgramDateTime||!e.hasProgramDateTime)return;const t=i.fragments,n=e.fragments;if(!t.length||!n.length)return;let r,s;const a=Math.min(e.endCC,i.endCC);e.startCC<a&&i.startCC<a&&(r=Ti(n,a),s=Ti(t,a)),(!r||!s)&&(r=n[Math.floor(n.length/2)],s=Ti(t,r.cc)||t[Math.floor(t.length/2)]);const o=r.programDateTime,u=s.programDateTime;if(!o||!u)return;const l=(u-o)/1e3-(s.start-r.start);Ni(l,i)}const si={toString:function(i){let e="";const t=i.length;for(let n=0;n<t;n++)e+=`[${i.start(n).toFixed(3)}-${i.end(n).toFixed(3)}]`;return e}},Zt={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 zr extends On{constructor(e,t,n,r,s){super(r,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=Zt.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:a,fragCurrent:o,media:u,mediaBuffer:l,state:d}=this,g=u?u.currentTime:0,m=En.bufferInfo(l||u,g,a.maxBufferHole);if(this.log(`media seeking to ${N(g)?g.toFixed(3):g}, state: ${d}`),this.state===Zt.ENDED)this.resetLoadingState();else if(o){const w=a.maxFragLookUpTolerance,x=o.start-w,H=o.start+o.duration+w;if(!m.len||H<m.start||x>m.end){const P=g>H;(g<x||P)&&(P&&o.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),o.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(u){this.fragmentTracker.removeFragmentsInRange(g,1/0,this.playlistType,!0);const w=this.lastCurrentTime;if(g>w&&(this.lastCurrentTime=g),!this.loadingParts){const x=Math.max(m.end,g),H=this.shouldLoadParts(this.getLevelDetails(),x);H&&(this.log(`LL-Part loading ON after seeking to ${g.toFixed(2)} with buffer @${x.toFixed(2)}`),this.loadingParts=H)}}!this.hls.hasEnoughToStart&&!m.len&&(this.log(`setting startPosition to ${g} because of seek before start`),this.nextLoadPosition=this.startPosition=g),this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=s,this.hls=e,this.fragmentLoader=new qt(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new At(e.config)}registerListeners(){const{hls:e}=this;e.on(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(h.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(h.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===Zt.STOPPED)return;this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Zt.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return t===-1&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const n=e.end||0,r=this.config.timelineOffset||0;if(n<=r)return!1;const s=e.buffered;this.config.maxBufferHole&&s&&s.length>1&&(e=En.bufferedInfo(s,e.start,0));const a=e.nextStart;if(a&&a>r&&a<t.edge||this.media.currentTime<e.start)return!1;const u=t.partList;if(u!=null&&u.length){const d=u[u.length-1];return En.isBuffered(this.media,d.start+d.duration/2)}const l=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(l)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levelLastLoaded)==null?void 0:e.details}}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;n.removeEventListener("seeking",this.onMediaSeeking),n.removeEventListener("ended",this.onMediaEnded),n.addEventListener("seeking",this.onMediaSeeking),n.addEventListener("ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===Zt.STOPPED&&this.startLoad(r.startPosition)}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(r!==null){if(r.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),r.removeEventListener("seeking",this.onMediaSeeking),r.removeEventListener("ended",this.onMediaEnded),this.keyLoader&&!n&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,n){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=Zt.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,n){this.startFragRequested=!0,this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){const r=s=>{const a=s.frag;if(this.fragContextChanged(a)){this.warn(`${a.type} sn: ${a.sn}${s.part?" part: "+s.part.index:""} of ${this.fragInfo(a,!1,s.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(a);return}a.stats.chunkCount++,this._handleFragmentLoadProgress(s)};this._doFragLoad(e,t,n,r).then(s=>{if(!s)return;const a=this.state,o=s.frag;if(this.fragContextChanged(o)){(a===Zt.FRAG_LOADING||!this.fragCurrent&&a===Zt.PARSING)&&(this.fragmentTracker.removeFragment(o),this.state=Zt.IDLE);return}"payload"in s&&(this.log(`Loaded ${o.type} sn: ${o.sn} of ${this.playlistLabel()} ${o.level}`),this.hls.trigger(h.FRAG_LOADED,s)),this._handleFragmentLoadComplete(s)}).catch(s=>{this.state===Zt.STOPPED||this.state===Zt.ERROR||(this.warn(`Frag error: ${(s==null?void 0:s.message)||s}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===Oe.APPENDING){const s=e.type,a=this.getFwdBufferInfo(this.mediaBuffer,s),o=Math.max(e.duration,a?a.len:this.config.maxBufferLength),u=this.backtrackFragment;((u?e.sn-u.sn:0)===1||this.reduceMaxBufferLength(o,e.duration))&&n.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===Oe.PARTIAL&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const r={startOffset:e,endOffset:t,type:n};this.hls.trigger(h.BUFFER_FLUSHING,r)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(n=>{const r=n==null?void 0:n.frag;if(!r||this.fragContextChanged(r)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:r}=this,{frag:s,payload:a}=n,o=s.decryptdata;if(a&&a.byteLength>0&&o!=null&&o.key&&o.iv&&Kr(o.method)){const u=self.performance.now();return this.decrypter.decrypt(new Uint8Array(a),o.key.buffer,o.iv.buffer,Ai(o.method)).catch(l=>{throw r.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:s}),l}).then(l=>{const d=self.performance.now();return r.trigger(h.FRAG_DECRYPTED,{frag:s,payload:l,stats:{tstart:u,tdecrypt:d}}),n.payload=l,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===Zt.STOPPED||this.state===Zt.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const n=e.frag.stats;this.state!==Zt.STOPPED&&(this.state=Zt.IDLE),e.frag.data=new Uint8Array(e.payload),n.parsing.start=n.buffering.start=self.performance.now(),n.parsing.end=n.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const n=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${n?si.toString(En.getBuffered(n)):"(detached)"})`),de(e)){var r;if(e.type!==ie.SUBTITLE){const a=e.elementaryStreams;if(!Object.keys(a).some(o=>!!a[o])){this.state=Zt.IDLE;return}}const s=(r=this.levels)==null?void 0:r[e.level];s!=null&&s.fragmentError&&(this.log(`Resetting level fragment error count of ${s.fragmentError} on frag buffered`),s.fragmentError=0)}this.state=Zt.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:r,partsLoaded:s}=e,a=!s||s.length===0||s.some(u=>!u),o=new hn(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);t.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,r){var s;this.fragCurrent=e;const a=t==null?void 0:t.details;if(!this.levels||!a)throw new Error(`frag load aborted, missing level${a?"":" detail"}s`);let o=null;e.encrypted&&!((s=e.decryptdata)!=null&&s.key)?(this.log(`Loading key for ${e.sn} of [${a.startSN}-${a.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=Zt.KEY_LOADING,this.fragCurrent=e,o=this.keyLoader.load(e).then(g=>{if(!this.fragContextChanged(g.frag))return this.hls.trigger(h.KEY_LOADED,g),this.state===Zt.KEY_LOADING&&(this.state=Zt.IDLE),g}),this.hls.trigger(h.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):e.encrypted||(o=this.keyLoader.loadClear(e,a.encryptedFragments),o&&this.log("[eme] blocking frag load until media-keys acquired"));const u=this.fragPrevious;if(de(e)&&(!u||e.sn!==u.sn)){const g=this.shouldLoadParts(t.details,e.end);g!==this.loadingParts&&(this.log(`LL-Part loading ${g?"ON":"OFF"} loading sn ${u==null?void 0:u.sn}->${e.sn}`),this.loadingParts=g)}if(n=Math.max(e.start,n||0),this.loadingParts&&de(e)){const g=a.partList;if(g&&r){n>e.end&&a.fragmentHint&&(e=a.fragmentHint);const m=this.getNextPart(g,e,n);if(m>-1){const w=g[m];e=this.fragCurrent=w.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${w.index} (${m}/${g.length-1}) of ${this.fragInfo(e,!1,w)}) cc: ${e.cc} [${a.startSN}-${a.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=w.start+w.duration,this.state=Zt.FRAG_LOADING;let x;return o?x=o.then(H=>!H||this.fragContextChanged(H.frag)?null:this.doFragPartsLoad(e,w,t,r)).catch(H=>this.handleFragLoadError(H)):x=this.doFragPartsLoad(e,w,t,r).catch(H=>this.handleFragLoadError(H)),this.hls.trigger(h.FRAG_LOADING,{frag:e,part:w,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):x}else if(!e.url||this.loadedEndOfParts(g,n))return Promise.resolve(null)}}if(de(e)&&this.loadingParts)this.log(`LL-Part loading OFF after next part miss @${n.toFixed(2)}`),this.loadingParts=!1;else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${a?"["+a.startSN+"-"+a.endSN+"]":""}, target: ${parseFloat(n.toFixed(3))}`),N(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Zt.FRAG_LOADING;const l=this.config.progressive;let d;return l&&o?d=o.then(g=>!g||this.fragContextChanged(g==null?void 0:g.frag)?null:this.fragmentLoader.load(e,r)).catch(g=>this.handleFragLoadError(g)):d=Promise.all([this.fragmentLoader.load(e,l?r:void 0),o]).then(([g])=>(!l&&g&&r&&r(g),g)).catch(g=>this.handleFragLoadError(g)),this.hls.trigger(h.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):d}doFragPartsLoad(e,t,n,r){return new Promise((s,a)=>{var o;const u=[],l=(o=n.details)==null?void 0:o.partList,d=g=>{this.fragmentLoader.loadPart(e,g,r).then(m=>{u[g.index]=m;const w=m.part;this.hls.trigger(h.FRAG_LOADED,m);const x=qr(n.details,e.sn,g.index+1)||xi(l,e.sn,g.index+1);if(x)d(x);else return s({frag:e,part:w,partsLoaded:u})}).catch(a)};d(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===Q.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(h.ERROR,t)}else this.hls.trigger(h.ERROR,{type:le.OTHER_ERROR,details:Q.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Zt.PARSING){!this.fragCurrent&&this.state!==Zt.STOPPED&&this.state!==Zt.ERROR&&(this.state=Zt.IDLE);return}const{frag:n,part:r,level:s}=t,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a);const o=this.getLevelDetails(),l=o&&n.sn>o.endSN||this.shouldLoadParts(o,n.end);l!==this.loadingParts&&(this.log(`LL-Part loading ${l?"ON":"OFF"} after parsing segment ending @${n.end.toFixed(2)}`),this.loadingParts=l),this.updateLevelTiming(n,r,s,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e!=null&&e.partList){var n;const s=e.partList[0],a=s.end+(((n=e.fragmentHint)==null?void 0:n.duration)||0);if(t>=a){var r;if((this.hls.hasEnoughToStart?((r=this.media)==null?void 0:r.currentTime)||this.lastCurrentTime:this.getLoadPosition())>s.start-s.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:r,sn:s,part:a}=e;if(!(t!=null&&t[r]))return this.warn(`Levels object was unset while buffering fragment ${s} of ${this.playlistLabel()} ${r}. The current chunk will not be buffered.`),null;const o=t[r],u=o.details,l=a>-1?qr(u,s,a):null,d=l?l.fragment:ii(u,s,n);return d?(n&&n!==d&&(d.stats=n.stats),{frag:d,part:l,level:o}):null}bufferFragmentData(e,t,n,r,s){var a;if(!e||this.state!==Zt.PARSING)return;const{data1:o,data2:u}=e;let l=o;if(o&&u&&(l=Ne(o,u)),!((a=l)!=null&&a.length))return;const d={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:l};if(this.hls.trigger(h.BUFFER_APPENDING,d),e.dropped&&e.independent&&!n){if(s)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!En.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=En.bufferInfo(t,n,0),s=e.duration,a=Math.min(this.config.maxFragLookUpTolerance*2,s*.25),o=Math.max(Math.min(e.start-a,r.end-a),n+a);e.start-o>a&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){var n;const r=this.getLoadPosition();if(!N(r))return null;const a=this.lastCurrentTime>r||(n=this.media)!=null&&n.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,r,t,a)}getFwdBufferInfoAtPos(e,t,n,r){const s=En.bufferInfo(e,t,r);if(s.len===0&&s.nextStart!==void 0){const a=this.fragmentTracker.getBufferedFrag(t,n);if(a&&(s.nextStart<=a.end||a.gap)){const o=Math.max(Math.min(s.nextStart,a.end)-t,r);return En.bufferInfo(e,t,o)}}return s}getMaxBufferLength(e){const{config:t}=this;let n;return e?n=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):n=t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const n=this.config,r=Math.max(Math.min(e-t,n.maxBufferLength),t),s=Math.max(e-t*3,n.maxMaxBufferLength/2,r);return s>=r?(n.maxMaxBufferLength=s,this.warn(`Reduce max buffer length to ${s}s`),!0):!1}getAppendedFrag(e,t=ie.MAIN){var n;const r=(n=this.fragmentTracker)==null?void 0:n.getAppendedFrag(e,t);return r&&"fragment"in r?r.fragment:r}getNextFragment(e,t){const n=t.fragments,r=n.length;if(!r)return null;const{config:s}=this,a=n[0].start,o=s.lowLatencyMode&&!!t.partList;let u=null;if(t.live){const g=s.initialLiveManifestSize;if(r<g)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${g})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<a){var l;o&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),u=this.getInitialLiveFragment(t);const m=this.hls.startPosition,w=this.hls.liveSyncPosition,x=u?(m!==-1&&m>=a?m:w)||u.start:e;this.log(`Setting startPosition to ${x} to match start frag at live edge. mainStart: ${m} liveSyncPosition: ${w} frag.start: ${(l=u)==null?void 0:l.start}`),this.startPosition=this.nextLoadPosition=x}}else e<=a&&(u=n[0]);if(!u){const g=this.loadingParts?t.partEnd:t.fragmentEnd;u=this.getFragmentAtPosition(e,g,t)}let d=this.filterReplacedPrimary(u,t);if(!d&&u){const g=u.sn-t.startSN;d=this.filterReplacedPrimary(n[g+1]||null,t)}return this.mapToInitFragWhenRequired(d)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===Oe.OK||n===Oe.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,r,s){let a=null;if(e.gap&&(a=this.getNextFragment(this.nextLoadPosition,t),a&&!a.gap&&n.nextStart)){const o=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r,0);if(o!==null&&n.len+o.len>=s){const u=a.sn;return this.loopSn!==u&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${u}`),this.loopSn=u),null}}return this.loopSn=void 0,a}get primaryPrefetch(){if(pi(this.hls.config)){var e,t;if((e=this.hls.interstitialsManager)==null||(t=e.playingItem)==null?void 0:t.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(pi(this.hls.config)&&e.type!==ie.SUBTITLE){const n=this.hls.interstitialsManager,r=n==null?void 0:n.bufferingItem;if(r){const a=r.event;if(a){if(a.appendInPlace||Math.abs(e.start-r.start)>1||r.start===0)return null}else if(e.end<=r.start&&(t==null?void 0:t.live)===!1||e.start>r.end&&r.nextEvent&&(r.nextEvent.appendInPlace||e.start-r.end>1))return null}const s=n==null?void 0:n.playerQueue;if(s)for(let a=s.length;a--;){const o=s[a].interstitial;if(o.appendInPlace&&e.start>=o.startTime&&e.end<=o.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,n){let r=-1,s=!1,a=!0;for(let o=0,u=e.length;o<u;o++){const l=e[o];if(a=a&&!l.independent,r>-1&&n<l.start)break;const d=l.loaded;d?r=-1:(s||l.independent||a)&&l.fragment===t&&(r=o),s=d}return r}loadedEndOfParts(e,t){const n=e[e.length-1];return n&&t>n.start&&n.loaded}getInitialLiveFragment(e){const t=e.fragments,n=this.fragPrevious;let r=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),r=nt(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){const s=n.sn+1;if(s>=e.startSN&&s<=e.endSN){const a=t[s-e.startSN];n.cc===a.cc&&(r=a,this.log(`Live playlist, switching playlist, load frag with next SN: ${r.sn}`))}r||(r=he(e,n.cc,n.end),r&&this.log(`Live playlist, switching playlist, load frag with same CC: ${r.sn}`))}}else{const s=this.hls.liveSyncPosition;s!==null&&(r=this.getFragmentAtPosition(s,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r}getFragmentAtPosition(e,t,n){const{config:r}=this;let{fragPrevious:s}=this,{fragments:a,endSN:o}=n;const{fragmentHint:u}=n,{maxFragLookUpTolerance:l}=r,d=n.partList,g=!!(this.loadingParts&&d!=null&&d.length&&u);g&&u&&!this.bitrateTest&&d[d.length-1].fragment.sn===u.sn&&(a=a.concat(u),o=u.sn);let m;if(e<t){var w;const H=e<this.lastCurrentTime||e>t-l||(w=this.media)!=null&&w.paused||!this.startFragRequested?0:l;m=cn(s,a,e,H)}else m=a[a.length-1];if(m){const x=m.sn-n.startSN,H=this.fragmentTracker.getState(m);if((H===Oe.OK||H===Oe.PARTIAL&&m.gap)&&(s=m),s&&m.sn===s.sn&&(!g||d[0].fragment.sn>m.sn||!n.live&&!g)&&s&&m.level===s.level){const me=a[x+1];m.sn<o&&this.fragmentTracker.getState(me)!==Oe.OK?m=me:m=null}}return m}alignPlaylists(e,t,n){const r=e.fragments.length;if(!r)return this.warn("No fragments in live playlist"),0;const s=e.fragmentStart,a=!t,o=e.alignedSliding&&N(s);if(a||!o&&!s){Hi(n,e);const u=e.fragmentStart;return this.log(`Live playlist sliding: ${u.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${r}`),u}return s}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let n=this.startPosition;n<t&&(n=-1);const r=this.timelineOffset;if(n===-1){const s=this.startTimeOffset!==null,a=s?this.startTimeOffset:e.startTimeOffset;a!==null&&N(a)?(n=t+a,a<0&&(n+=e.edge),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Setting startPosition to ${n} for start time offset ${a} found in ${s?"multivariant":"media"} playlist`),this.startPosition=n):e.live?(n=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${n}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=n=0),this.lastCurrentTime=n+r}this.nextLoadPosition=n+r}getLoadPosition(){var e;const{media:t}=this;let n=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?n=t.currentTime:this.nextLoadPosition>=0&&(n=this.nextLoadPosition),n}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&de(e)&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==Zt.FRAG_LOADING_WAITING_RETRY)&&(this.state=Zt.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const x=this.getCurrentContext(t.chunkMeta);x&&(t.frag=x.frag)}const n=t.frag;if(!n||n.type!==e||!this.levels)return;if(this.fragContextChanged(n)){var r;this.warn(`Frag load error must match current frag to retry ${n.url} > ${(r=this.fragCurrent)==null?void 0:r.url}`);return}const s=t.details===Q.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(n,!0);const a=t.errorAction,{action:o,flags:u,retryCount:l=0,retryConfig:d}=a||{},g=!!a&&!!d,m=g&&o===St.RetryRequest,w=g&&!a.resolved&&u===Tt.MoveAllAlternatesMatchingHost;if(!m&&w&&de(n)&&!n.endList)this.resetFragmentErrors(e),this.treatAsGap(n),a.resolved=!0;else if((m||w)&&l<d.maxNumRetry){this.resetStartWhenNotLoaded(this.levelLastLoaded);const x=ze(d,l);this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${t.details}, retrying loading ${l+1}/${d.maxNumRetry} in ${x}ms`),a.resolved=!0,this.retryDate=self.performance.now()+x,this.state=Zt.FRAG_LOADING_WAITING_RETRY}else if(d&&a)if(this.resetFragmentErrors(e),l<d.maxNumRetry)!s&&o!==St.RemoveAlternatePermanently&&(a.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${l})`);return}else o===St.SendAlternateToPenaltyBox?this.state=Zt.WAITING_LEVEL:this.state=Zt.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===Zt.PARSING||this.state===Zt.PARSED){const t=e.frag,n=e.parent,r=this.getFwdBufferInfo(this.mediaBuffer,n),s=r&&r.len>.5;s&&this.reduceMaxBufferLength(r.len,(t==null?void 0:t.duration)||10);const a=!s;return a&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${n} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),a}return!1}resetFragmentErrors(e){e===ie.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Zt.STOPPED&&(this.state=Zt.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=En.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===Zt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Zt.STOPPED&&(this.state=Zt.IDLE)}resetStartWhenNotLoaded(e){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const t=e?e.details:null;t!=null&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of ${this.playlistLabel()} ${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,n,r){const s=n.details;if(!s){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((u,l)=>{const d=e.elementaryStreams[l];if(d){const g=d.endPTS-d.startPTS;if(g<=0)return this.warn(`Could not parse fragment ${e.sn} ${l} duration reliably (${g})`),u||!1;const m=r?0:Di(s,e,d.startPTS,d.endPTS,d.startDTS,d.endDTS);return this.hls.trigger(h.LEVEL_PTS_UPDATED,{details:s,level:n,drift:m,type:l,frag:e,start:d.startPTS,end:d.endPTS}),!0}return u},!1)){var o;if(n.fragmentError===0&&this.treatAsGap(e,n),((o=this.transmuxer)==null?void 0:o.error)===null){const u=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(u.message),this.hls.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.FRAG_PARSING_ERROR,fatal:!1,error:u,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=Zt.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(h.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===ie.MAIN?"level":"track"}fragInfo(e,t=!0,n){var r,s;return`${this.playlistLabel()} ${e.level} (${n?"part":"frag"}:[${((r=t&&!n?e.startPTS:(n||e).start)!=null?r:NaN).toFixed(3)}-${((s=t&&!n?e.endPTS:(n||e).end)!=null?s:NaN).toFixed(3)}]${n&&e.type==="main"?"INDEPENDENT="+(n.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function pi(i){return!!i.interstitialsController&&i.enableInterstitialPlayback!==!1}class hi{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let n;if(e.length)e.length===1?n=e[0]:n=ki(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function ki(i,e){const t=new Uint8Array(e);let n=0;for(let r=0;r<i.length;r++){const s=i[r];t.set(s,n),n+=s.length}return t}var cs={exports:{}},Bs;function Qs(){return Bs||(Bs=1,function(i){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(u,l,d){this.fn=u,this.context=l,this.once=d||!1}function s(u,l,d,g,m){if(typeof d!="function")throw new TypeError("The listener must be a function");var w=new r(d,g||u,m),x=t?t+l:l;return u._events[x]?u._events[x].fn?u._events[x]=[u._events[x],w]:u._events[x].push(w):(u._events[x]=w,u._eventsCount++),u}function a(u,l){--u._eventsCount===0?u._events=new n:delete u._events[l]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var l=[],d,g;if(this._eventsCount===0)return l;for(g in d=this._events)e.call(d,g)&&l.push(t?g.slice(1):g);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(d)):l},o.prototype.listeners=function(l){var d=t?t+l:l,g=this._events[d];if(!g)return[];if(g.fn)return[g.fn];for(var m=0,w=g.length,x=new Array(w);m<w;m++)x[m]=g[m].fn;return x},o.prototype.listenerCount=function(l){var d=t?t+l:l,g=this._events[d];return g?g.fn?1:g.length:0},o.prototype.emit=function(l,d,g,m,w,x){var H=t?t+l:l;if(!this._events[H])return!1;var P=this._events[H],me=arguments.length,De,be;if(P.fn){switch(P.once&&this.removeListener(l,P.fn,void 0,!0),me){case 1:return P.fn.call(P.context),!0;case 2:return P.fn.call(P.context,d),!0;case 3:return P.fn.call(P.context,d,g),!0;case 4:return P.fn.call(P.context,d,g,m),!0;case 5:return P.fn.call(P.context,d,g,m,w),!0;case 6:return P.fn.call(P.context,d,g,m,w,x),!0}for(be=1,De=new Array(me-1);be<me;be++)De[be-1]=arguments[be];P.fn.apply(P.context,De)}else{var Ue=P.length,ot;for(be=0;be<Ue;be++)switch(P[be].once&&this.removeListener(l,P[be].fn,void 0,!0),me){case 1:P[be].fn.call(P[be].context);break;case 2:P[be].fn.call(P[be].context,d);break;case 3:P[be].fn.call(P[be].context,d,g);break;case 4:P[be].fn.call(P[be].context,d,g,m);break;default:if(!De)for(ot=1,De=new Array(me-1);ot<me;ot++)De[ot-1]=arguments[ot];P[be].fn.apply(P[be].context,De)}}return!0},o.prototype.on=function(l,d,g){return s(this,l,d,g,!1)},o.prototype.once=function(l,d,g){return s(this,l,d,g,!0)},o.prototype.removeListener=function(l,d,g,m){var w=t?t+l:l;if(!this._events[w])return this;if(!d)return a(this,w),this;var x=this._events[w];if(x.fn)x.fn===d&&(!m||x.once)&&(!g||x.context===g)&&a(this,w);else{for(var H=0,P=[],me=x.length;H<me;H++)(x[H].fn!==d||m&&!x[H].once||g&&x[H].context!==g)&&P.push(x[H]);P.length?this._events[w]=P.length===1?P[0]:P:a(this,w)}return this},o.prototype.removeAllListeners=function(l){var d;return l?(d=t?t+l:l,this._events[d]&&a(this,d)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=t,o.EventEmitter=o,i.exports=o}(cs)),cs.exports}var fs=Qs(),ss=K(fs);const ji="1.6.5",Ri={};function xa(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Sa(){const i=Ri[ji];if(i)return i.clientCount++,i;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),r={worker:new self.Worker(t),objectURL:t,clientCount:1};return Ri[ji]=r,r}function Ta(i){const e=Ri[i];if(e)return e.clientCount++,e;const t=new self.URL(i,self.location.href).href,r={worker:new self.Worker(t),scriptURL:t,clientCount:1};return Ri[i]=r,r}function Ia(i){const e=Ri[i||ji];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete Ri[i||ji],r&&self.URL.revokeObjectURL(r),n.terminate()}}function Fa(i,e){return e+10<=i.length&&i[e]===51&&i[e+1]===68&&i[e+2]===73&&i[e+3]<255&&i[e+4]<255&&i[e+6]<128&&i[e+7]<128&&i[e+8]<128&&i[e+9]<128}function oa(i,e){return e+10<=i.length&&i[e]===73&&i[e+1]===68&&i[e+2]===51&&i[e+3]<255&&i[e+4]<255&&i[e+6]<128&&i[e+7]<128&&i[e+8]<128&&i[e+9]<128}function Ms(i,e){let t=0;return t=(i[e]&127)<<21,t|=(i[e+1]&127)<<14,t|=(i[e+2]&127)<<7,t|=i[e+3]&127,t}function Ki(i,e){const t=e;let n=0;for(;oa(i,e);){n+=10;const r=Ms(i,e+6);n+=r,Fa(i,e+10)&&(n+=10),e+=n}if(n>0)return i.subarray(t,t+n)}function Ns(i,e,t,n){const r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],s=e[t+2],a=s>>2&15;if(a>12){const w=new Error(`invalid ADTS sampling index:${a}`);i.emit(h.ERROR,h.ERROR,{type:le.MEDIA_ERROR,details:Q.FRAG_PARSING_ERROR,fatal:!0,error:w,reason:w.message});return}const o=(s>>6&3)+1,u=e[t+3]>>6&3|(s&1)<<2,l="mp4a.40."+o,d=r[a];let g=a;(o===5||o===29)&&(g-=3);const m=[o<<3|(g&14)>>1,(g&1)<<7|u<<3];return X.log(`manifest codec:${n}, parsed codec:${l}, channels:${u}, rate:${d} (ADTS object type:${o} sampling index:${a})`),{config:m,samplerate:d,channelCount:u,codec:l,parsedCodec:l,manifestCodec:n}}function Hs(i,e){return i[e]===255&&(i[e+1]&246)===240}function ps(i,e){return i[e+1]&1?7:9}function Ks(i,e){return(i[e+3]&3)<<11|i[e+4]<<3|(i[e+5]&224)>>>5}function Da(i,e){return e+5<i.length}function Fs(i,e){return e+1<i.length&&Hs(i,e)}function Ra(i,e){return Da(i,e)&&Hs(i,e)&&Ks(i,e)<=i.length-e}function Gs(i,e){if(Fs(i,e)){const t=ps(i,e);if(e+t>=i.length)return!1;const n=Ks(i,e);if(n<=t)return!1;const r=e+n;return r===i.length||Fs(i,r)}return!1}function Aa(i,e,t,n,r){if(!i.samplerate){const s=Ns(e,t,n,r);if(!s)return;p(i,s)}}function $s(i){return 1024*9e4/i}function La(i,e){const t=ps(i,e);if(e+t<=i.length){const n=Ks(i,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function Vs(i,e,t,n,r){const s=$s(i.samplerate),a=n+r*s,o=La(e,t);let u;if(o){const{frameLength:g,headerLength:m}=o,w=m+g,x=Math.max(0,t+w-e.length);x?(u=new Uint8Array(w-m),u.set(e.subarray(t+m,e.length),0)):u=e.subarray(t+m,t+w);const H={unit:u,pts:a};return x||i.samples.push(H),{sample:H,length:w,missing:x}}const l=e.length-t;return u=new Uint8Array(l),u.set(e.subarray(t,e.length),0),{sample:{unit:u,pts:a},length:l,missing:-1}}function Ds(i,e){return oa(i,e)&&Ms(i,e+6)+10<=i.length-e}function po(i){return i instanceof ArrayBuffer?i:i.byteOffset==0&&i.byteLength==i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer}function Or(i,e=0,t=1/0){return Qr(i,e,t,Uint8Array)}function Qr(i,e,t,n){const r=vi(i);let s=1;"BYTES_PER_ELEMENT"in n&&(s=n.BYTES_PER_ELEMENT);const a=Ii(i)?i.byteOffset:0,o=(a+i.byteLength)/s,u=(a+e)/s,l=Math.floor(Math.max(0,Math.min(u,o))),d=Math.floor(Math.min(l+Math.max(t,0),o));return new n(r,l,d-l)}function vi(i){return i instanceof ArrayBuffer?i:i.buffer}function Ii(i){return i&&i.buffer instanceof ArrayBuffer&&i.byteLength!==void 0&&i.byteOffset!==void 0}function _i(i){const e={key:i.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(i.size<2)return;if(i.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const n=i.data.subarray(1).indexOf(0);if(n===-1)return;const r=_e(Or(i.data,1,n)),s=i.data[2+n],a=i.data.subarray(3+n).indexOf(0);if(a===-1)return;const o=_e(Or(i.data,3+n,a));let u;return r==="-->"?u=_e(Or(i.data,4+n+a)):u=po(i.data.subarray(4+n+a)),e.mimeType=r,e.pictureType=s,e.description=o,e.data=u,e}function bs(i){if(i.size<2)return;const e=_e(i.data,!0),t=new Uint8Array(i.data.subarray(e.length+1));return{key:i.type,info:e,data:t.buffer}}function ms(i){if(i.size<2)return;if(i.type==="TXXX"){let t=1;const n=_e(i.data.subarray(t),!0);t+=n.length+1;const r=_e(i.data.subarray(t));return{key:i.type,info:n,data:r}}const e=_e(i.data.subarray(1));return{key:i.type,info:"",data:e}}function vs(i){if(i.type==="WXXX"){if(i.size<2)return;let t=1;const n=_e(i.data.subarray(t),!0);t+=n.length+1;const r=_e(i.data.subarray(t));return{key:i.type,info:n,data:r}}const e=_e(i.data);return{key:i.type,info:"",data:e}}function Rs(i){return i.type==="PRIV"?bs(i):i.type[0]==="W"?vs(i):i.type==="APIC"?_i(i):ms(i)}function la(i){const e=String.fromCharCode(i[0],i[1],i[2],i[3]),t=Ms(i,4),n=10;return{type:e,size:t,data:i.subarray(n,n+t)}}const Ua=10,wl=10;function pA(i){let e=0;const t=[];for(;oa(i,e);){const n=Ms(i,e+6);i[e+5]>>6&1&&(e+=Ua),e+=Ua;const r=e+n;for(;e+wl<r;){const s=la(i.subarray(e)),a=Rs(s);a&&t.push(a),e+=s.size+Ua}Fa(i,e)&&(e+=Ua)}return t}function mA(i){return i&&i.key==="PRIV"&&i.info==="com.apple.streaming.transportStreamTimestamp"}function ka(i){if(i.data.byteLength===8){const e=new Uint8Array(i.data),t=e[3]&1;let n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,t&&(n+=4772185884e-2),Math.round(n)}}function mo(i){const e=pA(i);for(let t=0;t<e.length;t++){const n=e[t];if(mA(n))return ka(n)}}let Gi=function(i){return i.audioId3="org.id3",i.dateRange="com.apple.quicktime.HLS",i.emsg="https://aomedia.org/emsg/ID3",i.misbklv="urn:misb:KLV:bin:1910.1",i}({});function as(i="",e=9e4){return{type:i,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class vo{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,n){}demux(e,t){this.cachedData&&(e=Ne(this.cachedData,e),this.cachedData=null);let n=Ki(e,0),r=n?n.length:0,s;const a=this._audioTrack,o=this._id3Track,u=n?mo(n):void 0,l=e.length;for((this.basePTS===null||this.frameIndex===0&&N(u))&&(this.basePTS=Bl(u,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Gi.audioId3,duration:Number.POSITIVE_INFINITY});r<l;){if(this.canParse(e,r)){const d=this.appendFrame(a,e,r);d?(this.frameIndex++,this.lastPTS=d.sample.pts,r+=d.length,s=r):r=l}else Ds(e,r)?(n=Ki(e,r),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Gi.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,s=r):r++;if(r===l&&s!==l){const d=e.slice(s);this.cachedData?this.cachedData=Ne(this.cachedData,d):this.cachedData=d}}return{audioTrack:a,videoTrack:as(),id3Track:o,textTrack:as()}}demuxSampleAes(e,t,n){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:as(),id3Track:this._id3Track,textTrack:as()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const Bl=(i,e,t)=>{if(N(i))return i*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let Zs=null;const Oa=[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],bl=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Cl=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],xl=[0,1,1,4];function vA(i,e,t,n,r){if(t+24>e.length)return;const s=_A(e,t);if(s&&t+s.frameLength<=e.length){const a=s.samplesPerFrame*9e4/s.sampleRate,o=n+r*a,u={unit:e.subarray(t,t+s.frameLength),pts:o,dts:o};return i.config=[],i.channelCount=s.channelCount,i.samplerate=s.sampleRate,i.samples.push(u),{sample:u,length:s.frameLength,missing:0}}}function _A(i,e){const t=i[e+1]>>3&3,n=i[e+1]>>1&3,r=i[e+2]>>4&15,s=i[e+2]>>2&3;if(t!==1&&r!==0&&r!==15&&s!==3){const a=i[e+2]>>1&1,o=i[e+3]>>6,u=t===3?3-n:n===3?3:4,l=Oa[u*14+r-1]*1e3,g=bl[(t===3?0:t===2?1:2)*3+s],m=o===3?1:2,w=Cl[t][n],x=xl[n],H=w*8*x,P=Math.floor(w*l/g+a)*x;if(Zs===null){const be=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Zs=be?parseInt(be[1]):0}return!!Zs&&Zs<=87&&n===2&&l>=224e3&&o===0&&(i[e+3]=i[e+3]|128),{sampleRate:g,channelCount:m,frameLength:P,samplesPerFrame:H}}}function _o(i,e){return i[e]===255&&(i[e+1]&224)===224&&(i[e+1]&6)!==0}function ua(i,e){return e+1<i.length&&_o(i,e)}function Sl(i,e){return _o(i,e)&&4<=i.length-e}function yA(i,e){if(e+1<i.length&&_o(i,e)){const n=_A(i,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const s=e+r;return s===i.length||ua(i,s)}return!1}class Tl extends vo{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const n=Ki(e,0);let r=(n==null?void 0:n.length)||0;if(yA(e,r))return!1;for(let s=e.length;r<s;r++)if(Gs(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return Ra(e,t)}appendFrame(e,t,n){Aa(e,this.observer,t,n,e.manifestCodec);const r=Vs(e,t,n,this.basePTS,this.frameIndex);if(r&&r.missing===0)return r}}const EA=(i,e)=>{let t=0,n=5;e+=n;const r=new Uint32Array(1),s=new Uint32Array(1),a=new Uint8Array(1);for(;n>0;){a[0]=i[e];const o=Math.min(n,8),u=8-o;s[0]=4278190080>>>24+u<<u,r[0]=(a[0]&s[0])>>u,t=t?t<<o|r[0]:r[0],e+=1,n-=o}return t};class Il extends vo{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,n){const r=wA(e,t,n,this.basePTS,this.frameIndex);if(r!==-1)return{sample:e.samples[e.samples.length-1],length:r,missing:0}}static probe(e){if(!e)return!1;const t=Ki(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&mo(t)!==void 0&&EA(e,n)<16}}function wA(i,e,t,n,r){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const s=e[t+4]>>6;if(s>=3)return-1;const o=[48e3,44100,32e3][s],u=e[t+4]&63,d=[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][u*3+s]*2;if(t+d>e.length)return-1;const g=e[t+6]>>5;let m=0;g===2?m+=2:(g&1&&g!==1&&(m+=2),g&4&&(m+=2));const w=(e[t+6]<<8|e[t+7])>>12-m&1,H=[2,1,2,3,3,4,4,5][g]+w,P=e[t+5]>>3,me=e[t+5]&7,De=new Uint8Array([s<<6|P<<1|me>>2,(me&3)<<6|g<<3|w<<2|u>>4,u<<4&224]),be=1536/o*9e4,Ue=n+r*be,ot=e.subarray(t,t+d);return i.config=De,i.channelCount=H,i.samplerate=o,i.samples.push({unit:ot,pts:Ue}),d}class Fl extends vo{resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=Ki(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&mo(t)!==void 0&&EA(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(yA(e,n))return X.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return Sl(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return vA(e,t,n,this.basePTS,this.frameIndex)}}const Dl=/\/emsg[-/]ID3/i;class Rl{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,n,r){const s=this.videoTrack=as("video",1),a=this.audioTrack=as("audio",1),o=this.txtTrack=as("text",1);if(this.id3Track=as("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const u=$e(e);if(u.video){const{id:l,timescale:d,codec:g,supplemental:m}=u.video;s.id=l,s.timescale=o.timescale=d,s.codec=g,s.supplemental=m}if(u.audio){const{id:l,timescale:d,codec:g}=u.audio;a.id=l,a.timescale=d,a.codec=g}o.id=Fe.text,s.sampleDuration=0,s.duration=a.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return xe(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,s=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=Ne(this.remainderData,e));const o=Ie(n);this.remainderData=o.remainder,r.samples=o.valid||new Uint8Array}else r.samples=n;const a=this.extractID3Track(r,t);return s.samples=qe(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:a,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const r=this.extractID3Track(t,this.timeOffset);return n.samples=qe(e,t),{videoTrack:t,audioTrack:as(),id3Track:r,textTrack:as()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=W(e.samples,["emsg"]);r&&r.forEach(s=>{const a=vt(s);if(Dl.test(a.schemeIdUri)){const o=BA(a,t);let u=a.eventDuration===4294967295?Number.POSITIVE_INFINITY:a.eventDuration/a.timeScale;u<=.001&&(u=Number.POSITIVE_INFINITY);const l=a.payload;n.samples.push({data:l,len:l.byteLength,dts:o,pts:o,type:Gi.emsg,duration:u})}else if(this.config.enableEmsgKLVMetadata&&a.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const o=BA(a,t);n.samples.push({data:a.payload,len:a.payload.byteLength,dts:o,pts:o,type:Gi.misbklv,duration:Number.POSITIVE_INFINITY})}})}return n}demuxSampleAes(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}}function BA(i,e){return N(i.presentationTime)?i.presentationTime/i.timeScale:e+i.presentationTimeDelta/i.timeScale}class Ll{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new At(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,It.cbc)}decryptAacSample(e,t,n){const r=e[t].unit;if(r.length<=16)return;const s=r.subarray(16,r.length-r.length%16),a=s.buffer.slice(s.byteOffset,s.byteOffset+s.length);this.decryptBuffer(a).then(o=>{const u=new Uint8Array(o);r.set(u,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,n)})}decryptAacSamples(e,t,n){for(;;t++){if(t>=e.length){n();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,n),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,n=new Int8Array(t);let r=0;for(let s=32;s<e.length-16;s+=160,r+=16)n.set(e.subarray(s,s+16),r);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let r=0;for(let s=32;s<e.length-16;s+=160,r+=16)e.set(n.subarray(r,r+16),s);return e}decryptAvcSample(e,t,n,r,s){const a=Ct(s.data),o=this.getAvcEncryptedData(a);this.decryptBuffer(o.buffer).then(u=>{s.data=this.getAvcDecryptedUnit(a,u),this.decrypter.isSync()||this.decryptAvcSamples(e,t,n+1,r)})}decryptAvcSamples(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length){r();return}const s=e[t].units;for(;!(n>=s.length);n++){const a=s[n];if(!(a.data.length<=48||a.type!==1&&a.type!==5)&&(this.decryptAvcSample(e,t,n,r,a),!this.decrypter.isSync()))return}}}}class bA{constructor(){this.VideoSample=null}createVideoSample(e,t,n){return{key:e,frame:!1,pts:t,dts:n,units:[],length:0}}getLastNalUnit(e){var t;let n=this.VideoSample,r;if((!n||n.units.length===0)&&(n=e[e.length-1]),(t=n)!=null&&t.units){const s=n.units;r=s[s.length-1]}return r}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const n=t.samples,r=n.length;if(r){const s=n[r-1];e.pts=s.pts,e.dts=s.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,n){const r=t.byteLength;let s=e.naluState||0;const a=s,o=[];let u=0,l,d,g,m=-1,w=0;for(s===-1&&(m=0,w=this.getNALuType(t,0),s=0,u=1);u<r;){if(l=t[u++],!s){s=l?0:1;continue}if(s===1){s=l?0:2;continue}if(!l)s=3;else if(l===1){if(d=u-s-1,m>=0){const x={data:t.subarray(m,d),type:w};o.push(x)}else{const x=this.getLastNalUnit(e.samples);x&&(a&&u<=4-a&&x.state&&(x.data=x.data.subarray(0,x.data.byteLength-a)),d>0&&(x.data=Ne(x.data,t.subarray(0,d)),x.state=0))}u<r?(g=this.getNALuType(t,u),m=u,w=g,s=0):s=-1}else s=0}if(m>=0&&s>=0){const x={data:t.subarray(m,r),type:w,state:s};o.push(x)}if(o.length===0){const x=this.getLastNalUnit(e.samples);x&&(x.data=Ne(x.data,t))}return e.naluState=s,o}}class Ws{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),s=Math.min(4,t);if(s===0)throw new Error("no bytes available");r.set(e.subarray(n,n+s)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=s*8,this.bytesAvailable-=s}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const n=this.word>>>32-t;if(e>32&&X.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class CA extends bA{parsePES(e,t,n,r){const s=this.parseNALu(e,n.data,r);let a=this.VideoSample,o,u=!1;n.data=null,a&&s.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),s.forEach(l=>{var d,g;switch(l.type){case 1:{let H=!1;o=!0;const P=l.data;if(u&&P.length>4){const me=this.readSliceType(P);(me===2||me===4||me===7||me===9)&&(H=!0)}if(H){var m;(m=a)!=null&&m.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null)}a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.frame=!0,a.key=H;break}case 5:o=!0,(d=a)!=null&&d.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0,a.frame=!0;break;case 6:{o=!0,Kt(l.data,1,n.pts,t.samples);break}case 7:{var w,x;o=!0,u=!0;const H=l.data,P=this.readSPS(H);if(!e.sps||e.width!==P.width||e.height!==P.height||((w=e.pixelRatio)==null?void 0:w[0])!==P.pixelRatio[0]||((x=e.pixelRatio)==null?void 0:x[1])!==P.pixelRatio[1]){e.width=P.width,e.height=P.height,e.pixelRatio=P.pixelRatio,e.sps=[H];const me=H.subarray(1,4);let De="avc1.";for(let be=0;be<3;be++){let Ue=me[be].toString(16);Ue.length<2&&(Ue="0"+Ue),De+=Ue}e.codec=De}break}case 8:o=!0,e.pps=[l.data];break;case 9:o=!0,e.audFound=!0,(g=a)!=null&&g.frame&&(this.pushAccessUnit(a,e),a=null),a||(a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:o=!0;break;default:o=!1;break}a&&o&&a.units.push(l)}),r&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new Ws(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let n=8,r=8,s;for(let a=0;a<e;a++)r!==0&&(s=t.readEG(),r=(n+s+256)%256),n=r===0?n:r}readSPS(e){const t=new Ws(e);let n=0,r=0,s=0,a=0,o,u,l;const d=t.readUByte.bind(t),g=t.readBits.bind(t),m=t.readUEG.bind(t),w=t.readBoolean.bind(t),x=t.skipBits.bind(t),H=t.skipEG.bind(t),P=t.skipUEG.bind(t),me=this.skipScalingList.bind(this);d();const De=d();if(g(5),x(3),d(),P(),De===100||De===110||De===122||De===244||De===44||De===83||De===86||De===118||De===128){const Ft=m();if(Ft===3&&x(1),P(),P(),x(1),w())for(u=Ft!==3?8:12,l=0;l<u;l++)w()&&(l<6?me(16,t):me(64,t))}P();const be=m();if(be===0)m();else if(be===1)for(x(1),H(),H(),o=m(),l=0;l<o;l++)H();P(),x(1);const Ue=m(),ot=m(),Dt=g(1);Dt===0&&x(1),x(1),w()&&(n=m(),r=m(),s=m(),a=m());let rt=[1,1];if(w()&&w())switch(d()){case 1:rt=[1,1];break;case 2:rt=[12,11];break;case 3:rt=[10,11];break;case 4:rt=[16,11];break;case 5:rt=[40,33];break;case 6:rt=[24,11];break;case 7:rt=[20,11];break;case 8:rt=[32,11];break;case 9:rt=[80,33];break;case 10:rt=[18,11];break;case 11:rt=[15,11];break;case 12:rt=[64,33];break;case 13:rt=[160,99];break;case 14:rt=[4,3];break;case 15:rt=[3,2];break;case 16:rt=[2,1];break;case 255:{rt=[d()<<8|d(),d()<<8|d()];break}}return{width:Math.ceil((Ue+1)*16-n*2-r*2),height:(2-Dt)*(ot+1)*16-(Dt?2:4)*(s+a),pixelRatio:rt}}}class xA extends bA{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,r){const s=this.parseNALu(e,n.data,r);let a=this.VideoSample,o,u=!1;n.data=null,a&&s.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),s.forEach(l=>{var d,g;switch(l.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:a||(a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),a.frame=!0,o=!0;break;case 16:case 17:case 18:case 21:if(o=!0,u){var m;(m=a)!=null&&m.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null)}a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0,a.frame=!0;break;case 19:case 20:o=!0,(d=a)!=null&&d.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0,a.frame=!0;break;case 39:o=!0,Kt(l.data,2,n.pts,t.samples);break;case 32:o=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=p(e.params,this.readVPS(l.data)),this.initVPS=l.data),e.vps=[l.data];break;case 33:if(o=!0,u=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],l.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const w=this.readSPS(l.data);e.width=w.width,e.height=w.height,e.pixelRatio=w.pixelRatio,e.codec=w.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const x in w.params)e.params[x]=w.params[x]}this.pushParameterSet(e.sps,l.data,e.vps),a||(a=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),a.key=!0;break;case 34:if(o=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const w=this.readPPS(l.data);for(const x in w)e.params[x]=w[x]}this.pushParameterSet(e.pps,l.data,e.vps)}break;case 35:o=!0,e.audFound=!0,(g=a)!=null&&g.frame&&(this.pushAccessUnit(a,e),a=null),a||(a=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:o=!1;break}a&&o&&a.units.push(l)}),r&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}pushParameterSet(e,t,n){(n&&n[0]===this.initVPS||!n&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let n=0;for(let r=0;r<e.byteLength;r++)r>=2&&e[r]===3&&e[r-1]===0&&e[r-2]===0||(t[n]=e[r],n++);return new Uint8Array(t.buffer,0,n)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new Ws(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const n=t.readBits(3),r=t.readBoolean();return{numTemporalLayers:n+1,temporalIdNested:r}}readSPS(e){const t=new Ws(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const n=t.readBits(3);t.readBoolean();const r=t.readBits(2),s=t.readBoolean(),a=t.readBits(5),o=t.readUByte(),u=t.readUByte(),l=t.readUByte(),d=t.readUByte(),g=t.readUByte(),m=t.readUByte(),w=t.readUByte(),x=t.readUByte(),H=t.readUByte(),P=t.readUByte(),me=t.readUByte(),De=[],be=[];for(let Xr=0;Xr<n;Xr++)De.push(t.readBoolean()),be.push(t.readBoolean());if(n>0)for(let Xr=n;Xr<8;Xr++)t.readBits(2);for(let Xr=0;Xr<n;Xr++)De[Xr]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),be[Xr]&&t.readUByte();t.readUEG();const Ue=t.readUEG();Ue==3&&t.skipBits(1);const ot=t.readUEG(),Dt=t.readUEG(),rt=t.readBoolean();let Ft=0,Nt=0,bt=0,ln=0;rt&&(Ft+=t.readUEG(),Nt+=t.readUEG(),bt+=t.readUEG(),ln+=t.readUEG());const Ln=t.readUEG(),_r=t.readUEG(),Yn=t.readUEG(),Xn=t.readBoolean();for(let Xr=Xn?0:n;Xr<=n;Xr++)t.skipUEG(),t.skipUEG(),t.skipUEG();if(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.readBoolean()&&t.readBoolean())for(let Mi=0;Mi<4;Mi++)for(let ds=0;ds<(Mi===3?2:6);ds++)if(!t.readBoolean())t.readUEG();else{const ws=Math.min(64,1<<4+(Mi<<1));Mi>1&&t.readEG();for(let go=0;go<ws;go++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const gr=t.readUEG();let Tn=0;for(let Xr=0;Xr<gr;Xr++){let Mi=!1;if(Xr!==0&&(Mi=t.readBoolean()),Mi){Xr===gr&&t.readUEG(),t.readBoolean(),t.readUEG();let ds=0;for(let ba=0;ba<=Tn;ba++){const ws=t.readBoolean();let go=!1;ws||(go=t.readBoolean()),(ws||go)&&ds++}Tn=ds}else{const ds=t.readUEG(),ba=t.readUEG();Tn=ds+ba;for(let ws=0;ws<ds;ws++)t.readUEG(),t.readBoolean();for(let ws=0;ws<ba;ws++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const Xr=t.readUEG();for(let Mi=0;Mi<Xr;Mi++){for(let ds=0;ds<Yn+4;ds++)t.readBits(1);t.readBits(1)}}let Sr=0,Br=1,Lr=1,Mr=!0,$r=1,oi=0;t.readBoolean(),t.readBoolean();let Vi=!1;if(t.readBoolean()){if(t.readBoolean()){const Ca=t.readUByte(),Ju=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],El=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Ca>0&&Ca<16?(Br=Ju[Ca-1],Lr=El[Ca-1]):Ca===255&&(Br=t.readBits(16),Lr=t.readBits(16))}if(t.readBoolean()&&t.readBoolean(),t.readBoolean()&&(t.readBits(3),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.readUByte(),t.readUByte())),t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),Vi=t.readBoolean(),Vi&&(Ft+=t.readUEG(),Nt+=t.readUEG(),bt+=t.readUEG(),ln+=t.readUEG()),t.readBoolean()&&($r=t.readBits(32),oi=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const El=t.readBoolean(),qu=t.readBoolean();let hA=!1;(El||qu)&&(hA=t.readBoolean(),hA&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),hA&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let ec=0;ec<=n;ec++){Mr=t.readBoolean();const Ac=Mr||t.readBoolean();let tc=!1;Ac?t.readEG():tc=t.readBoolean();const nc=tc?1:t.readUEG()+1;if(El)for(let gA=0;gA<nc;gA++)t.readUEG(),t.readUEG(),hA&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(qu)for(let gA=0;gA<nc;gA++)t.readUEG(),t.readUEG(),hA&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Sr=t.readUEG())}let aa=ot,Xu=Dt;if(rt||Vi){let Xr=1,Mi=1;Ue===1?Xr=Mi=2:Ue==2&&(Xr=2),aa=ot-Xr*Nt-Xr*Ft,Xu=Dt-Mi*ln-Mi*bt}const ac=r?["A","B","C"][r]:"",oc=o<<24|u<<16|l<<8|d;let ju=0;for(let Xr=0;Xr<32;Xr++)ju=(ju|(oc>>Xr&1)<<31-Xr)>>>0;let Yu=ju.toString(16);return a===1&&Yu==="2"&&(Yu="6"),{codecString:`hvc1.${ac}${a}.${Yu}.${s?"H":"L"}${me}.B0`,params:{general_tier_flag:s,general_profile_idc:a,general_profile_space:r,general_profile_compatibility_flags:[o,u,l,d],general_constraint_indicator_flags:[g,m,w,x,H,P],general_level_idc:me,bit_depth:Ln+8,bit_depth_luma_minus8:Ln,bit_depth_chroma_minus8:_r,min_spatial_segmentation_idc:Sr,chroma_format_idc:Ue,frame_rate:{fixed:Mr,fps:oi/$r}},width:aa,height:Xu,pixelRatio:[Br,Lr]}}readPPS(e){const t=new Ws(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const r=t.readBoolean(),s=t.readBoolean();let a=1;return s&&r?a=0:s?a=3:r&&(a=2),{parallelismType:a}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const Bi=188;class Yi{constructor(e,t,n,r){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.logger=r,this.videoParser=null}static probe(e,t){const n=Yi.syncOffset(e);return n>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${n}`),n!==-1}static syncOffset(e){const t=e.length;let n=Math.min(Bi*5,t-Bi)+1,r=0;for(;r<n;){let s=!1,a=-1,o=0;for(let u=r;u<t;u+=Bi)if(e[u]===71&&(t-u===Bi||e[u+Bi]===71)){if(o++,a===-1&&(a=u,a!==0&&(n=Math.min(a+Bi*99,e.length-Bi)+1)),s||(s=yo(e,u)===0),s&&o>1&&(a===0&&o>2||u+Bi>n))return a}else{if(o)return-1;break}r++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:Fe[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,n,r){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=Yi.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=Yi.createTrack("audio",r),this._id3Track=Yi.createTrack("id3"),this._txtTrack=Yi.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,r=!1){n||(this.sampleAes=null);let s;const a=this._videoTrack,o=this._audioTrack,u=this._id3Track,l=this._txtTrack;let d=a.pid,g=a.pesData,m=o.pid,w=u.pid,x=o.pesData,H=u.pesData,P=null,me=this.pmtParsed,De=this._pmtId,be=e.length;if(this.remainderData&&(e=Ne(this.remainderData,e),be=e.length,this.remainderData=null),be<Bi&&!r)return this.remainderData=e,{audioTrack:o,videoTrack:a,id3Track:u,textTrack:l};const Ue=Math.max(0,Yi.syncOffset(e));be-=(be-Ue)%Bi,be<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,be,e.buffer.byteLength-be));let ot=0;for(let rt=Ue;rt<be;rt+=Bi)if(e[rt]===71){const Ft=!!(e[rt+1]&64),Nt=yo(e,rt),bt=(e[rt+3]&48)>>4;let ln;if(bt>1){if(ln=rt+5+e[rt+4],ln===rt+Bi)continue}else ln=rt+4;switch(Nt){case d:if(Ft){if(g&&(s=zs(g,this.logger))){if(this.videoParser===null)switch(a.segmentCodec){case"avc":this.videoParser=new CA;break;case"hevc":this.videoParser=new xA;break}this.videoParser!==null&&this.videoParser.parsePES(a,l,s,!1)}g={data:[],size:0}}g&&(g.data.push(e.subarray(ln,rt+Bi)),g.size+=rt+Bi-ln);break;case m:if(Ft){if(x&&(s=zs(x,this.logger)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,s);break;case"mp3":this.parseMPEGPES(o,s);break;case"ac3":this.parseAC3PES(o,s);break}x={data:[],size:0}}x&&(x.data.push(e.subarray(ln,rt+Bi)),x.size+=rt+Bi-ln);break;case w:Ft&&(H&&(s=zs(H,this.logger))&&this.parseID3PES(u,s),H={data:[],size:0}),H&&(H.data.push(e.subarray(ln,rt+Bi)),H.size+=rt+Bi-ln);break;case 0:Ft&&(ln+=e[ln]+1),De=this._pmtId=Ul(e,ln);break;case De:{Ft&&(ln+=e[ln]+1);const Ln=SA(e,ln,this.typeSupported,n,this.observer,this.logger);d=Ln.videoPid,d>0&&(a.pid=d,a.segmentCodec=Ln.segmentVideoCodec),m=Ln.audioPid,m>0&&(o.pid=m,o.segmentCodec=Ln.segmentAudioCodec),w=Ln.id3Pid,w>0&&(u.pid=w),P!==null&&!me&&(this.logger.warn(`MPEG-TS PMT found at ${rt} after unknown PID '${P}'. Backtracking to sync byte @${Ue} to parse all TS packets.`),P=null,rt=Ue-188),me=this.pmtParsed=!0;break}case 17:case 8191:break;default:P=Nt;break}}else ot++;ot>0&&Eo(this.observer,new Error(`Found ${ot} TS packet/s that do not start with 0x47`),void 0,this.logger),a.pesData=g,o.pesData=x,u.pesData=H;const Dt={audioTrack:o,videoTrack:a,id3Track:u,textTrack:l};return r&&this.extractRemainingSamples(Dt),Dt}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:n,id3Track:r,textTrack:s}=e,a=n.pesData,o=t.pesData,u=r.pesData;let l;if(a&&(l=zs(a,this.logger))){if(this.videoParser===null)switch(n.segmentCodec){case"avc":this.videoParser=new CA;break;case"hevc":this.videoParser=new xA;break}this.videoParser!==null&&(this.videoParser.parsePES(n,s,l,!0),n.pesData=null)}else n.pesData=a;if(o&&(l=zs(o,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,l);break;case"mp3":this.parseMPEGPES(t,l);break;case"ac3":this.parseAC3PES(t,l);break}t.pesData=null}else o!=null&&o.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;u&&(l=zs(u,this.logger))?(this.parseID3PES(r,l),r.pesData=null):r.pesData=u}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),s=this.sampleAes=new Ll(this.observer,this.config,t);return this.decrypt(r,s)}decrypt(e,t){return new Promise(n=>{const{audioTrack:r,videoTrack:s}=e;r.samples&&r.segmentCodec==="aac"?t.decryptAacSamples(r.samples,0,()=>{s.samples?t.decryptAvcSamples(s.samples,0,0,()=>{n(e)}):n(e)}):s.samples&&t.decryptAvcSamples(s.samples,0,0,()=>{n(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let n=0;const r=this.aacOverFlow;let s=t.data;if(r){this.aacOverFlow=null;const g=r.missing,m=r.sample.unit.byteLength;if(g===-1)s=Ne(r.sample.unit,s);else{const w=m-g;r.sample.unit.set(s.subarray(0,g),w),e.samples.push(r.sample),n=r.missing}}let a,o;for(a=n,o=s.length;a<o-1&&!Fs(s,a);a++);if(a!==n){let g;const m=a<o-1;if(m?g=`AAC PES did not start with ADTS header,offset:${a}`:g="No ADTS header found in AAC PES",Eo(this.observer,new Error(g),m,this.logger),!m)return}Aa(e,this.observer,s,a,this.audioCodec);let u;if(t.pts!==void 0)u=t.pts;else if(r){const g=$s(e.samplerate);u=r.sample.pts+g}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let l=0,d;for(;a<o;)if(d=Vs(e,s,a,u,l),a+=d.length,d.missing){this.aacOverFlow=d;break}else for(l++;a<o-1&&!Fs(s,a);a++);}parseMPEGPES(e,t){const n=t.data,r=n.length;let s=0,a=0;const o=t.pts;if(o===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;a<r;)if(ua(n,a)){const u=vA(e,n,a,o,s);if(u)a+=u.length,s++;else break}else a++}parseAC3PES(e,t){{const n=t.data,r=t.pts;if(r===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const s=n.length;let a=0,o=0,u;for(;o<s&&(u=wA(e,n,o,r,a++))>0;)o+=u}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=p({},t,{type:this._videoTrack?Gi.emsg:Gi.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function yo(i,e){return((i[e+1]&31)<<8)+i[e+2]}function Ul(i,e){return(i[e+10]&31)<<8|i[e+11]}function SA(i,e,t,n,r,s){const a={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=(i[e+1]&15)<<8|i[e+2],u=e+3+o-4,l=(i[e+10]&15)<<8|i[e+11];for(e+=12+l;e<u;){const d=yo(i,e),g=(i[e+3]&15)<<8|i[e+4];switch(i[e]){case 207:if(!n){wo("ADTS AAC",s);break}case 15:a.audioPid===-1&&(a.audioPid=d);break;case 21:a.id3Pid===-1&&(a.id3Pid=d);break;case 219:if(!n){wo("H.264",s);break}case 27:a.videoPid===-1&&(a.videoPid=d);break;case 3:case 4:!t.mpeg&&!t.mp3?s.log("MPEG audio found, not supported in this browser"):a.audioPid===-1&&(a.audioPid=d,a.segmentAudioCodec="mp3");break;case 193:if(!n){wo("AC-3",s);break}case 129:t.ac3?a.audioPid===-1&&(a.audioPid=d,a.segmentAudioCodec="ac3"):s.log("AC-3 audio found, not supported in this browser");break;case 6:if(a.audioPid===-1&&g>0){let m=e+5,w=g;for(;w>2;){switch(i[m]){case 106:t.ac3!==!0?s.log("AC-3 audio found, not supported in this browser for now"):(a.audioPid=d,a.segmentAudioCodec="ac3");break}const H=i[m+1]+2;m+=H,w-=H}}break;case 194:case 135:return Eo(r,new Error("Unsupported EC-3 in M2TS found"),void 0,s),a;case 36:a.videoPid===-1&&(a.videoPid=d,a.segmentVideoCodec="hevc",s.log("HEVC in M2TS found"));break}e+=g+5}return a}function Eo(i,e,t,n){n.warn(`parsing error: ${e.message}`),i.emit(h.ERROR,h.ERROR,{type:le.MEDIA_ERROR,details:Q.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function wo(i,e){e.log(`${i} with AES-128-CBC encryption found in unencrypted stream`)}function zs(i,e){let t=0,n,r,s,a,o;const u=i.data;if(!i||i.size===0)return null;for(;u[0].length<19&&u.length>1;)u[0]=Ne(u[0],u[1]),u.splice(1,1);if(n=u[0],(n[0]<<16)+(n[1]<<8)+n[2]===1){if(r=(n[4]<<8)+n[5],r&&r>i.size-6)return null;const d=n[7];d&192&&(a=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,d&64?(o=(n[14]&14)*536870912+(n[15]&255)*4194304+(n[16]&254)*16384+(n[17]&255)*128+(n[18]&254)/2,a-o>60*9e4&&(e.warn(`${Math.round((a-o)/9e4)}s delta between PTS and DTS, align them`),a=o)):o=a),s=n[8];let g=s+9;if(i.size<=g)return null;i.size-=g;const m=new Uint8Array(i.size);for(let w=0,x=u.length;w<x;w++){n=u[w];let H=n.byteLength;if(g)if(g>H){g-=H;continue}else n=n.subarray(g),H-=g,g=0;m.set(n,t),t+=H}return r&&(r-=s+3),{data:m,pts:a,dts:o,len:r}}return null}class kl{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 Cs=Math.pow(2,32)-1;class Ut{static init(){Ut.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in Ut.types)Ut.types.hasOwnProperty(e)&&(Ut.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);Ut.HDLR_TYPES={video:t,audio:n};const r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),s=new Uint8Array([0,0,0,0,0,0,0,0]);Ut.STTS=Ut.STSC=Ut.STCO=s,Ut.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ut.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Ut.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Ut.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const a=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),u=new Uint8Array([0,0,0,1]);Ut.FTYP=Ut.box(Ut.types.ftyp,a,u,a,o),Ut.DINF=Ut.box(Ut.types.dinf,Ut.box(Ut.types.dref,r))}static box(e,...t){let n=8,r=t.length;const s=r;for(;r--;)n+=t[r].byteLength;const a=new Uint8Array(n);for(a[0]=n>>24&255,a[1]=n>>16&255,a[2]=n>>8&255,a[3]=n&255,a.set(e,4),r=0,n=8;r<s;r++)a.set(t[r],n),n+=t[r].byteLength;return a}static hdlr(e){return Ut.box(Ut.types.hdlr,Ut.HDLR_TYPES[e])}static mdat(e){return Ut.box(Ut.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(Cs+1)),r=Math.floor(t%(Cs+1));return Ut.box(Ut.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))}static mdia(e){return Ut.box(Ut.types.mdia,Ut.mdhd(e.timescale||0,e.duration||0),Ut.hdlr(e.type),Ut.minf(e))}static mfhd(e){return Ut.box(Ut.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255]))}static minf(e){return e.type==="audio"?Ut.box(Ut.types.minf,Ut.box(Ut.types.smhd,Ut.SMHD),Ut.DINF,Ut.stbl(e)):Ut.box(Ut.types.minf,Ut.box(Ut.types.vmhd,Ut.VMHD),Ut.DINF,Ut.stbl(e))}static moof(e,t,n){return Ut.box(Ut.types.moof,Ut.mfhd(e),Ut.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=Ut.trak(e[t]);return Ut.box.apply(null,[Ut.types.moov,Ut.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(Ut.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=Ut.trex(e[t]);return Ut.box.apply(null,[Ut.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(Cs+1)),r=Math.floor(t%(Cs+1)),s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return Ut.box(Ut.types.mvhd,s)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let r,s;for(r=0;r<t.length;r++)s=t[r].flags,n[r+4]=s.dependsOn<<4|s.isDependedOn<<2|s.hasRedundancy;return Ut.box(Ut.types.sdtp,n)}static stbl(e){return Ut.box(Ut.types.stbl,Ut.stsd(e),Ut.box(Ut.types.stts,Ut.STTS),Ut.box(Ut.types.stsc,Ut.STSC),Ut.box(Ut.types.stsz,Ut.STSZ),Ut.box(Ut.types.stco,Ut.STCO))}static avc1(e){let t=[],n=[],r,s,a;for(r=0;r<e.sps.length;r++)s=e.sps[r],a=s.byteLength,t.push(a>>>8&255),t.push(a&255),t=t.concat(Array.prototype.slice.call(s));for(r=0;r<e.pps.length;r++)s=e.pps[r],a=s.byteLength,n.push(a>>>8&255),n.push(a&255),n=n.concat(Array.prototype.slice.call(s));const o=Ut.box(Ut.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),u=e.width,l=e.height,d=e.pixelRatio[0],g=e.pixelRatio[1];return Ut.box(Ut.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,u>>8&255,u&255,l>>8&255,l&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]),o,Ut.box(Ut.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Ut.box(Ut.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,d&255,g>>24,g>>16&255,g>>8&255,g&255])))}static esds(e){const t=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,...t,6,1,2])}static audioStsd(e){const t=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return Ut.box(Ut.types.mp4a,Ut.audioStsd(e),Ut.box(Ut.types.esds,Ut.esds(e)))}static mp3(e){return Ut.box(Ut.types[".mp3"],Ut.audioStsd(e))}static ac3(e){return Ut.box(Ut.types["ac-3"],Ut.audioStsd(e),Ut.box(Ut.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return Ut.box(Ut.types.stsd,Ut.STSD,Ut.mp4a(e));if(t==="ac3"&&e.config)return Ut.box(Ut.types.stsd,Ut.STSD,Ut.ac3(e));if(t==="mp3"&&e.codec==="mp3")return Ut.box(Ut.types.stsd,Ut.STSD,Ut.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return Ut.box(Ut.types.stsd,Ut.STSD,Ut.avc1(e));if(t==="hevc"&&e.vps)return Ut.box(Ut.types.stsd,Ut.STSD,Ut.hvc1(e))}else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,n=(e.duration||0)*(e.timescale||0),r=e.width||0,s=e.height||0,a=Math.floor(n/(Cs+1)),o=Math.floor(n%(Cs+1));return Ut.box(Ut.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,r&255,0,0,s>>8&255,s&255,0,0]))}static traf(e,t){const n=Ut.sdtp(e),r=e.id,s=Math.floor(t/(Cs+1)),a=Math.floor(t%(Cs+1));return Ut.box(Ut.types.traf,Ut.box(Ut.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),Ut.box(Ut.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,a>>24,a>>16&255,a>>8&255,a&255])),Ut.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,Ut.box(Ut.types.trak,Ut.tkhd(e),Ut.mdia(e))}static trex(e){const t=e.id;return Ut.box(Ut.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const n=e.samples||[],r=n.length,s=12+16*r,a=new Uint8Array(s);let o,u,l,d,g,m;for(t+=8+s,a.set([e.type==="video"?1:0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),o=0;o<r;o++)u=n[o],l=u.duration,d=u.size,g=u.flags,m=u.cts,a.set([l>>>24&255,l>>>16&255,l>>>8&255,l&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255,g.isLeading<<2|g.dependsOn,g.isDependedOn<<6|g.hasRedundancy<<4|g.paddingValue<<1|g.isNonSync,g.degradPrio&61440,g.degradPrio&15,m>>>24&255,m>>>16&255,m>>>8&255,m&255],12+16*o);return Ut.box(Ut.types.trun,a)}static initSegment(e){Ut.types||Ut.init();const t=Ut.moov(e);return Ne(Ut.FTYP,t)}static hvc1(e){const t=e.params,n=[e.vps,e.sps,e.pps],r=4,s=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),r-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),n.length]);let a=s.length;for(let x=0;x<n.length;x+=1){a+=3;for(let H=0;H<n[x].length;H+=1)a+=2+n[x][H].length}const o=new Uint8Array(a);o.set(s,0),a=s.length;const u=n.length-1;for(let x=0;x<n.length;x+=1){o.set(new Uint8Array([32+x|(x===u?128:0),0,n[x].length]),a),a+=3;for(let H=0;H<n[x].length;H+=1)o.set(new Uint8Array([n[x][H].length>>8,n[x][H].length&255]),a),a+=2,o.set(n[x][H],a),a+=n[x][H].length}const l=Ut.box(Ut.types.hvcC,o),d=e.width,g=e.height,m=e.pixelRatio[0],w=e.pixelRatio[1];return Ut.box(Ut.types.hvc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,d>>8&255,d&255,g>>8&255,g&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l,Ut.box(Ut.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Ut.box(Ut.types.pasp,new Uint8Array([m>>24,m>>16&255,m>>8&255,m&255,w>>24,w>>16&255,w>>8&255,w&255])))}}Ut.types=void 0,Ut.HDLR_TYPES=void 0,Ut.STTS=void 0,Ut.STSC=void 0,Ut.STCO=void 0,Ut.STSZ=void 0,Ut.VMHD=void 0,Ut.SMHD=void 0,Ut.STSD=void 0,Ut.FTYP=void 0,Ut.DINF=void 0;const TA=9e4;function Bo(i,e,t=1,n=!1){const r=i*e*t;return n?Math.round(r):r}function yi(i,e,t=1,n=!1){return Bo(i,e,1/t,n)}function ca(i,e=!1){return Bo(i,1e3,1/TA,e)}function Ol(i,e=1){return Bo(i,TA,1/e)}const Pl=10*1e3,Ql=1024,Ml=1152,IA=1536;let js=null,bo=null;function FA(i,e,t,n){return{duration:e,size:t,cts:n,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:i?2:1,isNonSync:i?0:1}}}class Pa{constructor(e,t,n,r){if(this.logger=void 0,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=n,this.logger=r,this.ISGenerated=!1,js===null){const a=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);js=a?parseInt(a[1]):0}if(bo===null){const s=navigator.userAgent.match(/Safari\/(\d+)/i);bo=s?parseInt(s[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){this.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const n=e[0].pts,r=e.reduce((s,a)=>{let o=a.pts,u=o-s;return u<-4294967296&&(t=!0,o=Xi(o,n),u=o-s),u>0?s:o},n);return t&&this.logger.debug("PTS rollover detected"),r}remux(e,t,n,r,s,a,o,u){let l,d,g,m,w,x,H=s,P=s;const me=e.pid>-1,De=t.pid>-1,be=t.samples.length,Ue=e.samples.length>0,ot=o&&be>0||be>1;if((!me||Ue)&&(!De||ot)||this.ISGenerated||o){if(this.ISGenerated){var rt,Ft,Nt,bt;const Yn=this.videoTrackConfig;(Yn&&(t.width!==Yn.width||t.height!==Yn.height||((rt=t.pixelRatio)==null?void 0:rt[0])!==((Ft=Yn.pixelRatio)==null?void 0:Ft[0])||((Nt=t.pixelRatio)==null?void 0:Nt[1])!==((bt=Yn.pixelRatio)==null?void 0:bt[1]))||!Yn&&ot||this.nextAudioPts===null&&Ue)&&this.resetInitSegment()}this.ISGenerated||(g=this.generateIS(e,t,s,a));const ln=this.isVideoContiguous;let Ln=-1,_r;if(ot&&(Ln=Nl(t.samples),!ln&&this.config.forceKeyFrameOnDiscontinuity))if(x=!0,Ln>0){this.logger.warn(`[mp4-remuxer]: Dropped ${Ln} out of ${be} video samples due to a missing keyframe`);const Yn=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Ln),t.dropped+=Ln,P+=(t.samples[0].pts-Yn)/t.inputTimeScale,_r=P}else Ln===-1&&(this.logger.warn(`[mp4-remuxer]: No keyframe found out of ${be} video samples`),x=!1);if(this.ISGenerated){if(Ue&&ot){const Yn=this.getVideoStartPts(t.samples),Kn=(Xi(e.samples[0].pts,Yn)-Yn)/t.inputTimeScale;H+=Math.max(0,Kn),P+=Math.max(0,-Kn)}if(Ue){if(e.samplerate||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),g=this.generateIS(e,t,s,a)),d=this.remuxAudio(e,H,this.isAudioContiguous,a,De||ot||u===ie.AUDIO?P:void 0),ot){const Yn=d?d.endPTS-d.startPTS:0;t.inputTimeScale||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),g=this.generateIS(e,t,s,a)),l=this.remuxVideo(t,P,ln,Yn)}}else ot&&(l=this.remuxVideo(t,P,ln,0));l&&(l.firstKeyFrame=Ln,l.independent=Ln!==-1,l.firstKeyFramePTS=_r)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(w=Co(n,s,this._initPTS,this._initDTS)),r.samples.length&&(m=lr(r,s,this._initPTS))),{audio:d,video:l,initSegment:g,independent:x,text:m,id3:w}}generateIS(e,t,n,r){const s=e.samples,a=t.samples,o=this.typeSupported,u={},l=this._initPTS;let d=!l||r,g="audio/mp4",m,w,x,H;if(d&&(m=w=1/0),e.config&&s.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(g="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}u.audio={id:"audio",container:g,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&o.mpeg?new Uint8Array(0):Ut.initSegment([e]),metadata:{channelCount:e.channelCount}},d&&(H=e.id,x=e.inputTimeScale,!l||x!==l.timescale?m=w=s[0].pts-Math.round(x*n):d=!1)}if(t.sps&&t.pps&&a.length){if(t.timescale=t.inputTimeScale,u.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Ut.initSegment([t]),metadata:{width:t.width,height:t.height}},d)if(H=t.id,x=t.inputTimeScale,!l||x!==l.timescale){const P=this.getVideoStartPts(a),me=Math.round(x*n);w=Math.min(w,Xi(a[0].dts,P)-me),m=Math.min(m,P-me)}else d=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(u).length)return this.ISGenerated=!0,d?(this._initPTS={baseTime:m,timescale:x},this._initDTS={baseTime:w,timescale:x}):m=x=void 0,{tracks:u,initPTS:m,timescale:x,trackId:H}}remuxVideo(e,t,n,r){const s=e.inputTimeScale,a=e.samples,o=[],u=a.length,l=this._initPTS;let d=this.nextAvcDts,g=8,m=this.videoSampleDuration,w,x,H=Number.POSITIVE_INFINITY,P=Number.NEGATIVE_INFINITY,me=!1;if(!n||d===null){const Tn=t*s,Un=a[0].pts-Xi(a[0].dts,a[0].pts);js&&d!==null&&Math.abs(Tn-Un-d)<15e3?n=!0:d=Tn-Un}const De=l.baseTime*s/l.timescale;for(let Tn=0;Tn<u;Tn++){const Un=a[Tn];Un.pts=Xi(Un.pts-De,d),Un.dts=Xi(Un.dts-De,d),Un.dts<a[Tn>0?Tn-1:Tn].dts&&(me=!0)}me&&a.sort(function(Tn,Un){const Sr=Tn.dts-Un.dts,Br=Tn.pts-Un.pts;return Sr||Br}),w=a[0].dts,x=a[a.length-1].dts;const be=x-w,Ue=be?Math.round(be/(u-1)):m||e.inputTimeScale/30;if(n){const Tn=w-d,Un=Tn>Ue,Sr=Tn<-1;if((Un||Sr)&&(Un?this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ca(Tn,!0)} ms (${Tn}dts) hole between fragments detected at ${t.toFixed(3)}`):this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ca(-Tn,!0)} ms (${Tn}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Sr||d>=a[0].pts||js)){w=d;const Br=a[0].pts-Tn;if(Un)a[0].dts=w,a[0].pts=Br;else{let Lr=!0;for(let Mr=0;Mr<a.length&&!(a[Mr].dts>Br&&Lr);Mr++){const $r=a[Mr].pts;if(a[Mr].dts-=Tn,a[Mr].pts-=Tn,Mr<a.length-1){const oi=a[Mr+1].pts,Vi=a[Mr].pts,ts=oi<=Vi,aa=oi<=$r;Lr=ts==aa}}}this.logger.log(`Video: Initial PTS/DTS adjusted: ${ca(Br,!0)}/${ca(w,!0)}, delta: ${ca(Tn,!0)} ms`)}}w=Math.max(0,w);let ot=0,Dt=0,rt=w;for(let Tn=0;Tn<u;Tn++){const Un=a[Tn],Sr=Un.units,Br=Sr.length;let Lr=0;for(let Mr=0;Mr<Br;Mr++)Lr+=Sr[Mr].data.length;Dt+=Lr,ot+=Br,Un.length=Lr,Un.dts<rt?(Un.dts=rt,rt+=Ue/4|0||1):rt=Un.dts,H=Math.min(Un.pts,H),P=Math.max(Un.pts,P)}x=a[u-1].dts;const Ft=Dt+4*ot+8;let Nt;try{Nt=new Uint8Array(Ft)}catch(Tn){this.observer.emit(h.ERROR,h.ERROR,{type:le.MUX_ERROR,details:Q.REMUX_ALLOC_ERROR,fatal:!1,error:Tn,bytes:Ft,reason:`fail allocating video mdat ${Ft}`});return}const bt=new DataView(Nt.buffer);bt.setUint32(0,Ft),Nt.set(Ut.types.mdat,4);let ln=!1,Ln=Number.POSITIVE_INFINITY,_r=Number.POSITIVE_INFINITY,Yn=Number.NEGATIVE_INFINITY,Xn=Number.NEGATIVE_INFINITY;for(let Tn=0;Tn<u;Tn++){const Un=a[Tn],Sr=Un.units;let Br=0;for(let $r=0,oi=Sr.length;$r<oi;$r++){const Vi=Sr[$r],ts=Vi.data,aa=Vi.data.byteLength;bt.setUint32(g,aa),g+=4,Nt.set(ts,g),g+=aa,Br+=4+aa}let Lr;if(Tn<u-1)m=a[Tn+1].dts-Un.dts,Lr=a[Tn+1].pts-Un.pts;else{const $r=this.config,oi=Tn>0?Un.dts-a[Tn-1].dts:Ue;if(Lr=Tn>0?Un.pts-a[Tn-1].pts:Ue,$r.stretchShortVideoTrack&&this.nextAudioPts!==null){const Vi=Math.floor($r.maxBufferHole*s),ts=(r?H+r*s:this.nextAudioPts)-Un.pts;ts>Vi?(m=ts-oi,m<0?m=oi:ln=!0,this.logger.log(`[mp4-remuxer]: It is approximately ${ts/90} ms to the next segment; using duration ${m/90} ms for the last video frame.`)):m=oi}else m=oi}const Mr=Math.round(Un.pts-Un.dts);Ln=Math.min(Ln,m),Yn=Math.max(Yn,m),_r=Math.min(_r,Lr),Xn=Math.max(Xn,Lr),o.push(FA(Un.key,m,Br,Mr))}if(o.length){if(js){if(js<70){const Tn=o[0].flags;Tn.dependsOn=2,Tn.isNonSync=0}}else if(bo&&Xn-_r<Yn-Ln&&Ue/Yn<.025&&o[0].cts===0){this.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Tn=w;for(let Un=0,Sr=o.length;Un<Sr;Un++){const Br=Tn+o[Un].duration,Lr=Tn+o[Un].cts;if(Un<Sr-1){const Mr=Br+o[Un+1].cts;o[Un].duration=Mr-Lr}else o[Un].duration=Un?o[Un-1].duration:Ue;o[Un].cts=0,Tn=Br}}}m=ln||!m?Ue:m,this.nextAvcDts=d=x+m,this.videoSampleDuration=m,this.isVideoContiguous=!0;const gr={data1:Ut.moof(e.sequenceNumber++,w,p(e,{samples:o})),data2:Nt,startPTS:H/s,endPTS:(P+m)/s,startDTS:w/s,endDTS:d/s,type:"video",hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,gr}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Ml;case"ac3":return IA;default:return Ql}}remuxAudio(e,t,n,r,s){const a=e.inputTimeScale,o=e.samplerate?e.samplerate:a,u=a/o,l=this.getSamplesPerFrame(e),d=l*u,g=this._initPTS,m=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,w=[],x=s!==void 0;let H=e.samples,P=m?0:8,me=this.nextAudioPts||-1;const De=t*a,be=g.baseTime*a/g.timescale;if(this.isAudioContiguous=n=n||H.length&&me>0&&(r&&Math.abs(De-me)<9e3||Math.abs(Xi(H[0].pts-be,De)-me)<20*d),H.forEach(function(Kn){Kn.pts=Xi(Kn.pts-be,De)}),!n||me<0){if(H=H.filter(Kn=>Kn.pts>=0),!H.length)return;s===0?me=0:r&&!x?me=Math.max(0,De):me=H[0].pts}if(e.segmentCodec==="aac"){const Kn=this.config.maxAudioFramesDrift;for(let ar=0,gr=me;ar<H.length;ar++){const Tn=H[ar],Un=Tn.pts,Sr=Un-gr,Br=Math.abs(1e3*Sr/a);if(Sr<=-Kn*d&&x)ar===0&&(this.logger.warn(`Audio frame @ ${(Un/a).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*Sr/a)} ms.`),this.nextAudioPts=me=gr=Un);else if(Sr>=Kn*d&&Br<Pl&&x){let Lr=Math.round(Sr/d);gr=Un-Lr*d,gr<0&&(Lr--,gr+=d),ar===0&&(this.nextAudioPts=me=gr),this.logger.warn(`[mp4-remuxer]: Injecting ${Lr} audio frame @ ${(gr/a).toFixed(3)}s due to ${Math.round(1e3*Sr/a)} ms gap.`);for(let Mr=0;Mr<Lr;Mr++){const $r=Math.max(gr,0);let oi=kl.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);oi||(this.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),oi=Tn.unit.subarray()),H.splice(ar,0,{unit:oi,pts:$r}),gr+=d,ar++}}Tn.pts=gr,gr+=d}}let Ue=null,ot=null,Dt,rt=0,Ft=H.length;for(;Ft--;)rt+=H[Ft].unit.byteLength;for(let Kn=0,ar=H.length;Kn<ar;Kn++){const gr=H[Kn],Tn=gr.unit;let Un=gr.pts;if(ot!==null){const Br=w[Kn-1];Br.duration=Math.round((Un-ot)/u)}else if(n&&e.segmentCodec==="aac"&&(Un=me),Ue=Un,rt>0){rt+=P;try{Dt=new Uint8Array(rt)}catch(Br){this.observer.emit(h.ERROR,h.ERROR,{type:le.MUX_ERROR,details:Q.REMUX_ALLOC_ERROR,fatal:!1,error:Br,bytes:rt,reason:`fail allocating audio mdat ${rt}`});return}m||(new DataView(Dt.buffer).setUint32(0,rt),Dt.set(Ut.types.mdat,4))}else return;Dt.set(Tn,P);const Sr=Tn.byteLength;P+=Sr,w.push(FA(!0,l,Sr,0)),ot=Un}const Nt=w.length;if(!Nt)return;const bt=w[w.length-1];this.nextAudioPts=me=ot+u*bt.duration;const ln=m?new Uint8Array(0):Ut.moof(e.sequenceNumber++,Ue/u,p({},e,{samples:w}));e.samples=[];const Ln=Ue/a,_r=me/a,Xn={data1:ln,data2:Dt,startPTS:Ln,endPTS:_r,startDTS:Ln,endDTS:_r,type:"audio",hasAudio:!0,hasVideo:!1,nb:Nt};return this.isAudioContiguous=!0,Xn}}function Xi(i,e){let t;if(e===null)return i;for(e<i?t=-8589934592:t=8589934592;Math.abs(i-e)>4294967296;)i+=t;return i}function Nl(i){for(let e=0;e<i.length;e++)if(i[e].key)return e;return-1}function Co(i,e,t,n){const r=i.samples.length;if(!r)return;const s=i.inputTimeScale;for(let o=0;o<r;o++){const u=i.samples[o];u.pts=Xi(u.pts-t.baseTime*s/t.timescale,e*s)/s,u.dts=Xi(u.dts-n.baseTime*s/n.timescale,e*s)/s}const a=i.samples;return i.samples=[],{samples:a}}function lr(i,e,t){const n=i.samples.length;if(!n)return;const r=i.inputTimeScale;for(let a=0;a<n;a++){const o=i.samples[a];o.pts=Xi(o.pts-t.baseTime*r/t.timescale,e*r)/r}i.samples.sort((a,o)=>a.pts-o.pts);const s=i.samples;return i.samples=[],{samples:s}}class Hl{constructor(e,t,n,r){this.logger=void 0,this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.isVideoContiguous=!1,this.logger=r}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(te(e,r)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:n}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const r=this.initData=$e(e);r.audio&&(t=os(r.audio,_.AUDIO,this.logger)),r.video&&(n=os(r.video,_.VIDEO,this.logger));const s={};r.audio&&r.video?s.audiovideo={container:"video/mp4",codec:t+","+n,supplemental:r.video.supplemental,initSegment:e,id:"main"}:r.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?s.video={container:"video/mp4",codec:n,supplemental:r.video.supplemental,initSegment:e,id:"main"}:this.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s}remux(e,t,n,r,s,a){var o,u;let{initPTS:l,lastEndTime:d}=this;const g={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};N(d)||(d=this.lastEndTime=s||0);const m=t.samples;if(!(m!=null&&m.length))return g;const w={initPTS:void 0,timescale:void 0,trackId:void 0};let x=this.initData;if((o=x)!=null&&o.length||(this.generateInitSegment(m),x=this.initData),!((u=x)!=null&&u.length))return this.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),g;this.emitInitSegment&&(w.tracks=this.initTracks,this.emitInitSegment=!1);const H=we(m,x,this.logger),P=x.audio?H[x.audio.id]:null,me=x.video?H[x.video.id]:null,De=Qa(me,1/0),be=Qa(P,1/0),Ue=Qa(me,0,!0),ot=Qa(P,0,!0);let Dt,rt=s,Ft=0;if(P&&(!me||!l&&be<De||l&&l.trackId===x.audio.id)?(w.trackId=x.audio.id,Dt=P,Ft=ot-be):me&&(w.trackId=x.video.id,Dt=me,Ft=Ue-De),Dt){const Kn=Dt.timescale;rt=Dt.start/Kn,w.timescale=Kn,l||(w.initPTS=Dt.start-s*Kn,this.initPTS=l={baseTime:w.initPTS,timescale:Kn,trackId:w.trackId})}(a||!l)&&(xo(l,rt,s,Ft)||w.timescale!==l.timescale)&&(w.initPTS=rt-s,l&&l.timescale===1&&this.logger.warn(`Adjusting initPTS @${s} from ${l.baseTime/l.timescale} to ${w.initPTS}`),this.initPTS=l={baseTime:w.initPTS,timescale:1});const Nt=e?rt-l.baseTime/l.timescale:d;Se(x,m,l.baseTime/l.timescale);const bt=Nt+Ft;Ft>0?this.lastEndTime=bt:(this.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const ln=!!x.audio,Ln=!!x.video;let _r="";ln&&(_r+="audio"),Ln&&(_r+="video");const Yn={data1:m,startPTS:Nt,startDTS:Nt,endPTS:bt,endDTS:bt,type:_r,hasAudio:ln,hasVideo:Ln,nb:1,dropped:0};g.audio=ln&&!Ln?Yn:void 0,g.video=Ln?Yn:void 0;const Xn=me==null?void 0:me.sampleCount;if(Xn){const Kn=me.keyFrameIndex,ar=Kn!==-1;Yn.nb=Xn,Yn.dropped=Kn===0||this.isVideoContiguous?0:ar?Kn:Xn,Yn.independent=ar,Yn.firstKeyFrame=Kn,ar&&me.keyFrameStart&&(Yn.firstKeyFramePTS=me.keyFrameStart-l.baseTime/l.timescale),this.isVideoContiguous||(g.independent=ar),this.isVideoContiguous||(this.isVideoContiguous=ar),Yn.dropped&&this.logger.warn(`fmp4 does not start with IDR: firstIDR ${Kn}/${Xn} dropped: ${Yn.dropped} pts: ${Yn.firstKeyFramePTS||"NA"}`)}return g.initSegment=w,g.id3=Co(n,s,l,l),r.samples.length&&(g.text=lr(r,s,l)),g}}function Qa(i,e,t=!1){return(i==null?void 0:i.start)!==void 0?(i.start+(t?i.duration:0))/i.timescale:e}function xo(i,e,t,n){if(i===null)return!0;const r=Math.max(n,1),s=e-i.baseTime/i.timescale;return Math.abs(s-t)>r}function os(i,e,t){const n=i==null?void 0:i.codec;return n&&n.length>4?n:e===_.AUDIO?n==="ec-3"||n==="ac-3"||n==="alac"?n:n==="fLaC"||n==="Opus"?xt(n,!1):(t.warn(`Unhandled audio codec "${n}" in mp4 MAP`),n||"mp4a"):(t.warn(`Unhandled video codec "${n}" in mp4 MAP`),n||"avc1")}let _s;try{_s=self.performance.now.bind(self.performance)}catch(i){_s=Date.now}const fa=[{demux:Rl,remux:Hl},{demux:Yi,remux:Pa},{demux:Tl,remux:Pa},{demux:Fl,remux:Pa}];fa.splice(2,0,{demux:Il,remux:Pa});class Ys{constructor(e,t,n,r,s,a){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.id=s,this.logger=a}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,r){const s=n.transmuxing;s.executeStart=_s();let a=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:u}=this;r&&(this.currentTransmuxState=r);const{contiguous:l,discontinuity:d,trackSwitch:g,accurateTimeOffset:m,timeOffset:w,initSegmentChange:x}=r||o,{audioCodec:H,videoCodec:P,defaultInitPts:me,duration:De,initSegmentData:be}=u,Ue=Ma(a,t);if(Ue&&Kr(Ue.method)){const Ft=this.getDecrypter(),Nt=Ai(Ue.method);if(Ft.isSync()){let bt=Ft.softwareDecrypt(a,Ue.key.buffer,Ue.iv.buffer,Nt);if(n.part>-1){const Ln=Ft.flush();bt=Ln&&Ln.buffer}if(!bt)return s.executeEnd=_s(),So(n);a=new Uint8Array(bt)}else return this.asyncResult=!0,this.decryptionPromise=Ft.webCryptoDecrypt(a,Ue.key.buffer,Ue.iv.buffer,Nt).then(bt=>{const ln=this.push(bt,null,n);return this.decryptionPromise=null,ln}),this.decryptionPromise}const ot=this.needsProbing(d,g);if(ot){const Ft=this.configureTransmuxer(a);if(Ft)return this.logger.warn(`[transmuxer] ${Ft.message}`),this.observer.emit(h.ERROR,h.ERROR,{type:le.MEDIA_ERROR,details:Q.FRAG_PARSING_ERROR,fatal:!1,error:Ft,reason:Ft.message}),s.executeEnd=_s(),So(n)}(d||g||x||ot)&&this.resetInitSegment(be,H,P,De,t),(d||x||ot)&&this.resetInitialTimestamp(me),l||this.resetContiguity();const Dt=this.transmux(a,Ue,w,m,n);this.asyncResult=da(Dt);const rt=this.currentTransmuxState;return rt.contiguous=!0,rt.discontinuity=!1,rt.trackSwitch=!1,s.executeEnd=_s(),Dt}flush(e){const t=e.transmuxing;t.executeStart=_s();const{decrypter:n,currentTransmuxState:r,decryptionPromise:s}=this;if(s)return this.asyncResult=!0,s.then(()=>this.flush(e));const a=[],{timeOffset:o}=r;if(n){const g=n.flush();g&&a.push(this.push(g.buffer,null,e))}const{demuxer:u,remuxer:l}=this;if(!u||!l){t.executeEnd=_s();const g=[So(e)];return this.asyncResult?Promise.resolve(g):g}const d=u.flush(o);return da(d)?(this.asyncResult=!0,d.then(g=>(this.flushRemux(a,g,e),a))):(this.flushRemux(a,d,e),this.asyncResult?Promise.resolve(a):a)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:s,id3Track:a,textTrack:o}=t,{accurateTimeOffset:u,timeOffset:l}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===ie.MAIN?"level":"track"} ${n.level}`);const d=this.remuxer.remux(r,s,a,o,l,u,!0,this.id);e.push({remuxResult:d,chunkMeta:n}),n.transmuxing.executeEnd=_s()}resetInitialTimestamp(e){const{demuxer:t,remuxer:n}=this;!t||!n||(t.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,n,r,s){const{demuxer:a,remuxer:o}=this;!a||!o||(a.resetInitSegment(e,t,n,r),o.resetInitSegment(e,t,n,s))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,r,s){let a;return t&&t.method==="SAMPLE-AES"?a=this.transmuxSampleAes(e,t,n,r,s):a=this.transmuxUnencrypted(e,n,r,s),a}transmuxUnencrypted(e,t,n,r){const{audioTrack:s,videoTrack:a,id3Track:o,textTrack:u}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(s,a,o,u,t,n,!1,this.id),chunkMeta:r}}transmuxSampleAes(e,t,n,r,s){return this.demuxer.demuxSampleAes(e,t,n).then(a=>({remuxResult:this.remuxer.remux(a.audioTrack,a.videoTrack,a.id3Track,a.textTrack,n,r,!1,this.id),chunkMeta:s}))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:r}=this;let s;for(let g=0,m=fa.length;g<m;g++){var a;if((a=fa[g].demux)!=null&&a.probe(e,this.logger)){s=fa[g];break}}if(!s)return new Error("Failed to find demuxer by probing fragment data");const o=this.demuxer,u=this.remuxer,l=s.remux,d=s.demux;(!u||!(u instanceof l))&&(this.remuxer=new l(n,t,r,this.logger)),(!o||!(o instanceof d))&&(this.demuxer=new d(n,t,r,this.logger),this.probe=d.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new At(this.config)),e}}function Ma(i,e){let t=null;return i.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const So=i=>({remuxResult:{},chunkMeta:i});function da(i){return"then"in i&&i.then instanceof Function}class Kl{constructor(e,t,n,r,s){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=s||null}}class Ls{constructor(e,t,n,r,s,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=s,this.initSegmentChange=a}}let Na=0;class Ha{constructor(e,t,n,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=Na++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=u=>{const l=u.data,d=this.hls;if(!(!d||!(l!=null&&l.event)||l.instanceNo!==this.instanceNo))switch(l.event){case"init":{var g;const m=(g=this.workerContext)==null?void 0:g.objectURL;m&&self.URL.revokeObjectURL(m);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}case"workerLog":{d.logger[l.data.logType]&&d.logger[l.data.logType](l.data.message);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.part=this.part,l.data.id=this.id,d.trigger(l.event,l.data);break}}},this.onWorkerError=u=>{if(!this.hls)return;const l=new Error(`${u.message} (${u.filename}:${u.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(h.ERROR,{type:le.OTHER_ERROR,details:Q.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:l})};const s=e.config;this.hls=e,this.id=t,this.useWorker=!!s.enableWorker,this.onTransmuxComplete=n,this.onFlush=r;const a=(u,l)=>{l=l||{},l.frag=this.frag||void 0,u===h.ERROR&&(l=l,l.parent=this.id,l.part=this.part,this.error=l.error),this.hls.trigger(u,l)};this.observer=new ss,this.observer.on(h.FRAG_DECRYPTED,a),this.observer.on(h.ERROR,a);const o=zn(s.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const u=this.hls.logger;if(s.workerPath||xa()){try{s.workerPath?(u.log(`loading Web Worker ${s.workerPath} for "${t}"`),this.workerContext=Ta(s.workerPath)):(u.log(`injecting Web Worker for "${t}"`),this.workerContext=Sa());const{worker:d}=this.workerContext;d.addEventListener("message",this.onWorkerMessage),d.addEventListener("error",this.onWorkerError),d.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:o,id:t,config:Lt(s)})}catch(d){u.warn(`Error setting up "${t}" Web Worker, fallback to inline`,d),this.terminateWorker(),this.error=null,this.transmuxer=new Ys(this.observer,o,s,"",t,e.logger)}return}}this.transmuxer=new Ys(this.observer,o,s,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=Na++;const t=this.hls.config,n=zn(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:Lt(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),Ia(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,n,r,s,a,o,u,l,d){var g,m;l.transmuxing.start=self.performance.now();const{instanceNo:w,transmuxer:x}=this,H=a?a.start:s.start,P=s.decryptdata,me=this.frag,De=!(me&&s.cc===me.cc),be=!(me&&l.level===me.level),Ue=me?l.sn-me.sn:-1,ot=this.part?l.part-this.part.index:-1,Dt=Ue===0&&l.id>1&&l.id===(me==null?void 0:me.stats.chunkCount),rt=!be&&(Ue===1||Ue===0&&(ot===1||Dt&&ot<=0)),Ft=self.performance.now();(be||Ue||s.stats.parsing.start===0)&&(s.stats.parsing.start=Ft),a&&(ot||!rt)&&(a.stats.parsing.start=Ft);const Nt=!(me&&((g=s.initSegment)==null?void 0:g.url)===((m=me.initSegment)==null?void 0:m.url)),bt=new Ls(De,rt,u,be,H,Nt);if(!rt||De||Nt){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${s.type} sn: ${l.sn}${l.part>-1?" part: "+l.part:""} ${this.id===ie.MAIN?"level":"track"}: ${l.level} id: ${l.id}
|
|
discontinuity: ${De}
|
|
trackSwitch: ${be}
|
|
contiguous: ${rt}
|
|
accurateTimeOffset: ${u}
|
|
timeOffset: ${H}
|
|
initSegmentChange: ${Nt}`);const ln=new Kl(n,r,t,o,d);this.configureTransmuxer(ln)}if(this.frag=s,this.part=a,this.workerContext)this.workerContext.worker.postMessage({instanceNo:w,cmd:"demux",data:e,decryptdata:P,chunkMeta:l,state:bt},e instanceof ArrayBuffer?[e]:[]);else if(x){const ln=x.push(e,P,l,bt);da(ln)?ln.then(Ln=>{this.handleTransmuxComplete(Ln)}).catch(Ln=>{this.transmuxerError(Ln,l,"transmuxer-interface push error")}):this.handleTransmuxComplete(ln)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:n}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(n){const r=n.flush(e);da(r)?r.then(s=>{this.handleFlushResult(s,e)}).catch(s=>{this.transmuxerError(s,e,"transmuxer-interface flush error")}):this.handleFlushResult(r,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:n}))}handleFlushResult(e,t){e.forEach(n=>{this.handleTransmuxComplete(n)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:n}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):n&&n.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const DA=100;class RA extends zr{constructor(e,t,n){super(e,t,n,"audio-stream-controller",ie.AUDIO),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(h.LEVEL_LOADED,this.onLevelLoaded,this),e.on(h.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(h.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(h.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(h.BUFFER_RESET,this.onBufferReset,this),e.on(h.BUFFER_CREATED,this.onBufferCreated,this),e.on(h.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(h.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(h.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(h.FRAG_LOADING,this.onFragLoading,this),e.on(h.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(h.LEVEL_LOADED,this.onLevelLoaded,this),e.off(h.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(h.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(h.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(h.BUFFER_RESET,this.onBufferReset,this),e.off(h.BUFFER_CREATED,this.onBufferCreated,this),e.off(h.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(h.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(h.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(h.FRAG_LOADING,this.onFragLoading,this),e.off(h.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:s}){if(n===ie.MAIN){const a=t.cc,o=this.fragCurrent;if(this.initPTS[a]={baseTime:r,timescale:s},this.log(`InitPTS for cc: ${a} found from main: ${r}/${s}`),this.mainAnchor=t,this.state===Zt.WAITING_INIT_PTS){const u=this.waitingData;(!u&&!this.loadingParts||u&&u.frag.cc!==a)&&this.syncWithAnchor(t,u==null?void 0:u.frag)}else!this.hls.hasEnoughToStart&&o&&o.cc!==a?(o.abortRequests(),this.syncWithAnchor(t,o)):this.state===Zt.IDLE&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,t){var n;const r=((n=this.mainFragLoading)==null?void 0:n.frag)||null;if(t&&(r==null?void 0:r.cc)===t.cc)return;const s=(r||e).cc,a=this.getLevelDetails(),o=this.getLoadPosition(),u=he(a,s,o);u&&(this.log(`Waiting fragment cc (${t==null?void 0:t.cc}) cancelled because video is at cc ${e.cc}`),this.startFragRequested=!1,this.nextLoadPosition=u.start,this.resetLoadingState(),this.state===Zt.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=Zt.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(DA),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=Zt.IDLE):this.state=Zt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case Zt.IDLE:this.doTickIdle();break;case Zt.WAITING_TRACK:{const{levels:t,trackId:n}=this,r=t==null?void 0:t[n],s=r==null?void 0:r.details;if(s&&!this.waitForLive(r)){if(this.waitForCdnTuneIn(s))break;this.state=Zt.WAITING_INIT_PTS}break}case Zt.FRAG_LOADING_WAITING_RETRY:{var e;const t=performance.now(),n=this.retryDate;if(!n||t>=n||(e=this.media)!=null&&e.seeking){const{levels:r,trackId:s}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((r==null?void 0:r[s])||null),this.state=Zt.IDLE}break}case Zt.WAITING_INIT_PTS:{const t=this.waitingData;if(t){const{frag:n,part:r,cache:s,complete:a}=t,o=this.mainAnchor;if(this.initPTS[n.cc]!==void 0){this.waitingData=null,this.state=Zt.FRAG_LOADING;const u=s.flush().buffer,l={frag:n,part:r,payload:u,networkDetails:null};this._handleFragmentLoadProgress(l),a&&super._handleFragmentLoadComplete(l)}else o&&o.cc!==t.frag.cc&&this.syncWithAnchor(o,t.frag)}else this.state=Zt.IDLE}}this.onTickEnd()}resetLoadingState(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:n,media:r,trackId:s}=this,a=t.config;if(!this.buffering||!r&&!this.primaryPrefetch&&(this.startFragRequested||!a.startFragPrefetch)||!(n!=null&&n[s]))return;const o=n[s],u=o.details;if(!u||this.waitForLive(o)||this.waitForCdnTuneIn(u)){this.state=Zt.WAITING_TRACK,this.startFragRequested=!1;return}const l=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&l&&(this.bufferFlushed=!1,this.afterBufferFlushed(l,_.AUDIO,ie.AUDIO));const d=this.getFwdBufferInfo(l,ie.AUDIO);if(d===null)return;if(!this.switchingTrack&&this._streamEnded(d,u)){t.trigger(h.BUFFER_EOS,{type:"audio"}),this.state=Zt.ENDED;return}const g=d.len,m=t.maxBufferLength,w=u.fragments,x=w[0].start,H=this.getLoadPosition(),P=this.flushing?H:d.end;if(this.switchingTrack&&r){const be=H;u.PTSKnown&&be<x&&(d.end>x||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=x+.05)}if(g>=m&&!this.switchingTrack&&P<w[w.length-1].start)return;let me=this.getNextFragment(P,u);if(me&&this.isLoopLoading(me,P)&&(me=this.getNextFragmentLoopLoading(me,u,d,ie.MAIN,m)),!me){this.bufferFlushed=!0;return}let De=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&De&&de(me)&&!me.endList&&(!u.live||!this.loadingParts&&P<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(De)===Oe.OK&&(this.mainFragLoading=De=null),De&&de(De))){if(me.start>De.end){const Ue=this.fragmentTracker.getFragAtPos(P,ie.MAIN);Ue&&Ue.end>De.end&&(De=Ue,this.mainFragLoading={frag:Ue,targetBufferTime:null})}if(me.start>De.end)return}this.loadFragment(me,o,P)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new Pt(n))}onAudioTrackSwitching(e,t){const n=!!t.url;this.trackId=t.id;const{fragCurrent:r}=this;r&&(r.abortRequests(),this.removeUnbufferedFrags(r.start)),this.resetLoadingState(),n?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==Zt.STOPPED&&(this.setInterval(DA),this.state=Zt.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const n=this.cachedTrackLoadedData;n&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(h.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:r}=this,{details:s,id:a,groupId:o,track:u}=t;if(!r){this.warn(`Audio tracks reset while loading track ${a} "${u.name}" of "${o}"`);return}const l=this.mainDetails;if(!l||s.endCC>l.endCC||l.expired){this.cachedTrackLoadedData=t,this.state!==Zt.STOPPED&&(this.state=Zt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${a} "${u.name}" of "${o}" loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`);const d=r[a];let g=0;if(s.live||(n=d.details)!=null&&n.live){if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;if(d.details){var m;g=this.alignPlaylists(s,d.details,(m=this.levelLastLoaded)==null?void 0:m.details)}s.alignedSliding||(is(s,l),s.alignedSliding||gs(s,l),g=s.fragmentStart)}d.details=s,this.levelLastLoaded=d,this.startFragRequested||this.setStartPosition(l,g),this.hls.trigger(h.AUDIO_TRACK_UPDATED,{details:s,id:a,groupId:t.groupId}),this.state===Zt.WAITING_TRACK&&!this.waitForCdnTuneIn(s)&&(this.state=Zt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:s}=e,{config:a,trackId:o,levels:u}=this;if(!u){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const l=u[o];if(!l){this.warn("Audio track is undefined on fragment load progress");return}const d=l.details;if(!d){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const g=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2";let m=this.transmuxer;m||(m=this.transmuxer=new Ha(this.hls,ie.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const w=this.initPTS[n.cc],x=(t=n.initSegment)==null?void 0:t.data;if(w!==void 0){const P=r?r.index:-1,me=P!==-1,De=new hn(n.level,n.sn,n.stats.chunkCount,s.byteLength,P,me);m.push(s,x,g,"",n,r,d.totalduration,!1,De,w)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${d.startSN} ,${d.endSN}],track ${o}`);const{cache:H}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new hi,complete:!1};H.push(new Uint8Array(s)),this.state!==Zt.STOPPED&&(this.state=Zt.WAITING_INIT_PTS)}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,t){this.bufferFlushed=this.flushing=!1;const n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===ie.MAIN&&de(t.frag)&&(this.mainFragLoading=t,this.state===Zt.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==ie.AUDIO){!this.audioOnly&&n.type===ie.MAIN&&!n.elementaryStreams.video&&!n.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);return}if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(de(n)){this.fragPrevious=n;const s=this.switchingTrack;s&&(this.bufferedTrack=s,this.switchingTrack=null,this.hls.trigger(h.AUDIO_TRACK_SWITCHED,E({},s)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=Zt.ERROR;return}switch(t.details){case Q.FRAG_GAP:case Q.FRAG_PARSING_ERROR:case Q.FRAG_DECRYPT_ERROR:case Q.FRAG_LOAD_ERROR:case Q.FRAG_LOAD_TIMEOUT:case Q.KEY_LOAD_ERROR:case Q.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ie.AUDIO,t);break;case Q.AUDIO_TRACK_LOAD_ERROR:case Q.AUDIO_TRACK_LOAD_TIMEOUT:case Q.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Zt.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===ge.AUDIO_TRACK&&(this.state=Zt.IDLE);break;case Q.BUFFER_ADD_CODEC_ERROR:case Q.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.resetLoadingState();break;case Q.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case Q.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==_.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==_.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Zt.ENDED&&(this.state=Zt.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,ie.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:s,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o){this.resetWhenMissingContext(a);return}const{frag:u,part:l,level:d}=o,{details:g}=d,{audio:m,text:w,id3:x,initSegment:H}=s;if(this.fragContextChanged(u)||!g){this.fragmentTracker.removeFragment(u);return}if(this.state=Zt.PARSING,this.switchingTrack&&m&&this.completeAudioSwitch(this.switchingTrack),H!=null&&H.tracks){const P=u.initSegment||u;this._bufferInitSegment(d,H.tracks,P,a),r.trigger(h.FRAG_PARSING_INIT_SEGMENT,{frag:P,id:n,tracks:H.tracks})}if(m){const{startPTS:P,endPTS:me,startDTS:De,endDTS:be}=m;l&&(l.elementaryStreams[_.AUDIO]={startPTS:P,endPTS:me,startDTS:De,endDTS:be}),u.setElementaryStreamInfo(_.AUDIO,P,me,De,be),this.bufferFragmentData(m,u,l,a)}if(x!=null&&(t=x.samples)!=null&&t.length){const P=p({id:n,frag:u,details:g},x);r.trigger(h.FRAG_PARSING_METADATA,P)}if(w){const P=p({id:n,frag:u,details:g},w);r.trigger(h.FRAG_PARSING_USERDATA,P)}}_bufferInitSegment(e,t,n,r){if(this.state!==Zt.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const s=t.audio;s.id=ie.AUDIO;const a=e.audioCodec;this.log(`Init audio buffer, container:${s.container}, codecs[level/parsed]=[${a}/${s.codec}]`),a&&a.split(",").length===1&&(s.levelCodec=a),this.hls.trigger(h.BUFFER_CODECS,t);const o=s.initSegment;if(o!=null&&o.byteLength){const u={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:o};this.hls.trigger(h.BUFFER_APPENDING,u)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===Oe.NOT_LOADED||r===Oe.PARTIAL){var s;if(!de(e))this._loadInitSegment(e,t);else if((s=t.details)!=null&&s.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=Zt.WAITING_INIT_PTS;const a=this.mainDetails;a&&a.fragmentStart!==t.details.fragmentStart&&gs(t.details,a)}else super.loadFragment(e,t,n)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:n,assocLang:r,characteristics:s,audioCodec:a,channels:o}=this.bufferedTrack;Xe({name:t,lang:n,assocLang:r,characteristics:s,audioCodec:a,channels:o},e,Qt)||(Jt(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(h.AUDIO_TRACK_SWITCHED,E({},e))}}class To extends O{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const r=t==null?void 0:t.renditionReports;if(r){let s=-1;for(let a=0;a<r.length;a++){const o=r[a];let u;try{u=new self.URL(o.URI,t.url).href}catch(l){this.warn(`Could not construct new URL for Rendition Report: ${l}`),u=o.URI||""}if(u===e){s=a;break}else u===e.substring(0,u.length)&&(s=a)}if(s!==-1){const a=r[s],o=parseInt(a["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let u=parseInt(a["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const d=Math.min(t.age-t.partTarget,t.targetduration);u>=0&&d>t.partTarget&&(u+=1)}const l=n&&Ve(n);return new Yt(o,u>=0?u:void 0,l)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(n){this.warn(`Could not construct new URL with HLS Delivery Directives: ${n}`)}return e}playlistLoaded(e,t,n){const{details:r,stats:s}=t,a=self.performance.now(),o=s.loading.first?Math.max(0,a-s.loading.first):0;r.advancedDateTime=Date.now()-o;const u=this.hls.config.timelineOffset;if(u!==r.appliedTimelineOffset){const d=Math.max(u||0,0);r.appliedTimelineOffset=d,r.fragments.forEach(g=>{g.start=g.playlistOffset+d})}if(r.live||n!=null&&n.live){const d="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){hs(n,r);const De=r.playlistParsingError;if(De){this.warn(De);const be=this.hls;if(!be.config.ignorePlaylistParsingErrors){var l;const{networkDetails:Ue}=t;be.trigger(h.ERROR,{type:le.NETWORK_ERROR,details:Q.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:De,reason:De.message,level:t.level||void 0,parent:(l=r.fragments[0])==null?void 0:l.type,networkDetails:Ue,stats:s});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=s.loading.start);const g=this.hls.mainForwardBufferInfo,m=g?g.end-g.len:0,w=(r.edge-m)*1e3,x=ni(r,w);if(r.requestScheduled+x<a?r.requestScheduled=a:r.requestScheduled+=x,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let H,P,me;if(r.canBlockReload&&r.endSN&&r.advanced){const De=this.hls.config.lowLatencyMode,be=r.lastPartSn,Ue=r.endSN,ot=r.lastPartIndex,Dt=ot!==-1,rt=be===Ue;Dt?rt?(P=Ue+1,me=De?0:ot):(P=be,me=De?ot+1:r.maxPartIndex):P=Ue+1;const Ft=r.age,Nt=Ft+r.ageHeader;let bt=Math.min(Nt-r.partTarget,r.targetduration*1.5);if(bt>0){if(Nt>r.targetduration*3)this.log(`Playlist last advanced ${Ft.toFixed(2)}s ago. Omitting segment and part directives.`),P=void 0,me=void 0;else if(n!=null&&n.tuneInGoal&&Nt-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${bt} with playlist age: ${r.age}`),bt=0;else{const ln=Math.floor(bt/r.targetduration);if(P+=ln,me!==void 0){const Ln=Math.round(bt%r.targetduration/r.partTarget);me+=Ln}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${Ft.toFixed(2)}s goal: ${bt} skip sn ${ln} to part ${me}`)}r.tuneInGoal=bt}if(H=this.getDeliveryDirectives(r,t.deliveryDirectives,P,me),De||!rt){r.requestScheduled=a,this.loadingPlaylist(d,H);return}}else(r.canBlockReload||r.canSkipUntil)&&(H=this.getDeliveryDirectives(r,t.deliveryDirectives,P,me));H&&P!==void 0&&r.canBlockReload&&(r.requestScheduled=s.loading.first+Math.max(x-o*2,x/2)),this.scheduleLoading(d,H,r)}else this.clearTimer()}scheduleLoading(e,t,n){const r=n||e.details;if(!r){this.loadingPlaylist(e,t);return}const s=self.performance.now(),a=r.requestScheduled;if(s>=a){this.loadingPlaylist(e,t);return}const o=a-s;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(o)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),o)}getDeliveryDirectives(e,t,n,r){let s=Ve(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,s=je.No),new Yt(n,r,s)}checkRetry(e){const t=e.details,n=Be(e),r=e.errorAction,{action:s,retryCount:a=0,retryConfig:o}=r||{},u=!!r&&!!o&&(s===St.RetryRequest||!r.resolved&&s===St.SendAlternateToPenaltyBox);if(u){var l;if(a>=o.maxNumRetry)return!1;if(n&&(l=e.context)!=null&&l.deliveryDirectives)this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const d=ze(o,a);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),d),this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" in ${d}ms`)}e.levelRetry=!0,r.resolved=!0}return u}}function Ka(i,e){if(i.length!==e.length)return!1;for(let t=0;t<i.length;t++)if(!ha(i[t].attrs,e[t].attrs))return!1;return!0}function ha(i,e,t){const n=i["STABLE-RENDITION-ID"];return n&&!t?n===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(r=>i[r]!==e[r])}function Io(i,e){return e.label.toLowerCase()===i.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(i.lang||"").toLowerCase())}class Gl extends To{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(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.MANIFEST_PARSED,this.onManifestParsed,this),e.on(h.LEVEL_LOADING,this.onLevelLoading,this),e.on(h.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(h.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(h.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.MANIFEST_PARSED,this.onManifestParsed,this),e.off(h.LEVEL_LOADING,this.onLevelLoading,this),e.off(h.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(h.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(h.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:n,groupId:r,details:s}=t,a=this.tracksInGroup[n];if(!a||a.groupId!==r){this.warn(`Audio track with id:${n} and group:${r} not found in active group ${a==null?void 0:a.groupId}`);return}const o=a.details;a.details=t.details,this.log(`Audio track ${n} "${a.name}" lang:${a.lang} group:${r} loaded [${s.startSN}-${s.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.audioGroups||null,r=this.groupIds;let s=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(o=>(r==null?void 0:r.indexOf(o))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const o=this.tracks.filter(m=>!n||n.indexOf(m.groupId)!==-1);if(o.length)this.selectDefaultTrack&&!o.some(m=>m.default)&&(this.selectDefaultTrack=!1),o.forEach((m,w)=>{m.id=w});else if(!s&&!this.tracksInGroup.length)return;this.tracksInGroup=o;const u=this.hls.config.audioPreference;if(!s&&u){const m=Le(u,o,Qt);if(m>-1)s=o[m];else{const w=Le(u,this.tracks);s=this.tracks[w]}}let l=this.findTrackId(s);l===-1&&s&&(l=this.findTrackId(null));const d={audioTracks:o};this.log(`Updating audio tracks, ${o.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(h.AUDIO_TRACKS_UPDATED,d);const g=this.trackId;if(l!==-1&&g===-1)this.setAudioTrack(l);else if(o.length&&g===-1){var a;const m=new Error(`No audio track selected for current audio group-ID(s): ${(a=this.groupIds)==null?void 0:a.join(",")} track count: ${o.length}`);this.warn(m.message),this.hls.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:m})}}}onError(e,t){t.fatal||!t.context||t.context.type===ge.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&Xe(e,r,Qt))return r;const s=Le(e,this.tracksInGroup,Qt);if(s>-1){const a=this.tracksInGroup[s];return this.setAudioTrack(s),a}else if(r){let a=t.loadLevel;a===-1&&(a=t.firstAutoLevel);const o=Xt(e,t.levels,n,a,Qt);if(o===-1)return null;t.nextLoadLevel=o}if(e.channels||e.audioCodec){const a=Le(e,n);if(a>-1)return n[a]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e],s=r.details&&!r.details.live;if(e===this.trackId&&r===n&&s||(this.log(`Switching to audio-track ${e} "${r.name}" lang:${r.lang} group:${r.groupId} channels:${r.channels}`),this.trackId=e,this.currentTrack=r,this.hls.trigger(h.AUDIO_TRACK_SWITCHING,E({},r)),s))return;const a=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(a)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(!(this.selectDefaultTrack&&!r.default)&&(!e||Xe(e,r,Qt)))return n}if(e){const{name:n,lang:r,assocLang:s,characteristics:a,audioCodec:o,channels:u}=e;for(let l=0;l<t.length;l++){const d=t[l];if(Xe({name:n,lang:r,assocLang:s,characteristics:a,audioCodec:o,channels:u},d,Qt))return l}for(let l=0;l<t.length;l++){const d=t[l];if(ha(e.attrs,d.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return l}for(let l=0;l<t.length;l++){const d=t[l];if(ha(e.attrs,d.attrs,["LANGUAGE"]))return l}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&Jt(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,s=this.getUrlWithDirectives(e.url,t),a=e.details,o=a==null?void 0:a.age;this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${o&&a.live?" age "+o.toFixed(1)+(a.type?" "+a.type||0:""):""} ${s}`),this.hls.trigger(h.AUDIO_TRACK_LOADING,{url:s,id:n,groupId:r,deliveryDirectives:t||null,track:e})}}class $l{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,n){if(this.queues===null||this.tracks===null)return;const r=this.queues[t];r.push(e),r.length===1&&!n&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const n={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(n,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const n={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(n)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const n=(t=e[0])==null?void 0:t.label;(n==="async-blocker"||n==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const t=this.queues[e];if(t.length){const r=t[0];try{r.execute()}catch(s){var n;if(r.onError(s),this.queues===null||this.tracks===null)return;const a=(n=this.tracks[e])==null?void 0:n.buffer;a!=null&&a.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues!==null&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return((t=this.queues)==null?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return e===null||t===null?"<destroyed>":`
|
|
${this.list("video")}
|
|
${this.list("audio")}
|
|
${this.list("audiovideo")}}`}list(e){var t,n;return(t=this.queues)!=null&&t[e]||(n=this.tracks)!=null&&n[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const n=(t=this.tracks)==null?void 0:t[e],r=n==null?void 0:n.buffer;return r?`SourceBuffer${r.updating?" updating":""}${n.ended?" ended":""}${n.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(n=>n.label).join(", "))||""}}const LA=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,UA="HlsJsTrackRemovedError";class Vl extends Error{constructor(e){super(e),this.name=UA}}class Zl extends O{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=n=>{var r;this.hls&&((r=this.mediaSource)==null?void 0:r.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=n=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=n=>{const{media:r,mediaSource:s}=this;n&&this.log("Media source opened"),!(!r||!s)&&(s.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(h.MEDIA_ATTACHED,{media:r,mediaSource:s}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:n,_objectUrl:r}=this;n!==r&&this.error(`Media element src was set while attaching MediaSource (${r} > ${n})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=oe(q(e.config.preferManagedMediaSource)),this.initTracks(),this.registerListeners()}hasSourceTypes(){return Object.keys(this.tracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(h.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.MANIFEST_PARSED,this.onManifestParsed,this),e.on(h.BUFFER_RESET,this.onBufferReset,this),e.on(h.BUFFER_APPENDING,this.onBufferAppending,this),e.on(h.BUFFER_CODECS,this.onBufferCodecs,this),e.on(h.BUFFER_EOS,this.onBufferEos,this),e.on(h.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(h.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(h.FRAG_PARSED,this.onFragParsed,this),e.on(h.FRAG_CHANGED,this.onFragChanged,this),e.on(h.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(h.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.MANIFEST_PARSED,this.onManifestParsed,this),e.off(h.BUFFER_RESET,this.onBufferReset,this),e.off(h.BUFFER_APPENDING,this.onBufferAppending,this),e.off(h.BUFFER_CODECS,this.onBufferCodecs,this),e.off(h.BUFFER_EOS,this.onBufferEos,this),e.off(h.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(h.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(h.FRAG_PARSED,this.onFragParsed,this),e.off(h.FRAG_CHANGED,this.onFragChanged,this),e.off(h.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const n={};if(this.operationQueue){const s=this.isUpdating();s||this.operationQueue.removeBlockers();const a=this.isQueued();(s||a)&&this.warn(`Transfering MediaSource with${a?" operations in queue":""}${s?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const r=this.transferData;return!this.sourceBufferCount&&r&&r.mediaSource===t?p(n,r.tracks):this.sourceBuffers.forEach(s=>{const[a]=s;a&&(n[a]=p({},this.tracks[a]),this.removeBuffer(a)),s[0]=s[1]=null}),{media:e,mediaSource:t,tracks:n}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var n;let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsTotal=r,this.log(`${r} bufferCodec event(s) expected.`),(n=this.transferData)!=null&&n.mediaSource&&this.sourceBufferCount&&r&&this.bufferCreated()}onMediaAttaching(e,t){const n=this.media=t.media,r=q(this.appendSource);if(this.transferData=this.overrides=void 0,n&&r){const s=!!t.mediaSource;(s||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const a=this.mediaSource=t.mediaSource||new r;if(this.assignMediaSource(a),s)this._objectUrl=n.src,this.attachTransferred();else{const o=this._objectUrl=self.URL.createObjectURL(a);if(this.appendSource)try{n.removeAttribute("src");const u=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||u&&a instanceof u,Fo(n),Wl(n,o),n.load()}catch(u){n.src=o}else n.src=o}n.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,n;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(n=e.constructor)==null?void 0:n.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const n=this.tracks,r=t.tracks,s=r?Object.keys(r):null,a=s?s.length:0,o=()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()};if(r&&s&&a){if(!this.tracksReady){this.hls.config.startFragPrefetch=!0,this.log("attachTransferred: waiting for SourceBuffer track info");return}if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})
|
|
required tracks: ${Lt(n,(u,l)=>u==="initSegment"?void 0:l)};
|
|
transfer tracks: ${Lt(r,(u,l)=>u==="initSegment"?void 0:l)}}`),!pe(r,n)){t.mediaSource=null,t.tracks=void 0;const u=e.currentTime,l=this.details,d=Math.max(u,(l==null?void 0:l.fragments[0].start)||0);if(d-u>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${u} -> ${d}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${d} currentTime: ${u}`),this.onMediaDetaching(h.MEDIA_DETACHING,{}),this.onMediaAttaching(h.MEDIA_ATTACHING,t),e.currentTime=d;return}this.transferData=void 0,s.forEach(u=>{const l=u,d=r[l];if(d){const g=d.buffer;if(g){const m=this.fragmentTracker,w=d.id;if(m.hasFragments(w)||m.hasParts(w)){const P=En.getBuffered(g);m.detectEvictedFragments(l,P,w,null,!0)}const x=Do(l),H=[l,g];this.sourceBuffers[x]=H,g.updating&&this.operationQueue&&this.operationQueue.prependBlocker(l),this.trackSourceBuffer(l,d)}}}),o(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),o()}get mediaSourceOpenOrEnded(){var e;const t=(e=this.mediaSource)==null?void 0:e.readyState;return t==="open"||t==="ended"}onMediaDetaching(e,t){const n=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:r,mediaSource:s,_objectUrl:a}=this;if(s){if(this.log(`media source ${n?"transferring":"detaching"}`),n)this.sourceBuffers.forEach(([o])=>{o&&this.removeBuffer(o)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const o=s.readyState==="open";try{const u=s.sourceBuffers;for(let l=u.length;l--;)o&&u[l].abort(),s.removeSourceBuffer(u[l]);o&&s.endOfStream()}catch(u){this.warn(`onMediaDetaching: ${u.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(s.removeEventListener("startstreaming",this._onStartStreaming),s.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}r&&(r.removeEventListener("emptied",this._onMediaEmptied),n||(a&&self.URL.revokeObjectURL(a),this.mediaSrc===a?(r.removeAttribute("src"),this.appendSource&&Fo(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(h.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const n=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),n)try{var r;(r=this.mediaSource)!=null&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(n)}catch(s){this.warn(`onBufferReset ${e}`,s)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[Do(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new $l(this.tracks)}onBufferCodecs(e,t){const n=this.tracks,r=Object.keys(t);this.log(`BUFFER_CODECS: "${r}" (current SB count ${this.sourceBufferCount})`);const s="audiovideo"in t&&(n.audio||n.video)||n.audiovideo&&("audio"in t||"video"in t),a=!s&&this.sourceBufferCount&&this.media&&r.some(o=>!n[o]);if(s||a){this.warn(`Unsupported transition between "${Object.keys(n)}" and "${r}" SourceBuffers`);return}r.forEach(o=>{var u,l,d;const g=t[o],{id:m,codec:w,levelCodec:x,container:H,metadata:P,supplemental:me}=g;let De=n[o];const be=(u=this.transferData)==null||(l=u.tracks)==null?void 0:l[o],Ue=be!=null&&be.buffer?be:De,ot=(Ue==null?void 0:Ue.pendingCodec)||(Ue==null?void 0:Ue.codec),Dt=Ue==null?void 0:Ue.levelCodec;De||(De=n[o]={buffer:void 0,listeners:[],codec:w,supplemental:me,container:H,levelCodec:x,metadata:P,id:m});const rt=nn(ot,Dt),Ft=rt==null?void 0:rt.replace(LA,"$1");let Nt=nn(w,x);const bt=(d=Nt)==null?void 0:d.replace(LA,"$1");Nt&&rt&&Ft!==bt&&(o.slice(0,5)==="audio"&&(Nt=xt(Nt,this.appendSource)),this.log(`switching codec ${ot} to ${Nt}`),Nt!==(De.pendingCodec||De.codec)&&(De.pendingCodec=Nt),De.container=H,this.appendChangeType(o,H,Nt))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&this.mediaSourceOpenOrEnded&&this.checkPendingTracks()}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const n=this.tracks[t];return e[t]={id:n.id,container:n.container,codec:n.codec,levelCodec:n.levelCodec},e},{})}appendChangeType(e,t,n){const r=`${t};codecs=${n}`,s={label:`change-type=${r}`,execute:()=>{const a=this.tracks[e];if(a){const o=a.buffer;o!=null&&o.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),o.changeType(r),a.codec=n,a.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:a=>{this.warn(`Failed to change ${e} SourceBuffer type`,a)}};this.append(s,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const n=e.start,r=n+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(n,ie.MAIN))==null?void 0:t.gap)===!0)return;const a={label:"block-audio",execute:()=>{var o;const u=this.tracks.video;(this.lastVideoAppendEnd>r||u!=null&&u.buffer&&En.isBuffered(u.buffer,r)||((o=this.fragmentTracker.getAppendedFrag(r,ie.MAIN))==null?void 0:o.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:o=>{this.warn("Error executing block-audio operation",o)}};this.blockedAudioAppend={op:a,frag:e},this.append(a,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:n}=this,{data:r,type:s,parent:a,frag:o,part:u,chunkMeta:l}=t,d=l.buffering[s],g=o.sn,m=self.performance.now();d.start=m;const w=o.stats.buffering,x=u?u.stats.buffering:null;w.start===0&&(w.start=m),x&&x.start===0&&(x.start=m);const H=n.audio;let P=!1;s==="audio"&&(H==null?void 0:H.container)==="audio/mpeg"&&(P=!this.lastMpegAudioChunk||l.id===1||this.lastMpegAudioChunk.sn!==l.sn,this.lastMpegAudioChunk=l);const me=this.tracks.video,De=me==null?void 0:me.buffer;if(De&&g!=="initSegment"){const ot=u||o,Dt=this.blockedAudioAppend;if(s==="audio"&&a!=="main"&&!this.blockedAudioAppend){const Ft=ot.start+ot.duration*.05,Nt=De.buffered,bt=this.currentOp("video");!Nt.length&&!bt?this.blockAudio(ot):!bt&&!En.isBuffered(De,Ft)&&this.lastVideoAppendEnd<Ft&&this.blockAudio(ot)}else if(s==="video"){const rt=ot.end;if(Dt){const Ft=Dt.frag.start;(rt>Ft||rt<this.lastVideoAppendEnd||En.isBuffered(De,Ft))&&this.unblockAudio()}this.lastVideoAppendEnd=rt}}const be=(u||o).start,Ue={label:`append-${s}`,execute:()=>{if(d.executeStart=self.performance.now(),P){const ot=this.tracks[s];if(ot){const Dt=ot.buffer;if(Dt){const rt=be-Dt.timestampOffset;Math.abs(rt)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${be} (delta: ${rt}) sn: ${g})`),Dt.timestampOffset=be)}}}this.appendExecutor(r,s)},onStart:()=>{},onComplete:()=>{const ot=self.performance.now();d.executeEnd=d.end=ot,w.first===0&&(w.first=ot),x&&x.first===0&&(x.first=ot);const Dt={};this.sourceBuffers.forEach(([rt,Ft])=>{rt&&(Dt[rt]=En.getBuffered(Ft))}),this.appendErrors[s]=0,s==="audio"||s==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(h.BUFFER_APPENDED,{type:s,frag:o,part:u,chunkMeta:l,parent:o.type,timeRanges:Dt})},onError:ot=>{var Dt;const rt={type:le.MEDIA_ERROR,parent:o.type,details:Q.BUFFER_APPEND_ERROR,sourceBufferName:s,frag:o,part:u,chunkMeta:l,error:ot,err:ot,fatal:!1},Ft=(Dt=this.media)==null?void 0:Dt.error;if(ot.code===DOMException.QUOTA_EXCEEDED_ERR)rt.details=Q.BUFFER_FULL_ERROR;else if(ot.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!Ft)rt.errorAction=ue(!0);else if(ot.name===UA&&this.sourceBufferCount===0)rt.errorAction=ue(!0);else{const Nt=++this.appendErrors[s];this.warn(`Failed ${Nt}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${s}" sourceBuffer (${Ft||"no media error"})`),(Nt>=this.hls.config.appendErrorMaxRetry||Ft)&&(rt.fatal=!0)}this.hls.trigger(h.ERROR,rt)}};this.append(Ue,s,this.isPending(this.tracks[s]))}getFlushOp(e,t,n){return this.log(`queuing "${e}" remove ${t}-${n}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,n)},onStart:()=>{},onComplete:()=>{this.hls.trigger(h.BUFFER_FLUSHED,{type:e})},onError:r=>{this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`,r)}}}onBufferFlushing(e,t){const{type:n,startOffset:r,endOffset:s}=t;n?this.append(this.getFlushOp(n,r,s),n):this.sourceBuffers.forEach(([a])=>{a&&this.append(this.getFlushOp(a,r,s),a)})}onFragParsed(e,t){const{frag:n,part:r}=t,s=[],a=r?r.elementaryStreams:n.elementaryStreams;a[_.AUDIOVIDEO]?s.push("audiovideo"):(a[_.AUDIO]&&s.push("audio"),a[_.VIDEO]&&s.push("video"));const o=()=>{const u=self.performance.now();n.stats.buffering.end=u,r&&(r.stats.buffering.end=u);const l=r?r.stats:n.stats;this.hls.trigger(h.FRAG_BUFFERED,{frag:n,part:r,stats:l,id:n.type})};s.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers(o,s).catch(u=>{this.warn(`Fragment buffered callback ${u}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{var t,n;return e&&(!((t=this.tracks[e])!=null&&t.ended)||((n=this.tracks[e])==null?void 0:n.ending))})}onBufferEos(e,t){var n;this.sourceBuffers.forEach(([a])=>{if(a){const o=this.tracks[a];(!t.type||t.type===a)&&(o.ending=!0,o.ended||(o.ended=!0,this.log(`${a} buffer reached EOS`)))}});const r=((n=this.overrides)==null?void 0:n.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([a])=>{var o;return a&&!((o=this.tracks[a])!=null&&o.ended)})&&(r?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:a}=this;if(!a||a.readyState!=="open"){a&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${a.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),a.endOfStream(),this.hls.trigger(h.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(h.BUFFERED_TO_END,void 0)))}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(e!==null){const t=this.tracks[e];t&&(t.ending=!1)}})}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){const e=this.getDurationAndRange();e&&this.blockUntilOpen(()=>this.updateMediaSource(e))}onError(e,t){if(t.details===Q.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;N(r)&&r!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||t===null||!this.sourceBufferCount)return;const r=e.config,s=n.currentTime,a=t.levelTargetDuration,o=t.live&&r.liveBackBufferLength!==null?r.liveBackBufferLength:r.backBufferLength;if(N(o)&&o>=0){const u=Math.max(o,a),l=Math.floor(s/a)*a-u;this.flushBackBuffer(s,a,l)}if(N(r.frontBufferFlushThreshold)&&r.frontBufferFlushThreshold>0){const u=Math.max(r.maxBufferLength,r.frontBufferFlushThreshold),l=Math.max(u,a),d=Math.floor(s/a)*a+l;this.flushFrontBuffer(s,a,d)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,s])=>{if(s){const o=En.getBuffered(s);if(o.length>0&&n>o.start(0)){var a;this.hls.trigger(h.BACK_BUFFER_REACHED,{bufferEnd:n});const u=this.tracks[r];if((a=this.details)!=null&&a.live)this.hls.trigger(h.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(u!=null&&u.ended){this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(h.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,s])=>{if(s){const a=En.getBuffered(s),o=a.length;if(o<2)return;const u=a.start(o-1),l=a.end(o-1);if(n>u||e>=u&&e<=l)return;this.hls.trigger(h.BUFFER_FLUSHING,{startOffset:u,endOffset:1/0,type:r})}})}getDurationAndRange(){var e;const{details:t,mediaSource:n}=this;if(!t||!this.media||(n==null?void 0:n.readyState)!=="open")return null;const r=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&t.live&&n.setLiveSeekableRange){const l=Math.max(0,t.fragmentStart),d=Math.max(l,r);return{duration:1/0,start:l,end:d}}return{duration:1/0}}const s=(e=this.overrides)==null?void 0:e.duration;if(s)return N(s)?{duration:s}:null;const a=this.media.duration,o=N(n.duration)?n.duration:0;return r>o&&r>a||!N(a)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(N(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),r.duration=e),t!==void 0&&n!==void 0&&(this.log(`MediaSource duration is set to ${r.duration}. Setting seekable range to ${t}-${n}.`),r.setLiveSeekableRange(t,n)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:n}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${Lt(n)}`),this.tracksReady){var r;const s=(r=this.transferData)==null?void 0:r.tracks;s&&Object.keys(s).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,n])=>{if(t){const r=this.tracks[t];e[t]={buffer:n,container:r.container,codec:r.codec,supplemental:r.supplemental,levelCodec:r.levelCodec,id:r.id,metadata:r.metadata}}}),this.hls.trigger(h.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach(([t])=>{this.executeNext(t)})}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:n}=this;if(!n)throw new Error("createSourceBuffers called when mediaSource was null");for(const s in e){const a=s,o=e[a];if(this.isPending(o)){const u=this.getTrackCodec(o,a),l=`${o.container};codecs=${u}`;o.codec=u,this.log(`creating sourceBuffer(${l})${this.currentOp(a)?" Queued":""} ${Lt(o)}`);try{const d=n.addSourceBuffer(l),g=Do(a),m=[a,d];t[g]=m,o.buffer=d}catch(d){var r;this.error(`error while trying to add sourceBuffer: ${d.message}`),this.shiftAndExecuteNext(a),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[a],this.hls.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:d,sourceBufferName:a,mimeType:l,parent:o.id});return}this.trackSourceBuffer(a,o)}}this.bufferCreated()}getTrackCodec(e,t){const n=e.supplemental;let r=e.codec;n&&(t==="video"||t==="audiovideo")&&Ye(n,"video")&&(r=Wt(r,n));const s=nn(r,e.levelCodec);return s?t.slice(0,5)==="audio"?xt(s,this.appendSource):s:""}trackSourceBuffer(e,t){const n=t.buffer;if(!n)return;const r=this.getTrackCodec(t,e);this.tracks[e]={buffer:n,codec:r,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(s,a)=>{const o=a.removedRanges;o!=null&&o.length&&this.hls.trigger(h.BUFFER_FLUSHED,{type:s})})}get mediaSrc(){var e,t;const n=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return n==null?void 0:n.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const n=this.currentOp(e);n&&(n.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var n;const r=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n=this.mediaSource)==null?void 0:n.readyState}`);this.error(`${r}`,t),this.hls.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const s=this.currentOp(e);s&&s.onError(r)}removeExecutor(e,t,n){const{media:r,mediaSource:s}=this,a=this.tracks[e],o=a==null?void 0:a.buffer;if(!r||!s||!o){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const u=N(r.duration)?r.duration:1/0,l=N(s.duration)?s.duration:1/0,d=Math.max(0,t),g=Math.min(n,u,l);g>d&&(!a.ending||a.ended)?(a.ended=!1,this.log(`Removing [${d},${g}] from the ${e} SourceBuffer`),o.remove(d,g)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new Vl(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);n.ending=!1,n.ended=!1,r.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(t=>{this.warn(`SourceBuffer blocked callback ${t}`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(t){this.warn(`Callback run without blocking ${this.operationQueue} ${t}`)}}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:n}=this,r=t.map(a=>this.appendBlocker(a));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(r).then(a=>{n===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var n;const r=(n=this.tracks[t])==null?void 0:n.buffer;!r||r.updating||this.shiftAndExecuteNext(t)})}append(e,t,n){this.operationQueue&&this.operationQueue.append(e,t,n)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,n){const r=this.tracks[e];if(!r)return;const s=r.buffer;if(!s)return;const a=n.bind(this,e);r.listeners.push({event:t,listener:a}),s.addEventListener(t,a)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const n=t.buffer;n&&(t.listeners.forEach(r=>{n.removeEventListener(r.event,r.listener)}),t.listeners.length=0)}}function Fo(i){const e=i.querySelectorAll("source");[].slice.call(e).forEach(t=>{i.removeChild(t)})}function Wl(i,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,i.appendChild(t)}function Do(i){return i==="audio"?1:0}class Ro{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(h.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(h.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(h.MANIFEST_PARSED,this.onManifestParsed,this),e.on(h.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(h.BUFFER_CODECS,this.onBufferCodecs,this),e.on(h.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(h.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(h.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(h.MANIFEST_PARSED,this.onManifestParsed,this),e.off(h.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(h.BUFFER_CODECS,this.onBufferCodecs,this),e.off(h.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&N(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter((r,s)=>this.isLevelAllowed(r)&&s<=e);return this.clientRect=null,Ro.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,!t.width&&!t.height&&(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}isLevelAllowed(e){return!this.restrictedLevels.some(n=>e.bitrate===n.bitrate&&e.width===n.width&&e.height===n.height)}static getMaxLevelByMediaSize(e,t,n){if(!(e!=null&&e.length))return-1;const r=(o,u)=>u?o.width!==u.width||o.height!==u.height:!0;let s=e.length-1;const a=Math.max(t,n);for(let o=0;o<e.length;o+=1){const u=e[o];if((u.width>=a||u.height>=a)&&r(u,e[o+1])){s=o;break}}return s}}const Oi={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},jl={HLS:"h"},ga={OBJECT:"CMCD-Object",REQUEST:"CMCD-Request",SESSION:"CMCD-Session",STATUS:"CMCD-Status"},PA={[ga.OBJECT]:["br","d","ot","tb"],[ga.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[ga.SESSION]:["cid","pr","sf","sid","st","v"],[ga.STATUS]:["bs","rtp"]};class xs{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof xs?n:new xs(n))),this.value=e,this.params=t}}const Uo="Dict";function QA(i){return Array.isArray(i)?JSON.stringify(i):i instanceof Map?"Map{}":i instanceof Set?"Set{}":typeof i=="object"?JSON.stringify(i):String(i)}function MA(i,e,t,n){return new Error(`failed to ${i} "${QA(e)}" as ${t}`,{cause:n})}function As(i,e,t){return MA("serialize",i,e,t)}class ko{constructor(e){this.description=e}}const Ga="Bare Item",Jl="Boolean";function ql(i){if(typeof i!="boolean")throw As(i,Jl);return i?"?1":"?0"}function eu(i){return btoa(String.fromCharCode(...i))}const Ji="Byte Sequence";function Oo(i){if(ArrayBuffer.isView(i)===!1)throw As(i,Ji);return`:${eu(i)}:`}const tu="Integer";function nu(i){return i<-999999999999999||999999999999999<i}function NA(i){if(nu(i))throw As(i,tu);return i.toString()}function ru(i){return`@${NA(i.getTime()/1e3)}`}function HA(i,e){if(i<0)return-HA(-i,e);const t=Math.pow(10,e);if(Math.abs(i*t%1-.5)<Number.EPSILON){const r=Math.floor(i*t);return(r%2===0?r:r+1)/t}else return Math.round(i*t)/t}const iu="Decimal";function su(i){const e=HA(i,3);if(Math.floor(Math.abs(e)).toString().length>12)throw As(i,iu);const t=e.toString();return t.includes(".")?t:`${t}.0`}const au="String",ou=/[\x00-\x1f\x7f]+/;function KA(i){if(ou.test(i))throw As(i,au);return`"${i.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Au(i){return i.description||i.toString().slice(7,-1)}const Po="Token";function Qo(i){const e=Au(i);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw As(e,Po);return e}function Ei(i){switch(typeof i){case"number":if(!N(i))throw As(i,Ga);return Number.isInteger(i)?NA(i):su(i);case"string":return KA(i);case"symbol":return Qo(i);case"boolean":return ql(i);case"object":if(i instanceof Date)return ru(i);if(i instanceof Uint8Array)return Oo(i);if(i instanceof ko)return Qo(i);default:throw As(i,Ga)}}const pa="Key";function Mo(i){if(/^[a-z*][a-z0-9\-_.*]*$/.test(i)===!1)throw As(i,pa);return i}function No(i){return i==null?"":Object.entries(i).map(([e,t])=>t===!0?`;${Mo(e)}`:`;${Mo(e)}=${Ei(t)}`).join("")}function Ho(i){return i instanceof xs?`${Ei(i.value)}${No(i.params)}`:Ei(i)}function Ko(i){return`(${i.value.map(Ho).join(" ")})${No(i.params)}`}function lu(i,e={whitespace:!0}){if(typeof i!="object")throw As(i,Uo);const t=i instanceof Map?i.entries():Object.entries(i),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,s])=>{s instanceof xs||(s=new xs(s));let a=Mo(r);return s.value===!0?a+=No(s.params):(a+="=",Array.isArray(s.value)?a+=Ko(s):a+=Ho(s)),a}).join(`,${n}`)}function uu(i,e){return lu(i,e)}function cu(i){return i==="ot"||i==="sf"||i==="st"}function fu(i){return typeof i=="number"?N(i):i!=null&&i!==""&&i!==!1}function du(i,e){const t=new URL(i),n=new URL(e);if(t.origin!==n.origin)return i;const r=t.pathname.split("/").slice(1),s=n.pathname.split("/").slice(1,-1);for(;r[0]===s[0];)r.shift(),s.shift();for(;s.length;)s.shift(),r.unshift("..");return r.join("/")}const $a=i=>Math.round(i),hu=(i,e)=>(e!=null&&e.baseUrl&&(i=du(i,e.baseUrl)),encodeURIComponent(i)),Va=i=>$a(i/100)*100,GA={br:$a,d:$a,bl:Va,dl:Va,mtp:Va,nor:hu,rtp:Va,tb:$a};function $A(i,e){const t={};if(i==null||typeof i!="object")return t;const n=Object.keys(i).sort(),r=p({},GA,e==null?void 0:e.formatters),s=e==null?void 0:e.filter;return n.forEach(a=>{if(s!=null&&s(a))return;let o=i[a];const u=r[a];u&&(o=u(o,e)),!(a==="v"&&o===1)&&(a=="pr"&&o===1||fu(o)&&(cu(a)&&typeof o=="string"&&(o=new ko(o)),t[a]=o))}),t}function Go(i,e={}){return i?uu($A(i,e),p({whitespace:!1},e)):""}function VA(i,e={}){const t={};if(!i)return t;const n=Object.entries(i),r=Object.entries(PA).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),s=n.reduce((a,o)=>{var u,l;const[d,g]=o,m=((u=r.find(w=>w[1].includes(d)))===null||u===void 0?void 0:u[0])||ga.REQUEST;return(l=a[m])!==null&&l!==void 0||(a[m]={}),a[m][d]=g,a},{});return Object.entries(s).reduce((a,[o,u])=>(a[o]=Go(u,e),a),t)}function $o(i,e,t){return p(i,VA(e,t))}const gu="CMCD";function pu(i,e={}){if(!i)return"";const t=Go(i,e);return`${gu}=${encodeURIComponent(t)}`}const ZA=/CMCD=[^&#]+/;function mu(i,e,t){const n=pu(e,t);if(!n)return i;if(ZA.test(i))return i.replace(ZA,n);const r=i.includes("?")?"&":"?";return`${i}${r}${n}`}class Za{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=r=>{try{this.apply(r,{ot:Oi.MANIFEST,su:!this.initialized})}catch(s){this.hls.logger.warn("Could not generate manifest CMCD data.",s)}},this.applyFragmentData=r=>{try{const{frag:s,part:a}=r,o=this.hls.levels[s.level],u=this.getObjectType(s),l={d:(a||s).duration*1e3,ot:u};(u===Oi.VIDEO||u===Oi.AUDIO||u==Oi.MUXED)&&(l.br=o.bitrate/1e3,l.tb=this.getTopBandwidth(u)/1e3,l.bl=this.getBufferLength(u));const d=a?this.getNextPart(a):this.getNextFrag(s);d!=null&&d.url&&d.url!==s.url&&(l.nor=d.url),this.apply(r,l)}catch(s){this.hls.logger.warn("Could not generate segment CMCD data.",s)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||e.sessionId,this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(h.MEDIA_DETACHED,this.onMediaDetached,this),e.on(h.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(h.MEDIA_DETACHED,this.onMediaDetached,this),e.off(h.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,r;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(r=t.tracks.video)==null?void 0:r.buffer}createData(){var e;return{v:1,sf:jl.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){p(t,this.createData());const n=t.ot===Oi.INIT||t.ot===Oi.VIDEO||t.ot===Oi.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:r}=this;r&&(t=Object.keys(t).reduce((a,o)=>(r.includes(o)&&(a[o]=t[o]),a),{}));const s={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),$o(e.headers,t,s)):e.url=mu(e.url,t,s)}getNextFrag(e){var t;const n=(t=this.hls.levels[e.level])==null?void 0:t.details;if(n){const r=e.sn-n.startSN;return n.fragments[r+1]}}getNextPart(e){var t,n;const{index:r,fragment:s}=e,a=(t=this.hls.levels[s.level])==null||(n=t.details)==null?void 0:n.partList;if(a){const{sn:o}=s;for(let u=a.length-1;u>=0;u--){const l=a[u];if(l.index===r&&l.fragment.sn===o)return a[u+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Oi.TIMED_TEXT;if(e.sn==="initSegment")return Oi.INIT;if(t==="audio")return Oi.AUDIO;if(t==="main")return this.hls.audioTracks.length?Oi.VIDEO:Oi.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===Oi.AUDIO)n=r.audioTracks;else{const s=r.maxAutoLevel,a=s>-1?s+1:r.levels.length;n=r.levels.slice(0,a)}return n.forEach(s=>{s.bitrate>t&&(t=s.bitrate)}),t>0?t:NaN}getBufferLength(e){const t=this.media,n=e===Oi.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:En.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new n(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,a,o){t(s),this.loader.load(s,a,o)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new n(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,a,o){t(s),this.loader.load(s,a,o)}}}}const Wa=3e5;class vu extends O{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(h.MANIFEST_PARSED,this.onManifestParsed,this),e.on(h.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(h.MANIFEST_PARSED,this.onManifestParsed,this),e.off(h.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(n=>n!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===St.SendAlternateToPenaltyBox&&n.flags===Tt.MoveAllAlternatesMatchingHost){const r=this.levels;let s=this._pathwayPriority,a=this.pathwayId;if(t.context){const{groupId:o,pathwayId:u,type:l}=t.context;o&&r?a=this.getPathwayForGroupId(o,l,a):u&&(a=u)}a in this.penalizedPathways||(this.penalizedPathways[a]=performance.now()),!s&&r&&(s=this.pathways()),s&&s.length>1&&(this.updatePathwayPriority(s),n.resolved=this.pathwayId!==a),n.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${a} levels: ${r&&r.length} priorities: ${Lt(s)} penalized: ${Lt(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this._pathwayPriority=e;let t;const n=this.penalizedPathways,r=performance.now();Object.keys(n).forEach(s=>{r-n[s]>Wa&&delete n[s]});for(let s=0;s<e.length;s++){const a=e[s];if(a in n)continue;if(a===this.pathwayId)return;const o=this.hls.nextLoadLevel,u=this.hls.levels[o];if(t=this.getLevelsForPathway(a),t.length>0){this.log(`Setting Pathway to "${a}"`),this.pathwayId=a,Si(t),this.hls.trigger(h.LEVELS_UPDATED,{levels:t});const l=this.hls.levels[o];u&&l&&this.levels&&(l.attrs["STABLE-VARIANT-ID"]!==u.attrs["STABLE-VARIANT-ID"]&&l.bitrate!==u.bitrate&&this.log(`Unstable Pathways change from bitrate ${u.bitrate} to ${l.bitrate}`),this.hls.nextLoadLevel=o);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let s=0;s<r.length;s++)if(t===ge.AUDIO_TRACK&&r[s].hasAudioGroup(e)||t===ge.SUBTITLE_TRACK&&r[s].hasSubtitleGroup(e))return r[s].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},r={};e.forEach(s=>{const{ID:a,"BASE-ID":o,"URI-REPLACEMENT":u}=s;if(t.some(d=>d.pathwayId===a))return;const l=this.getLevelsForPathway(o).map(d=>{const g=new Bn(d.attrs);g["PATHWAY-ID"]=a;const m=g.AUDIO&&`${g.AUDIO}_clone_${a}`,w=g.SUBTITLES&&`${g.SUBTITLES}_clone_${a}`;m&&(n[g.AUDIO]=m,g.AUDIO=m),w&&(r[g.SUBTITLES]=w,g.SUBTITLES=w);const x=za(d.uri,g["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",u),H=new Pt({attrs:g,audioCodec:d.audioCodec,bitrate:d.bitrate,height:d.height,name:d.name,url:x,videoCodec:d.videoCodec,width:d.width});if(d.audioGroups)for(let P=1;P<d.audioGroups.length;P++)H.addGroupId("audio",`${d.audioGroups[P]}_clone_${a}`);if(d.subtitleGroups)for(let P=1;P<d.subtitleGroups.length;P++)H.addGroupId("text",`${d.subtitleGroups[P]}_clone_${a}`);return H});t.push(...l),Vo(this.audioTracks,n,u,a),Vo(this.subtitleTracks,r,u,a)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let r;try{r=new self.URL(e)}catch(d){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const d=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+d)}const s={responseType:"json",url:r.href},a=t.steeringManifestLoadPolicy.default,o=a.errorRetry||a.timeoutRetry||{},u={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},l={onSuccess:(d,g,m,w)=>{this.log(`Loaded steering manifest: "${r}"`);const x=d.data;if((x==null?void 0:x.VERSION)!==1){this.log(`Steering VERSION ${x.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=x.TTL;const{"RELOAD-URI":H,"PATHWAY-CLONES":P,"PATHWAY-PRIORITY":me}=x;if(H)try{this.uri=new self.URL(H,r).href}catch(be){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${H}`);return}this.scheduleRefresh(this.uri||m.url),P&&this.clonePathways(P);const De={steeringManifest:x,url:r.toString()};this.hls.trigger(h.STEERING_MANIFEST_LOADED,De),me&&this.updatePathwayPriority(me)},onError:(d,g,m,w)=>{if(this.log(`Error loading steering manifest: ${d.code} ${d.text} (${g.url})`),this.stopLoad(),d.code===410){this.enabled=!1,this.log(`Steering manifest ${g.url} no longer available`);return}let x=this.timeToLoad*1e3;if(d.code===429){const H=this.loader;if(typeof(H==null?void 0:H.getResponseHeader)=="function"){const P=H.getResponseHeader("Retry-After");P&&(x=parseFloat(P)*1e3)}this.log(`Steering manifest ${g.url} rate limited`);return}this.scheduleRefresh(this.uri||g.url,x)},onTimeout:(d,g,m)=>{this.log(`Timeout loading steering manifest (${g.url})`),this.scheduleRefresh(this.uri||g.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(s,u,l)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var n;const r=(n=this.hls)==null?void 0:n.media;if(r&&!r.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function Vo(i,e,t,n){i&&Object.keys(e).forEach(r=>{const s=i.filter(a=>a.groupId===r).map(a=>{const o=p({},a);return o.details=void 0,o.attrs=new Bn(o.attrs),o.url=o.attrs.URI=za(a.url,a.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),o.groupId=o.attrs["GROUP-ID"]=e[r],o.attrs["PATHWAY-ID"]=n,o});i.push(...s)})}function za(i,e,t,n){const{HOST:r,PARAMS:s,[t]:a}=n;let o;e&&(o=a==null?void 0:a[e],o&&(i=o));const u=new self.URL(i);return r&&!o&&(u.host=r),s&&Object.keys(s).sort().forEach(l=>{l&&u.searchParams.set(l,s[l])}),u.href}function Pi(i,e,t){$i(i,e,t),i.addEventListener(e,t)}function $i(i,e,t){i.removeEventListener(e,t)}class Us extends O{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.mediaKeys=null,this.setMediaKeysQueue=Us.CDMCleanupPromise?[Us.CDMCleanupPromise]:[],this.onMediaEncrypted=t=>{const{initDataType:n,initData:r}=t,s=`"${t.type}" event: init data type: "${n}"`;if(this.debug(s),r!==null){if(!this.keyFormatPromise){let a=Object.keys(this.keySystemAccessPromises);a.length||(a=Er(this.config));const o=a.map(hr).filter(u=>!!u);this.keyFormatPromise=this.getKeyFormatPromise(o)}this.keyFormatPromise.then(a=>{const o=Qn(a);let u,l;if(n==="sinf"){if(o!==Zn.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${n}" for selected key-system ${o}`);return}const x=kt(new Uint8Array(r));try{const H=Jr(JSON.parse(x).sinf),P=Ce(H);if(!P)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");u=new Uint8Array(P.subarray(8,24)),l=Zn.FAIRPLAY}catch(H){this.warn(`${s} Failed to parse sinf: ${H}`);return}}else{if(o!==Zn.WIDEVINE&&o!==Zn.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${n}" for selected key-system ${o}`);return}const x=Vt(r),H=x.filter(me=>!!me.systemId&&ur(me.systemId)===o);H.length>1&&this.warn(`${s} Using first of ${H.length} pssh found for selected key-system ${o}`);const P=H[0];if(!P){x.length===0||x.some(me=>!me.systemId)?this.warn(`${s} contains incomplete or invalid pssh data`):this.log(`ignoring ${s} for ${x.map(me=>ur(me.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(l=ur(P.systemId),P.version===0&&P.data)if(l===Zn.WIDEVINE){const me=P.data.length-22;u=new Uint8Array(P.data.subarray(me,me+16))}else l===Zn.PLAYREADY&&(u=nr(P.data))}if(!l||!u)return;const d=j.hexDump(u),{keyIdToKeySessionPromise:g,mediaKeySessions:m}=this;let w=g[d];for(let x=0;x<m.length;x++){const H=m[x],P=H.decryptdata;if(!P.keyId)continue;const me=j.hexDump(P.keyId);if(d===me||P.uri.replace(/-/g,"").indexOf(d)!==-1){if(w=g[me],P.pssh)break;delete g[me],P.pssh=new Uint8Array(r),P.keyId=u,w=g[d]=w.then(()=>this.generateRequestWithPreferredKeySession(H,n,r,"encrypted-event-key-match")),w.catch(De=>this.handleError(De));break}}if(!w){if(l!==o){this.log(`Ignoring "${t.type}" event with ${l} init data for selected key-system ${o}`);return}w=g[d]=this.getKeySystemSelectionPromise([l]).then(({keySystem:x,mediaKeys:H})=>{var P;this.throwIfDestroyed();const me=new Nr("ISO-23001-7",d,(P=hr(x))!=null?P:"");return me.pssh=new Uint8Array(r),me.keyId=u,this.attemptSetMediaKeys(x,H).then(()=>{this.throwIfDestroyed();const De=this.createMediaKeySessionContext({decryptdata:me,keySystem:x,mediaKeys:H});return this.generateRequestWithPreferredKeySession(De,n,r,"encrypted-event-no-match")})}),w.catch(x=>this.handleError(x))}})}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.onDestroying(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(h.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(h.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(h.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(h.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(h.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(h.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(h.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(h.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(h.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(h.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,r=t[e];if(r)return r.licenseUrl;if(e===Zn.WIDEVINE&&n)return n}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(t===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,n=t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(a,o,u)=>!!a&&u.indexOf(a)===o,r=t.map(a=>a.audioCodec).filter(n),s=t.map(a=>a.videoCodec).filter(n);return r.length+s.length===0&&s.push("avc1.42e01e"),new Promise((a,o)=>{const u=l=>{const d=l.shift();this.getMediaKeysPromise(d,r,s).then(g=>a({keySystem:d,mediaKeys:g})).catch(g=>{l.length?u(l):g instanceof qi?o(g):o(new qi({type:le.KEY_SYSTEM_ERROR,details:Q.KEY_SYSTEM_NO_ACCESS,error:g,fatal:!0},g.message))})};u(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return Fr===null&&self.location.protocol==="http:"&&(r=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(r))}return n(e,t)}getMediaKeysPromise(e,t,n){const r=wn(e,t,n,this.config.drmSystemOptions),s=this.keySystemAccessPromises[e];let a=s==null?void 0:s.keySystemAccess;if(!a){this.log(`Requesting encrypted media "${e}" key-system access with config: ${Lt(r)}`),a=this.requestMediaKeySystemAccess(e,r);const o=this.keySystemAccessPromises[e]={keySystemAccess:a};return a.catch(u=>{this.log(`Failed to obtain access to key-system "${e}": ${u}`)}),a.then(u=>{this.log(`Access for key-system "${u.keySystem}" obtained`);const l=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),o.mediaKeys=u.createMediaKeys().then(d=>(this.log(`Media-keys created for "${e}"`),o.hasMediaKeys=!0,l.then(g=>g?this.setMediaKeysServerCertificate(d,e,g):d))),o.mediaKeys.catch(d=>{this.error(`Failed to create media-keys for "${e}"}: ${d}`)}),o.mediaKeys})}return a.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${j.hexDump(e.keyId||[])}`);const r=n.createSession(),s={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(s),s}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),r=this.getKeyIdString(t),s="cenc";this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,s,t.pssh.buffer,"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 j.hexDump(e.keyId)}updateKeySession(e,t){var n;const r=e.mediaKeysSession;return this.log(`Updating key-session "${r.sessionId}" for keyID ${j.hexDump(((n=e.decryptdata)==null?void 0:n.keyId)||[])}
|
|
} (data length: ${t&&t.byteLength})`),r.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>hr(e)).filter(e=>!!e)}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then(({keySystem:t,mediaKeys:n})=>this.attemptSetMediaKeys(t,n))}selectKeySystem(e){return new Promise((t,n)=>this.getKeySystemSelectionPromise(e).then(({keySystem:r})=>{const s=hr(r);s?t(s):n(new Error(`Unable to find format for key-system "${r}"`))}).catch(n))}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){const t=Er(this.config),n=e.map(Qn).filter(r=>!!r&&t.indexOf(r)!==-1);return this.selectKeySystem(n)}loadKey(e){const t=e.keyInfo.decryptdata,n=this.getKeyIdString(t),r=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${r}`);let s=this.keyIdToKeySessionPromise[n];return s||(s=this.getKeySystemForKeyPromise(t).then(({keySystem:o,mediaKeys:u})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${r}`),this.attemptSetMediaKeys(o,u).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:o,mediaKeys:u,decryptdata:t}))))),(this.keyIdToKeySessionPromise[n]=s.then(o=>{const u="cenc",l=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(o,u,l,"playlist-key")})).catch(o=>this.handleError(o))),s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof qi?this.hls.trigger(h.ERROR,e.data):this.hls.trigger(h.ERROR,{type:le.KEY_SYSTEM_ERROR,details:Q.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=Qn(e.keyFormat),s=r?[r]:Er(this.config);return this.attemptKeySystemAccess(s)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=Er(this.config)),e.length===0)throw new qi({type:le.KEY_SYSTEM_ERROR,details:Q.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${Lt({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){if(this.mediaKeys===t)return Promise.resolve();const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const r=Promise.all(n).then(()=>{if(!this.media)throw this.mediaKeys=null,new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.mediaKeys=t,this.setMediaKeysQueue.push(r),r.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(r),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(s=>n.indexOf(s)===-1)})}generateRequestWithPreferredKeySession(e,t,n,r){var s,a;const o=(s=this.config.drmSystems)==null||(a=s[e.keySystem])==null?void 0:a.generateRequest;if(o)try{const x=o.call(this.hls,t,n,e);if(!x)throw new Error("Invalid response from configured generateRequest filter");t=x.initDataType,n=x.initData?x.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(x){var u;if(this.warn(x.message),(u=this.hls)!=null&&u.config.debug)throw x}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const l=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${r}": ${l} (init data type: ${t} length: ${n?n.byteLength:null})`);const d=new ss,g=e._onmessage=x=>{const H=e.mediaKeysSession;if(!H){d.emit("error",new Error("invalid state"));return}const{messageType:P,message:me}=x;this.log(`"${P}" message event for session "${H.sessionId}" message size: ${me.byteLength}`),P==="license-request"||P==="license-renewal"?this.renewLicense(e,me).catch(De=>{d.eventNames().length?d.emit("error",De):this.handleError(De)}):P==="license-release"?e.keySystem===Zn.FAIRPLAY&&(this.updateKeySession(e,ei("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${P}"`)},m=e._onkeystatuseschange=x=>{if(!e.mediaKeysSession){d.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const P=e.keyStatus;d.emit("keyStatus",P),P==="expired"&&(this.warn(`${e.keySystem} expired for key ${l}`),this.renewKeySession(e))};Pi(e.mediaKeysSession,"message",g),Pi(e.mediaKeysSession,"keystatuseschange",m);const w=new Promise((x,H)=>{d.on("error",H),d.on("keyStatus",P=>{P.startsWith("usable")?x():P==="output-restricted"?H(new qi({type:le.KEY_SYSTEM_ERROR,details:Q.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):P==="internal-error"?H(new qi({type:le.KEY_SYSTEM_ERROR,details:Q.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${P}"`)):P==="expired"?H(new Error("key expired while generating request")):this.warn(`unhandled key status change "${P}"`)})});return e.mediaKeysSession.generateRequest(t,n).then(()=>{var x;this.log(`Request generated for key-session "${(x=e.mediaKeysSession)==null?void 0:x.sessionId}" keyId: ${l}`)}).catch(x=>{throw new qi({type:le.KEY_SYSTEM_ERROR,details:Q.KEY_SYSTEM_NO_SESSION,error:x,fatal:!1},`Error generating key-session request: ${x}`)}).then(()=>w).catch(x=>{throw d.removeAllListeners(),this.removeSession(e),x}).then(()=>(d.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,n)=>{if(typeof n=="string"&&typeof t=="object"){const r=n;n=t,t=r}this.log(`key status change "${t}" for keyStatuses keyId: ${j.hexDump("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${j.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,n=t.loader,r=new n(t),s=this.getServerCertificateUrl(e);return s?(this.log(`Fetching server certificate for "${e}"`),new Promise((a,o)=>{const u={responseType:"arraybuffer",url:s},l=t.certLoadPolicy.default,d={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},g={onSuccess:(m,w,x,H)=>{a(m.data)},onError:(m,w,x,H)=>{o(new qi({type:le.KEY_SYSTEM_ERROR,details:Q.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:x,response:E({url:u.url,data:void 0},m)},`"${e}" certificate request failed (${s}). Status: ${m.code} (${m.text})`))},onTimeout:(m,w,x)=>{o(new qi({type:le.KEY_SYSTEM_ERROR,details:Q.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:x,response:{url:u.url,data:void 0}},`"${e}" certificate request timed out (${s})`))},onAbort:(m,w,x)=>{o(new Error("aborted"))}};r.load(u,d,g)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((r,s)=>{e.setServerCertificate(n).then(a=>{this.log(`setServerCertificate ${a?"success":"not supported by CDM"} (${n==null?void 0:n.byteLength}) on "${t}"`),r(e)}).catch(a=>{s(new qi({type:le.KEY_SYSTEM_ERROR,details:Q.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:a,fatal:!0},a.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(r=>{throw new qi({type:le.KEY_SYSTEM_ERROR,details:Q.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:r,fatal:!0},r.message)}))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const r=new DOMParser().parseFromString(n,"application/xml"),s=r.querySelectorAll("HttpHeader");if(s.length>0){let d;for(let g=0,m=s.length;g<m;g++){var a,o;d=s[g];const w=(a=d.querySelector("name"))==null?void 0:a.textContent,x=(o=d.querySelector("value"))==null?void 0:o.textContent;w&&x&&e.setRequestHeader(w,x)}}const u=r.querySelector("Challenge"),l=u==null?void 0:u.textContent;if(!l)throw new Error("Cannot find <Challenge> in key message");return ei(atob(l))}setupLicenseXHR(e,t,n,r){const s=this.config.licenseXhrSetup;return s?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return s.call(this.hls,e,t,n,r)}).catch(a=>{if(!n.decryptdata)throw a;return e.open("POST",t,!0),s.call(this.hls,e,t,n,r)}).then(a=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:a||r})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise((r,s)=>{const a=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${a}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return s(new Error("invalid state"));if(o.readyState===4)if(o.status===200){this._requestLicenseFailureCount=0;let u=o.response;this.log(`License received ${u instanceof ArrayBuffer?u.byteLength:u}`);const l=this.config.licenseResponseCallback;if(l)try{u=l.call(this.hls,o,a,e)}catch(d){this.error(d)}r(u)}else{const u=n.errorRetry,l=u?u.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l||o.status>=400&&o.status<500)s(new qi({type:le.KEY_SYSTEM_ERROR,details:Q.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:a,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${a}). Status: ${o.status} (${o.statusText})`));else{const d=l-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${d} attempts left`),this.requestLicense(e,t).then(r,s)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,a,e,t).then(({xhr:u,licenseChallenge:l})=>{e.keySystem==Zn.PLAYREADY&&(l=this.unpackPlayReadyKeyMessage(u,l)),u.send(l)})})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,Pi(n,"encrypted",this.onMediaEncrypted),Pi(n,"waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media;e&&($i(e,"encrypted",this.onMediaEncrypted),$i(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;if(this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},!this.mediaKeys&&!this.mediaKeySessions.length)return;const t=this.media,n=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,Nr.clearKeyUriToKeyIdMap();const r=n.length;Us.CDMCleanupPromise=Promise.all(n.map(s=>this.removeSession(s)).concat(t==null||(e=t.setMediaKeys(null))==null?void 0:e.catch(s=>{var a;this.log(`Could not clear media keys: ${s}`),(a=this.hls)==null||a.trigger(h.ERROR,{type:le.OTHER_ERROR,details:Q.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${s}`)})}))).catch(s=>{var a;this.log(`Could not close sessions and clear media keys: ${s}`),(a=this.hls)==null||a.trigger(h.ERROR,{type:le.OTHER_ERROR,details:Q.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${s}`)})}).then(()=>{r&&this.log("finished closing key sessions and clearing media keys")})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const n=t.reduce((r,s)=>(r.indexOf(s.keyFormat)===-1&&r.push(s.keyFormat),r),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n}=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),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const r=this.mediaKeySessions.indexOf(e);r>-1&&this.mediaKeySessions.splice(r,1);const{drmSystemOptions:s}=this.config;return(Ir(s)?new Promise((o,u)=>{self.setTimeout(()=>u(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(o)}):Promise.resolve()).catch(o=>{var u;this.log(`Could not remove session: ${o}`),(u=this.hls)==null||u.trigger(h.ERROR,{type:le.OTHER_ERROR,details:Q.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${o}`)})}).then(()=>t.close()).catch(o=>{var u;this.log(`Could not close session: ${o}`),(u=this.hls)==null||u.trigger(h.ERROR,{type:le.OTHER_ERROR,details:Q.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${o}`)})})}}}Us.CDMCleanupPromise=void 0;class qi 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}}class ja{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(h.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(h.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(h.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(h.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,n){const r=performance.now();if(t){if(this.lastTime){const s=r-this.lastTime,a=n-this.lastDroppedFrames,o=t-this.lastDecodedFrames,u=1e3*a/s,l=this.hls;if(l.trigger(h.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:n}),u>0&&a>l.config.fpsDroppedMonitoringThreshold*o){let d=l.currentLevel;l.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(l.autoLevelCapping===-1||l.autoLevelCapping>=d)&&(d=d-1,l.trigger(h.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:l.currentLevel}),l.autoLevelCapping=d,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}function Zo(i,e){let t;try{t=new Event("addtrack")}catch(n){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=i,e.dispatchEvent(t)}function Wo(i,e){const t=i.mode;if(t==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(e.id))try{if(i.addCue(e),!i.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(n){X.debug(`[texttrack-utils]: ${n}`);try{const r=new self.TextTrackCue(e.startTime,e.endTime,e.text);r.id=e.id,i.addCue(r)}catch(r){X.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(i.mode=t)}function Xs(i,e){const t=i.mode;if(t==="disabled"&&(i.mode="hidden"),i.cues)for(let n=i.cues.length;n--;)e&&i.cues[n].removeEventListener("enter",e),i.removeCue(i.cues[n]);t==="disabled"&&(i.mode=t)}function zo(i,e,t,n){const r=i.mode;if(r==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0){const s=Js(i.cues,e,t);for(let a=0;a<s.length;a++)(!n||n(s[a]))&&i.removeCue(s[a])}r==="disabled"&&(i.mode=r)}function WA(i,e){if(e<=i[0].startTime)return 0;const t=i.length-1;if(e>i[t].endTime)return-1;let n=0,r=t,s;for(;n<=r;)if(s=Math.floor((r+n)/2),e<i[s].startTime)r=s-1;else if(e>i[s].startTime&&n<t)n=s+1;else return s;return i[n].startTime-e<e-i[r].startTime?n:r}function Js(i,e,t){const n=[],r=WA(i,e);if(r>-1)for(let s=r,a=i.length;s<a;s++){const o=i[s];if(o.startTime>=e&&o.endTime<=t)n.push(o);else if(o.startTime>t)return n}return n}function qs(i){const e=[];for(let t=0;t<i.length;t++){const n=i[t];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(i[t])}return e}class Ya extends To{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const n=qs(this.media.textTracks);for(let s=0;s<n.length;s++)if(n[s].mode==="hidden")t=n[s];else if(n[s].mode==="showing"){t=n[s];break}const r=this.findTrackForTextTrack(t);this.subtitleTrack!==r&&this.setSubtitleTrack(r)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.MANIFEST_PARSED,this.onManifestParsed,this),e.on(h.LEVEL_LOADING,this.onLevelLoading,this),e.on(h.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(h.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(h.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.MANIFEST_PARSED,this.onManifestParsed,this),e.off(h.LEVEL_LOADING,this.onLevelLoading,this),e.off(h.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(h.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(h.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const n=this.media;if(!n)return;const r=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||n.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,r)return;qs(n.textTracks).forEach(a=>{Xs(a)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:n,groupId:r,details:s}=t,a=this.tracksInGroup[n];if(!a||a.groupId!==r){this.warn(`Subtitle track with id:${n} and group:${r} not found in active group ${a==null?void 0:a.groupId}`);return}const o=a.details;a.details=t.details,this.log(`Subtitle track ${n} "${a.name}" lang:${a.lang} group:${r} loaded [${s.startSN}-${s.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.subtitleGroups||null,r=this.groupIds;let s=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(a=>(r==null?void 0:r.indexOf(a))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const a=this.tracks.filter(d=>!n||n.indexOf(d.groupId)!==-1);if(a.length)this.selectDefaultTrack&&!a.some(d=>d.default)&&(this.selectDefaultTrack=!1),a.forEach((d,g)=>{d.id=g});else if(!s&&!this.tracksInGroup.length)return;this.tracksInGroup=a;const o=this.hls.config.subtitlePreference;if(!s&&o){this.selectDefaultTrack=!1;const d=Le(o,a);if(d>-1)s=a[d];else{const g=Le(o,this.tracks);s=this.tracks[g]}}let u=this.findTrackId(s);u===-1&&s&&(u=this.findTrackId(null));const l={subtitleTracks:a};this.log(`Updating subtitle tracks, ${a.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(h.SUBTITLE_TRACKS_UPDATED,l),u!==-1&&this.trackId===-1&&this.setSubtitleTrack(u)}}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let r=0;r<t.length;r++){const s=t[r];if(!(n&&!s.default||!n&&!e)&&(!e||Xe(s,e)))return r}if(e){for(let r=0;r<t.length;r++){const s=t[r];if(ha(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return r}for(let r=0;r<t.length;r++){const s=t[r];if(ha(e.attrs,s.attrs,["LANGUAGE"]))return r}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(Io(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===ge.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&Xe(e,n))return n;const r=Le(e,this.tracksInGroup);if(r>-1){const s=this.tracksInGroup[r];return this.setSubtitleTrack(r),s}else{if(n)return null;{const s=Le(e,t);if(s>-1)return t[s]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,s=this.getUrlWithDirectives(e.url,t),a=e.details,o=a==null?void 0:a.age;this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${o&&a.live?" age "+o.toFixed(1)+(a.type?" "+a.type||0:""):""} ${s}`),this.hls.trigger(h.SUBTITLE_TRACK_LOADING,{url:s,id:n,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=qs(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(s=>Io(n,s))[0],r||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach(s=>{s.mode!=="disabled"&&s!==r&&(s.mode="disabled")}),r){const s=this.subtitleDisplay?"showing":"hidden";r.mode!==s&&(r.mode=s)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!N(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e]||null;if(this.trackId=e,this.currentTrack=r,this.toggleTrackModes(),!r){this.hls.trigger(h.SUBTITLE_TRACK_SWITCH,{id:e});return}const s=!!r.details&&!r.details.live;if(e===this.trackId&&r===n&&s)return;this.log(`Switching to subtitle-track ${e}`+(r?` "${r.name}" lang:${r.lang} group:${r.groupId}`:""));const{id:a,groupId:o="",name:u,type:l,url:d}=r;this.hls.trigger(h.SUBTITLE_TRACK_SWITCH,{id:a,groupId:o,name:u,type:l,url:d});const g=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(g)}}function _u(){try{return crypto.randomUUID()}catch(i){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const s=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(r=="x"?s:s&3|8).toString(16)})}}}function ma(i){let e=5381,t=i.length;for(;t;)e=e*33^i.charCodeAt(--t);return(e>>>0).toString()}const ea=.025;let Xa=function(i){return i[i.Point=0]="Point",i[i.Range=1]="Range",i}({});function zA(i,e,t){return`${i.identifier}-${t+1}-${ma(e)}`}class jo{constructor(e,t){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=t,this.dateRange=e,this.setDateRange(e)}setDateRange(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}reset(){var e;this.appendInPlaceStarted=!1,(e=this.assetListLoader)==null||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}isAssetPastPlayoutLimit(e){var t;if(e>0&&e>=this.assetList.length)return!0;const n=this.playoutLimit;return e<=0||isNaN(n)?!1:n===0?!0:(((t=this.assetList[e])==null?void 0:t.startOffset)||0)>n}findAssetIndex(e){return this.assetList.indexOf(e)}get identifier(){return this.dateRange.id}get startDate(){return this.dateRange.startDate}get startTime(){const e=this.dateRange.startTime;if(this.snapOptions.out){const t=this.dateRange.tagAnchor;if(t)return Ja(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(this.startTime===0||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime,n=Ja(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=N(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return Ja(e,t)}return e}get appendInPlace(){return this.appendInPlaceStarted?!0:this.appendInPlaceDisabled?!1:!!(!this.cue.once&&!this.cue.pre&&this.startIsAligned&&(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<ea))}set appendInPlace(e){if(this.appendInPlaceStarted){this.resetOnResume=!e;return}this.appendInPlaceDisabled=!e}get timelineStart(){return this._timelineStart!==null?this._timelineStart:this.startTime}set timelineStart(e){this._timelineStart=e}get duration(){const e=this.playoutLimit;let t;return this._duration!==null?t=this._duration:this.dateRange.duration?t=this.dateRange.duration:t=this.dateRange.plannedDuration||0,!isNaN(e)&&e<t&&(t=e),t}set duration(e){this._duration=e}get cue(){return this.dateRange.cue}get timelineOccupancy(){return this.dateRange.attr["X-TIMELINE-OCCUPIES"]==="RANGE"?Xa.Range:Xa.Point}get supplementsPrimary(){return this.dateRange.attr["X-TIMELINE-STYLE"]==="PRIMARY"}get contentMayVary(){return this.dateRange.attr["X-CONTENT-MAY-VARY"]!=="NO"}get assetUrl(){return this.dateRange.attr["X-ASSET-URI"]}get assetListUrl(){return this.dateRange.attr["X-ASSET-LIST"]}get baseUrl(){return this.base.url}get assetListLoaded(){return this.assetList.length>0||this.assetListResponse!==null}toString(){return jA(this)}}function Ja(i,e){return i-e.start<e.duration/2&&!(Math.abs(i-(e.start+e.duration))<ea)?e.start:e.start+e.duration}function Yo(i,e,t){const n=new self.URL(i,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function va(i,e){for(;(t=i.assetList[++e])!=null&&t.error;)var t;return e}function jA(i){return`["${i.identifier}" ${i.cue.pre?"<pre>":i.cue.post?"<post>":""}${i.timelineStart.toFixed(2)}-${i.resumeTime.toFixed(2)}]`}function ks(i){const e=i.timelineStart,t=i.duration||0;return`["${i.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class yu{constructor(e,t,n,r){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{this.reachedPlayout(this.currentTime)&&this.hls.trigger(h.PLAYOUT_LIMIT_REACHED,{})};const s=this.hls=new e(t);this.interstitial=n,this.assetItem=r;let a=r.uri;try{a=Yo(a,t.primarySessionId).href}catch(u){}s.loadSource(a);const o=()=>{this.hasDetails=!0};s.once(h.LEVEL_LOADED,o),s.once(h.AUDIO_TRACK_LOADED,o),s.once(h.SUBTITLE_TRACK_LOADED,o),s.on(h.MEDIA_ATTACHING,(u,{media:l})=>{this.removeMediaListeners(),this.mediaAttached=l,this.interstitial.playoutLimit&&(l.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&s.on(h.BUFFER_APPENDED,()=>{const g=this.bufferedEnd;this.reachedPlayout(g)&&(this._bufferedEosTime=g,s.trigger(h.BUFFERED_TO_END,void 0))}))})}get appendInPlace(){var e;return((e=this.interstitial)==null?void 0:e.appendInPlace)||!1}bufferedInPlaceToEnd(e){var t;if(!this.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e||!this._bufferedEosTime)return!1;const n=this.timelineOffset,r=En.bufferInfo(e,n,0);return this.getAssetTime(r.end)>=this._bufferedEosTime-.02}reachedPlayout(e){const n=this.interstitial.playoutLimit;return this.startOffset+e>=n}get destroyed(){var e;return!((e=this.hls)!=null&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return((e=this.hls)==null?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const t=En.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;return e||0}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const n=e-t;if(Math.abs(n)>1/9e4){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,n=this.duration;return Math.min(Math.max(0,e-t),n)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls.destroy(),this.hls=this.interstitial=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){this.hls.attachMedia(e)}detachMedia(){this.removeMediaListeners(),this.mediaAttached=null,this.hls.detachMedia()}resumeBuffering(){this.hls.resumeBuffering()}pauseBuffering(){this.hls.pauseBuffering()}transferMedia(){return this.bufferSnapShot(),this.hls.transferMedia()}resetDetails(){const e=this.hls;if(this.hasDetails){e.stopLoad();const t=n=>delete n.details;e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}on(e,t,n){this.hls.on(e,t)}once(e,t,n){this.hls.once(e,t)}off(e,t,n){this.hls.off(e,t)}toString(){var e;return`HlsAssetPlayer: ${ks(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const _a=.033;class qa extends O{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((n,r)=>e<=r.startOffset&&t>r.startOffset?(delete r.error,n+1):n,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let n=-1;e.nextEvent?n=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(n=this.findEventIndex(e.previousEvent.identifier)+1);const r=this.items;if(r)for(r[n]||(t===void 0&&(t=e.start),n=this.findItemIndexAtTime(t));n>=0&&(s=r[n])!=null&&s.event;){var s;n--}return n}findItemIndexAtTime(e,t){const n=this.items;if(n)for(let r=0;r<n.length;r++){let s=n[r];if(t&&t!=="primary"&&(s=s[t]),e===s.start||e>s.start&&e<s.end)return r}return-1}findJumpRestrictedIndex(e,t){const n=this.items;if(n)for(let r=e;r<=t&&n[r];r++){const s=n[r].event;if(s!=null&&s.restrictions.jump&&!s.appendInPlace)return r}return-1}findEventIndex(e){const t=this.items;if(t)for(let r=t.length;r--;){var n;if(((n=t[r].event)==null?void 0:n.identifier)===e)return r}return-1}findAssetIndex(e,t){const n=e.assetList,r=n.length;if(r>1)for(let s=0;s<r;s++){const a=n[s];if(!a.error){const o=a.timelineStart;if(t===o||t>o&&t<o+(a.duration||0))return s}}return 0}get assetIdAtEnd(){var e,t;const n=(e=this.items)==null||(t=e[this.length-1])==null?void 0:t.event;if(n){const r=n.assetList,s=r[r.length-1];if(s)return s.identifier}return null}parseInterstitialDateRanges(e,t){const n=e.main.details,{dateRanges:r}=n,s=this.events,a=this.parseDateRanges(r,{url:n.url},t),o=Object.keys(r),u=s?s.filter(l=>!o.includes(l.identifier)):[];a.length&&a.sort((l,d)=>{const g=l.cue.pre,m=l.cue.post,w=d.cue.pre,x=d.cue.post;if(g&&!w)return-1;if(w&&!g||m&&!x)return 1;if(x&&!m)return-1;if(!g&&!w&&!m&&!x){const H=l.startTime,P=d.startTime;if(H!==P)return H-P}return l.dateRange.tagOrder-d.dateRange.tagOrder}),this.events=a,u.forEach(l=>{this.removeEvent(l)}),this.updateSchedule(e,u)}updateSchedule(e,t=[]){const n=this.events||[];if(n.length||t.length||this.length<2){const r=this.items,s=this.parseSchedule(n,e);(t.length||(r==null?void 0:r.length)!==s.length||s.some((o,u)=>Math.abs(o.playout.start-r[u].playout.start)>.005||Math.abs(o.playout.end-r[u].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,r))}}parseDateRanges(e,t,n){const r=[],s=Object.keys(e);for(let a=0;a<s.length;a++){const o=s[a],u=e[o];if(u.isInterstitial){let l=this.eventMap[o];l?l.setDateRange(u):(l=new jo(u,t),this.eventMap[o]=l,n===!1&&(l.appendInPlace=n)),r.push(l)}}return r}parseSchedule(e,t){const n=[],r=t.main.details,s=r.live?1/0:r.edge;let a=0;if(e=e.filter(u=>!u.error&&!(u.cue.once&&u.hasPlayed)),e.length){this.resolveOffsets(e,t);let u=0,l=0;if(e.forEach((d,g)=>{const m=d.cue.pre,w=d.cue.post,x=e[g-1]||null,H=d.appendInPlace,P=w?s:d.startOffset,me=d.duration,De=d.timelineOccupancy===Xa.Range?me:0,be=d.resumptionOffset,Ue=(x==null?void 0:x.startTime)===P,ot=P+d.cumulativeDuration;let Dt=H?ot+me:P+be;if(m||!w&&P<=0){const Ft=l;l+=De,d.timelineStart=ot;const Nt=a;a+=me,n.push({event:d,start:ot,end:Dt,playout:{start:Nt,end:a},integrated:{start:Ft,end:l}})}else if(P<=s){if(!Ue){const bt=P-u;if(bt>_a){const ln=u,Ln=l;l+=bt;const _r=a;a+=bt;const Yn={previousEvent:e[g-1]||null,nextEvent:d,start:ln,end:ln+bt,playout:{start:_r,end:a},integrated:{start:Ln,end:l}};n.push(Yn)}else bt>0&&x&&(x.cumulativeDuration+=bt,n[n.length-1].end=P)}w&&(Dt=ot),d.timelineStart=ot;const Ft=l;l+=De;const Nt=a;a+=me,n.push({event:d,start:ot,end:Dt,playout:{start:Nt,end:a},integrated:{start:Ft,end:l}})}else return;const rt=d.resumeTime;w||rt>s?u=s:u=rt}),u<s){var o;const d=u,g=l,m=s-u;l+=m;const w=a;a+=m,n.push({previousEvent:((o=n[n.length-1])==null?void 0:o.event)||null,nextEvent:null,start:u,end:d+m,playout:{start:w,end:a},integrated:{start:g,end:l}})}this.setDurations(s,a,l)}else n.push({previousEvent:null,nextEvent:null,start:0,end:s,playout:{start:0,end:s},integrated:{start:0,end:s}}),this.setDurations(s,s,s);return n}setDurations(e,t,n){this.durations={primary:e,playout:t,integrated:n}}resolveOffsets(e,t){const n=t.main.details,r=n.live?1/0:n.edge;let s=0,a=-1;e.forEach((o,u)=>{const l=o.cue.pre,d=o.cue.post,g=l?0:d?r:o.startTime;this.updateAssetDurations(o),a===g?o.cumulativeDuration=s:(s=0,a=g),!d&&o.snapOptions.in&&(o.resumeAnchor=cn(null,n.fragments,o.startOffset+o.resumptionOffset,0,0)||void 0),o.appendInPlace&&!o.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(o,t)||(o.appendInPlace=!1)),!o.appendInPlace&&u+1<e.length&&e[u+1].startTime-e[u].resumeTime<_a&&(e[u+1].appendInPlace=!1,e[u+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${o}`));const w=N(o.resumeOffset)?o.resumeOffset:o.duration;s+=w})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>ea?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):t?!Object.keys(t).some(a=>{const o=t[a].details,u=o.edge;if(n>=u)return this.log(`"${e.identifier}" resumption ${n} past ${a} playlist end ${u}`),!1;const l=cn(null,o.fragments,n);if(!l)return this.log(`"${e.identifier}" resumption ${n} does not align with any fragments in ${a} playlist (${o.fragStart}-${o.fragmentEnd})`),!0;const d=a==="audio"?.175:0;return Math.abs(l.start-n)<ea+d||Math.abs(l.end-n)<ea+d?!1:(this.log(`"${e.identifier}" resumption ${n} not aligned with ${a} fragment bounds (${l.start}-${l.end} sn: ${l.sn} cc: ${l.cc})`),!0)}):(this.log(`"${e.identifier}" resumption ${n} can not be aligned with media (none selected)`),!1)}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let n=0,r=!1,s=!1;e.assetList.forEach((a,o)=>{const u=t+n;a.startOffset=n,a.timelineStart=u,r||(r=a.duration===null),s||(s=!!a.error);const l=a.error?0:a.duration||0;n+=l}),r&&!s?e.duration=Math.max(n,e.duration):e.duration=n}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function ys(i){return`[${i.event?'"'+i.event.identifier+'"':"primary"}: ${i.start.toFixed(2)}-${i.end.toFixed(2)}]`}class YA{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=Yo(n,this.hls.sessionId,e.baseUrl)}catch(m){const w=this.assignAssetListError(e,Q.ASSET_LIST_LOAD_ERROR,m,n);this.hls.trigger(h.ERROR,w);return}t&&r.protocol!=="data:"&&r.searchParams.set("_HLS_start_offset",""+t);const s=this.hls.config,a=s.loader,o=new a(s),u={responseType:"json",url:r.href},l=s.interstitialAssetListLoadPolicy.default,d={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},g={onSuccess:(m,w,x,H)=>{const P=m.data,me=P==null?void 0:P.ASSETS;if(!Array.isArray(me)){const De=this.assignAssetListError(e,Q.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),x.url,w,H);this.hls.trigger(h.ERROR,De);return}e.assetListResponse=P,this.hls.trigger(h.ASSET_LIST_LOADED,{event:e,assetListResponse:P,networkDetails:H})},onError:(m,w,x,H)=>{const P=this.assignAssetListError(e,Q.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${m.code} ${m.text} (${w.url})`),w.url,H,x);this.hls.trigger(h.ERROR,P)},onTimeout:(m,w,x)=>{const H=this.assignAssetListError(e,Q.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${w.url})`),w.url,m,x);this.hls.trigger(h.ERROR,H)}};return o.load(u,d,g),this.hls.trigger(h.ASSET_LIST_LOADING,{event:e}),o}assignAssetListError(e,t,n,r,s,a){return e.error=n,{type:le.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:a,stats:s}}}function XA(i){i==null||i.play().catch(()=>{})}class JA extends O{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;const r=n-this.timelinePos;if(Math.abs(r)<1/7056e5)return;const a=r<=-.01;this.timelinePos=n,this.bufferedPos=n;const o=this.playingItem;if(!o){this.checkBuffer();return}if(a&&this.schedule.resetErrorsInRange(n,n-r)&&this.updateSchedule(),this.checkBuffer(),a&&n<o.start||n>=o.end){var u;const m=this.schedule.findItemIndexAtTime(this.timelinePos);if(!this.isInterstitial(o)&&(u=this.media)!=null&&u.paused&&(this.shouldPlay=!1),!a){const w=this.findItemIndex(o);if(m>w){const x=this.schedule.findJumpRestrictedIndex(w+1,m);if(x>w){this.setSchedulePosition(x);return}}}this.setSchedulePosition(m);return}const l=this.playingAsset;if(!l){if(this.playingLastItem&&this.isInterstitial(o)){const m=o.event.assetList[0];m&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,m))}return}const d=l.timelineStart,g=l.duration||0;(a&&n<d||n>=d+g)&&this.setScheduleToAssetAtTime(n,l)},this.onTimeupdate=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;if(n>this.timelinePos)this.timelinePos=n,n>this.bufferedPos&&this.checkBuffer();else return;const r=this.playingItem;if(!r||this.playingLastItem)return;if(n>=r.end){this.timelinePos=r.end;const o=this.findItemIndex(r);this.setSchedulePosition(o+1)}const s=this.playingAsset;if(!s)return;const a=s.timelineStart+(s.duration||0);n>=a&&this.setScheduleToAssetAtTime(n,s)},this.onScheduleUpdate=(n,r)=>{const s=this.schedule,a=this.playingItem,o=s.events||[],u=s.items||[],l=s.durations,d=n.map(x=>x.identifier),g=!!(o.length||d.length);(g||r)&&this.log(`INTERSTITIALS_UPDATED (${o.length}): ${o}
|
|
Schedule: ${u.map(x=>ys(x))} pos: ${this.timelinePos}`),d.length&&this.log(`Removed events ${d}`),this.playerQueue.forEach(x=>{if(x.interstitial.appendInPlace){const H=x.assetItem.timelineStart,P=x.timelineOffset-H;if(P)try{x.timelineOffset=H}catch(me){Math.abs(P)>ea&&this.warn(`${me} ("${x.assetId}" ${x.timelineOffset}->${H})`)}}});let m=null;if(a){const x=this.updateItem(a,this.timelinePos);this.itemsMatch(a,x)&&(this.playingItem=x,this.waitingItem=this.endedItem=null,m=()=>this.trimInPlace(x,a))}else this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const w=this.bufferingItem;if(w){const x=this.updateItem(w,this.bufferedPos);this.itemsMatch(w,x)?(this.bufferingItem=x,m||(m=()=>this.trimInPlace(x,w))):w.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(w.event,null))}if(n.forEach(x=>{x.assetList.forEach(H=>{this.clearAssetPlayer(H.identifier,null)})}),g||r){if(this.hls.trigger(h.INTERSTITIALS_UPDATED,{events:o.slice(0),schedule:u.slice(0),durations:l,removedIds:d}),this.isInterstitial(a)&&d.includes(a.event.identifier)){this.warn(`Interstitial "${a.event.identifier}" removed while playing`),this.primaryFallback(a.event);return}m&&m(),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new YA(e),this.schedule=new qa(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e.on(h.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(h.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(h.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(h.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(h.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(h.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(h.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(h.BUFFER_APPENDED,this.onBufferAppended,this),e.on(h.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(h.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(h.MEDIA_ENDED,this.onMediaEnded,this),e.on(h.ERROR,this.onError,this),e.on(h.DESTROYING,this.onDestroying,this)}unregisterListeners(){const e=this.hls;e&&(e.off(h.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(h.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(h.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(h.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(h.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(h.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(h.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(h.BUFFER_CODECS,this.onBufferCodecs,this),e.off(h.BUFFER_APPENDED,this.onBufferAppended,this),e.off(h.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(h.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(h.MEDIA_ENDED,this.onMediaEnded,this),e.off(h.ERROR,this.onError,this),e.off(h.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.manager=null,this.hls=this.HlsPlayerClass=this.schedule=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){$i(e,"play",this.onPlay),$i(e,"pause",this.onPause),$i(e,"seeking",this.onSeeking),$i(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;Pi(n,"seeking",this.onSeeking),Pi(n,"timeupdate",this.onTimeupdate),Pi(n,"play",this.onPlay),Pi(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,n===null)this.checkStart();else if(!r){this.clearScheduleState();const s=this.findItemIndex(n);this.setSchedulePosition(s)}}clearScheduleState(){this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(this.media=null,!n&&(r&&this.removeMediaListeners(r),this.detachedData)){const s=this.getBufferingPlayer();s&&(this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,s.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.manager){if(!this.hls)return null;const e=this,t=()=>e.bufferingItem||e.waitingItem,n=g=>g&&e.getAssetPlayer(g.identifier),r=(g,m,w,x,H)=>{if(g){let P=g[m].start;const me=g.event;if(me){if(m==="playout"||me.timelineOccupancy!==Xa.Point){const De=n(w);(De==null?void 0:De.interstitial)===me&&(P+=De.assetItem.startOffset+De[H])}}else{const De=x==="bufferedPos"?a():e[x];P+=De-g.start}return P}return 0},s=(g,m)=>{if(g!==0&&m!=="primary"&&e.schedule.length){var w;const x=e.schedule.findItemIndexAtTime(g),H=(w=e.schedule.items)==null?void 0:w[x];if(H){const P=H[m].start-H.start;return g+P}}return g},a=()=>{const g=e.bufferedPos;return g===Number.MAX_VALUE?o("primary"):Math.max(g,0)},o=g=>{var m;return(m=e.primaryDetails)!=null&&m.live?e.primaryDetails.edge:e.schedule.durations[g]},u=(g,m)=>{var w,x;const H=e.effectivePlayingItem;if(H!=null&&(w=H.event)!=null&&w.restrictions.skip)return;e.log(`seek to ${g} "${m}"`);const P=e.effectivePlayingItem,me=e.schedule.findItemIndexAtTime(g,m),De=(x=e.schedule.items)==null?void 0:x[me],be=e.getBufferingPlayer(),Ue=be==null?void 0:be.interstitial,ot=Ue==null?void 0:Ue.appendInPlace,Dt=P&&e.itemsMatch(P,De);if(P&&(ot||Dt)){const Ft=n(e.playingAsset),Nt=(Ft==null?void 0:Ft.media)||e.primaryMedia;if(Nt){const bt=m==="primary"?Nt.currentTime:r(P,m,e.playingAsset,"timelinePos","currentTime"),ln=g-bt,Ln=(ot?bt:Nt.currentTime)+ln;if(Ln>=0&&(!Ft||ot||Ln<=Ft.duration)){Nt.currentTime=Ln;return}}}if(De){let Ft=g;if(m!=="primary"){const bt=De[m].start,ln=g-bt;Ft=De.start+ln}const Nt=!e.isInterstitial(De);if((!e.isInterstitial(P)||P.event.appendInPlace)&&(Nt||De.event.appendInPlace)){const bt=e.media||(ot?be==null?void 0:be.media:null);bt&&(bt.currentTime=Ft)}else if(P){const bt=e.findItemIndex(P);if(me>bt){const Ln=e.schedule.findJumpRestrictedIndex(bt+1,me);if(Ln>bt){e.setSchedulePosition(Ln);return}}let ln=0;if(Nt)e.timelinePos=Ft,e.checkBuffer();else{var rt;const Ln=De==null||(rt=De.event)==null?void 0:rt.assetList;if(Ln){const _r=g-(De[m]||De).start;for(let Yn=Ln.length;Yn--;){const Xn=Ln[Yn];if(Xn.duration&&_r>=Xn.startOffset&&_r<Xn.startOffset+Xn.duration){ln=Yn;break}}}}e.setSchedulePosition(me,ln)}}},l=()=>{const g=e.effectivePlayingItem;if(e.isInterstitial(g))return g;const m=t();return e.isInterstitial(m)?m:null},d={get currentTime(){const g=l(),m=e.effectivePlayingItem;return m&&m===g?r(m,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-m.playout.start:0},set currentTime(g){const m=l(),w=e.effectivePlayingItem;w&&w===m&&u(g+w.playout.start,"playout")},get duration(){const g=l();return g?g.playout.end-g.playout.start:0},get assetPlayers(){var g;const m=(g=l())==null?void 0:g.event.assetList;return m?m.map(w=>e.getAssetPlayer(w.identifier)):[]},get playingIndex(){var g;const m=(g=l())==null?void 0:g.event;return m&&e.effectivePlayingAsset?m.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return l()}};this.manager={get events(){var g,m;return((g=e.schedule)==null||(m=g.events)==null?void 0:m.slice(0))||[]},get schedule(){var g,m;return((g=e.schedule)==null||(m=g.items)==null?void 0:m.slice(0))||[]},get interstitialPlayer(){return l()?d:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const g=t();return e.findItemIndex(g)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const g=e.effectivePlayingItem;return e.findItemIndex(g)},primary:{get bufferedEnd(){return a()},get currentTime(){const g=e.timelinePos;return g>0?g:0},set currentTime(g){u(g,"primary")},get duration(){return o("primary")},get seekableStart(){var g;return((g=e.primaryDetails)==null?void 0:g.fragmentStart)||0}},integrated:{get bufferedEnd(){return r(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return r(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(g){u(g,"integrated")},get duration(){return o("integrated")},get seekableStart(){var g;return s(((g=e.primaryDetails)==null?void 0:g.fragmentStart)||0,"integrated")}},skip:()=>{const g=e.effectivePlayingItem,m=g==null?void 0:g.event;if(m&&!m.restrictions.skip){const w=e.findItemIndex(g);if(m.appendInPlace){const x=g.playout.start+g.event.duration;u(x+.001,"playout")}else e.advanceAfterAssetEnded(m,w,1/0)}}}}return this.manager}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,n=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!n?!1:this.findItemIndex(t)===n.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t,n;if(this.mediaSelection===null)return;const r=this.waitingItem||this.playingItem;if(this.isInterstitial(r)&&!r.event.appendInPlace)return;let s=this.media;!s&&(e=this.bufferingItem)!=null&&(t=e.event)!=null&&t.appendInPlace&&(s=this.primaryMedia);const a=(n=s)==null?void 0:n.currentTime;if(!(a===void 0||!N(a)))return a}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const n=this.getAssetPlayer(e);n&&this.transferMediaFromPlayer(n,t)}transferMediaFromPlayer(e,t){const n=e.interstitial.appendInPlace,r=e.media;if(n&&r===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&r){this.detachedData={media:r};return}const s=e.transferMedia();this.log(`transfer MediaSource from ${e} ${Lt(s)}`),this.detachedData=s}else t&&r&&(this.shouldPlay||(this.shouldPlay=!r.paused))}transferMediaTo(e,t){var n,r;if(e.media===t)return;let s=null;const a=this.hls,o=e!==a,u=o&&e.interstitial.appendInPlace,l=(n=this.detachedData)==null?void 0:n.mediaSource;let d;if(a.media)u&&(s=a.transferMedia(),this.detachedData=s),d="Primary";else if(l){const w=this.getBufferingPlayer();w?(s=w.transferMedia(),d=`${w}`):d="detached MediaSource"}else d="detached media";if(!s){if(l)s=this.detachedData,this.log(`using detachedData: MediaSource ${Lt(s)}`);else if(!this.detachedData||a.media===t){const w=this.playerQueue;w.length>1&&w.forEach(x=>{if(o&&x.interstitial.appendInPlace!==u){const H=x.interstitial;this.clearInterstitial(x.interstitial,null),H.appendInPlace=!1,H.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${H}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const g=s&&"mediaSource"in s&&((r=s.mediaSource)==null?void 0:r.readyState)!=="closed",m=g&&s?s:t;if(this.log(`${g?"transfering MediaSource":"attaching media"} to ${o?e:"Primary"} from ${d}`),m===s){const w=o&&e.assetId===this.schedule.assetIdAtEnd;m.overrides={duration:this.schedule.duration,endOfStream:!o||w,cueRemoval:!o}}e.attachMedia(m)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const n=this.timelinePos,r=this.effectivePlayingItem;if(n===-1){const s=this.hls.startPosition;if(this.timelinePos=s,t.length&&t[0].cue.pre){const a=e.findEventIndex(t[0].identifier);this.setSchedulePosition(a)}else if(s>=0||!this.primaryLive){const a=this.timelinePos=s>0?s:0,o=e.findItemIndexAtTime(a);this.setSchedulePosition(o)}}else if(r&&!this.playingItem){const s=e.findItemIndex(r);this.setSchedulePosition(s)}}advanceAfterAssetEnded(e,t,n){const r=va(e,n);if(!e.isAssetPastPlayoutLimit(r))this.setSchedulePosition(t,r);else{const s=this.schedule.items;if(s){const a=t+1,o=s.length;if(a>=o){this.setSchedulePosition(-1);return}const u=e.resumeTime;this.timelinePos<u&&(this.timelinePos=u,this.checkBuffer()),this.setSchedulePosition(a)}}}setScheduleToAssetAtTime(e,t){const n=this.schedule,r=t.parentIdentifier,s=n.getEvent(r);if(s){const a=n.findEventIndex(r),o=n.findAssetIndex(s,e);this.advanceAfterAssetEnded(s,a,o-1)}}setSchedulePosition(e,t){const n=this.schedule.items;if(!n||this.playbackDisabled)return;this.log(`setSchedulePosition ${e}, ${t}`);const r=e>=0?n[e]:null,s=this.playingItem,a=this.playingLastItem;if(this.isInterstitial(s)){var o;const l=s.event,d=this.playingAsset,g=d==null?void 0:d.identifier,m=g?this.getAssetPlayer(g):null;if(m&&g&&(!this.eventItemsMatch(s,r)||t!==void 0&&g!==((o=l.assetList)==null?void 0:o[t].identifier))){var u;const w=l.findAssetIndex(d);this.log(`INTERSTITIAL_ASSET_ENDED ${w+1}/${l.assetList.length} ${ks(d)}`),this.endedAsset=d,this.playingAsset=null,this.hls.trigger(h.INTERSTITIAL_ASSET_ENDED,{asset:d,assetListIndex:w,event:l,schedule:n.slice(0),scheduleIndex:e,player:m}),this.retreiveMediaSource(g,r),m.media&&!((u=this.detachedData)!=null&&u.mediaSource)&&m.detachMedia()}if(!this.eventItemsMatch(s,r)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${l} ${ys(s)}`),l.hasPlayed=!0,this.hls.trigger(h.INTERSTITIAL_ENDED,{event:l,schedule:n.slice(0),scheduleIndex:e}),l.cue.once)){this.updateSchedule();const w=this.schedule.items;if(r&&w){const x=this.schedule.findItemIndex(r);this.advanceSchedule(x,w,t,s,a)}return}}this.advanceSchedule(e,n,t,s,a)}advanceSchedule(e,t,n,r,s){const a=e>=0?t[e]:null,o=this.primaryMedia,u=this.playerQueue;if(u.length&&u.forEach(l=>{const d=l.interstitial,g=this.schedule.findEventIndex(d.identifier);(g<e||g>e+1)&&this.clearInterstitial(d,a)}),this.isInterstitial(a)){this.timelinePos=Math.min(Math.max(this.timelinePos,a.start),a.end);const l=a.event;if(n===void 0){n=this.schedule.findAssetIndex(l,this.timelinePos);const w=va(l,n-1);if(l.isAssetPastPlayoutLimit(w)){this.advanceAfterAssetEnded(l,e,n);return}n=w}const d=this.waitingItem;this.assetsBuffered(a,o)||this.setBufferingItem(a);let g=this.preloadAssets(l,n);if(this.eventItemsMatch(a,d||r)||(this.waitingItem=a,this.log(`INTERSTITIAL_STARTED ${ys(a)} ${l.appendInPlace?"append in place":""}`),this.hls.trigger(h.INTERSTITIAL_STARTED,{event:l,schedule:t.slice(0),scheduleIndex:e})),!l.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${l}`);return}if(l.assetListLoader&&(l.assetListLoader.destroy(),l.assetListLoader=void 0),!o){this.log(`Waiting for attachMedia to start Interstitial ${l}`);return}this.waitingItem=this.endedItem=null,this.playingItem=a;const m=l.assetList[n];if(!m){const w=t[e+1],x=this.media;w&&x&&!this.isInterstitial(w)&&x.currentTime<w.start&&(x.currentTime=this.timelinePos=w.start),this.advanceAfterAssetEnded(l,e,n||0);return}if(g||(g=this.getAssetPlayer(m.identifier)),g===null||g.destroyed){const w=l.assetList.length;this.warn(`asset ${n+1}/${w} player destroyed ${l}`),g=this.createAssetPlayer(l,m,n)}if(!this.eventItemsMatch(a,this.bufferingItem)&&l.appendInPlace&&this.isAssetBuffered(m))return;this.startAssetPlayer(g,n,t,e,o),this.shouldPlay&&XA(g.media)}else a!==null?(this.resumePrimary(a,e,r),this.shouldPlay&&XA(this.hls.media)):s&&this.isInterstitial(r)&&(this.endedItem=null,this.playingItem=r,r.event.appendInPlace||this.attachPrimary(this.schedule.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e,t;return(e=this.mediaSelection)==null||(t=e.main)==null?void 0:t.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,n){var r;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${ys(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let a=this.timelinePos;(a<e.start||a>=e.end)&&(a=this.getPrimaryResumption(e,t),this.timelinePos=a),this.attachPrimary(a,e)}if(!n)return;const s=this.schedule.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${ys(e)}`),this.hls.trigger(h.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const n=e.start;if(this.primaryLive){const r=this.primaryDetails;if(t===0)return this.hls.startPosition;if(r&&(n<r.fragmentStart||n>r.edge))return this.hls.liveSyncPosition||-1}return n}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:En.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,n){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const r=this.primaryMedia;if(!r)return;const s=this.hls;s.media?this.checkBuffer():(this.transferMediaTo(s,r),n&&this.startLoadingPrimaryAt(e,n)),n||(this.timelinePos=e,this.startLoadingPrimaryAt(e,n))}startLoadingPrimaryAt(e,t){var n;const r=this.hls;!r.loadingEnabled||!r.media||Math.abs((((n=r.mainForwardBufferInfo)==null?void 0:n.start)||r.media.currentTime)-e)>.5?r.startLoad(e,t):r.bufferingEnabled||r.resumeBuffering()}onManifestLoading(){this.stopLoad(),this.schedule.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(h.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(h.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1)return;const n=this.hls.levels[t.level],r=E(E({},this.mediaSelection||this.altSelection),{},{main:n});this.mediaSelection=r,this.schedule.parseInterstitialDateRanges(r,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const n=this.hls.audioTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=E(E({},this.altSelection),{},{audio:n});return}const s=E(E({},r),{},{audio:n});this.mediaSelection=s}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=E(E({},this.altSelection),{},{subtitles:n});return}const s=E(E({},r),{},{subtitles:n});this.mediaSelection=s}onAudioTrackSwitching(e,t){const n=$t(t);this.playerQueue.forEach(r=>r.hls.setAudioOption(t)||r.hls.setAudioOption(n))}onSubtitleTrackSwitch(e,t){const n=$t(t);this.playerQueue.forEach(r=>r.hls.setSubtitleOption(t)||t.id!==-1&&r.hls.setSubtitleOption(n))}onBufferCodecs(e,t){const n=t.tracks;n&&(this.requiredTracks=n)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const n=this.playingItem;if(n&&!this.itemsMatch(n,this.bufferingItem)&&!this.isInterstitial(n)){const r=this.timelinePos;this.bufferedPos=r,this.checkBuffer()}}onBufferedToEnd(e){const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let r=0;r<t.length;r++){const s=t[r];if(s.cue.post){var n;const a=this.schedule.findEventIndex(s.identifier),o=(n=this.schedule.items)==null?void 0:n[a];this.isInterstitial(o)&&this.eventItemsMatch(o,this.bufferingItem)&&this.bufferedToItem(o,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const n=this.findItemIndex(t);this.setSchedulePosition(n+1)}else this.shouldPlay=!1}updateItem(e,t){const n=this.schedule.items;if(e&&n){const r=this.findItemIndex(e,t);return n[r]||null}return null}trimInPlace(e,t){if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach((s,a)=>{e.event.isAssetPastPlayoutLimit(a)&&this.clearAssetPlayer(s.identifier,null)});const n=e.end+.25,r=En.bufferInfo(this.primaryMedia,n,0);(r.end>n||(r.nextStart||0)>n)&&(this.attachPrimary(n,null),this.flushFrontBuffer(n))}}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var n;return!!t&&(e===t||e.event.identifier===((n=t.event)==null?void 0:n.identifier))}findItemIndex(e,t){return e?this.schedule.findItemIndex(e,t):-1}updateSchedule(){const e=this.mediaSelection;e&&this.schedule.updateSchedule(e,[])}checkBuffer(e){const t=this.schedule.items;if(!t)return;const n=En.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=n.len<1),this.updateBufferedPos(n.end,t,e)}updateBufferedPos(e,t,n){const r=this.schedule,s=this.bufferingItem;if(this.bufferedPos>e)return;if(t.length===1&&this.itemsMatch(t[0],s)){this.bufferedPos=e;return}const a=this.playingItem,o=this.findItemIndex(a);let u=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var l,d;const g=this.findItemIndex(s),m=Math.min(g+1,t.length-1),w=t[m];if((u===-1&&s&&e>=s.end||(l=w.event)!=null&&l.appendInPlace&&e+.01>=w.start)&&(u=m),m-o>1&&(s==null||(d=s.event)==null?void 0:d.appendInPlace)===!1)return;if(this.bufferedPos=e,u>g&&u>o)this.bufferedToItem(w);else{const x=this.primaryDetails;this.primaryLive&&x&&e>x.edge-x.targetduration&&w.start<x.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(w)&&this.preloadAssets(w.event,0)}}else n&&a&&!this.itemsMatch(a,s)&&(u===o?this.bufferedToItem(a):u===o+1&&this.bufferedToItem(t[u]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(r=>{const s=this.getAssetPlayer(r.identifier);return!(s!=null&&s.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,n=this.schedule;if(this.itemsMatch(e,t))this.bufferingItem!==e&&(this.bufferingItem=e);else{const{items:r,events:s}=n;if(!r||!s)return t;const a=this.isInterstitial(e),o=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const u=o?o.remaining:t?t.end-this.timelinePos:0;this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${ys(e)}`+(t?` (${u.toFixed(2)} remaining)`:"")),this.playbackDisabled||(a?e.event.assetList.forEach(l=>{const d=this.getAssetPlayer(l.identifier);d&&d.resumeBuffering()}):(this.hls.resumeBuffering(),this.playerQueue.forEach(l=>l.pauseBuffering()))),this.hls.trigger(h.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:s.slice(0),schedule:r.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}return t}bufferedToItem(e,t=0){const n=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(n!==null){this.bufferingAsset=null;const r=this.detachedData;r?r.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),n=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(n)}bufferedToEvent(e,t){const n=e.event,r=n.assetList.length===0&&!n.assetListLoader,s=n.cue.once;if(r||!s){const a=this.preloadAssets(n,t);if(a!=null&&a.interstitial.appendInPlace){const o=n.assetList[t],u=this.primaryMedia;o&&u&&this.bufferAssetPlayer(a,u)}}}preloadAssets(e,t){const n=e.assetUrl,r=e.assetList.length,s=r===0&&!e.assetListLoader,a=e.cue.once;if(s){const u=e.timelineStart;if(e.appendInPlace){var o;const m=this.playingItem;!this.isInterstitial(m)&&(m==null||(o=m.nextEvent)==null?void 0:o.identifier)===e.identifier&&this.flushFrontBuffer(u+.25)}let l,d=0;if(!this.playingItem&&this.primaryLive&&(d=this.hls.startPosition,d===-1&&(d=this.hls.liveSyncPosition||0)),d&&!(e.cue.pre||e.cue.post)){const m=d-u;m>0&&(l=Math.round(m*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${l?` live-start: ${d} start-offset: ${l}`:""}`),n)return this.createAsset(e,0,0,u,e.duration,n);const g=this.assetListLoader.loadAssetList(e,l);g&&(e.assetListLoader=g)}else if(!a&&r){for(let u=t;u<r;u++){const l=e.assetList[u],d=this.getAssetPlayerQueueIndex(l.identifier);(d===-1||this.playerQueue[d].destroyed)&&!l.error&&this.createAssetPlayer(e,l,u)}return this.getAssetPlayer(e.assetList[t].identifier)}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(r=>{this.hls.trigger(h.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:r})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let n=0;n<t.length;n++)if(e===t[n].assetId)return n;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let n=0;n<e.length;n++)if(e[n].media===t)return e[n]}return null}createAsset(e,t,n,r,s,a){const o={parentIdentifier:e.identifier,identifier:zA(e,a,t),duration:s,startOffset:n,timelineStart:r,uri:a};return this.createAssetPlayer(e,o,t)}createAssetPlayer(e,t,n){const r=this.hls,s=r.userConfig;let a=s.videoPreference;const o=r.loadLevelObj||r.levels[r.currentLevel];(a||o)&&(a=p({},a),o.videoCodec&&(a.videoCodec=o.videoCodec),o.videoRange&&(a.allowedVideoRanges=[o.videoRange]));const u=r.audioTracks[r.audioTrack],l=r.subtitleTracks[r.subtitleTrack];let d=0;if(this.primaryLive||e.appendInPlace){const be=this.timelinePos-t.timelineStart;if(be>1){const Ue=t.duration;Ue&&be<Ue&&(d=be)}}const g=t.identifier,m=E(E({},s),{},{autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:g,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:d,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:a,audioPreference:u||s.audioPreference,subtitlePreference:l||s.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(m.timelineOffset=t.timelineStart));const w=m.cmcd;w!=null&&w.sessionId&&w.contentId&&(m.cmcd=p({},w,{contentId:ma(t.uri)})),this.getAssetPlayer(g)&&this.warn(`Duplicate date range identifier ${e} and asset ${g}`);const x=new yu(this.HlsPlayerClass,m,e,t);this.playerQueue.push(x),e.assetList[n]=t;const H=be=>{if(be.live){const Dt=new Error(`Interstitials MUST be VOD assets ${e}`),rt={fatal:!0,type:le.OTHER_ERROR,details:Q.INTERSTITIAL_ASSET_ITEM_ERROR,error:Dt};this.handleAssetItemError(rt,e,this.schedule.findEventIndex(e.identifier),n,Dt.message);return}const Ue=be.edge-be.fragmentStart,ot=t.duration;(ot===null||Ue>ot)&&(this.log(`Interstitial asset "${g}" duration change ${ot} > ${Ue}`),t.duration=Ue,this.updateSchedule())};x.on(h.LEVEL_UPDATED,(be,{details:Ue})=>H(Ue)),x.on(h.LEVEL_PTS_UPDATED,(be,{details:Ue})=>H(Ue));const P=(be,Ue)=>{const ot=this.getAssetPlayer(g);if(ot&&Ue.tracks){ot.off(h.BUFFER_CODECS,P),ot.tracks=Ue.tracks;const Dt=this.primaryMedia;this.bufferingAsset===ot.assetItem&&Dt&&!ot.media&&this.bufferAssetPlayer(ot,Dt)}};x.on(h.BUFFER_CODECS,P);const me=()=>{var be;const Ue=this.getAssetPlayer(g);if(this.log(`buffered to end of asset ${Ue}`),!Ue)return;const ot=this.schedule.findEventIndex(e.identifier),Dt=(be=this.schedule.items)==null?void 0:be[ot];if(this.isInterstitial(Dt)){const Ft=e.findAssetIndex(t),Nt=va(e,Ft);if(!e.isAssetPastPlayoutLimit(Nt))this.bufferedToItem(Dt,Nt);else{var rt;const bt=(rt=this.schedule.items)==null?void 0:rt[ot+1];bt&&this.bufferedToItem(bt)}}};x.on(h.BUFFERED_TO_END,me);const De=be=>()=>{if(!this.getAssetPlayer(g))return;this.shouldPlay=!0;const ot=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,ot,be)};return x.once(h.MEDIA_ENDED,De(n)),x.once(h.PLAYOUT_LIMIT_REACHED,De(1/0)),x.on(h.ERROR,(be,Ue)=>{const ot=this.getAssetPlayer(g);if(Ue.details===Q.BUFFER_STALLED_ERROR){if(ot!=null&&ot.media){const Dt=ot.currentTime,rt=ot.duration-Dt;Dt&&e.appendInPlace&&rt/ot.media.playbackRate<.5?(this.log(`Advancing buffer past end of asset ${g} ${e} at ${ot.media.currentTime}`),me()):(this.warn(`Stalled at ${Dt} of ${Dt+rt} in asset ${g} ${e}`),this.onTimeupdate(),this.checkBuffer(!0))}return}this.handleAssetItemError(Ue,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${Ue.error} ${e}`)}),x.on(h.DESTROYING,()=>{if(!this.getAssetPlayer(g))return;const Ue=new Error(`Asset player destroyed unexpectedly ${g}`),ot={fatal:!0,type:le.OTHER_ERROR,details:Q.INTERSTITIAL_ASSET_ITEM_ERROR,error:Ue};this.handleAssetItemError(ot,e,this.schedule.findEventIndex(e.identifier),n,Ue.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${ks(t)}`),this.hls.trigger(h.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:x}),x}clearInterstitial(e,t){e.assetList.forEach(n=>{this.clearAssetPlayer(n.identifier,t)}),e.reset()}resetAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);if(t!==-1){this.log(`reset asset player "${e}" after error`);const n=this.playerQueue[t];this.transferMediaFromPlayer(n,null),n.resetDetails()}}clearAssetPlayer(e,t){const n=this.getAssetPlayerQueueIndex(e);if(n!==-1){this.log(`clear asset player "${e}" toSegment: ${t&&ys(t)}`);const r=this.playerQueue[n];this.transferMediaFromPlayer(r,t),this.playerQueue.splice(n,1),r.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,n,r,s){const{interstitial:a,assetItem:o,assetId:u}=e,l=a.assetList.length,d=this.playingAsset;this.endedAsset=null,this.playingAsset=o,(!d||d.identifier!==u)&&(d&&(this.clearAssetPlayer(d.identifier,n[r]),delete d.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${l} ${ks(o)}`),this.hls.trigger(h.INTERSTITIAL_ASSET_STARTED,{asset:o,assetListIndex:t,event:a,schedule:n.slice(0),scheduleIndex:r,player:e})),this.bufferAssetPlayer(e,s)}bufferAssetPlayer(e,t){var n,r;const{interstitial:s,assetItem:a}=e,o=this.schedule.findEventIndex(s.identifier),u=(n=this.schedule.items)==null?void 0:n[o];if(!u)return;this.setBufferingItem(u),this.bufferingAsset=a;const l=this.getBufferingPlayer();if(l===e)return;const d=s.appendInPlace;if(d&&(l==null?void 0:l.interstitial.appendInPlace)===!1)return;const g=(l==null?void 0:l.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(d&&a!==this.playingAsset){if(!e.tracks)return;if(g&&!pe(g,e.tracks)){const m=new Error(`Asset ${ks(a)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(g)}')`),w={fatal:!0,type:le.OTHER_ERROR,details:Q.INTERSTITIAL_ASSET_ITEM_ERROR,error:m},x=s.findAssetIndex(a);this.handleAssetItemError(w,s,o,x,m.message);return}}this.transferMediaTo(e,t)}handleAssetItemError(e,t,n,r,s){if(e.details===Q.BUFFER_STALLED_ERROR)return;const a=t.assetList[r];this.warn(`INTERSTITIAL_ASSET_ERROR ${a&&ks(a)} ${e.error}`);const o=a==null?void 0:a.identifier,u=this.getAssetPlayerQueueIndex(o),l=this.playerQueue[u]||null,d=this.schedule.items,g=p({},e,{fatal:!1,errorAction:ue(!0),asset:a,assetListIndex:r,event:t,schedule:d,scheduleIndex:n,player:l});if(this.hls.trigger(h.INTERSTITIAL_ASSET_ERROR,g),!e.fatal)return;const m=this.playingAsset,w=new Error(s);if(a&&(this.clearAssetPlayer(o,null),a.error=w),!t.assetList.some(x=>!x.error))t.error=w;else if(t.appendInPlace){for(let x=r;x<t.assetList.length;x++)this.resetAssetPlayer(t.assetList[x].identifier);this.updateSchedule()}t.error?this.primaryFallback(t):m&&m.identifier===o&&this.advanceAfterAssetEnded(t,n,r)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;if(this.updateSchedule(),n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${n?ys(n):"<none>"} error: ${e.error}`);let r=this.timelinePos;r===-1&&(r=this.hls.startPosition);const s=this.updateItem(n,r);this.itemsMatch(n,s)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t));const a=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(a)}else this.checkStart()}onAssetListLoaded(e,t){var n;const r=t.event,s=r.identifier,a=t.assetListResponse.ASSETS;if(!this.schedule.hasEvent(s))return;const o=r.timelineStart,u=r.duration;let l=0;a.forEach((x,H)=>{const P=parseFloat(x.DURATION);this.createAsset(r,H,l,o+l,P,x.URI),l+=P}),r.duration=l,this.log(`Loaded asset-list with duration: ${l} (was: ${u}) ${r}`);const d=this.waitingItem,g=(d==null?void 0:d.event.identifier)===s;this.updateSchedule();const m=(n=this.bufferingItem)==null?void 0:n.event;if(g){var w;const x=this.schedule.findEventIndex(s),H=(w=this.schedule.items)==null?void 0:w[x];if(H){if(!this.playingItem&&this.timelinePos>H.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==x){r.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${r}`),this.primaryFallback(r);return}this.setBufferingItem(H)}this.setSchedulePosition(x)}else if((m==null?void 0:m.identifier)===s&&m.appendInPlace){const x=r.assetList[0],H=this.getAssetPlayer(x.identifier),P=this.primaryMedia;x&&H&&P&&this.bufferAssetPlayer(H,P)}}onError(e,t){switch(t.details){case Q.ASSET_LIST_PARSING_ERROR:case Q.ASSET_LIST_LOAD_ERROR:case Q.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&this.primaryFallback(n);break}case Q.BUFFER_STALLED_ERROR:{this.onTimeupdate(),this.checkBuffer(!0);break}}}}const Xo=500;class Eu extends zr{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",ie.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(h.LEVEL_LOADED,this.onLevelLoaded,this),e.on(h.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(h.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(h.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(h.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(h.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(h.LEVEL_LOADED,this.onLevelLoaded,this),e.off(h.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(h.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(h.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(h.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(h.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=Zt.IDLE,this.setInterval(Xo),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:n,success:r}=t;if(de(n)&&(this.fragPrevious=n),this.state=Zt.IDLE,!r)return;const s=this.tracksBuffered[this.currentTrackId];if(!s)return;let a;const o=n.start;for(let l=0;l<s.length;l++)if(o>=s[l].start&&o<=s[l].end){a=s[l];break}const u=n.start+n.duration;a?a.end=u:(a={start:o,end:u},s.push(a)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:n,endOffset:r}=t;if(n===0&&r!==Number.POSITIVE_INFINITY){const s=r-1;if(s<=0)return;t.endOffsetSubtitles=Math.max(0,s),this.tracksBuffered.forEach(a=>{for(let o=0;o<a.length;){if(a[o].end<=s){a.shift();continue}else if(a[o].start<s)a[o].start=s;else break;o++}}),this.fragmentTracker.removeFragmentsInRange(n,s,ie.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===ie.SUBTITLE&&(t.details===Q.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Zt.STOPPED&&(this.state=Zt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&Ka(this.levels,t)){this.levels=t.map(n=>new Pt(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new Pt(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,ie.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var n;if(this.currentTrackId=t.id,!((n=this.levels)!=null&&n.length)||this.currentTrackId===-1){this.clearInterval();return}const r=this.levels[this.currentTrackId];r!=null&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.state!==Zt.STOPPED&&this.setInterval(Xo)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:s}=this,{details:a,id:o}=t;if(!s){this.warn(`Subtitle tracks were reset while loading level ${o}`);return}const u=s[o];if(o>=s.length||!u)return;this.log(`Subtitle track ${o} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""},duration:${a.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let l=0;if(a.live||(n=u.details)!=null&&n.live){const g=this.mainDetails;if(a.deltaUpdateFailed||!g)return;const m=g.fragments[0];if(!u.details)a.hasProgramDateTime&&g.hasProgramDateTime?(gs(a,g),l=a.fragmentStart):m&&(l=m.start,Hr(a,l));else{var d;l=this.alignPlaylists(a,u.details,(d=this.levelLastLoaded)==null?void 0:d.details),l===0&&m&&(l=m.start,Hr(a,l))}}u.details=a,this.levelLastLoaded=u,o===r&&(this.hls.trigger(h.SUBTITLE_TRACK_UPDATED,{details:a,id:o,groupId:t.groupId}),this.tick(),a.live&&!this.fragCurrent&&this.media&&this.state===Zt.IDLE&&(cn(null,a.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),u.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,r=t.decryptdata,s=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&r!=null&&r.key&&r.iv&&Kr(r.method)){const a=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,Ai(r.method)).catch(o=>{throw s.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.FRAG_DECRYPT_ERROR,fatal:!1,error:o,reason:o.message,frag:t}),o}).then(o=>{const u=performance.now();s.trigger(h.FRAG_DECRYPTED,{frag:t,payload:o,stats:{tstart:a,tdecrypt:u}})}).catch(o=>{this.warn(`${o.name}: ${o.message}`),this.state=Zt.IDLE})}}doTick(){if(!this.media){this.state=Zt.IDLE;return}if(this.state===Zt.IDLE){const{currentTrackId:e,levels:t}=this,n=t==null?void 0:t[e];if(!n||!t.length||!n.details||this.waitForLive(n))return;const{config:r}=this,s=this.getLoadPosition(),a=En.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],s,r.maxBufferHole),{end:o,len:u}=a,l=n.details,d=this.hls.maxBufferLength+l.levelTargetDuration;if(u>d)return;const g=l.fragments,m=g.length,w=l.edge;let x=null;const H=this.fragPrevious;if(o<w){const De=r.maxFragLookUpTolerance,be=o>w-De?0:De;x=cn(H,g,Math.max(g[0].start,o),be),!x&&H&&H.start<g[0].start&&(x=g[0])}else x=g[m-1];if(x=this.filterReplacedPrimary(x,n.details),!x)return;const P=x.sn-l.startSN,me=g[P-1];if(me&&me.cc===x.cc&&this.fragmentTracker.getState(me)===Oe.NOT_LOADED&&(x=me),this.fragmentTracker.getState(x)===Oe.NOT_LOADED){const De=this.mapToInitFragWhenRequired(x);De&&this.loadFragment(De,n,o)}}}loadFragment(e,t,n){de(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new wu(this.tracksBuffered[this.currentTrackId]||[])}}class wu{constructor(e){this.buffered=void 0;const t=(n,r,s)=>{if(r=r>>>0,r>s-1)throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${r}) is greater than the maximum bound (${s})`);return e[r][n]};this.buffered={get length(){return e.length},end(n){return t("end",n,e.length)},start(n){return t("start",n,e.length)}}}}const ta={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},Jo=i=>String.fromCharCode(ta[i]||i),jr=15,Li=100,na={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Ss={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Ts={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},ya={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Es=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class qA{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;X.log(`${this.time} [${e}] ${n}`)}}}const Is=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class qo{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let n=0;n<t.length;n++){const r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class eA{constructor(){this.uchar=" ",this.penState=new qo}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 Ea{constructor(e){this.chars=[],this.pos=0,this.currPenState=new qo,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<Li;t++)this.chars.push(new eA);this.logger=e}equals(e){for(let t=0;t<Li;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<Li;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<Li;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>Li&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Li)}moveCursor(e){const t=this.pos+e;if(e>1)for(let n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=Jo(e);if(this.pos>=Li){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<Li;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let n=0;n<Li;n++){const r=this.chars[n].uchar;r!==" "&&(t=!1),e.push(r)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class eo{constructor(e){this.rows=[],this.currRow=jr-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<jr;t++)this.rows.push(new Ea(e));this.logger=e}reset(){for(let e=0;e<jr;e++)this.rows[e].clear();this.currRow=jr-1}equals(e){let t=!0;for(let n=0;n<jr;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<jr;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<jr;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 = "+Lt(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let o=0;o<jr;o++)this.rows[o].clear();const s=this.currRow+1-this.nrRollUpRows,a=this.lastOutputScreen;if(a){const o=a.rows[s].cueStartTime,u=this.logger.time;if(o!==null&&u!==null&&o<u)for(let l=0;l<this.nrRollUpRows;l++)this.rows[t-this.nrRollUpRows+l+1].copy(a.rows[s+l])}}this.currRow=t;const n=this.rows[this.currRow];if(e.indent!==null){const s=e.indent,a=Math.max(s-1,0);n.setCursor(e.indent),e.color=n.chars[a].penState.foreground}const r={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(r)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+Lt(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let n="",r=-1;for(let s=0;s<jr;s++){const a=this.rows[s].getTextString();a&&(r=s+1,e?t.push("Row "+r+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(e?n="["+t.join(" | ")+"]":n=t.join(`
|
|
`)),n}getTextAndFormat(){return this.rows}}class tA{constructor(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new eo(n),this.nonDisplayedMemory=new eo(n),this.lastOutputScreen=new eo(n),this.currRollUpRow=this.displayedMemory.rows[jr-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[jr-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}this.logger.log(2,"MIDROW: "+Lt(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 ra{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=bu(),this.logger=void 0;const r=this.logger=new qA;this.channels=[null,new tA(e,t,r),new tA(e+1,n,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let n=0;n<t.length;n+=2){const r=t[n]&127,s=t[n+1]&127;let a=!1,o=null;if(r===0&&s===0)continue;this.logger.log(3,()=>"["+Is([t[n],t[n+1]])+"] -> ("+Is([r,s])+")");const u=this.cmdHistory;if(r>=16&&r<=31){if(Bu(r,s,u)){to(null,null,u),this.logger.log(3,()=>"Repeated command ("+Is([r,s])+") is dropped");continue}to(r,s,this.cmdHistory),a=this.parseCmd(r,s),a||(a=this.parseMidrow(r,s)),a||(a=this.parsePAC(r,s)),a||(a=this.parseBackgroundAttributes(r,s))}else to(null,null,u);if(!a&&(o=this.parseChars(r,s),o)){const d=this.currentChannel;d&&d>0?this.channels[d].insertChars(o):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!a&&!o&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Is([r,s])+" orig: "+Is([t[n],t[n+1]]))}}parseCmd(e,t){const n=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=33&&t<=35;if(!(n||r))return!1;const s=e===20||e===21||e===23?1:2,a=this.channels[s];return e===20||e===21||e===28||e===29?t===32?a.ccRCL():t===33?a.ccBS():t===34?a.ccAOF():t===35?a.ccAON():t===36?a.ccDER():t===37?a.ccRU(2):t===38?a.ccRU(3):t===39?a.ccRU(4):t===40?a.ccFON():t===41?a.ccRDC():t===42?a.ccTR():t===43?a.ccRTD():t===44?a.ccEDM():t===45?a.ccCR():t===46?a.ccENM():t===47&&a.ccEOC():a.ccTO(t-32),this.currentChannel=s,!0}parseMidrow(e,t){let n=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?n=1:n=2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const r=this.channels[n];return r?(r.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+Is([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let n;const r=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,s=(e===16||e===24)&&t>=64&&t<=95;if(!(r||s))return!1;const a=e<=23?1:2;t>=64&&t<=95?n=a===1?na[e]:Ts[e]:n=a===1?Ss[e]:ya[e];const o=this.channels[a];return o?(o.setPAC(this.interpretPAC(n,t)),this.currentChannel=a,!0):!1}interpretPAC(e,t){let n;const r={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?n=t-96:n=t-64,r.underline=(n&1)===1,n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=Math.floor((n-16)/2)*4,r}parseChars(e,t){let n,r=null,s=null;if(e>=25?(n=2,s=e-8):(n=1,s=e),s>=17&&s<=19){let a;s===17?a=t+80:s===18?a=t+112:a=t+144,this.logger.log(2,()=>"Special char '"+Jo(a)+"' in channel "+n),r=[a]}else e>=32&&e<=127&&(r=t===0?[e]:[e,t]);return r&&this.logger.log(3,()=>"Char codes = "+Is(r).join(",")),r}parseBackgroundAttributes(e,t){const n=(e===16||e===24)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=45&&t<=47;if(!(n||r))return!1;let s;const a={};e===16||e===24?(s=Math.floor((t-32)/2),a.background=Es[s],t%2===1&&(a.background=a.background+"_semi")):t===45?a.background="transparent":(a.foreground="black",t===47&&(a.underline=!0));const o=e<=23?1:2;return this.channels[o].setBkgData(a),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}to(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const n=this.channels[t];n&&n.cueSplitAtTime(e)}}}function to(i,e,t){t.a=i,t.b=e}function Bu(i,e,t){return t.a===i&&t.b===e}function bu(){return{a:null,b:null}}var nA=function(){if(Cr!=null&&Cr.VTTCue)return self.VTTCue;const i=["","lr","rl"],e=["start","middle","end","left","right"];function t(o,u){if(typeof u!="string"||!Array.isArray(o))return!1;const l=u.toLowerCase();return~o.indexOf(l)?l:!1}function n(o){return t(i,o)}function r(o){return t(e,o)}function s(o,...u){let l=1;for(;l<arguments.length;l++){const d=arguments[l];for(const g in d)o[g]=d[g]}return o}function a(o,u,l){const d=this,g={enumerable:!0};d.hasBeenReset=!1;let m="",w=!1,x=o,H=u,P=l,me=null,De="",be=!0,Ue="auto",ot="start",Dt=50,rt="middle",Ft=50,Nt="middle";Object.defineProperty(d,"id",s({},g,{get:function(){return m},set:function(bt){m=""+bt}})),Object.defineProperty(d,"pauseOnExit",s({},g,{get:function(){return w},set:function(bt){w=!!bt}})),Object.defineProperty(d,"startTime",s({},g,{get:function(){return x},set:function(bt){if(typeof bt!="number")throw new TypeError("Start time must be set to a number.");x=bt,this.hasBeenReset=!0}})),Object.defineProperty(d,"endTime",s({},g,{get:function(){return H},set:function(bt){if(typeof bt!="number")throw new TypeError("End time must be set to a number.");H=bt,this.hasBeenReset=!0}})),Object.defineProperty(d,"text",s({},g,{get:function(){return P},set:function(bt){P=""+bt,this.hasBeenReset=!0}})),Object.defineProperty(d,"region",s({},g,{get:function(){return me},set:function(bt){me=bt,this.hasBeenReset=!0}})),Object.defineProperty(d,"vertical",s({},g,{get:function(){return De},set:function(bt){const ln=n(bt);if(ln===!1)throw new SyntaxError("An invalid or illegal string was specified.");De=ln,this.hasBeenReset=!0}})),Object.defineProperty(d,"snapToLines",s({},g,{get:function(){return be},set:function(bt){be=!!bt,this.hasBeenReset=!0}})),Object.defineProperty(d,"line",s({},g,{get:function(){return Ue},set:function(bt){if(typeof bt!="number"&&bt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");Ue=bt,this.hasBeenReset=!0}})),Object.defineProperty(d,"lineAlign",s({},g,{get:function(){return ot},set:function(bt){const ln=r(bt);if(!ln)throw new SyntaxError("An invalid or illegal string was specified.");ot=ln,this.hasBeenReset=!0}})),Object.defineProperty(d,"position",s({},g,{get:function(){return Dt},set:function(bt){if(bt<0||bt>100)throw new Error("Position must be between 0 and 100.");Dt=bt,this.hasBeenReset=!0}})),Object.defineProperty(d,"positionAlign",s({},g,{get:function(){return rt},set:function(bt){const ln=r(bt);if(!ln)throw new SyntaxError("An invalid or illegal string was specified.");rt=ln,this.hasBeenReset=!0}})),Object.defineProperty(d,"size",s({},g,{get:function(){return Ft},set:function(bt){if(bt<0||bt>100)throw new Error("Size must be between 0 and 100.");Ft=bt,this.hasBeenReset=!0}})),Object.defineProperty(d,"align",s({},g,{get:function(){return Nt},set:function(bt){const ln=r(bt);if(!ln)throw new SyntaxError("An invalid or illegal string was specified.");Nt=ln,this.hasBeenReset=!0}})),d.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();class Cu{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function no(i){function e(n,r,s,a){return(n|0)*3600+(r|0)*60+(s|0)+parseFloat(a||0)}const t=i.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 xu{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,n){for(let r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1}}function el(i,e,t,n){const r=n?i.split(n):[i];for(const s in r){if(typeof r[s]!="string")continue;const a=r[s].split(t);if(a.length!==2)continue;const o=a[0],u=a[1];e(o,u)}}const rA=new nA(0,0,""),ro=rA.align==="middle"?"middle":"center";function Su(i,e,t){const n=i;function r(){const o=no(i);if(o===null)throw new Error("Malformed timestamp: "+n);return i=i.replace(/^[^\sa-zA-Z-]+/,""),o}function s(o,u){const l=new xu;el(o,function(m,w){let x;switch(m){case"region":for(let H=t.length-1;H>=0;H--)if(t[H].id===w){l.set(m,t[H].region);break}break;case"vertical":l.alt(m,w,["rl","lr"]);break;case"line":x=w.split(","),l.integer(m,x[0]),l.percent(m,x[0])&&l.set("snapToLines",!1),l.alt(m,x[0],["auto"]),x.length===2&&l.alt("lineAlign",x[1],["start",ro,"end"]);break;case"position":x=w.split(","),l.percent(m,x[0]),x.length===2&&l.alt("positionAlign",x[1],["start",ro,"end","line-left","line-right","auto"]);break;case"size":l.percent(m,w);break;case"align":l.alt(m,w,["start",ro,"end","left","right"]);break}},/:/,/\s/),u.region=l.get("region",null),u.vertical=l.get("vertical","");let d=l.get("line","auto");d==="auto"&&rA.line===-1&&(d=-1),u.line=d,u.lineAlign=l.get("lineAlign","start"),u.snapToLines=l.get("snapToLines",!0),u.size=l.get("size",100),u.align=l.get("align",ro);let g=l.get("position","auto");g==="auto"&&rA.position===50&&(g=u.align==="start"||u.align==="left"?0:u.align==="end"||u.align==="right"?100:50),u.position=g}function a(){i=i.replace(/^\s+/,"")}if(a(),e.startTime=r(),a(),i.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);i=i.slice(3),a(),e.endTime=r(),a(),s(i,e)}function io(i){return i.replace(/<br(?: \/)?>/gi,`
|
|
`)}class iA{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new Cu,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function n(){let s=t.buffer,a=0;for(s=io(s);a<s.length&&s[a]!=="\r"&&s[a]!==`
|
|
`;)++a;const o=s.slice(0,a);return s[a]==="\r"&&++a,s[a]===`
|
|
`&&++a,t.buffer=s.slice(a),o}function r(s){el(s,function(a,o){},/:/)}try{let s="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;s=n();const o=s.match(/^()?WEBVTT([ \t].*)?$/);if(!(o!=null&&o[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let a=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:s=n(),t.state){case"HEADER":/:/.test(s)?r(s):s||(t.state="ID");continue;case"NOTE":s||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(s)){t.state="NOTE";break}if(!s)continue;if(t.cue=new nA(0,0,""),t.state="CUE",s.indexOf("-->")===-1){t.cue.id=s;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Su(s,t.cue,t.regionList)}catch(o){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const o=s.indexOf("-->")!==-1;if(!s||o&&(a=!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+=s}continue;case"BADCUE":s||(t.state="ID")}}}catch(s){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 tl=/\r\n|\n\r|\n|\r/g,sA=function(e,t,n=0){return e.slice(n,n+t.length)===t},Tu=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),s=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!N(t)||!N(n)||!N(r)||!N(s))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*s,t};function so(i,e,t){return ma(i.toString())+ma(e.toString())+ma(t)}const Iu=function(e,t,n){let r=e[t],s=e[r.prevCC];if(!s||!s.new&&r.new){e.ccOffset=e.presentationOffset=r.start,r.new=!1;return}for(;(a=s)!=null&&a.new;){var a;e.ccOffset+=r.start-s.start,r.new=!1,r=s,s=e[r.prevCC]}e.presentationOffset=n};function Fu(i,e,t,n,r,s,a){const o=new iA,u=_e(new Uint8Array(i)).trim().replace(tl,`
|
|
`).split(`
|
|
`),l=[],d=e?Ol(e.baseTime,e.timescale):0;let g="00:00.000",m=0,w=0,x,H=!0;o.oncue=function(P){const me=t[n];let De=t.ccOffset;const be=(m-d)/9e4;if(me!=null&&me.new&&(w!==void 0?De=t.ccOffset=me.start:Iu(t,n,be)),be){if(!e){x=new Error("Missing initPTS for VTT MPEGTS");return}De=be-t.presentationOffset}const Ue=P.endTime-P.startTime,ot=Xi((P.startTime+De-w)*9e4,r*9e4)/9e4;P.startTime=Math.max(ot,0),P.endTime=Math.max(ot+Ue,0);const Dt=P.text.trim();P.text=decodeURIComponent(encodeURIComponent(Dt)),P.id||(P.id=so(P.startTime,P.endTime,Dt)),P.endTime>0&&l.push(P)},o.onparsingerror=function(P){x=P},o.onflush=function(){if(x){a(x);return}s(l)},u.forEach(P=>{if(H)if(sA(P,"X-TIMESTAMP-MAP=")){H=!1,P.slice(16).split(",").forEach(me=>{sA(me,"LOCAL:")?g=me.slice(6):sA(me,"MPEGTS:")&&(m=parseInt(me.slice(7)))});try{w=Tu(g)/1e3}catch(me){x=me}return}else P===""&&(H=!1);o.parse(P+`
|
|
`)}),o.flush()}const aA="stpp.ttml.im1t",nl=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,rl=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,oA={left:"start",center:"center",right:"end",start:"start",end:"end"};function il(i,e,t,n){const r=W(new Uint8Array(i),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const s=r.map(o=>_e(o)),a=yi(e.baseTime,1,e.timescale);try{s.forEach(o=>t(AA(o,a)))}catch(o){n(o)}}function AA(i,e){const r=new DOMParser().parseFromString(i,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");const s={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(s).reduce((g,m)=>(g[m]=r.getAttribute(`ttp:${m}`)||s[m],g),{}),o=r.getAttribute("xml:space")!=="preserve",u=sr(lA(r,"styling","style")),l=sr(lA(r,"layout","region")),d=lA(r,"body","[begin]");return[].map.call(d,g=>{const m=Os(g,o);if(!m||!g.hasAttribute("begin"))return null;const w=Zr(g.getAttribute("begin"),a),x=Zr(g.getAttribute("dur"),a);let H=Zr(g.getAttribute("end"),a);if(w===null)throw sl(g);if(H===null){if(x===null)throw sl(g);H=w+x}const P=new nA(w-e,H-e,m);P.id=so(P.startTime,P.endTime,P.text);const me=l[g.getAttribute("region")],De=u[g.getAttribute("style")],be=ao(me,De,u),{textAlign:Ue}=be;if(Ue){const ot=oA[Ue];ot&&(P.lineAlign=ot),P.align=Ue}return p(P,be),P}).filter(g=>g!==null)}function lA(i,e,t){const n=i.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function sr(i){return i.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function Os(i,e){return[].slice.call(i.childNodes).reduce((t,n,r)=>{var s;return n.nodeName==="br"&&r?t+`
|
|
`:(s=n.childNodes)!=null&&s.length?Os(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function ao(i,e,t){const n="http://www.w3.org/ns/ttml#styling";let r=null;const s=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],a=i!=null&&i.hasAttribute("style")?i.getAttribute("style"):null;return a&&t.hasOwnProperty(a)&&(r=t[a]),s.reduce((o,u)=>{const l=Qi(e,n,u)||Qi(i,n,u)||Qi(r,n,u);return l&&(o[u]=l),o},{})}function Qi(i,e,t){return i&&i.hasAttributeNS(e,t)?i.getAttributeNS(e,t):null}function sl(i){return new Error(`Could not parse ttml timestamp ${i}`)}function Zr(i,e){if(!i)return null;let t=no(i);return t===null&&(nl.test(i)?t=ui(i,e):rl.test(i)&&(t=oo(i,e))),t}function ui(i,e){const t=nl.exec(i),n=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+n/e.frameRate}function oo(i,e){const t=rl.exec(i),n=Number(t[1]);switch(t[2]){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}class Ao{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,n){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}class lo{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=ol(),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(h.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(h.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(h.FRAG_LOADING,this.onFragLoading,this),e.on(h.FRAG_LOADED,this.onFragLoaded,this),e.on(h.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(h.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(h.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(h.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(h.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(h.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(h.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(h.FRAG_LOADING,this.onFragLoading,this),e.off(h.FRAG_LOADED,this.onFragLoaded,this),e.off(h.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(h.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(h.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(h.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(h.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new Ao(this,"textTrack1"),t=new Ao(this,"textTrack2"),n=new Ao(this,"textTrack3"),r=new Ao(this,"textTrack4");this.cea608Parser1=new ra(1,e,t),this.cea608Parser2=new ra(3,n,r)}addCues(e,t,n,r,s){let a=!1;for(let o=s.length;o--;){const u=s[o],l=Du(u[0],u[1],t,n);if(l>=0&&(u[0]=Math.min(u[0],t),u[1]=Math.max(u[1],n),a=!0,l/(n-t)>.5))return}if(a||s.push([t,n]),this.config.renderTextTracksNatively){const o=this.captionsTracks[e];this.Cues.newCue(o,t,n,r)}else{const o=this.Cues.newCue(null,t,n,r);this.hls.trigger(h.CUES_PARSED,{type:"captions",cues:o,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:s}){const{unparsedVttFrags:a}=this;n===ie.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:s}),a.length&&(this.unparsedVttFrags=[],a.forEach(o=>{this.onFragLoaded(h.FRAG_LOADED,o)}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let r=0;r<n.textTracks.length;r++){const s=n.textTracks[r];if(wa(s,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return s}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:n,media:r}=this,{label:s,languageCode:a}=t[e],o=this.getExistingTrack(s,a);if(o)n[e]=o,Xs(n[e]),Zo(n[e],r);else{const u=this.createTextTrack("captions",s,a);u&&(u[e]=!0,n[e]=u)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n=t.label,r={_id:e,label:n,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=r,this.hls.trigger(h.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}createTextTrack(e,t,n){const r=this.media;if(r)return r.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const n=!!t.transferMedia;if(this.media=null,n)return;const{captionsTracks:r}=this;Object.keys(r).forEach(s=>{Xs(r[s]),delete r[s]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=ol(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let n=0;n<t.length;n++)Xs(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some(s=>s.textCodec===aA);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(Ka(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const a=this.media,o=a?qs(a.textTracks):null;if(this.tracks.forEach((u,l)=>{let d;if(o){let g=null;for(let m=0;m<o.length;m++)if(o[m]&&wa(o[m],u)){g=o[m],o[m]=null;break}g&&(d=g)}if(d)Xs(d);else{const g=al(u);d=this.createTextTrack(g,u.name,u.lang),d&&(d.mode="disabled")}d&&this.textTracks.push(d)}),o!=null&&o.length){const u=o.filter(l=>l!==null).map(l=>l.label);u.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${u.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const a=this.tracks.map(o=>({label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}));this.hls.trigger(h.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:a})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(n=>{const r=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!r)return;const s=`textTrack${r[1]}`,a=this.captionsProperties[s];a&&(a.label=n.name,n.lang&&(a.languageCode=n.lang),a.media=n)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===ie.MAIN){var n,r;const{cea608Parser1:s,cea608Parser2:a,lastSn:o}=this,{cc:u,sn:l}=t.frag,d=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;s&&a&&(l!==o+1||l===o&&d!==this.lastPartIndex+1||u!==this.lastCc)&&(s.reset(),a.reset()),this.lastCc=u,this.lastSn=l,this.lastPartIndex=d}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===ie.SUBTITLE)if(r.byteLength){const s=n.decryptdata,a="stats"in t;if(s==null||!s.encrypted||a){const o=this.tracks[n.level],u=this.vttCCs;u[n.cc]||(u[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),o&&o.textCodec===aA?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(h.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;il(t,this.initPTS[e.cc],r=>{this._appendCues(r,e.level),n.trigger(h.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(h.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})})}_parseVTTs(e){var t;const{frag:n,payload:r}=e,{initPTS:s,unparsedVttFrags:a}=this,o=s.length-1;if(!s[n.cc]&&o===-1){a.push(e);return}const u=this.hls,l=(t=n.initSegment)!=null&&t.data?Ne(n.initSegment.data,new Uint8Array(r)).buffer:r;Fu(l,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,d=>{this._appendCues(d,n.level),u.trigger(h.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},d=>{const g=d.message==="Missing initPTS for VTT MPEGTS";g?a.push(e):this._fallbackToIMSC1(n,r),u.logger.log(`Failed to parse VTT cue: ${d}`),!(g&&o>n.cc)&&u.trigger(h.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:d})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||il(t,this.initPTS[e.cc],()=>{n.textCodec=aA,this._parseIMSC1(e,t)},()=>{n.textCodec="wvtt"})}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const r=this.textTracks[t];if(!r||r.mode==="disabled")return;e.forEach(s=>Wo(r,s))}else{const r=this.tracks[t];if(!r)return;const s=r.default?"default":"subtitles"+t;n.trigger(h.CUES_PARSED,{type:"subtitles",cues:e,track:s})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===ie.SUBTITLE&&this.onFragLoaded(h.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:n,samples:r}=t;if(!(n.type===ie.MAIN&&this.closedCaptionsForLevel(n)==="NONE"))for(let s=0;s<r.length;s++){const a=r[s].bytes;if(a){this.cea608Parser1||this.initCea608Parsers();const o=this.extractCea608Data(a);this.cea608Parser1.addData(r[s].pts,o[0]),this.cea608Parser2.addData(r[s].pts,o[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:r,type:s}){const{media:a}=this;if(!(!a||a.currentTime<n)){if(!s||s==="video"){const{captionsTracks:o}=this;Object.keys(o).forEach(u=>zo(o[u],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:o}=this;Object.keys(o).forEach(u=>zo(o[u],t,r))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let r=2;for(let s=0;s<n;s++){const a=e[r++],o=127&e[r++],u=127&e[r++];if(o===0&&u===0)continue;if((4&a)!==0){const d=3&a;(d===0||d===1)&&(t[d].push(o),t[d].push(u))}}return t}}function al(i){return i.characteristics&&/transcribes-spoken-dialog/gi.test(i.characteristics)&&/describes-music-and-sound/gi.test(i.characteristics)?"captions":"subtitles"}function wa(i,e){return!!i&&i.kind===al(e)&&Io(e,i)}function Du(i,e,t,n){return Math.min(e,n)-Math.max(i,t)}function ol(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const Al=/\s/,Ru={newCue(i,e,t,n){const r=[];let s,a,o,u,l;const d=self.VTTCue||self.TextTrackCue;for(let m=0;m<n.rows.length;m++)if(s=n.rows[m],o=!0,u=0,l="",!s.isEmpty()){var g;for(let H=0;H<s.chars.length;H++)Al.test(s.chars[H].uchar)&&o?u++:(l+=s.chars[H].uchar,o=!1);s.cueStartTime=e,e===t&&(t+=1e-4),u>=16?u--:u++;const w=io(l.trim()),x=so(e,t,w);i!=null&&(g=i.cues)!=null&&g.getCueById(x)||(a=new d(e,t,w),a.id=x,a.line=m+1,a.align="left",a.position=10+Math.min(80,Math.floor(u*8/32)*10),r.push(a))}return i&&r.length&&(r.sort((m,w)=>m.line==="auto"||w.line==="auto"?0:m.line>8&&w.line>8?w.line-m.line:m.line-w.line),r.forEach(m=>Wo(i,m))),r}};function ll(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(i){}return!1}const Lu=/(\d+)-(\d+)\/(\d+)/;class uA{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||Uu,this.controller=new self.AbortController,this.stats=new y}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();const s=ul(e,this.controller.signal),a=e.responseType==="arraybuffer",o=a?"byteLength":"length",{maxTimeToFirstByteMs:u,maxLoadTimeMs:l}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,s),self.clearTimeout(this.requestTimeout),t.timeout=u&&N(u)?u:l,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(da(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(g=>{var m;this.response=this.loader=g;const w=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=l,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},l-(w-r.loading.start)),!g.ok){const{status:H,statusText:P}=g;throw new fl(P||"fetch, bad network response",H,g)}r.loading.first=w,r.total=cl(g.headers)||r.total;const x=(m=this.callbacks)==null?void 0:m.onProgress;return x&&N(t.highWaterMark)?this.loadProgressively(g,r,e,t.highWaterMark,x):a?g.arrayBuffer():e.responseType==="json"?g.json():g.text()}).then(g=>{var m,w;const x=this.response;if(!x)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const H=g[o];H&&(r.loaded=r.total=H);const P={url:x.url,data:g,code:x.status},me=(m=this.callbacks)==null?void 0:m.onProgress;me&&!N(t.highWaterMark)&&me(r,e,g,x),(w=this.callbacks)==null||w.onSuccess(P,r,e,x)}).catch(g=>{var m;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const w=g&&g.code||0,x=g?g.message:null;(m=this.callbacks)==null||m.onError({code:w,text:x},e,g?g.details:null,r)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,r=0,s){const a=new hi,o=e.body.getReader(),u=()=>o.read().then(l=>{if(l.done)return a.dataLength&&s(t,n,a.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const d=l.value,g=d.length;return t.loaded+=g,g<r||a.dataLength?(a.push(d),a.dataLength>=r&&s(t,n,a.flush().buffer,e)):s(t,n,d.buffer,e),u()}).catch(()=>Promise.reject());return u()}}function ul(i,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(p({},i.headers))};return i.rangeEnd&&t.headers.set("Range","bytes="+i.rangeStart+"-"+String(i.rangeEnd-1)),t}function cA(i){const e=Lu.exec(i);if(e)return parseInt(e[2])-parseInt(e[1])+1}function cl(i){const e=i.get("Content-Range");if(e){const n=cA(e);if(N(n))return n}const t=i.get("Content-Length");if(t)return parseInt(t)}function Uu(i,e){return new self.Request(i.url,e)}class fl extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const ku=/^age:\s*[\d.]+\s*$/im;class dl{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 y,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0,r.aborted=!1;const s=this.xhrSetup;s?Promise.resolve().then(()=>{if(!(this.loader!==n||this.stats.aborted))return s(n,t.url)}).catch(a=>{if(!(this.loader!==n||this.stats.aborted))return n.open("GET",t.url,!0),s(n,t.url)}).then(()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(a=>{var o;(o=this.callbacks)==null||o.onError({code:n.status,text:a.message},t,n,r)}):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const r=t.headers,{maxTimeToFirstByteMs:s,maxLoadTimeMs:a}=n.loadPolicy;if(r)for(const o in r)e.setRequestHeader(o,r[o]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=s&&N(s)?s:a,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const r=t.readyState,s=this.config;if(!n.aborted&&r>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),s.timeout!==s.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),s.timeout=s.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),r===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const l=t.status,d=t.responseType==="text"?t.responseText:null;if(l>=200&&l<300){const x=d!=null?d:t.response;if(x!=null){var a,o;n.loading.end=Math.max(self.performance.now(),n.loading.first);const H=t.responseType==="arraybuffer"?x.byteLength:x.length;n.loaded=n.total=H,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const P=(a=this.callbacks)==null?void 0:a.onProgress;P&&P(n,e,x,t);const me={url:t.responseURL,data:x,code:l};(o=this.callbacks)==null||o.onSuccess(me,n,e,t);return}}const g=s.loadPolicy.errorRetry,m=n.retry,w={url:e.url,data:void 0,code:l};if(wt(g,m,!1,w))this.retry(g);else{var u;X.error(`${l} while loading ${e.url}`),(u=this.callbacks)==null||u.onError({code:l,text:t.statusText},e,t,n)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(wt(e,t,!0))this.retry(e);else{var n;X.warn(`timeout while loading ${(n=this.context)==null?void 0:n.url}`);const r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=ze(e,n.retry),n.retry++,X.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&ku.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const Ou={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},uo=E(E({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,startOnSegmentBoundary:!1,maxBufferSize:60*1e3*1e3,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncMode:"edge",liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:dl,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:fn,bufferController:Zl,capLevelController:Ro,errorController:tn,fpsController:ja,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:Fr,requireKeySystemAccessOnStart:!1,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,preserveManualLevelOnError:!1,certLoadPolicy:{default:Ou},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},es()),{},{subtitleStreamController:Eu,subtitleTrackController:Ya,timelineController:lo,audioStreamController:RA,audioTrackController:Gl,emeController:Us,cmcdController:Za,contentSteeringController:vu,interstitialsController:JA});function es(){return{cueHandler:Ru,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 hl(i,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const n=ia(i),r=["manifest","level","frag"],s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(a=>{const o=`${a==="level"?"playlist":a}LoadPolicy`,u=e[o]===void 0,l=[];s.forEach(d=>{const g=`${a}Loading${d}`,m=e[g];if(m!==void 0&&u){l.push(g);const w=n[o].default;switch(e[o]={default:w},d){case"TimeOut":w.maxLoadTimeMs=m,w.maxTimeToFirstByteMs=m;break;case"MaxRetry":w.errorRetry.maxNumRetry=m,w.timeoutRetry.maxNumRetry=m;break;case"RetryDelay":w.errorRetry.retryDelayMs=m,w.timeoutRetry.retryDelayMs=m;break;case"MaxRetryTimeout":w.errorRetry.maxRetryDelayMs=m,w.timeoutRetry.maxRetryDelayMs=m;break}}}),l.length&&t.warn(`hls.js config: "${l.join('", "')}" setting(s) are deprecated, use "${o}": ${Lt(e[o])}`)}),E(E({},n),e)}function ia(i){return i&&typeof i=="object"?Array.isArray(i)?i.map(ia):Object.keys(i).reduce((e,t)=>(e[t]=ia(i[t]),e),{}):i}function Pu(i,e){const t=i.loader;t!==uA&&t!==dl?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),i.progressive=!1):ll()&&(i.loader=uA,i.progressive=!0,i.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const co=2,fA=.1,sa=.05,fo=100;class Qu extends On{constructor(e,t){super("gap-controller",e.logger),this.hls=null,this.fragmentTracker=null,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var n;(n=this.media)!=null&&n.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var n;this.ended=((n=this.media)==null?void 0:n.currentTime)||1,this.hls.trigger(h.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(h.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(h.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,t){this.setInterval(fo),this.mediaSource=t.mediaSource;const n=this.media=t.media;Pi(n,"playing",this.onMediaPlaying),Pi(n,"waiting",this.onMediaWaiting),Pi(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&($i(n,"playing",this.onMediaPlaying),$i(n,"waiting",this.onMediaWaiting),$i(n,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var n,r;const s=(n=this.hls)==null?void 0:n.config;if(!s)return;const a=this.media;if(!a)return;const{seeking:o}=a,u=this.seeking&&!o,l=!this.seeking&&o,d=a.paused&&!o||a.ended||a.playbackRate===0;if(this.seeking=o,e!==t){t&&(this.ended=0),this.moved=!0,o||(this.nudgeRetry=0,s.nudgeOnVideoHole&&!d&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(l||u){u&&this.stallResolved(e);return}if(d){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&a.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(h.MEDIA_ENDED,{stalled:!1}));return}if(!En.getBuffered(a).length){this.nudgeRetry=0;return}const g=En.bufferInfo(a,e,0),m=g.nextStart||0,w=this.fragmentTracker;if(o&&w&&this.hls){const Dt=Ps(this.hls.inFlightFragments,e),rt=g.len>co,Ft=!m||Dt||m-e>co&&!w.getPartialFragment(e);if(rt||Ft)return;this.moved=!1}const x=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&w){if(!(g.len>0)&&!m)return;const rt=Math.max(m,g.start||0)-e,Nt=!!(x!=null&&x.live)?x.targetduration*2:co,bt=w.getPartialFragment(e);if(rt>0&&(rt<=Nt||bt)){a.paused||this._trySkipBufferHole(bt);return}}const H=s.detectStallWithCurrentTimeMs,P=self.performance.now(),me=this.waiting;let De=this.stalled;if(De===null)if(me>0&&P-me<H)De=this.stalled=me;else{this.stalled=P;return}const be=P-De;if(!o&&(be>=H||me)&&this.hls){var Ue;if(((Ue=this.mediaSource)==null?void 0:Ue.readyState)==="ended"&&!(x!=null&&x.live)&&Math.abs(e-((x==null?void 0:x.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(h.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(g),!this.media||!this.hls)return}const ot=En.bufferInfo(a,e,s.maxBufferHole);this._tryFixBufferStall(ot,be,e)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const n=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(n)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(h.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var n;const r=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(n=this.buffered.audio)!=null&&n.length&&r&&r.length>1&&e>r.end(0)){const s=En.bufferedInfo(En.timeRangesToArray(this.buffered.audio),e,0);if(s.len>1&&t>=s.start){const a=En.timeRangesToArray(r),o=En.bufferedInfo(a,t,0).bufferedIndex;if(o>-1&&o<a.length-1){const u=En.bufferedInfo(a,e,0).bufferedIndex,l=a[o].end,d=a[o+1].start;if((u===-1||u>o)&&d-l<1&&e-l<2){const g=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${l} -> ${d} buffered index: ${u}`);this.warn(g.message),this.media.currentTime+=1e-6;const m=this.fragmentTracker.getPartialFragment(e)||void 0,w=En.bufferInfo(this.media,e,0);this.hls.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:g,reason:g.message,frag:m,buffer:w.len,bufferInfo:w})}}}}}_tryFixBufferStall(e,t,n){var r,s;const{fragmentTracker:a,media:o}=this,u=(r=this.hls)==null?void 0:r.config;if(!o||!a||!u)return;const l=(s=this.hls)==null?void 0:s.latestLevelDetails,d=a.getPartialFragment(n);if((d||l!=null&&l.live&&n<l.fragmentStart)&&(this._trySkipBufferHole(d)||!this.media))return;const g=e.buffered,m=this.adjacentTraversal(e,n);(g&&g.length>1&&e.len>u.maxBufferHole||e.nextStart&&(e.nextStart-n<u.maxBufferHole||m))&&(t>u.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,t){const n=this.fragmentTracker,r=e.nextStart;if(n&&r){const s=n.getFragAtPos(t,ie.MAIN),a=n.getFragAtPos(r,ie.MAIN);if(s&&a)return a.sn-s.sn<2}return!1}_reportStall(e){const{hls:t,media:n,stallReported:r,stalled:s}=this;if(!r&&s!==null&&n&&t){this.stallReported=!0;const a=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${Lt(e)})`);this.warn(a.message),t.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.BUFFER_STALLED_ERROR,fatal:!1,error:a,buffer:e.len,bufferInfo:e,stalled:{start:s}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:n,media:r}=this,s=(t=this.hls)==null?void 0:t.config;if(!r||!n||!s)return 0;const a=r.currentTime,o=En.bufferInfo(r,a,0),u=a<o.start?o.start:o.nextStart;if(u&&this.hls){const d=o.len<=s.maxBufferHole,g=o.len>0&&o.len<1&&r.readyState<3,m=u-a;if(m>0&&(d||g)){if(m>s.maxBufferHole){let x=!1;if(a===0){const H=n.getAppendedFrag(0,ie.MAIN);H&&u<H.end&&(x=!0)}if(!x){const H=e||n.getAppendedFrag(a,ie.MAIN);if(H){var l;if(!((l=this.hls.loadLevelObj)!=null&&l.details)||Ps(this.hls.inFlightFragments,u))return 0;let me=!1,De=H.end;for(;De<u;){const be=n.getPartialFragment(De);if(be)De+=be.duration;else{me=!0;break}}if(me)return 0}}}const w=Math.max(u+sa,a+fA);if(this.warn(`skipping hole, adjusting currentTime from ${a} to ${w}`),this.moved=!0,r.currentTime=w,!(e!=null&&e.gap)){const x=new Error(`fragment loaded with buffer holes, seeking from ${a} to ${w}`);this.hls.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:x,reason:x.message,frag:e||void 0,buffer:o.len,bufferInfo:o})}return w}}return 0}_tryNudgeBuffer(e){const{hls:t,media:n,nudgeRetry:r}=this,s=t==null?void 0:t.config;if(!n||!s)return 0;const a=n.currentTime;if(this.nudgeRetry++,r<s.nudgeMaxRetry){const o=a+(r+1)*s.nudgeOffset,u=new Error(`Nudging 'currentTime' from ${a} to ${o}`);this.warn(u.message),n.currentTime=o,t.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.BUFFER_NUDGE_ON_STALL,error:u,fatal:!1,buffer:e.len,bufferInfo:e})}else{const o=new Error(`Playhead still not moving while enough data buffered @${a} after ${s.nudgeMaxRetry} nudges`);this.error(o.message),t.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.BUFFER_STALLED_ERROR,error:o,fatal:!0,buffer:e.len,bufferInfo:e})}}}function Ps(i,e){const t=gl(i.main);if(t&&t.start<=e)return t;const n=gl(i.audio);return n&&n.start<=e?n:null}function gl(i){if(!i)return null;switch(i.state){case Zt.IDLE:case Zt.STOPPED:case Zt.ENDED:case Zt.ERROR:return null}return i.frag}const Mu=.25;function ho(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function pl(i,e,t,n,r){let s=new i(e,t,"");try{s.value=n,r&&(s.type=r)}catch(a){s=new i(e,t,Lt(r?E({type:r},n):n))}return s}const Ba=(()=>{const i=ho();try{i&&new i(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Nu(i){return Uint8Array.from(i.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class Hu{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(h.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e.on(h.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(h.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(h.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(h.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(h.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(h.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(h.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(h.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}onMediaAttaching(e,t){var n;this.media=t.media,((n=t.overrides)==null?void 0:n.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){const e=this.hls.latestLevelDetails;e&&this.updateDateRangeCues(e)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&Xs(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const n=e[t];if(n.kind==="metadata"&&n.label==="id3")return Zo(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:n,enableID3MetadataCues:r}}}=this;if(!n&&!r)return;const{samples:s}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const a=ho();if(a)for(let o=0;o<s.length;o++){const u=s[o].type;if(u===Gi.emsg&&!n||!r)continue;const l=pA(s[o].data);if(l){const d=s[o].pts;let g=d+s[o].duration;g>Ba&&(g=Ba),g-d<=0&&(g=d+Mu);for(let w=0;w<l.length;w++){const x=l[w];if(!mA(x)){this.updateId3CueEnds(d,u);const H=pl(a,d,g,x,u);H&&this.id3Track.addCue(H)}}}}}updateId3CueEnds(e,t){var n;const r=(n=this.id3Track)==null?void 0:n.cues;if(r)for(let s=r.length;s--;){const a=r[s];a.type===t&&a.startTime<e&&a.endTime===Ba&&(a.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:r}){const{id3Track:s,hls:a}=this;if(!a)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:u}}=a;if(s&&(o||u)){let l;r==="audio"?l=d=>d.type===Gi.audioId3&&u:r==="video"?l=d=>d.type===Gi.emsg&&o:l=d=>d.type===Gi.audioId3&&u||d.type===Gi.emsg&&o,zo(s,t,n,l)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.media||!e.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{id3Track:n}=this,{dateRanges:r}=e,s=Object.keys(r);let a=this.dateRangeCuesAppended;if(n&&t){var o;if((o=n.cues)!=null&&o.length){const d=Object.keys(a).filter(g=>!s.includes(g));for(let g=d.length;g--;){const m=d[g],w=a[m].cues;delete a[m],Object.keys(w).forEach(x=>{try{const H=w[x];H.removeEventListener("enter",this.onEventCueEnter),n.removeCue(H)}catch(H){}})}}else a=this.dateRangeCuesAppended={}}const u=e.fragments[e.fragments.length-1];if(s.length===0||!N(u==null?void 0:u.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const l=ho();for(let d=0;d<s.length;d++){const g=s[d],m=r[g],w=m.startTime,x=a[g],H=(x==null?void 0:x.cues)||{};let P=(x==null?void 0:x.durationKnown)||!1,me=Ba;const{duration:De,endDate:be}=m;if(be&&De!==null)me=w+De,P=!0;else if(m.endOnNext&&!P){const ot=s.reduce((Dt,rt)=>{if(rt!==m.id){const Ft=r[rt];if(Ft.class===m.class&&Ft.startDate>m.startDate&&(!Dt||m.startDate<Dt.startDate))return Ft}return Dt},null);ot&&(me=ot.startTime,P=!0)}const Ue=Object.keys(m.attr);for(let ot=0;ot<Ue.length;ot++){const Dt=Ue[ot];if(!mr(Dt))continue;const rt=H[Dt];if(rt)P&&!x.durationKnown?rt.endTime=me:Math.abs(rt.startTime-w)>.01&&(rt.startTime=w,rt.endTime=me);else if(l){let Ft=m.attr[Dt];fr(Dt)&&(Ft=Nu(Ft));const bt=pl(l,w,me,{key:Dt,data:Ft},Gi.dateRange);bt&&(bt.id=g,this.id3Track.addCue(bt),H[Dt]=bt,this.hls.config.interstitialsController&&(Dt==="X-ASSET-LIST"||Dt==="X-ASSET-URL")&&bt.addEventListener("enter",this.onEventCueEnter))}}a[g]={cues:H,dateRange:m,durationKnown:P}}}}class Ku{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t}=this,n=this.levelDetails;if(!t||!n)return;this.currentTime=t.currentTime;const r=this.computeLatency();if(r===null)return;this._latency=r;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:a}=this.config;if(!s||a===1||!n.live)return;const o=this.targetLatency;if(o===null)return;const u=r-o,l=Math.min(this.maxLatency,o+n.targetduration);if(u<l&&u>.05&&this.forwardBufferLength>1){const g=Math.min(2,Math.max(1,a)),m=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20,w=Math.min(g,Math.max(1,m));this.changeMediaPlaybackRate(t,w)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:n,targetduration:r}=e,{liveSyncDuration:s,liveSyncDurationCount:a,lowLatencyMode:o}=this.config,u=this.hls.userConfig;let l=o&&n||t;(this._targetLatencyUpdated||u.liveSyncDuration||u.liveSyncDurationCount||l===0)&&(l=s!==void 0?s:a*r);const d=r;return l+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,d)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(e===null||t===null)return null;const n=this.levelDetails;if(n===null)return null;const r=n.edge,s=e-t-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,s),o)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(h.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(h.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(h.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(h.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var n;t.details===Q.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(n=this.levelDetails)!=null&&n.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var n,r;e.playbackRate!==t&&((n=this.hls)==null||n.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(r=this.targetLatency)==null?void 0:r.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`),e.playbackRate=t)}estimateLiveEdge(){const e=this.levelDetails;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}class Gu extends To{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(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(h.LEVEL_LOADED,this.onLevelLoaded,this),e.on(h.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(h.FRAG_BUFFERED,this.onFragBuffered,this),e.on(h.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(h.LEVEL_LOADED,this.onLevelLoaded,this),e.off(h.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(h.FRAG_BUFFERED,this.onFragBuffered,this),e.off(h.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,r=[],s={},a={};let o=!1,u=!1,l=!1;t.levels.forEach(d=>{const g=d.attrs;let{audioCodec:m,videoCodec:w}=d;m&&(d.audioCodec=m=xt(m,n)||void 0),w&&(w=d.videoCodec=Cn(w));const{width:x,height:H,unknownCodecs:P}=d;let me=P?P.length:0;if(P)for(let bt=me;bt--;){const ln=P[bt];this.isAudioSupported(ln)?(d.audioCodec=m=m?`${m},${ln}`:ln,me--,Gt.audio[m.substring(0,4)]=2):this.isVideoSupported(ln)&&(d.videoCodec=w=w?`${w},${ln}`:ln,me--,Gt.video[w.substring(0,4)]=2)}if(o||(o=!!(x&&H)),u||(u=!!w),l||(l=!!m),me||m&&!this.isAudioSupported(m)||w&&!this.isVideoSupported(w)){this.log(`Some or all CODECS not supported "${g.CODECS}"`);return}const{CODECS:De,"FRAME-RATE":be,"HDCP-LEVEL":Ue,"PATHWAY-ID":ot,RESOLUTION:Dt,"VIDEO-RANGE":rt}=g,Nt=`${`${ot||"."}-`}${d.bitrate}-${Dt}-${be}-${De}-${rt}-${Ue}`;if(s[Nt])if(s[Nt].uri!==d.url&&!d.attrs["PATHWAY-ID"]){const bt=a[Nt]+=1;d.attrs["PATHWAY-ID"]=new Array(bt+1).join(".");const ln=this.createLevel(d);s[Nt]=ln,r.push(ln)}else s[Nt].addGroupId("audio",g.AUDIO),s[Nt].addGroupId("text",g.SUBTITLES);else{const bt=this.createLevel(d);s[Nt]=bt,a[Nt]=1,r.push(bt)}}),this.filterAndSortMediaOptions(r,t,o,u,l)}createLevel(e){const t=new Pt(e),n=e.supplemental;if(n!=null&&n.videoCodec&&!this.isVideoSupported(n.videoCodec)){const r=new Error(`SUPPLEMENTAL-CODECS not supported "${n.videoCodec}"`);this.log(r.message),t.supportedResult=or(r,[])}return t}isAudioSupported(e){return Ye(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Ye(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,s){let a=[],o=[],u=e;if((n||r)&&s&&(u=u.filter(({videoCodec:P,videoRange:me,width:De,height:be})=>(!!P||!!(De&&be))&&br(me))),u.length===0){Promise.resolve().then(()=>{if(this.hls){let P="no level with compatible codecs found in manifest",me=P;t.levels.length&&(me=`one or more CODECS in variant not supported: ${Lt(t.levels.map(be=>be.attrs.CODECS).filter((be,Ue,ot)=>ot.indexOf(be)===Ue))}`,this.warn(me),P+=` (${me})`);const De=new Error(P);this.hls.trigger(h.ERROR,{type:le.MEDIA_ERROR,details:Q.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:De,reason:me})}});return}t.audioTracks&&(a=t.audioTracks.filter(P=>!P.audioCodec||this.isAudioSupported(P.audioCodec)),ml(a)),t.subtitles&&(o=t.subtitles,ml(o));const l=u.slice(0);u.sort((P,me)=>{if(P.attrs["HDCP-LEVEL"]!==me.attrs["HDCP-LEVEL"])return(P.attrs["HDCP-LEVEL"]||"")>(me.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&P.height!==me.height)return P.height-me.height;if(P.frameRate!==me.frameRate)return P.frameRate-me.frameRate;if(P.videoRange!==me.videoRange)return vr.indexOf(P.videoRange)-vr.indexOf(me.videoRange);if(P.videoCodec!==me.videoCodec){const De=ne(P.videoCodec),be=ne(me.videoCodec);if(De!==be)return be-De}if(P.uri===me.uri&&P.codecSet!==me.codecSet){const De=fe(P.codecSet),be=fe(me.codecSet);if(De!==be)return be-De}return P.averageBitrate!==me.averageBitrate?P.averageBitrate-me.averageBitrate:0});let d=l[0];if(this.steering&&(u=this.steering.filterParsedLevels(u),u.length!==l.length)){for(let P=0;P<l.length;P++)if(l[P].pathwayId===u[0].pathwayId){d=l[P];break}}this._levels=u;for(let P=0;P<u.length;P++)if(u[P]===d){var g;this._firstLevel=P;const me=d.bitrate,De=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${u.length} level(s) found, first bitrate: ${me}`),((g=this.hls.userConfig)==null?void 0:g.abrEwmaDefaultEstimate)===void 0){const be=Math.min(me,this.hls.config.abrEwmaDefaultEstimateMax);be>De&&De===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=be)}break}const m=s&&!r,w=this.hls.config,x=!!(w.audioStreamController&&w.audioTrackController),H={levels:u,audioTracks:a,subtitleTracks:o,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:s,video:r,altAudio:x&&!m&&a.some(P=>!!P.url)};this.hls.trigger(h.MANIFEST_PARSED,H)}get levels(){return this._levels.length===0?null:this._levels}get loadLevelObj(){return this.currentLevel}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const d=new Error("invalid level idx"),g=e<0;if(this.hls.trigger(h.ERROR,{type:le.OTHER_ERROR,details:Q.LEVEL_SWITCH_ERROR,level:e,fatal:g,error:d,reason:d.message}),g)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,r=this.currentLevel,s=r?r.attrs["PATHWAY-ID"]:void 0,a=t[e],o=a.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=a,n===e&&r&&s===o)return;this.log(`Switching to level ${e} (${a.height?a.height+"p ":""}${a.videoRange?a.videoRange+" ":""}${a.codecSet?a.codecSet+" ":""}@${a.bitrate})${o?" with Pathway "+o:""} from level ${n}${s?" with Pathway "+s:""}`);const u={level:e,attrs:a.attrs,details:a.details,bitrate:a.bitrate,averageBitrate:a.averageBitrate,maxBitrate:a.maxBitrate,realBitrate:a.realBitrate,width:a.width,height:a.height,codecSet:a.codecSet,audioCodec:a.audioCodec,videoCodec:a.videoCodec,audioGroups:a.audioGroups,subtitleGroups:a.subtitleGroups,loaded:a.loaded,loadError:a.loadError,fragmentError:a.fragmentError,name:a.name,id:a.id,uri:a.uri,url:a.url,urlId:0,audioGroupIds:a.audioGroupIds,textGroupIds:a.textGroupIds};this.hls.trigger(h.LEVEL_SWITCHING,u);const l=a.details;if(!l||l.live){const d=this.switchParams(a.uri,r==null?void 0:r.details,l);this.loadPlaylist(d)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathways(){return this.steering?this.steering.pathways():[]}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const t=this.steering.pathways(),n=e.filter(r=>t.indexOf(r)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=n}}onError(e,t){t.fatal||!t.context||t.context.type===ge.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===ie.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(s=>!!n[s]))return;const r=this._levels[t.level];r!=null&&r.loadError&&(this.log(`Resetting level error count of ${r.loadError} on frag buffered`),r.loadError=0)}}onLevelLoaded(e,t){var n;const{level:r,details:s}=t,a=t.levelInfo;if(!a){var o;this.warn(`Invalid level index ${r}`),(o=t.deliveryDirectives)!=null&&o.skip&&(s.deltaUpdateFailed=!0);return}if(a===this.currentLevel||t.withoutMultiVariant){a.fragmentError===0&&(a.loadError=0);let u=a.details;u===t.details&&u.advanced&&(u=void 0),this.playlistLoaded(r,t,u)}else(n=t.deliveryDirectives)!=null&&n.skip&&(s.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=this.getUrlWithDirectives(e.uri,t),r=this.currentLevelIndex,s=e.attrs["PATHWAY-ID"],a=e.details,o=a==null?void 0:a.age;this.log(`Loading level index ${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${s?" Pathway "+s:""}${o&&a.live?" age "+o.toFixed(1)+(a.type?" "+a.type||0:""):""} ${n}`),this.hls.trigger(h.LEVEL_LOADING,{url:n,level:r,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const n=this._levels.filter((s,a)=>a!==e?!0:(this.steering&&this.steering.removeLevel(s),s===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,s.details&&s.details.fragments.forEach(o=>o.level=-1)),!1));Si(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const r=n.length-1;this._firstLevel=Math.min(this._firstLevel,r),this._startLevel&&(this._startLevel=Math.min(this._startLevel,r)),this.hls.trigger(h.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(h.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function ml(i){const e={};i.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function vl(){return self.SourceBuffer||self.WebKitSourceBuffer}function _l(){if(!q())return!1;const e=vl();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function $u(){if(!_l())return!1;const i=q();return typeof(i==null?void 0:i.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>i.isTypeSupported(He(e,"video")))||["mp4a.40.2","fLaC"].some(e=>i.isTypeSupported(He(e,"audio"))))}function Vu(){var i;const e=vl();return typeof(e==null||(i=e.prototype)==null?void 0:i.changeType)=="function"}const Zu=100;class Wu extends zr{constructor(e,t,n){super(e,t,n,"stream-controller",ie.MAIN),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const r=this.media,s=r?r.currentTime:null;if(s===null||!N(s)||(this.log(`Media seeked to ${s.toFixed(3)}`),!this.getBufferedFrag(s)))return;const a=this.getFwdBufferInfoAtPos(r,s,ie.MAIN,0);if(a===null||a.len===0){this.warn(`Main forward buffer length at ${s} on "seeked" event ${a?a.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(h.MANIFEST_PARSED,this.onManifestParsed,this),e.on(h.LEVEL_LOADING,this.onLevelLoading,this),e.on(h.LEVEL_LOADED,this.onLevelLoaded,this),e.on(h.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(h.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(h.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(h.BUFFER_CREATED,this.onBufferCreated,this),e.on(h.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(h.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(h.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(h.MANIFEST_PARSED,this.onManifestParsed,this),e.off(h.LEVEL_LOADED,this.onLevelLoaded,this),e.off(h.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(h.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(h.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(h.BUFFER_CREATED,this.onBufferCreated,this),e.off(h.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(h.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(h.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:n,hls:r}=this;if(this.stopLoad(),this.setInterval(Zu),this.level=-1,!this.startFragRequested){let s=r.startLevel;s===-1&&(r.config.testBandwidth&&this.levels.length>1?(s=0,this.bitrateTest=!0):s=r.firstAutoLevel),r.nextLoadLevel=s,this.level=r.loadLevel,this._hasEnoughToStart=!!t}n>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n),this.state=Zt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Zt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Zt.WAITING_LEVEL:{const{levels:t,level:n}=this,r=t==null?void 0:t[n],s=r==null?void 0:r.details;if(s&&(!s.live||this.levelLastLoaded===r&&!this.waitForLive(r))){if(this.waitForCdnTuneIn(s))break;this.state=Zt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Zt.IDLE;break}break}case Zt.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),n=this.retryDate;if(!n||t>=n||(e=this.media)!=null&&e.seeking){const{levels:r,level:s}=this,a=r==null?void 0:r[s];this.resetStartWhenNotLoaded(a||null),this.state=Zt.IDLE}}break}this.state===Zt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:r}=this;if(t===null||!r&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const s=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(n!=null&&n[s]))return;const a=n[s],o=this.getMainFwdBufferInfo();if(o===null)return;const u=this.getLevelDetails();if(u&&this._streamEnded(o,u)){const H={};this.altAudio===2&&(H.type="video"),this.hls.trigger(h.BUFFER_EOS,H),this.state=Zt.ENDED;return}if(!this.buffering)return;e.loadLevel!==s&&e.manualLevel===-1&&this.log(`Adapting to level ${s} from level ${this.level}`),this.level=e.nextLoadLevel=s;const l=a.details;if(!l||this.state===Zt.WAITING_LEVEL||this.waitForLive(a)){this.level=s,this.state=Zt.WAITING_LEVEL,this.startFragRequested=!1;return}const d=o.len,g=this.getMaxBufferLength(a.maxBitrate);if(d>=g)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const m=this.backtrackFragment?this.backtrackFragment.start:o.end;let w=this.getNextFragment(m,l);if(this.couldBacktrack&&!this.fragPrevious&&w&&de(w)&&this.fragmentTracker.getState(w)!==Oe.OK){var x;const P=((x=this.backtrackFragment)!=null?x:w).sn-l.startSN,me=l.fragments[P-1];me&&w.cc===me.cc&&(w=me,this.fragmentTracker.removeFragment(me))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(w&&this.isLoopLoading(w,m)){if(!w.gap){const P=this.audioOnly&&!this.altAudio?_.AUDIO:_.VIDEO,me=(P===_.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;me&&this.afterBufferFlushed(me,P,ie.MAIN)}w=this.getNextFragmentLoopLoading(w,l,o,ie.MAIN,g)}w&&(w.initSegment&&!w.initSegment.data&&!this.bitrateTest&&(w=w.initSegment),this.loadFragment(w,a,m))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===Oe.NOT_LOADED||r===Oe.PARTIAL?de(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,n):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,ie.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let n;const r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.start-1);const s=this.getLevelDetails();if(s!=null&&s.live){const o=this.getMainFwdBufferInfo();if(!o||o.len<s.targetduration*2)return}if(!t.paused&&e){const o=this.hls.nextLoadLevel,u=e[o],l=this.fragLastKbps;l&&this.fragCurrent?n=this.fragCurrent.duration*u.maxBitrate/(1e3*l)+1:n=0}else n=0;const a=this.getBufferedFrag(t.currentTime+n);if(a){const o=this.followingBufferedFrag(a);if(o){this.abortCurrentFrag();const u=o.maxStartPTS?o.maxStartPTS:o.start,l=o.duration,d=Math.max(a.end,u+Math.min(Math.max(l-this.config.maxFragLookUpTolerance,l*(this.couldBacktrack?.5:.125)),l*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(d,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 Zt.KEY_LOADING:case Zt.FRAG_LOADING:case Zt.FRAG_LOADING_WAITING_RETRY:case Zt.PARSING:case Zt.PARSED:this.state=Zt.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio===2?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;Pi(n,"playing",this.onMediaPlaying),Pi(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&($i(n,"playing",this.onMediaPlaying),$i(n,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(h.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let n=!1,r=!1;t.levels.forEach(s=>{const a=s.audioCodec;a&&(n=n||a.indexOf("mp4a.40.2")!==-1,r=r||a.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=n&&r&&!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:n}=this;if(!n||this.state!==Zt.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=Zt.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:s}=this,a=t.level,o=t.details,u=o.totalduration;if(!r){this.warn(`Levels were reset while loading level ${a}`);return}this.log(`Level ${a} loaded [${o.startSN},${o.endSN}]${o.lastPartSn?`[part-${o.lastPartSn}-${o.lastPartIndex}]`:""}, cc [${o.startCC}, ${o.endCC}] duration:${u}`);const l=t.levelInfo,d=this.fragCurrent;d&&(this.state===Zt.FRAG_LOADING||this.state===Zt.FRAG_LOADING_WAITING_RETRY)&&d.level!==t.level&&d.loader&&this.abortCurrentFrag();let g=0;if(o.live||(n=l.details)!=null&&n.live){var m;if(this.checkLiveUpdate(o),o.deltaUpdateFailed)return;g=this.alignPlaylists(o,l.details,(m=this.levelLastLoaded)==null?void 0:m.details)}if(l.details=o,this.levelLastLoaded=l,s||this.setStartPosition(o,g),this.hls.trigger(h.LEVEL_UPDATED,{details:o,level:a}),this.state===Zt.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=Zt.IDLE}s&&o.live&&this.synchronizeToLiveEdge(o),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const r=this.hls.liveSyncPosition,s=this.getLoadPosition(),a=e.fragmentStart,o=e.edge,u=s>=a-t.maxFragLookUpTolerance&&s<=o;if(r!==null&&n.duration>r&&(s<r||!u)){const d=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!u&&n.readyState<4||s<o-d)&&(this._hasEnoughToStart||(this.nextLoadPosition=r),n.readyState))if(this.warn(`Playback: ${s.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${r.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var l;const g=En.bufferInfo(n,r,0);if(!(g!=null&&(l=g.buffered)!=null&&l.length)){n.currentTime=r;return}if(g.start<=s){n.currentTime=r;return}const{nextStart:w}=En.bufferedInfo(g.buffered,s,0);w&&(n.currentTime=w)}else n.currentTime=r}}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:s}=e,{levels:a}=this;if(!a){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const o=a[n.level];if(!o){this.warn(`Level ${n.level} not found on progress`);return}const u=o.details;if(!u){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const l=o.videoCodec,d=u.PTSKnown||!u.live,g=(t=n.initSegment)==null?void 0:t.data,m=this._getAudioCodec(o),w=this.transmuxer=this.transmuxer||new Ha(this.hls,ie.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),x=r?r.index:-1,H=x!==-1,P=new hn(n.level,n.sn,n.stats.chunkCount,s.byteLength,x,H),me=this.initPTS[n.cc];w.push(s,g,m,l,n,r,u.totalduration,d,P,me)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio===2;if(Jt(t.url,n))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const a=this.fragCurrent;a&&(this.log("Switching to main audio track, cancel main fragment load"),a.abortRequests(),this.fragmentTracker.removeFragment(a)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(r){this.fragmentTracker.removeAllFragments(),n.once(h.BUFFER_FLUSHED,()=>{var a;(a=this.hls)==null||a.trigger(h.AUDIO_TRACK_SWITCHED,t)}),n.trigger(h.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(h.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=Jt(t.url,this.hls);if(n){const r=this.videoBuffer;r&&this.mediaBuffer!==r&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n?2:0,this.tick()}onBufferCreated(e,t){const n=t.tracks;let r,s,a=!1;for(const o in n){const u=n[o];if(u.id==="main"){if(s=o,r=u,o==="video"){const l=n[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&r?(this.log(`Alternate track found, use ${s}.buffered to schedule main fragment loading`),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:r}=t,s=n.type===ie.MAIN;if(s){if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===Zt.PARSED&&(this.state=Zt.IDLE);return}const o=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),de(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const a=this.media;a&&(!this._hasEnoughToStart&&En.getBuffered(a).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),s&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var n;if(t.fatal){this.state=Zt.ERROR;return}switch(t.details){case Q.FRAG_GAP:case Q.FRAG_PARSING_ERROR:case Q.FRAG_DECRYPT_ERROR:case Q.FRAG_LOAD_ERROR:case Q.FRAG_LOAD_TIMEOUT:case Q.KEY_LOAD_ERROR:case Q.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ie.MAIN,t);break;case Q.LEVEL_LOAD_ERROR:case Q.LEVEL_LOAD_TIMEOUT:case Q.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Zt.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===ge.LEVEL&&(this.state=Zt.IDLE);break;case Q.BUFFER_ADD_CODEC_ERROR:case Q.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.resetLoadingState();break;case Q.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case Q.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=Zt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==_.AUDIO||!this.altAudio){const n=(t===_.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,ie.MAIN),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const r=this.timelineOffset;r&&n&&(n+=r);const s=this.getLevelDetails(),a=En.getBuffered(e),o=a.length?a.start(0):0,u=o-n,l=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||u>0&&(u<l||this.loadingParts&&u<2*((s==null?void 0:s.partTarget)||0)))&&(this.log(`adjusting start position by ${u} to match buffer start`),n+=u,this.startPosition=n),t<n&&(this.log(`seek to target start position ${n} from current time ${t} buffer start ${o}`),e.currentTime=n)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:r}=this,s=n==null?void 0:n.frag;if(!s||this.fragContextChanged(s))return;t.fragmentError=0,this.state=Zt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const a=s.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),r.trigger(h.FRAG_LOADED,n),s.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const n=this.playlistType,{hls:r}=this,{remuxResult:s,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o){this.resetWhenMissingContext(a);return}const{frag:u,part:l,level:d}=o,{video:g,text:m,id3:w,initSegment:x}=s,{details:H}=d,P=this.altAudio?void 0:s.audio;if(this.fragContextChanged(u)){this.fragmentTracker.removeFragment(u);return}if(this.state=Zt.PARSING,x){if(x!=null&&x.tracks){const be=u.initSegment||u;this._bufferInitSegment(d,x.tracks,be,a),r.trigger(h.FRAG_PARSING_INIT_SEGMENT,{frag:be,id:n,tracks:x.tracks})}const me=x.initPTS,De=x.timescale;N(me)&&(this.initPTS[u.cc]={baseTime:me,timescale:De},r.trigger(h.INIT_PTS_FOUND,{frag:u,id:n,initPTS:me,timescale:De}))}if(g&&H){P&&g.type==="audiovideo"&&this.logMuxedErr(u);const me=H.fragments[u.sn-1-H.startSN],De=u.sn===H.startSN,be=!me||u.cc>me.cc;if(s.independent!==!1){const{startPTS:Ue,endPTS:ot,startDTS:Dt,endDTS:rt}=g;if(l)l.elementaryStreams[g.type]={startPTS:Ue,endPTS:ot,startDTS:Dt,endDTS:rt};else if(g.firstKeyFrame&&g.independent&&a.id===1&&!be&&(this.couldBacktrack=!0),g.dropped&&g.independent){const Ft=this.getMainFwdBufferInfo(),Nt=(Ft?Ft.end:this.getLoadPosition())+this.config.maxBufferHole,bt=g.firstKeyFramePTS?g.firstKeyFramePTS:Ue;if(!De&&Nt<bt-this.config.maxBufferHole&&!be){this.backtrack(u);return}else be&&(u.gap=!0);u.setElementaryStreamInfo(g.type,u.start,ot,u.start,rt,!0)}else De&&Ue-(H.appliedTimelineOffset||0)>co&&(u.gap=!0);u.setElementaryStreamInfo(g.type,Ue,ot,Dt,rt),this.backtrackFragment&&(this.backtrackFragment=u),this.bufferFragmentData(g,u,l,a,De||be)}else if(De||be)u.gap=!0;else{this.backtrack(u);return}}if(P){const{startPTS:me,endPTS:De,startDTS:be,endDTS:Ue}=P;l&&(l.elementaryStreams[_.AUDIO]={startPTS:me,endPTS:De,startDTS:be,endDTS:Ue}),u.setElementaryStreamInfo(_.AUDIO,me,De,be,Ue),this.bufferFragmentData(P,u,l,a)}if(H&&w!=null&&(t=w.samples)!=null&&t.length){const me={id:n,frag:u,details:H,samples:w.samples};r.trigger(h.FRAG_PARSING_METADATA,me)}if(H&&m){const me={id:n,frag:u,details:H,samples:m.samples};r.trigger(h.FRAG_PARSING_USERDATA,me)}}logMuxedErr(e){this.warn(`${de(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==Zt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(n));const{audio:s,video:a,audiovideo:o}=t;if(s){let l=nn(s.codec,e.audioCodec);l==="mp4a"&&(l="mp4a.40.5");const d=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){l&&(l.indexOf("mp4a.40.5")!==-1?l="mp4a.40.2":l="mp4a.40.5");const g=s.metadata;g&&"channelCount"in g&&(g.channelCount||1)!==1&&d.indexOf("firefox")===-1&&(l="mp4a.40.5")}l&&l.indexOf("mp4a.40.5")!==-1&&d.indexOf("android")!==-1&&s.container!=="audio/mpeg"&&(l="mp4a.40.2",this.log(`Android: force audio codec to ${l}`)),e.audioCodec&&e.audioCodec!==l&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${l}"`),s.levelCodec=l,s.id=ie.MAIN,this.log(`Init audio buffer, container:${s.container}, codecs[selected/level/parsed]=[${l||""}/${e.audioCodec||""}/${s.codec}]`),delete t.audiovideo}if(a){a.levelCodec=e.videoCodec,a.id=ie.MAIN;const l=a.codec;if((l==null?void 0:l.length)===4)switch(l){case"hvc1":case"hev1":a.codec="hvc1.1.6.L120.90";break;case"av01":a.codec="av01.0.04M.08";break;case"avc1":a.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${a.container}, codecs[level/parsed]=[${e.videoCodec||""}/${l}]${a.codec!==l?" parsed-corrected="+a.codec:""}${a.supplemental?" supplemental="+a.supplemental:""}`),delete t.audiovideo}o&&(this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.codecs}/${o.codec}]`),delete t.video,delete t.audio);const u=Object.keys(t);if(u.length){if(this.hls.trigger(h.BUFFER_CODECS,t),!this.hls)return;u.forEach(l=>{const g=t[l].initSegment;g!=null&&g.byteLength&&this.hls.trigger(h.BUFFER_APPENDING,{type:l,data:g,frag:n,part:null,chunkMeta:r,parent:n.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,ie.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,n=e==null?void 0:e[t];return n?this.getMaxBufferLength(n.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Zt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(En.isBuffered(e,n)?t=this.getAppendedFrag(n):En.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const r=this.fragPlaying,s=t.level;(!r||t.sn!==r.sn||r.level!==s)&&(this.fragPlaying=t,this.hls.trigger(h.FRAG_CHANGED,{frag:t}),(!r||r.level!==s)&&this.hls.trigger(h.LEVEL_SWITCHED,{level:s}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;return N(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(N(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?cn(null,n.fragments,t):null);if(r){const s=r.programDateTime;if(s!==null){const a=s+(t-r.start)*1e3;return new Date(a)}}}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 zu{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyUriToKeyInfo){const r=this.keyUriToKeyInfo[n].loader;if(r){var t;if(e&&e!==((t=r.context)==null?void 0:t.frag.type))return;r.abort()}}}detach(){for(const e in this.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=Q.KEY_LOAD_ERROR,n,r,s){return new yn({type:le.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:s,error:n,networkDetails:r})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length){const{sn:n,cc:r}=e;for(let s=0;s<t.length;s++){const a=t[s];if(r<=a.cc&&(n==="initSegment"||a.sn==="initSegment"||n<a.sn))return this.emeController.selectKeySystemFormat(a).then(o=>{if(a.setKeyFormat(o),this.emeController&&this.config.requireKeySystemAccessOnStart){const u=Qn(o);if(u)return this.emeController.getKeySystemAccess([u])}})}}else if(this.config.requireKeySystemAccessOnStart){const n=Er(this.config);if(n.length)return this.emeController.getKeySystemAccess(n)}}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var n,r;t&&e.setKeyFormat(t);const s=e.decryptdata;if(!s){const l=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,Q.KEY_LOAD_ERROR,l))}const a=s.uri;if(!a)return Promise.reject(this.createKeyLoadError(e,Q.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${a}"`)));let o=this.keyUriToKeyInfo[a];if((n=o)!=null&&n.decryptdata.key)return s.key=o.decryptdata.key,Promise.resolve({frag:e,keyInfo:o});if((r=o)!=null&&r.keyLoadPromise){var u;switch((u=o.mediaKeySessionContext)==null?void 0:u.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then(l=>(s.key=l.keyInfo.decryptdata.key,{frag:e,keyInfo:o}))}}switch(o=this.keyUriToKeyInfo[a]={decryptdata:s,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},s.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return s.keyFormat==="identity"?this.loadKeyHTTP(o,e):this.loadKeyEME(o,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(o,e);default:return Promise.reject(this.createKeyLoadError(e,Q.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${s.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const r=this.emeController.loadKey(n);if(r)return(e.keyLoadPromise=r.then(s=>(e.mediaKeySessionContext=s,n))).catch(s=>{throw e.keyLoadPromise=null,s})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,r=n.loader,s=new r(n);return t.keyLoader=e.loader=s,e.keyLoadPromise=new Promise((a,o)=>{const u={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},l=n.keyLoadPolicy.default,d={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},g={onSuccess:(m,w,x,H)=>{const{frag:P,keyInfo:me,url:De}=x;if(!P.decryptdata||me!==this.keyUriToKeyInfo[De])return o(this.createKeyLoadError(P,Q.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),H));me.decryptdata.key=P.decryptdata.key=new Uint8Array(m.data),P.keyLoader=null,me.loader=null,a({frag:P,keyInfo:me})},onError:(m,w,x,H)=>{this.resetLoader(w),o(this.createKeyLoadError(t,Q.KEY_LOAD_ERROR,new Error(`HTTP Error ${m.code} loading key ${m.text}`),x,E({url:u.url,data:void 0},m)))},onTimeout:(m,w,x)=>{this.resetLoader(w),o(this.createKeyLoadError(t,Q.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),x))},onAbort:(m,w,x)=>{this.resetLoader(w),o(this.createKeyLoadError(t,Q.INTERNAL_ABORTED,new Error("key loading aborted"),x))}};s.load(u,d,g)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,s=n.loader;t.keyLoader===s&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[r],s&&s.destroy()}}function yl(i){const{type:e}=i;switch(e){case ge.AUDIO_TRACK:return ie.AUDIO;case ge.SUBTITLE_TRACK:return ie.SUBTITLE;default:return ie.MAIN}}function dA(i,e){let t=i.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class f{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(h.MANIFEST_LOADING,this.onManifestLoading,this),e.on(h.LEVEL_LOADING,this.onLevelLoading,this),e.on(h.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(h.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(h.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(h.MANIFEST_LOADING,this.onManifestLoading,this),e.off(h.LEVEL_LOADING,this.onLevelLoading,this),e.off(h.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(h.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(h.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,r=t.loader,s=n||r,a=new s(t);return this.loaders[e.type]=a,a}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ge.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:s,url:a,deliveryDirectives:o,levelInfo:u}=t;this.load({id:n,level:r,pathwayId:s,responseType:"text",type:ge.LEVEL,url:a,deliveryDirectives:o,levelOrTrack:u})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:s,deliveryDirectives:a,track:o}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:ge.AUDIO_TRACK,url:s,deliveryDirectives:a,levelOrTrack:o})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:s,deliveryDirectives:a,track:o}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:ge.SUBTITLE_TRACK,url:s,deliveryDirectives:a,levelOrTrack:o})}onLevelsUpdated(e,t){const n=this.loaders[ge.LEVEL];if(n){const r=n.context;r&&!t.levels.some(s=>s===r.levelOrTrack)&&(n.abort(),delete this.loaders[ge.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const l=this.hls.logger,d=r.context;if(d&&d.levelOrTrack===e.levelOrTrack&&(d.url===e.url||d.deliveryDirectives&&!e.deliveryDirectives)){d.url===e.url?l.log(`[playlist-loader]: ignore ${e.url} ongoing request`):l.log(`[playlist-loader]: ignore ${e.url} in favor of ${d.url}`);return}l.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}let s;if(e.type===ge.MANIFEST?s=n.manifestLoadPolicy.default:s=p({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),N((t=e.deliveryDirectives)==null?void 0:t.part)){let l;if(e.type===ge.LEVEL&&e.level!==null?l=this.hls.levels[e.level].details:e.type===ge.AUDIO_TRACK&&e.id!==null?l=this.hls.audioTracks[e.id].details:e.type===ge.SUBTITLE_TRACK&&e.id!==null&&(l=this.hls.subtitleTracks[e.id].details),l){const d=l.partTarget,g=l.targetduration;if(d&&g){const m=Math.max(d*3,g*.8)*1e3;s=p({},s,{maxTimeToFirstByteMs:Math.min(m,s.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(m,s.maxTimeToFirstByteMs)})}}}const a=s.errorRetry||s.timeoutRetry||{},o={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},u={onSuccess:(l,d,g,m)=>{const w=this.getInternalLoader(g);this.resetInternalLoader(g.type);const x=l.data;if(x.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(l,g,new Error("no EXTM3U delimiter"),m||null,d);return}d.parsing.start=performance.now(),li.isMediaPlaylist(x)||g.type!==ge.MANIFEST?this.handleTrackOrLevelPlaylist(l,d,g,m||null,w):this.handleMasterPlaylist(l,d,g,m)},onError:(l,d,g,m)=>{this.handleNetworkError(d,g,!1,l,m)},onTimeout:(l,d,g)=>{this.handleNetworkError(d,g,!0,void 0,l)}};r.load(e,o,u)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:n}=this.hls;(e||n)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,n,r){const s=this.hls,a=e.data,o=dA(e,n),u=li.parseMasterPlaylist(a,o);if(u.playlistParsingError){this.handleManifestParsingError(e,n,u.playlistParsingError,r,t);return}const{contentSteering:l,levels:d,sessionData:g,sessionKeys:m,startTimeOffset:w,variableList:x}=u;this.variableList=x;const{AUDIO:H=[],SUBTITLES:P,"CLOSED-CAPTIONS":me}=li.parseMasterPlaylistMedia(a,o,u);H.length&&!H.some(be=>!be.url)&&d[0].audioCodec&&!d[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),H.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Bn({}),bitrate:0,url:""})),s.trigger(h.MANIFEST_LOADED,{levels:d,audioTracks:H,subtitles:P,captions:me,contentSteering:l,url:o,stats:t,networkDetails:r,sessionData:g,sessionKeys:m,startTimeOffset:w,variableList:x})}handleTrackOrLevelPlaylist(e,t,n,r,s){const a=this.hls,{id:o,level:u,type:l}=n,d=dA(e,n),g=N(u)?u:N(o)?o:0,m=yl(n),w=li.parseLevelPlaylist(e.data,d,g,m,0,this.variableList);if(l===ge.MANIFEST){const x={attrs:new Bn({}),bitrate:0,details:w,name:"",url:d};w.requestScheduled=t.loading.start+ni(w,0),a.trigger(h.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:d,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=w,this.handlePlaylistLoaded(w,e,t,n,r,s)}handleManifestParsingError(e,t,n,r,s){this.hls.trigger(h.ERROR,{type:le.NETWORK_ERROR,details:Q.MANIFEST_PARSING_ERROR,fatal:t.type===ge.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:s})}handleNetworkError(e,t,n=!1,r,s){let a=`A network ${n?"timeout":"error"+(r?" (status "+r.code+")":"")} occurred while loading ${e.type}`;e.type===ge.LEVEL?a+=`: ${e.level} id: ${e.id}`:(e.type===ge.AUDIO_TRACK||e.type===ge.SUBTITLE_TRACK)&&(a+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(a);this.hls.logger.warn(`[playlist-loader]: ${a}`);let u=Q.UNKNOWN,l=!1;const d=this.getInternalLoader(e);switch(e.type){case ge.MANIFEST:u=n?Q.MANIFEST_LOAD_TIMEOUT:Q.MANIFEST_LOAD_ERROR,l=!0;break;case ge.LEVEL:u=n?Q.LEVEL_LOAD_TIMEOUT:Q.LEVEL_LOAD_ERROR,l=!1;break;case ge.AUDIO_TRACK:u=n?Q.AUDIO_TRACK_LOAD_TIMEOUT:Q.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case ge.SUBTITLE_TRACK:u=n?Q.SUBTITLE_TRACK_LOAD_TIMEOUT:Q.SUBTITLE_LOAD_ERROR,l=!1;break}d&&this.resetInternalLoader(e.type);const g={type:le.NETWORK_ERROR,details:u,fatal:l,url:e.url,loader:d,context:e,error:o,networkDetails:t,stats:s};if(r){const m=(t==null?void 0:t.url)||e.url;g.response=E({url:m,data:void 0},r)}this.hls.trigger(h.ERROR,g)}handlePlaylistLoaded(e,t,n,r,s,a){const o=this.hls,{type:u,level:l,id:d,groupId:g,deliveryDirectives:m}=r,w=dA(t,r),x=yl(r),H=typeof r.level=="number"&&x===ie.MAIN?l:void 0;if(!e.fragments.length){const me=e.playlistParsingError=new Error("No Segments found in Playlist");o.trigger(h.ERROR,{type:le.NETWORK_ERROR,details:Q.LEVEL_EMPTY_ERROR,fatal:!1,url:w,error:me,reason:me.message,response:t,context:r,level:H,parent:x,networkDetails:s,stats:n});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const P=e.playlistParsingError;if(P){if(this.hls.logger.warn(P),!o.config.ignorePlaylistParsingErrors){o.trigger(h.ERROR,{type:le.NETWORK_ERROR,details:Q.LEVEL_PARSING_ERROR,fatal:!1,url:w,error:P,reason:P.message,response:t,context:r,level:H,parent:x,networkDetails:s,stats:n});return}e.playlistParsingError=null}switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),(!a.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),u){case ge.MANIFEST:case ge.LEVEL:o.trigger(h.LEVEL_LOADED,{details:e,levelInfo:r.levelOrTrack||o.levels[0],level:H||0,id:d||0,stats:n,networkDetails:s,deliveryDirectives:m,withoutMultiVariant:u===ge.MANIFEST});break;case ge.AUDIO_TRACK:o.trigger(h.AUDIO_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:d||0,groupId:g||"",stats:n,networkDetails:s,deliveryDirectives:m});break;case ge.SUBTITLE_TRACK:o.trigger(h.SUBTITLE_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:d||0,groupId:g||"",stats:n,networkDetails:s,deliveryDirectives:m});break}}}class c{static get version(){return ji}static isMSESupported(){return _l()}static isSupported(){return $u()}static getMediaSource(){return q()}static get Events(){return h}static get MetadataSchema(){return Gi}static get ErrorTypes(){return le}static get ErrorDetails(){return Q}static get DefaultConfig(){return c.defaultConfig?c.defaultConfig:uo}static set DefaultConfig(e){c.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new ss,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;const t=this.logger=ce(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=hl(c.DefaultConfig,e,t);this.userConfig=e,n.progressive&&Pu(n,t);const{abrController:r,bufferController:s,capLevelController:a,errorController:o,fpsController:u}=n,l=new o(this),d=this.abrController=new r(this),g=new Pe(this),m=n.interstitialsController,w=m?this.interstitialsController=new m(this,c):null,x=this.bufferController=new s(this,g),H=this.capLevelController=new a(this),P=new u(this),me=new f(this),De=n.contentSteeringController,be=De?new De(this):null,Ue=this.levelController=new Gu(this,be),ot=new Hu(this),Dt=new zu(this.config),rt=this.streamController=new Wu(this,g,Dt),Ft=this.gapController=new Qu(this,g);H.setStreamController(rt),P.setStreamController(rt);const Nt=[me,Ue,rt];w&&Nt.splice(1,0,w),be&&Nt.splice(1,0,be),this.networkControllers=Nt;const bt=[d,x,Ft,H,P,ot,g];this.audioTrackController=this.createController(n.audioTrackController,Nt);const ln=n.audioStreamController;ln&&Nt.push(this.audioStreamController=new ln(this,g,Dt)),this.subtitleTrackController=this.createController(n.subtitleTrackController,Nt);const Ln=n.subtitleStreamController;Ln&&Nt.push(this.subtititleStreamController=new Ln(this,g,Dt)),this.createController(n.timelineController,bt),Dt.emeController=this.emeController=this.createController(n.emeController,bt),this.cmcdController=this.createController(n.cmcdController,bt),this.latencyController=this.createController(Ku,bt),this.coreComponents=bt,Nt.push(l);const _r=l.onErrorOut;typeof _r=="function"&&this.on(h.ERROR,_r,l),this.on(h.MANIFEST_LOADED,me.onManifestLoaded,me)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,r){this._emitter.off(e,t,n,r)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const r=e===h.ERROR;this.trigger(h.ERROR,{type:le.OTHER_ERROR,details:Q.INTERNAL_EXCEPTION,fatal:r,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(h.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const s=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(h.ERROR,{type:le.OTHER_ERROR,details:Q.ATTACH_MEDIA_ERROR,fatal:!0,error:s});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,n=t?e.media:e,r=t?e:{media:n};this._media=n,this.trigger(h.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(h.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(h.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=Y.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${r}`),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(h.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let n=0;n<this.networkControllers.length&&(this.networkControllers[n].startLoad(e,t),!(!this.started||!this.networkControllers));n++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[ie.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[ie.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[ie.SUBTITLE]=this.subtititleStreamController.inFlightFrag),e}swapAudioCodec(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){this.logger.log("recoverMediaError");const e=this._media,t=e==null?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),t&&this.startLoad(t))}removeLevel(e){this.levelController.removeLevel(e)}get sessionId(){let e=this._sessionId;return e||(e=this._sessionId=_u()),e}get levels(){const e=this.levelController.levels;return e||[]}get latestLevelDetails(){return this.streamController.getLevelDetails()||null}get loadLevelObj(){return this.levelController.loadLevelObj}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get abrEwmaDefaultEstimate(){const{bwEstimator:e}=this.abrController;return e?e.defaultEstimate:NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){qn(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let r;if(t===-1&&e!=null&&e.length?r=e.length-1:r=t,n)for(let s=r;s--;){const a=e[s].attrs["HDCP-LEVEL"];if(a&&a<=n)return s}return r}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){const n=xn(t);return cr(e,n,navigator.mediaCapabilities)}}c.defaultConfig=void 0},16722:function(Fn,st,C){"use strict";C.d(st,{Z:function(){return ie}});const N=A=>typeof A=="object"&&A!=null&&A.nodeType===1,ae=(A,B)=>(!B||A!=="hidden")&&A!=="visible"&&A!=="clip",ve=(A,B)=>{if(A.clientHeight<A.scrollHeight||A.clientWidth<A.scrollWidth){const T=getComputedStyle(A,null);return ae(T.overflowY,B)||ae(T.overflowX,B)||(p=>{const v=(E=>{if(!E.ownerDocument||!E.ownerDocument.defaultView)return null;try{return E.ownerDocument.defaultView.frameElement}catch(S){return null}})(p);return!!v&&(v.clientHeight<p.scrollHeight||v.clientWidth<p.scrollWidth)})(A)}return!1},le=(A,B,T,p,v,E,S,F)=>E<A&&S>B||E>A&&S<B?0:E<=A&&F<=T||S>=B&&F>=T?E-A-p:S>B&&F<T||E<A&&F>T?S-B+v:0,Q=A=>{const B=A.parentElement;return B==null?A.getRootNode().host||null:B},h=(A,B)=>{var T,p,v,E;if(typeof document=="undefined")return[];const{scrollMode:S,block:F,inline:O,boundary:Z,skipOverflowHiddenElements:b}=B,L=typeof Z=="function"?Z:Qe=>Qe!==Z;if(!N(A))throw new TypeError("Invalid target");const D=document.scrollingElement||document.documentElement,I=[];let re=A;for(;N(re)&&L(re);){if(re=Q(re),re===D){I.push(re);break}re!=null&&re===document.body&&ve(re)&&!ve(document.documentElement)||re!=null&&ve(re,b)&&I.push(re)}const ce=(p=(T=window.visualViewport)==null?void 0:T.width)!=null?p:innerWidth,X=(E=(v=window.visualViewport)==null?void 0:v.height)!=null?E:innerHeight,{scrollX:q,scrollY:oe}=window,{height:pe,width:_e,top:j,right:K,bottom:ee,left:z}=A.getBoundingClientRect(),{top:Ae,right:Y,bottom:y,left:_}=(Qe=>{const ct=window.getComputedStyle(Qe);return{top:parseFloat(ct.scrollMarginTop)||0,right:parseFloat(ct.scrollMarginRight)||0,bottom:parseFloat(ct.scrollMarginBottom)||0,left:parseFloat(ct.scrollMarginLeft)||0}})(A);let V=F==="start"||F==="nearest"?j-Ae:F==="end"?ee+y:j+pe/2-Ae+y,de=O==="center"?z+_e/2-_+Y:O==="end"?K+Y:z-_;const We=[];for(let Qe=0;Qe<I.length;Qe++){const ct=I[Qe],{height:Et,width:Mt,top:Ot,right:Fe,bottom:kt,left:sn}=ct.getBoundingClientRect();if(S==="if-needed"&&j>=0&&z>=0&&ee<=X&&K<=ce&&(ct===D&&!ve(ct)||j>=Ot&&ee<=kt&&z>=sn&&K<=Fe))return We;const jt=getComputedStyle(ct),pn=parseInt(jt.borderLeftWidth,10),mt=parseInt(jt.borderTopWidth,10),ke=parseInt(jt.borderRightWidth,10),xe=parseInt(jt.borderBottomWidth,10);let W=0,Re=0;const $e="offsetWidth"in ct?ct.offsetWidth-ct.clientWidth-pn-ke:0,J="offsetHeight"in ct?ct.offsetHeight-ct.clientHeight-mt-xe:0,R="offsetWidth"in ct?ct.offsetWidth===0?0:Mt/ct.offsetWidth:0,k="offsetHeight"in ct?ct.offsetHeight===0?0:Et/ct.offsetHeight:0;if(D===ct)W=F==="start"?V:F==="end"?V-X:F==="nearest"?le(oe,oe+X,X,mt,xe,oe+V,oe+V+pe,pe):V-X/2,Re=O==="start"?de:O==="center"?de-ce/2:O==="end"?de-ce:le(q,q+ce,ce,pn,ke,q+de,q+de+_e,_e),W=Math.max(0,W+oe),Re=Math.max(0,Re+q);else{W=F==="start"?V-Ot-mt:F==="end"?V-kt+xe+J:F==="nearest"?le(Ot,kt,Et,mt,xe+J,V,V+pe,pe):V-(Ot+Et/2)+J/2,Re=O==="start"?de-sn-pn:O==="center"?de-(sn+Mt/2)+$e/2:O==="end"?de-Fe+ke+$e:le(sn,Fe,Mt,pn,ke+$e,de,de+_e,_e);const{scrollLeft:se,scrollTop:$}=ct;W=k===0?0:Math.max(0,Math.min($+W/k,ct.scrollHeight-Et/k+J)),Re=R===0?0:Math.max(0,Math.min(se+Re/R,ct.scrollWidth-Mt/R+$e)),V+=$-W,de+=se-Re}We.push({el:ct,top:W,left:Re})}return We},ge=A=>A===!1?{block:"end",inline:"nearest"}:(B=>B===Object(B)&&Object.keys(B).length!==0)(A)?A:{block:"start",inline:"nearest"};function ie(A,B){if(!A.isConnected||!(v=>{let E=v;for(;E&&E.parentNode;){if(E.parentNode===document)return!0;E=E.parentNode instanceof ShadowRoot?E.parentNode.host:E.parentNode}return!1})(A))return;const T=(v=>{const E=window.getComputedStyle(v);return{top:parseFloat(E.scrollMarginTop)||0,right:parseFloat(E.scrollMarginRight)||0,bottom:parseFloat(E.scrollMarginBottom)||0,left:parseFloat(E.scrollMarginLeft)||0}})(A);if((v=>typeof v=="object"&&typeof v.behavior=="function")(B))return B.behavior(h(A,B));const p=typeof B=="boolean"||B==null?void 0:B.behavior;for(const{el:v,top:E,left:S}of h(A,ge(B))){const F=E-T.top+T.bottom,O=S-T.left+T.right;v.scroll({top:F,left:O,behavior:p})}}}}]);
|
|
}()); |