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

1442 lines
1.7 MiB

This file contains ambiguous Unicode characters!

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

!(function(){var lc=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[7632],{70557:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},27812:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},89489:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},59477:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},40001:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},49198:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},84105:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},18785:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},73331:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},15277:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},52671:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},8657:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},56082:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},33853:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},15075:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},43531:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},61485:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},47472:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(60499),ee=m(59301),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ie=$,F=m(7657),g=function(x,L){return ee.createElement(F.Z,(0,c.Z)({},x,{ref:L,icon:ie}))},J=ee.forwardRef(g),X=J},68196:function(un,We,m){"use strict";m.d(We,{Z:function(){return Ge}});var c=m(85899),ee=m(72190),$=m(42244),ie=m(43403),F=m(92310),g=m.n(F),J=m(29301),X=m(76846),o=m(96452),x=m(6089),L=m(80402),b=m(34280),S=m(49658),T=m(59301),B=m(60499),z=m(77900),j=m(8654);function U(Ne){var Ie=Ne.prefixCls,te=Ne.align,$e=Ne.arrow,Ae=Ne.arrowPos,Z=$e||{},D=Z.className,he=Z.content,_e=Ae.x,pe=_e===void 0?0:_e,Ee=Ae.y,Oe=Ee===void 0?0:Ee,Ze=T.useRef();if(!te||!te.points)return null;var re={position:"absolute"};if(te.autoArrow!==!1){var fe=te.points[0],st=te.points[1],tt=fe[0],ct=fe[1],ut=st[0],Ue=st[1];tt===ut||!["t","b"].includes(tt)?re.top=Oe:tt==="t"?re.top=0:re.bottom=0,ct===Ue||!["l","r"].includes(ct)?re.left=pe:ct==="l"?re.left=0:re.right=0}return T.createElement("div",{ref:Ze,className:g()("".concat(Ie,"-arrow"),D),style:re},he)}function A(Ne){var Ie=Ne.prefixCls,te=Ne.open,$e=Ne.zIndex,Ae=Ne.mask,Z=Ne.motion;return Ae?T.createElement(z.default,(0,B.Z)({},Z,{motionAppear:!0,visible:te,removeOnLeave:!0}),function(D){var he=D.className;return T.createElement("div",{style:{zIndex:$e},className:g()("".concat(Ie,"-mask"),he)})}):null}var K=T.memo(function(Ne){var Ie=Ne.children;return Ie},function(Ne,Ie){return Ie.cache}),I=K,M=T.forwardRef(function(Ne,Ie){var te=Ne.popup,$e=Ne.className,Ae=Ne.prefixCls,Z=Ne.style,D=Ne.target,he=Ne.onVisibleChanged,_e=Ne.open,pe=Ne.keepDom,Ee=Ne.fresh,Oe=Ne.onClick,Ze=Ne.mask,re=Ne.arrow,fe=Ne.arrowPos,st=Ne.align,tt=Ne.motion,ct=Ne.maskMotion,ut=Ne.forceRender,Ue=Ne.getPopupContainer,xt=Ne.autoDestroy,dt=Ne.portal,gt=Ne.zIndex,kt=Ne.onMouseEnter,w=Ne.onMouseLeave,O=Ne.onPointerEnter,qe=Ne.onPointerDownCapture,oe=Ne.ready,xe=Ne.offsetX,jt=Ne.offsetY,Qe=Ne.offsetR,at=Ne.offsetB,bt=Ne.onAlign,ge=Ne.onPrepare,ye=Ne.stretch,Fe=Ne.targetWidth,ze=Ne.targetHeight,q=typeof te=="function"?te():te,Mt=_e||pe,Be=(Ue==null?void 0:Ue.length)>0,Gt=T.useState(!Ue||!Be),pn=(0,ee.Z)(Gt,2),En=pn[0],sr=pn[1];if((0,b.Z)(function(){!En&&Be&&D&&sr(!0)},[En,Be,D]),!En)return null;var Xn="auto",Wn={left:"-1000vw",top:"-1000vh",right:Xn,bottom:Xn};if(oe||!_e){var Cr,Rr=st.points,Qn=st.dynamicInset||((Cr=st._experimental)===null||Cr===void 0?void 0:Cr.dynamicInset),gr=Qn&&Rr[0][1]==="r",Cn=Qn&&Rr[0][0]==="b";gr?(Wn.right=Qe,Wn.left=Xn):(Wn.left=xe,Wn.right=Xn),Cn?(Wn.bottom=at,Wn.top=Xn):(Wn.top=jt,Wn.bottom=Xn)}var tn={};return ye&&(ye.includes("height")&&ze?tn.height=ze:ye.includes("minHeight")&&ze&&(tn.minHeight=ze),ye.includes("width")&&Fe?tn.width=Fe:ye.includes("minWidth")&&Fe&&(tn.minWidth=Fe)),_e||(tn.pointerEvents="none"),T.createElement(dt,{open:ut||Mt,getContainer:Ue&&function(){return Ue(D)},autoDestroy:xt},T.createElement(A,{prefixCls:Ae,open:_e,zIndex:gt,mask:Ze,motion:ct}),T.createElement(J.Z,{onResize:bt,disabled:!_e},function(dn){return T.createElement(z.default,(0,B.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:ut,leavedClassName:"".concat(Ae,"-hidden")},tt,{onAppearPrepare:ge,onEnterPrepare:ge,visible:_e,onVisibleChanged:function(vr){var Et;tt==null||(Et=tt.onVisibleChanged)===null||Et===void 0||Et.call(tt,vr),he(vr)}}),function(Vn,vr){var Et=Vn.className,wt=Vn.style,Me=g()(Ae,Et,$e);return T.createElement("div",{ref:(0,j.sQ)(dn,Ie,vr),className:Me,style:(0,c.Z)((0,c.Z)((0,c.Z)((0,c.Z)({"--arrow-x":"".concat(fe.x||0,"px"),"--arrow-y":"".concat(fe.y||0,"px")},Wn),tn),wt),{},{boxSizing:"border-box",zIndex:gt},Z),onMouseEnter:kt,onMouseLeave:w,onPointerEnter:O,onClick:Oe,onPointerDownCapture:qe},re&&T.createElement(U,{prefixCls:Ae,arrow:re,arrowPos:fe,align:st}),T.createElement(I,{cache:!_e&&!Ee},q))})}))}),le=M,me=T.forwardRef(function(Ne,Ie){var te=Ne.children,$e=Ne.getTriggerDOMNode,Ae=(0,j.Yr)(te),Z=T.useCallback(function(he){(0,j.mH)(Ie,$e?$e(he):he)},[$e]),D=(0,j.x1)(Z,(0,j.C4)(te));return Ae?T.cloneElement(te,{ref:D}):te}),ce=me,De=T.createContext(null),Pe=De;function Ce(Ne){return Ne?Array.isArray(Ne)?Ne:[Ne]:[]}function He(Ne,Ie,te,$e){return T.useMemo(function(){var Ae=Ce(te!=null?te:Ie),Z=Ce($e!=null?$e:Ie),D=new Set(Ae),he=new Set(Z);return Ne&&(D.has("hover")&&(D.delete("hover"),D.add("click")),he.has("hover")&&(he.delete("hover"),he.add("click"))),[D,he]},[Ne,Ie,te,$e])}var ue=m(29194);function W(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],te=arguments.length>2?arguments[2]:void 0;return te?Ne[0]===Ie[0]:Ne[0]===Ie[0]&&Ne[1]===Ie[1]}function P(Ne,Ie,te,$e){for(var Ae=te.points,Z=Object.keys(Ne),D=0;D<Z.length;D+=1){var he,_e=Z[D];if(W((he=Ne[_e])===null||he===void 0?void 0:he.points,Ae,$e))return"".concat(Ie,"-placement-").concat(_e)}return""}function de(Ne,Ie,te,$e){return Ie||(te?{motionName:"".concat(Ne,"-").concat(te)}:$e?{motionName:$e}:null)}function ae(Ne){return Ne.ownerDocument.defaultView}function Q(Ne){for(var Ie=[],te=Ne==null?void 0:Ne.parentElement,$e=["hidden","scroll","clip","auto"];te;){var Ae=ae(te).getComputedStyle(te),Z=Ae.overflowX,D=Ae.overflowY,he=Ae.overflow;[Z,D,he].some(function(_e){return $e.includes(_e)})&&Ie.push(te),te=te.parentElement}return Ie}function E(Ne){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Ne)?Ie:Ne}function C(Ne){return E(parseFloat(Ne),0)}function Y(Ne,Ie){var te=(0,c.Z)({},Ne);return(Ie||[]).forEach(function($e){if(!($e instanceof HTMLBodyElement||$e instanceof HTMLHtmlElement)){var Ae=ae($e).getComputedStyle($e),Z=Ae.overflow,D=Ae.overflowClipMargin,he=Ae.borderTopWidth,_e=Ae.borderBottomWidth,pe=Ae.borderLeftWidth,Ee=Ae.borderRightWidth,Oe=$e.getBoundingClientRect(),Ze=$e.offsetHeight,re=$e.clientHeight,fe=$e.offsetWidth,st=$e.clientWidth,tt=C(he),ct=C(_e),ut=C(pe),Ue=C(Ee),xt=E(Math.round(Oe.width/fe*1e3)/1e3),dt=E(Math.round(Oe.height/Ze*1e3)/1e3),gt=(fe-st-ut-Ue)*xt,kt=(Ze-re-tt-ct)*dt,w=tt*dt,O=ct*dt,qe=ut*xt,oe=Ue*xt,xe=0,jt=0;if(Z==="clip"){var Qe=C(D);xe=Qe*xt,jt=Qe*dt}var at=Oe.x+qe-xe,bt=Oe.y+w-jt,ge=at+Oe.width+2*xe-qe-oe-gt,ye=bt+Oe.height+2*jt-w-O-kt;te.left=Math.max(te.left,at),te.top=Math.max(te.top,bt),te.right=Math.min(te.right,ge),te.bottom=Math.min(te.bottom,ye)}}),te}function be(Ne){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,te="".concat(Ie),$e=te.match(/^(.*)\%$/);return $e?Ne*(parseFloat($e[1])/100):parseFloat(te)}function je(Ne,Ie){var te=Ie||[],$e=(0,ee.Z)(te,2),Ae=$e[0],Z=$e[1];return[be(Ne.width,Ae),be(Ne.height,Z)]}function lt(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Ne[0],Ne[1]]}function ke(Ne,Ie){var te=Ie[0],$e=Ie[1],Ae,Z;return te==="t"?Z=Ne.y:te==="b"?Z=Ne.y+Ne.height:Z=Ne.y+Ne.height/2,$e==="l"?Ae=Ne.x:$e==="r"?Ae=Ne.x+Ne.width:Ae=Ne.x+Ne.width/2,{x:Ae,y:Z}}function Ye(Ne,Ie){var te={t:"b",b:"t",l:"r",r:"l"};return Ne.map(function($e,Ae){return Ae===Ie?te[$e]||"c":$e}).join("")}function et(Ne,Ie,te,$e,Ae,Z,D){var he=T.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Ae[$e]||{}}),_e=(0,ee.Z)(he,2),pe=_e[0],Ee=_e[1],Oe=T.useRef(0),Ze=T.useMemo(function(){return Ie?Q(Ie):[]},[Ie]),re=T.useRef({}),fe=function(){re.current={}};Ne||fe();var st=(0,x.Z)(function(){if(Ie&&te&&Ne){let ci=function(ns,br){var Ur=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Tt,yr=Mt.x+ns,Or=Mt.y+br,ui=yr+Cn,_i=Or+gr,as=Math.max(yr,Ur.left),ir=Math.max(Or,Ur.top),Dr=Math.min(ui,Ur.right),ei=Math.min(_i,Ur.bottom);return Math.max(0,(Dr-as)*(ei-ir))},zi=function(){li=Mt.y+Zn,Qr=li+gr,Bn=Mt.x+$n,An=Bn+Cn};var ut,Ue,xt,dt,gt=Ie,kt=gt.ownerDocument,w=ae(gt),O=w.getComputedStyle(gt),qe=O.position,oe=gt.style.left,xe=gt.style.top,jt=gt.style.right,Qe=gt.style.bottom,at=gt.style.overflow,bt=(0,c.Z)((0,c.Z)({},Ae[$e]),Z),ge=kt.createElement("div");(ut=gt.parentElement)===null||ut===void 0||ut.appendChild(ge),ge.style.left="".concat(gt.offsetLeft,"px"),ge.style.top="".concat(gt.offsetTop,"px"),ge.style.position=qe,ge.style.height="".concat(gt.offsetHeight,"px"),ge.style.width="".concat(gt.offsetWidth,"px"),gt.style.left="0",gt.style.top="0",gt.style.right="auto",gt.style.bottom="auto",gt.style.overflow="hidden";var ye;if(Array.isArray(te))ye={x:te[0],y:te[1],width:0,height:0};else{var Fe,ze,q=te.getBoundingClientRect();q.x=(Fe=q.x)!==null&&Fe!==void 0?Fe:q.left,q.y=(ze=q.y)!==null&&ze!==void 0?ze:q.top,ye={x:q.x,y:q.y,width:q.width,height:q.height}}var Mt=gt.getBoundingClientRect(),Be=w.getComputedStyle(gt),Gt=Be.height,pn=Be.width;Mt.x=(Ue=Mt.x)!==null&&Ue!==void 0?Ue:Mt.left,Mt.y=(xt=Mt.y)!==null&&xt!==void 0?xt:Mt.top;var En=kt.documentElement,sr=En.clientWidth,Xn=En.clientHeight,Wn=En.scrollWidth,Cr=En.scrollHeight,Rr=En.scrollTop,Qn=En.scrollLeft,gr=Mt.height,Cn=Mt.width,tn=ye.height,dn=ye.width,Vn={left:0,top:0,right:sr,bottom:Xn},vr={left:-Qn,top:-Rr,right:Wn-Qn,bottom:Cr-Rr},Et=bt.htmlRegion,wt="visible",Me="visibleFirst";Et!=="scroll"&&Et!==Me&&(Et=wt);var nt=Et===Me,vt=Y(vr,Ze),yt=Y(Vn,Ze),Tt=Et===wt?yt:vt,Jt=nt?yt:Tt;gt.style.left="auto",gt.style.top="auto",gt.style.right="0",gt.style.bottom="0";var mn=gt.getBoundingClientRect();gt.style.left=oe,gt.style.top=xe,gt.style.right=jt,gt.style.bottom=Qe,gt.style.overflow=at,(dt=gt.parentElement)===null||dt===void 0||dt.removeChild(ge);var yn=E(Math.round(Cn/parseFloat(pn)*1e3)/1e3),Wt=E(Math.round(gr/parseFloat(Gt)*1e3)/1e3);if(yn===0||Wt===0||(0,X.Sh)(te)&&!(0,ue.Z)(te))return;var gn=bt.offset,Ln=bt.targetOffset,vn=je(Mt,gn),ht=(0,ee.Z)(vn,2),Ct=ht[0],Zt=ht[1],Lt=je(ye,Ln),zt=(0,ee.Z)(Lt,2),Vt=zt[0],nn=zt[1];ye.x-=Vt,ye.y-=nn;var rn=bt.points||[],Sn=(0,ee.Z)(rn,2),On=Sn[0],or=Sn[1],Nn=lt(or),Pn=lt(On),Hn=ke(ye,Nn),Kn=ke(Mt,Pn),er=(0,c.Z)({},bt),$n=Hn.x-Kn.x+Ct,Zn=Hn.y-Kn.y+Zt,nr=ci($n,Zn),ar=ci($n,Zn,yt),Jn=ke(ye,["t","l"]),Yn=ke(Mt,["t","l"]),qn=ke(ye,["b","r"]),Fn=ke(Mt,["b","r"]),$r=bt.overflow||{},Ft=$r.adjustX,tr=$r.adjustY,ur=$r.shiftX,Yr=$r.shiftY,zr=function(br){return typeof br=="boolean"?br:br>=0},li,Qr,Bn,An;zi();var en=zr(tr),sn=Pn[0]===Nn[0];if(en&&Pn[0]==="t"&&(Qr>Jt.bottom||re.current.bt)){var Rn=Zn;sn?Rn-=gr-tn:Rn=Jn.y-Fn.y-Zt;var Un=ci($n,Rn),rr=ci($n,Rn,yt);Un>nr||Un===nr&&(!nt||rr>=ar)?(re.current.bt=!0,Zn=Rn,Zt=-Zt,er.points=[Ye(Pn,0),Ye(Nn,0)]):re.current.bt=!1}if(en&&Pn[0]==="b"&&(li<Jt.top||re.current.tb)){var Ar=Zn;sn?Ar+=gr-tn:Ar=qn.y-Yn.y-Zt;var wn=ci($n,Ar),cr=ci($n,Ar,yt);wn>nr||wn===nr&&(!nt||cr>=ar)?(re.current.tb=!0,Zn=Ar,Zt=-Zt,er.points=[Ye(Pn,0),Ye(Nn,0)]):re.current.tb=!1}var Ir=zr(Ft),Jr=Pn[1]===Nn[1];if(Ir&&Pn[1]==="l"&&(An>Jt.right||re.current.rl)){var mi=$n;Jr?mi-=Cn-dn:mi=Jn.x-Fn.x-Ct;var Li=ci(mi,Zn),Gr=ci(mi,Zn,yt);Li>nr||Li===nr&&(!nt||Gr>=ar)?(re.current.rl=!0,$n=mi,Ct=-Ct,er.points=[Ye(Pn,1),Ye(Nn,1)]):re.current.rl=!1}if(Ir&&Pn[1]==="r"&&(Bn<Jt.left||re.current.lr)){var Ri=$n;Jr?Ri+=Cn-dn:Ri=qn.x-Yn.x-Ct;var qr=ci(Ri,Zn),bi=ci(Ri,Zn,yt);qr>nr||qr===nr&&(!nt||bi>=ar)?(re.current.lr=!0,$n=Ri,Ct=-Ct,er.points=[Ye(Pn,1),Ye(Nn,1)]):re.current.lr=!1}zi();var ri=ur===!0?0:ur;typeof ri=="number"&&(Bn<yt.left&&($n-=Bn-yt.left-Ct,ye.x+dn<yt.left+ri&&($n+=ye.x-yt.left+dn-ri)),An>yt.right&&($n-=An-yt.right-Ct,ye.x>yt.right-ri&&($n+=ye.x-yt.right+ri)));var di=Yr===!0?0:Yr;typeof di=="number"&&(li<yt.top&&(Zn-=li-yt.top-Zt,ye.y+tn<yt.top+di&&(Zn+=ye.y-yt.top+tn-di)),Qr>yt.bottom&&(Zn-=Qr-yt.bottom-Zt,ye.y>yt.bottom-di&&(Zn+=ye.y-yt.bottom+di)));var ii=Mt.x+$n,Oi=ii+Cn,Lr=Mt.y+Zn,Pi=Lr+gr,Mi=ye.x,ki=Mi+dn,mr=ye.y,zn=mr+tn,pi=Math.max(ii,Mi),Tn=Math.min(Oi,ki),Fi=(pi+Tn)/2,Os=Fi-ii,vs=Math.max(Lr,mr),ss=Math.min(Pi,zn),ls=(vs+ss)/2,Pr=ls-Lr;D==null||D(Ie,er);var Gi=mn.right-Mt.x-($n+Mt.width),ds=mn.bottom-Mt.y-(Zn+Mt.height);yn===1&&($n=Math.floor($n),Gi=Math.floor(Gi)),Wt===1&&(Zn=Math.floor(Zn),ds=Math.floor(ds));var _s={ready:!0,offsetX:$n/yn,offsetY:Zn/Wt,offsetR:Gi/yn,offsetB:ds/Wt,arrowX:Os/yn,arrowY:Pr/Wt,scaleX:yn,scaleY:Wt,align:er};Ee(_s)}}),tt=function(){Oe.current+=1;var Ue=Oe.current;Promise.resolve().then(function(){Oe.current===Ue&&st()})},ct=function(){Ee(function(Ue){return(0,c.Z)((0,c.Z)({},Ue),{},{ready:!1})})};return(0,b.Z)(ct,[$e]),(0,b.Z)(function(){Ne||ct()},[Ne]),[pe.ready,pe.offsetX,pe.offsetY,pe.offsetR,pe.offsetB,pe.arrowX,pe.arrowY,pe.scaleX,pe.scaleY,pe.align,tt]}var _t=m(77654);function Re(Ne,Ie,te,$e,Ae){(0,b.Z)(function(){if(Ne&&Ie&&te){let Oe=function(){$e(),Ae()};var Z=Ie,D=te,he=Q(Z),_e=Q(D),pe=ae(D),Ee=new Set([pe].concat((0,_t.Z)(he),(0,_t.Z)(_e)));return Ee.forEach(function(Ze){Ze.addEventListener("scroll",Oe,{passive:!0})}),pe.addEventListener("resize",Oe,{passive:!0}),$e(),function(){Ee.forEach(function(Ze){Ze.removeEventListener("scroll",Oe),pe.removeEventListener("resize",Oe)})}}},[Ne,Ie,te])}var At=m(48736);function rt(Ne,Ie,te,$e,Ae,Z,D,he){var _e=T.useRef(Ne);_e.current=Ne;var pe=T.useRef(!1);T.useEffect(function(){if(Ie&&$e&&(!Ae||Z)){var Oe=function(){pe.current=!1},Ze=function(xt){var dt;_e.current&&!D(((dt=xt.composedPath)===null||dt===void 0||(dt=dt.call(xt))===null||dt===void 0?void 0:dt[0])||xt.target)&&!pe.current&&he(!1)},re=ae($e);re.addEventListener("pointerdown",Oe,!0),re.addEventListener("mousedown",Ze,!0),re.addEventListener("contextmenu",Ze,!0);var fe=(0,o.A)(te);if(fe&&(fe.addEventListener("mousedown",Ze,!0),fe.addEventListener("contextmenu",Ze,!0)),0)var st,tt,ct,ut;return function(){re.removeEventListener("pointerdown",Oe,!0),re.removeEventListener("mousedown",Ze,!0),re.removeEventListener("contextmenu",Ze,!0),fe&&(fe.removeEventListener("mousedown",Ze,!0),fe.removeEventListener("contextmenu",Ze,!0))}}},[Ie,te,$e,Ae,Z]);function Ee(){pe.current=!0}return Ee}var Nt=["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 Xe(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ie.Z,Ie=T.forwardRef(function(te,$e){var Ae=te.prefixCls,Z=Ae===void 0?"rc-trigger-popup":Ae,D=te.children,he=te.action,_e=he===void 0?"hover":he,pe=te.showAction,Ee=te.hideAction,Oe=te.popupVisible,Ze=te.defaultPopupVisible,re=te.onPopupVisibleChange,fe=te.afterPopupVisibleChange,st=te.mouseEnterDelay,tt=te.mouseLeaveDelay,ct=tt===void 0?.1:tt,ut=te.focusDelay,Ue=te.blurDelay,xt=te.mask,dt=te.maskClosable,gt=dt===void 0?!0:dt,kt=te.getPopupContainer,w=te.forceRender,O=te.autoDestroy,qe=te.destroyPopupOnHide,oe=te.popup,xe=te.popupClassName,jt=te.popupStyle,Qe=te.popupPlacement,at=te.builtinPlacements,bt=at===void 0?{}:at,ge=te.popupAlign,ye=te.zIndex,Fe=te.stretch,ze=te.getPopupClassNameFromAlign,q=te.fresh,Mt=te.alignPoint,Be=te.onPopupClick,Gt=te.onPopupAlign,pn=te.arrow,En=te.popupMotion,sr=te.maskMotion,Xn=te.popupTransitionName,Wn=te.popupAnimation,Cr=te.maskTransitionName,Rr=te.maskAnimation,Qn=te.className,gr=te.getTriggerDOMNode,Cn=(0,$.Z)(te,Nt),tn=O||qe||!1,dn=T.useState(!1),Vn=(0,ee.Z)(dn,2),vr=Vn[0],Et=Vn[1];(0,b.Z)(function(){Et((0,S.Z)())},[]);var wt=T.useRef({}),Me=T.useContext(Pe),nt=T.useMemo(function(){return{registerSubPopup:function(Dr,ei){wt.current[Dr]=ei,Me==null||Me.registerSubPopup(Dr,ei)}}},[Me]),vt=(0,L.Z)(),yt=T.useState(null),Tt=(0,ee.Z)(yt,2),Jt=Tt[0],mn=Tt[1],yn=T.useRef(null),Wt=(0,x.Z)(function(ir){yn.current=ir,(0,X.Sh)(ir)&&Jt!==ir&&mn(ir),Me==null||Me.registerSubPopup(vt,ir)}),gn=T.useState(null),Ln=(0,ee.Z)(gn,2),vn=Ln[0],ht=Ln[1],Ct=T.useRef(null),Zt=(0,x.Z)(function(ir){(0,X.Sh)(ir)&&vn!==ir&&(ht(ir),Ct.current=ir)}),Lt=T.Children.only(D),zt=(Lt==null?void 0:Lt.props)||{},Vt={},nn=(0,x.Z)(function(ir){var Dr,ei,Kr=vn;return(Kr==null?void 0:Kr.contains(ir))||((Dr=(0,o.A)(Kr))===null||Dr===void 0?void 0:Dr.host)===ir||ir===Kr||(Jt==null?void 0:Jt.contains(ir))||((ei=(0,o.A)(Jt))===null||ei===void 0?void 0:ei.host)===ir||ir===Jt||Object.values(wt.current).some(function(ti){return(ti==null?void 0:ti.contains(ir))||ir===ti})}),rn=de(Z,En,Wn,Xn),Sn=de(Z,sr,Rr,Cr),On=T.useState(Ze||!1),or=(0,ee.Z)(On,2),Nn=or[0],Pn=or[1],Hn=Oe!=null?Oe:Nn,Kn=(0,x.Z)(function(ir){Oe===void 0&&Pn(ir)});(0,b.Z)(function(){Pn(Oe||!1)},[Oe]);var er=T.useRef(Hn);er.current=Hn;var $n=T.useRef([]);$n.current=[];var Zn=(0,x.Z)(function(ir){var Dr;Kn(ir),((Dr=$n.current[$n.current.length-1])!==null&&Dr!==void 0?Dr:Hn)!==ir&&($n.current.push(ir),re==null||re(ir))}),nr=T.useRef(),ar=function(){clearTimeout(nr.current)},Jn=function(Dr){var ei=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;ar(),ei===0?Zn(Dr):nr.current=setTimeout(function(){Zn(Dr)},ei*1e3)};T.useEffect(function(){return ar},[]);var Yn=T.useState(!1),qn=(0,ee.Z)(Yn,2),Fn=qn[0],$r=qn[1];(0,b.Z)(function(ir){(!ir||Hn)&&$r(!0)},[Hn]);var Ft=T.useState(null),tr=(0,ee.Z)(Ft,2),ur=tr[0],Yr=tr[1],zr=T.useState(null),li=(0,ee.Z)(zr,2),Qr=li[0],Bn=li[1],An=function(Dr){Bn([Dr.clientX,Dr.clientY])},en=et(Hn,Jt,Mt&&Qr!==null?Qr:vn,Qe,bt,ge,Gt),sn=(0,ee.Z)(en,11),Rn=sn[0],Un=sn[1],rr=sn[2],Ar=sn[3],wn=sn[4],cr=sn[5],Ir=sn[6],Jr=sn[7],mi=sn[8],Li=sn[9],Gr=sn[10],Ri=He(vr,_e,pe,Ee),qr=(0,ee.Z)(Ri,2),bi=qr[0],ri=qr[1],di=bi.has("click"),ii=ri.has("click")||ri.has("contextMenu"),Oi=(0,x.Z)(function(){Fn||Gr()}),Lr=function(){er.current&&Mt&&ii&&Jn(!1)};Re(Hn,vn,Jt,Oi,Lr),(0,b.Z)(function(){Oi()},[Qr,Qe]),(0,b.Z)(function(){Hn&&!(bt!=null&&bt[Qe])&&Oi()},[JSON.stringify(ge)]);var Pi=T.useMemo(function(){var ir=P(bt,Z,Li,Mt);return g()(ir,ze==null?void 0:ze(Li))},[Li,ze,bt,Z,Mt]);T.useImperativeHandle($e,function(){return{nativeElement:Ct.current,popupElement:yn.current,forceAlign:Oi}});var Mi=T.useState(0),ki=(0,ee.Z)(Mi,2),mr=ki[0],zn=ki[1],pi=T.useState(0),Tn=(0,ee.Z)(pi,2),Fi=Tn[0],Os=Tn[1],vs=function(){if(Fe&&vn){var Dr=vn.getBoundingClientRect();zn(Dr.width),Os(Dr.height)}},ss=function(){vs(),Oi()},ls=function(Dr){$r(!1),Gr(),fe==null||fe(Dr)},Pr=function(){return new Promise(function(Dr){vs(),Yr(function(){return Dr})})};(0,b.Z)(function(){ur&&(Gr(),ur(),Yr(null))},[ur]);function Gi(ir,Dr,ei,Kr){Vt[ir]=function(ti){var xs;Kr==null||Kr(ti),Jn(Dr,ei);for(var us=arguments.length,Es=new Array(us>1?us-1:0),ms=1;ms<us;ms++)Es[ms-1]=arguments[ms];(xs=zt[ir])===null||xs===void 0||xs.call.apply(xs,[zt,ti].concat(Es))}}(di||ii)&&(Vt.onClick=function(ir){var Dr;er.current&&ii?Jn(!1):!er.current&&di&&(An(ir),Jn(!0));for(var ei=arguments.length,Kr=new Array(ei>1?ei-1:0),ti=1;ti<ei;ti++)Kr[ti-1]=arguments[ti];(Dr=zt.onClick)===null||Dr===void 0||Dr.call.apply(Dr,[zt,ir].concat(Kr))});var ds=rt(Hn,ii,vn,Jt,xt,gt,nn,Jn),_s=bi.has("hover"),ci=ri.has("hover"),zi,ns;_s&&(Gi("onMouseEnter",!0,st,function(ir){An(ir)}),Gi("onPointerEnter",!0,st,function(ir){An(ir)}),zi=function(Dr){(Hn||Fn)&&Jt!==null&&Jt!==void 0&&Jt.contains(Dr.target)&&Jn(!0,st)},Mt&&(Vt.onMouseMove=function(ir){var Dr;(Dr=zt.onMouseMove)===null||Dr===void 0||Dr.call(zt,ir)})),ci&&(Gi("onMouseLeave",!1,ct),Gi("onPointerLeave",!1,ct),ns=function(){Jn(!1,ct)}),bi.has("focus")&&Gi("onFocus",!0,ut),ri.has("focus")&&Gi("onBlur",!1,Ue),bi.has("contextMenu")&&(Vt.onContextMenu=function(ir){var Dr;er.current&&ri.has("contextMenu")?Jn(!1):(An(ir),Jn(!0)),ir.preventDefault();for(var ei=arguments.length,Kr=new Array(ei>1?ei-1:0),ti=1;ti<ei;ti++)Kr[ti-1]=arguments[ti];(Dr=zt.onContextMenu)===null||Dr===void 0||Dr.call.apply(Dr,[zt,ir].concat(Kr))}),Qn&&(Vt.className=g()(zt.className,Qn));var br=T.useRef(!1);br.current||(br.current=w||Hn||Fn);var Ur=(0,c.Z)((0,c.Z)({},zt),Vt),yr={},Or=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Or.forEach(function(ir){Cn[ir]&&(yr[ir]=function(){for(var Dr,ei=arguments.length,Kr=new Array(ei),ti=0;ti<ei;ti++)Kr[ti]=arguments[ti];(Dr=Ur[ir])===null||Dr===void 0||Dr.call.apply(Dr,[Ur].concat(Kr)),Cn[ir].apply(Cn,Kr)})});var ui=T.cloneElement(Lt,(0,c.Z)((0,c.Z)({},Ur),yr)),_i={x:cr,y:Ir},as=pn?(0,c.Z)({},pn!==!0?pn:{}):null;return T.createElement(T.Fragment,null,T.createElement(J.Z,{disabled:!Hn,ref:Zt,onResize:ss},T.createElement(ce,{getTriggerDOMNode:gr},ui)),br.current&&T.createElement(Pe.Provider,{value:nt},T.createElement(le,{portal:Ne,ref:Wt,prefixCls:Z,popup:oe,className:g()(xe,Pi),style:jt,target:vn,onMouseEnter:zi,onMouseLeave:ns,onPointerEnter:zi,zIndex:ye,open:Hn,keepDom:Fn,fresh:q,onClick:Be,onPointerDownCapture:ds,mask:xt,motion:rn,maskMotion:Sn,onVisibleChanged:ls,onPrepare:Pr,forceRender:w,autoDestroy:tn,getPopupContainer:kt,align:Li,arrow:as,arrowPos:_i,ready:Rn,offsetX:Un,offsetY:rr,offsetR:Ar,offsetB:wn,onAlign:Oi,stretch:Fe,targetWidth:mr/Jr,targetHeight:Fi/mi})))});return Ie}var Ge=Xe(ie.Z)},84390:function(){"use strict"},40412:function(un,We,m){"use strict";var c=m(59301),ee=m(93314),$=m(7939),ie=Object.defineProperty,F=Object.defineProperties,g=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,x=(T,B,z)=>B in T?ie(T,B,{enumerable:!0,configurable:!0,writable:!0,value:z}):T[B]=z,L=(T,B)=>{for(var z in B||(B={}))X.call(B,z)&&x(T,z,B[z]);if(J)for(var z of J(B))o.call(B,z)&&x(T,z,B[z]);return T},b=(T,B)=>F(T,g(B));const S=({img:T,buttonProps:B={},styles:z={},customText:j,ButtonText:U,ButtonClick:A,Buttonclass:K,ButtonTwo:I,imgStyles:M,loading:le=!1,className:me=""})=>c.createElement("section",{className:`tc animated fadeIn ${me}`,style:L({color:"#999",margin:"100px auto",visibility:le?"hidden":"visible"},z)},c.createElement("img",{src:T||ee,style:b(L({},M),{pointerEvents:"none",userSelect:"none"})}),c.createElement("p",{className:"mt20 font14"},j||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),U&&c.createElement($.ZP,L({className:K,onClick:A},B),U),I&&I);We.Z=S},42576:function(un,We,m){"use strict";m.d(We,{Z:function(){return K}});var c=m(59301),ee={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},$=m(7939),ie=m(70557),F=m(28444),g=m(25399),J=m(49411),X=m(17611),o=m(40412),x=m(58962),L=m(99357),b=m(59301),S=Object.defineProperty,T=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,j=(I,M,le)=>M in I?S(I,M,{enumerable:!0,configurable:!0,writable:!0,value:le}):I[M]=le,U=(I,M)=>{for(var le in M||(M={}))B.call(M,le)&&j(I,le,M[le]);if(T)for(var le of T(M))z.call(M,le)&&j(I,le,M[le]);return I},A=(I,M,le)=>new Promise((me,ce)=>{var De=He=>{try{Ce(le.next(He))}catch(ue){ce(ue)}},Pe=He=>{try{Ce(le.throw(He))}catch(ue){ce(ue)}},Ce=He=>He.done?me(He.value):Promise.resolve(He.value).then(De,Pe);Ce((le=le.apply(I,M)).next())}),K=({editOffice:I="view",data:M,issaver:le,onSaver:me,theme:ce,type:De,filename:Pe,monacoEditor:Ce,className:He,style:ue,close:W,onClose:P,hasMask:de,disabledDownload:ae,onImgDimensions:Q,showNodata:E,recordInfo:C})=>{const[Y,be]=(0,c.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[je,lt]=(0,c.useState)(""),[ke,Ye]=(0,c.useState)(),et=window.ENV==="build"?"/react/build":"",_t=location.host.startsWith("localhost")?x.Z.PROXY_SERVER:x.Z.API_SERVER,At=10*(1024*1024),rt=(0,c.useRef)();M!=null&&M.startsWith("/api")&&De!=="txt"&&(M=x.Z.API_SERVER+M);const Nt=$e=>$e.substring($e.lastIndexOf("/")+1).split(".").pop();Pe&&Ce&&(Ce.filename=Pe),(0,c.useEffect)(()=>{var $e,Ae;const Z=(Ae=($e=document.cookie)==null?void 0:$e.replace(/\s/g,""))==null?void 0:Ae.split(";");Z==null||Z.map(D=>{let he=D.split("=");he[0]==="_educoder_session"&&lt(he[1])})},[]),(0,c.useEffect)(()=>{De==="office"&&(M.indexOf("bigfilescdn.")>-1||M.indexOf("bigfiles1")>-1?Ye({url:M,fileType:Nt(M),model:M.indexOf("model=edit")?"edit":"view"}):M.indexOf("coze")>-1?Ye({url:M,fileType:"doc",model:"view"}):Ge())},[De,M]);function Xe($e){return A(this,null,function*(){$e.data.type==="pdfdata"&&(me($e.data.data),window.removeEventListener("message",Xe,!1)),console.log("mess---:",$e.data)})}const Ge=()=>A(void 0,null,function*(){console.log("data:",M);let $e=M;M.startsWith("http")||($e=location.origin+$e);let Ae=new URL($e).pathname.split("/").pop();const Z=yield(0,X.gJ)({attachment_id:Ae});Z.url=_t+Z.url,Ye(Z)}),Ne=()=>{if(M.startsWith("http")||M.startsWith("blob:")){Ie();return}(0,J.Sv)(Pe||"educoder",M,Pe)},Ie=()=>{C&&(0,L.fc)({id:C==null?void 0:C.id,watch_type:1,course_id:C==null?void 0:C.course_id}),(0,J.Nd)(Pe||"educoder",decodeURIComponent(M))};(0,c.useEffect)(()=>(window.addEventListener("message",te),()=>{window.removeEventListener("message",te)}),[]);const te=$e=>{var Ae;((Ae=$e==null?void 0:$e.data)==null?void 0:Ae.type)==="closePop"&&P()};return b.createElement("div",{style:U({},ue||{}),className:`${de&&ee.bgBlack} ${De?ee.wrp:"hide"}`},!!De&&W&&b.createElement("div",{id:"closePop",className:ee.close,ref:rt},!!Q&&b.createElement(g.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>rt.current},b.createElement("span",{onClick:()=>{P(),Q()}},b.createElement("i",{className:"icon-yulanpizhu"}))),!ae&&window.parent===window&&b.createElement(g.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>rt.current},b.createElement("span",{onClick:Ie},b.createElement("i",{className:"icon-quxiaozhiding"}))),le&&b.createElement(g.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>rt.current},b.createElement("span",{className:"",onClick:()=>{const $e=document.getElementById("pdfiframe");window.addEventListener("message",Xe,!1),setTimeout(()=>{$e.contentWindow.postMessage("getData","*")},300)}},b.createElement("i",{className:"icon-baocun"}))),b.createElement(g.Z,{title:"\u5173\u95ED",getPopupContainer:()=>rt.current},b.createElement("span",{className:"",onClick:()=>{P()}},b.createElement("i",{className:"icon-guanbi1"})))),b.createElement("div",{className:`${ee[He]} ${He} ${ee.monaco} ${De==="txt"?"show":"hide"}`},De==="txt"&&b.createElement(b.Fragment,null,b.createElement(F.ZP,U({},Ce)))),De==="audio"&&b.createElement("audio",{controls:!0,src:`${(M==null?void 0:M.indexOf("http://"))>-1||(M==null?void 0:M.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${M}`,autoPlay:!0}),De==="video"&&b.createElement(b.Fragment,null,(M==null?void 0:M.indexOf("http"))>-1?b.createElement("video",{controls:!0,src:`${M}`,autoPlay:!0}):b.createElement("video",{controls:!0,src:`data:video/mp4;base64,${M}`,autoPlay:!0})),De==="office"&&ke&&b.createElement("iframe",{src:`${et}/office.html?key=${ke.key}&url=${btoa(ke.url)}&callbackUrl=${_t+(ke.callbackUrl||"")}&fileType=${ke.fileType}&title=${ke.title||""}&model=${I}&officeServer=${x.Z.ONLYOFFICE}&disabledDownload=${!!ae}`}),De==="html"&&b.createElement("iframe",{src:M+"&disposition=inline"}),De==="pdf"&&b.createElement("iframe",{id:"pdfiframe",src:`${et}/js/pdf/index.html?filename=${Pe||"educoder.pdf"}&url=${encodeURIComponent(M)}&disabledDownload=${!!ae}&model=${I}`}),De==="image"&&b.createElement("img",{src:`${(M==null?void 0:M.indexOf("http://"))>-1||(M==null?void 0:M.indexOf("https://"))>-1?"":"data:image/png;base64,"}${M}`}),(De==="other"||De==="download")&&b.createElement(b.Fragment,null,E?b.createElement(o.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:b.createElement($.ZP,{icon:b.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ne,disabled:ae},"\u4E0B\u8F7D")}):b.createElement($.ZP,{type:"primary",size:"middle",onClick:Ne,disabled:ae},b.createElement(ie.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),De==="flowChart"&&b.createElement("div",{className:"embed"},b.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${M||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},75363:function(un,We,m){"use strict";m.d(We,{z:function(){return Ce},Z:function(){return He}});var c=m(59301),ee=m(84390),$=m(25386),ie=m(64018),F=m(16471),g=m(58962),J=m(49411),X=m(15342),o=m(44104),x=m(7939),L=m(1012),b=m(42576),S=m(59301),B=({html:ue})=>{const W=(0,c.useRef)(null),P=(0,c.useRef)(null),de=`.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,c.useEffect)(()=>{const ae=W.current.attachShadow({mode:"open"});P.current=document.createElement("div"),P.current.className="markdown-body",P.current.innerHTML=ue,ae.appendChild(P.current);const Q=document.createElement("style");return Q.textContent=de,ae.appendChild(Q),()=>{ae.innerHTML=""}},[]),(0,c.useEffect)(()=>{P.current&&(P.current.innerHTML=ue)},[ue]),S.createElement("div",{ref:W})};function z(ue){const W=["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"],P=new RegExp(`\\b(${W.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),de=/<meta\s+http-equiv\s*=\s*["']?refresh["']?[^>]*>/gi;return ue.replace(P,"").replace(de,"").trim()}var j={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},U=Object.defineProperty,A=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,M=(ue,W,P)=>W in ue?U(ue,W,{enumerable:!0,configurable:!0,writable:!0,value:P}):ue[W]=P,le=(ue,W)=>{for(var P in W||(W={}))K.call(W,P)&&M(ue,P,W[P]);if(A)for(var P of A(W))I.call(W,P)&&M(ue,P,W[P]);return ue};const me="@\u2581\u2581@",ce="@\u2581@",De=/<pre[^>]*>/g;function Pe(ue){let W=document.createElement("div");return W.innerHTML=ue,W.childNodes.length===0?"":W.childNodes[0].nodeValue}const Ce=(ue,W)=>{ue=ue||"";const P=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,de=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ae=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Q=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return W?ue.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(P,(E,C,Y,be,je,lt,ke)=>{const Ye=C||be||lt,et=Y||je||ke||"?";return g.Z.API_SERVER+"/api/attachments/"+Ye+et+"&t="+(0,J.Jn)(Ye,Date.now())+(E.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ue=ue.replace(Q,(E,C,Y,be,je,lt,ke)=>{const Ye=C||be||lt,et=Y||je||ke||"?";return g.Z.API_SERVER+"/attachments/download/"+Ye+et+"&t="+(0,J.Jn)(Ye,Date.now())+(E.indexOf(")")>-1?")":"&")}).replace(P,(E,C,Y,be,je,lt,ke)=>{const Ye=C||be||lt,et=Y||je||ke||"?";return g.Z.API_SERVER+"/api/attachments/"+Ye+et+"&t="+(0,J.Jn)(Ye,Date.now())+(E.indexOf(")")>-1?")":"&")}).replace(de,(E,C,Y,be,je)=>{const lt=C||be,ke=Y||je||"";return'"'+g.Z.API_SERVER+"/api/attachments/"+lt+ke+lt+ke+"&t="+(0,J.Jn)(lt,Date.now())}).replace(ae,(E,C,Y,be,je)=>{const lt=C||be,ke=Y||je||"";return"("+g.Z.API_SERVER+"/files/uploads/"+lt+ke+lt+ke+"&t="+(0,J.Jn)(lt,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,`
`),ue)};var He=({value:ue="",edit:W=!1,className:P,showTextOnly:de,showLines:ae,style:Q={},stylesPrev:E={},highlightKeywords:C,showProgramFill:Y,isProgramFill:be,disabledFill:je=!1,programFillValue:lt,openEditor:ke=()=>{},onFillChange:Ye=Re=>{},onFillBlur:et=()=>{},onFillFocus:_t=()=>{}})=>{let Re=z(String(ue||""));const At=(0,c.useRef)(),rt=(0,c.useRef)(),[Nt,Xe]=(0,c.useState)(""),[Ge,Ne]=(0,c.useState)("office"),[Ie,te]=(0,c.useState)([]),$e=(0,c.useRef)("a"+(0,L.Z)()),Ae={},Z=Ue=>/<style[\s\S]*?>/i.test(Ue||""),D=(Ue,xt,dt)=>{const gt=document.createElement(Ue===ce?"input":"textarea");gt.style.width="100%",gt.style.height=Ue===ce?"40px":"151px",gt.rows=5,gt.spellcheck=!1,gt.name="edu-program-fill",gt.placeholder="\u8BF7\u8F93\u5165",gt.dataset.id=xt;const kt=Object.keys(Ae).length;return Ae[kt]=gt,`<span class="edu-program-fill-wrap ${Ue===ce?"":"show"}" style="width:${Ue===ce?"600px":"100%"}" title=${dt||""}><span>${gt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function he(Ue){return Ue=Ue.replace(/!\[.*?\]\(.*?\)/g,""),Ue=Ue.replace(/\[.*?\]\(.*?\)/g,""),Ue=Ue.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ue=Ue.replace(/<embed.*?>/g,""),Ue=Ue.replace(/<img.*?>/g,""),Ue=Ue.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ue=Ue.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ue=Ue.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ue=Ue.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ue}const _e=Ue=>!de&&Z(Re)?Ue:Ue.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(xt,dt){let gt=dt.replace(/(\n|\r)/g,"").split("}"),kt=[];return gt.map(w=>{w!=""&&kt.push(`.${$e.current} ${w}`)}),`<style>${kt.join("}")}</style>`}),pe=(0,c.useMemo)(()=>{(0,$.Iy)();try{const gt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,kt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,w=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,O=/\(\/attachments\/download\//g;Re=Re.replace(O,"("+g.Z.API_SERVER+"/attachments/download/").replace(gt,"("+g.Z.API_SERVER+"/api/attachments/").replace(kt,'"'+g.Z.API_SERVER+"/api/attachments/").replace(w,'"'+g.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),At.current.style.display="none"}catch(gt){}if(Y){let gt=-1;return Re=Re.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(kt,w,O){var qe;return++gt,D(kt,gt,(qe=lt==null?void 0:lt[gt])==null?void 0:qe.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${_e(Re||"")}</pre>`}let Ue=_e(Re);Ue=(0,$.ZP)(Ue);const xt=(0,$.ez)();Re.match(/\[TOC\]/)&&(Ue=Ue.replace("<p>[TOC]</p>",(0,$.Qv)()),(0,$.Iy)()),Ue=Ue.replace(/(__special_katext_id_\d+__)/g,(gt,kt)=>{const{type:w,expression:O}=xt[kt];return(0,X.renderToString)(Pe(O)||"",{displayMode:w==="block",throwOnError:!1,output:"html"})}),Ue=Ue.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,$.AL)();const dt=document.createElement("div");if(dt.innerHTML=Ue,de)return dt.innerText;if(C){const gt=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return re(dt,gt),dt.innerHTML}return setTimeout(()=>tt(),500),dt.innerHTML},[Re,C]);(0,c.useEffect)(()=>{fe.current&&fe.current.querySelectorAll(["input","textarea"]).forEach(xt=>{xt.oninput=Ee,xt.onblur=Oe,xt.onfocus=Ze})},[Ie]),(0,c.useEffect)(()=>{var Ue,xt,dt,gt,kt;if(lt!=null&&lt.length)try{const w=fe.current.querySelectorAll(".edu-program-fill-score"),O=fe.current.querySelectorAll('[name="edu-program-fill"]');for(const[qe,oe]of O.entries())oe.value=((Ue=lt==null?void 0:lt[qe])==null?void 0:Ue.value)||"",((xt=lt==null?void 0:lt[qe])==null?void 0:xt.type)==="warning"?oe.className="program-fill-warning":((dt=lt==null?void 0:lt[qe])==null?void 0:dt.type)==="success"?oe.className="program-fill-success":oe.className="";for(const[qe,oe]of w.entries())oe.innerHTML=(gt=lt==null?void 0:lt[qe])!=null&&gt.score?`${(kt=lt==null?void 0:lt[qe])==null?void 0:kt.score}\u5206`:"";te(lt)}catch(w){console.log(w,"error")}},[lt]);const Ee=Ue=>{Ie[Ue.target.dataset.id]=Ie[Ue.target.dataset.id]||{},Ie[Ue.target.dataset.id].value=Ue.target.value,te([...Ie]),Ye(Ie,Ue.target.dataset.id)},Oe=Ue=>{Ie[Ue.target.dataset.id]=Ie[Ue.target.dataset.id]||{},Ie[Ue.target.dataset.id].value=Ue.target.value,te([...Ie]),et(Ie,Ue.target.dataset.id)},Ze=Ue=>{Ie[Ue.target.dataset.id]=Ie[Ue.target.dataset.id]||{},Ie[Ue.target.dataset.id].value=Ue.target.value,te([...Ie]),_t(Ie,Ue.target.dataset.id)};function re(Ue,xt){return Ue.childNodes.forEach(dt=>{var gt;if(dt.childNodes.length>0)re(dt,xt);else if(dt.nodeName!=="IMG")if(dt.innerHTML)dt.innerHTML=(gt=dt.innerHTML)==null?void 0:gt.replace(new RegExp(xt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const kt=document.createElement("span");kt.innerHTML=dt.textContent.replace(new RegExp(xt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),dt.replaceWith(kt)}})}const fe=(0,c.useRef)();$.jb.WebkitLineClamp=ae,ae&&(Q=le(le({},Q),$.jb));function st(Ue){let xt=Ue.target;if(xt.tagName.toUpperCase()==="A"){let dt=xt.getAttribute("href");if(dt.indexOf("office")>-1)Ue.preventDefault(),Xe(dt),Ne("office");else if(dt.indexOf("application/pdf")>-1)Ue.preventDefault(),Xe(dt),Ne("pdf");else if(dt.indexOf("text/html")>-1)Ue.preventDefault(),Xe(dt),Ne("html");else if(dt.startsWith("#")){Ue.preventDefault();let gt=document.getElementById(dt.replace("#",""));gt&&gt.scrollIntoView(!0)}}}const tt=()=>{var Ue;const xt=(Ue=fe.current)==null?void 0:Ue.querySelectorAll("video");xt==null||xt.forEach(dt=>{if(dt.oncontextmenu=()=>!1,dt.src.indexOf(".m3u8")>-1&&!dt.canPlayType("application/vnd.apple.mpegurl")){if(F.ZP.isSupported()){var gt=new F.ZP;gt.loadSource(dt.src),gt.attachMedia(dt)}}})};(0,c.useEffect)(()=>{if(fe.current&&pe&&pe.match(De)&&window.PR.prettyPrint(),fe.current)return fe.current.addEventListener("click",st),()=>{var Ue;(Ue=fe.current)==null||Ue.removeEventListener("click",st),(0,$.AL)(),(0,$.Iy)()}},[pe,fe.current,st]);const ct=Ue=>{Ue.target.nodeName==="IMG"&&Ue.target.className.indexOf("draw-flowchart")>-1?(At.current.style.zIndex=1,At.current.style.display="flex",At.current.style.width=Ue.target.clientWidth+"px",At.current.style.height=Ue.target.clientHeight+"px",At.current.style.top=Ue.target.offsetTop+"px",At.current.style.left=Ue.target.offsetLeft+"px",Ue.target.id&&(rt.current=Ue.target.id)):At.current.style.display="none"},ut=()=>{At.current.style.display="none"};return(0,c.useEffect)(()=>{var Ue;const xt=dt=>{dt.preventDefault(),dt.clipboardData.setData("text",window.getSelection().toString())};return(Ue=fe.current)==null||Ue.addEventListener("copy",xt),()=>{var dt;(dt=fe.current)==null||dt.removeEventListener("copy",xt)}},[fe.current]),c.createElement("div",{style:{position:"relative"},onMouseLeave:ut},de&&c.createElement("div",{ref:fe,className:`${j.mdBody} `},pe),!de&&!Z(pe)&&c.createElement("div",{ref:fe,style:le({},Q),onMouseOver:ct,className:`${P||""} ${je?"disabled-fill":""} markdown-body ${j.mdBody} ${$e.current}`,dangerouslySetInnerHTML:{__html:pe}}),!de&&Z(pe)&&c.createElement(B,{html:pe}),c.createElement("div",{ref:At,className:`${j.button} ${W?"":j.previewFlowChart}`},c.createElement(o.Z,null,c.createElement(x.ZP,{onClick:()=>{W?ke(rt.current):(Xe(rt.current),Ne("flowChart"))}},W?"\u7F16\u8F91":"\u9884\u89C8"))),c.createElement(b.Z,{close:!0,data:Nt,type:Nt!=null&&Nt.length?Ge:"",style:le({},E),onClose:()=>Xe("")}))}},28444:function(un,We,m){"use strict";m.d(We,{SV:function(){return At},ZP:function(){return Re}});var c=m(59301),ee=m(76374);const $={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},ie={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},F={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std",content:["using namespace std"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},g={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},J={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 X=m(53184),o=m.n(X),x=(rt,Nt,Xe)=>new Promise((Ge,Ne)=>{var Ie=Ae=>{try{$e(Xe.next(Ae))}catch(Z){Ne(Z)}},te=Ae=>{try{$e(Xe.throw(Ae))}catch(Z){Ne(Z)}},$e=Ae=>Ae.done?Ge(Ae.value):Promise.resolve(Ae.value).then(Ie,te);$e((Xe=Xe.apply(rt,Nt)).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"]}},b=(rt,Nt,Xe,Ge)=>{const Ne=Nt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Xe.lineNumber,endColumn:Xe.column});return Array.from(new Set(Ne.match(/\b\w{2,}\b/g)||[])).map(te=>({label:te,kind:rt.languages.CompletionItemKind.Text,insertText:te,range:Ge}))},S=(rt,Nt,Xe,Ge)=>{rt.languages.registerCompletionItemProvider(Nt,{provideCompletionItems(Ne,Ie){const te=Ne.getWordUntilPosition(Ie),$e={startLineNumber:Ie.lineNumber,endLineNumber:Ie.lineNumber,startColumn:te.startColumn,endColumn:te.endColumn},Ae=Ne.getLineContent(Ie.lineNumber).substring(te.startColumn-2,te.endColumn);return{suggestions:[...b(rt,Ne,Ie,$e),...Xe.map(D=>({label:D,kind:rt.languages.CompletionItemKind.Keyword,documentation:D,insertText:D,insertTextRules:rt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e})),...Ge.map(D=>({label:D.label,kind:rt.languages.CompletionItemKind.Snippet,documentation:D.content,insertText:Ae.startsWith("#")?D.content.replace(/#/,""):D.content,insertTextRules:rt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e}))]}}})};var T=rt=>{L.languages.forEach(Nt=>{rt.languages.registerDocumentFormattingEditProvider(Nt,{provideDocumentFormattingEdits(Xe){return x(this,null,function*(){const Ge=o()(Xe.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:Xe.getFullModelRange(),text:Ge}]})}})}),S(rt,"java",ie.keywords,ie.quickKey),S(rt,"cpp",F.keywords,F.quickKey),S(rt,"c",$.keywords,[]),S(rt,"python",g.keywords,g.quickKey),S(rt,"scala",J.keywords,J.quickKey)};const B="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var z=Object.defineProperty,j=(rt,Nt,Xe)=>Nt in rt?z(rt,Nt,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):rt[Nt]=Xe,U=(rt,Nt,Xe)=>j(rt,typeof Nt!="symbol"?Nt+"":Nt,Xe);const A=class uc{constructor(Nt,Xe,Ge){this.placeholder=Nt,this.editor=Xe,this.monaco=Ge,Xe.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return uc.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)}};U(A,"ID","editor.widget.placeholderHint");var I=A,M=m(96236),le=m(6767),me=m(25399),ce=m(89392),De=m(54087),Pe=m(56102),Ce=Object.defineProperty,He=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,ae=(rt,Nt,Xe)=>Nt in rt?Ce(rt,Nt,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):rt[Nt]=Xe,Q=(rt,Nt)=>{for(var Xe in Nt||(Nt={}))P.call(Nt,Xe)&&ae(rt,Xe,Nt[Xe]);if(W)for(var Xe of W(Nt))de.call(Nt,Xe)&&ae(rt,Xe,Nt[Xe]);return rt},E=(rt,Nt)=>He(rt,ue(Nt)),C=(rt,Nt)=>{var Xe={};for(var Ge in rt)P.call(rt,Ge)&&Nt.indexOf(Ge)<0&&(Xe[Ge]=rt[Ge]);if(rt!=null&&W)for(var Ge of W(rt))Nt.indexOf(Ge)<0&&de.call(rt,Ge)&&(Xe[Ge]=rt[Ge]);return Xe},Y=(rt,Nt,Xe)=>new Promise((Ge,Ne)=>{var Ie=Ae=>{try{$e(Xe.next(Ae))}catch(Z){Ne(Z)}},te=Ae=>{try{$e(Xe.throw(Ae))}catch(Z){Ne(Z)}},$e=Ae=>Ae.done?Ge(Ae.value):Promise.resolve(Ae.value).then(Ie,te);$e((Xe=Xe.apply(rt,Nt)).next())});function be(rt){return/^\d+$/.test(rt)?`${rt}px`:rt}function je(){}let lt=!1;const ke={"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 Ye(rt=[]){let Nt=rt;if(Array.isArray(rt)){for(let Xe=0;Xe<rt.length;Xe++){let Ge=ke[rt[Xe]];if(Ge)return Ge}return Nt[0]}return ke[Nt]||Nt}let et=null;const _t=()=>Y(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(rt){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",rt)}});var Re=rt=>{var Nt=rt,{width:Xe="100%",height:Ge="100%",value:Ne,language:Ie="javascript",style:te={},options:$e={},overrideServices:Ae={},theme:Z="vs-dark",onEditBlur:D,isCopy:he=!1,onSave:_e,autoHeight:pe=!1,forbidCopy:Ee=!1,forbidCopyTips:Oe,onChange:Ze=je,editorDidMount:re=je,onFocus:fe=je,onBreakPoint:st=je,breakPointValue:tt=[],filename:ct="educoder.txt",errorLine:ut,errorContent:Ue="",highlightLine:xt,openBreakPoint:dt=!1,placeholder:gt="",showMiniMap:kt=!0}=Nt,w=C(Nt,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","forbidCopyTips","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const O=(0,c.useRef)(),qe=(0,c.useRef)({}),oe=(0,c.useRef)(),xe=(0,c.useRef)(),jt=(0,c.useRef)([]),Qe=(0,c.useRef)(!1),at=(0,c.useRef)(),bt=(0,c.useRef)(),ge=(0,c.useRef)(!1),[ye,Fe]=(0,c.useState)(!1);function ze(){let tn;return O.current&&(tn=new ee.Z(dn=>{for(let Vn of dn)(Vn.target.offsetHeight>0||Vn.target.offsetWidth>0)&&qe.current.instance.layout()}),tn.observe(O.current)),tn}function q(){le.ZP.warning({content:decodeURIComponent(Oe||B),key:"monaco-editor-tip"})}const Mt=()=>{let tn=qe.current.instance;if(Ne!=null&&tn&&ye){const dn=tn.getModel();dn&&Ne!==dn.getValue()&&(lt=!0,dn.setValue(Ne),tn.layout(),lt=!1)}};(0,c.useEffect)(()=>{const tn=De.Z.subscribe("formatDocument",dn=>{var Vn;let vr=qe.current.instance;(Vn=vr==null?void 0:vr.getAction)==null||Vn.call(vr,"editor.action.formatDocument").run()});return window.updateMonacoValue=dn=>{Ze(dn)},tn},[]),(0,c.useEffect)(()=>{var tn;let dn=qe.current.instance;xe.current&&clearTimeout(xe.current),xe.current=setTimeout(()=>{Mt()},500),Ne&&(Ne!=null&&Ne.length)&&((tn=dn==null?void 0:dn.updateOptions)==null||tn.call(dn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ne.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ne,ye,qe.current]),(0,c.useEffect)(()=>{if(ut&&qe.current&&qe.current.instance){let dn=qe.current.instance;dn.changeViewZones(function(Vn){var vr=document.createElement("div");vr.style.padding="10px 20px",vr.style.width="calc(100% - 20px)",vr.className="my-error-line-wrp",vr.innerHTML=Ue,Vn.addZone({afterLineNumber:ut||11,heightInLines:3,domNode:vr})});var tn={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}};dn.addOverlayWidget(tn),dn.revealPositionInCenter({lineNumber:20,column:1})}},[ut,qe.current,ye]);const Be=(tn="",dn)=>{if(!tn||tn.trim()==="")return!0;const vr=qe.current.instance.getModel().getLineTokens(dn);let Et=!1;for(let wt=0;wt<2;wt++)vr.getStandardTokenType(wt)===1&&(Et=!0);return Et};(0,c.useEffect)(()=>{var tn;const dn=(tn=qe.current)==null?void 0:tn.instance;if(dn&&ye&&Ee){const Vn=dn.onDidBlurEditorWidget(()=>{ge.current=!1}),vr=dn.onDidFocusEditorText(()=>{ge.current=!0});return()=>{Vn.dispose(),vr.dispose()}}},[qe.current,ye,Ee]),(0,c.useEffect)(()=>{var tn;if((tn=qe.current)!=null&&tn.instance&&ye&&dt){let dn=qe.current.instance,Vn=dn.getModel();if(!Vn)return;(()=>{var Wt;let gn=[],Ln=[];const vn=Vn.getAllDecorations();for(let Ct of vn)Ct.options.className==="highlighted-line"&&(gn.push((Wt=Ct==null?void 0:Ct.range)==null?void 0:Wt.startLineNumber),Ln.push(Ct==null?void 0:Ct.id));if(xt===gn[0])return;Vn.deltaDecorations(Ln,[]);const ht=Vn.getLineCount();xt&&xt<=ht&&(dn.deltaDecorations([],[{range:new et.Range(xt,1,xt,Vn.getLineMaxColumn(xt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),dn.revealLineInCenter(xt))})();const Et=(Wt=!1)=>{var gn;let Ln=[],vn=[];const ht=Vn.getAllDecorations();for(let Ct of ht)Ct.options.linesDecorationsClassName==="breakpoints-select"&&(Ln.push((gn=Ct==null?void 0:Ct.range)==null?void 0:gn.startLineNumber),vn.push(Ct==null?void 0:Ct.id));if(Wt)return{lines:Ln,ids:vn};st(Ln)},wt=Wt=>Y(void 0,null,function*(){let gn={range:new et.Range(Wt,1,Wt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Vn.deltaDecorations([],[gn]),Et()}),Me=Wt=>Y(void 0,null,function*(){let gn=[];const Ln=dn.getLineDecorations(Wt);for(let vn of Ln)vn.options.linesDecorationsClassName==="breakpoints-select"&&gn.push(vn.id);yield Vn.deltaDecorations(gn,[]),Et()}),nt=Wt=>{let gn=dn.getLineDecorations(Wt);for(let Ln of gn)if(Ln.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,ce.isEqual)(tt,Et(!0).lines)){Vn.deltaDecorations(Et(!0).ids,[]);const Wt=tt.map(gn=>({range:new et.Range(gn,1,gn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Vn.deltaDecorations([],Wt)}const vt=dn.onDidChangeModelContent(Wt=>{let gn=dn.getPosition();if(gn){let Ln=gn.lineNumber;clearTimeout(bt.current),bt.current=setTimeout(()=>{Be(Vn.getLineContent(Ln),Ln)?Me(Ln):nt(Ln)?(Me(Ln),wt(Ln)):Et()},100)}}),yt=dn.onMouseDown(Wt=>{var gn,Ln,vn;if(Wt.target.detail&&((vn=(Ln=(gn=Wt.target)==null?void 0:gn.element)==null?void 0:Ln.className)!=null&&vn.includes("line-numbers"))){let ht=Wt.target.position.lineNumber;if(Be(Vn.getLineContent(ht),ht))return;nt(ht)?Me(ht):wt(ht)}}),Tt=Wt=>{let gn={range:new et.Range(Wt,1,Wt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};jt.current=dn.deltaDecorations(jt.current,[gn])},Jt=()=>{jt.current=dn.deltaDecorations(jt.current,[])},mn=dn.onMouseMove(Wt=>{var gn,Ln,vn;if(Jt(),Wt.target.detail&&((vn=(Ln=(gn=Wt.target)==null?void 0:gn.element)==null?void 0:Ln.className)!=null&&vn.includes("line-numbers"))){let ht=Wt.target.position.lineNumber;if(Be(Vn.getLineContent(ht),ht))return;Tt(ht)}}),yn=dn.onMouseLeave(()=>{Jt()});return()=>{vt.dispose(),yt.dispose(),mn.dispose(),yn.dispose()}}},[qe.current,ye,tt,xt,dt,Ie]),(0,c.useEffect)(()=>{var tn;(tn=qe.current)!=null&&tn.instance&&dt&&qe.current.instance.setPosition({lineNumber:0,column:0})},[xt]);function Gt(){let tn=qe.current.instance;if(tn){const dn=tn.getSelection(),Vn=qe.current.pastePos||{},vr=new et.Range(Vn.startLineNumber||dn.endLineNumber,Vn.startColumn||dn.endColumn,Vn.endLineNumber||dn.endLineNumber,Vn.endColumn||dn.endColumn);setTimeout(()=>{tn.executeEdits("",[{range:vr,text:""}])},300)}}function pn(tn){(window.navigator.platform.match("Mac")?tn.metaKey:tn.ctrlKey)&&tn.keyCode==83&&(tn.preventDefault(),_e())}const En=()=>{if(pe&&qe.current.instance){const tn=qe.current.instance.getContentHeight();gr(tn<Ge?Ge:tn)}else gr(Ge)};function sr(tn){var dn=document.createEvent("MouseEvents");dn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),tn.dispatchEvent(dn)}const Xn=tn=>{if(!ge.current)return;const{keyCode:dn,ctrlKey:Vn,metaKey:vr,target:Et,type:wt}=tn;return(wt==="paste"||(dn===67||dn===86)&&(vr||Vn))&&Et.nodeName==="TEXTAREA"&&(q(),tn.preventDefault()),!1};function Wn(tn,dn){var Vn=window.URL||window.webkitURL||window,vr=new Blob([dn]),Et=document.createElementNS("http://www.w3.org/1999/xhtml","a");Et.href=Vn.createObjectURL(vr),Et.download=tn,sr(Et)}(0,c.useEffect)(()=>{En()},[En]),(0,c.useEffect)(()=>{O.current&&!ye&&Promise.all([m.e(8909),m.e(1992)]).then(m.bind(m,71448)).then(tn=>{try{et=tn,qe.current.instance=et.editor.create(O.current,{value:Ne,language:Ye(Ie),theme:Z,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:kt||!1}},Ae);const dn=qe.current.instance;let Et=[...M.BH._menuItems].find(vt=>vt[0]._debugName=="EditorContext")[1],wt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Me=(vt,yt)=>{var Tt,Jt;let mn=vt._first;do yt.includes((Jt=(Tt=mn.element)==null?void 0:Tt.command)==null?void 0:Jt.id)&&vt._remove(mn);while(mn=mn.next)};if(re(dn,et),setTimeout(()=>{En(),qe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Wn(ct||"educoder.txt",dn.getValue())}})},500),qe.current.subscription=dn.onDidChangeModelContent(vt=>{Qe.current?clearTimeout(at.current):(En(),Ze(dn.getValue(),vt)),at.current=setTimeout(()=>{Qe.current=!1},500)}),window.Monaco||T(et,Ye(Ie)),Ee&&(Me(Et,wt),O.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Xn),window.removeEventListener("paste",Xn),window.addEventListener("keydown",Xn),window.addEventListener("paste",Xn)),window.Monaco=et,D&&dn.onDidBlurEditorWidget(()=>{D(dn.getValue())}),fe&&dn.onDidFocusEditorText(()=>{Ee&&_t(),fe(dn.getValue())}),Ee){_t();try{dn.onDidPaste(vt=>{const yt=dn.getSelection(),Tt=qe.current.pastePos||{},Jt=new et.Range(Tt.startLineNumber||yt.endLineNumber,Tt.startColumn||yt.endColumn,Tt.endLineNumber||yt.endLineNumber,Tt.endColumn||yt.endColumn);dn.executeEdits("",[{range:vt.range,text:""}])})}catch(vt){}}let nt=ze();return gt&&typeof gt=="string"&&new I(gt,dn,et),Fe(!0),()=>{const vt=qe.current.instance;vt.dispose();const yt=vt.getModel();yt&&yt.dispose(),qe.current.subscription&&qe.current.subscription.dispose(),nt.unobserve(O.current)}}catch(dn){}})},[]),(0,c.useEffect)(()=>{if(qe.current.instance&&ye)return document.addEventListener("keydown",pn,!1),()=>{document.removeEventListener("keydown",pn)}},[_e,ye]),(0,c.useEffect)(()=>{let tn=qe.current.instance;if(tn&&ye){let dn=Ye(Ie);et.editor.setModelLanguage(tn.getModel(),dn)}},[Ie,ye]),(0,c.useEffect)(()=>{qe.current.instance&&ye&&et.editor.setTheme(Z)},[Z,ye]),(0,c.useEffect)(()=>{let tn=qe.current.instance;oe.current=$e,tn&&ye&&(tn.updateOptions(Q({},$e)),setTimeout(()=>{tn.getModel().updateOptions(Q({},$e))},200))},[JSON.stringify($e),ye]),(0,c.useEffect)(()=>{let tn=qe.current.instance;tn&&ye&&tn.layout()},[Xe,Ge,ye]);const[Cr,Rr]=(0,c.useState)(be(Xe)),[Qn,gr]=(0,c.useState)(be(Ge)),Cn=E(Q({},te),{width:Cr,height:Qn,position:"relative"});return c.createElement("div",{className:"my-monaco-editor",ref:O,style:Cn,onFocus:()=>{Ee&&_t()}},he&&c.createElement(Pe.CopyToClipboard,{text:Ne,onCopy:()=>le.ZP.success("\u590D\u5236\u6210\u529F")},c.createElement(me.Z,{title:"\u590D\u5236\u4EE3\u7801"},c.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},c.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function At({width:rt="100%",height:Nt="100%",original:Xe,modified:Ge,language:Ne,options:Ie={}}){const te=(0,c.useRef)(),[$e,Ae]=(0,c.useState)(null);function Z(pe){let Ee;return te.current&&(Ee=new ee.Z(Oe=>{for(let Ze of Oe)(Ze.target.offsetHeight>0||Ze.target.offsetWidth>0)&&pe.layout()}),Ee.observe(te.current)),Ee}(0,c.useEffect)(()=>(te.current&&Promise.all([m.e(8909),m.e(9404)]).then(m.bind(m,2550)).then(pe=>{et=pe;const Ee=et.editor.createDiffEditor(te.current,E(Q({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},Ie),{wordWrap:!0}));Ae(Ee);let Oe=Z(Ee);return()=>{Ee.dispose();const Ze=Ee.getModel();Ze&&Ze.dispose(),Oe.unobserve(te.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,c.useEffect)(()=>{$e&&$e.setModel({original:et.editor.createModel(Xe,Ne),modified:et.editor.createModel(Ge,Ne)})},[Xe,Ge,Ne,$e]);const D=be(rt),he=be(Nt),_e={width:D,height:he};return c.createElement("div",{className:"my-diff-editor",ref:te,style:_e})}},10507:function(un,We,m){"use strict";m.d(We,{H:function(){return J}});var c=m(59301),ee=m(28284),$=m(37568),ie=m(42441),F=m(75363);const g=({form:X,index:o=1,field:x,ParentName:L=[]})=>{(typeof L=="string"||typeof L=="number")&&(L=[L]);const b=ee.default.useWatch([...L,x.name,"chart_1"],{form:X}),S=ee.default.useWatch([...L,x.name,"chart_2"],{form:X}),T=ee.default.useWatch([...L,x.name,"name"],{form:X}),B=ee.default.useWatch([...L,x.name,"question_type"],{form:X}),z=(0,c.useMemo)(()=>{const U=[],A=[];return b==null||b.forEach(K=>{U.push(K==null?void 0:K.x_axis),A.push(K==null?void 0:K.y_axis)}),{tooltip:{},grid:{left:"7%",right:"5%",bottom:"15%",top:"15%",containLabel:!0},xAxis:{type:"category",data:[...U||[],[4,5,6,7,8].includes(B)?"\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:A,barMaxWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}},[b]),j=(0,c.useMemo)(()=>{const U=[],A=[];return S==null||S.forEach(K=>{U.push(K==null?void 0:K.x_axis),A.push(Math.round((K==null?void 0:K.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",containLabel:!0},xAxis:{type:"category",data:[...U||[],"\u9898\u76EE"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0,formatter:(K,I)=>K!=="\u9898\u76EE"?`${I+1}
{subtext|${(K.length>6?K==null?void 0:K.slice(0,6):K).split("").join(`
`)}}`:K,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:A,barMaxWidth:"40px",itemStyle:{color:"#2EC25B"},type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:"{c}%"}}]}},[S]);return c.createElement(c.Fragment,null,c.createElement("div",{className:"text-500 font14 mb10"},o,".",T),c.createElement(ee.default.Item,{name:[x.name,"content"]},c.createElement($.default.TextArea,{rows:3})),c.createElement("div",{className:"mt20"},c.createElement("div",{className:"font14 mb10"},"\u5B66\u5458\u7B54\u9898\u60C5\u51B5"),c.createElement(ie.Z,{className:"bg-white",style:{border:"1px solid #EBEBEB"},option:z})),c.createElement("div",{className:"mt20"},c.createElement("div",{className:"font14 mb10"},"\u5404\u5C0F\u9898\u7B54\u9898\u60C5\u51B5"),c.createElement(ie.Z,{className:"bg-white",style:{border:"1px solid #EBEBEB",height:331},option:j})))};We.Z=c.memo(g);const J=c.memo(({form:X,index:o=1,data:x})=>{const L=(0,c.useMemo)(()=>{var S;const T=[],B=[];return(S=x==null?void 0:x.chart_1)==null||S.forEach(z=>{T.push(z==null?void 0:z.x_axis),B.push(z==null?void 0:z.y_axis)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"15%",top:"20%",containLabel:!0},xAxis:{type:"category",data:[...T||[],[4,5,6,7,8].includes(x==null?void 0:x.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:B,barMaxWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}},[x==null?void 0:x.chart_1]),b=(0,c.useMemo)(()=>{var S;const T=[],B=[];return(S=x==null?void 0:x.chart_2)==null||S.forEach(z=>{T.push(z==null?void 0:z.x_axis),B.push(Math.round((z==null?void 0:z.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",containLabel:!0},xAxis:{type:"category",data:[...T||[],"\u9898\u76EE"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0,formatter:(z,j)=>z!=="\u9898\u76EE"?`${j+1}
{subtext|${(z.length>6?z==null?void 0:z.slice(0,6):z).split("").join(`
`)}}`:z,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}%"}}]}},[x==null?void 0:x.chart_2]);return c.createElement("div",{className:"text-start pl10 pr10"},c.createElement("div",{className:"text-500 font14 mb10 c-black"},o,".",x==null?void 0:x.name),c.createElement("div",null,c.createElement(F.Z,{className:"font14 c-grey-333",value:x==null?void 0:x.content})),c.createElement("div",{className:"mt20"},c.createElement(ie.Z,{className:"bg-white",style:{background:"#F6F7F9"},option:L}),c.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",o*2-1,"\xA0\xA0",x==null?void 0:x.name,"\u7B54\u9898\u5F97\u5206\u60C5\u51B5\u5206\u5E03")),c.createElement("div",{className:"mt20"},c.createElement(ie.Z,{className:"bg-white",style:{background:"#F6F7F9",height:331},option:b}),c.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",o*2,"\xA0\xA0",x==null?void 0:x.name,"\u5404\u5C0F\u9898\u5F97\u5206\u7387")))})},48027:function(un,We,m){"use strict";m.d(We,{U:function(){return o}});var c=m(59301),ee=Object.defineProperty,$=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,g=(x,L,b)=>L in x?ee(x,L,{enumerable:!0,configurable:!0,writable:!0,value:b}):x[L]=b,J=(x,L)=>{for(var b in L||(L={}))ie.call(L,b)&&g(x,b,L[b]);if($)for(var b of $(L))F.call(L,b)&&g(x,b,L[b]);return x},X=(x,L,b)=>new Promise((S,T)=>{var B=U=>{try{j(b.next(U))}catch(A){T(A)}},z=U=>{try{j(b.throw(U))}catch(A){T(A)}},j=U=>U.done?S(U.value):Promise.resolve(U.value).then(B,z);j((b=b.apply(x,L)).next())});function o(x,L){const[b,S]=(0,c.useState)(L),[T,B]=(0,c.useState)(!1),[z,j]=(0,c.useState)();return[b,T,(A,K=!1)=>X(this,null,function*(){const I=K?L:J(J({},b),A);B(!0),S(I);const M=yield x(I);return B(!1),j(M),M}),z,j]}},25386:function(un,We,m){"use strict";m.d(We,{AL:function(){return I},Iy:function(){return L},Qv:function(){return T},ez:function(){return K},jb:function(){return b}});var c=m(32834),ee=m.n(c),$=m(11690),ie=m.n($);let F=1;function g(De,Pe){const Ce=De.match(/^(\s+)(?:```)/);if(Ce===null)return Pe;const He=Ce[1];return Pe.split(`
`).map(ue=>{const W=ue.match(/^\s+/);if(W===null)return ue;const[P]=W;return P.length>=He.length?ue.slice(He.length):ue}).join(`
`)}let J=[],X=["<ul>"];const o=new(ee()).Renderer,x=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function L(){J.length=0,X=["<ul>"]}const b={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(De,Pe,Ce,He){if(Pe>=De.length||De[Pe].level<=Ce)return Pe;var ue=De[Pe];He.push("<li><a href='#"+F+ue.anchor+"'>"+ue.text+"</a>"),Pe++;var W=[];return Pe=S(De,Pe,ue.level,W),W.length>0&&(He.push("<ul>"),W.forEach(function(P){He.push(P)}),He.push("</ul>")),He.push("</li>"),Pe=S(De,Pe,Ce,He),Pe}function T(){return S(J,0,0,X),X.push("</ul>"),X.join("")}const B={heading(De){const Pe=x.exec(De);if(F+=1,Pe)return{type:"heading",raw:Pe[0],depth:Pe[1].length,text:Pe[2]}},fences(De){const Pe=this.rules.block.fences.exec(De);if(Pe){const Ce=Pe[0];let He=g(Ce,Pe[3]||"");const ue=Pe[2]?Pe[2].trim():Pe[2];if(["latex","katex","math"].indexOf(ue)>=0){const W=U(),P=He;He=W,A[W]={type:"block",expression:P}}return{type:"code",raw:Ce,lang:ue,text:He}}}},z=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let j=0;const U=()=>`__special_katext_id_${j++}__`;let A={};function K(){return A}function I(){j=0,A={}}function M(De){return De=De.replace(z,(Pe,Ce)=>{const He=U();return A[He]={type:"inline",expression:Ce},He}),De}const le=o.listitem;o.listitem=function(De){return le(M(De))};const me=o.paragraph;o.paragraph=function(De){return me(M(De))};const ce=o.tablecell;o.tablecell=function(De,Pe){return ce(M(De),Pe)},o.code=function(De,Pe,Ce){const He=(Pe||"").match(/\S*/)[0];return He?["latex","katex","math"].indexOf(He)>=0?`<p class='editormd-tex'>${De}</p>`:`<pre class="prettyprint linenums"><code class="language-${Pe}">${Ce?De:(0,$.escape)(De,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Ce?De:(0,$.escape)(De,!0))+"</code></pre>"},o.heading=function(De,Pe,Ce){let He=this.options.headerPrefix+Ce.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return J.push({anchor:He,level:Pe,text:De}),"<h"+Pe+' id="'+F+He+'">'+De+"</h"+Pe+">"},ee().setOptions({silent:!0,gfm:!0,pedantic:!1}),ee().use({tokenizer:B,renderer:o}),We.ZP=ee()},29509:function(un,We,m){"use strict";m.d(We,{o2:function(){return F},yT:function(){return g}});var c=m(77654),ee=m(34998);const $=ee.i.map(J=>`${J}-inverse`),ie=["success","processing","error","default","warning"];function F(J){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,c.Z)($),(0,c.Z)(ee.i)).includes(J):ee.i.includes(J)}function g(J){return ie.includes(J)}},9981:function(un,We){"use strict";const m=function(){const c=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let ee=1;ee<arguments.length;ee++){const $=ee<0||arguments.length<=ee?void 0:arguments[ee];$&&Object.keys($).forEach(ie=>{const F=$[ie];F!==void 0&&(c[ie]=F)})}return c};We.Z=m},99402:function(un,We,m){"use strict";m.d(We,{T:function(){return ee},n:function(){return c}});function c($){return["small","middle","large"].includes($)}function ee($){return $?typeof $=="number"&&!Number.isNaN($):!1}},86013:function(un,We,m){"use strict";var c=m(59301),ee=m(19248);const $=ie=>{let F;return typeof ie=="object"&&(ie!=null&&ie.clearIcon)?F=ie:ie&&(F={clearIcon:c.createElement(ee.Z,null)}),F};We.Z=$},97224:function(un,We,m){"use strict";m.d(We,{F:function(){return c}});function c($){return $!=null&&$===$.window}const ee=$=>{var ie,F;if(typeof window=="undefined")return 0;let g=0;return c($)?g=$.pageYOffset:$ instanceof Document?g=$.documentElement.scrollTop:($ instanceof HTMLElement||$)&&(g=$.scrollTop),$&&!c($)&&typeof g!="number"&&(g=(F=((ie=$.ownerDocument)!==null&&ie!==void 0?ie:$).documentElement)===null||F===void 0?void 0:F.scrollTop),g};We.Z=ee},52838:function(un,We,m){"use strict";m.d(We,{Z:function(){return g}});var c=m(37645);function ee(J,X,o,x){if(x===!1)return{adjustX:!1,adjustY:!1};const L=x&&typeof x=="object"?x:{},b={};switch(J){case"top":case"bottom":b.shiftX=X.arrowOffsetHorizontal*2+o,b.shiftY=!0,b.adjustY=!0;break;case"left":case"right":b.shiftY=X.arrowOffsetVertical*2+o,b.shiftX=!0,b.adjustX=!0;break}const S=Object.assign(Object.assign({},b),L);return S.shiftX||(S.adjustX=!0),S.shiftY||(S.adjustY=!0),S}const $={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},ie={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},F=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function g(J){const{arrowWidth:X,autoAdjustOverflow:o,arrowPointAtCenter:x,offset:L,borderRadius:b,visibleFirst:S}=J,T=X/2,B={};return Object.keys($).forEach(z=>{const j=x&&ie[z]||$[z],U=Object.assign(Object.assign({},j),{offset:[0,0],dynamicInset:!0});switch(B[z]=U,F.has(z)&&(U.autoArrow=!1),z){case"top":case"topLeft":case"topRight":U.offset[1]=-T-L;break;case"bottom":case"bottomLeft":case"bottomRight":U.offset[1]=T+L;break;case"left":case"leftTop":case"leftBottom":U.offset[0]=-T-L;break;case"right":case"rightTop":case"rightBottom":U.offset[0]=T+L;break}const A=(0,c.wZ)({contentRadius:b,limitVerticalRadius:!0});if(x)switch(z){case"topLeft":case"bottomLeft":U.offset[0]=-A.arrowOffsetHorizontal-T;break;case"topRight":case"bottomRight":U.offset[0]=A.arrowOffsetHorizontal+T;break;case"leftTop":case"rightTop":U.offset[1]=-A.arrowOffsetHorizontal*2+T;break;case"leftBottom":case"rightBottom":U.offset[1]=A.arrowOffsetHorizontal*2-T;break}U.overflow=ee(z,A,X,o),S&&(U.htmlRegion="visibleFirst")}),B}},83010:function(un,We,m){"use strict";m.d(We,{Z:function(){return ie}});var c=m(16089);function ee(F,g,J,X){const o=J-g;return F/=X/2,F<1?o/2*F*F*F+g:o/2*((F-=2)*F*F+2)+g}var $=m(97224);function ie(F){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:J=()=>window,callback:X,duration:o=450}=g,x=J(),L=(0,$.Z)(x),b=Date.now(),S=()=>{const B=Date.now()-b,z=ee(B>o?o:B,L,F,o);(0,$.F)(x)?x.scrollTo(window.pageXOffset,z):x instanceof Document||x.constructor.name==="HTMLDocument"?x.documentElement.scrollTop=z:x.scrollTop=z,B<o?(0,c.Z)(S):typeof X=="function"&&X()};(0,c.Z)(S)}},82855:function(un,We,m){"use strict";m.d(We,{F:function(){return F},Z:function(){return ie}});var c=m(92310),ee=m.n(c);const $=null;function ie(g,J,X){return ee()({[`${g}-status-success`]:J==="success",[`${g}-status-warning`]:J==="warning",[`${g}-status-error`]:J==="error",[`${g}-status-validating`]:J==="validating",[`${g}-has-feedback`]:X})}const F=(g,J)=>J||g},91882:function(un,We,m){"use strict";m.d(We,{Z:function(){return ae}});var c=m(59301),ee=m(92310),$=m.n(ee),ie=m(11592),F=m(26112),g=m(22703),J=m(48755),X=m(84105),o=m(19563);const x=Q=>{let{children:E}=Q;const{getPrefixCls:C}=c.useContext(J.E_),Y=C("breadcrumb");return c.createElement("li",{className:`${Y}-separator`,"aria-hidden":"true"},E===""?E:E||"/")};x.__ANT_BREADCRUMB_SEPARATOR=!0;var L=x,b=function(Q,E){var C={};for(var Y in Q)Object.prototype.hasOwnProperty.call(Q,Y)&&E.indexOf(Y)<0&&(C[Y]=Q[Y]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,Y=Object.getOwnPropertySymbols(Q);be<Y.length;be++)E.indexOf(Y[be])<0&&Object.prototype.propertyIsEnumerable.call(Q,Y[be])&&(C[Y[be]]=Q[Y[be]]);return C};function S(Q,E){if(Q.title===void 0||Q.title===null)return null;const C=Object.keys(E).join("|");return typeof Q.title=="object"?Q.title:String(Q.title).replace(new RegExp(`:(${C})`,"g"),(Y,be)=>E[be]||Y)}function T(Q,E,C,Y){if(C==null)return null;const{className:be,onClick:je}=E,lt=b(E,["className","onClick"]),ke=Object.assign(Object.assign({},(0,F.Z)(lt,{data:!0,aria:!0})),{onClick:je});return Y!==void 0?c.createElement("a",Object.assign({},ke,{className:$()(`${Q}-link`,be),href:Y}),C):c.createElement("span",Object.assign({},ke,{className:$()(`${Q}-link`,be)}),C)}function B(Q,E){return(Y,be,je,lt,ke)=>{if(E)return E(Y,be,je,lt);const Ye=S(Y,be);return T(Q,Y,Ye,ke)}}var z=function(Q,E){var C={};for(var Y in Q)Object.prototype.hasOwnProperty.call(Q,Y)&&E.indexOf(Y)<0&&(C[Y]=Q[Y]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,Y=Object.getOwnPropertySymbols(Q);be<Y.length;be++)E.indexOf(Y[be])<0&&Object.prototype.propertyIsEnumerable.call(Q,Y[be])&&(C[Y[be]]=Q[Y[be]]);return C};const j=Q=>{const{prefixCls:E,separator:C="/",children:Y,menu:be,overlay:je,dropdownProps:lt,href:ke}=Q,et=(_t=>{if(be||je){const Re=Object.assign({},lt);if(be){const At=be||{},{items:rt}=At,Nt=z(At,["items"]);Re.menu=Object.assign(Object.assign({},Nt),{items:rt==null?void 0:rt.map((Xe,Ge)=>{var{key:Ne,title:Ie,label:te,path:$e}=Xe,Ae=z(Xe,["key","title","label","path"]);let Z=te!=null?te:Ie;return $e&&(Z=c.createElement("a",{href:`${ke}${$e}`},Z)),Object.assign(Object.assign({},Ae),{key:Ne!=null?Ne:Ge,label:Z})})})}else je&&(Re.overlay=je);return c.createElement(o.Z,Object.assign({placement:"bottom"},Re),c.createElement("span",{className:`${E}-overlay-link`},_t,c.createElement(X.Z,null)))}return _t})(Y);return et!=null?c.createElement(c.Fragment,null,c.createElement("li",null,et),C&&c.createElement(L,null,C)):null},U=Q=>{const{prefixCls:E,children:C,href:Y}=Q,be=z(Q,["prefixCls","children","href"]),{getPrefixCls:je}=c.useContext(J.E_),lt=je("breadcrumb",E);return c.createElement(j,Object.assign({},be,{prefixCls:lt}),T(lt,be,C,Y))};U.__ANT_BREADCRUMB_ITEM=!0;var A=U,K=m(36237),I=m(63356),M=m(16931),le=m(51636);const me=Q=>{const{componentCls:E,iconCls:C,calc:Y}=Q;return{[E]:Object.assign(Object.assign({},(0,I.Wf)(Q)),{color:Q.itemColor,fontSize:Q.fontSize,[C]:{fontSize:Q.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:Q.linkColor,transition:`color ${Q.motionDurationMid}`,padding:`0 ${(0,K.unit)(Q.paddingXXS)}`,borderRadius:Q.borderRadiusSM,height:Q.fontHeight,display:"inline-block",marginInline:Y(Q.marginXXS).mul(-1).equal(),"&:hover":{color:Q.linkHoverColor,backgroundColor:Q.colorBgTextHover}},(0,I.Qy)(Q)),"li:last-child":{color:Q.lastItemColor},[`${E}-separator`]:{marginInline:Q.separatorMargin,color:Q.separatorColor},[`${E}-link`]:{[`
> ${C} + span,
> ${C} + a
`]:{marginInlineStart:Q.marginXXS}},[`${E}-overlay-link`]:{borderRadius:Q.borderRadiusSM,height:Q.fontHeight,display:"inline-block",padding:`0 ${(0,K.unit)(Q.paddingXXS)}`,marginInline:Y(Q.marginXXS).mul(-1).equal(),[`> ${C}`]:{marginInlineStart:Q.marginXXS,fontSize:Q.fontSizeIcon},"&:hover":{color:Q.linkHoverColor,backgroundColor:Q.colorBgTextHover,a:{color:Q.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${Q.componentCls}-rtl`]:{direction:"rtl"}})}},ce=Q=>({itemColor:Q.colorTextDescription,lastItemColor:Q.colorText,iconFontSize:Q.fontSize,linkColor:Q.colorTextDescription,linkHoverColor:Q.colorText,separatorColor:Q.colorTextDescription,separatorMargin:Q.marginXS});var De=(0,M.I$)("Breadcrumb",Q=>{const E=(0,le.mergeToken)(Q,{});return me(E)},ce),Pe=function(Q,E){var C={};for(var Y in Q)Object.prototype.hasOwnProperty.call(Q,Y)&&E.indexOf(Y)<0&&(C[Y]=Q[Y]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,Y=Object.getOwnPropertySymbols(Q);be<Y.length;be++)E.indexOf(Y[be])<0&&Object.prototype.propertyIsEnumerable.call(Q,Y[be])&&(C[Y[be]]=Q[Y[be]]);return C};function Ce(Q){const{breadcrumbName:E,children:C}=Q,Y=Pe(Q,["breadcrumbName","children"]),be=Object.assign({title:E},Y);return C&&(be.menu={items:C.map(je=>{var{breadcrumbName:lt}=je,ke=Pe(je,["breadcrumbName"]);return Object.assign(Object.assign({},ke),{title:lt})})}),be}function He(Q,E){return(0,c.useMemo)(()=>Q||(E?E.map(Ce):null),[Q,E])}var ue=function(Q,E){var C={};for(var Y in Q)Object.prototype.hasOwnProperty.call(Q,Y)&&E.indexOf(Y)<0&&(C[Y]=Q[Y]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,Y=Object.getOwnPropertySymbols(Q);be<Y.length;be++)E.indexOf(Y[be])<0&&Object.prototype.propertyIsEnumerable.call(Q,Y[be])&&(C[Y[be]]=Q[Y[be]]);return C};const W=(Q,E)=>{if(E===void 0)return E;let C=(E||"").replace(/^\//,"");return Object.keys(Q).forEach(Y=>{C=C.replace(`:${Y}`,Q[Y])}),C},P=Q=>{const{prefixCls:E,separator:C="/",style:Y,className:be,rootClassName:je,routes:lt,items:ke,children:Ye,itemRender:et,params:_t={}}=Q,Re=ue(Q,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:At,direction:rt,breadcrumb:Nt}=c.useContext(J.E_);let Xe;const Ge=At("breadcrumb",E),[Ne,Ie,te]=De(Ge),$e=He(ke,lt),Ae=B(Ge,et);if($e&&$e.length>0){const he=[],_e=ke||lt;Xe=$e.map((pe,Ee)=>{const{path:Oe,key:Ze,type:re,menu:fe,overlay:st,onClick:tt,className:ct,separator:ut,dropdownProps:Ue}=pe,xt=W(_t,Oe);xt!==void 0&&he.push(xt);const dt=Ze!=null?Ze:Ee;if(re==="separator")return c.createElement(L,{key:dt},ut);const gt={},kt=Ee===$e.length-1;fe?gt.menu=fe:st&&(gt.overlay=st);let{href:w}=pe;return he.length&&xt!==void 0&&(w=`#/${he.join("/")}`),c.createElement(j,Object.assign({key:dt},gt,(0,F.Z)(pe,{data:!0,aria:!0}),{className:ct,dropdownProps:Ue,href:w,separator:kt?"":C,onClick:tt,prefixCls:Ge}),Ae(pe,_t,_e,he,w))})}else if(Ye){const he=(0,ie.Z)(Ye).length;Xe=(0,ie.Z)(Ye).map((_e,pe)=>{if(!_e)return _e;const Ee=pe===he-1;return(0,g.Tm)(_e,{separator:Ee?"":C,key:pe})})}const Z=$()(Ge,Nt==null?void 0:Nt.className,{[`${Ge}-rtl`]:rt==="rtl"},be,je,Ie,te),D=Object.assign(Object.assign({},Nt==null?void 0:Nt.style),Y);return Ne(c.createElement("nav",Object.assign({className:Z,style:D},Re),c.createElement("ol",null,Xe)))};P.Item=A,P.Separator=L;var de=P,ae=de},62673:function(un,We,m){"use strict";m.d(We,{default:function(){return De}});var c=m(59301),ee=m(92310),$=m.n(ee),ie=m(16632),F=m(8654),g=m(12919),J=m(63872),X=m(48755),o=m(2171),x=m(83397),L=m(56553),S=c.createContext(null),T=m(36170),B=m(74632),z=function(Pe,Ce){var He={};for(var ue in Pe)Object.prototype.hasOwnProperty.call(Pe,ue)&&Ce.indexOf(ue)<0&&(He[ue]=Pe[ue]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var W=0,ue=Object.getOwnPropertySymbols(Pe);W<ue.length;W++)Ce.indexOf(ue[W])<0&&Object.prototype.propertyIsEnumerable.call(Pe,ue[W])&&(He[ue[W]]=Pe[ue[W]]);return He};const j=(Pe,Ce)=>{var He;const{prefixCls:ue,className:W,rootClassName:P,children:de,indeterminate:ae=!1,style:Q,onMouseEnter:E,onMouseLeave:C,skipGroup:Y=!1,disabled:be}=Pe,je=z(Pe,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:lt,direction:ke,checkbox:Ye}=c.useContext(X.E_),et=c.useContext(S),{isFormItemInput:_t}=c.useContext(L.aM),Re=c.useContext(o.Z),At=(He=(et==null?void 0:et.disabled)||be)!==null&&He!==void 0?He:Re,rt=c.useRef(je.value),Nt=c.useRef(null),Xe=(0,F.sQ)(Ce,Nt);c.useEffect(()=>{et==null||et.registerValue(je.value)},[]),c.useEffect(()=>{if(!Y)return je.value!==rt.current&&(et==null||et.cancelValue(rt.current),et==null||et.registerValue(je.value),rt.current=je.value),()=>et==null?void 0:et.cancelValue(je.value)},[je.value]),c.useEffect(()=>{var pe;!((pe=Nt.current)===null||pe===void 0)&&pe.input&&(Nt.current.input.indeterminate=ae)},[ae]);const Ge=lt("checkbox",ue),Ne=(0,x.Z)(Ge),[Ie,te,$e]=(0,T.ZP)(Ge,Ne),Ae=Object.assign({},je);et&&!Y&&(Ae.onChange=function(){je.onChange&&je.onChange.apply(je,arguments),et.toggleOption&&et.toggleOption({label:de,value:je.value})},Ae.name=et.name,Ae.checked=et.value.includes(je.value));const Z=$()(`${Ge}-wrapper`,{[`${Ge}-rtl`]:ke==="rtl",[`${Ge}-wrapper-checked`]:Ae.checked,[`${Ge}-wrapper-disabled`]:At,[`${Ge}-wrapper-in-form-item`]:_t},Ye==null?void 0:Ye.className,W,P,$e,Ne,te),D=$()({[`${Ge}-indeterminate`]:ae},J.A,te),[he,_e]=(0,B.Z)(Ae.onClick);return Ie(c.createElement(g.Z,{component:"Checkbox",disabled:At},c.createElement("label",{className:Z,style:Object.assign(Object.assign({},Ye==null?void 0:Ye.style),Q),onMouseEnter:E,onMouseLeave:C,onClick:he},c.createElement(ie.Z,Object.assign({},Ae,{onClick:_e,prefixCls:Ge,className:D,disabled:At,ref:Xe})),de!==void 0&&c.createElement("span",{className:`${Ge}-label`},de))))};var A=c.forwardRef(j),K=m(77654),I=m(2738),M=function(Pe,Ce){var He={};for(var ue in Pe)Object.prototype.hasOwnProperty.call(Pe,ue)&&Ce.indexOf(ue)<0&&(He[ue]=Pe[ue]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var W=0,ue=Object.getOwnPropertySymbols(Pe);W<ue.length;W++)Ce.indexOf(ue[W])<0&&Object.prototype.propertyIsEnumerable.call(Pe,ue[W])&&(He[ue[W]]=Pe[ue[W]]);return He},me=c.forwardRef((Pe,Ce)=>{const{defaultValue:He,children:ue,options:W=[],prefixCls:P,className:de,rootClassName:ae,style:Q,onChange:E}=Pe,C=M(Pe,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Y,direction:be}=c.useContext(X.E_),[je,lt]=c.useState(C.value||He||[]),[ke,Ye]=c.useState([]);c.useEffect(()=>{"value"in C&&lt(C.value||[])},[C.value]);const et=c.useMemo(()=>W.map(D=>typeof D=="string"||typeof D=="number"?{label:D,value:D}:D),[W]),_t=D=>{Ye(he=>he.filter(_e=>_e!==D))},Re=D=>{Ye(he=>[].concat((0,K.Z)(he),[D]))},At=D=>{const he=je.indexOf(D.value),_e=(0,K.Z)(je);he===-1?_e.push(D.value):_e.splice(he,1),"value"in C||lt(_e),E==null||E(_e.filter(pe=>ke.includes(pe)).sort((pe,Ee)=>{const Oe=et.findIndex(re=>re.value===pe),Ze=et.findIndex(re=>re.value===Ee);return Oe-Ze}))},rt=Y("checkbox",P),Nt=`${rt}-group`,Xe=(0,x.Z)(rt),[Ge,Ne,Ie]=(0,T.ZP)(rt,Xe),te=(0,I.Z)(C,["value","disabled"]),$e=W.length?et.map(D=>c.createElement(A,{prefixCls:rt,key:D.value.toString(),disabled:"disabled"in D?D.disabled:C.disabled,value:D.value,checked:je.includes(D.value),onChange:D.onChange,className:`${Nt}-item`,style:D.style,title:D.title,id:D.id,required:D.required},D.label)):ue,Ae={toggleOption:At,value:je,disabled:C.disabled,name:C.name,registerValue:Re,cancelValue:_t},Z=$()(Nt,{[`${Nt}-rtl`]:be==="rtl"},de,ae,Ie,Xe,Ne);return Ge(c.createElement("div",Object.assign({className:Z,style:Q},te,{ref:Ce}),c.createElement(S.Provider,{value:Ae},$e)))});const ce=A;ce.Group=me,ce.__ANT_CHECKBOX=!0;var De=ce},36170:function(un,We,m){"use strict";m.d(We,{C2:function(){return g}});var c=m(36237),ee=m(63356),$=m(51636),ie=m(16931);const F=J=>{const{checkboxCls:X}=J,o=`${X}-wrapper`;return[{[`${X}-group`]:Object.assign(Object.assign({},(0,ee.Wf)(J)),{display:"inline-flex",flexWrap:"wrap",columnGap:J.marginXS,[`> ${J.antCls}-row`]:{flex:1}}),[o]:Object.assign(Object.assign({},(0,ee.Wf)(J)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${o}`]:{marginInlineStart:0},[`&${o}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[X]:Object.assign(Object.assign({},(0,ee.Wf)(J)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:J.borderRadiusSM,alignSelf:"center",[`${X}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${X}-inner`]:Object.assign({},(0,ee.oN)(J))},[`${X}-inner`]:{boxSizing:"border-box",display:"block",width:J.checkboxSize,height:J.checkboxSize,direction:"ltr",backgroundColor:J.colorBgContainer,border:`${(0,c.unit)(J.lineWidth)} ${J.lineType} ${J.colorBorder}`,borderRadius:J.borderRadiusSM,borderCollapse:"separate",transition:`all ${J.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:J.calc(J.checkboxSize).div(14).mul(5).equal(),height:J.calc(J.checkboxSize).div(14).mul(8).equal(),border:`${(0,c.unit)(J.lineWidthBold)} solid ${J.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${J.motionDurationFast} ${J.motionEaseInBack}, opacity ${J.motionDurationFast}`}},"& + span":{paddingInlineStart:J.paddingXS,paddingInlineEnd:J.paddingXS}})},{[`
${o}:not(${o}-disabled),
${X}:not(${X}-disabled)
`]:{[`&:hover ${X}-inner`]:{borderColor:J.colorPrimary}},[`${o}:not(${o}-disabled)`]:{[`&:hover ${X}-checked:not(${X}-disabled) ${X}-inner`]:{backgroundColor:J.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${X}-checked:not(${X}-disabled):after`]:{borderColor:J.colorPrimaryHover}}},{[`${X}-checked`]:{[`${X}-inner`]:{backgroundColor:J.colorPrimary,borderColor:J.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${J.motionDurationMid} ${J.motionEaseOutBack} ${J.motionDurationFast}`}}},[`
${o}-checked:not(${o}-disabled),
${X}-checked:not(${X}-disabled)
`]:{[`&:hover ${X}-inner`]:{backgroundColor:J.colorPrimaryHover,borderColor:"transparent"}}},{[X]:{"&-indeterminate":{[`${X}-inner`]:{backgroundColor:`${J.colorBgContainer} !important`,borderColor:`${J.colorBorder} !important`,"&:after":{top:"50%",insetInlineStart:"50%",width:J.calc(J.fontSizeLG).div(2).equal(),height:J.calc(J.fontSizeLG).div(2).equal(),backgroundColor:J.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${X}-inner`]:{backgroundColor:`${J.colorBgContainer} !important`,borderColor:`${J.colorPrimary} !important`}}}},{[`${o}-disabled`]:{cursor:"not-allowed"},[`${X}-disabled`]:{[`&, ${X}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${X}-inner`]:{background:J.colorBgContainerDisabled,borderColor:J.colorBorder,"&:after":{borderColor:J.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:J.colorTextDisabled},[`&${X}-indeterminate ${X}-inner::after`]:{background:J.colorTextDisabled}}}]};function g(J,X){const o=(0,$.mergeToken)(X,{checkboxCls:`.${J}`,checkboxSize:X.controlInteractiveSize});return[F(o)]}We.ZP=(0,ie.I$)("Checkbox",(J,X)=>{let{prefixCls:o}=X;return[g(o,J)]})},74632:function(un,We,m){"use strict";m.d(We,{Z:function(){return $}});var c=m(59301),ee=m(16089);function $(ie){const F=c.useRef(null),g=()=>{ee.Z.cancel(F.current),F.current=null};return[()=>{g(),F.current=(0,ee.Z)(()=>{F.current=null})},o=>{F.current&&(o.stopPropagation(),g()),ie==null||ie(o)}]}},38406:function(un,We,m){"use strict";var c=m(59301),ee=m(48755),$=m(584);const ie=F=>{const{componentName:g}=F,{getPrefixCls:J}=(0,c.useContext)(ee.E_),X=J("empty");switch(g){case"Table":case"List":return c.createElement($.Z,{image:$.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return c.createElement($.Z,{image:$.Z.PRESENTED_IMAGE_SIMPLE,className:`${X}-small`});case"Table.filter":return null;default:return c.createElement($.Z,null)}};We.Z=ie},19563:function(un,We,m){"use strict";m.d(We,{Z:function(){return lt}});var c=m(59301),ee=m(33853),$=m(38819),ie=m(92310),F=m.n(ie),g=m(96478),J=m(6089),X=m(18929),o=m(2738),x=m(75030),b=ke=>typeof ke!="object"&&typeof ke!="function"||ke===null,S=m(52838),T=m(45915),B=m(22703),z=m(32383),j=m(55743),U=m(48755),A=m(83397),K=m(93041),I=m(78857),M=m(57700),le=m(36237),me=m(63356),ce=m(46e3),De=m(93873),Pe=m(34925),Ce=m(37645),He=m(36305),ue=m(16931),W=m(51636),de=ke=>{const{componentCls:Ye,menuCls:et,colorError:_t,colorTextLightSolid:Re}=ke,At=`${et}-item`;return{[`${Ye}, ${Ye}-menu-submenu`]:{[`${et} ${At}`]:{[`&${At}-danger:not(${At}-disabled)`]:{color:_t,"&:hover":{color:Re,backgroundColor:_t}}}}}};const ae=ke=>{const{componentCls:Ye,menuCls:et,zIndexPopup:_t,dropdownArrowDistance:Re,sizePopupArrow:At,antCls:rt,iconCls:Nt,motionDurationMid:Xe,paddingBlock:Ge,fontSize:Ne,dropdownEdgeChildPadding:Ie,colorTextDisabled:te,fontSizeIcon:$e,controlPaddingHorizontal:Ae,colorBgElevated:Z}=ke;return[{[Ye]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:_t,display:"block","&::before":{position:"absolute",insetBlock:ke.calc(At).div(2).sub(Re).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${rt}-btn`]:{[`& > ${Nt}-down, & > ${rt}-btn-icon > ${Nt}-down`]:{fontSize:$e}},[`${Ye}-wrap`]:{position:"relative",[`${rt}-btn > ${Nt}-down`]:{fontSize:$e},[`${Nt}-down::before`]:{transition:`transform ${Xe}`}},[`${Ye}-wrap-open`]:{[`${Nt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${rt}-slide-down-enter${rt}-slide-down-enter-active${Ye}-placement-bottomLeft,
&${rt}-slide-down-appear${rt}-slide-down-appear-active${Ye}-placement-bottomLeft,
&${rt}-slide-down-enter${rt}-slide-down-enter-active${Ye}-placement-bottom,
&${rt}-slide-down-appear${rt}-slide-down-appear-active${Ye}-placement-bottom,
&${rt}-slide-down-enter${rt}-slide-down-enter-active${Ye}-placement-bottomRight,
&${rt}-slide-down-appear${rt}-slide-down-appear-active${Ye}-placement-bottomRight`]:{animationName:ce.fJ},[`&${rt}-slide-up-enter${rt}-slide-up-enter-active${Ye}-placement-topLeft,
&${rt}-slide-up-appear${rt}-slide-up-appear-active${Ye}-placement-topLeft,
&${rt}-slide-up-enter${rt}-slide-up-enter-active${Ye}-placement-top,
&${rt}-slide-up-appear${rt}-slide-up-appear-active${Ye}-placement-top,
&${rt}-slide-up-enter${rt}-slide-up-enter-active${Ye}-placement-topRight,
&${rt}-slide-up-appear${rt}-slide-up-appear-active${Ye}-placement-topRight`]:{animationName:ce.Qt},[`&${rt}-slide-down-leave${rt}-slide-down-leave-active${Ye}-placement-bottomLeft,
&${rt}-slide-down-leave${rt}-slide-down-leave-active${Ye}-placement-bottom,
&${rt}-slide-down-leave${rt}-slide-down-leave-active${Ye}-placement-bottomRight`]:{animationName:ce.Uw},[`&${rt}-slide-up-leave${rt}-slide-up-leave-active${Ye}-placement-topLeft,
&${rt}-slide-up-leave${rt}-slide-up-leave-active${Ye}-placement-top,
&${rt}-slide-up-leave${rt}-slide-up-leave-active${Ye}-placement-topRight`]:{animationName:ce.ly}}},(0,Ce.ZP)(ke,Z,{arrowPlacement:{top:!0,bottom:!0}}),{[`${Ye} ${et}`]:{position:"relative",margin:0},[`${et}-submenu-popup`]:{position:"absolute",zIndex:_t,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${Ye}, ${Ye}-menu-submenu`]:Object.assign(Object.assign({},(0,me.Wf)(ke)),{[et]:Object.assign(Object.assign({padding:Ie,listStyleType:"none",backgroundColor:Z,backgroundClip:"padding-box",borderRadius:ke.borderRadiusLG,outline:"none",boxShadow:ke.boxShadowSecondary},(0,me.Qy)(ke)),{"&:empty":{padding:0,boxShadow:"none"},[`${et}-item-group-title`]:{padding:`${(0,le.unit)(Ge)} ${(0,le.unit)(Ae)}`,color:ke.colorTextDescription,transition:`all ${Xe}`},[`${et}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${et}-item-icon`]:{minWidth:Ne,marginInlineEnd:ke.marginXS,fontSize:ke.fontSizeSM},[`${et}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${Xe}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${et}-item-extra`]:{paddingInlineStart:ke.padding,marginInlineStart:"auto",fontSize:ke.fontSizeSM,color:ke.colorTextDescription}},[`${et}-item, ${et}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${(0,le.unit)(Ge)} ${(0,le.unit)(Ae)}`,color:ke.colorText,fontWeight:"normal",fontSize:Ne,lineHeight:ke.lineHeight,cursor:"pointer",transition:`all ${Xe}`,borderRadius:ke.borderRadiusSM,"&:hover, &-active":{backgroundColor:ke.controlItemBgHover}},(0,me.Qy)(ke)),{"&-selected":{color:ke.colorPrimary,backgroundColor:ke.controlItemBgActive,"&:hover, &-active":{backgroundColor:ke.controlItemBgActiveHover}},"&-disabled":{color:te,cursor:"not-allowed","&:hover":{color:te,backgroundColor:Z,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${(0,le.unit)(ke.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:ke.colorSplit},[`${Ye}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:ke.paddingXS,[`${Ye}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:ke.colorTextDescription,fontSize:$e,fontStyle:"normal"}}}),[`${et}-item-group-list`]:{margin:`0 ${(0,le.unit)(ke.marginXS)}`,padding:0,listStyle:"none"},[`${et}-submenu-title`]:{paddingInlineEnd:ke.calc(Ae).add(ke.fontSizeSM).equal()},[`${et}-submenu-vertical`]:{position:"relative"},[`${et}-submenu${et}-submenu-disabled ${Ye}-menu-submenu-title`]:{[`&, ${Ye}-menu-submenu-arrow-icon`]:{color:te,backgroundColor:Z,cursor:"not-allowed"}},[`${et}-submenu-selected ${Ye}-menu-submenu-title`]:{color:ke.colorPrimary}})})},[(0,ce.oN)(ke,"slide-up"),(0,ce.oN)(ke,"slide-down"),(0,De.Fm)(ke,"move-up"),(0,De.Fm)(ke,"move-down"),(0,Pe._y)(ke,"zoom-big")]]},Q=ke=>Object.assign(Object.assign({zIndexPopup:ke.zIndexPopupBase+50,paddingBlock:(ke.controlHeight-ke.fontSize*ke.lineHeight)/2},(0,Ce.wZ)({contentRadius:ke.borderRadiusLG,limitVerticalRadius:!0})),(0,He.w)(ke));var E=(0,ue.I$)("Dropdown",ke=>{const{marginXXS:Ye,sizePopupArrow:et,paddingXXS:_t,componentCls:Re}=ke,At=(0,W.mergeToken)(ke,{menuCls:`${Re}-menu`,dropdownArrowDistance:ke.calc(et).div(2).add(Ye).equal(),dropdownEdgeChildPadding:_t});return[ae(At),de(At)]},Q,{resetStyle:!1});const C=null,Y=ke=>{var Ye;const{menu:et,arrow:_t,prefixCls:Re,children:At,trigger:rt,disabled:Nt,dropdownRender:Xe,getPopupContainer:Ge,overlayClassName:Ne,rootClassName:Ie,overlayStyle:te,open:$e,onOpenChange:Ae,visible:Z,onVisibleChange:D,mouseEnterDelay:he=.15,mouseLeaveDelay:_e=.1,autoAdjustOverflow:pe=!0,placement:Ee="",overlay:Oe,transitionName:Ze}=ke,{getPopupContainer:re,getPrefixCls:fe,direction:st,dropdown:tt}=c.useContext(U.E_),ct=(0,z.ln)("Dropdown"),ut=c.useMemo(()=>{const Gt=fe();return Ze!==void 0?Ze:Ee.includes("top")?`${Gt}-slide-down`:`${Gt}-slide-up`},[fe,Ee,Ze]),Ue=c.useMemo(()=>Ee?Ee.includes("Center")?Ee.slice(0,Ee.indexOf("Center")):Ee:st==="rtl"?"bottomRight":"bottomLeft",[Ee,st]),xt=fe("dropdown",Re),dt=(0,A.Z)(xt),[gt,kt,w]=E(xt,dt),[,O]=(0,M.ZP)(),qe=c.Children.only(b(At)?c.createElement("span",null,At):At),oe=(0,B.Tm)(qe,{className:F()(`${xt}-trigger`,{[`${xt}-rtl`]:st==="rtl"},qe.props.className),disabled:(Ye=qe.props.disabled)!==null&&Ye!==void 0?Ye:Nt}),xe=Nt?[]:rt,jt=!!(xe!=null&&xe.includes("contextMenu")),[Qe,at]=(0,X.Z)(!1,{value:$e!=null?$e:Z}),bt=(0,J.Z)(Gt=>{Ae==null||Ae(Gt,{source:"trigger"}),D==null||D(Gt),at(Gt)}),ge=F()(Ne,Ie,kt,w,dt,tt==null?void 0:tt.className,{[`${xt}-rtl`]:st==="rtl"}),ye=(0,S.Z)({arrowPointAtCenter:typeof _t=="object"&&_t.pointAtCenter,autoAdjustOverflow:pe,offset:O.marginXXS,arrowWidth:_t?O.sizePopupArrow:0,borderRadius:O.borderRadius}),Fe=c.useCallback(()=>{et!=null&&et.selectable&&(et!=null&&et.multiple)||(Ae==null||Ae(!1,{source:"menu"}),at(!1))},[et==null?void 0:et.selectable,et==null?void 0:et.multiple]),ze=()=>{let Gt;return et!=null&&et.items?Gt=c.createElement(K.default,Object.assign({},et)):typeof Oe=="function"?Gt=Oe():Gt=Oe,Xe&&(Gt=Xe(Gt)),Gt=c.Children.only(typeof Gt=="string"?c.createElement("span",null,Gt):Gt),c.createElement(I.J,{prefixCls:`${xt}-menu`,rootClassName:F()(w,dt),expandIcon:c.createElement("span",{className:`${xt}-menu-submenu-arrow`},st==="rtl"?c.createElement(ee.Z,{className:`${xt}-menu-submenu-arrow-icon`}):c.createElement($.Z,{className:`${xt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Fe,validator:pn=>{let{mode:En}=pn}},Gt)},[q,Mt]=(0,x.Cn)("Dropdown",te==null?void 0:te.zIndex);let Be=c.createElement(g.Z,Object.assign({alignPoint:jt},(0,o.Z)(ke,["rootClassName"]),{mouseEnterDelay:he,mouseLeaveDelay:_e,visible:Qe,builtinPlacements:ye,arrow:!!_t,overlayClassName:ge,prefixCls:xt,getPopupContainer:Ge||re,transitionName:ut,trigger:xe,overlay:ze,placement:Ue,onVisibleChange:bt,overlayStyle:Object.assign(Object.assign(Object.assign({},tt==null?void 0:tt.style),te),{zIndex:q})}),oe);return q&&(Be=c.createElement(j.Z.Provider,{value:Mt},Be)),gt(Be)},be=(0,T.Z)(Y,"align",void 0,"dropdown",ke=>ke),je=ke=>c.createElement(be,Object.assign({},ke),c.createElement("span",null));Y._InternalPanelDoNotUseOrYouWillBeFired=je;var lt=Y},75727:function(un,We,m){"use strict";m.d(We,{Z:function(){return T}});var c=m(19563),ee=m(59301),$=m(18785),ie=m(92310),F=m.n(ie),g=m(7939),J=m(48755),X=m(44104),o=m(70045),x=function(B,z){var j={};for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&z.indexOf(U)<0&&(j[U]=B[U]);if(B!=null&&typeof Object.getOwnPropertySymbols=="function")for(var A=0,U=Object.getOwnPropertySymbols(B);A<U.length;A++)z.indexOf(U[A])<0&&Object.prototype.propertyIsEnumerable.call(B,U[A])&&(j[U[A]]=B[U[A]]);return j};const L=B=>{const{getPopupContainer:z,getPrefixCls:j,direction:U}=ee.useContext(J.E_),{prefixCls:A,type:K="default",danger:I,disabled:M,loading:le,onClick:me,htmlType:ce,children:De,className:Pe,menu:Ce,arrow:He,autoFocus:ue,overlay:W,trigger:P,align:de,open:ae,onOpenChange:Q,placement:E,getPopupContainer:C,href:Y,icon:be=ee.createElement($.Z,null),title:je,buttonsRender:lt=he=>he,mouseEnterDelay:ke,mouseLeaveDelay:Ye,overlayClassName:et,overlayStyle:_t,destroyPopupOnHide:Re,dropdownRender:At}=B,rt=x(B,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),Nt=j("dropdown",A),Xe=`${Nt}-button`,Ge={menu:Ce,arrow:He,autoFocus:ue,align:de,disabled:M,trigger:M?[]:P,onOpenChange:Q,getPopupContainer:C||z,mouseEnterDelay:ke,mouseLeaveDelay:Ye,overlayClassName:et,overlayStyle:_t,destroyPopupOnHide:Re,dropdownRender:At},{compactSize:Ne,compactItemClassnames:Ie}=(0,o.ri)(Nt,U),te=F()(Xe,Ie,Pe);"overlay"in B&&(Ge.overlay=W),"open"in B&&(Ge.open=ae),"placement"in B?Ge.placement=E:Ge.placement=U==="rtl"?"bottomLeft":"bottomRight";const $e=ee.createElement(g.ZP,{type:K,danger:I,disabled:M,loading:le,onClick:me,htmlType:ce,href:Y,title:je},De),Ae=ee.createElement(g.ZP,{type:K,danger:I,icon:be}),[Z,D]=lt([$e,Ae]);return ee.createElement(X.Z.Compact,Object.assign({className:te,size:Ne,block:!0},rt),Z,ee.createElement(c.Z,Object.assign({},Ge),D))};L.__ANT_BUTTON=!0;var b=L;const S=c.Z;S.Button=b;var T=S},584:function(un,We,m){"use strict";m.d(We,{Z:function(){return K}});var c=m(59301),ee=m(92310),$=m.n(ee),ie=m(9017),F=m(17835),g=m(57700),X=()=>{const[,I]=(0,g.ZP)(),[M]=(0,ie.Z)("Empty"),me=new F.FastColor(I.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return c.createElement("svg",{style:me,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},c.createElement("title",null,(M==null?void 0:M.description)||"Empty"),c.createElement("g",{fill:"none",fillRule:"evenodd"},c.createElement("g",{transform:"translate(24 31.67)"},c.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),c.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),c.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),c.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),c.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),c.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),c.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},c.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),c.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},x=()=>{const[,I]=(0,g.ZP)(),[M]=(0,ie.Z)("Empty"),{colorFill:le,colorFillTertiary:me,colorFillQuaternary:ce,colorBgContainer:De}=I,{borderColor:Pe,shadowColor:Ce,contentColor:He}=(0,c.useMemo)(()=>({borderColor:new F.FastColor(le).onBackground(De).toHexString(),shadowColor:new F.FastColor(me).onBackground(De).toHexString(),contentColor:new F.FastColor(ce).onBackground(De).toHexString()}),[le,me,ce,De]);return c.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},c.createElement("title",null,(M==null?void 0:M.description)||"Empty"),c.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},c.createElement("ellipse",{fill:Ce,cx:"32",cy:"33",rx:"32",ry:"7"}),c.createElement("g",{fillRule:"nonzero",stroke:Pe},c.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),c.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:He}))))},L=m(16931),b=m(51636);const S=I=>{const{componentCls:M,margin:le,marginXS:me,marginXL:ce,fontSize:De,lineHeight:Pe}=I;return{[M]:{marginInline:me,fontSize:De,lineHeight:Pe,textAlign:"center",[`${M}-image`]:{height:I.emptyImgHeight,marginBottom:me,opacity:I.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${M}-description`]:{color:I.colorTextDescription},[`${M}-footer`]:{marginTop:le},"&-normal":{marginBlock:ce,color:I.colorTextDescription,[`${M}-description`]:{color:I.colorTextDescription},[`${M}-image`]:{height:I.emptyImgHeightMD}},"&-small":{marginBlock:me,color:I.colorTextDescription,[`${M}-image`]:{height:I.emptyImgHeightSM}}}}};var T=(0,L.I$)("Empty",I=>{const{componentCls:M,controlHeightLG:le,calc:me}=I,ce=(0,b.mergeToken)(I,{emptyImgCls:`${M}-img`,emptyImgHeight:me(le).mul(2.5).equal(),emptyImgHeightMD:le,emptyImgHeightSM:me(le).mul(.875).equal()});return[S(ce)]}),B=m(48755),z=function(I,M){var le={};for(var me in I)Object.prototype.hasOwnProperty.call(I,me)&&M.indexOf(me)<0&&(le[me]=I[me]);if(I!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,me=Object.getOwnPropertySymbols(I);ce<me.length;ce++)M.indexOf(me[ce])<0&&Object.prototype.propertyIsEnumerable.call(I,me[ce])&&(le[me[ce]]=I[me[ce]]);return le};const j=c.createElement(X,null),U=c.createElement(x,null),A=I=>{const{className:M,rootClassName:le,prefixCls:me,image:ce=j,description:De,children:Pe,imageStyle:Ce,style:He,classNames:ue,styles:W}=I,P=z(I,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:de,direction:ae,className:Q,style:E,classNames:C,styles:Y}=(0,B.dj)("empty"),be=de("empty",me),[je,lt,ke]=T(be),[Ye]=(0,ie.Z)("Empty"),et=typeof De!="undefined"?De:Ye==null?void 0:Ye.description,_t=typeof et=="string"?et:"empty";let Re=null;return typeof ce=="string"?Re=c.createElement("img",{alt:_t,src:ce}):Re=ce,je(c.createElement("div",Object.assign({className:$()(lt,ke,be,Q,{[`${be}-normal`]:ce===U,[`${be}-rtl`]:ae==="rtl"},M,le,C.root,ue==null?void 0:ue.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},Y.root),E),W==null?void 0:W.root),He)},P),c.createElement("div",{className:$()(`${be}-image`,C.image,ue==null?void 0:ue.image),style:Object.assign(Object.assign(Object.assign({},Ce),Y.image),W==null?void 0:W.image)},Re),et&&c.createElement("div",{className:$()(`${be}-description`,C.description,ue==null?void 0:ue.description),style:Object.assign(Object.assign({},Y.description),W==null?void 0:W.description)},et),Pe&&c.createElement("div",{className:$()(`${be}-footer`,C.footer,ue==null?void 0:ue.footer),style:Object.assign(Object.assign({},Y.footer),W==null?void 0:W.footer)},Pe)))};A.PRESENTED_IMAGE_DEFAULT=j,A.PRESENTED_IMAGE_SIMPLE=U;var K=A},24971:function(un,We,m){"use strict";var c=m(59301),ee=m(56553),$=m(48755);const ie=function(F,g){let J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var X,o;const{variant:x,[F]:L}=c.useContext($.E_),b=c.useContext(ee.pg),S=L==null?void 0:L.variant;let T;typeof g!="undefined"?T=g:J===!1?T="borderless":T=(o=(X=b!=null?b:S)!==null&&X!==void 0?X:x)!==null&&o!==void 0?o:"outlined";const B=$.tr.includes(T);return[T,B]};We.Z=ie},28284:function(un,We,m){"use strict";m.d(We,{default:function(){return wt}});var c=m(56553),ee=m(77654),$=m(59301),ie=m(92310),F=m.n(ie),g=m(77900),J=m(86641),X=m(83397);function o(Me){const[nt,vt]=$.useState(Me);return $.useEffect(()=>{const yt=setTimeout(()=>{vt(Me)},Me.length?0:10);return()=>{clearTimeout(yt)}},[Me]),nt}var x=m(36237),L=m(63356),b=m(34925),S=m(34961),T=m(51636),B=m(16931),j=Me=>{const{componentCls:nt}=Me,vt=`${nt}-show-help`,yt=`${nt}-show-help-item`;return{[vt]:{transition:`opacity ${Me.motionDurationFast} ${Me.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[yt]:{overflow:"hidden",transition:`height ${Me.motionDurationFast} ${Me.motionEaseInOut},
opacity ${Me.motionDurationFast} ${Me.motionEaseInOut},
transform ${Me.motionDurationFast} ${Me.motionEaseInOut} !important`,[`&${yt}-appear, &${yt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${yt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const U=Me=>({legend:{display:"block",width:"100%",marginBottom:Me.marginLG,padding:0,color:Me.colorTextDescription,fontSize:Me.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${(0,x.unit)(Me.lineWidth)} ${Me.lineType} ${Me.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${(0,x.unit)(Me.controlOutlineWidth)} ${Me.controlOutline}`},output:{display:"block",paddingTop:15,color:Me.colorText,fontSize:Me.fontSize,lineHeight:Me.lineHeight}}),A=(Me,nt)=>{const{formItemCls:vt}=Me;return{[vt]:{[`${vt}-label > label`]:{height:nt},[`${vt}-control-input`]:{minHeight:nt}}}},K=Me=>{const{componentCls:nt}=Me;return{[Me.componentCls]:Object.assign(Object.assign(Object.assign({},(0,L.Wf)(Me)),U(Me)),{[`${nt}-text`]:{display:"inline-block",paddingInlineEnd:Me.paddingSM},"&-small":Object.assign({},A(Me,Me.controlHeightSM)),"&-large":Object.assign({},A(Me,Me.controlHeightLG))})}},I=Me=>{const{formItemCls:nt,iconCls:vt,rootPrefixCls:yt,antCls:Tt,labelRequiredMarkColor:Jt,labelColor:mn,labelFontSize:yn,labelHeight:Wt,labelColonMarginInlineStart:gn,labelColonMarginInlineEnd:Ln,itemMarginBottom:vn}=Me;return{[nt]:Object.assign(Object.assign({},(0,L.Wf)(Me)),{marginBottom:vn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden${Tt}-row`]:{display:"none"},"&-has-warning":{[`${nt}-split`]:{color:Me.colorError}},"&-has-error":{[`${nt}-split`]:{color:Me.colorWarning}},[`${nt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:Me.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Wt,color:mn,fontSize:yn,[`> ${vt}`]:{fontSize:Me.fontSize,verticalAlign:"top"},[`&${nt}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:Me.marginXXS,color:Jt,fontSize:Me.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${nt}-required-mark-hidden, &${nt}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${nt}-optional`]:{display:"inline-block",marginInlineStart:Me.marginXXS,color:Me.colorTextDescription,[`&${nt}-required-mark-hidden`]:{display:"none"}},[`${nt}-tooltip`]:{color:Me.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Me.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:gn,marginInlineEnd:Ln},[`&${nt}-no-colon::after`]:{content:'"\\a0"'}}},[`${nt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${yt}-col-'"]):not([class*="' ${yt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Me.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[nt]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:Me.colorTextDescription,fontSize:Me.fontSize,lineHeight:Me.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Me.controlHeightSM,transition:`color ${Me.motionDurationMid} ${Me.motionEaseOut}`},"&-explain":{"&-error":{color:Me.colorError},"&-warning":{color:Me.colorWarning}}},[`&-with-help ${nt}-explain`]:{height:"auto",opacity:1},[`${nt}-feedback-icon`]:{fontSize:Me.fontSize,textAlign:"center",visibility:"visible",animationName:b.kr,animationDuration:Me.motionDurationMid,animationTimingFunction:Me.motionEaseOutBack,pointerEvents:"none","&-success":{color:Me.colorSuccess},"&-error":{color:Me.colorError},"&-warning":{color:Me.colorWarning},"&-validating":{color:Me.colorPrimary}}})}},M=(Me,nt)=>{const{formItemCls:vt}=Me;return{[`${nt}-horizontal`]:{[`${vt}-label`]:{flexGrow:0},[`${vt}-control`]:{flex:"1 1 0",minWidth:0},[`${vt}-label[class$='-24'], ${vt}-label[class*='-24 ']`]:{[`& + ${vt}-control`]:{minWidth:"unset"}}}}},le=Me=>{const{componentCls:nt,formItemCls:vt,inlineItemMarginBottom:yt}=Me;return{[`${nt}-inline`]:{display:"flex",flexWrap:"wrap",[vt]:{flex:"none",marginInlineEnd:Me.margin,marginBottom:yt,"&-row":{flexWrap:"nowrap"},[`> ${vt}-label,
> ${vt}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${vt}-label`]:{flex:"none"},[`${nt}-text`]:{display:"inline-block"},[`${vt}-has-feedback`]:{display:"inline-block"}}}}},me=Me=>({padding:Me.verticalLabelPadding,margin:Me.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),ce=Me=>{const{componentCls:nt,formItemCls:vt,rootPrefixCls:yt}=Me;return{[`${vt} ${vt}-label`]:me(Me),[`${nt}:not(${nt}-inline)`]:{[vt]:{flexWrap:"wrap",[`${vt}-label, ${vt}-control`]:{[`&:not([class*=" ${yt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},De=Me=>{const{componentCls:nt,formItemCls:vt,antCls:yt}=Me;return{[`${nt}-vertical`]:{[`${vt}:not(${vt}-horizontal)`]:{[`${vt}-row`]:{flexDirection:"column"},[`${vt}-label > label`]:{height:"auto"},[`${vt}-control`]:{width:"100%"},[`${vt}-label,
${yt}-col-24${vt}-label,
${yt}-col-xl-24${vt}-label`]:me(Me)}},[`@media (max-width: ${(0,x.unit)(Me.screenXSMax)})`]:[ce(Me),{[nt]:{[`${vt}:not(${vt}-horizontal)`]:{[`${yt}-col-xs-24${vt}-label`]:me(Me)}}}],[`@media (max-width: ${(0,x.unit)(Me.screenSMMax)})`]:{[nt]:{[`${vt}:not(${vt}-horizontal)`]:{[`${yt}-col-sm-24${vt}-label`]:me(Me)}}},[`@media (max-width: ${(0,x.unit)(Me.screenMDMax)})`]:{[nt]:{[`${vt}:not(${vt}-horizontal)`]:{[`${yt}-col-md-24${vt}-label`]:me(Me)}}},[`@media (max-width: ${(0,x.unit)(Me.screenLGMax)})`]:{[nt]:{[`${vt}:not(${vt}-horizontal)`]:{[`${yt}-col-lg-24${vt}-label`]:me(Me)}}}}},Pe=Me=>{const{formItemCls:nt,antCls:vt}=Me;return{[`${nt}-vertical`]:{[`${nt}-row`]:{flexDirection:"column"},[`${nt}-label > label`]:{height:"auto"},[`${nt}-control`]:{width:"100%"}},[`${nt}-vertical ${nt}-label,
${vt}-col-24${nt}-label,
${vt}-col-xl-24${nt}-label`]:me(Me),[`@media (max-width: ${(0,x.unit)(Me.screenXSMax)})`]:[ce(Me),{[nt]:{[`${vt}-col-xs-24${nt}-label`]:me(Me)}}],[`@media (max-width: ${(0,x.unit)(Me.screenSMMax)})`]:{[nt]:{[`${vt}-col-sm-24${nt}-label`]:me(Me)}},[`@media (max-width: ${(0,x.unit)(Me.screenMDMax)})`]:{[nt]:{[`${vt}-col-md-24${nt}-label`]:me(Me)}},[`@media (max-width: ${(0,x.unit)(Me.screenLGMax)})`]:{[nt]:{[`${vt}-col-lg-24${nt}-label`]:me(Me)}}}},Ce=Me=>({labelRequiredMarkColor:Me.colorError,labelColor:Me.colorTextHeading,labelFontSize:Me.fontSize,labelHeight:Me.controlHeight,labelColonMarginInlineStart:Me.marginXXS/2,labelColonMarginInlineEnd:Me.marginXS,itemMarginBottom:Me.marginLG,verticalLabelPadding:`0 0 ${Me.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),He=(Me,nt)=>(0,T.mergeToken)(Me,{formItemCls:`${Me.componentCls}-item`,rootPrefixCls:nt});var ue=(0,B.I$)("Form",(Me,nt)=>{let{rootPrefixCls:vt}=nt;const yt=He(Me,vt);return[K(yt),I(yt),j(yt),M(yt,yt.componentCls),M(yt,yt.formItemCls),le(yt),De(yt),Pe(yt),(0,S.Z)(yt),b.kr]},Ce,{order:-1e3});const W=[];function P(Me,nt,vt){let yt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Me=="string"?Me:`${nt}-${yt}`,error:Me,errorStatus:vt}}var ae=Me=>{let{help:nt,helpStatus:vt,errors:yt=W,warnings:Tt=W,className:Jt,fieldId:mn,onVisibleChanged:yn}=Me;const{prefixCls:Wt}=$.useContext(c.Rk),gn=`${Wt}-item-explain`,Ln=(0,X.Z)(Wt),[vn,ht,Ct]=ue(Wt,Ln),Zt=$.useMemo(()=>(0,J.Z)(Wt),[Wt]),Lt=o(yt),zt=o(Tt),Vt=$.useMemo(()=>nt!=null?[P(nt,"help",vt)]:[].concat((0,ee.Z)(Lt.map((Sn,On)=>P(Sn,"error","error",On))),(0,ee.Z)(zt.map((Sn,On)=>P(Sn,"warning","warning",On)))),[nt,vt,Lt,zt]),nn=$.useMemo(()=>{const Sn={};return Vt.forEach(On=>{let{key:or}=On;Sn[or]=(Sn[or]||0)+1}),Vt.map((On,or)=>Object.assign(Object.assign({},On),{key:Sn[On.key]>1?`${On.key}-fallback-${or}`:On.key}))},[Vt]),rn={};return mn&&(rn.id=`${mn}_help`),vn($.createElement(g.default,{motionDeadline:Zt.motionDeadline,motionName:`${Wt}-show-help`,visible:!!nn.length,onVisibleChanged:yn},Sn=>{const{className:On,style:or}=Sn;return $.createElement("div",Object.assign({},rn,{className:F()(gn,On,Ct,Ln,Jt,ht),style:or}),$.createElement(g.CSSMotionList,Object.assign({keys:nn},(0,J.Z)(Wt),{motionName:`${Wt}-show-help-item`,component:!1}),Nn=>{const{key:Pn,error:Hn,errorStatus:Kn,className:er,style:$n}=Nn;return $.createElement("div",{key:Pn,className:F()(er,{[`${gn}-${Kn}`]:Kn}),style:$n},Hn)}))}))},Q=m(55372),E=m(48755),C=m(2171),Y=m(31756),be=m(23069),je=m(76846),lt=m(16722);const ke=["parentNode"],Ye="form_item";function et(Me){return Me===void 0||Me===!1?[]:Array.isArray(Me)?Me:[Me]}function _t(Me,nt){if(!Me.length)return;const vt=Me.join("_");return nt?`${nt}_${vt}`:ke.includes(vt)?`${Ye}_${vt}`:vt}function Re(Me,nt,vt,yt,Tt,Jt){let mn=yt;return Jt!==void 0?mn=Jt:vt.validating?mn="validating":Me.length?mn="error":nt.length?mn="warning":(vt.touched||Tt&&vt.validated)&&(mn="success"),mn}var At=function(Me,nt){var vt={};for(var yt in Me)Object.prototype.hasOwnProperty.call(Me,yt)&&nt.indexOf(yt)<0&&(vt[yt]=Me[yt]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tt=0,yt=Object.getOwnPropertySymbols(Me);Tt<yt.length;Tt++)nt.indexOf(yt[Tt])<0&&Object.prototype.propertyIsEnumerable.call(Me,yt[Tt])&&(vt[yt[Tt]]=Me[yt[Tt]]);return vt};function rt(Me){return et(Me).join("_")}function Nt(Me,nt){const vt=nt.getFieldInstance(Me),yt=(0,je.bn)(vt);if(yt)return yt;const Tt=_t(et(Me),nt.__INTERNAL__.name);if(Tt)return document.getElementById(Tt)}function Xe(Me){const[nt]=(0,Q.useForm)(),vt=$.useRef({}),yt=$.useMemo(()=>Me!=null?Me:Object.assign(Object.assign({},nt),{__INTERNAL__:{itemRef:Tt=>Jt=>{const mn=rt(Tt);Jt?vt.current[mn]=Jt:delete vt.current[mn]}},scrollToField:function(Tt){let Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{focus:mn}=Jt,yn=At(Jt,["focus"]),Wt=Nt(Tt,yt);Wt&&((0,lt.Z)(Wt,Object.assign({scrollMode:"if-needed",block:"nearest"},yn)),mn&&yt.focusField(Tt))},focusField:Tt=>{var Jt,mn;const yn=yt.getFieldInstance(Tt);typeof(yn==null?void 0:yn.focus)=="function"?yn.focus():(mn=(Jt=Nt(Tt,yt))===null||Jt===void 0?void 0:Jt.focus)===null||mn===void 0||mn.call(Jt)},getFieldInstance:Tt=>{const Jt=rt(Tt);return vt.current[Jt]}}),[Me,nt]);return[yt]}var Ge=m(98350),Ne=function(Me,nt){var vt={};for(var yt in Me)Object.prototype.hasOwnProperty.call(Me,yt)&&nt.indexOf(yt)<0&&(vt[yt]=Me[yt]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tt=0,yt=Object.getOwnPropertySymbols(Me);Tt<yt.length;Tt++)nt.indexOf(yt[Tt])<0&&Object.prototype.propertyIsEnumerable.call(Me,yt[Tt])&&(vt[yt[Tt]]=Me[yt[Tt]]);return vt};const Ie=(Me,nt)=>{const vt=$.useContext(C.Z),{getPrefixCls:yt,direction:Tt,requiredMark:Jt,colon:mn,scrollToFirstError:yn,className:Wt,style:gn}=(0,E.dj)("form"),{prefixCls:Ln,className:vn,rootClassName:ht,size:Ct,disabled:Zt=vt,form:Lt,colon:zt,labelAlign:Vt,labelWrap:nn,labelCol:rn,wrapperCol:Sn,hideRequiredMark:On,layout:or="horizontal",scrollToFirstError:Nn,requiredMark:Pn,onFinishFailed:Hn,name:Kn,style:er,feedbackIcons:$n,variant:Zn}=Me,nr=Ne(Me,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),ar=(0,Y.Z)(Ct),Jn=$.useContext(Ge.Z),Yn=$.useMemo(()=>Pn!==void 0?Pn:On?!1:Jt!==void 0?Jt:!0,[On,Pn,Jt]),qn=zt!=null?zt:mn,Fn=yt("form",Ln),$r=(0,X.Z)(Fn),[Ft,tr,ur]=ue(Fn,$r),Yr=F()(Fn,`${Fn}-${or}`,{[`${Fn}-hide-required-mark`]:Yn===!1,[`${Fn}-rtl`]:Tt==="rtl",[`${Fn}-${ar}`]:ar},ur,$r,tr,Wt,vn,ht),[zr]=Xe(Lt),{__INTERNAL__:li}=zr;li.name=Kn;const Qr=$.useMemo(()=>({name:Kn,labelAlign:Vt,labelCol:rn,labelWrap:nn,wrapperCol:Sn,vertical:or==="vertical",colon:qn,requiredMark:Yn,itemRef:li.itemRef,form:zr,feedbackIcons:$n}),[Kn,Vt,rn,Sn,or,qn,Yn,zr,$n]),Bn=$.useRef(null);$.useImperativeHandle(nt,()=>{var sn;return Object.assign(Object.assign({},zr),{nativeElement:(sn=Bn.current)===null||sn===void 0?void 0:sn.nativeElement})});const An=(sn,Rn)=>{if(sn){let Un={block:"nearest"};typeof sn=="object"&&(Un=Object.assign(Object.assign({},Un),sn)),zr.scrollToField(Rn,Un)}},en=sn=>{if(Hn==null||Hn(sn),sn.errorFields.length){const Rn=sn.errorFields[0].name;if(Nn!==void 0){An(Nn,Rn);return}yn!==void 0&&An(yn,Rn)}};return Ft($.createElement(c.pg.Provider,{value:Zn},$.createElement(C.n,{disabled:Zt},$.createElement(be.Z.Provider,{value:ar},$.createElement(c.RV,{validateMessages:Jn},$.createElement(c.q3.Provider,{value:Qr},$.createElement(Q.default,Object.assign({id:Kn},nr,{name:Kn,onFinishFailed:en,form:zr,ref:Bn,style:Object.assign(Object.assign({},gn),er),className:Yr}))))))))};var $e=$.forwardRef(Ie),Ae=m(41799),Z=m(8654),D=m(22703),he=m(32383),_e=m(11592);function pe(Me){if(typeof Me=="function")return Me;const nt=(0,_e.Z)(Me);return nt.length<=1?nt[0]:nt}const Ee=()=>{const{status:Me,errors:nt=[],warnings:vt=[]}=$.useContext(c.aM);return{status:Me,errors:nt,warnings:vt}};Ee.Context=c.aM;var Oe=Ee,Ze=m(16089);function re(Me){const[nt,vt]=$.useState(Me),yt=$.useRef(null),Tt=$.useRef([]),Jt=$.useRef(!1);$.useEffect(()=>(Jt.current=!1,()=>{Jt.current=!0,Ze.Z.cancel(yt.current),yt.current=null}),[]);function mn(yn){Jt.current||(yt.current===null&&(Tt.current=[],yt.current=(0,Ze.Z)(()=>{yt.current=null,vt(Wt=>{let gn=Wt;return Tt.current.forEach(Ln=>{gn=Ln(gn)}),gn})})),Tt.current.push(yn))}return[nt,mn]}function fe(){const{itemRef:Me}=$.useContext(c.q3),nt=$.useRef({});function vt(yt,Tt){const Jt=Tt&&typeof Tt=="object"&&(0,Z.C4)(Tt),mn=yt.join("_");return(nt.current.name!==mn||nt.current.originRef!==Jt)&&(nt.current.name=mn,nt.current.originRef=Jt,nt.current.ref=(0,Z.sQ)(Me(yt),Jt)),nt.current.ref}return vt}var st=m(29194),tt=m(34280),ct=m(2738),ut=m(65970),Ue=m(70425),xt=m(5472);const dt=Me=>{const{formItemCls:nt}=Me;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${nt}-control`]:{display:"flex"}}}};var gt=(0,B.bk)(["Form","item-item"],(Me,nt)=>{let{rootPrefixCls:vt}=nt;const yt=He(Me,vt);return[dt(yt)]}),kt=function(Me,nt){var vt={};for(var yt in Me)Object.prototype.hasOwnProperty.call(Me,yt)&&nt.indexOf(yt)<0&&(vt[yt]=Me[yt]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tt=0,yt=Object.getOwnPropertySymbols(Me);Tt<yt.length;Tt++)nt.indexOf(yt[Tt])<0&&Object.prototype.propertyIsEnumerable.call(Me,yt[Tt])&&(vt[yt[Tt]]=Me[yt[Tt]]);return vt};const w=24;var qe=Me=>{const{prefixCls:nt,status:vt,labelCol:yt,wrapperCol:Tt,children:Jt,errors:mn,warnings:yn,_internalItemRender:Wt,extra:gn,help:Ln,fieldId:vn,marginBottom:ht,onErrorVisibleChanged:Ct,label:Zt}=Me,Lt=`${nt}-item`,zt=$.useContext(c.q3),Vt=$.useMemo(()=>{let nr=Object.assign({},Tt||zt.wrapperCol||{});return Zt===null&&!yt&&!Tt&&zt.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(Jn=>{const Yn=Jn?[Jn]:[],qn=(0,Ue.U2)(zt.labelCol,Yn),Fn=typeof qn=="object"?qn:{},$r=(0,Ue.U2)(nr,Yn),Ft=typeof $r=="object"?$r:{};"span"in Fn&&!("offset"in Ft)&&Fn.span<w&&(nr=(0,Ue.t8)(nr,[].concat(Yn,["offset"]),Fn.span))}),nr},[Tt,zt]),nn=F()(`${Lt}-control`,Vt.className),rn=$.useMemo(()=>{const{labelCol:nr,wrapperCol:ar}=zt;return kt(zt,["labelCol","wrapperCol"])},[zt]),Sn=$.useRef(null),[On,or]=$.useState(0);(0,tt.Z)(()=>{gn&&Sn.current?or(Sn.current.clientHeight):or(0)},[gn]);const Nn=$.createElement("div",{className:`${Lt}-control-input`},$.createElement("div",{className:`${Lt}-control-input-content`},Jt)),Pn=$.useMemo(()=>({prefixCls:nt,status:vt}),[nt,vt]),Hn=ht!==null||mn.length||yn.length?$.createElement(c.Rk.Provider,{value:Pn},$.createElement(ae,{fieldId:vn,errors:mn,warnings:yn,help:Ln,helpStatus:vt,className:`${Lt}-explain-connected`,onVisibleChanged:Ct})):null,Kn={};vn&&(Kn.id=`${vn}_extra`);const er=gn?$.createElement("div",Object.assign({},Kn,{className:`${Lt}-extra`,ref:Sn}),gn):null,$n=Hn||er?$.createElement("div",{className:`${Lt}-additional`,style:ht?{minHeight:ht+On}:{}},Hn,er):null,Zn=Wt&&Wt.mark==="pro_table_render"&&Wt.render?Wt.render(Me,{input:Nn,errorList:Hn,extra:er}):$.createElement($.Fragment,null,Nn,$n);return $.createElement(c.q3.Provider,{value:rn},$.createElement(xt.Z,Object.assign({},Vt,{className:nn}),Zn),$.createElement(gt,{prefixCls:nt}))},oe=m(61485),xe=m(9017),jt=m(85981),Qe=m(25399),at=function(Me,nt){var vt={};for(var yt in Me)Object.prototype.hasOwnProperty.call(Me,yt)&&nt.indexOf(yt)<0&&(vt[yt]=Me[yt]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tt=0,yt=Object.getOwnPropertySymbols(Me);Tt<yt.length;Tt++)nt.indexOf(yt[Tt])<0&&Object.prototype.propertyIsEnumerable.call(Me,yt[Tt])&&(vt[yt[Tt]]=Me[yt[Tt]]);return vt};function bt(Me){return Me?typeof Me=="object"&&!$.isValidElement(Me)?Me:{title:Me}:null}var ye=Me=>{let{prefixCls:nt,label:vt,htmlFor:yt,labelCol:Tt,labelAlign:Jt,colon:mn,required:yn,requiredMark:Wt,tooltip:gn,vertical:Ln}=Me;var vn;const[ht]=(0,xe.Z)("Form"),{labelAlign:Ct,labelCol:Zt,labelWrap:Lt,colon:zt}=$.useContext(c.q3);if(!vt)return null;const Vt=Tt||Zt||{},nn=Jt||Ct,rn=`${nt}-item-label`,Sn=F()(rn,nn==="left"&&`${rn}-left`,Vt.className,{[`${rn}-wrap`]:!!Lt});let On=vt;const or=mn===!0||zt!==!1&&mn!==!1;or&&!Ln&&typeof vt=="string"&&vt.trim()&&(On=vt.replace(/[:|]\s*$/,""));const Pn=bt(gn);if(Pn){const{icon:nr=$.createElement(oe.Z,null)}=Pn,ar=at(Pn,["icon"]),Jn=$.createElement(Qe.Z,Object.assign({},ar),$.cloneElement(nr,{className:`${nt}-item-tooltip`,title:"",onClick:Yn=>{Yn.preventDefault()},tabIndex:null}));On=$.createElement($.Fragment,null,On,Jn)}const Hn=Wt==="optional",Kn=typeof Wt=="function",er=Wt===!1;Kn?On=Wt(On,{required:!!yn}):Hn&&!yn&&(On=$.createElement($.Fragment,null,On,$.createElement("span",{className:`${nt}-item-optional`,title:""},(ht==null?void 0:ht.optional)||((vn=jt.Z.Form)===null||vn===void 0?void 0:vn.optional))));let $n;er?$n="hidden":(Hn||Kn)&&($n="optional");const Zn=F()({[`${nt}-item-required`]:yn,[`${nt}-item-required-mark-${$n}`]:$n,[`${nt}-item-no-colon`]:!or});return $.createElement(xt.Z,Object.assign({},Vt,{className:Sn}),$.createElement("label",{htmlFor:yt,className:Zn,title:typeof vt=="string"?vt:""},On))},Fe=m(29679),ze=m(19248),q=m(96512),Mt=m(58617);const Be={success:Fe.Z,warning:q.Z,error:ze.Z,validating:Mt.Z};function Gt(Me){let{children:nt,errors:vt,warnings:yt,hasFeedback:Tt,validateStatus:Jt,prefixCls:mn,meta:yn,noStyle:Wt}=Me;const gn=`${mn}-item`,{feedbackIcons:Ln}=$.useContext(c.q3),vn=Re(vt,yt,yn,null,!!Tt,Jt),{isFormItemInput:ht,status:Ct,hasFeedback:Zt,feedbackIcon:Lt}=$.useContext(c.aM),zt=$.useMemo(()=>{var Vt;let nn;if(Tt){const Sn=Tt!==!0&&Tt.icons||Ln,On=vn&&((Vt=Sn==null?void 0:Sn({status:vn,errors:vt,warnings:yt}))===null||Vt===void 0?void 0:Vt[vn]),or=vn&&Be[vn];nn=On!==!1&&or?$.createElement("span",{className:F()(`${gn}-feedback-icon`,`${gn}-feedback-icon-${vn}`)},On||$.createElement(or,null)):null}const rn={status:vn||"",errors:vt,warnings:yt,hasFeedback:!!Tt,feedbackIcon:nn,isFormItemInput:!0};return Wt&&(rn.status=(vn!=null?vn:Ct)||"",rn.isFormItemInput=ht,rn.hasFeedback=!!(Tt!=null?Tt:Zt),rn.feedbackIcon=Tt!==void 0?rn.feedbackIcon:Lt),rn},[vn,Tt,Wt,ht,Ct]);return $.createElement(c.aM.Provider,{value:zt},nt)}var pn=function(Me,nt){var vt={};for(var yt in Me)Object.prototype.hasOwnProperty.call(Me,yt)&&nt.indexOf(yt)<0&&(vt[yt]=Me[yt]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tt=0,yt=Object.getOwnPropertySymbols(Me);Tt<yt.length;Tt++)nt.indexOf(yt[Tt])<0&&Object.prototype.propertyIsEnumerable.call(Me,yt[Tt])&&(vt[yt[Tt]]=Me[yt[Tt]]);return vt};function En(Me){const{prefixCls:nt,className:vt,rootClassName:yt,style:Tt,help:Jt,errors:mn,warnings:yn,validateStatus:Wt,meta:gn,hasFeedback:Ln,hidden:vn,children:ht,fieldId:Ct,required:Zt,isRequired:Lt,onSubItemMetaChange:zt,layout:Vt}=Me,nn=pn(Me,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout"]),rn=`${nt}-item`,{requiredMark:Sn,vertical:On}=$.useContext(c.q3),or=On||Vt==="vertical",Nn=$.useRef(null),Pn=o(mn),Hn=o(yn),Kn=Jt!=null,er=!!(Kn||mn.length||yn.length),$n=!!Nn.current&&(0,st.Z)(Nn.current),[Zn,nr]=$.useState(null);(0,tt.Z)(()=>{if(er&&Nn.current){const Fn=getComputedStyle(Nn.current);nr(parseInt(Fn.marginBottom,10))}},[er,$n]);const ar=Fn=>{Fn||nr(null)},Yn=function(){let Fn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const $r=Fn?Pn:gn.errors,Ft=Fn?Hn:gn.warnings;return Re($r,Ft,gn,"",!!Ln,Wt)}(),qn=F()(rn,vt,yt,{[`${rn}-with-help`]:Kn||Pn.length||Hn.length,[`${rn}-has-feedback`]:Yn&&Ln,[`${rn}-has-success`]:Yn==="success",[`${rn}-has-warning`]:Yn==="warning",[`${rn}-has-error`]:Yn==="error",[`${rn}-is-validating`]:Yn==="validating",[`${rn}-hidden`]:vn,[`${rn}-${Vt}`]:Vt});return $.createElement("div",{className:qn,style:Tt,ref:Nn},$.createElement(ut.Z,Object.assign({className:`${rn}-row`},(0,ct.Z)(nn,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),$.createElement(ye,Object.assign({htmlFor:Ct},Me,{requiredMark:Sn,required:Zt!=null?Zt:Lt,prefixCls:nt,vertical:or})),$.createElement(qe,Object.assign({},Me,gn,{errors:Pn,warnings:Hn,prefixCls:nt,status:Yn,help:Jt,marginBottom:Zn,onErrorVisibleChanged:ar}),$.createElement(c.qI.Provider,{value:zt},$.createElement(Gt,{prefixCls:nt,meta:gn,errors:gn.errors,warnings:gn.warnings,hasFeedback:Ln,validateStatus:Yn},ht)))),!!Zn&&$.createElement("div",{className:`${rn}-margin-offset`,style:{marginBottom:-Zn}}))}const sr="__SPLIT__",Xn=null;function Wn(Me,nt){const vt=Object.keys(Me),yt=Object.keys(nt);return vt.length===yt.length&&vt.every(Tt=>{const Jt=Me[Tt],mn=nt[Tt];return Jt===mn||typeof Jt=="function"||typeof mn=="function"})}const Cr=$.memo(Me=>{let{children:nt}=Me;return nt},(Me,nt)=>Wn(Me.control,nt.control)&&Me.update===nt.update&&Me.childProps.length===nt.childProps.length&&Me.childProps.every((vt,yt)=>vt===nt.childProps[yt]));function Rr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Qn(Me){const{name:nt,noStyle:vt,className:yt,dependencies:Tt,prefixCls:Jt,shouldUpdate:mn,rules:yn,children:Wt,required:gn,label:Ln,messageVariables:vn,trigger:ht="onChange",validateTrigger:Ct,hidden:Zt,help:Lt,layout:zt}=Me,{getPrefixCls:Vt}=$.useContext(E.E_),{name:nn}=$.useContext(c.q3),rn=pe(Wt),Sn=typeof rn=="function",On=$.useContext(c.qI),{validateTrigger:or}=$.useContext(Q.FieldContext),Nn=Ct!==void 0?Ct:or,Pn=nt!=null,Hn=Vt("form",Jt),Kn=(0,X.Z)(Hn),[er,$n,Zn]=ue(Hn,Kn),nr=(0,he.ln)("Form.Item"),ar=$.useContext(Q.ListContext),Jn=$.useRef(null),[Yn,qn]=re({}),[Fn,$r]=(0,Ae.Z)(()=>Rr()),Ft=Bn=>{const An=ar==null?void 0:ar.getKey(Bn.name);if($r(Bn.destroy?Rr():Bn,!0),vt&&Lt!==!1&&On){let en=Bn.name;if(Bn.destroy)en=Jn.current||en;else if(An!==void 0){const[sn,Rn]=An;en=[sn].concat((0,ee.Z)(Rn)),Jn.current=en}On(Bn,en)}},tr=(Bn,An)=>{qn(en=>{const sn=Object.assign({},en),Un=[].concat((0,ee.Z)(Bn.name.slice(0,-1)),(0,ee.Z)(An)).join(sr);return Bn.destroy?delete sn[Un]:sn[Un]=Bn,sn})},[ur,Yr]=$.useMemo(()=>{const Bn=(0,ee.Z)(Fn.errors),An=(0,ee.Z)(Fn.warnings);return Object.values(Yn).forEach(en=>{Bn.push.apply(Bn,(0,ee.Z)(en.errors||[])),An.push.apply(An,(0,ee.Z)(en.warnings||[]))}),[Bn,An]},[Yn,Fn.errors,Fn.warnings]),zr=fe();function li(Bn,An,en){return vt&&!Zt?$.createElement(Gt,{prefixCls:Hn,hasFeedback:Me.hasFeedback,validateStatus:Me.validateStatus,meta:Fn,errors:ur,warnings:Yr,noStyle:!0},Bn):$.createElement(En,Object.assign({key:"row"},Me,{className:F()(yt,Zn,Kn,$n),prefixCls:Hn,fieldId:An,isRequired:en,errors:ur,warnings:Yr,meta:Fn,onSubItemMetaChange:tr,layout:zt}),Bn)}if(!Pn&&!Sn&&!Tt)return er(li(rn));let Qr={};return typeof Ln=="string"?Qr.label=Ln:nt&&(Qr.label=String(nt)),vn&&(Qr=Object.assign(Object.assign({},Qr),vn)),er($.createElement(Q.Field,Object.assign({},Me,{messageVariables:Qr,trigger:ht,validateTrigger:Nn,onMetaChange:Ft}),(Bn,An,en)=>{const sn=et(nt).length&&An?An.name:[],Rn=_t(sn,nn),Un=gn!==void 0?gn:!!(yn!=null&&yn.some(wn=>{if(wn&&typeof wn=="object"&&wn.required&&!wn.warningOnly)return!0;if(typeof wn=="function"){const cr=wn(en);return(cr==null?void 0:cr.required)&&!(cr!=null&&cr.warningOnly)}return!1})),rr=Object.assign({},Bn);let Ar=null;if(Array.isArray(rn)&&Pn)Ar=rn;else if(!(Sn&&(!(mn||Tt)||Pn))){if(!(Tt&&!Sn&&!Pn))if($.isValidElement(rn)){const wn=Object.assign(Object.assign({},rn.props),rr);if(wn.id||(wn.id=Rn),Lt||ur.length>0||Yr.length>0||Me.extra){const Jr=[];(Lt||ur.length>0)&&Jr.push(`${Rn}_help`),Me.extra&&Jr.push(`${Rn}_extra`),wn["aria-describedby"]=Jr.join(" ")}ur.length>0&&(wn["aria-invalid"]="true"),Un&&(wn["aria-required"]="true"),(0,Z.Yr)(rn)&&(wn.ref=zr(sn,rn)),new Set([].concat((0,ee.Z)(et(ht)),(0,ee.Z)(et(Nn)))).forEach(Jr=>{wn[Jr]=function(){for(var mi,Li,Gr,Ri,qr,bi=arguments.length,ri=new Array(bi),di=0;di<bi;di++)ri[di]=arguments[di];(Gr=rr[Jr])===null||Gr===void 0||(mi=Gr).call.apply(mi,[rr].concat(ri)),(qr=(Ri=rn.props)[Jr])===null||qr===void 0||(Li=qr).call.apply(Li,[Ri].concat(ri))}});const Ir=[wn["aria-required"],wn["aria-invalid"],wn["aria-describedby"]];Ar=$.createElement(Cr,{control:rr,update:rn,childProps:Ir},(0,D.Tm)(rn,wn))}else Sn&&(mn||Tt)&&!Pn?Ar=rn(en):Ar=rn}return li(Ar,Rn,Un)}))}const gr=Qn;gr.useStatus=Oe;var Cn=gr,tn=function(Me,nt){var vt={};for(var yt in Me)Object.prototype.hasOwnProperty.call(Me,yt)&&nt.indexOf(yt)<0&&(vt[yt]=Me[yt]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tt=0,yt=Object.getOwnPropertySymbols(Me);Tt<yt.length;Tt++)nt.indexOf(yt[Tt])<0&&Object.prototype.propertyIsEnumerable.call(Me,yt[Tt])&&(vt[yt[Tt]]=Me[yt[Tt]]);return vt},Vn=Me=>{var{prefixCls:nt,children:vt}=Me,yt=tn(Me,["prefixCls","children"]);const{getPrefixCls:Tt}=$.useContext(E.E_),Jt=Tt("form",nt),mn=$.useMemo(()=>({prefixCls:Jt,status:"error"}),[Jt]);return $.createElement(Q.List,Object.assign({},yt),(yn,Wt,gn)=>$.createElement(c.Rk.Provider,{value:mn},vt(yn.map(Ln=>Object.assign(Object.assign({},Ln),{fieldKey:Ln.key})),Wt,{errors:gn.errors,warnings:gn.warnings})))};function vr(){const{form:Me}=$.useContext(c.q3);return Me}const Et=$e;Et.Item=Cn,Et.List=Vn,Et.ErrorList=ae,Et.useForm=Xe,Et.useFormInstance=vr,Et.useWatch=Q.useWatch,Et.Provider=c.RV,Et.create=()=>{};var wt=Et},49397:function(un,We,m){"use strict";m.d(We,{Z:function(){return I}});var c=m(59301),ee=m(92310),$=m.n(ee),ie=m(36901),F=m(8654),g=m(62487),J=m(86013),X=m(82855),o=m(48755),x=m(2171),L=m(83397),b=m(31756),S=m(56553),T=m(24971),B=m(70045),z=m(23826),j=m(53075);function U(M){return!!(M.prefix||M.suffix||M.allowClear||M.showCount)}var A=function(M,le){var me={};for(var ce in M)Object.prototype.hasOwnProperty.call(M,ce)&&le.indexOf(ce)<0&&(me[ce]=M[ce]);if(M!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,ce=Object.getOwnPropertySymbols(M);De<ce.length;De++)le.indexOf(ce[De])<0&&Object.prototype.propertyIsEnumerable.call(M,ce[De])&&(me[ce[De]]=M[ce[De]]);return me},I=(0,c.forwardRef)((M,le)=>{const{prefixCls:me,bordered:ce=!0,status:De,size:Pe,disabled:Ce,onBlur:He,onFocus:ue,suffix:W,allowClear:P,addonAfter:de,addonBefore:ae,className:Q,style:E,styles:C,rootClassName:Y,onChange:be,classNames:je,variant:lt}=M,ke=A(M,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:Ye,direction:et,allowClear:_t,autoComplete:Re,className:At,style:rt,classNames:Nt,styles:Xe}=(0,o.dj)("input"),Ge=Ye("input",me),Ne=(0,c.useRef)(null),Ie=(0,L.Z)(Ge),[te,$e,Ae]=(0,j.TI)(Ge,Y),[Z]=(0,j.ZP)(Ge,Ie),{compactSize:D,compactItemClassnames:he}=(0,B.ri)(Ge,et),_e=(0,b.Z)(O=>{var qe;return(qe=Pe!=null?Pe:D)!==null&&qe!==void 0?qe:O}),pe=c.useContext(x.Z),Ee=Ce!=null?Ce:pe,{status:Oe,hasFeedback:Ze,feedbackIcon:re}=(0,c.useContext)(S.aM),fe=(0,X.F)(Oe,De),st=U(M)||!!Ze,tt=(0,c.useRef)(st),ct=(0,z.Z)(Ne,!0),ut=O=>{ct(),He==null||He(O)},Ue=O=>{ct(),ue==null||ue(O)},xt=O=>{ct(),be==null||be(O)},dt=(Ze||W)&&c.createElement(c.Fragment,null,W,Ze&&re),gt=(0,J.Z)(P!=null?P:_t),[kt,w]=(0,T.Z)("input",lt,ce);return te(Z(c.createElement(ie.default,Object.assign({ref:(0,F.sQ)(le,Ne),prefixCls:Ge,autoComplete:Re},ke,{disabled:Ee,onBlur:ut,onFocus:Ue,style:Object.assign(Object.assign({},rt),E),styles:Object.assign(Object.assign({},Xe),C),suffix:dt,allowClear:gt,className:$()(Q,Y,Ae,Ie,he,At),onChange:xt,addonBefore:ae&&c.createElement(g.Z,{form:!0,space:!0},ae),addonAfter:de&&c.createElement(g.Z,{form:!0,space:!0},de),classNames:Object.assign(Object.assign(Object.assign({},je),Nt),{input:$()({[`${Ge}-sm`]:_e==="small",[`${Ge}-lg`]:_e==="large",[`${Ge}-rtl`]:et==="rtl"},je==null?void 0:je.input,Nt.input,$e),variant:$()({[`${Ge}-${kt}`]:w},(0,X.Z)(Ge,fe)),affixWrapper:$()({[`${Ge}-affix-wrapper-sm`]:_e==="small",[`${Ge}-affix-wrapper-lg`]:_e==="large",[`${Ge}-affix-wrapper-rtl`]:et==="rtl"},$e),wrapper:$()({[`${Ge}-group-rtl`]:et==="rtl"},$e),groupWrapper:$()({[`${Ge}-group-wrapper-sm`]:_e==="small",[`${Ge}-group-wrapper-lg`]:_e==="large",[`${Ge}-group-wrapper-rtl`]:et==="rtl",[`${Ge}-group-wrapper-${kt}`]:w},(0,X.Z)(`${Ge}-group-wrapper`,fe,Ze),$e)})}))))})},79809:function(un,We,m){"use strict";m.d(We,{Z:function(){return le}});var c=m(59301),ee=m(92310),$=m.n(ee),ie=m(22711),F=m(86013),g=m(82855),J=m(48755),X=m(2171),o=m(83397),x=m(31756),L=m(56553),b=m(24971),S=m(70045),T=m(30292),B=m(53075),z=m(16931),j=m(51636),U=m(64910);const A=me=>{const{componentCls:ce,paddingLG:De}=me,Pe=`${ce}-textarea`;return{[`textarea${ce}`]:{maxWidth:"100%",height:"auto",minHeight:me.controlHeight,lineHeight:me.lineHeight,verticalAlign:"bottom",transition:`all ${me.motionDurationSlow}`,resize:"vertical",[`&${ce}-mouse-active`]:{transition:`all ${me.motionDurationSlow}, height 0s, width 0s`}},[`${ce}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[Pe]:{position:"relative","&-show-count":{[`> ${ce}`]:{height:"100%"},[`${ce}-data-count`]:{position:"absolute",bottom:me.calc(me.fontSize).mul(me.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:me.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
&-allow-clear > ${ce},
&-affix-wrapper${Pe}-has-feedback ${ce}
`]:{paddingInlineEnd:De},[`&-affix-wrapper${ce}-affix-wrapper`]:{padding:0,[`> textarea${ce}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:me.calc(me.controlHeight).sub(me.calc(me.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${ce}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${ce}-clear-icon`]:{position:"absolute",insetInlineEnd:me.paddingInline,insetBlockStart:me.paddingXS},[`${Pe}-suffix`]:{position:"absolute",top:0,insetInlineEnd:me.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${ce}-affix-wrapper-sm`]:{[`${ce}-suffix`]:{[`${ce}-clear-icon`]:{insetInlineEnd:me.paddingInlineSM}}}}}};var K=(0,z.I$)(["Input","TextArea"],me=>{const ce=(0,j.mergeToken)(me,(0,U.e)(me));return[A(ce)]},U.T,{resetFont:!1}),I=function(me,ce){var De={};for(var Pe in me)Object.prototype.hasOwnProperty.call(me,Pe)&&ce.indexOf(Pe)<0&&(De[Pe]=me[Pe]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ce=0,Pe=Object.getOwnPropertySymbols(me);Ce<Pe.length;Ce++)ce.indexOf(Pe[Ce])<0&&Object.prototype.propertyIsEnumerable.call(me,Pe[Ce])&&(De[Pe[Ce]]=me[Pe[Ce]]);return De},le=(0,c.forwardRef)((me,ce)=>{var De;const{prefixCls:Pe,bordered:Ce=!0,size:He,disabled:ue,status:W,allowClear:P,classNames:de,rootClassName:ae,className:Q,style:E,styles:C,variant:Y,showCount:be,onMouseDown:je,onResize:lt}=me,ke=I(me,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:Ye,direction:et,allowClear:_t,autoComplete:Re,className:At,style:rt,classNames:Nt,styles:Xe}=(0,J.dj)("textArea"),Ge=c.useContext(X.Z),Ne=ue!=null?ue:Ge,{status:Ie,hasFeedback:te,feedbackIcon:$e}=c.useContext(L.aM),Ae=(0,g.F)(Ie,W),Z=c.useRef(null);c.useImperativeHandle(ce,()=>{var w;return{resizableTextArea:(w=Z.current)===null||w===void 0?void 0:w.resizableTextArea,focus:O=>{var qe,oe;(0,T.nH)((oe=(qe=Z.current)===null||qe===void 0?void 0:qe.resizableTextArea)===null||oe===void 0?void 0:oe.textArea,O)},blur:()=>{var O;return(O=Z.current)===null||O===void 0?void 0:O.blur()}}});const D=Ye("input",Pe),he=(0,o.Z)(D),[_e,pe,Ee]=(0,B.TI)(D,ae),[Oe]=K(D,he),{compactSize:Ze,compactItemClassnames:re}=(0,S.ri)(D,et),fe=(0,x.Z)(w=>{var O;return(O=He!=null?He:Ze)!==null&&O!==void 0?O:w}),[st,tt]=(0,b.Z)("textArea",Y,Ce),ct=(0,F.Z)(P!=null?P:_t),[ut,Ue]=c.useState(!1),[xt,dt]=c.useState(!1),gt=w=>{Ue(!0),je==null||je(w);const O=()=>{Ue(!1),document.removeEventListener("mouseup",O)};document.addEventListener("mouseup",O)},kt=w=>{var O,qe;if(lt==null||lt(w),ut&&typeof getComputedStyle=="function"){const oe=(qe=(O=Z.current)===null||O===void 0?void 0:O.nativeElement)===null||qe===void 0?void 0:qe.querySelector("textarea");oe&&getComputedStyle(oe).resize==="both"&&dt(!0)}};return _e(Oe(c.createElement(ie.default,Object.assign({autoComplete:Re},ke,{style:Object.assign(Object.assign({},rt),E),styles:Object.assign(Object.assign({},Xe),C),disabled:Ne,allowClear:ct,className:$()(Ee,he,Q,ae,re,At,xt&&`${D}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},de),Nt),{textarea:$()({[`${D}-sm`]:fe==="small",[`${D}-lg`]:fe==="large"},pe,de==null?void 0:de.textarea,Nt.textarea,ut&&`${D}-mouse-active`),variant:$()({[`${D}-${st}`]:tt},(0,g.Z)(D,Ae)),affixWrapper:$()(`${D}-textarea-affix-wrapper`,{[`${D}-affix-wrapper-rtl`]:et==="rtl",[`${D}-affix-wrapper-sm`]:fe==="small",[`${D}-affix-wrapper-lg`]:fe==="large",[`${D}-textarea-show-count`]:be||((De=me.count)===null||De===void 0?void 0:De.show)},pe)}),prefixCls:D,suffix:te&&c.createElement("span",{className:`${D}-textarea-suffix`},$e),showCount:be,ref:Z,onResize:kt,onMouseDown:gt}))))})},23826:function(un,We,m){"use strict";m.d(We,{Z:function(){return ee}});var c=m(59301);function ee($,ie){const F=(0,c.useRef)([]),g=()=>{F.current.push(setTimeout(()=>{var J,X,o,x;!((J=$.current)===null||J===void 0)&&J.input&&((X=$.current)===null||X===void 0?void 0:X.input.getAttribute("type"))==="password"&&(!((o=$.current)===null||o===void 0)&&o.input.hasAttribute("value"))&&((x=$.current)===null||x===void 0||x.input.removeAttribute("value"))}))};return(0,c.useEffect)(()=>(ie&&g(),()=>F.current.forEach(J=>{J&&clearTimeout(J)})),[]),g}},37568:function(un,We,m){"use strict";m.d(We,{default:function(){return Nt}});var c=m(59301),ee=m(92310),$=m.n(ee),ie=m(48755),F=m(56553),g=m(53075),X=Xe=>{const{getPrefixCls:Ge,direction:Ne}=(0,c.useContext)(ie.E_),{prefixCls:Ie,className:te}=Xe,$e=Ge("input-group",Ie),Ae=Ge("input"),[Z,D,he]=(0,g.ZP)(Ae),_e=$()($e,he,{[`${$e}-lg`]:Xe.size==="large",[`${$e}-sm`]:Xe.size==="small",[`${$e}-compact`]:Xe.compact,[`${$e}-rtl`]:Ne==="rtl"},D,te),pe=(0,c.useContext)(F.aM),Ee=(0,c.useMemo)(()=>Object.assign(Object.assign({},pe),{isFormItemInput:!1}),[pe]);return Z(c.createElement("span",{className:_e,style:Xe.style,onMouseEnter:Xe.onMouseEnter,onMouseLeave:Xe.onMouseLeave,onFocus:Xe.onFocus,onBlur:Xe.onBlur},c.createElement(F.aM.Provider,{value:Ee},Xe.children)))},o=m(49397),x=m(77654),L=m(6089),b=m(26112),S=m(82855),T=m(31756),B=m(16931),z=m(51636),j=m(64910);const U=Xe=>{const{componentCls:Ge,paddingXS:Ne}=Xe;return{[Ge]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:Ne,"&-rtl":{direction:"rtl"},[`${Ge}-input`]:{textAlign:"center",paddingInline:Xe.paddingXXS},[`&${Ge}-sm ${Ge}-input`]:{paddingInline:Xe.calc(Xe.paddingXXS).div(2).equal()},[`&${Ge}-lg ${Ge}-input`]:{paddingInline:Xe.paddingXS}}}};var A=(0,B.I$)(["Input","OTP"],Xe=>{const Ge=(0,z.mergeToken)(Xe,(0,j.e)(Xe));return[U(Ge)]},j.T),K=m(16089),I=function(Xe,Ge){var Ne={};for(var Ie in Xe)Object.prototype.hasOwnProperty.call(Xe,Ie)&&Ge.indexOf(Ie)<0&&(Ne[Ie]=Xe[Ie]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var te=0,Ie=Object.getOwnPropertySymbols(Xe);te<Ie.length;te++)Ge.indexOf(Ie[te])<0&&Object.prototype.propertyIsEnumerable.call(Xe,Ie[te])&&(Ne[Ie[te]]=Xe[Ie[te]]);return Ne},le=c.forwardRef((Xe,Ge)=>{const{value:Ne,onChange:Ie,onActiveChange:te,index:$e,mask:Ae}=Xe,Z=I(Xe,["value","onChange","onActiveChange","index","mask"]),D=Ne&&typeof Ae=="string"?Ae:Ne,he=Ze=>{Ie($e,Ze.target.value)},_e=c.useRef(null);c.useImperativeHandle(Ge,()=>_e.current);const pe=()=>{(0,K.Z)(()=>{var Ze;const re=(Ze=_e.current)===null||Ze===void 0?void 0:Ze.input;document.activeElement===re&&re&&re.select()})},Ee=Ze=>{const{key:re,ctrlKey:fe,metaKey:st}=Ze;re==="ArrowLeft"?te($e-1):re==="ArrowRight"?te($e+1):re==="z"&&(fe||st)&&Ze.preventDefault(),pe()},Oe=Ze=>{Ze.key==="Backspace"&&!Ne&&te($e-1),pe()};return c.createElement(o.Z,Object.assign({type:Ae===!0?"password":"text"},Z,{ref:_e,value:D,onInput:he,onFocus:pe,onKeyDown:Ee,onKeyUp:Oe,onMouseDown:pe,onMouseUp:pe}))}),me=function(Xe,Ge){var Ne={};for(var Ie in Xe)Object.prototype.hasOwnProperty.call(Xe,Ie)&&Ge.indexOf(Ie)<0&&(Ne[Ie]=Xe[Ie]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var te=0,Ie=Object.getOwnPropertySymbols(Xe);te<Ie.length;te++)Ge.indexOf(Ie[te])<0&&Object.prototype.propertyIsEnumerable.call(Xe,Ie[te])&&(Ne[Ie[te]]=Xe[Ie[te]]);return Ne};function ce(Xe){return(Xe||"").split("")}const De=Xe=>{const{index:Ge,prefixCls:Ne,separator:Ie}=Xe,te=typeof Ie=="function"?Ie(Ge):Ie;return te?c.createElement("span",{className:`${Ne}-separator`},te):null};var Ce=c.forwardRef((Xe,Ge)=>{const{prefixCls:Ne,length:Ie=6,size:te,defaultValue:$e,value:Ae,onChange:Z,formatter:D,separator:he,variant:_e,disabled:pe,status:Ee,autoFocus:Oe,mask:Ze,type:re,onInput:fe,inputMode:st}=Xe,tt=me(Xe,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:ct,direction:ut}=c.useContext(ie.E_),Ue=ct("otp",Ne),xt=(0,b.Z)(tt,{aria:!0,data:!0,attr:!0}),[dt,gt,kt]=A(Ue),w=(0,T.Z)(Mt=>te!=null?te:Mt),O=c.useContext(F.aM),qe=(0,S.F)(O.status,Ee),oe=c.useMemo(()=>Object.assign(Object.assign({},O),{status:qe,hasFeedback:!1,feedbackIcon:null}),[O,qe]),xe=c.useRef(null),jt=c.useRef({});c.useImperativeHandle(Ge,()=>({focus:()=>{var Mt;(Mt=jt.current[0])===null||Mt===void 0||Mt.focus()},blur:()=>{var Mt;for(let Be=0;Be<Ie;Be+=1)(Mt=jt.current[Be])===null||Mt===void 0||Mt.blur()},nativeElement:xe.current}));const Qe=Mt=>D?D(Mt):Mt,[at,bt]=c.useState(()=>ce(Qe($e||"")));c.useEffect(()=>{Ae!==void 0&&bt(ce(Ae))},[Ae]);const ge=(0,L.Z)(Mt=>{bt(Mt),fe&&fe(Mt),Z&&Mt.length===Ie&&Mt.every(Be=>Be)&&Mt.some((Be,Gt)=>at[Gt]!==Be)&&Z(Mt.join(""))}),ye=(0,L.Z)((Mt,Be)=>{let Gt=(0,x.Z)(at);for(let En=0;En<Mt;En+=1)Gt[En]||(Gt[En]="");Be.length<=1?Gt[Mt]=Be:Gt=Gt.slice(0,Mt).concat(ce(Be)),Gt=Gt.slice(0,Ie);for(let En=Gt.length-1;En>=0&&!Gt[En];En-=1)Gt.pop();const pn=Qe(Gt.map(En=>En||" ").join(""));return Gt=ce(pn).map((En,sr)=>En===" "&&!Gt[sr]?Gt[sr]:En),Gt}),Fe=(Mt,Be)=>{var Gt;const pn=ye(Mt,Be),En=Math.min(Mt+Be.length,Ie-1);En!==Mt&&pn[Mt]!==void 0&&((Gt=jt.current[En])===null||Gt===void 0||Gt.focus()),ge(pn)},ze=Mt=>{var Be;(Be=jt.current[Mt])===null||Be===void 0||Be.focus()},q={variant:_e,disabled:pe,status:qe,mask:Ze,type:re,inputMode:st};return dt(c.createElement("div",Object.assign({},xt,{ref:xe,className:$()(Ue,{[`${Ue}-sm`]:w==="small",[`${Ue}-lg`]:w==="large",[`${Ue}-rtl`]:ut==="rtl"},kt,gt)}),c.createElement(F.aM.Provider,{value:oe},Array.from({length:Ie}).map((Mt,Be)=>{const Gt=`otp-${Be}`,pn=at[Be]||"";return c.createElement(c.Fragment,{key:Gt},c.createElement(le,Object.assign({ref:En=>{jt.current[Be]=En},index:Be,size:w,htmlSize:1,className:`${Ue}-input`,onChange:Fe,value:pn,onActiveChange:ze,autoFocus:Be===0&&Oe},q)),Be<Ie-1&&c.createElement(De,{separator:he,index:Be,prefixCls:Ue}))}))))}),He=m(73331),ue=m(15277),W=m(2738),P=m(8654),de=m(2171),ae=m(23826),Q=function(Xe,Ge){var Ne={};for(var Ie in Xe)Object.prototype.hasOwnProperty.call(Xe,Ie)&&Ge.indexOf(Ie)<0&&(Ne[Ie]=Xe[Ie]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var te=0,Ie=Object.getOwnPropertySymbols(Xe);te<Ie.length;te++)Ge.indexOf(Ie[te])<0&&Object.prototype.propertyIsEnumerable.call(Xe,Ie[te])&&(Ne[Ie[te]]=Xe[Ie[te]]);return Ne};const E=Xe=>Xe?c.createElement(ue.Z,null):c.createElement(He.Z,null),C={click:"onClick",hover:"onMouseOver"};var be=c.forwardRef((Xe,Ge)=>{const{disabled:Ne,action:Ie="click",visibilityToggle:te=!0,iconRender:$e=E}=Xe,Ae=c.useContext(de.Z),Z=Ne!=null?Ne:Ae,D=typeof te=="object"&&te.visible!==void 0,[he,_e]=(0,c.useState)(()=>D?te.visible:!1),pe=(0,c.useRef)(null);c.useEffect(()=>{D&&_e(te.visible)},[D,te]);const Ee=(0,ae.Z)(pe),Oe=()=>{var w;if(Z)return;he&&Ee();const O=!he;_e(O),typeof te=="object"&&((w=te.onVisibleChange)===null||w===void 0||w.call(te,O))},Ze=w=>{const O=C[Ie]||"",qe=$e(he),oe={[O]:Oe,className:`${w}-icon`,key:"passwordIcon",onMouseDown:xe=>{xe.preventDefault()},onMouseUp:xe=>{xe.preventDefault()}};return c.cloneElement(c.isValidElement(qe)?qe:c.createElement("span",null,qe),oe)},{className:re,prefixCls:fe,inputPrefixCls:st,size:tt}=Xe,ct=Q(Xe,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:ut}=c.useContext(ie.E_),Ue=ut("input",st),xt=ut("input-password",fe),dt=te&&Ze(xt),gt=$()(xt,re,{[`${xt}-${tt}`]:!!tt}),kt=Object.assign(Object.assign({},(0,W.Z)(ct,["suffix","iconRender","visibilityToggle"])),{type:he?"text":"password",className:gt,prefixCls:Ue,suffix:dt});return tt&&(kt.size=tt),c.createElement(o.Z,Object.assign({ref:(0,P.sQ)(Ge,pe)},kt))}),je=m(47472),lt=m(22703),ke=m(7939),Ye=m(70045),et=function(Xe,Ge){var Ne={};for(var Ie in Xe)Object.prototype.hasOwnProperty.call(Xe,Ie)&&Ge.indexOf(Ie)<0&&(Ne[Ie]=Xe[Ie]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var te=0,Ie=Object.getOwnPropertySymbols(Xe);te<Ie.length;te++)Ge.indexOf(Ie[te])<0&&Object.prototype.propertyIsEnumerable.call(Xe,Ie[te])&&(Ne[Ie[te]]=Xe[Ie[te]]);return Ne},Re=c.forwardRef((Xe,Ge)=>{const{prefixCls:Ne,inputPrefixCls:Ie,className:te,size:$e,suffix:Ae,enterButton:Z=!1,addonAfter:D,loading:he,disabled:_e,onSearch:pe,onChange:Ee,onCompositionStart:Oe,onCompositionEnd:Ze}=Xe,re=et(Xe,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:fe,direction:st}=c.useContext(ie.E_),tt=c.useRef(!1),ct=fe("input-search",Ne),ut=fe("input",Ie),{compactSize:Ue}=(0,Ye.ri)(ct,st),xt=(0,T.Z)(Fe=>{var ze;return(ze=$e!=null?$e:Ue)!==null&&ze!==void 0?ze:Fe}),dt=c.useRef(null),gt=Fe=>{Fe!=null&&Fe.target&&Fe.type==="click"&&pe&&pe(Fe.target.value,Fe,{source:"clear"}),Ee==null||Ee(Fe)},kt=Fe=>{var ze;document.activeElement===((ze=dt.current)===null||ze===void 0?void 0:ze.input)&&Fe.preventDefault()},w=Fe=>{var ze,q;pe&&pe((q=(ze=dt.current)===null||ze===void 0?void 0:ze.input)===null||q===void 0?void 0:q.value,Fe,{source:"input"})},O=Fe=>{tt.current||he||w(Fe)},qe=typeof Z=="boolean"?c.createElement(je.Z,null):null,oe=`${ct}-button`;let xe;const jt=Z||{},Qe=jt.type&&jt.type.__ANT_BUTTON===!0;Qe||jt.type==="button"?xe=(0,lt.Tm)(jt,Object.assign({onMouseDown:kt,onClick:Fe=>{var ze,q;(q=(ze=jt==null?void 0:jt.props)===null||ze===void 0?void 0:ze.onClick)===null||q===void 0||q.call(ze,Fe),w(Fe)},key:"enterButton"},Qe?{className:oe,size:xt}:{})):xe=c.createElement(ke.ZP,{className:oe,type:Z?"primary":void 0,size:xt,disabled:_e,key:"enterButton",onMouseDown:kt,onClick:w,loading:he,icon:qe},Z),D&&(xe=[xe,(0,lt.Tm)(D,{key:"addonAfter"})]);const at=$()(ct,{[`${ct}-rtl`]:st==="rtl",[`${ct}-${xt}`]:!!xt,[`${ct}-with-button`]:!!Z},te),bt=Object.assign(Object.assign({},re),{className:at,prefixCls:ut,type:"search"}),ge=Fe=>{tt.current=!0,Oe==null||Oe(Fe)},ye=Fe=>{tt.current=!1,Ze==null||Ze(Fe)};return c.createElement(o.Z,Object.assign({ref:(0,P.sQ)(dt,Ge),onPressEnter:O},bt,{size:xt,onCompositionStart:ge,onCompositionEnd:ye,addonAfter:xe,suffix:Ae,onChange:gt,disabled:_e}))}),At=m(79809);const rt=o.Z;rt.Group=X,rt.Search=Re,rt.TextArea=At.Z,rt.Password=be,rt.OTP=Ce;var Nt=rt},53075:function(un,We,m){"use strict";m.d(We,{TI:function(){return K},ik:function(){return b},nz:function(){return X},s7:function(){return S},x0:function(){return L}});var c=m(36237),ee=m(63356),$=m(56119),ie=m(16931),F=m(51636),g=m(64910),J=m(39082);const X=I=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:I,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),o=I=>({borderColor:I.activeBorderColor,boxShadow:I.activeShadow,outline:0,backgroundColor:I.activeBg}),x=I=>{const{paddingBlockLG:M,lineHeightLG:le,borderRadiusLG:me,paddingInlineLG:ce}=I;return{padding:`${(0,c.unit)(M)} ${(0,c.unit)(ce)}`,fontSize:I.inputFontSizeLG,lineHeight:le,borderRadius:me}},L=I=>({padding:`${(0,c.unit)(I.paddingBlockSM)} ${(0,c.unit)(I.paddingInlineSM)}`,fontSize:I.inputFontSizeSM,borderRadius:I.borderRadiusSM}),b=I=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,c.unit)(I.paddingBlock)} ${(0,c.unit)(I.paddingInline)}`,color:I.colorText,fontSize:I.inputFontSize,lineHeight:I.lineHeight,borderRadius:I.borderRadius,transition:`all ${I.motionDurationMid}`},X(I.colorTextPlaceholder)),{"&-lg":Object.assign({},x(I)),"&-sm":Object.assign({},L(I)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),S=I=>{const{componentCls:M,antCls:le}=I;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:I.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${M}, &-lg > ${M}-group-addon`]:Object.assign({},x(I)),[`&-sm ${M}, &-sm > ${M}-group-addon`]:Object.assign({},L(I)),[`&-lg ${le}-select-single ${le}-select-selector`]:{height:I.controlHeightLG},[`&-sm ${le}-select-single ${le}-select-selector`]:{height:I.controlHeightSM},[`> ${M}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${M}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${(0,c.unit)(I.paddingInline)}`,color:I.colorText,fontWeight:"normal",fontSize:I.inputFontSize,textAlign:"center",borderRadius:I.borderRadius,transition:`all ${I.motionDurationSlow}`,lineHeight:1,[`${le}-select`]:{margin:`${(0,c.unit)(I.calc(I.paddingBlock).add(1).mul(-1).equal())} ${(0,c.unit)(I.calc(I.paddingInline).mul(-1).equal())}`,[`&${le}-select-single:not(${le}-select-customize-input):not(${le}-pagination-size-changer)`]:{[`${le}-select-selector`]:{backgroundColor:"inherit",border:`${(0,c.unit)(I.lineWidth)} ${I.lineType} transparent`,boxShadow:"none"}}},[`${le}-cascader-picker`]:{margin:`-9px ${(0,c.unit)(I.calc(I.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${le}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[M]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${M}-search-with-button &`]:{zIndex:0}}},[`> ${M}:first-child, ${M}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${le}-select ${le}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${M}-affix-wrapper`]:{[`&:not(:first-child) ${M}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${M}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${M}:last-child, ${M}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${le}-select ${le}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${M}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${M}-search &`]:{borderStartStartRadius:I.borderRadius,borderEndStartRadius:I.borderRadius}},[`&:not(:first-child), ${M}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${M}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,ee.dF)()),{[`${M}-group-addon, ${M}-group-wrap, > ${M}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:I.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${M}-affix-wrapper,
& > ${M}-number-affix-wrapper,
& > ${le}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:I.calc(I.lineWidth).mul(-1).equal(),borderInlineEndWidth:I.lineWidth},[M]:{float:"none"},[`& > ${le}-select > ${le}-select-selector,
& > ${le}-select-auto-complete ${M},
& > ${le}-cascader-picker ${M},
& > ${M}-group-wrapper ${M}`]:{borderInlineEndWidth:I.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${le}-select-focused`]:{zIndex:1},[`& > ${le}-select > ${le}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${le}-select:first-child > ${le}-select-selector,
& > ${le}-select-auto-complete:first-child ${M},
& > ${le}-cascader-picker:first-child ${M}`]:{borderStartStartRadius:I.borderRadius,borderEndStartRadius:I.borderRadius},[`& > *:last-child,
& > ${le}-select:last-child > ${le}-select-selector,
& > ${le}-cascader-picker:last-child ${M},
& > ${le}-cascader-picker-focused:last-child ${M}`]:{borderInlineEndWidth:I.lineWidth,borderStartEndRadius:I.borderRadius,borderEndEndRadius:I.borderRadius},[`& > ${le}-select-auto-complete ${M}`]:{verticalAlign:"top"},[`${M}-group-wrapper + ${M}-group-wrapper`]:{marginInlineStart:I.calc(I.lineWidth).mul(-1).equal(),[`${M}-affix-wrapper`]:{borderRadius:0}},[`${M}-group-wrapper:not(:last-child)`]:{[`&${M}-search > ${M}-group`]:{[`& > ${M}-group-addon > ${M}-search-button`]:{borderRadius:0},[`& > ${M}`]:{borderStartStartRadius:I.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:I.borderRadius}}}})}},T=I=>{const{componentCls:M,controlHeightSM:le,lineWidth:me,calc:ce}=I,Pe=ce(le).sub(ce(me).mul(2)).sub(16).div(2).equal();return{[M]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ee.Wf)(I)),b(I)),(0,J.qG)(I)),(0,J.H8)(I)),(0,J.Mu)(I)),(0,J.vc)(I)),{'&[type="color"]':{height:I.controlHeight,[`&${M}-lg`]:{height:I.controlHeightLG},[`&${M}-sm`]:{height:le,paddingTop:Pe,paddingBottom:Pe}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},B=I=>{const{componentCls:M}=I;return{[`${M}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:I.colorTextQuaternary,fontSize:I.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${I.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:I.colorTextTertiary},"&:active":{color:I.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,c.unit)(I.inputAffixPadding)}`}}}},z=I=>{const{componentCls:M,inputAffixPadding:le,colorTextDescription:me,motionDurationSlow:ce,colorIcon:De,colorIconHover:Pe,iconCls:Ce}=I,He=`${M}-affix-wrapper`,ue=`${M}-affix-wrapper-disabled`;return{[He]:Object.assign(Object.assign(Object.assign(Object.assign({},b(I)),{display:"inline-flex",[`&:not(${M}-disabled):hover`]:{zIndex:1,[`${M}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${M}`]:{padding:0},[`> input${M}, > textarea${M}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[M]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:I.paddingXS}},"&-show-count-suffix":{color:me},"&-show-count-has-suffix":{marginInlineEnd:I.paddingXXS},"&-prefix":{marginInlineEnd:le},"&-suffix":{marginInlineStart:le}}}),B(I)),{[`${Ce}${M}-password-icon`]:{color:De,cursor:"pointer",transition:`all ${ce}`,"&:hover":{color:Pe}}}),[`${M}-underlined`]:{borderRadius:0},[ue]:{[`${Ce}${M}-password-icon`]:{color:De,cursor:"not-allowed","&:hover":{color:De}}}}},j=I=>{const{componentCls:M,borderRadiusLG:le,borderRadiusSM:me}=I;return{[`${M}-group`]:Object.assign(Object.assign(Object.assign({},(0,ee.Wf)(I)),S(I)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${M}-group-addon`]:{borderRadius:le,fontSize:I.inputFontSizeLG}},"&-sm":{[`${M}-group-addon`]:{borderRadius:me}}},(0,J.ir)(I)),(0,J.S5)(I)),{[`&:not(${M}-compact-first-item):not(${M}-compact-last-item)${M}-compact-item`]:{[`${M}, ${M}-group-addon`]:{borderRadius:0}},[`&:not(${M}-compact-last-item)${M}-compact-first-item`]:{[`${M}, ${M}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${M}-compact-first-item)${M}-compact-last-item`]:{[`${M}, ${M}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${M}-compact-last-item)${M}-compact-item`]:{[`${M}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${M}-compact-first-item)${M}-compact-item`]:{[`${M}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},U=I=>{const{componentCls:M,antCls:le}=I,me=`${M}-search`;return{[me]:{[M]:{"&:hover, &:focus":{[`+ ${M}-group-addon ${me}-button:not(${le}-btn-primary)`]:{borderInlineStartColor:I.colorPrimaryHover}}},[`${M}-affix-wrapper`]:{height:I.controlHeight,borderRadius:0},[`${M}-lg`]:{lineHeight:I.calc(I.lineHeightLG).sub(2e-4).equal()},[`> ${M}-group`]:{[`> ${M}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${me}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${me}-button:not(${le}-btn-primary)`]:{color:I.colorTextDescription,"&:hover":{color:I.colorPrimaryHover},"&:active":{color:I.colorPrimaryActive},[`&${le}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${me}-button`]:{height:I.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${M}-affix-wrapper, ${me}-button`]:{height:I.controlHeightLG}},"&-small":{[`${M}-affix-wrapper, ${me}-button`]:{height:I.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${M}-compact-item`]:{[`&:not(${M}-compact-last-item)`]:{[`${M}-group-addon`]:{[`${M}-search-button`]:{marginInlineEnd:I.calc(I.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${M}-compact-first-item)`]:{[`${M},${M}-affix-wrapper`]:{borderRadius:0}},[`> ${M}-group-addon ${M}-search-button,
> ${M},
${M}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${M}-affix-wrapper-focused`]:{zIndex:2}}}}},A=I=>{const{componentCls:M}=I;return{[`${M}-out-of-range`]:{[`&, & input, & textarea, ${M}-show-count-suffix, ${M}-data-count`]:{color:I.colorError}}}},K=(0,ie.I$)(["Input","Shared"],I=>{const M=(0,F.mergeToken)(I,(0,g.e)(I));return[T(M),z(M)]},g.T,{resetFont:!1});We.ZP=(0,ie.I$)(["Input","Component"],I=>{const M=(0,F.mergeToken)(I,(0,g.e)(I));return[j(M),U(M),A(M),(0,$.c)(M)]},g.T,{resetFont:!1})},64910:function(un,We,m){"use strict";m.d(We,{T:function(){return $},e:function(){return ee}});var c=m(51636);function ee(ie){return(0,c.mergeToken)(ie,{inputAffixPadding:ie.paddingXXS})}const $=ie=>{const{controlHeight:F,fontSize:g,lineHeight:J,lineWidth:X,controlHeightSM:o,controlHeightLG:x,fontSizeLG:L,lineHeightLG:b,paddingSM:S,controlPaddingHorizontalSM:T,controlPaddingHorizontal:B,colorFillAlter:z,colorPrimaryHover:j,colorPrimary:U,controlOutlineWidth:A,controlOutline:K,colorErrorOutline:I,colorWarningOutline:M,colorBgContainer:le,inputFontSize:me,inputFontSizeLG:ce,inputFontSizeSM:De}=ie,Pe=me||g,Ce=De||Pe,He=ce||L,ue=Math.round((F-Pe*J)/2*10)/10-X,W=Math.round((o-Ce*J)/2*10)/10-X,P=Math.ceil((x-He*b)/2*10)/10-X;return{paddingBlock:Math.max(ue,0),paddingBlockSM:Math.max(W,0),paddingBlockLG:Math.max(P,0),paddingInline:S-X,paddingInlineSM:T-X,paddingInlineLG:B-X,addonBg:z,activeBorderColor:U,hoverBorderColor:j,activeShadow:`0 0 0 ${A}px ${K}`,errorActiveShadow:`0 0 0 ${A}px ${I}`,warningActiveShadow:`0 0 0 ${A}px ${M}`,hoverBg:le,activeBg:le,inputFontSize:Pe,inputFontSizeLG:He,inputFontSizeSM:Ce}}},39082:function(un,We,m){"use strict";m.d(We,{$U:function(){return F},H8:function(){return S},Mu:function(){return x},S5:function(){return B},Xy:function(){return ie},ir:function(){return o},qG:function(){return J},vc:function(){return U}});var c=m(36237),ee=m(51636);const $=A=>({borderColor:A.hoverBorderColor,backgroundColor:A.hoverBg}),ie=A=>({color:A.colorTextDisabled,backgroundColor:A.colorBgContainerDisabled,borderColor:A.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},$((0,ee.mergeToken)(A,{hoverBorderColor:A.colorBorder,hoverBg:A.colorBgContainerDisabled})))}),F=(A,K)=>({background:A.colorBgContainer,borderWidth:A.lineWidth,borderStyle:A.lineType,borderColor:K.borderColor,"&:hover":{borderColor:K.hoverBorderColor,backgroundColor:A.hoverBg},"&:focus, &:focus-within":{borderColor:K.activeBorderColor,boxShadow:K.activeShadow,outline:0,backgroundColor:A.activeBg}}),g=(A,K)=>({[`&${A.componentCls}-status-${K.status}:not(${A.componentCls}-disabled)`]:Object.assign(Object.assign({},F(A,K)),{[`${A.componentCls}-prefix, ${A.componentCls}-suffix`]:{color:K.affixColor}}),[`&${A.componentCls}-status-${K.status}${A.componentCls}-disabled`]:{borderColor:K.borderColor}}),J=(A,K)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},F(A,{borderColor:A.colorBorder,hoverBorderColor:A.hoverBorderColor,activeBorderColor:A.activeBorderColor,activeShadow:A.activeShadow})),{[`&${A.componentCls}-disabled, &[disabled]`]:Object.assign({},ie(A))}),g(A,{status:"error",borderColor:A.colorError,hoverBorderColor:A.colorErrorBorderHover,activeBorderColor:A.colorError,activeShadow:A.errorActiveShadow,affixColor:A.colorError})),g(A,{status:"warning",borderColor:A.colorWarning,hoverBorderColor:A.colorWarningBorderHover,activeBorderColor:A.colorWarning,activeShadow:A.warningActiveShadow,affixColor:A.colorWarning})),K)}),X=(A,K)=>({[`&${A.componentCls}-group-wrapper-status-${K.status}`]:{[`${A.componentCls}-group-addon`]:{borderColor:K.addonBorderColor,color:K.addonColor}}}),o=A=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${A.componentCls}-group`]:{"&-addon":{background:A.addonBg,border:`${(0,c.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},X(A,{status:"error",addonBorderColor:A.colorError,addonColor:A.colorErrorText})),X(A,{status:"warning",addonBorderColor:A.colorWarning,addonColor:A.colorWarningText})),{[`&${A.componentCls}-group-wrapper-disabled`]:{[`${A.componentCls}-group-addon`]:Object.assign({},ie(A))}})}),x=(A,K)=>{const{componentCls:I}=A;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${I}-disabled, &[disabled]`]:{color:A.colorTextDisabled,cursor:"not-allowed"},[`&${I}-status-error`]:{"&, & input, & textarea":{color:A.colorError}},[`&${I}-status-warning`]:{"&, & input, & textarea":{color:A.colorWarning}}},K)}},L=(A,K)=>{var I;return{background:K.bg,borderWidth:A.lineWidth,borderStyle:A.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(I=K==null?void 0:K.inputColor)!==null&&I!==void 0?I:"unset"},"&:hover":{background:K.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:K.activeBorderColor,backgroundColor:A.activeBg}}},b=(A,K)=>({[`&${A.componentCls}-status-${K.status}:not(${A.componentCls}-disabled)`]:Object.assign(Object.assign({},L(A,K)),{[`${A.componentCls}-prefix, ${A.componentCls}-suffix`]:{color:K.affixColor}})}),S=(A,K)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},L(A,{bg:A.colorFillTertiary,hoverBg:A.colorFillSecondary,activeBorderColor:A.activeBorderColor})),{[`&${A.componentCls}-disabled, &[disabled]`]:Object.assign({},ie(A))}),b(A,{status:"error",bg:A.colorErrorBg,hoverBg:A.colorErrorBgHover,activeBorderColor:A.colorError,inputColor:A.colorErrorText,affixColor:A.colorError})),b(A,{status:"warning",bg:A.colorWarningBg,hoverBg:A.colorWarningBgHover,activeBorderColor:A.colorWarning,inputColor:A.colorWarningText,affixColor:A.colorWarning})),K)}),T=(A,K)=>({[`&${A.componentCls}-group-wrapper-status-${K.status}`]:{[`${A.componentCls}-group-addon`]:{background:K.addonBg,color:K.addonColor}}}),B=A=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${A.componentCls}-group`]:{"&-addon":{background:A.colorFillTertiary},[`${A.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${(0,c.unit)(A.lineWidth)} ${A.lineType} ${A.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(A.lineWidth)} ${A.lineType} ${A.colorSplit}`}}}},T(A,{status:"error",addonBg:A.colorErrorBg,addonColor:A.colorErrorText})),T(A,{status:"warning",addonBg:A.colorWarningBg,addonColor:A.colorWarningText})),{[`&${A.componentCls}-group-wrapper-disabled`]:{[`${A.componentCls}-group`]:{"&-addon":{background:A.colorFillTertiary,color:A.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${(0,c.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderTop:`${(0,c.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderBottom:`${(0,c.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,c.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderTop:`${(0,c.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderBottom:`${(0,c.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`}}}})}),z=(A,K)=>({background:A.colorBgContainer,borderWidth:`${(0,c.unit)(A.lineWidth)} 0`,borderStyle:`${A.lineType} none`,borderColor:`transparent transparent ${K.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${K.borderColor} transparent`,backgroundColor:A.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${K.borderColor} transparent`,outline:0,backgroundColor:A.activeBg}}),j=(A,K)=>({[`&${A.componentCls}-status-${K.status}:not(${A.componentCls}-disabled)`]:Object.assign(Object.assign({},z(A,K)),{[`${A.componentCls}-prefix, ${A.componentCls}-suffix`]:{color:K.affixColor}}),[`&${A.componentCls}-status-${K.status}${A.componentCls}-disabled`]:{borderColor:`transparent transparent ${K.borderColor} transparent`}}),U=(A,K)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},z(A,{borderColor:A.colorBorder,hoverBorderColor:A.hoverBorderColor,activeBorderColor:A.activeBorderColor,activeShadow:A.activeShadow})),{[`&${A.componentCls}-disabled, &[disabled]`]:{color:A.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${A.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),j(A,{status:"error",borderColor:A.colorError,hoverBorderColor:A.colorErrorBorderHover,activeBorderColor:A.colorError,activeShadow:A.errorActiveShadow,affixColor:A.colorError})),j(A,{status:"warning",borderColor:A.colorWarning,hoverBorderColor:A.colorWarningBorderHover,activeBorderColor:A.colorWarning,activeShadow:A.warningActiveShadow,affixColor:A.colorWarning})),K)})},24303:function(un,We,m){"use strict";m.d(We,{D:function(){return me},Z:function(){return Pe}});var c=m(59301),ee=m(60499),$={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},ie=$,F=m(7657),g=function(He,ue){return c.createElement(F.Z,(0,ee.Z)({},He,{ref:ue,icon:ie}))},J=c.forwardRef(g),X=J,o=m(33853),x=m(38819),L=m(92310),b=m.n(L),S=m(2738),T=m(48755),B=m(6989),z=m(36237),j=m(48923),U=m(16931);const A=Ce=>{const{componentCls:He,siderBg:ue,motionDurationMid:W,motionDurationSlow:P,antCls:de,triggerHeight:ae,triggerColor:Q,triggerBg:E,headerHeight:C,zeroTriggerWidth:Y,zeroTriggerHeight:be,borderRadiusLG:je,lightSiderBg:lt,lightTriggerColor:ke,lightTriggerBg:Ye,bodyBg:et}=Ce;return{[He]:{position:"relative",minWidth:0,background:ue,transition:`all ${W}, background 0s`,"&-has-trigger":{paddingBottom:ae},"&-right":{order:1},[`${He}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${de}-menu${de}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${He}-children`]:{overflow:"hidden"},[`${He}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:ae,color:Q,lineHeight:(0,z.unit)(ae),textAlign:"center",background:E,cursor:"pointer",transition:`all ${W}`},[`${He}-zero-width-trigger`]:{position:"absolute",top:C,insetInlineEnd:Ce.calc(Y).mul(-1).equal(),zIndex:1,width:Y,height:be,color:Q,fontSize:Ce.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:ue,borderRadius:`0 ${(0,z.unit)(je)} ${(0,z.unit)(je)} 0`,cursor:"pointer",transition:`background ${P} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${P}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:Ce.calc(Y).mul(-1).equal(),borderRadius:`${(0,z.unit)(je)} 0 0 ${(0,z.unit)(je)}`}},"&-light":{background:lt,[`${He}-trigger`]:{color:ke,background:Ye},[`${He}-zero-width-trigger`]:{color:ke,background:Ye,border:`1px solid ${et}`,borderInlineStart:0}}}}};var K=(0,U.I$)(["Layout","Sider"],Ce=>[A(Ce)],j.eh,{deprecatedTokens:j.jn}),I=function(Ce,He){var ue={};for(var W in Ce)Object.prototype.hasOwnProperty.call(Ce,W)&&He.indexOf(W)<0&&(ue[W]=Ce[W]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var P=0,W=Object.getOwnPropertySymbols(Ce);P<W.length;P++)He.indexOf(W[P])<0&&Object.prototype.propertyIsEnumerable.call(Ce,W[P])&&(ue[W[P]]=Ce[W[P]]);return ue};const M={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},le=Ce=>!Number.isNaN(Number.parseFloat(Ce))&&isFinite(Ce),me=c.createContext({}),ce=(()=>{let Ce=0;return function(){let He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ce+=1,`${He}${Ce}`}})();var Pe=c.forwardRef((Ce,He)=>{const{prefixCls:ue,className:W,trigger:P,children:de,defaultCollapsed:ae=!1,theme:Q="dark",style:E={},collapsible:C=!1,reverseArrow:Y=!1,width:be=200,collapsedWidth:je=80,zeroWidthTriggerStyle:lt,breakpoint:ke,onCollapse:Ye,onBreakpoint:et}=Ce,_t=I(Ce,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Re}=(0,c.useContext)(B.V),[At,rt]=(0,c.useState)("collapsed"in Ce?Ce.collapsed:ae),[Nt,Xe]=(0,c.useState)(!1);(0,c.useEffect)(()=>{"collapsed"in Ce&&rt(Ce.collapsed)},[Ce.collapsed]);const Ge=(xt,dt)=>{"collapsed"in Ce||rt(xt),Ye==null||Ye(xt,dt)},{getPrefixCls:Ne,direction:Ie}=(0,c.useContext)(T.E_),te=Ne("layout-sider",ue),[$e,Ae,Z]=K(te),D=(0,c.useRef)(null);D.current=xt=>{Xe(xt.matches),et==null||et(xt.matches),At!==xt.matches&&Ge(xt.matches,"responsive")},(0,c.useEffect)(()=>{function xt(gt){return D.current(gt)}let dt;if(typeof window!="undefined"){const{matchMedia:gt}=window;if(gt&&ke&&ke in M){dt=gt(`screen and (max-width: ${M[ke]})`);try{dt.addEventListener("change",xt)}catch(kt){dt.addListener(xt)}xt(dt)}}return()=>{try{dt==null||dt.removeEventListener("change",xt)}catch(gt){dt==null||dt.removeListener(xt)}}},[ke]),(0,c.useEffect)(()=>{const xt=ce("ant-sider-");return Re.addSider(xt),()=>Re.removeSider(xt)},[]);const he=()=>{Ge(!At,"clickTrigger")},_e=(0,S.Z)(_t,["collapsed"]),pe=At?je:be,Ee=le(pe)?`${pe}px`:String(pe),Oe=parseFloat(String(je||0))===0?c.createElement("span",{onClick:he,className:b()(`${te}-zero-width-trigger`,`${te}-zero-width-trigger-${Y?"right":"left"}`),style:lt},P||c.createElement(X,null)):null,Ze=Ie==="rtl"==!Y,st={expanded:Ze?c.createElement(x.Z,null):c.createElement(o.Z,null),collapsed:Ze?c.createElement(o.Z,null):c.createElement(x.Z,null)}[At?"collapsed":"expanded"],tt=P!==null?Oe||c.createElement("div",{className:`${te}-trigger`,onClick:he,style:{width:Ee}},P||st):null,ct=Object.assign(Object.assign({},E),{flex:`0 0 ${Ee}`,maxWidth:Ee,minWidth:Ee,width:Ee}),ut=b()(te,`${te}-${Q}`,{[`${te}-collapsed`]:!!At,[`${te}-has-trigger`]:C&&P!==null&&!Oe,[`${te}-below`]:!!Nt,[`${te}-zero-width`]:parseFloat(Ee)===0},W,Ae,Z),Ue=c.useMemo(()=>({siderCollapsed:At}),[At]);return $e(c.createElement(me.Provider,{value:Ue},c.createElement("aside",Object.assign({className:ut},_e,{style:ct,ref:He}),c.createElement("div",{className:`${te}-children`},de),C||Nt&&Oe?tt:null)))})},6989:function(un,We,m){"use strict";m.d(We,{V:function(){return ee}});var c=m(59301);const ee=c.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},48923:function(un,We,m){"use strict";m.d(We,{eh:function(){return ie},jn:function(){return F}});var c=m(36237),ee=m(16931);const $=g=>{const{antCls:J,componentCls:X,colorText:o,footerBg:x,headerHeight:L,headerPadding:b,headerColor:S,footerPadding:T,fontSize:B,bodyBg:z,headerBg:j}=g;return{[X]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:z,"&, *":{boxSizing:"border-box"},[`&${X}-has-sider`]:{flexDirection:"row",[`> ${X}, > ${X}-content`]:{width:0}},[`${X}-header, &${X}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${X}-header`]:{height:L,padding:b,color:S,lineHeight:(0,c.unit)(L),background:j,[`${J}-menu`]:{lineHeight:"inherit"}},[`${X}-footer`]:{padding:T,color:o,fontSize:B,background:x},[`${X}-content`]:{flex:"auto",color:o,minHeight:0}}},ie=g=>{const{colorBgLayout:J,controlHeight:X,controlHeightLG:o,colorText:x,controlHeightSM:L,marginXXS:b,colorTextLightSolid:S,colorBgContainer:T}=g,B=o*1.25;return{colorBgHeader:"#001529",colorBgBody:J,colorBgTrigger:"#002140",bodyBg:J,headerBg:"#001529",headerHeight:X*2,headerPadding:`0 ${B}px`,headerColor:x,footerPadding:`${L}px ${B}px`,footerBg:J,siderBg:"#001529",triggerHeight:o+b*2,triggerBg:"#002140",triggerColor:S,zeroTriggerWidth:o,zeroTriggerHeight:o,lightSiderBg:T,lightTriggerBg:T,lightTriggerColor:x}},F=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];We.ZP=(0,ee.I$)("Layout",g=>[$(g)],ie,{deprecatedTokens:F})},78857:function(un,We,m){"use strict";m.d(We,{J:function(){return g}});var c=m(59301),ee=m(8654),$=m(62487),ie=function(J,X){var o={};for(var x in J)Object.prototype.hasOwnProperty.call(J,x)&&X.indexOf(x)<0&&(o[x]=J[x]);if(J!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,x=Object.getOwnPropertySymbols(J);L<x.length;L++)X.indexOf(x[L])<0&&Object.prototype.propertyIsEnumerable.call(J,x[L])&&(o[x[L]]=J[x[L]]);return o};const F=c.createContext(null),g=c.forwardRef((J,X)=>{const{children:o}=J,x=ie(J,["children"]),L=c.useContext(F),b=c.useMemo(()=>Object.assign(Object.assign({},L),x),[L,x.prefixCls,x.mode,x.selectable,x.rootClassName]),S=(0,ee.t4)(o),T=(0,ee.x1)(X,S?(0,ee.C4)(o):null);return c.createElement(F.Provider,{value:b},c.createElement($.Z,{space:!0},S?c.cloneElement(o,{ref:T}):o))});We.Z=F},93041:function(un,We,m){"use strict";m.d(We,{default:function(){return $e}});var c=m(59301),ee=m(28321),$=m(24303),ie=m(18785),F=m(92310),g=m.n(F),J=m(6089),X=m(2738),o=m(86641),x=m(22703),L=m(48755),b=m(83397),T=(0,c.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),B=function(Ae,Z){var D={};for(var he in Ae)Object.prototype.hasOwnProperty.call(Ae,he)&&Z.indexOf(he)<0&&(D[he]=Ae[he]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,he=Object.getOwnPropertySymbols(Ae);_e<he.length;_e++)Z.indexOf(he[_e])<0&&Object.prototype.propertyIsEnumerable.call(Ae,he[_e])&&(D[he[_e]]=Ae[he[_e]]);return D},j=Ae=>{const{prefixCls:Z,className:D,dashed:he}=Ae,_e=B(Ae,["prefixCls","className","dashed"]),{getPrefixCls:pe}=c.useContext(L.E_),Ee=pe("menu",Z),Oe=g()({[`${Ee}-item-divider-dashed`]:!!he},D);return c.createElement(ee.iz,Object.assign({className:Oe},_e))},U=m(11592),A=m(25399),I=Ae=>{var Z;const{className:D,children:he,icon:_e,title:pe,danger:Ee,extra:Oe}=Ae,{prefixCls:Ze,firstLevel:re,direction:fe,disableMenuItemTitleTooltip:st,inlineCollapsed:tt}=c.useContext(T),ct=kt=>{const w=he==null?void 0:he[0],O=c.createElement("span",{className:g()(`${Ze}-title-content`,{[`${Ze}-title-content-with-extra`]:!!Oe||Oe===0})},he);return(!_e||c.isValidElement(he)&&he.type==="span")&&he&&kt&&re&&typeof w=="string"?c.createElement("div",{className:`${Ze}-inline-collapsed-noicon`},w.charAt(0)):O},{siderCollapsed:ut}=c.useContext($.D);let Ue=pe;typeof pe=="undefined"?Ue=re?he:"":pe===!1&&(Ue="");const xt={title:Ue};!ut&&!tt&&(xt.title=null,xt.open=!1);const dt=(0,U.Z)(he).length;let gt=c.createElement(ee.ck,Object.assign({},(0,X.Z)(Ae,["title","icon","danger"]),{className:g()({[`${Ze}-item-danger`]:Ee,[`${Ze}-item-only-child`]:(_e?dt+1:dt)===1},D),title:typeof pe=="string"?pe:void 0}),(0,x.Tm)(_e,{className:g()(c.isValidElement(_e)?(Z=_e.props)===null||Z===void 0?void 0:Z.className:"",`${Ze}-item-icon`)}),ct(tt));return st||(gt=c.createElement(A.Z,Object.assign({},xt,{placement:fe==="rtl"?"left":"right",classNames:{root:`${Ze}-inline-collapsed-tooltip`}}),gt)),gt},M=m(78857),le=m(36237),me=m(17835),ce=m(63356),De=m(34961),Pe=m(46e3),Ce=m(34925),He=m(16931),ue=m(51636),P=Ae=>{const{componentCls:Z,motionDurationSlow:D,horizontalLineHeight:he,colorSplit:_e,lineWidth:pe,lineType:Ee,itemPaddingInline:Oe}=Ae;return{[`${Z}-horizontal`]:{lineHeight:he,border:0,borderBottom:`${(0,le.unit)(pe)} ${Ee} ${_e}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Z}-item, ${Z}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Oe},[`> ${Z}-item:hover,
> ${Z}-item-active,
> ${Z}-submenu ${Z}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Z}-item, ${Z}-submenu-title`]:{transition:[`border-color ${D}`,`background ${D}`].join(",")},[`${Z}-submenu-arrow`]:{display:"none"}}}},ae=Ae=>{let{componentCls:Z,menuArrowOffset:D,calc:he}=Ae;return{[`${Z}-rtl`]:{direction:"rtl"},[`${Z}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Z}-rtl${Z}-vertical,
${Z}-submenu-rtl ${Z}-vertical`]:{[`${Z}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${(0,le.unit)(he(D).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${(0,le.unit)(D)})`}}}}};const Q=Ae=>Object.assign({},(0,ce.oN)(Ae));var C=(Ae,Z)=>{const{componentCls:D,itemColor:he,itemSelectedColor:_e,subMenuItemSelectedColor:pe,groupTitleColor:Ee,itemBg:Oe,subMenuItemBg:Ze,itemSelectedBg:re,activeBarHeight:fe,activeBarWidth:st,activeBarBorderWidth:tt,motionDurationSlow:ct,motionEaseInOut:ut,motionEaseOut:Ue,itemPaddingInline:xt,motionDurationMid:dt,itemHoverColor:gt,lineType:kt,colorSplit:w,itemDisabledColor:O,dangerItemColor:qe,dangerItemHoverColor:oe,dangerItemSelectedColor:xe,dangerItemActiveBg:jt,dangerItemSelectedBg:Qe,popupBg:at,itemHoverBg:bt,itemActiveBg:ge,menuSubMenuBg:ye,horizontalItemSelectedColor:Fe,horizontalItemSelectedBg:ze,horizontalItemBorderRadius:q,horizontalItemHoverBg:Mt}=Ae;return{[`${D}-${Z}, ${D}-${Z} > ${D}`]:{color:he,background:Oe,[`&${D}-root:focus-visible`]:Object.assign({},Q(Ae)),[`${D}-item`]:{"&-group-title, &-extra":{color:Ee}},[`${D}-submenu-selected > ${D}-submenu-title`]:{color:pe},[`${D}-item, ${D}-submenu-title`]:{color:he,[`&:not(${D}-item-disabled):focus-visible`]:Object.assign({},Q(Ae))},[`${D}-item-disabled, ${D}-submenu-disabled`]:{color:`${O} !important`},[`${D}-item:not(${D}-item-selected):not(${D}-submenu-selected)`]:{[`&:hover, > ${D}-submenu-title:hover`]:{color:gt}},[`&:not(${D}-horizontal)`]:{[`${D}-item:not(${D}-item-selected)`]:{"&:hover":{backgroundColor:bt},"&:active":{backgroundColor:ge}},[`${D}-submenu-title`]:{"&:hover":{backgroundColor:bt},"&:active":{backgroundColor:ge}}},[`${D}-item-danger`]:{color:qe,[`&${D}-item:hover`]:{[`&:not(${D}-item-selected):not(${D}-submenu-selected)`]:{color:oe}},[`&${D}-item:active`]:{background:jt}},[`${D}-item a`]:{"&, &:hover":{color:"inherit"}},[`${D}-item-selected`]:{color:_e,[`&${D}-item-danger`]:{color:xe},"a, a:hover":{color:"inherit"}},[`& ${D}-item-selected`]:{backgroundColor:re,[`&${D}-item-danger`]:{backgroundColor:Qe}},[`&${D}-submenu > ${D}`]:{backgroundColor:ye},[`&${D}-popup > ${D}`]:{backgroundColor:at},[`&${D}-submenu-popup > ${D}`]:{backgroundColor:at},[`&${D}-horizontal`]:Object.assign(Object.assign({},Z==="dark"?{borderBottom:0}:{}),{[`> ${D}-item, > ${D}-submenu`]:{top:tt,marginTop:Ae.calc(tt).mul(-1).equal(),marginBottom:0,borderRadius:q,"&::after":{position:"absolute",insetInline:xt,bottom:0,borderBottom:`${(0,le.unit)(fe)} solid transparent`,transition:`border-color ${ct} ${ut}`,content:'""'},"&:hover, &-active, &-open":{background:Mt,"&::after":{borderBottomWidth:fe,borderBottomColor:Fe}},"&-selected":{color:Fe,backgroundColor:ze,"&:hover":{backgroundColor:ze},"&::after":{borderBottomWidth:fe,borderBottomColor:Fe}}}}),[`&${D}-root`]:{[`&${D}-inline, &${D}-vertical`]:{borderInlineEnd:`${(0,le.unit)(tt)} ${kt} ${w}`}},[`&${D}-inline`]:{[`${D}-sub${D}-inline`]:{background:Ze},[`${D}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${(0,le.unit)(st)} solid ${_e}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${dt} ${Ue}`,`opacity ${dt} ${Ue}`].join(","),content:'""'},[`&${D}-item-danger`]:{"&::after":{borderInlineEndColor:xe}}},[`${D}-selected, ${D}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${dt} ${ut}`,`opacity ${dt} ${ut}`].join(",")}}}}}};const Y=Ae=>{const{componentCls:Z,itemHeight:D,itemMarginInline:he,padding:_e,menuArrowSize:pe,marginXS:Ee,itemMarginBlock:Oe,itemWidth:Ze,itemPaddingInline:re}=Ae,fe=Ae.calc(pe).add(_e).add(Ee).equal();return{[`${Z}-item`]:{position:"relative",overflow:"hidden"},[`${Z}-item, ${Z}-submenu-title`]:{height:D,lineHeight:(0,le.unit)(D),paddingInline:re,overflow:"hidden",textOverflow:"ellipsis",marginInline:he,marginBlock:Oe,width:Ze},[`> ${Z}-item,
> ${Z}-submenu > ${Z}-submenu-title`]:{height:D,lineHeight:(0,le.unit)(D)},[`${Z}-item-group-list ${Z}-submenu-title,
${Z}-submenu-title`]:{paddingInlineEnd:fe}}};var je=Ae=>{const{componentCls:Z,iconCls:D,itemHeight:he,colorTextLightSolid:_e,dropdownWidth:pe,controlHeightLG:Ee,motionEaseOut:Oe,paddingXL:Ze,itemMarginInline:re,fontSizeLG:fe,motionDurationFast:st,motionDurationSlow:tt,paddingXS:ct,boxShadowSecondary:ut,collapsedWidth:Ue,collapsedIconSize:xt}=Ae,dt={height:he,lineHeight:(0,le.unit)(he),listStylePosition:"inside",listStyleType:"disc"};return[{[Z]:{"&-inline, &-vertical":Object.assign({[`&${Z}-root`]:{boxShadow:"none"}},Y(Ae))},[`${Z}-submenu-popup`]:{[`${Z}-vertical`]:Object.assign(Object.assign({},Y(Ae)),{boxShadow:ut})}},{[`${Z}-submenu-popup ${Z}-vertical${Z}-sub`]:{minWidth:pe,maxHeight:`calc(100vh - ${(0,le.unit)(Ae.calc(Ee).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Z}-inline`]:{width:"100%",[`&${Z}-root`]:{[`${Z}-item, ${Z}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${tt}`,`background ${tt}`,`padding ${st} ${Oe}`].join(","),[`> ${Z}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Z}-sub${Z}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Z}-submenu > ${Z}-submenu-title`]:dt,[`& ${Z}-item-group-title`]:{paddingInlineStart:Ze}},[`${Z}-item`]:dt}},{[`${Z}-inline-collapsed`]:{width:Ue,[`&${Z}-root`]:{[`${Z}-item, ${Z}-submenu ${Z}-submenu-title`]:{[`> ${Z}-inline-collapsed-noicon`]:{fontSize:fe,textAlign:"center"}}},[`> ${Z}-item,
> ${Z}-item-group > ${Z}-item-group-list > ${Z}-item,
> ${Z}-item-group > ${Z}-item-group-list > ${Z}-submenu > ${Z}-submenu-title,
> ${Z}-submenu > ${Z}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${(0,le.unit)(Ae.calc(xt).div(2).equal())} - ${(0,le.unit)(re)})`,textOverflow:"clip",[`
${Z}-submenu-arrow,
${Z}-submenu-expand-icon
`]:{opacity:0},[`${Z}-item-icon, ${D}`]:{margin:0,fontSize:xt,lineHeight:(0,le.unit)(he),"+ span":{display:"inline-block",opacity:0}}},[`${Z}-item-icon, ${D}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Z}-item-icon, ${D}`]:{display:"none"},"a, a:hover":{color:_e}},[`${Z}-item-group-title`]:Object.assign(Object.assign({},ce.vS),{paddingInline:ct})}}]};const lt=Ae=>{const{componentCls:Z,motionDurationSlow:D,motionDurationMid:he,motionEaseInOut:_e,motionEaseOut:pe,iconCls:Ee,iconSize:Oe,iconMarginInlineEnd:Ze}=Ae;return{[`${Z}-item, ${Z}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${D}`,`background ${D}`,`padding calc(${D} + 0.1s) ${_e}`].join(","),[`${Z}-item-icon, ${Ee}`]:{minWidth:Oe,fontSize:Oe,transition:[`font-size ${he} ${pe}`,`margin ${D} ${_e}`,`color ${D}`].join(","),"+ span":{marginInlineStart:Ze,opacity:1,transition:[`opacity ${D} ${_e}`,`margin ${D}`,`color ${D}`].join(",")}},[`${Z}-item-icon`]:Object.assign({},(0,ce.Ro)()),[`&${Z}-item-only-child`]:{[`> ${Ee}, > ${Z}-item-icon`]:{marginInlineEnd:0}}},[`${Z}-item-disabled, ${Z}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${Z}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},ke=Ae=>{const{componentCls:Z,motionDurationSlow:D,motionEaseInOut:he,borderRadius:_e,menuArrowSize:pe,menuArrowOffset:Ee}=Ae;return{[`${Z}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Ae.margin,width:pe,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${D} ${he}, opacity ${D}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Ae.calc(pe).mul(.6).equal(),height:Ae.calc(pe).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:_e,transition:[`background ${D} ${he}`,`transform ${D} ${he}`,`top ${D} ${he}`,`color ${D} ${he}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${(0,le.unit)(Ae.calc(Ee).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${(0,le.unit)(Ee)})`}}}}},Ye=Ae=>{const{antCls:Z,componentCls:D,fontSize:he,motionDurationSlow:_e,motionDurationMid:pe,motionEaseInOut:Ee,paddingXS:Oe,padding:Ze,colorSplit:re,lineWidth:fe,zIndexPopup:st,borderRadiusLG:tt,subMenuItemBorderRadius:ct,menuArrowSize:ut,menuArrowOffset:Ue,lineType:xt,groupTitleLineHeight:dt,groupTitleFontSize:gt}=Ae;return[{"":{[D]:Object.assign(Object.assign({},(0,ce.dF)()),{"&-hidden":{display:"none"}})},[`${D}-submenu-hidden`]:{display:"none"}},{[D]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ce.Wf)(Ae)),(0,ce.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:he,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${_e} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${D}-item`]:{flex:"none"}},[`${D}-item, ${D}-submenu, ${D}-submenu-title`]:{borderRadius:Ae.itemBorderRadius},[`${D}-item-group-title`]:{padding:`${(0,le.unit)(Oe)} ${(0,le.unit)(Ze)}`,fontSize:gt,lineHeight:dt,transition:`all ${_e}`},[`&-horizontal ${D}-submenu`]:{transition:[`border-color ${_e} ${Ee}`,`background ${_e} ${Ee}`].join(",")},[`${D}-submenu, ${D}-submenu-inline`]:{transition:[`border-color ${_e} ${Ee}`,`background ${_e} ${Ee}`,`padding ${pe} ${Ee}`].join(",")},[`${D}-submenu ${D}-sub`]:{cursor:"initial",transition:[`background ${_e} ${Ee}`,`padding ${_e} ${Ee}`].join(",")},[`${D}-title-content`]:{transition:`color ${_e}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${Z}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${D}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:Ae.padding}},[`${D}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${D}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:re,borderStyle:xt,borderWidth:0,borderTopWidth:fe,marginBlock:fe,padding:0,"&-dashed":{borderStyle:"dashed"}}}),lt(Ae)),{[`${D}-item-group`]:{[`${D}-item-group-list`]:{margin:0,padding:0,[`${D}-item, ${D}-submenu-title`]:{paddingInline:`${(0,le.unit)(Ae.calc(he).mul(2).equal())} ${(0,le.unit)(Ze)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:st,borderRadius:tt,boxShadow:"none",transformOrigin:"0 0",[`&${D}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${D}`]:Object.assign(Object.assign(Object.assign({borderRadius:tt},lt(Ae)),ke(Ae)),{[`${D}-item, ${D}-submenu > ${D}-submenu-title`]:{borderRadius:ct},[`${D}-submenu-title::after`]:{transition:`transform ${_e} ${Ee}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:Ae.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Ae.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Ae.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Ae.paddingXS}}}),ke(Ae)),{[`&-inline-collapsed ${D}-submenu-arrow,
&-inline ${D}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${(0,le.unit)(Ue)})`},"&::after":{transform:`rotate(45deg) translateX(${(0,le.unit)(Ae.calc(Ue).mul(-1).equal())})`}},[`${D}-submenu-open${D}-submenu-inline > ${D}-submenu-title > ${D}-submenu-arrow`]:{transform:`translateY(${(0,le.unit)(Ae.calc(ut).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${(0,le.unit)(Ae.calc(Ue).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${(0,le.unit)(Ue)})`}}})},{[`${Z}-layout-header`]:{[D]:{lineHeight:"inherit"}}}]},et=Ae=>{var Z,D,he;const{colorPrimary:_e,colorError:pe,colorTextDisabled:Ee,colorErrorBg:Oe,colorText:Ze,colorTextDescription:re,colorBgContainer:fe,colorFillAlter:st,colorFillContent:tt,lineWidth:ct,lineWidthBold:ut,controlItemBgActive:Ue,colorBgTextHover:xt,controlHeightLG:dt,lineHeight:gt,colorBgElevated:kt,marginXXS:w,padding:O,fontSize:qe,controlHeightSM:oe,fontSizeLG:xe,colorTextLightSolid:jt,colorErrorHover:Qe}=Ae,at=(Z=Ae.activeBarWidth)!==null&&Z!==void 0?Z:0,bt=(D=Ae.activeBarBorderWidth)!==null&&D!==void 0?D:ct,ge=(he=Ae.itemMarginInline)!==null&&he!==void 0?he:Ae.marginXXS,ye=new me.FastColor(jt).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Ae.zIndexPopupBase+50,radiusItem:Ae.borderRadiusLG,itemBorderRadius:Ae.borderRadiusLG,radiusSubMenuItem:Ae.borderRadiusSM,subMenuItemBorderRadius:Ae.borderRadiusSM,colorItemText:Ze,itemColor:Ze,colorItemTextHover:Ze,itemHoverColor:Ze,colorItemTextHoverHorizontal:_e,horizontalItemHoverColor:_e,colorGroupTitle:re,groupTitleColor:re,colorItemTextSelected:_e,itemSelectedColor:_e,subMenuItemSelectedColor:_e,colorItemTextSelectedHorizontal:_e,horizontalItemSelectedColor:_e,colorItemBg:fe,itemBg:fe,colorItemBgHover:xt,itemHoverBg:xt,colorItemBgActive:tt,itemActiveBg:Ue,colorSubItemBg:st,subMenuItemBg:st,colorItemBgSelected:Ue,itemSelectedBg:Ue,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:at,colorActiveBarHeight:ut,activeBarHeight:ut,colorActiveBarBorderSize:ct,activeBarBorderWidth:bt,colorItemTextDisabled:Ee,itemDisabledColor:Ee,colorDangerItemText:pe,dangerItemColor:pe,colorDangerItemTextHover:pe,dangerItemHoverColor:pe,colorDangerItemTextSelected:pe,dangerItemSelectedColor:pe,colorDangerItemBgActive:Oe,dangerItemActiveBg:Oe,colorDangerItemBgSelected:Oe,dangerItemSelectedBg:Oe,itemMarginInline:ge,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:dt,groupTitleLineHeight:gt,collapsedWidth:dt*2,popupBg:kt,itemMarginBlock:w,itemPaddingInline:O,horizontalLineHeight:`${dt*1.15}px`,iconSize:qe,iconMarginInlineEnd:oe-qe,collapsedIconSize:xe,groupTitleFontSize:qe,darkItemDisabledColor:new me.FastColor(jt).setA(.25).toRgbString(),darkItemColor:ye,darkDangerItemColor:pe,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:jt,darkItemSelectedBg:_e,darkDangerItemSelectedBg:pe,darkItemHoverBg:"transparent",darkGroupTitleColor:ye,darkItemHoverColor:jt,darkDangerItemHoverColor:Qe,darkDangerItemSelectedColor:jt,darkDangerItemActiveBg:pe,itemWidth:at?`calc(100% + ${bt}px)`:`calc(100% - ${ge*2}px)`}};var _t=function(Ae){let Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ae,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return(0,He.I$)("Menu",_e=>{const{colorBgElevated:pe,controlHeightLG:Ee,fontSize:Oe,darkItemColor:Ze,darkDangerItemColor:re,darkItemBg:fe,darkSubMenuItemBg:st,darkItemSelectedColor:tt,darkItemSelectedBg:ct,darkDangerItemSelectedBg:ut,darkItemHoverBg:Ue,darkGroupTitleColor:xt,darkItemHoverColor:dt,darkItemDisabledColor:gt,darkDangerItemHoverColor:kt,darkDangerItemSelectedColor:w,darkDangerItemActiveBg:O,popupBg:qe,darkPopupBg:oe}=_e,xe=_e.calc(Oe).div(7).mul(5).equal(),jt=(0,ue.mergeToken)(_e,{menuArrowSize:xe,menuHorizontalHeight:_e.calc(Ee).mul(1.15).equal(),menuArrowOffset:_e.calc(xe).mul(.25).equal(),menuSubMenuBg:pe,calc:_e.calc,popupBg:qe}),Qe=(0,ue.mergeToken)(jt,{itemColor:Ze,itemHoverColor:dt,groupTitleColor:xt,itemSelectedColor:tt,subMenuItemSelectedColor:tt,itemBg:fe,popupBg:oe,subMenuItemBg:st,itemActiveBg:"transparent",itemSelectedBg:ct,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Ue,itemDisabledColor:gt,dangerItemColor:re,dangerItemHoverColor:kt,dangerItemSelectedColor:w,dangerItemActiveBg:O,dangerItemSelectedBg:ut,menuSubMenuBg:st,horizontalItemSelectedColor:tt,horizontalItemSelectedBg:ct});return[Ye(jt),P(jt),je(jt),C(jt,"light"),C(Qe,"dark"),ae(jt),(0,De.Z)(jt),(0,Pe.oN)(jt,"slide-up"),(0,Pe.oN)(jt,"slide-down"),(0,Ce._y)(jt,"zoom-big")]},et,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:D,unitless:{groupTitleLineHeight:!0}})(Ae,Z)},Re=m(75030),rt=Ae=>{var Z;const{popupClassName:D,icon:he,title:_e,theme:pe}=Ae,Ee=c.useContext(T),{prefixCls:Oe,inlineCollapsed:Ze,theme:re}=Ee,fe=(0,ee.Xl)();let st;if(!he)st=Ze&&!fe.length&&_e&&typeof _e=="string"?c.createElement("div",{className:`${Oe}-inline-collapsed-noicon`},_e.charAt(0)):c.createElement("span",{className:`${Oe}-title-content`},_e);else{const ut=c.isValidElement(_e)&&_e.type==="span";st=c.createElement(c.Fragment,null,(0,x.Tm)(he,{className:g()(c.isValidElement(he)?(Z=he.props)===null||Z===void 0?void 0:Z.className:"",`${Oe}-item-icon`)}),ut?_e:c.createElement("span",{className:`${Oe}-title-content`},_e))}const tt=c.useMemo(()=>Object.assign(Object.assign({},Ee),{firstLevel:!1}),[Ee]),[ct]=(0,Re.Cn)("Menu");return c.createElement(T.Provider,{value:tt},c.createElement(ee.Wd,Object.assign({},(0,X.Z)(Ae,["icon"]),{title:st,popupClassName:g()(Oe,D,`${Oe}-${pe||re}`),popupStyle:Object.assign({zIndex:ct},Ae.popupStyle)})))},Nt=function(Ae,Z){var D={};for(var he in Ae)Object.prototype.hasOwnProperty.call(Ae,he)&&Z.indexOf(he)<0&&(D[he]=Ae[he]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,he=Object.getOwnPropertySymbols(Ae);_e<he.length;_e++)Z.indexOf(he[_e])<0&&Object.prototype.propertyIsEnumerable.call(Ae,he[_e])&&(D[he[_e]]=Ae[he[_e]]);return D};function Xe(Ae){return Ae===null||Ae===!1}const Ge={item:I,submenu:rt,divider:j};var Ie=(0,c.forwardRef)((Ae,Z)=>{var D;const he=c.useContext(M.Z),_e=he||{},{getPrefixCls:pe,getPopupContainer:Ee,direction:Oe,menu:Ze}=c.useContext(L.E_),re=pe(),{prefixCls:fe,className:st,style:tt,theme:ct="light",expandIcon:ut,_internalDisableMenuItemTitleTooltip:Ue,inlineCollapsed:xt,siderCollapsed:dt,rootClassName:gt,mode:kt,selectable:w,onClick:O,overflowedIndicatorPopupClassName:qe}=Ae,oe=Nt(Ae,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),xe=(0,X.Z)(oe,["collapsedWidth"]);(D=_e.validator)===null||D===void 0||D.call(_e,{mode:kt});const jt=(0,J.Z)(function(){var En;O==null||O.apply(void 0,arguments),(En=_e.onClick)===null||En===void 0||En.call(_e)}),Qe=_e.mode||kt,at=w!=null?w:_e.selectable,bt=xt!=null?xt:dt,ge={horizontal:{motionName:`${re}-slide-up`},inline:(0,o.Z)(re),other:{motionName:`${re}-zoom-big`}},ye=pe("menu",fe||_e.prefixCls),Fe=(0,b.Z)(ye),[ze,q,Mt]=_t(ye,Fe,!he),Be=g()(`${ye}-${ct}`,Ze==null?void 0:Ze.className,st),Gt=c.useMemo(()=>{var En,sr;if(typeof ut=="function"||Xe(ut))return ut||null;if(typeof _e.expandIcon=="function"||Xe(_e.expandIcon))return _e.expandIcon||null;if(typeof(Ze==null?void 0:Ze.expandIcon)=="function"||Xe(Ze==null?void 0:Ze.expandIcon))return(Ze==null?void 0:Ze.expandIcon)||null;const Xn=(En=ut!=null?ut:_e==null?void 0:_e.expandIcon)!==null&&En!==void 0?En:Ze==null?void 0:Ze.expandIcon;return(0,x.Tm)(Xn,{className:g()(`${ye}-submenu-expand-icon`,c.isValidElement(Xn)?(sr=Xn.props)===null||sr===void 0?void 0:sr.className:void 0)})},[ut,_e==null?void 0:_e.expandIcon,Ze==null?void 0:Ze.expandIcon,ye]),pn=c.useMemo(()=>({prefixCls:ye,inlineCollapsed:bt||!1,direction:Oe,firstLevel:!0,theme:ct,mode:Qe,disableMenuItemTitleTooltip:Ue}),[ye,bt,Oe,Ue,ct]);return ze(c.createElement(M.Z.Provider,{value:null},c.createElement(T.Provider,{value:pn},c.createElement(ee.ZP,Object.assign({getPopupContainer:Ee,overflowedIndicator:c.createElement(ie.Z,null),overflowedIndicatorPopupClassName:g()(ye,`${ye}-${ct}`,qe),mode:Qe,selectable:at,onClick:jt},xe,{inlineCollapsed:bt,style:Object.assign(Object.assign({},Ze==null?void 0:Ze.style),tt),className:Be,prefixCls:ye,direction:Oe,defaultMotions:ge,expandIcon:Gt,ref:Z,rootClassName:g()(gt,q,_e.rootClassName,Mt,Fe),_internalComponents:Ge})))))});const te=(0,c.forwardRef)((Ae,Z)=>{const D=(0,c.useRef)(null),he=c.useContext($.D);return(0,c.useImperativeHandle)(Z,()=>({menu:D.current,focus:_e=>{var pe;(pe=D.current)===null||pe===void 0||pe.focus(_e)}})),c.createElement(Ie,Object.assign({ref:D},Ae,he))});te.Item=I,te.SubMenu=rt,te.Divider=j,te.ItemGroup=ee.BW;var $e=te},31709:function(un,We,m){"use strict";m.d(We,{Z:function(){return Ze}});var c=m(59301),ee=m(60499),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},ie=$,F=m(7657),g=function(fe,st){return c.createElement(F.Z,(0,ee.Z)({},fe,{ref:st,icon:ie}))},J=c.forwardRef(g),X=J,o=m(49198),x=m(33853),L=m(38819),b=m(92310),S=m.n(b),T=m(18642),B=m(43749),z=m(85899),j=m(72190),U=m(18929),A=m(10228),K=m(26112),I=m(48736),M=m(17119),le=[10,20,50,100],me=function(fe){var st=fe.pageSizeOptions,tt=st===void 0?le:st,ct=fe.locale,ut=fe.changeSize,Ue=fe.pageSize,xt=fe.goButton,dt=fe.quickGo,gt=fe.rootPrefixCls,kt=fe.disabled,w=fe.buildOptionText,O=fe.showSizeChanger,qe=fe.sizeChangerRender,oe=c.useState(""),xe=(0,j.Z)(oe,2),jt=xe[0],Qe=xe[1],at=function(){return!jt||Number.isNaN(jt)?void 0:Number(jt)},bt=typeof w=="function"?w:function(pn){return"".concat(pn," ").concat(ct.items_per_page)},ge=function(En){Qe(En.target.value)},ye=function(En){xt||jt===""||(Qe(""),!(En.relatedTarget&&(En.relatedTarget.className.indexOf("".concat(gt,"-item-link"))>=0||En.relatedTarget.className.indexOf("".concat(gt,"-item"))>=0))&&(dt==null||dt(at())))},Fe=function(En){jt!==""&&(En.keyCode===A.Z.ENTER||En.type==="click")&&(Qe(""),dt==null||dt(at()))},ze=function(){return tt.some(function(En){return En.toString()===Ue.toString()})?tt:tt.concat([Ue]).sort(function(En,sr){var Xn=Number.isNaN(Number(En))?0:Number(En),Wn=Number.isNaN(Number(sr))?0:Number(sr);return Xn-Wn})},q="".concat(gt,"-options");if(!O&&!dt)return null;var Mt=null,Be=null,Gt=null;return O&&qe&&(Mt=qe({disabled:kt,size:Ue,onSizeChange:function(En){ut==null||ut(Number(En))},"aria-label":ct.page_size,className:"".concat(q,"-size-changer"),options:ze().map(function(pn){return{label:bt(pn),value:pn}})})),dt&&(xt&&(Gt=typeof xt=="boolean"?c.createElement("button",{type:"button",onClick:Fe,onKeyUp:Fe,disabled:kt,className:"".concat(q,"-quick-jumper-button")},ct.jump_to_confirm):c.createElement("span",{onClick:Fe,onKeyUp:Fe},xt)),Be=c.createElement("div",{className:"".concat(q,"-quick-jumper")},ct.jump_to,c.createElement("input",{disabled:kt,type:"text",value:jt,onChange:ge,onKeyUp:Fe,onBlur:ye,"aria-label":ct.page}),ct.page,Gt)),c.createElement("li",{className:q},Mt,Be)},ce=me,De=function(fe){var st=fe.rootPrefixCls,tt=fe.page,ct=fe.active,ut=fe.className,Ue=fe.showTitle,xt=fe.onClick,dt=fe.onKeyPress,gt=fe.itemRender,kt="".concat(st,"-item"),w=S()(kt,"".concat(kt,"-").concat(tt),(0,T.Z)((0,T.Z)({},"".concat(kt,"-active"),ct),"".concat(kt,"-disabled"),!tt),ut),O=function(){xt(tt)},qe=function(jt){dt(jt,xt,tt)},oe=gt(tt,"page",c.createElement("a",{rel:"nofollow"},tt));return oe?c.createElement("li",{title:Ue?String(tt):null,className:w,onClick:O,onKeyDown:qe,tabIndex:0},oe):null},Pe=De,Ce=function(fe,st,tt){return tt};function He(){}function ue(re){var fe=Number(re);return typeof fe=="number"&&!Number.isNaN(fe)&&isFinite(fe)&&Math.floor(fe)===fe}function W(re,fe,st){var tt=typeof re=="undefined"?fe:re;return Math.floor((st-1)/tt)+1}var P=function(fe){var st=fe.prefixCls,tt=st===void 0?"rc-pagination":st,ct=fe.selectPrefixCls,ut=ct===void 0?"rc-select":ct,Ue=fe.className,xt=fe.current,dt=fe.defaultCurrent,gt=dt===void 0?1:dt,kt=fe.total,w=kt===void 0?0:kt,O=fe.pageSize,qe=fe.defaultPageSize,oe=qe===void 0?10:qe,xe=fe.onChange,jt=xe===void 0?He:xe,Qe=fe.hideOnSinglePage,at=fe.align,bt=fe.showPrevNextJumpers,ge=bt===void 0?!0:bt,ye=fe.showQuickJumper,Fe=fe.showLessItems,ze=fe.showTitle,q=ze===void 0?!0:ze,Mt=fe.onShowSizeChange,Be=Mt===void 0?He:Mt,Gt=fe.locale,pn=Gt===void 0?M.Z:Gt,En=fe.style,sr=fe.totalBoundaryShowSizeChanger,Xn=sr===void 0?50:sr,Wn=fe.disabled,Cr=fe.simple,Rr=fe.showTotal,Qn=fe.showSizeChanger,gr=Qn===void 0?w>Xn:Qn,Cn=fe.sizeChangerRender,tn=fe.pageSizeOptions,dn=fe.itemRender,Vn=dn===void 0?Ce:dn,vr=fe.jumpPrevIcon,Et=fe.jumpNextIcon,wt=fe.prevIcon,Me=fe.nextIcon,nt=c.useRef(null),vt=(0,U.Z)(10,{value:O,defaultValue:oe}),yt=(0,j.Z)(vt,2),Tt=yt[0],Jt=yt[1],mn=(0,U.Z)(1,{value:xt,defaultValue:gt,postState:function(zn){return Math.max(1,Math.min(zn,W(void 0,Tt,w)))}}),yn=(0,j.Z)(mn,2),Wt=yn[0],gn=yn[1],Ln=c.useState(Wt),vn=(0,j.Z)(Ln,2),ht=vn[0],Ct=vn[1];(0,c.useEffect)(function(){Ct(Wt)},[Wt]);var Zt=jt!==He,Lt="current"in fe,zt=Math.max(1,Wt-(Fe?3:5)),Vt=Math.min(W(void 0,Tt,w),Wt+(Fe?3:5));function nn(mr,zn){var pi=mr||c.createElement("button",{type:"button","aria-label":zn,className:"".concat(tt,"-item-link")});return typeof mr=="function"&&(pi=c.createElement(mr,(0,z.Z)({},fe))),pi}function rn(mr){var zn=mr.target.value,pi=W(void 0,Tt,w),Tn;return zn===""?Tn=zn:Number.isNaN(Number(zn))?Tn=ht:zn>=pi?Tn=pi:Tn=Number(zn),Tn}function Sn(mr){return ue(mr)&&mr!==Wt&&ue(w)&&w>0}var On=w>Tt?ye:!1;function or(mr){(mr.keyCode===A.Z.UP||mr.keyCode===A.Z.DOWN)&&mr.preventDefault()}function Nn(mr){var zn=rn(mr);switch(zn!==ht&&Ct(zn),mr.keyCode){case A.Z.ENTER:Kn(zn);break;case A.Z.UP:Kn(zn-1);break;case A.Z.DOWN:Kn(zn+1);break;default:break}}function Pn(mr){Kn(rn(mr))}function Hn(mr){var zn=W(mr,Tt,w),pi=Wt>zn&&zn!==0?zn:Wt;Jt(mr),Ct(pi),Be==null||Be(Wt,mr),gn(pi),jt==null||jt(pi,mr)}function Kn(mr){if(Sn(mr)&&!Wn){var zn=W(void 0,Tt,w),pi=mr;return mr>zn?pi=zn:mr<1&&(pi=1),pi!==ht&&Ct(pi),gn(pi),jt==null||jt(pi,Tt),pi}return Wt}var er=Wt>1,$n=Wt<W(void 0,Tt,w);function Zn(){er&&Kn(Wt-1)}function nr(){$n&&Kn(Wt+1)}function ar(){Kn(zt)}function Jn(){Kn(Vt)}function Yn(mr,zn){if(mr.key==="Enter"||mr.charCode===A.Z.ENTER||mr.keyCode===A.Z.ENTER){for(var pi=arguments.length,Tn=new Array(pi>2?pi-2:0),Fi=2;Fi<pi;Fi++)Tn[Fi-2]=arguments[Fi];zn.apply(void 0,Tn)}}function qn(mr){Yn(mr,Zn)}function Fn(mr){Yn(mr,nr)}function $r(mr){Yn(mr,ar)}function Ft(mr){Yn(mr,Jn)}function tr(mr){var zn=Vn(mr,"prev",nn(wt,"prev page"));return c.isValidElement(zn)?c.cloneElement(zn,{disabled:!er}):zn}function ur(mr){var zn=Vn(mr,"next",nn(Me,"next page"));return c.isValidElement(zn)?c.cloneElement(zn,{disabled:!$n}):zn}function Yr(mr){(mr.type==="click"||mr.keyCode===A.Z.ENTER)&&Kn(ht)}var zr=null,li=(0,K.Z)(fe,{aria:!0,data:!0}),Qr=Rr&&c.createElement("li",{className:"".concat(tt,"-total-text")},Rr(w,[w===0?0:(Wt-1)*Tt+1,Wt*Tt>w?w:Wt*Tt])),Bn=null,An=W(void 0,Tt,w);if(Qe&&w<=Tt)return null;var en=[],sn={rootPrefixCls:tt,onClick:Kn,onKeyPress:Yn,showTitle:q,itemRender:Vn,page:-1},Rn=Wt-1>0?Wt-1:0,Un=Wt+1<An?Wt+1:An,rr=ye&&ye.goButton,Ar=(0,B.Z)(Cr)==="object"?Cr.readOnly:!Cr,wn=rr,cr=null;Cr&&(rr&&(typeof rr=="boolean"?wn=c.createElement("button",{type:"button",onClick:Yr,onKeyUp:Yr},pn.jump_to_confirm):wn=c.createElement("span",{onClick:Yr,onKeyUp:Yr},rr),wn=c.createElement("li",{title:q?"".concat(pn.jump_to).concat(Wt,"/").concat(An):null,className:"".concat(tt,"-simple-pager")},wn)),cr=c.createElement("li",{title:q?"".concat(Wt,"/").concat(An):null,className:"".concat(tt,"-simple-pager")},Ar?ht:c.createElement("input",{type:"text","aria-label":pn.jump_to,value:ht,disabled:Wn,onKeyDown:or,onKeyUp:Nn,onChange:Nn,onBlur:Pn,size:3}),c.createElement("span",{className:"".concat(tt,"-slash")},"/"),An));var Ir=Fe?1:2;if(An<=3+Ir*2){An||en.push(c.createElement(Pe,(0,ee.Z)({},sn,{key:"noPager",page:1,className:"".concat(tt,"-item-disabled")})));for(var Jr=1;Jr<=An;Jr+=1)en.push(c.createElement(Pe,(0,ee.Z)({},sn,{key:Jr,page:Jr,active:Wt===Jr})))}else{var mi=Fe?pn.prev_3:pn.prev_5,Li=Fe?pn.next_3:pn.next_5,Gr=Vn(zt,"jump-prev",nn(vr,"prev page")),Ri=Vn(Vt,"jump-next",nn(Et,"next page"));ge&&(zr=Gr?c.createElement("li",{title:q?mi:null,key:"prev",onClick:ar,tabIndex:0,onKeyDown:$r,className:S()("".concat(tt,"-jump-prev"),(0,T.Z)({},"".concat(tt,"-jump-prev-custom-icon"),!!vr))},Gr):null,Bn=Ri?c.createElement("li",{title:q?Li:null,key:"next",onClick:Jn,tabIndex:0,onKeyDown:Ft,className:S()("".concat(tt,"-jump-next"),(0,T.Z)({},"".concat(tt,"-jump-next-custom-icon"),!!Et))},Ri):null);var qr=Math.max(1,Wt-Ir),bi=Math.min(Wt+Ir,An);Wt-1<=Ir&&(bi=1+Ir*2),An-Wt<=Ir&&(qr=An-Ir*2);for(var ri=qr;ri<=bi;ri+=1)en.push(c.createElement(Pe,(0,ee.Z)({},sn,{key:ri,page:ri,active:Wt===ri})));if(Wt-1>=Ir*2&&Wt!==3&&(en[0]=c.cloneElement(en[0],{className:S()("".concat(tt,"-item-after-jump-prev"),en[0].props.className)}),en.unshift(zr)),An-Wt>=Ir*2&&Wt!==An-2){var di=en[en.length-1];en[en.length-1]=c.cloneElement(di,{className:S()("".concat(tt,"-item-before-jump-next"),di.props.className)}),en.push(Bn)}qr!==1&&en.unshift(c.createElement(Pe,(0,ee.Z)({},sn,{key:1,page:1}))),bi!==An&&en.push(c.createElement(Pe,(0,ee.Z)({},sn,{key:An,page:An})))}var ii=tr(Rn);if(ii){var Oi=!er||!An;ii=c.createElement("li",{title:q?pn.prev_page:null,onClick:Zn,tabIndex:Oi?null:0,onKeyDown:qn,className:S()("".concat(tt,"-prev"),(0,T.Z)({},"".concat(tt,"-disabled"),Oi)),"aria-disabled":Oi},ii)}var Lr=ur(Un);if(Lr){var Pi,Mi;Cr?(Pi=!$n,Mi=er?0:null):(Pi=!$n||!An,Mi=Pi?null:0),Lr=c.createElement("li",{title:q?pn.next_page:null,onClick:nr,tabIndex:Mi,onKeyDown:Fn,className:S()("".concat(tt,"-next"),(0,T.Z)({},"".concat(tt,"-disabled"),Pi)),"aria-disabled":Pi},Lr)}var ki=S()(tt,Ue,(0,T.Z)((0,T.Z)((0,T.Z)((0,T.Z)((0,T.Z)({},"".concat(tt,"-start"),at==="start"),"".concat(tt,"-center"),at==="center"),"".concat(tt,"-end"),at==="end"),"".concat(tt,"-simple"),Cr),"".concat(tt,"-disabled"),Wn));return c.createElement("ul",(0,ee.Z)({className:ki,style:En,ref:nt},li),Qr,ii,Cr?cr:en,Lr,c.createElement(ce,{locale:pn,rootPrefixCls:tt,disabled:Wn,selectPrefixCls:ut,changeSize:Hn,pageSize:Tt,pageSizeOptions:tn,quickGo:On?Kn:null,goButton:wn,showSizeChanger:gr,sizeChangerRender:Cn}))},de=P,ae=m(61852),Q=m(48755),E=m(31756),C=m(13783),Y=m(9017),be=m(82326),je=m(57700),lt=m(36237),ke=m(53075),Ye=m(64910),et=m(39082),_t=m(63356),Re=m(51636),At=m(16931);const rt=re=>{const{componentCls:fe}=re;return{[`${fe}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${fe}-item-link`]:{color:re.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${fe}-item-link`]:{color:re.colorTextDisabled,cursor:"not-allowed"}}},[`&${fe}-disabled`]:{cursor:"not-allowed",[`${fe}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:re.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:re.colorBorder,backgroundColor:re.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:re.itemActiveBgDisabled},a:{color:re.itemActiveColorDisabled}}},[`${fe}-item-link`]:{color:re.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${fe}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${fe}-simple-pager`]:{color:re.colorTextDisabled},[`${fe}-jump-prev, ${fe}-jump-next`]:{[`${fe}-item-link-icon`]:{opacity:0},[`${fe}-item-ellipsis`]:{opacity:1}}},[`&${fe}-simple`]:{[`${fe}-prev, ${fe}-next`]:{[`&${fe}-disabled ${fe}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Nt=re=>{const{componentCls:fe}=re;return{[`&${fe}-mini ${fe}-total-text, &${fe}-mini ${fe}-simple-pager`]:{height:re.itemSizeSM,lineHeight:(0,lt.unit)(re.itemSizeSM)},[`&${fe}-mini ${fe}-item`]:{minWidth:re.itemSizeSM,height:re.itemSizeSM,margin:0,lineHeight:(0,lt.unit)(re.calc(re.itemSizeSM).sub(2).equal())},[`&${fe}-mini ${fe}-prev, &${fe}-mini ${fe}-next`]:{minWidth:re.itemSizeSM,height:re.itemSizeSM,margin:0,lineHeight:(0,lt.unit)(re.itemSizeSM)},[`&${fe}-mini:not(${fe}-disabled)`]:{[`${fe}-prev, ${fe}-next`]:{[`&:hover ${fe}-item-link`]:{backgroundColor:re.colorBgTextHover},[`&:active ${fe}-item-link`]:{backgroundColor:re.colorBgTextActive},[`&${fe}-disabled:hover ${fe}-item-link`]:{backgroundColor:"transparent"}}},[`
&${fe}-mini ${fe}-prev ${fe}-item-link,
&${fe}-mini ${fe}-next ${fe}-item-link
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:re.itemSizeSM,lineHeight:(0,lt.unit)(re.itemSizeSM)}},[`&${fe}-mini ${fe}-jump-prev, &${fe}-mini ${fe}-jump-next`]:{height:re.itemSizeSM,marginInlineEnd:0,lineHeight:(0,lt.unit)(re.itemSizeSM)},[`&${fe}-mini ${fe}-options`]:{marginInlineStart:re.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:re.miniOptionsSizeChangerTop},"&-quick-jumper":{height:re.itemSizeSM,lineHeight:(0,lt.unit)(re.itemSizeSM),input:Object.assign(Object.assign({},(0,ke.x0)(re)),{width:re.paginationMiniQuickJumperInputWidth,height:re.controlHeightSM})}}}},Xe=re=>{const{componentCls:fe}=re;return{[`
&${fe}-simple ${fe}-prev,
&${fe}-simple ${fe}-next
`]:{height:re.itemSizeSM,lineHeight:(0,lt.unit)(re.itemSizeSM),verticalAlign:"top",[`${fe}-item-link`]:{height:re.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:re.colorBgTextHover},"&:active":{backgroundColor:re.colorBgTextActive},"&::after":{height:re.itemSizeSM,lineHeight:(0,lt.unit)(re.itemSizeSM)}}},[`&${fe}-simple ${fe}-simple-pager`]:{display:"inline-block",height:re.itemSizeSM,marginInlineEnd:re.marginXS,input:{boxSizing:"border-box",height:"100%",padding:`0 ${(0,lt.unit)(re.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:re.itemInputBg,border:`${(0,lt.unit)(re.lineWidth)} ${re.lineType} ${re.colorBorder}`,borderRadius:re.borderRadius,outline:"none",transition:`border-color ${re.motionDurationMid}`,color:"inherit","&:hover":{borderColor:re.colorPrimary},"&:focus":{borderColor:re.colorPrimaryHover,boxShadow:`${(0,lt.unit)(re.inputOutlineOffset)} 0 ${(0,lt.unit)(re.controlOutlineWidth)} ${re.controlOutline}`},"&[disabled]":{color:re.colorTextDisabled,backgroundColor:re.colorBgContainerDisabled,borderColor:re.colorBorder,cursor:"not-allowed"}}}}},Ge=re=>{const{componentCls:fe}=re;return{[`${fe}-jump-prev, ${fe}-jump-next`]:{outline:0,[`${fe}-item-container`]:{position:"relative",[`${fe}-item-link-icon`]:{color:re.colorPrimary,fontSize:re.fontSizeSM,opacity:0,transition:`all ${re.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${fe}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:re.colorTextDisabled,letterSpacing:re.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:re.paginationEllipsisTextIndent,opacity:1,transition:`all ${re.motionDurationMid}`}},"&:hover":{[`${fe}-item-link-icon`]:{opacity:1},[`${fe}-item-ellipsis`]:{opacity:0}}},[`
${fe}-prev,
${fe}-jump-prev,
${fe}-jump-next
`]:{marginInlineEnd:re.marginXS},[`
${fe}-prev,
${fe}-next,
${fe}-jump-prev,
${fe}-jump-next
`]:{display:"inline-block",minWidth:re.itemSize,height:re.itemSize,color:re.colorText,fontFamily:re.fontFamily,lineHeight:(0,lt.unit)(re.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:re.borderRadius,cursor:"pointer",transition:`all ${re.motionDurationMid}`},[`${fe}-prev, ${fe}-next`]:{outline:0,button:{color:re.colorText,cursor:"pointer",userSelect:"none"},[`${fe}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:re.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${(0,lt.unit)(re.lineWidth)} ${re.lineType} transparent`,borderRadius:re.borderRadius,outline:"none",transition:`all ${re.motionDurationMid}`},[`&:hover ${fe}-item-link`]:{backgroundColor:re.colorBgTextHover},[`&:active ${fe}-item-link`]:{backgroundColor:re.colorBgTextActive},[`&${fe}-disabled:hover`]:{[`${fe}-item-link`]:{backgroundColor:"transparent"}}},[`${fe}-slash`]:{marginInlineEnd:re.paginationSlashMarginInlineEnd,marginInlineStart:re.paginationSlashMarginInlineStart},[`${fe}-options`]:{display:"inline-block",marginInlineStart:re.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:re.controlHeight,marginInlineStart:re.marginXS,lineHeight:(0,lt.unit)(re.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},(0,ke.ik)(re)),(0,et.$U)(re,{borderColor:re.colorBorder,hoverBorderColor:re.colorPrimaryHover,activeBorderColor:re.colorPrimary,activeShadow:re.activeShadow})),{"&[disabled]":Object.assign({},(0,et.Xy)(re)),width:re.calc(re.controlHeightLG).mul(1.25).equal(),height:re.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:re.marginXS,marginInlineEnd:re.marginXS})}}}},Ne=re=>{const{componentCls:fe}=re;return{[`${fe}-item`]:{display:"inline-block",minWidth:re.itemSize,height:re.itemSize,marginInlineEnd:re.marginXS,fontFamily:re.fontFamily,lineHeight:(0,lt.unit)(re.calc(re.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:re.itemBg,border:`${(0,lt.unit)(re.lineWidth)} ${re.lineType} transparent`,borderRadius:re.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${(0,lt.unit)(re.paginationItemPaddingInline)}`,color:re.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${fe}-item-active)`]:{"&:hover":{transition:`all ${re.motionDurationMid}`,backgroundColor:re.colorBgTextHover},"&:active":{backgroundColor:re.colorBgTextActive}},"&-active":{fontWeight:re.fontWeightStrong,backgroundColor:re.itemActiveBg,borderColor:re.colorPrimary,a:{color:re.colorPrimary},"&:hover":{borderColor:re.colorPrimaryHover},"&:hover a":{color:re.colorPrimaryHover}}}}},Ie=re=>{const{componentCls:fe}=re;return{[fe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,_t.Wf)(re)),{display:"flex","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${fe}-total-text`]:{display:"inline-block",height:re.itemSize,marginInlineEnd:re.marginXS,lineHeight:(0,lt.unit)(re.calc(re.itemSize).sub(2).equal()),verticalAlign:"middle"}}),Ne(re)),Ge(re)),Xe(re)),Nt(re)),rt(re)),{[`@media only screen and (max-width: ${re.screenLG}px)`]:{[`${fe}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${re.screenSM}px)`]:{[`${fe}-options`]:{display:"none"}}}),[`&${re.componentCls}-rtl`]:{direction:"rtl"}}},te=re=>{const{componentCls:fe}=re;return{[`${fe}:not(${fe}-disabled)`]:{[`${fe}-item`]:Object.assign({},(0,_t.Qy)(re)),[`${fe}-jump-prev, ${fe}-jump-next`]:{"&:focus-visible":Object.assign({[`${fe}-item-link-icon`]:{opacity:1},[`${fe}-item-ellipsis`]:{opacity:0}},(0,_t.oN)(re))},[`${fe}-prev, ${fe}-next`]:{[`&:focus-visible ${fe}-item-link`]:Object.assign({},(0,_t.oN)(re))}}}},$e=re=>Object.assign({itemBg:re.colorBgContainer,itemSize:re.controlHeight,itemSizeSM:re.controlHeightSM,itemActiveBg:re.colorBgContainer,itemLinkBg:re.colorBgContainer,itemActiveColorDisabled:re.colorTextDisabled,itemActiveBgDisabled:re.controlItemBgActiveDisabled,itemInputBg:re.colorBgContainer,miniOptionsSizeChangerTop:0},(0,Ye.T)(re)),Ae=re=>(0,Re.mergeToken)(re,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:re.calc(re.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:re.calc(re.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:re.calc(re.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:re.calc(re.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:re.marginSM,paginationSlashMarginInlineEnd:re.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Ye.e)(re));var Z=(0,At.I$)("Pagination",re=>{const fe=Ae(re);return[Ie(fe),te(fe)]},$e);const D=re=>{const{componentCls:fe}=re;return{[`${fe}${fe}-bordered${fe}-disabled:not(${fe}-mini)`]:{"&, &:hover":{[`${fe}-item-link`]:{borderColor:re.colorBorder}},"&:focus-visible":{[`${fe}-item-link`]:{borderColor:re.colorBorder}},[`${fe}-item, ${fe}-item-link`]:{backgroundColor:re.colorBgContainerDisabled,borderColor:re.colorBorder,[`&:hover:not(${fe}-item-active)`]:{backgroundColor:re.colorBgContainerDisabled,borderColor:re.colorBorder,a:{color:re.colorTextDisabled}},[`&${fe}-item-active`]:{backgroundColor:re.itemActiveBgDisabled}},[`${fe}-prev, ${fe}-next`]:{"&:hover button":{backgroundColor:re.colorBgContainerDisabled,borderColor:re.colorBorder,color:re.colorTextDisabled},[`${fe}-item-link`]:{backgroundColor:re.colorBgContainerDisabled,borderColor:re.colorBorder}}},[`${fe}${fe}-bordered:not(${fe}-mini)`]:{[`${fe}-prev, ${fe}-next`]:{"&:hover button":{borderColor:re.colorPrimaryHover,backgroundColor:re.itemBg},[`${fe}-item-link`]:{backgroundColor:re.itemLinkBg,borderColor:re.colorBorder},[`&:hover ${fe}-item-link`]:{borderColor:re.colorPrimary,backgroundColor:re.itemBg,color:re.colorPrimary},[`&${fe}-disabled`]:{[`${fe}-item-link`]:{borderColor:re.colorBorder,color:re.colorTextDisabled}}},[`${fe}-item`]:{backgroundColor:re.itemBg,border:`${(0,lt.unit)(re.lineWidth)} ${re.lineType} ${re.colorBorder}`,[`&:hover:not(${fe}-item-active)`]:{borderColor:re.colorPrimary,backgroundColor:re.itemBg,a:{color:re.colorPrimary}},"&-active":{borderColor:re.colorPrimary}}}}};var he=(0,At.bk)(["Pagination","bordered"],re=>{const fe=Ae(re);return[D(fe)]},$e);function _e(re){return(0,c.useMemo)(()=>typeof re=="boolean"?[re,{}]:re&&typeof re=="object"?[!0,re]:[void 0,void 0],[re])}var pe=function(re,fe){var st={};for(var tt in re)Object.prototype.hasOwnProperty.call(re,tt)&&fe.indexOf(tt)<0&&(st[tt]=re[tt]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,tt=Object.getOwnPropertySymbols(re);ct<tt.length;ct++)fe.indexOf(tt[ct])<0&&Object.prototype.propertyIsEnumerable.call(re,tt[ct])&&(st[tt[ct]]=re[tt[ct]]);return st},Oe=re=>{const{align:fe,prefixCls:st,selectPrefixCls:tt,className:ct,rootClassName:ut,style:Ue,size:xt,locale:dt,responsive:gt,showSizeChanger:kt,selectComponentClass:w,pageSizeOptions:O}=re,qe=pe(re,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:oe}=(0,C.Z)(gt),[,xe]=(0,je.ZP)(),{getPrefixCls:jt,direction:Qe,showSizeChanger:at,className:bt,style:ge}=(0,Q.dj)("pagination"),ye=jt("pagination",st),[Fe,ze,q]=Z(ye),Mt=(0,E.Z)(xt),Be=Mt==="small"||!!(oe&&!Mt&&gt),[Gt]=(0,Y.Z)("Pagination",ae.Z),pn=Object.assign(Object.assign({},Gt),dt),[En,sr]=_e(kt),[Xn,Wn]=_e(at),Cr=En!=null?En:Xn,Rr=sr!=null?sr:Wn,Qn=w||be.default,gr=c.useMemo(()=>O?O.map(Et=>Number(Et)):void 0,[O]),Cn=Et=>{var wt;const{disabled:Me,size:nt,onSizeChange:vt,"aria-label":yt,className:Tt,options:Jt}=Et,{className:mn,onChange:yn}=Rr||{},Wt=(wt=Jt.find(gn=>String(gn.value)===String(nt)))===null||wt===void 0?void 0:wt.value;return c.createElement(Qn,Object.assign({disabled:Me,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:gn=>gn.parentNode,"aria-label":yt,options:Jt},Rr,{value:Wt,onChange:(gn,Ln)=>{vt==null||vt(gn),yn==null||yn(gn,Ln)},size:Be?"small":"middle",className:S()(Tt,mn)}))},tn=c.useMemo(()=>{const Et=c.createElement("span",{className:`${ye}-item-ellipsis`},"\u2022\u2022\u2022"),wt=c.createElement("button",{className:`${ye}-item-link`,type:"button",tabIndex:-1},Qe==="rtl"?c.createElement(L.Z,null):c.createElement(x.Z,null)),Me=c.createElement("button",{className:`${ye}-item-link`,type:"button",tabIndex:-1},Qe==="rtl"?c.createElement(x.Z,null):c.createElement(L.Z,null)),nt=c.createElement("a",{className:`${ye}-item-link`},c.createElement("div",{className:`${ye}-item-container`},Qe==="rtl"?c.createElement(o.Z,{className:`${ye}-item-link-icon`}):c.createElement(X,{className:`${ye}-item-link-icon`}),Et)),vt=c.createElement("a",{className:`${ye}-item-link`},c.createElement("div",{className:`${ye}-item-container`},Qe==="rtl"?c.createElement(X,{className:`${ye}-item-link-icon`}):c.createElement(o.Z,{className:`${ye}-item-link-icon`}),Et));return{prevIcon:wt,nextIcon:Me,jumpPrevIcon:nt,jumpNextIcon:vt}},[Qe,ye]),dn=jt("select",tt),Vn=S()({[`${ye}-${fe}`]:!!fe,[`${ye}-mini`]:Be,[`${ye}-rtl`]:Qe==="rtl",[`${ye}-bordered`]:xe.wireframe},bt,ct,ut,ze,q),vr=Object.assign(Object.assign({},ge),Ue);return Fe(c.createElement(c.Fragment,null,xe.wireframe&&c.createElement(he,{prefixCls:ye}),c.createElement(de,Object.assign({},tn,qe,{style:vr,prefixCls:ye,selectPrefixCls:dn,className:Vn,locale:pn,pageSizeOptions:gr,showSizeChanger:Cr,sizeChangerRender:Cn}))))},Ze=Oe},47889:function(un,We,m){"use strict";m.d(We,{ZP:function(){return lt}});var c=m(59301),ee=m(92310),$=m.n(ee),ie=m(18929),F=m(26112),g=m(48755),J=m(83397),X=m(31756);const o=c.createContext(null),x=o.Provider;var L=o;const b=c.createContext(null),S=b.Provider;var T=m(16632),B=m(8654),z=m(12919),j=m(63872),U=m(74632),A=m(2171),K=m(56553),I=m(36237),M=m(63356),le=m(16931),me=m(51636);const ce=ke=>{const{componentCls:Ye,antCls:et}=ke,_t=`${Ye}-group`;return{[_t]:Object.assign(Object.assign({},(0,M.Wf)(ke)),{display:"inline-block",fontSize:0,[`&${_t}-rtl`]:{direction:"rtl"},[`&${_t}-block`]:{display:"flex"},[`${et}-badge ${et}-badge-count`]:{zIndex:1},[`> ${et}-badge:not(:first-child) > ${et}-button-wrapper`]:{borderInlineStart:"none"}})}},De=ke=>{const{componentCls:Ye,wrapperMarginInlineEnd:et,colorPrimary:_t,radioSize:Re,motionDurationSlow:At,motionDurationMid:rt,motionEaseInOutCirc:Nt,colorBgContainer:Xe,colorBorder:Ge,lineWidth:Ne,colorBgContainerDisabled:Ie,colorTextDisabled:te,paddingXS:$e,dotColorDisabled:Ae,lineType:Z,radioColor:D,radioBgColor:he,calc:_e}=ke,pe=`${Ye}-inner`,Oe=_e(Re).sub(_e(4).mul(2)),Ze=_e(1).mul(Re).equal({unit:!0});return{[`${Ye}-wrapper`]:Object.assign(Object.assign({},(0,M.Wf)(ke)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:et,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${Ye}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:ke.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${Ye}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${(0,I.unit)(Ne)} ${Z} ${_t}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[Ye]:Object.assign(Object.assign({},(0,M.Wf)(ke)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${Ye}-wrapper:hover &,
&:hover ${pe}`]:{borderColor:_t},[`${Ye}-input:focus-visible + ${pe}`]:Object.assign({},(0,M.oN)(ke)),[`${Ye}:hover::after, ${Ye}-wrapper:hover &::after`]:{visibility:"visible"},[`${Ye}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Ze,height:Ze,marginBlockStart:_e(1).mul(Re).div(-2).equal({unit:!0}),marginInlineStart:_e(1).mul(Re).div(-2).equal({unit:!0}),backgroundColor:D,borderBlockStart:0,borderInlineStart:0,borderRadius:Ze,transform:"scale(0)",opacity:0,transition:`all ${At} ${Nt}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Ze,height:Ze,backgroundColor:Xe,borderColor:Ge,borderStyle:"solid",borderWidth:Ne,borderRadius:"50%",transition:`all ${rt}`},[`${Ye}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${Ye}-checked`]:{[pe]:{borderColor:_t,backgroundColor:he,"&::after":{transform:`scale(${ke.calc(ke.dotSize).div(Re).equal()})`,opacity:1,transition:`all ${At} ${Nt}`}}},[`${Ye}-disabled`]:{cursor:"not-allowed",[pe]:{backgroundColor:Ie,borderColor:Ge,cursor:"not-allowed","&::after":{backgroundColor:Ae}},[`${Ye}-input`]:{cursor:"not-allowed"},[`${Ye}-disabled + span`]:{color:te,cursor:"not-allowed"},[`&${Ye}-checked`]:{[pe]:{"&::after":{transform:`scale(${_e(Oe).div(Re).equal()})`}}}},[`span${Ye} + *`]:{paddingInlineStart:$e,paddingInlineEnd:$e}})}},Pe=ke=>{const{buttonColor:Ye,controlHeight:et,componentCls:_t,lineWidth:Re,lineType:At,colorBorder:rt,motionDurationSlow:Nt,motionDurationMid:Xe,buttonPaddingInline:Ge,fontSize:Ne,buttonBg:Ie,fontSizeLG:te,controlHeightLG:$e,controlHeightSM:Ae,paddingXS:Z,borderRadius:D,borderRadiusSM:he,borderRadiusLG:_e,buttonCheckedBg:pe,buttonSolidCheckedColor:Ee,colorTextDisabled:Oe,colorBgContainerDisabled:Ze,buttonCheckedBgDisabled:re,buttonCheckedColorDisabled:fe,colorPrimary:st,colorPrimaryHover:tt,colorPrimaryActive:ct,buttonSolidCheckedBg:ut,buttonSolidCheckedHoverBg:Ue,buttonSolidCheckedActiveBg:xt,calc:dt}=ke;return{[`${_t}-button-wrapper`]:{position:"relative",display:"inline-block",height:et,margin:0,paddingInline:Ge,paddingBlock:0,color:Ye,fontSize:Ne,lineHeight:(0,I.unit)(dt(et).sub(dt(Re).mul(2)).equal()),background:Ie,border:`${(0,I.unit)(Re)} ${At} ${rt}`,borderBlockStartWidth:dt(Re).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:Re,cursor:"pointer",transition:[`color ${Xe}`,`background ${Xe}`,`box-shadow ${Xe}`].join(","),a:{color:Ye},[`> ${_t}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:dt(Re).mul(-1).equal(),insetInlineStart:dt(Re).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Re,paddingInline:0,backgroundColor:rt,transition:`background-color ${Nt}`,content:'""'}},"&:first-child":{borderInlineStart:`${(0,I.unit)(Re)} ${At} ${rt}`,borderStartStartRadius:D,borderEndStartRadius:D},"&:last-child":{borderStartEndRadius:D,borderEndEndRadius:D},"&:first-child:last-child":{borderRadius:D},[`${_t}-group-large &`]:{height:$e,fontSize:te,lineHeight:(0,I.unit)(dt($e).sub(dt(Re).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_e,borderEndStartRadius:_e},"&:last-child":{borderStartEndRadius:_e,borderEndEndRadius:_e}},[`${_t}-group-small &`]:{height:Ae,paddingInline:dt(Z).sub(Re).equal(),paddingBlock:0,lineHeight:(0,I.unit)(dt(Ae).sub(dt(Re).mul(2)).equal()),"&:first-child":{borderStartStartRadius:he,borderEndStartRadius:he},"&:last-child":{borderStartEndRadius:he,borderEndEndRadius:he}},"&:hover":{position:"relative",color:st},"&:has(:focus-visible)":Object.assign({},(0,M.oN)(ke)),[`${_t}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${_t}-button-wrapper-disabled)`]:{zIndex:1,color:st,background:pe,borderColor:st,"&::before":{backgroundColor:st},"&:first-child":{borderColor:st},"&:hover":{color:tt,borderColor:tt,"&::before":{backgroundColor:tt}},"&:active":{color:ct,borderColor:ct,"&::before":{backgroundColor:ct}}},[`${_t}-group-solid &-checked:not(${_t}-button-wrapper-disabled)`]:{color:Ee,background:ut,borderColor:ut,"&:hover":{color:Ee,background:Ue,borderColor:Ue},"&:active":{color:Ee,background:xt,borderColor:xt}},"&-disabled":{color:Oe,backgroundColor:Ze,borderColor:rt,cursor:"not-allowed","&:first-child, &:hover":{color:Oe,backgroundColor:Ze,borderColor:rt}},[`&-disabled${_t}-button-wrapper-checked`]:{color:fe,backgroundColor:re,borderColor:rt,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},Ce=ke=>{const{wireframe:Ye,padding:et,marginXS:_t,lineWidth:Re,fontSizeLG:At,colorText:rt,colorBgContainer:Nt,colorTextDisabled:Xe,controlItemBgActiveDisabled:Ge,colorTextLightSolid:Ne,colorPrimary:Ie,colorPrimaryHover:te,colorPrimaryActive:$e,colorWhite:Ae}=ke,Z=4,D=At,he=Ye?D-Z*2:D-(Z+Re)*2;return{radioSize:D,dotSize:he,dotColorDisabled:Xe,buttonSolidCheckedColor:Ne,buttonSolidCheckedBg:Ie,buttonSolidCheckedHoverBg:te,buttonSolidCheckedActiveBg:$e,buttonBg:Nt,buttonCheckedBg:Nt,buttonColor:rt,buttonCheckedBgDisabled:Ge,buttonCheckedColorDisabled:Xe,buttonPaddingInline:et-Re,wrapperMarginInlineEnd:_t,radioColor:Ye?Ie:Ae,radioBgColor:Ye?Nt:Ie}};var He=(0,le.I$)("Radio",ke=>{const{controlOutline:Ye,controlOutlineWidth:et}=ke,_t=`0 0 0 ${(0,I.unit)(et)} ${Ye}`,Re=_t,At=(0,me.mergeToken)(ke,{radioFocusShadow:_t,radioButtonFocusShadow:Re});return[ce(At),De(At),Pe(At)]},Ce,{unitless:{radioSize:!0,dotSize:!0}}),ue=function(ke,Ye){var et={};for(var _t in ke)Object.prototype.hasOwnProperty.call(ke,_t)&&Ye.indexOf(_t)<0&&(et[_t]=ke[_t]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,_t=Object.getOwnPropertySymbols(ke);Re<_t.length;Re++)Ye.indexOf(_t[Re])<0&&Object.prototype.propertyIsEnumerable.call(ke,_t[Re])&&(et[_t[Re]]=ke[_t[Re]]);return et};const W=(ke,Ye)=>{var et,_t;const Re=c.useContext(L),At=c.useContext(b),{getPrefixCls:rt,direction:Nt,radio:Xe}=c.useContext(g.E_),Ge=c.useRef(null),Ne=(0,B.sQ)(Ye,Ge),{isFormItemInput:Ie}=c.useContext(K.aM),te=gt=>{var kt,w;(kt=ke.onChange)===null||kt===void 0||kt.call(ke,gt),(w=Re==null?void 0:Re.onChange)===null||w===void 0||w.call(Re,gt)},{prefixCls:$e,className:Ae,rootClassName:Z,children:D,style:he,title:_e}=ke,pe=ue(ke,["prefixCls","className","rootClassName","children","style","title"]),Ee=rt("radio",$e),Oe=((Re==null?void 0:Re.optionType)||At)==="button",Ze=Oe?`${Ee}-button`:Ee,re=(0,J.Z)(Ee),[fe,st,tt]=He(Ee,re),ct=Object.assign({},pe),ut=c.useContext(A.Z);Re&&(ct.name=Re.name,ct.onChange=te,ct.checked=ke.value===Re.value,ct.disabled=(et=ct.disabled)!==null&&et!==void 0?et:Re.disabled),ct.disabled=(_t=ct.disabled)!==null&&_t!==void 0?_t:ut;const Ue=$()(`${Ze}-wrapper`,{[`${Ze}-wrapper-checked`]:ct.checked,[`${Ze}-wrapper-disabled`]:ct.disabled,[`${Ze}-wrapper-rtl`]:Nt==="rtl",[`${Ze}-wrapper-in-form-item`]:Ie,[`${Ze}-wrapper-block`]:!!(Re!=null&&Re.block)},Xe==null?void 0:Xe.className,Ae,Z,st,tt,re),[xt,dt]=(0,U.Z)(ct.onClick);return fe(c.createElement(z.Z,{component:"Radio",disabled:ct.disabled},c.createElement("label",{className:Ue,style:Object.assign(Object.assign({},Xe==null?void 0:Xe.style),he),onMouseEnter:ke.onMouseEnter,onMouseLeave:ke.onMouseLeave,title:_e,onClick:xt},c.createElement(T.Z,Object.assign({},ct,{className:$()(ct.className,{[j.A]:!Oe}),type:"radio",prefixCls:Ze,ref:Ne,onClick:dt})),D!==void 0?c.createElement("span",{className:`${Ze}-label`},D):null)))};var de=c.forwardRef(W),ae=m(80402);const Q=c.forwardRef((ke,Ye)=>{const{getPrefixCls:et,direction:_t}=c.useContext(g.E_),Re=(0,ae.Z)(),{prefixCls:At,className:rt,rootClassName:Nt,options:Xe,buttonStyle:Ge="outline",disabled:Ne,children:Ie,size:te,style:$e,id:Ae,optionType:Z,name:D=Re,defaultValue:he,value:_e,block:pe=!1,onChange:Ee,onMouseEnter:Oe,onMouseLeave:Ze,onFocus:re,onBlur:fe}=ke,[st,tt]=(0,ie.Z)(he,{value:_e}),ct=c.useCallback(xe=>{const jt=st,Qe=xe.target.value;"value"in ke||tt(Qe),Qe!==jt&&(Ee==null||Ee(xe))},[st,tt,Ee]),ut=et("radio",At),Ue=`${ut}-group`,xt=(0,J.Z)(ut),[dt,gt,kt]=He(ut,xt);let w=Ie;Xe&&Xe.length>0&&(w=Xe.map(xe=>typeof xe=="string"||typeof xe=="number"?c.createElement(de,{key:xe.toString(),prefixCls:ut,disabled:Ne,value:xe,checked:st===xe},xe):c.createElement(de,{key:`radio-group-value-options-${xe.value}`,prefixCls:ut,disabled:xe.disabled||Ne,value:xe.value,checked:st===xe.value,title:xe.title,style:xe.style,id:xe.id,required:xe.required},xe.label)));const O=(0,X.Z)(te),qe=$()(Ue,`${Ue}-${Ge}`,{[`${Ue}-${O}`]:O,[`${Ue}-rtl`]:_t==="rtl",[`${Ue}-block`]:pe},rt,Nt,gt,kt,xt),oe=c.useMemo(()=>({onChange:ct,value:st,disabled:Ne,name:D,optionType:Z,block:pe}),[ct,st,Ne,D,Z,pe]);return dt(c.createElement("div",Object.assign({},(0,F.Z)(ke,{aria:!0,data:!0}),{className:qe,style:$e,onMouseEnter:Oe,onMouseLeave:Ze,onFocus:re,onBlur:fe,id:Ae,ref:Ye}),c.createElement(x,{value:oe},w)))});var E=c.memo(Q),C=function(ke,Ye){var et={};for(var _t in ke)Object.prototype.hasOwnProperty.call(ke,_t)&&Ye.indexOf(_t)<0&&(et[_t]=ke[_t]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,_t=Object.getOwnPropertySymbols(ke);Re<_t.length;Re++)Ye.indexOf(_t[Re])<0&&Object.prototype.propertyIsEnumerable.call(ke,_t[Re])&&(et[_t[Re]]=ke[_t[Re]]);return et};const Y=(ke,Ye)=>{const{getPrefixCls:et}=c.useContext(g.E_),{prefixCls:_t}=ke,Re=C(ke,["prefixCls"]),At=et("radio",_t);return c.createElement(S,{value:"button"},c.createElement(de,Object.assign({prefixCls:At},Re,{type:"radio",ref:Ye})))};var be=c.forwardRef(Y);const je=de;je.Button=be,je.Group=E,je.__ANT_RADIO=!0;var lt=je},82326:function(un,We,m){"use strict";var c=m(59301),ee=m(92310),$=m.n(ee),ie=m(37463),F=m(2738),g=m(75030),J=m(86641),X=m(45915),o=m(82855),x=m(48755),L=m(38406),b=m(2171),S=m(83397),T=m(31756),B=m(56553),z=m(24971),j=m(70045),U=m(57700),A=m(1722),K=m(90376),I=m(68525),M=m(90005),le=function(Ce,He){var ue={};for(var W in Ce)Object.prototype.hasOwnProperty.call(Ce,W)&&He.indexOf(W)<0&&(ue[W]=Ce[W]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var P=0,W=Object.getOwnPropertySymbols(Ce);P<W.length;P++)He.indexOf(W[P])<0&&Object.prototype.propertyIsEnumerable.call(Ce,W[P])&&(ue[W[P]]=Ce[W[P]]);return ue};const me="SECRET_COMBOBOX_MODE_DO_NOT_USE",ce=(Ce,He)=>{var ue;const{prefixCls:W,bordered:P,className:de,rootClassName:ae,getPopupContainer:Q,popupClassName:E,dropdownClassName:C,listHeight:Y=256,placement:be,listItemHeight:je,size:lt,disabled:ke,notFoundContent:Ye,status:et,builtinPlacements:_t,dropdownMatchSelectWidth:Re,popupMatchSelectWidth:At,direction:rt,style:Nt,allowClear:Xe,variant:Ge,dropdownStyle:Ne,transitionName:Ie,tagRender:te,maxCount:$e,prefix:Ae}=Ce,Z=le(Ce,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:D,getPrefixCls:he,renderEmpty:_e,direction:pe,virtual:Ee,popupMatchSelectWidth:Oe,popupOverflow:Ze}=c.useContext(x.E_),re=(0,x.dj)("select"),[,fe]=(0,U.ZP)(),st=je!=null?je:fe==null?void 0:fe.controlHeight,tt=he("select",W),ct=he(),ut=rt!=null?rt:pe,{compactSize:Ue,compactItemClassnames:xt}=(0,j.ri)(tt,ut),[dt,gt]=(0,z.Z)("select",Ge,P),kt=(0,S.Z)(tt),[w,O,qe]=(0,K.Z)(tt,kt),oe=c.useMemo(()=>{const{mode:Cn}=Ce;if(Cn!=="combobox")return Cn===me?"combobox":Cn},[Ce.mode]),xe=oe==="multiple"||oe==="tags",jt=(0,M.Z)(Ce.suffixIcon,Ce.showArrow),Qe=(ue=At!=null?At:Re)!==null&&ue!==void 0?ue:Oe,{status:at,hasFeedback:bt,isFormItemInput:ge,feedbackIcon:ye}=c.useContext(B.aM),Fe=(0,o.F)(at,et);let ze;Ye!==void 0?ze=Ye:oe==="combobox"?ze=null:ze=(_e==null?void 0:_e("Select"))||c.createElement(L.Z,{componentName:"Select"});const{suffixIcon:q,itemIcon:Mt,removeIcon:Be,clearIcon:Gt}=(0,I.Z)(Object.assign(Object.assign({},Z),{multiple:xe,hasFeedback:bt,feedbackIcon:ye,showSuffixIcon:jt,prefixCls:tt,componentName:"Select"})),pn=Xe===!0?{clearIcon:Gt}:Xe,En=(0,F.Z)(Z,["suffixIcon","itemIcon"]),sr=$()(E||C,{[`${tt}-dropdown-${ut}`]:ut==="rtl"},ae,qe,kt,O),Xn=(0,T.Z)(Cn=>{var tn;return(tn=lt!=null?lt:Ue)!==null&&tn!==void 0?tn:Cn}),Wn=c.useContext(b.Z),Cr=ke!=null?ke:Wn,Rr=$()({[`${tt}-lg`]:Xn==="large",[`${tt}-sm`]:Xn==="small",[`${tt}-rtl`]:ut==="rtl",[`${tt}-${dt}`]:gt,[`${tt}-in-form-item`]:ge},(0,o.Z)(tt,Fe,bt),xt,re.className,de,ae,qe,kt,O),Qn=c.useMemo(()=>be!==void 0?be:ut==="rtl"?"bottomRight":"bottomLeft",[be,ut]),[gr]=(0,g.Cn)("SelectLike",Ne==null?void 0:Ne.zIndex);return w(c.createElement(ie.ZP,Object.assign({ref:He,virtual:Ee,showSearch:re.showSearch},En,{style:Object.assign(Object.assign({},re.style),Nt),dropdownMatchSelectWidth:Qe,transitionName:(0,J.m)(ct,"slide-up",Ie),builtinPlacements:(0,A.Z)(_t,Ze),listHeight:Y,listItemHeight:st,mode:oe,prefixCls:tt,placement:Qn,direction:ut,prefix:Ae,suffixIcon:q,menuItemSelectedIcon:Mt,removeIcon:Be,allowClear:pn,notFoundContent:ze,className:Rr,getPopupContainer:Q||D,dropdownClassName:sr,disabled:Cr,dropdownStyle:Object.assign(Object.assign({},Ne),{zIndex:gr}),maxCount:xe?$e:void 0,tagRender:xe?te:void 0})))},De=c.forwardRef(ce),Pe=(0,X.Z)(De,"dropdownAlign");De.SECRET_COMBOBOX_MODE_DO_NOT_USE=me,De.Option=ie.Wx,De.OptGroup=ie.Xo,De._InternalPanelDoNotUseOrYouWillBeFired=Pe,We.default=De},1722:function(un,We){"use strict";const m=ee=>{const ie={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:ee==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},ie),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},ie),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},ie),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},ie),{points:["br","tr"],offset:[0,-4]})}};function c(ee,$){return ee||m($)}We.Z=c},90376:function(un,We,m){"use strict";m.d(We,{Z:function(){return W}});var c=m(63356),ee=m(56119),$=m(16931),ie=m(51636),F=m(46e3),g=m(93873);const J=P=>{const{optionHeight:de,optionFontSize:ae,optionLineHeight:Q,optionPadding:E}=P;return{position:"relative",display:"block",minHeight:de,padding:E,color:P.colorText,fontWeight:"normal",fontSize:ae,lineHeight:Q,boxSizing:"border-box"}};var o=P=>{const{antCls:de,componentCls:ae}=P,Q=`${ae}-item`,E=`&${de}-slide-up-enter${de}-slide-up-enter-active`,C=`&${de}-slide-up-appear${de}-slide-up-appear-active`,Y=`&${de}-slide-up-leave${de}-slide-up-leave-active`,be=`${ae}-dropdown-placement-`,je=`${Q}-option-selected`;return[{[`${ae}-dropdown`]:Object.assign(Object.assign({},(0,c.Wf)(P)),{position:"absolute",top:-9999,zIndex:P.zIndexPopup,boxSizing:"border-box",padding:P.paddingXXS,overflow:"hidden",fontSize:P.fontSize,fontVariant:"initial",backgroundColor:P.colorBgElevated,borderRadius:P.borderRadiusLG,outline:"none",boxShadow:P.boxShadowSecondary,[`
${E}${be}bottomLeft,
${C}${be}bottomLeft
`]:{animationName:F.fJ},[`
${E}${be}topLeft,
${C}${be}topLeft,
${E}${be}topRight,
${C}${be}topRight
`]:{animationName:F.Qt},[`${Y}${be}bottomLeft`]:{animationName:F.Uw},[`
${Y}${be}topLeft,
${Y}${be}topRight
`]:{animationName:F.ly},"&-hidden":{display:"none"},[Q]:Object.assign(Object.assign({},J(P)),{cursor:"pointer",transition:`background ${P.motionDurationSlow} ease`,borderRadius:P.borderRadiusSM,"&-group":{color:P.colorTextDescription,fontSize:P.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},c.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Q}-option-disabled)`]:{backgroundColor:P.optionActiveBg},[`&-selected:not(${Q}-option-disabled)`]:{color:P.optionSelectedColor,fontWeight:P.optionSelectedFontWeight,backgroundColor:P.optionSelectedBg,[`${Q}-option-state`]:{color:P.colorPrimary}},"&-disabled":{[`&${Q}-option-selected`]:{backgroundColor:P.colorBgContainerDisabled},color:P.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:P.calc(P.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},J(P)),{color:P.colorTextDisabled})}),[`${je}:has(+ ${je})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${je}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},(0,F.oN)(P,"slide-up"),(0,F.oN)(P,"slide-down"),(0,g.Fm)(P,"move-up"),(0,g.Fm)(P,"move-down")]},x=m(26743),L=m(36237);function b(P,de){const{componentCls:ae,inputPaddingHorizontalBase:Q,borderRadius:E}=P,C=P.calc(P.controlHeight).sub(P.calc(P.lineWidth).mul(2)).equal(),Y=de?`${ae}-${de}`:"";return{[`${ae}-single${Y}`]:{fontSize:P.fontSize,height:P.controlHeight,[`${ae}-selector`]:Object.assign(Object.assign({},(0,c.Wf)(P,!0)),{display:"flex",borderRadius:E,flex:"1 1 auto",[`${ae}-selection-wrap:after`]:{lineHeight:(0,L.unit)(C)},[`${ae}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
${ae}-selection-item,
${ae}-selection-placeholder
`]:{display:"block",padding:0,lineHeight:(0,L.unit)(C),transition:`all ${P.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${ae}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${ae}-selection-item:empty:after`,`${ae}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${ae}-show-arrow ${ae}-selection-item,
&${ae}-show-arrow ${ae}-selection-search,
&${ae}-show-arrow ${ae}-selection-placeholder
`]:{paddingInlineEnd:P.showArrowPaddingInlineEnd},[`&${ae}-open ${ae}-selection-item`]:{color:P.colorTextPlaceholder},[`&:not(${ae}-customize-input)`]:{[`${ae}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${(0,L.unit)(Q)}`,[`${ae}-selection-search-input`]:{height:C,fontSize:P.fontSize},"&:after":{lineHeight:(0,L.unit)(C)}}},[`&${ae}-customize-input`]:{[`${ae}-selector`]:{"&:after":{display:"none"},[`${ae}-selection-search`]:{position:"static",width:"100%"},[`${ae}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${(0,L.unit)(Q)}`,"&:after":{display:"none"}}}}}}}function S(P){const{componentCls:de}=P,ae=P.calc(P.controlPaddingHorizontalSM).sub(P.lineWidth).equal();return[b(P),b((0,ie.mergeToken)(P,{controlHeight:P.controlHeightSM,borderRadius:P.borderRadiusSM}),"sm"),{[`${de}-single${de}-sm`]:{[`&:not(${de}-customize-input)`]:{[`${de}-selector`]:{padding:`0 ${(0,L.unit)(ae)}`},[`&${de}-show-arrow ${de}-selection-search`]:{insetInlineEnd:P.calc(ae).add(P.calc(P.fontSize).mul(1.5)).equal()},[`
&${de}-show-arrow ${de}-selection-item,
&${de}-show-arrow ${de}-selection-placeholder
`]:{paddingInlineEnd:P.calc(P.fontSize).mul(1.5).equal()}}}},b((0,ie.mergeToken)(P,{controlHeight:P.singleItemHeightLG,fontSize:P.fontSizeLG,borderRadius:P.borderRadiusLG}),"lg")]}const T=P=>{const{fontSize:de,lineHeight:ae,lineWidth:Q,controlHeight:E,controlHeightSM:C,controlHeightLG:Y,paddingXXS:be,controlPaddingHorizontal:je,zIndexPopupBase:lt,colorText:ke,fontWeightStrong:Ye,controlItemBgActive:et,controlItemBgHover:_t,colorBgContainer:Re,colorFillSecondary:At,colorBgContainerDisabled:rt,colorTextDisabled:Nt,colorPrimaryHover:Xe,colorPrimary:Ge,controlOutline:Ne}=P,Ie=be*2,te=Q*2,$e=Math.min(E-Ie,E-te),Ae=Math.min(C-Ie,C-te),Z=Math.min(Y-Ie,Y-te);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(be/2),zIndexPopup:lt+50,optionSelectedColor:ke,optionSelectedFontWeight:Ye,optionSelectedBg:et,optionActiveBg:_t,optionPadding:`${(E-de*ae)/2}px ${je}px`,optionFontSize:de,optionLineHeight:ae,optionHeight:E,selectorBg:Re,clearBg:Re,singleItemHeightLG:Y,multipleItemBg:At,multipleItemBorderColor:"transparent",multipleItemHeight:$e,multipleItemHeightSM:Ae,multipleItemHeightLG:Z,multipleSelectorBgDisabled:rt,multipleItemColorDisabled:Nt,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(P.fontSize*1.25),hoverBorderColor:Xe,activeBorderColor:Ge,activeOutlineColor:Ne,selectAffixPadding:be}},B=(P,de)=>{const{componentCls:ae,antCls:Q,controlOutlineWidth:E}=P;return{[`&:not(${ae}-customize-input) ${ae}-selector`]:{border:`${(0,L.unit)(P.lineWidth)} ${P.lineType} ${de.borderColor}`,background:P.selectorBg},[`&:not(${ae}-disabled):not(${ae}-customize-input):not(${Q}-pagination-size-changer)`]:{[`&:hover ${ae}-selector`]:{borderColor:de.hoverBorderHover},[`${ae}-focused& ${ae}-selector`]:{borderColor:de.activeBorderColor,boxShadow:`0 0 0 ${(0,L.unit)(E)} ${de.activeOutlineColor}`,outline:0},[`${ae}-prefix`]:{color:de.color}}}},z=(P,de)=>({[`&${P.componentCls}-status-${de.status}`]:Object.assign({},B(P,de))}),j=P=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},B(P,{borderColor:P.colorBorder,hoverBorderHover:P.hoverBorderColor,activeBorderColor:P.activeBorderColor,activeOutlineColor:P.activeOutlineColor,color:P.colorText})),z(P,{status:"error",borderColor:P.colorError,hoverBorderHover:P.colorErrorHover,activeBorderColor:P.colorError,activeOutlineColor:P.colorErrorOutline,color:P.colorError})),z(P,{status:"warning",borderColor:P.colorWarning,hoverBorderHover:P.colorWarningHover,activeBorderColor:P.colorWarning,activeOutlineColor:P.colorWarningOutline,color:P.colorWarning})),{[`&${P.componentCls}-disabled`]:{[`&:not(${P.componentCls}-customize-input) ${P.componentCls}-selector`]:{background:P.colorBgContainerDisabled,color:P.colorTextDisabled}},[`&${P.componentCls}-multiple ${P.componentCls}-selection-item`]:{background:P.multipleItemBg,border:`${(0,L.unit)(P.lineWidth)} ${P.lineType} ${P.multipleItemBorderColor}`}})}),U=(P,de)=>{const{componentCls:ae,antCls:Q}=P;return{[`&:not(${ae}-customize-input) ${ae}-selector`]:{background:de.bg,border:`${(0,L.unit)(P.lineWidth)} ${P.lineType} transparent`,color:de.color},[`&:not(${ae}-disabled):not(${ae}-customize-input):not(${Q}-pagination-size-changer)`]:{[`&:hover ${ae}-selector`]:{background:de.hoverBg},[`${ae}-focused& ${ae}-selector`]:{background:P.selectorBg,borderColor:de.activeBorderColor,outline:0}}}},A=(P,de)=>({[`&${P.componentCls}-status-${de.status}`]:Object.assign({},U(P,de))}),K=P=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},U(P,{bg:P.colorFillTertiary,hoverBg:P.colorFillSecondary,activeBorderColor:P.activeBorderColor,color:P.colorText})),A(P,{status:"error",bg:P.colorErrorBg,hoverBg:P.colorErrorBgHover,activeBorderColor:P.colorError,color:P.colorError})),A(P,{status:"warning",bg:P.colorWarningBg,hoverBg:P.colorWarningBgHover,activeBorderColor:P.colorWarning,color:P.colorWarning})),{[`&${P.componentCls}-disabled`]:{[`&:not(${P.componentCls}-customize-input) ${P.componentCls}-selector`]:{borderColor:P.colorBorder,background:P.colorBgContainerDisabled,color:P.colorTextDisabled}},[`&${P.componentCls}-multiple ${P.componentCls}-selection-item`]:{background:P.colorBgContainer,border:`${(0,L.unit)(P.lineWidth)} ${P.lineType} ${P.colorSplit}`}})}),I=P=>({"&-borderless":{[`${P.componentCls}-selector`]:{background:"transparent",border:`${(0,L.unit)(P.lineWidth)} ${P.lineType} transparent`},[`&${P.componentCls}-disabled`]:{[`&:not(${P.componentCls}-customize-input) ${P.componentCls}-selector`]:{color:P.colorTextDisabled}},[`&${P.componentCls}-multiple ${P.componentCls}-selection-item`]:{background:P.multipleItemBg,border:`${(0,L.unit)(P.lineWidth)} ${P.lineType} ${P.multipleItemBorderColor}`},[`&${P.componentCls}-status-error`]:{[`${P.componentCls}-prefix, ${P.componentCls}-selection-item`]:{color:P.colorError}},[`&${P.componentCls}-status-warning`]:{[`${P.componentCls}-prefix, ${P.componentCls}-selection-item`]:{color:P.colorWarning}}}}),M=(P,de)=>{const{componentCls:ae,antCls:Q}=P;return{[`&:not(${ae}-customize-input) ${ae}-selector`]:{borderWidth:`0 0 ${(0,L.unit)(P.lineWidth)} 0`,borderStyle:`none none ${P.lineType} none`,borderColor:de.borderColor,background:P.selectorBg,borderRadius:0},[`&:not(${ae}-disabled):not(${ae}-customize-input):not(${Q}-pagination-size-changer)`]:{[`&:hover ${ae}-selector`]:{borderColor:de.hoverBorderHover},[`${ae}-focused& ${ae}-selector`]:{borderColor:de.activeBorderColor,outline:0},[`${ae}-prefix`]:{color:de.color}}}},le=(P,de)=>({[`&${P.componentCls}-status-${de.status}`]:Object.assign({},M(P,de))}),me=P=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},M(P,{borderColor:P.colorBorder,hoverBorderHover:P.hoverBorderColor,activeBorderColor:P.activeBorderColor,activeOutlineColor:P.activeOutlineColor,color:P.colorText})),le(P,{status:"error",borderColor:P.colorError,hoverBorderHover:P.colorErrorHover,activeBorderColor:P.colorError,activeOutlineColor:P.colorErrorOutline,color:P.colorError})),le(P,{status:"warning",borderColor:P.colorWarning,hoverBorderHover:P.colorWarningHover,activeBorderColor:P.colorWarning,activeOutlineColor:P.colorWarningOutline,color:P.colorWarning})),{[`&${P.componentCls}-disabled`]:{[`&:not(${P.componentCls}-customize-input) ${P.componentCls}-selector`]:{color:P.colorTextDisabled}},[`&${P.componentCls}-multiple ${P.componentCls}-selection-item`]:{background:P.multipleItemBg,border:`${(0,L.unit)(P.lineWidth)} ${P.lineType} ${P.multipleItemBorderColor}`}})});var De=P=>({[P.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},j(P)),K(P)),I(P)),me(P))});const Pe=P=>{const{componentCls:de}=P;return{position:"relative",transition:`all ${P.motionDurationMid} ${P.motionEaseInOut}`,input:{cursor:"pointer"},[`${de}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${de}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Ce=P=>{const{componentCls:de}=P;return{[`${de}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},He=P=>{const{antCls:de,componentCls:ae,inputPaddingHorizontalBase:Q,iconCls:E}=P;return{[ae]:Object.assign(Object.assign({},(0,c.Wf)(P)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${ae}-customize-input) ${ae}-selector`]:Object.assign(Object.assign({},Pe(P)),Ce(P)),[`${ae}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},c.vS),{[`> ${de}-typography`]:{display:"inline"}}),[`${ae}-selection-placeholder`]:Object.assign(Object.assign({},c.vS),{flex:1,color:P.colorTextPlaceholder,pointerEvents:"none"}),[`${ae}-arrow`]:Object.assign(Object.assign({},(0,c.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Q,height:P.fontSizeIcon,marginTop:P.calc(P.fontSizeIcon).mul(-1).div(2).equal(),color:P.colorTextQuaternary,fontSize:P.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${P.motionDurationSlow} ease`,[E]:{verticalAlign:"top",transition:`transform ${P.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${ae}-suffix)`]:{pointerEvents:"auto"}},[`${ae}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${ae}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${ae}-prefix`]:{flex:"none",marginInlineEnd:P.selectAffixPadding},[`${ae}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Q,zIndex:1,display:"inline-block",width:P.fontSizeIcon,height:P.fontSizeIcon,marginTop:P.calc(P.fontSizeIcon).mul(-1).div(2).equal(),color:P.colorTextQuaternary,fontSize:P.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${P.motionDurationMid} ease, opacity ${P.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:P.colorTextTertiary}},[`&:hover ${ae}-clear`]:{opacity:1,background:P.colorBgBase,borderRadius:"50%"}}),[`${ae}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${ae}-has-feedback`]:{[`${ae}-clear`]:{insetInlineEnd:P.calc(Q).add(P.fontSize).add(P.paddingXS).equal()}}}}}},ue=P=>{const{componentCls:de}=P;return[{[de]:{[`&${de}-in-form-item`]:{width:"100%"}}},He(P),S(P),(0,x.ZP)(P),o(P),{[`${de}-rtl`]:{direction:"rtl"}},(0,ee.c)(P,{borderElCls:`${de}-selector`,focusElCls:`${de}-focused`})]};var W=(0,$.I$)("Select",(P,de)=>{let{rootPrefixCls:ae}=de;const Q=(0,ie.mergeToken)(P,{rootPrefixCls:ae,inputPaddingHorizontalBase:P.calc(P.paddingSM).sub(1).equal(),multipleSelectItemHeight:P.multipleItemHeight,selectHeight:P.controlHeight});return[ue(Q),De(Q)]},T,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}})},26743:function(un,We,m){"use strict";m.d(We,{_z:function(){return g},gp:function(){return ie}});var c=m(36237),ee=m(63356),$=m(51636);const ie=x=>{const{multipleSelectItemHeight:L,paddingXXS:b,lineWidth:S,INTERNAL_FIXED_ITEM_MARGIN:T}=x,B=x.max(x.calc(b).sub(S).equal(),0),z=x.max(x.calc(B).sub(T).equal(),0);return{basePadding:B,containerPadding:z,itemHeight:(0,c.unit)(L),itemLineHeight:(0,c.unit)(x.calc(L).sub(x.calc(x.lineWidth).mul(2)).equal())}},F=x=>{const{multipleSelectItemHeight:L,selectHeight:b,lineWidth:S}=x;return x.calc(b).sub(L).div(2).sub(S).equal()},g=x=>{const{componentCls:L,iconCls:b,borderRadiusSM:S,motionDurationSlow:T,paddingXS:B,multipleItemColorDisabled:z,multipleItemBorderColorDisabled:j,colorIcon:U,colorIconHover:A,INTERNAL_FIXED_ITEM_MARGIN:K}=x;return{[`${L}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${L}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:K,borderRadius:S,cursor:"default",transition:`font-size ${T}, line-height ${T}, height ${T}`,marginInlineEnd:x.calc(K).mul(2).equal(),paddingInlineStart:B,paddingInlineEnd:x.calc(B).div(2).equal(),[`${L}-disabled&`]:{color:z,borderColor:j,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:x.calc(B).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ee.Ro)()),{display:"inline-flex",alignItems:"center",color:U,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${b}`]:{verticalAlign:"-0.2em"},"&:hover":{color:A}})}}}},J=(x,L)=>{const{componentCls:b,INTERNAL_FIXED_ITEM_MARGIN:S}=x,T=`${b}-selection-overflow`,B=x.multipleSelectItemHeight,z=F(x),j=L?`${b}-${L}`:"",U=ie(x);return{[`${b}-multiple${j}`]:Object.assign(Object.assign({},g(x)),{[`${b}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:U.basePadding,paddingBlock:U.containerPadding,borderRadius:x.borderRadius,[`${b}-disabled&`]:{background:x.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${(0,c.unit)(S)} 0`,lineHeight:(0,c.unit)(B),visibility:"hidden",content:'"\\a0"'}},[`${b}-selection-item`]:{height:U.itemHeight,lineHeight:(0,c.unit)(U.itemLineHeight)},[`${b}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:(0,c.unit)(B),marginBlock:S}},[`${b}-prefix`]:{marginInlineStart:x.calc(x.inputPaddingHorizontalBase).sub(U.basePadding).equal()},[`${T}-item + ${T}-item,
${b}-prefix + ${b}-selection-wrap
`]:{[`${b}-selection-search`]:{marginInlineStart:0},[`${b}-selection-placeholder`]:{insetInlineStart:0}},[`${T}-item-suffix`]:{minHeight:U.itemHeight,marginBlock:S},[`${b}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:x.calc(x.inputPaddingHorizontalBase).sub(z).equal(),"\n &-input,\n &-mirror\n ":{height:B,fontFamily:x.fontFamily,lineHeight:(0,c.unit)(B),transition:`all ${x.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${b}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:x.calc(x.inputPaddingHorizontalBase).sub(U.basePadding).equal(),insetInlineEnd:x.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${x.motionDurationSlow}`}})}};function X(x,L){const{componentCls:b}=x,S=L?`${b}-${L}`:"",T={[`${b}-multiple${S}`]:{fontSize:x.fontSize,[`${b}-selector`]:{[`${b}-show-search&`]:{cursor:"text"}},[`
&${b}-show-arrow ${b}-selector,
&${b}-allow-clear ${b}-selector
`]:{paddingInlineEnd:x.calc(x.fontSizeIcon).add(x.controlPaddingHorizontal).equal()}}};return[J(x,L),T]}const o=x=>{const{componentCls:L}=x,b=(0,$.mergeToken)(x,{selectHeight:x.controlHeightSM,multipleSelectItemHeight:x.multipleItemHeightSM,borderRadius:x.borderRadiusSM,borderRadiusSM:x.borderRadiusXS}),S=(0,$.mergeToken)(x,{fontSize:x.fontSizeLG,selectHeight:x.controlHeightLG,multipleSelectItemHeight:x.multipleItemHeightLG,borderRadius:x.borderRadiusLG,borderRadiusSM:x.borderRadius});return[X(x),X(b,"sm"),{[`${L}-multiple${L}-sm`]:{[`${L}-selection-placeholder`]:{insetInline:x.calc(x.controlPaddingHorizontalSM).sub(x.lineWidth).equal()},[`${L}-selection-search`]:{marginInlineStart:2}}},X(S,"lg")]};We.ZP=o},68525:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});var c=m(59301),ee=m(40001),$=m(19248),ie=m(99267),F=m(84105),g=m(58617),J=m(47472);function X(o){let{suffixIcon:x,clearIcon:L,menuItemSelectedIcon:b,removeIcon:S,loading:T,multiple:B,hasFeedback:z,prefixCls:j,showSuffixIcon:U,feedbackIcon:A,showArrow:K,componentName:I}=o;const M=L!=null?L:c.createElement($.Z,null),le=Pe=>x===null&&!z&&!K?null:c.createElement(c.Fragment,null,U!==!1&&Pe,z&&A);let me=null;if(x!==void 0)me=le(x);else if(T)me=le(c.createElement(g.Z,{spin:!0}));else{const Pe=`${j}-suffix`;me=Ce=>{let{open:He,showSearch:ue}=Ce;return le(He&&ue?c.createElement(J.Z,{className:Pe}):c.createElement(F.Z,{className:Pe}))}}let ce=null;b!==void 0?ce=b:B?ce=c.createElement(ee.Z,null):ce=null;let De=null;return S!==void 0?De=S:De=c.createElement(ie.Z,null),{clearIcon:M,suffixIcon:me,itemIcon:ce,removeIcon:De}}},90005:function(un,We,m){"use strict";m.d(We,{Z:function(){return c}});function c(ee,$){return $!==void 0?$:ee!==null}},44104:function(un,We,m){"use strict";m.d(We,{Z:function(){return z}});var c=m(59301),ee=m(92310),$=m.n(ee),ie=m(11592),F=m(99402),g=m(48755),J=m(70045);const X=c.createContext({latestIndex:0}),o=X.Provider;var L=j=>{let{className:U,index:A,children:K,split:I,style:M}=j;const{latestIndex:le}=c.useContext(X);return K==null?null:c.createElement(c.Fragment,null,c.createElement("div",{className:U,style:M},K),A<le&&I&&c.createElement("span",{className:`${U}-split`},I))},b=m(31547),S=function(j,U){var A={};for(var K in j)Object.prototype.hasOwnProperty.call(j,K)&&U.indexOf(K)<0&&(A[K]=j[K]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,K=Object.getOwnPropertySymbols(j);I<K.length;I++)U.indexOf(K[I])<0&&Object.prototype.propertyIsEnumerable.call(j,K[I])&&(A[K[I]]=j[K[I]]);return A};const B=c.forwardRef((j,U)=>{var A;const{getPrefixCls:K,direction:I,size:M,className:le,style:me,classNames:ce,styles:De}=(0,g.dj)("space"),{size:Pe=M!=null?M:"small",align:Ce,className:He,rootClassName:ue,children:W,direction:P="horizontal",prefixCls:de,split:ae,style:Q,wrap:E=!1,classNames:C,styles:Y}=j,be=S(j,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[je,lt]=Array.isArray(Pe)?Pe:[Pe,Pe],ke=(0,F.n)(lt),Ye=(0,F.n)(je),et=(0,F.T)(lt),_t=(0,F.T)(je),Re=(0,ie.Z)(W,{keepEmpty:!0}),At=Ce===void 0&&P==="horizontal"?"center":Ce,rt=K("space",de),[Nt,Xe,Ge]=(0,b.Z)(rt),Ne=$()(rt,le,Xe,`${rt}-${P}`,{[`${rt}-rtl`]:I==="rtl",[`${rt}-align-${At}`]:At,[`${rt}-gap-row-${lt}`]:ke,[`${rt}-gap-col-${je}`]:Ye},He,ue,Ge),Ie=$()(`${rt}-item`,(A=C==null?void 0:C.item)!==null&&A!==void 0?A:ce.item);let te=0;const $e=Re.map((D,he)=>{var _e;D!=null&&(te=he);const pe=(D==null?void 0:D.key)||`${Ie}-${he}`;return c.createElement(L,{className:Ie,key:pe,index:he,split:ae,style:(_e=Y==null?void 0:Y.item)!==null&&_e!==void 0?_e:De.item},D)}),Ae=c.useMemo(()=>({latestIndex:te}),[te]);if(Re.length===0)return null;const Z={};return E&&(Z.flexWrap="wrap"),!Ye&&_t&&(Z.columnGap=je),!ke&&et&&(Z.rowGap=lt),Nt(c.createElement("div",Object.assign({ref:U,className:Ne,style:Object.assign(Object.assign(Object.assign({},Z),me),Q)},be),c.createElement(o,{value:Ae},$e)))});B.Compact=J.ZP;var z=B},93873:function(un,We,m){"use strict";m.d(We,{Fm:function(){return b}});var c=m(36237),ee=m(48746);const $=new c.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ie=new c.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),F=new c.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),g=new c.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),J=new c.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),X=new c.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),o=new c.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),x=new c.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),L={"move-up":{inKeyframes:o,outKeyframes:x},"move-down":{inKeyframes:$,outKeyframes:ie},"move-left":{inKeyframes:F,outKeyframes:g},"move-right":{inKeyframes:J,outKeyframes:X}},b=(S,T)=>{const{antCls:B}=S,z=`${B}-${T}`,{inKeyframes:j,outKeyframes:U}=L[T];return[(0,ee.R)(z,j,U,S.motionDurationMid),{[`
${z}-enter,
${z}-appear
`]:{opacity:0,animationTimingFunction:S.motionEaseOutCirc},[`${z}-leave`]:{animationTimingFunction:S.motionEaseInOutCirc}}]}},46e3:function(un,We,m){"use strict";m.d(We,{Qt:function(){return F},Uw:function(){return ie},fJ:function(){return $},ly:function(){return g},oN:function(){return b}});var c=m(36237),ee=m(48746);const $=new c.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ie=new c.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),F=new c.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),g=new c.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),J=new c.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),X=new c.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),o=new c.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),x=new c.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),L={"slide-up":{inKeyframes:$,outKeyframes:ie},"slide-down":{inKeyframes:F,outKeyframes:g},"slide-left":{inKeyframes:J,outKeyframes:X},"slide-right":{inKeyframes:o,outKeyframes:x}},b=(S,T)=>{const{antCls:B}=S,z=`${B}-${T}`,{inKeyframes:j,outKeyframes:U}=L[T];return[(0,ee.R)(z,j,U,S.motionDurationMid),{[`
${z}-enter,
${z}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:S.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${z}-leave`]:{animationTimingFunction:S.motionEaseInQuint}}]}},37645:function(un,We,m){"use strict";m.d(We,{ZP:function(){return g},qN:function(){return $},wZ:function(){return ie}});var c=m(36237),ee=m(36305);const $=8;function ie(J){const{contentRadius:X,limitVerticalRadius:o}=J,x=X>12?X+2:12;return{arrowOffsetHorizontal:x,arrowOffsetVertical:o?$:x}}function F(J,X){return J?X:{}}function g(J,X,o){const{componentCls:x,boxShadowPopoverArrow:L,arrowOffsetVertical:b,arrowOffsetHorizontal:S}=J,{arrowDistance:T=0,arrowPlacement:B={left:!0,right:!0,top:!0,bottom:!0}}=o||{};return{[x]:Object.assign(Object.assign(Object.assign(Object.assign({[`${x}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,ee.W)(J,X,L)),{"&:before":{background:X}})]},F(!!B.top,{[[`&-placement-top > ${x}-arrow`,`&-placement-topLeft > ${x}-arrow`,`&-placement-topRight > ${x}-arrow`].join(",")]:{bottom:T,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${x}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":S,[`> ${x}-arrow`]:{left:{_skip_check_:!0,value:S}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,c.unit)(S)})`,[`> ${x}-arrow`]:{right:{_skip_check_:!0,value:S}}}})),F(!!B.bottom,{[[`&-placement-bottom > ${x}-arrow`,`&-placement-bottomLeft > ${x}-arrow`,`&-placement-bottomRight > ${x}-arrow`].join(",")]:{top:T,transform:"translateY(-100%)"},[`&-placement-bottom > ${x}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":S,[`> ${x}-arrow`]:{left:{_skip_check_:!0,value:S}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,c.unit)(S)})`,[`> ${x}-arrow`]:{right:{_skip_check_:!0,value:S}}}})),F(!!B.left,{[[`&-placement-left > ${x}-arrow`,`&-placement-leftTop > ${x}-arrow`,`&-placement-leftBottom > ${x}-arrow`].join(",")]:{right:{_skip_check_:!0,value:T},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${x}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${x}-arrow`]:{top:b},[`&-placement-leftBottom > ${x}-arrow`]:{bottom:b}})),F(!!B.right,{[[`&-placement-right > ${x}-arrow`,`&-placement-rightTop > ${x}-arrow`,`&-placement-rightBottom > ${x}-arrow`].join(",")]:{left:{_skip_check_:!0,value:T},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${x}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${x}-arrow`]:{top:b},[`&-placement-rightBottom > ${x}-arrow`]:{bottom:b}}))}}},36305:function(un,We,m){"use strict";m.d(We,{W:function(){return $},w:function(){return ee}});var c=m(36237);function ee(ie){const{sizePopupArrow:F,borderRadiusXS:g,borderRadiusOuter:J}=ie,X=F/2,o=0,x=X,L=J*1/Math.sqrt(2),b=X-J*(1-1/Math.sqrt(2)),S=X-g*(1/Math.sqrt(2)),T=J*(Math.sqrt(2)-1)+g*(1/Math.sqrt(2)),B=2*X-S,z=T,j=2*X-L,U=b,A=2*X-o,K=x,I=X*Math.sqrt(2)+J*(Math.sqrt(2)-2),M=J*(Math.sqrt(2)-1),le=`polygon(${M}px 100%, 50% ${M}px, ${2*X-M}px 100%, ${M}px 100%)`,me=`path('M ${o} ${x} A ${J} ${J} 0 0 0 ${L} ${b} L ${S} ${T} A ${g} ${g} 0 0 1 ${B} ${z} L ${j} ${U} A ${J} ${J} 0 0 0 ${A} ${K} Z')`;return{arrowShadowWidth:I,arrowPath:me,arrowPolygon:le}}const $=(ie,F,g)=>{const{sizePopupArrow:J,arrowPolygon:X,arrowPath:o,arrowShadowWidth:x,borderRadiusXS:L,calc:b}=ie;return{pointerEvents:"none",width:J,height:J,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:J,height:b(J).div(2).equal(),background:F,clipPath:{_multi_value_:!0,value:[X,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:x,height:x,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,c.unit)(L)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:g,zIndex:0,background:"transparent"}}}},70858:function(un,We,m){"use strict";m.d(We,{default:function(){return Go}});var c=m(59301),ee={},$="rc-table-internal-hook",ie=m(72190),F=m(6089),g=m(34280),J=m(13697),X=m(4676);function o(se){var ne=c.createContext(void 0),Le=function(mt){var St=mt.value,Ot=mt.children,It=c.useRef(St);It.current=St;var Ut=c.useState(function(){return{getValue:function(){return It.current},listeners:new Set}}),Bt=(0,ie.Z)(Ut,1),fn=Bt[0];return(0,g.Z)(function(){(0,X.unstable_batchedUpdates)(function(){fn.listeners.forEach(function(qt){qt(St)})})},[St]),c.createElement(ne.Provider,{value:fn},Ot)};return{Context:ne,Provider:Le,defaultValue:se}}function x(se,ne){var Le=(0,F.Z)(typeof ne=="function"?ne:function(qt){if(ne===void 0)return qt;if(!Array.isArray(ne))return qt[ne];var Xt={};return ne.forEach(function(N){Xt[N]=qt[N]}),Xt}),Ve=c.useContext(se==null?void 0:se.Context),mt=Ve||{},St=mt.listeners,Ot=mt.getValue,It=c.useRef();It.current=Le(Ve?Ot():se==null?void 0:se.defaultValue);var Ut=c.useState({}),Bt=(0,ie.Z)(Ut,2),fn=Bt[1];return(0,g.Z)(function(){if(!Ve)return;function qt(Xt){var N=Le(Xt);(0,J.Z)(It.current,N,!0)||fn({})}return St.add(qt),function(){St.delete(qt)}},[Ve]),It.current}var L=m(60499),b=m(8654);function S(){var se=c.createContext(null);function ne(){return c.useContext(se)}function Le(mt,St){var Ot=(0,b.Yr)(mt),It=function(Bt,fn){var qt=Ot?{ref:fn}:{},Xt=c.useRef(0),N=c.useRef(Bt),l=ne();return l!==null?c.createElement(mt,(0,L.Z)({},Bt,qt)):((!St||St(N.current,Bt))&&(Xt.current+=1),N.current=Bt,c.createElement(se.Provider,{value:Xt.current},c.createElement(mt,(0,L.Z)({},Bt,qt))))};return Ot?c.forwardRef(It):It}function Ve(mt,St){var Ot=(0,b.Yr)(mt),It=function(Bt,fn){var qt=Ot?{ref:fn}:{};return ne(),c.createElement(mt,(0,L.Z)({},Bt,qt))};return Ot?c.memo(c.forwardRef(It),St):c.memo(It,St)}return{makeImmutable:Le,responseImmutable:Ve,useImmutableMark:ne}}var T=S(),B=T.makeImmutable,z=T.responseImmutable,j=T.useImmutableMark,U=S(),A=U.makeImmutable,K=U.responseImmutable,I=U.useImmutableMark,M=o(),le=M;function me(se,ne){var Le=React.useRef(0);Le.current+=1;var Ve=React.useRef(se),mt=[];Object.keys(se||{}).map(function(Ot){var It;(se==null?void 0:se[Ot])!==((It=Ve.current)===null||It===void 0?void 0:It[Ot])&&mt.push(Ot)}),Ve.current=se;var St=React.useRef([]);return mt.length&&(St.current=mt),React.useDebugValue(Le.current),React.useDebugValue(St.current.join(", ")),ne&&console.log("".concat(ne,":"),Le.current,St.current),Le.current}var ce=null,De=null,Pe=m(43749),Ce=m(85899),He=m(18642),ue=m(92310),W=m.n(ue),P=m(80547),de=m(97938),ae=m(48736),Q=c.createContext({renderWithProps:!1}),E=Q,C="RC_TABLE_KEY";function Y(se){return se==null?[]:Array.isArray(se)?se:[se]}function be(se){var ne=[],Le={};return se.forEach(function(Ve){for(var mt=Ve||{},St=mt.key,Ot=mt.dataIndex,It=St||Y(Ot).join("-")||C;Le[It];)It="".concat(It,"_next");Le[It]=!0,ne.push(It)}),ne}function je(se){return se!=null}function lt(se){return typeof se=="number"&&!Number.isNaN(se)}function ke(se){return se&&(0,Pe.Z)(se)==="object"&&!Array.isArray(se)&&!c.isValidElement(se)}function Ye(se,ne,Le,Ve,mt,St){var Ot=c.useContext(E),It=I(),Ut=(0,P.Z)(function(){if(je(Ve))return[Ve];var Bt=ne==null||ne===""?[]:Array.isArray(ne)?ne:[ne],fn=(0,de.Z)(se,Bt),qt=fn,Xt=void 0;if(mt){var N=mt(fn,se,Le);ke(N)?(qt=N.children,Xt=N.props,Ot.renderWithProps=!0):qt=N}return[qt,Xt]},[It,se,Ve,ne,mt,Le],function(Bt,fn){if(St){var qt=(0,ie.Z)(Bt,2),Xt=qt[1],N=(0,ie.Z)(fn,2),l=N[1];return St(l,Xt)}return Ot.renderWithProps?!0:!(0,J.Z)(Bt,fn,!0)});return Ut}function et(se,ne,Le,Ve){var mt=se+ne-1;return se<=Ve&&mt>=Le}function _t(se,ne){return x(le,function(Le){var Ve=et(se,ne||1,Le.hoverStartRow,Le.hoverEndRow);return[Ve,Le.onHover]})}var Re=m(70425),At=function(ne){var Le=ne.ellipsis,Ve=ne.rowType,mt=ne.children,St,Ot=Le===!0?{showTitle:!0}:Le;return Ot&&(Ot.showTitle||Ve==="header")&&(typeof mt=="string"||typeof mt=="number"?St=mt.toString():c.isValidElement(mt)&&typeof mt.props.children=="string"&&(St=mt.props.children)),St};function rt(se){var ne,Le,Ve,mt,St,Ot,It,Ut,Bt=se.component,fn=se.children,qt=se.ellipsis,Xt=se.scope,N=se.prefixCls,l=se.className,d=se.align,f=se.record,y=se.render,R=se.dataIndex,H=se.renderIndex,ve=se.shouldCellUpdate,Te=se.index,Ke=se.rowType,pt=se.colSpan,Dt=se.rowSpan,$t=se.fixLeft,Qt=se.fixRight,an=se.firstFixLeft,on=se.lastFixLeft,_n=se.firstFixRight,hn=se.lastFixRight,bn=se.appendNode,Dn=se.additionalProps,jn=Dn===void 0?{}:Dn,Gn=se.isSticky,Mn="".concat(N,"-cell"),_r=x(le,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Tr=_r.supportSticky,gi=_r.allColumnsFixedLeft,ni=_r.rowHoverable,Rt=Ye(f,R,H,fn,y,ve),vi=(0,ie.Z)(Rt,2),ts=vi[0],Xr=vi[1],Fr={},Yi=typeof $t=="number"&&Tr,Xi=typeof Qt=="number"&&Tr;Yi&&(Fr.position="sticky",Fr.left=$t),Xi&&(Fr.position="sticky",Fr.right=Qt);var Er=(ne=(Le=(Ve=Xr==null?void 0:Xr.colSpan)!==null&&Ve!==void 0?Ve:jn.colSpan)!==null&&Le!==void 0?Le:pt)!==null&&ne!==void 0?ne:1,Vr=(mt=(St=(Ot=Xr==null?void 0:Xr.rowSpan)!==null&&Ot!==void 0?Ot:jn.rowSpan)!==null&&St!==void 0?St:Dt)!==null&&mt!==void 0?mt:1,dr=_t(Te,Vr),xr=(0,ie.Z)(dr,2),ai=xr[0],hi=xr[1],Ui=(0,Re.zX)(function(Ki){var Ei;f&&hi(Te,Te+Vr-1),jn==null||(Ei=jn.onMouseEnter)===null||Ei===void 0||Ei.call(jn,Ki)}),Ni=(0,Re.zX)(function(Ki){var Ei;f&&hi(-1,-1),jn==null||(Ei=jn.onMouseLeave)===null||Ei===void 0||Ei.call(jn,Ki)});if(Er===0||Vr===0)return null;var Hi=(It=jn.title)!==null&&It!==void 0?It:At({rowType:Ke,ellipsis:qt,children:ts}),As=W()(Mn,l,(Ut={},(0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)(Ut,"".concat(Mn,"-fix-left"),Yi&&Tr),"".concat(Mn,"-fix-left-first"),an&&Tr),"".concat(Mn,"-fix-left-last"),on&&Tr),"".concat(Mn,"-fix-left-all"),on&&gi&&Tr),"".concat(Mn,"-fix-right"),Xi&&Tr),"".concat(Mn,"-fix-right-first"),_n&&Tr),"".concat(Mn,"-fix-right-last"),hn&&Tr),"".concat(Mn,"-ellipsis"),qt),"".concat(Mn,"-with-append"),bn),"".concat(Mn,"-fix-sticky"),(Yi||Xi)&&Gn&&Tr),(0,He.Z)(Ut,"".concat(Mn,"-row-hover"),!Xr&&ai)),jn.className,Xr==null?void 0:Xr.className),Sr={};d&&(Sr.textAlign=d);var Mr=(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},Xr==null?void 0:Xr.style),Fr),Sr),jn.style),xi=ts;return(0,Pe.Z)(xi)==="object"&&!Array.isArray(xi)&&!c.isValidElement(xi)&&(xi=null),qt&&(on||_n)&&(xi=c.createElement("span",{className:"".concat(Mn,"-content")},xi)),c.createElement(Bt,(0,L.Z)({},Xr,jn,{className:As,style:Mr,title:Hi,scope:Xt,onMouseEnter:ni?Ui:void 0,onMouseLeave:ni?Ni:void 0,colSpan:Er!==1?Er:null,rowSpan:Vr!==1?Vr:null}),bn,xi)}var Nt=c.memo(rt);function Xe(se,ne,Le,Ve,mt){var St=Le[se]||{},Ot=Le[ne]||{},It,Ut;St.fixed==="left"?It=Ve.left[mt==="rtl"?ne:se]:Ot.fixed==="right"&&(Ut=Ve.right[mt==="rtl"?se:ne]);var Bt=!1,fn=!1,qt=!1,Xt=!1,N=Le[ne+1],l=Le[se-1],d=N&&!N.fixed||l&&!l.fixed||Le.every(function(ve){return ve.fixed==="left"});if(mt==="rtl"){if(It!==void 0){var f=l&&l.fixed==="left";Xt=!f&&d}else if(Ut!==void 0){var y=N&&N.fixed==="right";qt=!y&&d}}else if(It!==void 0){var R=N&&N.fixed==="left";Bt=!R&&d}else if(Ut!==void 0){var H=l&&l.fixed==="right";fn=!H&&d}return{fixLeft:It,fixRight:Ut,lastFixLeft:Bt,firstFixRight:fn,lastFixRight:qt,firstFixLeft:Xt,isSticky:Ve.isSticky}}var Ge=c.createContext({}),Ne=Ge;function Ie(se){var ne=se.className,Le=se.index,Ve=se.children,mt=se.colSpan,St=mt===void 0?1:mt,Ot=se.rowSpan,It=se.align,Ut=x(le,["prefixCls","direction"]),Bt=Ut.prefixCls,fn=Ut.direction,qt=c.useContext(Ne),Xt=qt.scrollColumnIndex,N=qt.stickyOffsets,l=qt.flattenColumns,d=Le+St-1,f=d+1===Xt?St+1:St,y=Xe(Le,Le+f-1,l,N,fn);return c.createElement(Nt,(0,L.Z)({className:ne,index:Le,component:"td",prefixCls:Bt,record:null,dataIndex:null,align:It,colSpan:f,rowSpan:Ot,render:function(){return Ve}},y))}var te=m(42244),$e=["children"];function Ae(se){var ne=se.children,Le=(0,te.Z)(se,$e);return c.createElement("tr",Le,ne)}function Z(se){var ne=se.children;return ne}Z.Row=Ae,Z.Cell=Ie;var D=Z;function he(se){var ne=se.children,Le=se.stickyOffsets,Ve=se.flattenColumns,mt=x(le,"prefixCls"),St=Ve.length-1,Ot=Ve[St],It=c.useMemo(function(){return{stickyOffsets:Le,flattenColumns:Ve,scrollColumnIndex:Ot!=null&&Ot.scrollbar?St:null}},[Ot,Ve,St,Le]);return c.createElement(Ne.Provider,{value:It},c.createElement("tfoot",{className:"".concat(mt,"-summary")},ne))}var _e=K(he),pe=D,Ee=m(29301),Oe=m(24514),Ze=m(75152),re=m(26112);function fe(se,ne,Le,Ve,mt,St,Ot){se.push({record:ne,indent:Le,index:Ot});var It=St(ne),Ut=mt==null?void 0:mt.has(It);if(ne&&Array.isArray(ne[Ve])&&Ut)for(var Bt=0;Bt<ne[Ve].length;Bt+=1)fe(se,ne[Ve][Bt],Le+1,Ve,mt,St,Bt)}function st(se,ne,Le,Ve){var mt=c.useMemo(function(){if(Le!=null&&Le.size){for(var St=[],Ot=0;Ot<(se==null?void 0:se.length);Ot+=1){var It=se[Ot];fe(St,It,0,ne,Le,Ve,Ot)}return St}return se==null?void 0:se.map(function(Ut,Bt){return{record:Ut,indent:0,index:Bt}})},[se,ne,Le,Ve]);return mt}function tt(se,ne,Le,Ve){var mt=x(le,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),St=mt.flattenColumns,Ot=mt.expandableType,It=mt.expandedKeys,Ut=mt.childrenColumnName,Bt=mt.onTriggerExpand,fn=mt.rowExpandable,qt=mt.onRow,Xt=mt.expandRowByClick,N=mt.rowClassName,l=Ot==="nest",d=Ot==="row"&&(!fn||fn(se)),f=d||l,y=It&&It.has(ne),R=Ut&&se&&se[Ut],H=(0,Re.zX)(Bt),ve=qt==null?void 0:qt(se,Le),Te=ve==null?void 0:ve.onClick,Ke=function(Qt){Xt&&f&&Bt(se,Qt);for(var an=arguments.length,on=new Array(an>1?an-1:0),_n=1;_n<an;_n++)on[_n-1]=arguments[_n];Te==null||Te.apply(void 0,[Qt].concat(on))},pt;typeof N=="string"?pt=N:typeof N=="function"&&(pt=N(se,Le,Ve));var Dt=be(St);return(0,Ce.Z)((0,Ce.Z)({},mt),{},{columnsKey:Dt,nestExpandable:l,expanded:y,hasNestChildren:R,record:se,onTriggerExpand:H,rowSupportExpand:d,expandable:f,rowProps:(0,Ce.Z)((0,Ce.Z)({},ve),{},{className:W()(pt,ve==null?void 0:ve.className),onClick:Ke})})}function ct(se){var ne=se.prefixCls,Le=se.children,Ve=se.component,mt=se.cellComponent,St=se.className,Ot=se.expanded,It=se.colSpan,Ut=se.isEmpty,Bt=x(le,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),fn=Bt.scrollbarSize,qt=Bt.fixHeader,Xt=Bt.fixColumn,N=Bt.componentWidth,l=Bt.horizonScroll,d=Le;return(Ut?l&&N:Xt)&&(d=c.createElement("div",{style:{width:N-(qt&&!Ut?fn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(ne,"-expanded-row-fixed")},d)),c.createElement(Ve,{className:St,style:{display:Ot?null:"none"}},c.createElement(Nt,{component:mt,prefixCls:ne,colSpan:It},d))}var ut=ct;function Ue(se){var ne=se.prefixCls,Le=se.record,Ve=se.onExpand,mt=se.expanded,St=se.expandable,Ot="".concat(ne,"-row-expand-icon");if(!St)return c.createElement("span",{className:W()(Ot,"".concat(ne,"-row-spaced"))});var It=function(Bt){Ve(Le,Bt),Bt.stopPropagation()};return c.createElement("span",{className:W()(Ot,(0,He.Z)((0,He.Z)({},"".concat(ne,"-row-expanded"),mt),"".concat(ne,"-row-collapsed"),!mt)),onClick:It})}function xt(se,ne,Le){var Ve=[];function mt(St){(St||[]).forEach(function(Ot,It){Ve.push(ne(Ot,It)),mt(Ot[Le])})}return mt(se),Ve}function dt(se,ne,Le,Ve){return typeof se=="string"?se:typeof se=="function"?se(ne,Le,Ve):""}function gt(se,ne,Le,Ve,mt){var St=se.record,Ot=se.prefixCls,It=se.columnsKey,Ut=se.fixedInfoList,Bt=se.expandIconColumnIndex,fn=se.nestExpandable,qt=se.indentSize,Xt=se.expandIcon,N=se.expanded,l=se.hasNestChildren,d=se.onTriggerExpand,f=It[Le],y=Ut[Le],R;Le===(Bt||0)&&fn&&(R=c.createElement(c.Fragment,null,c.createElement("span",{style:{paddingLeft:"".concat(qt*Ve,"px")},className:"".concat(Ot,"-row-indent indent-level-").concat(Ve)}),Xt({prefixCls:Ot,expanded:N,expandable:l,record:St,onExpand:d})));var H;return ne.onCell&&(H=ne.onCell(St,mt)),{key:f,fixedInfo:y,appendCellNode:R,additionalCellProps:H||{}}}function kt(se){var ne=se.className,Le=se.style,Ve=se.record,mt=se.index,St=se.renderIndex,Ot=se.rowKey,It=se.indent,Ut=It===void 0?0:It,Bt=se.rowComponent,fn=se.cellComponent,qt=se.scopeCellComponent,Xt=tt(Ve,Ot,mt,Ut),N=Xt.prefixCls,l=Xt.flattenColumns,d=Xt.expandedRowClassName,f=Xt.expandedRowRender,y=Xt.rowProps,R=Xt.expanded,H=Xt.rowSupportExpand,ve=c.useRef(!1);ve.current||(ve.current=R);var Te=dt(d,Ve,mt,Ut),Ke=c.createElement(Bt,(0,L.Z)({},y,{"data-row-key":Ot,className:W()(ne,"".concat(N,"-row"),"".concat(N,"-row-level-").concat(Ut),y==null?void 0:y.className,(0,He.Z)({},Te,Ut>=1)),style:(0,Ce.Z)((0,Ce.Z)({},Le),y==null?void 0:y.style)}),l.map(function($t,Qt){var an=$t.render,on=$t.dataIndex,_n=$t.className,hn=gt(Xt,$t,Qt,Ut,mt),bn=hn.key,Dn=hn.fixedInfo,jn=hn.appendCellNode,Gn=hn.additionalCellProps;return c.createElement(Nt,(0,L.Z)({className:_n,ellipsis:$t.ellipsis,align:$t.align,scope:$t.rowScope,component:$t.rowScope?qt:fn,prefixCls:N,key:bn,record:Ve,index:mt,renderIndex:St,dataIndex:on,render:an,shouldCellUpdate:$t.shouldCellUpdate},Dn,{appendNode:jn,additionalProps:Gn}))})),pt;if(H&&(ve.current||R)){var Dt=f(Ve,mt,Ut+1,R);pt=c.createElement(ut,{expanded:R,className:W()("".concat(N,"-expanded-row"),"".concat(N,"-expanded-row-level-").concat(Ut+1),Te),prefixCls:N,component:Bt,cellComponent:fn,colSpan:l.length,isEmpty:!1},Dt)}return c.createElement(c.Fragment,null,Ke,pt)}var w=K(kt);function O(se){var ne=se.columnKey,Le=se.onColumnResize,Ve=c.useRef();return(0,g.Z)(function(){Ve.current&&Le(ne,Ve.current.offsetWidth)},[]),c.createElement(Ee.Z,{data:ne},c.createElement("td",{ref:Ve,style:{padding:0,border:0,height:0}},c.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var qe=m(29194);function oe(se){var ne=se.prefixCls,Le=se.columnsKey,Ve=se.onColumnResize,mt=c.useRef(null);return c.createElement("tr",{"aria-hidden":"true",className:"".concat(ne,"-measure-row"),style:{height:0,fontSize:0},ref:mt},c.createElement(Ee.Z.Collection,{onBatchResize:function(Ot){(0,qe.Z)(mt.current)&&Ot.forEach(function(It){var Ut=It.data,Bt=It.size;Ve(Ut,Bt.offsetWidth)})}},Le.map(function(St){return c.createElement(O,{key:St,columnKey:St,onColumnResize:Ve})})))}function xe(se){var ne=se.data,Le=se.measureColumnWidth,Ve=x(le,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),mt=Ve.prefixCls,St=Ve.getComponent,Ot=Ve.onColumnResize,It=Ve.flattenColumns,Ut=Ve.getRowKey,Bt=Ve.expandedKeys,fn=Ve.childrenColumnName,qt=Ve.emptyNode,Xt=st(ne,fn,Bt,Ut),N=c.useRef({renderWithProps:!1}),l=St(["body","wrapper"],"tbody"),d=St(["body","row"],"tr"),f=St(["body","cell"],"td"),y=St(["body","cell"],"th"),R;ne.length?R=Xt.map(function(ve,Te){var Ke=ve.record,pt=ve.indent,Dt=ve.index,$t=Ut(Ke,Te);return c.createElement(w,{key:$t,rowKey:$t,record:Ke,index:Te,renderIndex:Dt,rowComponent:d,cellComponent:f,scopeCellComponent:y,indent:pt})}):R=c.createElement(ut,{expanded:!0,className:"".concat(mt,"-placeholder"),prefixCls:mt,component:d,cellComponent:f,colSpan:It.length,isEmpty:!0},qt);var H=be(It);return c.createElement(E.Provider,{value:N.current},c.createElement(l,{className:"".concat(mt,"-tbody")},Le&&c.createElement(oe,{prefixCls:mt,columnsKey:H,onColumnResize:Ot}),R))}var jt=K(xe),Qe=["expandable"],at="RC_TABLE_INTERNAL_COL_DEFINE";function bt(se){var ne=se.expandable,Le=(0,te.Z)(se,Qe),Ve;return"expandable"in se?Ve=(0,Ce.Z)((0,Ce.Z)({},Le),ne):Ve=Le,Ve.showExpandColumn===!1&&(Ve.expandIconColumnIndex=-1),Ve}var ge=["columnType"];function ye(se){for(var ne=se.colWidths,Le=se.columns,Ve=se.columCount,mt=x(le,["tableLayout"]),St=mt.tableLayout,Ot=[],It=Ve||Le.length,Ut=!1,Bt=It-1;Bt>=0;Bt-=1){var fn=ne[Bt],qt=Le&&Le[Bt],Xt=void 0,N=void 0;if(qt&&(Xt=qt[at],St==="auto"&&(N=qt.minWidth)),fn||N||Xt||Ut){var l=Xt||{},d=l.columnType,f=(0,te.Z)(l,ge);Ot.unshift(c.createElement("col",(0,L.Z)({key:Bt,style:{width:fn,minWidth:N}},f))),Ut=!0}}return c.createElement("colgroup",null,Ot)}var Fe=ye,ze=m(77654),q=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Mt(se,ne){return(0,c.useMemo)(function(){for(var Le=[],Ve=0;Ve<ne;Ve+=1){var mt=se[Ve];if(mt!==void 0)Le[Ve]=mt;else return null}return Le},[se.join("_"),ne])}var Be=c.forwardRef(function(se,ne){var Le=se.className,Ve=se.noData,mt=se.columns,St=se.flattenColumns,Ot=se.colWidths,It=se.columCount,Ut=se.stickyOffsets,Bt=se.direction,fn=se.fixHeader,qt=se.stickyTopOffset,Xt=se.stickyBottomOffset,N=se.stickyClassName,l=se.onScroll,d=se.maxContentScroll,f=se.children,y=(0,te.Z)(se,q),R=x(le,["prefixCls","scrollbarSize","isSticky","getComponent"]),H=R.prefixCls,ve=R.scrollbarSize,Te=R.isSticky,Ke=R.getComponent,pt=Ke(["header","table"],"table"),Dt=Te&&!fn?0:ve,$t=c.useRef(null),Qt=c.useCallback(function(Gn){(0,b.mH)(ne,Gn),(0,b.mH)($t,Gn)},[]);c.useEffect(function(){var Gn;function Mn(_r){var Tr=_r,gi=Tr.currentTarget,ni=Tr.deltaX;ni&&(l({currentTarget:gi,scrollLeft:gi.scrollLeft+ni}),_r.preventDefault())}return(Gn=$t.current)===null||Gn===void 0||Gn.addEventListener("wheel",Mn,{passive:!1}),function(){var _r;(_r=$t.current)===null||_r===void 0||_r.removeEventListener("wheel",Mn)}},[]);var an=c.useMemo(function(){return St.every(function(Gn){return Gn.width})},[St]),on=St[St.length-1],_n={fixed:on?on.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(H,"-cell-scrollbar")}}},hn=(0,c.useMemo)(function(){return Dt?[].concat((0,ze.Z)(mt),[_n]):mt},[Dt,mt]),bn=(0,c.useMemo)(function(){return Dt?[].concat((0,ze.Z)(St),[_n]):St},[Dt,St]),Dn=(0,c.useMemo)(function(){var Gn=Ut.right,Mn=Ut.left;return(0,Ce.Z)((0,Ce.Z)({},Ut),{},{left:Bt==="rtl"?[].concat((0,ze.Z)(Mn.map(function(_r){return _r+Dt})),[0]):Mn,right:Bt==="rtl"?Gn:[].concat((0,ze.Z)(Gn.map(function(_r){return _r+Dt})),[0]),isSticky:Te})},[Dt,Ut,Te]),jn=Mt(Ot,It);return c.createElement("div",{style:(0,Ce.Z)({overflow:"hidden"},Te?{top:qt,bottom:Xt}:{}),ref:Qt,className:W()(Le,(0,He.Z)({},N,!!N))},c.createElement(pt,{style:{tableLayout:"fixed",visibility:Ve||jn?null:"hidden"}},(!Ve||!d||an)&&c.createElement(Fe,{colWidths:jn?[].concat((0,ze.Z)(jn),[Dt]):[],columCount:It+1,columns:bn}),f((0,Ce.Z)((0,Ce.Z)({},y),{},{stickyOffsets:Dn,columns:hn,flattenColumns:bn}))))}),Gt=c.memo(Be),pn=function(ne){var Le=ne.cells,Ve=ne.stickyOffsets,mt=ne.flattenColumns,St=ne.rowComponent,Ot=ne.cellComponent,It=ne.onHeaderRow,Ut=ne.index,Bt=x(le,["prefixCls","direction"]),fn=Bt.prefixCls,qt=Bt.direction,Xt;It&&(Xt=It(Le.map(function(l){return l.column}),Ut));var N=be(Le.map(function(l){return l.column}));return c.createElement(St,Xt,Le.map(function(l,d){var f=l.column,y=Xe(l.colStart,l.colEnd,mt,Ve,qt),R;return f&&f.onHeaderCell&&(R=l.column.onHeaderCell(f)),c.createElement(Nt,(0,L.Z)({},l,{scope:f.title?l.colSpan>1?"colgroup":"col":null,ellipsis:f.ellipsis,align:f.align,component:Ot,prefixCls:fn,key:N[d]},y,{additionalProps:R,rowType:"header"}))}))},En=pn;function sr(se){var ne=[];function Le(Ot,It){var Ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;ne[Ut]=ne[Ut]||[];var Bt=It,fn=Ot.filter(Boolean).map(function(qt){var Xt={key:qt.key,className:qt.className||"",children:qt.title,column:qt,colStart:Bt},N=1,l=qt.children;return l&&l.length>0&&(N=Le(l,Bt,Ut+1).reduce(function(d,f){return d+f},0),Xt.hasSubColumns=!0),"colSpan"in qt&&(N=qt.colSpan),"rowSpan"in qt&&(Xt.rowSpan=qt.rowSpan),Xt.colSpan=N,Xt.colEnd=Xt.colStart+N-1,ne[Ut].push(Xt),Bt+=N,N});return fn}Le(se,0);for(var Ve=ne.length,mt=function(It){ne[It].forEach(function(Ut){!("rowSpan"in Ut)&&!Ut.hasSubColumns&&(Ut.rowSpan=Ve-It)})},St=0;St<Ve;St+=1)mt(St);return ne}var Xn=function(ne){var Le=ne.stickyOffsets,Ve=ne.columns,mt=ne.flattenColumns,St=ne.onHeaderRow,Ot=x(le,["prefixCls","getComponent"]),It=Ot.prefixCls,Ut=Ot.getComponent,Bt=c.useMemo(function(){return sr(Ve)},[Ve]),fn=Ut(["header","wrapper"],"thead"),qt=Ut(["header","row"],"tr"),Xt=Ut(["header","cell"],"th");return c.createElement(fn,{className:"".concat(It,"-thead")},Bt.map(function(N,l){var d=c.createElement(En,{key:l,flattenColumns:mt,cells:N,stickyOffsets:Le,rowComponent:qt,cellComponent:Xt,onHeaderRow:St,index:l});return d}))},Wn=K(Xn),Cr=m(11592);function Rr(se){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof ne=="number"?ne:ne.endsWith("%")?se*parseFloat(ne)/100:null}function Qn(se,ne,Le){return c.useMemo(function(){if(ne&&ne>0){var Ve=0,mt=0;se.forEach(function(Xt){var N=Rr(ne,Xt.width);N?Ve+=N:mt+=1});var St=Math.max(ne,Le),Ot=Math.max(St-Ve,mt),It=mt,Ut=Ot/mt,Bt=0,fn=se.map(function(Xt){var N=(0,Ce.Z)({},Xt),l=Rr(ne,N.width);if(l)N.width=l;else{var d=Math.floor(Ut);N.width=It===1?Ot:d,Ot-=d,It-=1}return Bt+=N.width,N});if(Bt<St){var qt=St/Bt;Ot=St,fn.forEach(function(Xt,N){var l=Math.floor(Xt.width*qt);Xt.width=N===fn.length-1?Ot:l,Ot-=l})}return[fn,Math.max(Bt,St)]}return[se,ne]},[se,ne,Le])}var gr=["children"],Cn=["fixed"];function tn(se){return(0,Cr.Z)(se).filter(function(ne){return c.isValidElement(ne)}).map(function(ne){var Le=ne.key,Ve=ne.props,mt=Ve.children,St=(0,te.Z)(Ve,gr),Ot=(0,Ce.Z)({key:Le},St);return mt&&(Ot.children=tn(mt)),Ot})}function dn(se){return se.filter(function(ne){return ne&&(0,Pe.Z)(ne)==="object"&&!ne.hidden}).map(function(ne){var Le=ne.children;return Le&&Le.length>0?(0,Ce.Z)((0,Ce.Z)({},ne),{},{children:dn(Le)}):ne})}function Vn(se){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return se.filter(function(Le){return Le&&(0,Pe.Z)(Le)==="object"}).reduce(function(Le,Ve,mt){var St=Ve.fixed,Ot=St===!0?"left":St,It="".concat(ne,"-").concat(mt),Ut=Ve.children;return Ut&&Ut.length>0?[].concat((0,ze.Z)(Le),(0,ze.Z)(Vn(Ut,It).map(function(Bt){return(0,Ce.Z)({fixed:Ot},Bt)}))):[].concat((0,ze.Z)(Le),[(0,Ce.Z)((0,Ce.Z)({key:It},Ve),{},{fixed:Ot})])},[])}function vr(se){return se.map(function(ne){var Le=ne.fixed,Ve=(0,te.Z)(ne,Cn),mt=Le;return Le==="left"?mt="right":Le==="right"&&(mt="left"),(0,Ce.Z)({fixed:mt},Ve)})}function Et(se,ne){var Le=se.prefixCls,Ve=se.columns,mt=se.children,St=se.expandable,Ot=se.expandedKeys,It=se.columnTitle,Ut=se.getRowKey,Bt=se.onTriggerExpand,fn=se.expandIcon,qt=se.rowExpandable,Xt=se.expandIconColumnIndex,N=se.direction,l=se.expandRowByClick,d=se.columnWidth,f=se.fixed,y=se.scrollWidth,R=se.clientWidth,H=c.useMemo(function(){var on=Ve||tn(mt)||[];return dn(on.slice())},[Ve,mt]),ve=c.useMemo(function(){if(St){var on=H.slice();if(!on.includes(ee)){var _n=Xt||0;_n>=0&&(_n||f==="left"||!f)&&on.splice(_n,0,ee),f==="right"&&on.splice(H.length,0,ee)}var hn=on.indexOf(ee);on=on.filter(function(Gn,Mn){return Gn!==ee||Mn===hn});var bn=H[hn],Dn;f?Dn=f:Dn=bn?bn.fixed:null;var jn=(0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)({},at,{className:"".concat(Le,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",It),"fixed",Dn),"className","".concat(Le,"-row-expand-icon-cell")),"width",d),"render",function(Mn,_r,Tr){var gi=Ut(_r,Tr),ni=Ot.has(gi),Rt=qt?qt(_r):!0,vi=fn({prefixCls:Le,expanded:ni,expandable:Rt,record:_r,onExpand:Bt});return l?c.createElement("span",{onClick:function(Xr){return Xr.stopPropagation()}},vi):vi});return on.map(function(Gn){return Gn===ee?jn:Gn})}return H.filter(function(Gn){return Gn!==ee})},[St,H,Ut,Ot,fn,N]),Te=c.useMemo(function(){var on=ve;return ne&&(on=ne(on)),on.length||(on=[{render:function(){return null}}]),on},[ne,ve,N]),Ke=c.useMemo(function(){return N==="rtl"?vr(Vn(Te)):Vn(Te)},[Te,N,y]),pt=c.useMemo(function(){for(var on=-1,_n=Ke.length-1;_n>=0;_n-=1){var hn=Ke[_n].fixed;if(hn==="left"||hn===!0){on=_n;break}}if(on>=0)for(var bn=0;bn<=on;bn+=1){var Dn=Ke[bn].fixed;if(Dn!=="left"&&Dn!==!0)return!0}var jn=Ke.findIndex(function(_r){var Tr=_r.fixed;return Tr==="right"});if(jn>=0)for(var Gn=jn;Gn<Ke.length;Gn+=1){var Mn=Ke[Gn].fixed;if(Mn!=="right")return!0}return!1},[Ke]),Dt=Qn(Ke,y,R),$t=(0,ie.Z)(Dt,2),Qt=$t[0],an=$t[1];return[Te,Qt,an,pt]}var wt=Et;function Me(se,ne,Le){var Ve=bt(se),mt=Ve.expandIcon,St=Ve.expandedRowKeys,Ot=Ve.defaultExpandedRowKeys,It=Ve.defaultExpandAllRows,Ut=Ve.expandedRowRender,Bt=Ve.onExpand,fn=Ve.onExpandedRowsChange,qt=Ve.childrenColumnName,Xt=mt||Ue,N=qt||"children",l=c.useMemo(function(){return Ut?"row":se.expandable&&se.internalHooks===$&&se.expandable.__PARENT_RENDER_ICON__||ne.some(function(Te){return Te&&(0,Pe.Z)(Te)==="object"&&Te[N]})?"nest":!1},[!!Ut,ne]),d=c.useState(function(){return Ot||(It?xt(ne,Le,N):[])}),f=(0,ie.Z)(d,2),y=f[0],R=f[1],H=c.useMemo(function(){return new Set(St||y||[])},[St,y]),ve=c.useCallback(function(Te){var Ke=Le(Te,ne.indexOf(Te)),pt,Dt=H.has(Ke);Dt?(H.delete(Ke),pt=(0,ze.Z)(H)):pt=[].concat((0,ze.Z)(H),[Ke]),R(pt),Bt&&Bt(!Dt,Te),fn&&fn(pt)},[Le,H,ne,Bt,fn]);return[Ve,l,H,Xt,N,ve]}function nt(se,ne,Le){var Ve=se.map(function(mt,St){return Xe(St,St,se,ne,Le)});return(0,P.Z)(function(){return Ve},[Ve],function(mt,St){return!(0,J.Z)(mt,St)})}function vt(se){var ne=(0,c.useRef)(se),Le=(0,c.useState)({}),Ve=(0,ie.Z)(Le,2),mt=Ve[1],St=(0,c.useRef)(null),Ot=(0,c.useRef)([]);function It(Ut){Ot.current.push(Ut);var Bt=Promise.resolve();St.current=Bt,Bt.then(function(){if(St.current===Bt){var fn=Ot.current,qt=ne.current;Ot.current=[],fn.forEach(function(Xt){ne.current=Xt(ne.current)}),St.current=null,qt!==ne.current&&mt({})}})}return(0,c.useEffect)(function(){return function(){St.current=null}},[]),[ne.current,It]}function yt(se){var ne=(0,c.useRef)(se||null),Le=(0,c.useRef)();function Ve(){window.clearTimeout(Le.current)}function mt(Ot){ne.current=Ot,Ve(),Le.current=window.setTimeout(function(){ne.current=null,Le.current=void 0},100)}function St(){return ne.current}return(0,c.useEffect)(function(){return Ve},[]),[mt,St]}function Tt(){var se=c.useState(-1),ne=(0,ie.Z)(se,2),Le=ne[0],Ve=ne[1],mt=c.useState(-1),St=(0,ie.Z)(mt,2),Ot=St[0],It=St[1],Ut=c.useCallback(function(Bt,fn){Ve(Bt),It(fn)},[]);return[Le,Ot,Ut]}var Jt=m(47273),mn=(0,Jt.Z)()?window:null;function yn(se,ne){var Le=(0,Pe.Z)(se)==="object"?se:{},Ve=Le.offsetHeader,mt=Ve===void 0?0:Ve,St=Le.offsetSummary,Ot=St===void 0?0:St,It=Le.offsetScroll,Ut=It===void 0?0:It,Bt=Le.getContainer,fn=Bt===void 0?function(){return mn}:Bt,qt=fn()||mn,Xt=!!se;return c.useMemo(function(){return{isSticky:Xt,stickyClassName:Xt?"".concat(ne,"-sticky-holder"):"",offsetHeader:mt,offsetSummary:Ot,offsetScroll:Ut,container:qt}},[Xt,Ut,mt,Ot,ne,qt])}function Wt(se,ne,Le){var Ve=(0,c.useMemo)(function(){var mt=ne.length,St=function(Bt,fn,qt){for(var Xt=[],N=0,l=Bt;l!==fn;l+=qt)Xt.push(N),ne[l].fixed&&(N+=se[l]||0);return Xt},Ot=St(0,mt,1),It=St(mt-1,-1,-1).reverse();return Le==="rtl"?{left:It,right:Ot}:{left:Ot,right:It}},[se,ne,Le]);return Ve}var gn=Wt;function Ln(se){var ne=se.className,Le=se.children;return c.createElement("div",{className:ne},Le)}var vn=Ln,ht=m(8224),Ct=m(16089),Zt=m(76846);function Lt(se){var ne=(0,Zt.bn)(se),Le=ne.getBoundingClientRect(),Ve=document.documentElement;return{left:Le.left+(window.pageXOffset||Ve.scrollLeft)-(Ve.clientLeft||document.body.clientLeft||0),top:Le.top+(window.pageYOffset||Ve.scrollTop)-(Ve.clientTop||document.body.clientTop||0)}}var zt=function(ne,Le){var Ve,mt,St=ne.scrollBodyRef,Ot=ne.onScroll,It=ne.offsetScroll,Ut=ne.container,Bt=ne.direction,fn=x(le,"prefixCls"),qt=((Ve=St.current)===null||Ve===void 0?void 0:Ve.scrollWidth)||0,Xt=((mt=St.current)===null||mt===void 0?void 0:mt.clientWidth)||0,N=qt&&Xt*(Xt/qt),l=c.useRef(),d=vt({scrollLeft:0,isHiddenScrollBar:!0}),f=(0,ie.Z)(d,2),y=f[0],R=f[1],H=c.useRef({delta:0,x:0}),ve=c.useState(!1),Te=(0,ie.Z)(ve,2),Ke=Te[0],pt=Te[1],Dt=c.useRef(null);c.useEffect(function(){return function(){Ct.Z.cancel(Dt.current)}},[]);var $t=function(){pt(!1)},Qt=function(bn){bn.persist(),H.current.delta=bn.pageX-y.scrollLeft,H.current.x=0,pt(!0),bn.preventDefault()},an=function(bn){var Dn,jn=bn||((Dn=window)===null||Dn===void 0?void 0:Dn.event),Gn=jn.buttons;if(!Ke||Gn===0){Ke&&pt(!1);return}var Mn=H.current.x+bn.pageX-H.current.x-H.current.delta,_r=Bt==="rtl";Mn=Math.max(_r?N-Xt:0,Math.min(_r?0:Xt-N,Mn));var Tr=!_r||Math.abs(Mn)+Math.abs(N)<Xt;Tr&&(Ot({scrollLeft:Mn/Xt*(qt+2)}),H.current.x=bn.pageX)},on=function(){Ct.Z.cancel(Dt.current),Dt.current=(0,Ct.Z)(function(){if(St.current){var bn=Lt(St.current).top,Dn=bn+St.current.offsetHeight,jn=Ut===window?document.documentElement.scrollTop+window.innerHeight:Lt(Ut).top+Ut.clientHeight;Dn-(0,Ze.Z)()<=jn||bn>=jn-It?R(function(Gn){return(0,Ce.Z)((0,Ce.Z)({},Gn),{},{isHiddenScrollBar:!0})}):R(function(Gn){return(0,Ce.Z)((0,Ce.Z)({},Gn),{},{isHiddenScrollBar:!1})})}})},_n=function(bn){R(function(Dn){return(0,Ce.Z)((0,Ce.Z)({},Dn),{},{scrollLeft:bn/qt*Xt||0})})};return c.useImperativeHandle(Le,function(){return{setScrollLeft:_n,checkScrollBarVisible:on}}),c.useEffect(function(){var hn=(0,ht.Z)(document.body,"mouseup",$t,!1),bn=(0,ht.Z)(document.body,"mousemove",an,!1);return on(),function(){hn.remove(),bn.remove()}},[N,Ke]),c.useEffect(function(){if(St.current){for(var hn=[],bn=(0,Zt.bn)(St.current);bn;)hn.push(bn),bn=bn.parentElement;return hn.forEach(function(Dn){return Dn.addEventListener("scroll",on,!1)}),window.addEventListener("resize",on,!1),window.addEventListener("scroll",on,!1),Ut.addEventListener("scroll",on,!1),function(){hn.forEach(function(Dn){return Dn.removeEventListener("scroll",on)}),window.removeEventListener("resize",on),window.removeEventListener("scroll",on),Ut.removeEventListener("scroll",on)}}},[Ut]),c.useEffect(function(){y.isHiddenScrollBar||R(function(hn){var bn=St.current;return bn?(0,Ce.Z)((0,Ce.Z)({},hn),{},{scrollLeft:bn.scrollLeft/bn.scrollWidth*bn.clientWidth}):hn})},[y.isHiddenScrollBar]),qt<=Xt||!N||y.isHiddenScrollBar?null:c.createElement("div",{style:{height:(0,Ze.Z)(),width:Xt,bottom:It},className:"".concat(fn,"-sticky-scroll")},c.createElement("div",{onMouseDown:Qt,ref:l,className:W()("".concat(fn,"-sticky-scroll-bar"),(0,He.Z)({},"".concat(fn,"-sticky-scroll-bar-active"),Ke)),style:{width:"".concat(N,"px"),transform:"translate3d(".concat(y.scrollLeft,"px, 0, 0)")}}))},Vt=c.forwardRef(zt);function nn(se){return null}var rn=nn;function Sn(se){return null}var On=Sn,or="rc-table",Nn=[],Pn={};function Hn(){return"No Data"}function Kn(se,ne){var Le=(0,Ce.Z)({rowKey:"key",prefixCls:or,emptyText:Hn},se),Ve=Le.prefixCls,mt=Le.className,St=Le.rowClassName,Ot=Le.style,It=Le.data,Ut=Le.rowKey,Bt=Le.scroll,fn=Le.tableLayout,qt=Le.direction,Xt=Le.title,N=Le.footer,l=Le.summary,d=Le.caption,f=Le.id,y=Le.showHeader,R=Le.components,H=Le.emptyText,ve=Le.onRow,Te=Le.onHeaderRow,Ke=Le.onScroll,pt=Le.internalHooks,Dt=Le.transformColumns,$t=Le.internalRefs,Qt=Le.tailor,an=Le.getContainerWidth,on=Le.sticky,_n=Le.rowHoverable,hn=_n===void 0?!0:_n,bn=It||Nn,Dn=!!bn.length,jn=pt===$,Gn=c.useCallback(function(yi,Ti){return(0,de.Z)(R,yi)||Ti},[R]),Mn=c.useMemo(function(){return typeof Ut=="function"?Ut:function(yi){var Ti=yi&&yi[Ut];return Ti}},[Ut]),_r=Gn(["body"]),Tr=Tt(),gi=(0,ie.Z)(Tr,3),ni=gi[0],Rt=gi[1],vi=gi[2],ts=Me(Le,bn,Mn),Xr=(0,ie.Z)(ts,6),Fr=Xr[0],Yi=Xr[1],Xi=Xr[2],Er=Xr[3],Vr=Xr[4],dr=Xr[5],xr=Bt==null?void 0:Bt.x,ai=c.useState(0),hi=(0,ie.Z)(ai,2),Ui=hi[0],Ni=hi[1],Hi=wt((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},Le),Fr),{},{expandable:!!Fr.expandedRowRender,columnTitle:Fr.columnTitle,expandedKeys:Xi,getRowKey:Mn,onTriggerExpand:dr,expandIcon:Er,expandIconColumnIndex:Fr.expandIconColumnIndex,direction:qt,scrollWidth:jn&&Qt&&typeof xr=="number"?xr:null,clientWidth:Ui}),jn?Dt:null),As=(0,ie.Z)(Hi,4),Sr=As[0],Mr=As[1],xi=As[2],Ki=As[3],Ei=xi!=null?xi:xr,$s=c.useMemo(function(){return{columns:Sr,flattenColumns:Mr}},[Sr,Mr]),qi=c.useRef(),na=c.useRef(),rs=c.useRef(),Bi=c.useRef();c.useImperativeHandle(ne,function(){return{nativeElement:qi.current,scrollTo:function(Ti){var Ds;if(rs.current instanceof HTMLElement){var ra=Ti.index,Rs=Ti.top,Oo=Ti.key;if(lt(Rs)){var ho;(ho=rs.current)===null||ho===void 0||ho.scrollTo({top:Rs})}else{var ro,yo=Oo!=null?Oo:Mn(bn[ra]);(ro=rs.current.querySelector('[data-row-key="'.concat(yo,'"]')))===null||ro===void 0||ro.scrollIntoView()}}else(Ds=rs.current)!==null&&Ds!==void 0&&Ds.scrollTo&&rs.current.scrollTo(Ti)}}});var Qi=c.useRef(),Wi=c.useState(!1),Is=(0,ie.Z)(Wi,2),ys=Is[0],Di=Is[1],fs=c.useState(!1),Vi=(0,ie.Z)(fs,2),Us=Vi[0],hs=Vi[1],Vs=c.useState(new Map),pa=(0,ie.Z)(Vs,2),fo=pa[0],cs=pa[1],Do=be(Mr),Gs=Do.map(function(yi){return fo.get(yi)}),ca=c.useMemo(function(){return Gs},[Gs.join("_")]),da=gn(ca,Mr,qt),qs=Bt&&je(Bt.y),Ys=Bt&&je(Ei)||!!Fr.fixed,ga=Ys&&Mr.some(function(yi){var Ti=yi.fixed;return Ti}),Ra=c.useRef(),va=yn(on,Ve),$a=va.isSticky,Xs=va.offsetHeader,Al=va.offsetSummary,cl=va.offsetScroll,fa=va.stickyClassName,dl=va.container,si=c.useMemo(function(){return l==null?void 0:l(bn)},[l,bn]),$i=(qs||$a)&&c.isValidElement(si)&&si.type===D&&si.props.fixed,Ji,bs,Qs;qs&&(bs={overflowY:Dn?"scroll":"auto",maxHeight:Bt.y}),Ys&&(Ji={overflowX:"auto"},qs||(bs={overflowY:"hidden"}),Qs={width:Ei===!0?"auto":Ei,minWidth:"100%"});var ya=c.useCallback(function(yi,Ti){cs(function(Ds){if(Ds.get(yi)!==Ti){var ra=new Map(Ds);return ra.set(yi,Ti),ra}return Ds})},[]),xa=yt(null),Ks=(0,ie.Z)(xa,2),Ql=Ks[0],Il=Ks[1];function Yo(yi,Ti){Ti&&(typeof Ti=="function"?Ti(yi):Ti.scrollLeft!==yi&&(Ti.scrollLeft=yi,Ti.scrollLeft!==yi&&setTimeout(function(){Ti.scrollLeft=yi},0)))}var vo=(0,F.Z)(function(yi){var Ti=yi.currentTarget,Ds=yi.scrollLeft,ra=qt==="rtl",Rs=typeof Ds=="number"?Ds:Ti.scrollLeft,Oo=Ti||Pn;if(!Il()||Il()===Oo){var ho;Ql(Oo),Yo(Rs,na.current),Yo(Rs,rs.current),Yo(Rs,Qi.current),Yo(Rs,(ho=Ra.current)===null||ho===void 0?void 0:ho.setScrollLeft)}var ro=Ti||na.current;if(ro){var yo=jn&&Qt&&typeof Ei=="number"?Ei:ro.scrollWidth,Lo=ro.clientWidth;if(yo===Lo){Di(!1),hs(!1);return}ra?(Di(-Rs<yo-Lo),hs(-Rs>0)):(Di(Rs>0),hs(Rs<yo-Lo))}}),Dl=(0,F.Z)(function(yi){vo(yi),Ke==null||Ke(yi)}),Rl=function(){if(Ys&&rs.current){var Ti;vo({currentTarget:(0,Zt.bn)(rs.current),scrollLeft:(Ti=rs.current)===null||Ti===void 0?void 0:Ti.scrollLeft})}else Di(!1),hs(!1)},Ol=function(Ti){var Ds,ra=Ti.width;(Ds=Ra.current)===null||Ds===void 0||Ds.checkScrollBarVisible();var Rs=qi.current?qi.current.offsetWidth:ra;jn&&an&&qi.current&&(Rs=an(qi.current,Rs)||Rs),Rs!==Ui&&(Rl(),Ni(Rs))},Ll=c.useRef(!1);c.useEffect(function(){Ll.current&&Rl()},[Ys,It,Sr.length]),c.useEffect(function(){Ll.current=!0},[]);var Jl=c.useState(0),Pl=(0,ie.Z)(Jl,2),Xo=Pl[0],Ml=Pl[1],ql=c.useState(!0),kl=(0,ie.Z)(ql,2),fl=kl[0],hl=kl[1];(0,g.Z)(function(){(!Qt||!jn)&&(rs.current instanceof Element?Ml((0,Ze.o)(rs.current).width):Ml((0,Ze.o)(Bi.current).width)),hl((0,Oe.G)("position","sticky"))},[]),c.useEffect(function(){jn&&$t&&($t.body.current=rs.current)});var eu=c.useCallback(function(yi){return c.createElement(c.Fragment,null,c.createElement(Wn,yi),$i==="top"&&c.createElement(_e,yi,si))},[$i,si]),ml=c.useCallback(function(yi){return c.createElement(_e,yi,si)},[si]),Qo=Gn(["table"],"table"),Ro=c.useMemo(function(){return fn||(ga?Ei==="max-content"?"auto":"fixed":qs||$a||Mr.some(function(yi){var Ti=yi.ellipsis;return Ti})?"fixed":"auto")},[qs,ga,Mr,fn,$a]),pl,gl={colWidths:ca,columCount:Mr.length,stickyOffsets:da,onHeaderRow:Te,fixHeader:qs,scroll:Bt},vl=c.useMemo(function(){return Dn?null:typeof H=="function"?H():H},[Dn,H]),Ea=c.createElement(jt,{data:bn,measureColumnWidth:qs||Ys||$a}),gs=c.createElement(Fe,{colWidths:Mr.map(function(yi){var Ti=yi.width;return Ti}),columns:Mr}),to=d!=null?c.createElement("caption",{className:"".concat(Ve,"-caption")},d):void 0,no=(0,re.Z)(Le,{data:!0}),Nl=(0,re.Z)(Le,{aria:!0});if(qs||$a){var yl;typeof _r=="function"?(yl=_r(bn,{scrollbarSize:Xo,ref:rs,onScroll:vo}),gl.colWidths=Mr.map(function(yi,Ti){var Ds=yi.width,ra=Ti===Mr.length-1?Ds-Xo:Ds;return typeof ra=="number"&&!Number.isNaN(ra)?ra:0})):yl=c.createElement("div",{style:(0,Ce.Z)((0,Ce.Z)({},Ji),bs),onScroll:Dl,ref:rs,className:W()("".concat(Ve,"-body"))},c.createElement(Qo,(0,L.Z)({style:(0,Ce.Z)((0,Ce.Z)({},Qs),{},{tableLayout:Ro})},Nl),to,gs,Ea,!$i&&si&&c.createElement(_e,{stickyOffsets:da,flattenColumns:Mr},si)));var Bl=(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({noData:!bn.length,maxContentScroll:Ys&&Ei==="max-content"},gl),$s),{},{direction:qt,stickyClassName:fa,onScroll:vo});pl=c.createElement(c.Fragment,null,y!==!1&&c.createElement(Gt,(0,L.Z)({},Bl,{stickyTopOffset:Xs,className:"".concat(Ve,"-header"),ref:na}),eu),yl,$i&&$i!=="top"&&c.createElement(Gt,(0,L.Z)({},Bl,{stickyBottomOffset:Al,className:"".concat(Ve,"-summary"),ref:Qi}),ml),$a&&rs.current&&rs.current instanceof Element&&c.createElement(Vt,{ref:Ra,offsetScroll:cl,scrollBodyRef:rs,onScroll:vo,container:dl,direction:qt}))}else pl=c.createElement("div",{style:(0,Ce.Z)((0,Ce.Z)({},Ji),bs),className:W()("".concat(Ve,"-content")),onScroll:vo,ref:rs},c.createElement(Qo,(0,L.Z)({style:(0,Ce.Z)((0,Ce.Z)({},Qs),{},{tableLayout:Ro})},Nl),to,gs,y!==!1&&c.createElement(Wn,(0,L.Z)({},gl,$s)),Ea,si&&c.createElement(_e,{stickyOffsets:da,flattenColumns:Mr},si)));var bl=c.createElement("div",(0,L.Z)({className:W()(Ve,mt,(0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)({},"".concat(Ve,"-rtl"),qt==="rtl"),"".concat(Ve,"-ping-left"),ys),"".concat(Ve,"-ping-right"),Us),"".concat(Ve,"-layout-fixed"),fn==="fixed"),"".concat(Ve,"-fixed-header"),qs),"".concat(Ve,"-fixed-column"),ga),"".concat(Ve,"-fixed-column-gapped"),ga&&Ki),"".concat(Ve,"-scroll-horizontal"),Ys),"".concat(Ve,"-has-fix-left"),Mr[0]&&Mr[0].fixed),"".concat(Ve,"-has-fix-right"),Mr[Mr.length-1]&&Mr[Mr.length-1].fixed==="right")),style:Ot,id:f,ref:qi},no),Xt&&c.createElement(vn,{className:"".concat(Ve,"-title")},Xt(bn)),c.createElement("div",{ref:Bi,className:"".concat(Ve,"-container")},pl),N&&c.createElement(vn,{className:"".concat(Ve,"-footer")},N(bn)));Ys&&(bl=c.createElement(Ee.Z,{onResize:Ol},bl));var $l=nt(Mr,da,qt),tu=c.useMemo(function(){return{scrollX:Ei,prefixCls:Ve,getComponent:Gn,scrollbarSize:Xo,direction:qt,fixedInfoList:$l,isSticky:$a,supportSticky:fl,componentWidth:Ui,fixHeader:qs,fixColumn:ga,horizonScroll:Ys,tableLayout:Ro,rowClassName:St,expandedRowClassName:Fr.expandedRowClassName,expandIcon:Er,expandableType:Yi,expandRowByClick:Fr.expandRowByClick,expandedRowRender:Fr.expandedRowRender,onTriggerExpand:dr,expandIconColumnIndex:Fr.expandIconColumnIndex,indentSize:Fr.indentSize,allColumnsFixedLeft:Mr.every(function(yi){return yi.fixed==="left"}),emptyNode:vl,columns:Sr,flattenColumns:Mr,onColumnResize:ya,hoverStartRow:ni,hoverEndRow:Rt,onHover:vi,rowExpandable:Fr.rowExpandable,onRow:ve,getRowKey:Mn,expandedKeys:Xi,childrenColumnName:Vr,rowHoverable:hn}},[Ei,Ve,Gn,Xo,qt,$l,$a,fl,Ui,qs,ga,Ys,Ro,St,Fr.expandedRowClassName,Er,Yi,Fr.expandRowByClick,Fr.expandedRowRender,dr,Fr.expandIconColumnIndex,Fr.indentSize,vl,Sr,Mr,ya,ni,Rt,vi,Fr.rowExpandable,ve,Mn,Xi,Vr,hn]);return c.createElement(le.Provider,{value:tu},bl)}var er=c.forwardRef(Kn);function $n(se){return A(er,se)}var Zn=$n();Zn.EXPAND_COLUMN=ee,Zn.INTERNAL_HOOKS=$,Zn.Column=rn,Zn.ColumnGroup=On,Zn.Summary=pe;var nr=Zn,ar=m(48911),Jn=o(null),Yn=o(null);function qn(se,ne,Le){var Ve=ne||1;return Le[se+Ve]-(Le[se]||0)}function Fn(se){var ne=se.rowInfo,Le=se.column,Ve=se.colIndex,mt=se.indent,St=se.index,Ot=se.component,It=se.renderIndex,Ut=se.record,Bt=se.style,fn=se.className,qt=se.inverse,Xt=se.getHeight,N=Le.render,l=Le.dataIndex,d=Le.className,f=Le.width,y=x(Yn,["columnsOffset"]),R=y.columnsOffset,H=gt(ne,Le,Ve,mt,St),ve=H.key,Te=H.fixedInfo,Ke=H.appendCellNode,pt=H.additionalCellProps,Dt=pt.style,$t=pt.colSpan,Qt=$t===void 0?1:$t,an=pt.rowSpan,on=an===void 0?1:an,_n=Ve-1,hn=qn(_n,Qt,R),bn=Qt>1?f-hn:0,Dn=(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},Dt),Bt),{},{flex:"0 0 ".concat(hn,"px"),width:"".concat(hn,"px"),marginRight:bn,pointerEvents:"auto"}),jn=c.useMemo(function(){return qt?on<=1:Qt===0||on===0||on>1},[on,Qt,qt]);jn?Dn.visibility="hidden":qt&&(Dn.height=Xt==null?void 0:Xt(on));var Gn=jn?function(){return null}:N,Mn={};return(on===0||Qt===0)&&(Mn.rowSpan=1,Mn.colSpan=1),c.createElement(Nt,(0,L.Z)({className:W()(d,fn),ellipsis:Le.ellipsis,align:Le.align,scope:Le.rowScope,component:Ot,prefixCls:ne.prefixCls,key:ve,record:Ut,index:St,renderIndex:It,dataIndex:l,render:Gn,shouldCellUpdate:Le.shouldCellUpdate},Te,{appendNode:Ke,additionalProps:(0,Ce.Z)((0,Ce.Z)({},pt),{},{style:Dn},Mn)}))}var $r=Fn,Ft=["data","index","className","rowKey","style","extra","getHeight"],tr=c.forwardRef(function(se,ne){var Le=se.data,Ve=se.index,mt=se.className,St=se.rowKey,Ot=se.style,It=se.extra,Ut=se.getHeight,Bt=(0,te.Z)(se,Ft),fn=Le.record,qt=Le.indent,Xt=Le.index,N=x(le,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),l=N.scrollX,d=N.flattenColumns,f=N.prefixCls,y=N.fixColumn,R=N.componentWidth,H=x(Jn,["getComponent"]),ve=H.getComponent,Te=tt(fn,St,Ve,qt),Ke=ve(["body","row"],"div"),pt=ve(["body","cell"],"div"),Dt=Te.rowSupportExpand,$t=Te.expanded,Qt=Te.rowProps,an=Te.expandedRowRender,on=Te.expandedRowClassName,_n;if(Dt&&$t){var hn=an(fn,Ve,qt+1,$t),bn=dt(on,fn,Ve,qt),Dn={};y&&(Dn={style:(0,He.Z)({},"--virtual-width","".concat(R,"px"))});var jn="".concat(f,"-expanded-row-cell");_n=c.createElement(Ke,{className:W()("".concat(f,"-expanded-row"),"".concat(f,"-expanded-row-level-").concat(qt+1),bn)},c.createElement(Nt,{component:pt,prefixCls:f,className:W()(jn,(0,He.Z)({},"".concat(jn,"-fixed"),y)),additionalProps:Dn},hn))}var Gn=(0,Ce.Z)((0,Ce.Z)({},Ot),{},{width:l});It&&(Gn.position="absolute",Gn.pointerEvents="none");var Mn=c.createElement(Ke,(0,L.Z)({},Qt,Bt,{"data-row-key":St,ref:Dt?null:ne,className:W()(mt,"".concat(f,"-row"),Qt==null?void 0:Qt.className,(0,He.Z)({},"".concat(f,"-row-extra"),It)),style:(0,Ce.Z)((0,Ce.Z)({},Gn),Qt==null?void 0:Qt.style)}),d.map(function(_r,Tr){return c.createElement($r,{key:Tr,component:pt,rowInfo:Te,column:_r,colIndex:Tr,indent:qt,index:Ve,renderIndex:Xt,record:fn,inverse:It,getHeight:Ut})}));return Dt?c.createElement("div",{ref:ne},Mn,_n):Mn}),ur=K(tr),Yr=ur,zr=c.forwardRef(function(se,ne){var Le=se.data,Ve=se.onScroll,mt=x(le,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),St=mt.flattenColumns,Ot=mt.onColumnResize,It=mt.getRowKey,Ut=mt.expandedKeys,Bt=mt.prefixCls,fn=mt.childrenColumnName,qt=mt.scrollX,Xt=mt.direction,N=x(Jn),l=N.sticky,d=N.scrollY,f=N.listItemHeight,y=N.getComponent,R=N.onScroll,H=c.useRef(),ve=st(Le,fn,Ut,It),Te=c.useMemo(function(){var _n=0;return St.map(function(hn){var bn=hn.width,Dn=hn.key;return _n+=bn,[Dn,bn,_n]})},[St]),Ke=c.useMemo(function(){return Te.map(function(_n){return _n[2]})},[Te]);c.useEffect(function(){Te.forEach(function(_n){var hn=(0,ie.Z)(_n,2),bn=hn[0],Dn=hn[1];Ot(bn,Dn)})},[Te]),c.useImperativeHandle(ne,function(){var _n,hn={scrollTo:function(Dn){var jn;(jn=H.current)===null||jn===void 0||jn.scrollTo(Dn)},nativeElement:(_n=H.current)===null||_n===void 0?void 0:_n.nativeElement};return Object.defineProperty(hn,"scrollLeft",{get:function(){var Dn;return((Dn=H.current)===null||Dn===void 0?void 0:Dn.getScrollInfo().x)||0},set:function(Dn){var jn;(jn=H.current)===null||jn===void 0||jn.scrollTo({left:Dn})}}),hn});var pt=function(hn,bn){var Dn,jn=(Dn=ve[bn])===null||Dn===void 0?void 0:Dn.record,Gn=hn.onCell;if(Gn){var Mn,_r=Gn(jn,bn);return(Mn=_r==null?void 0:_r.rowSpan)!==null&&Mn!==void 0?Mn:1}return 1},Dt=function(hn){var bn=hn.start,Dn=hn.end,jn=hn.getSize,Gn=hn.offsetY;if(Dn<0)return null;for(var Mn=St.filter(function(Er){return pt(Er,bn)===0}),_r=bn,Tr=function(Vr){if(Mn=Mn.filter(function(dr){return pt(dr,Vr)===0}),!Mn.length)return _r=Vr,1},gi=bn;gi>=0&&!Tr(gi);gi-=1);for(var ni=St.filter(function(Er){return pt(Er,Dn)!==1}),Rt=Dn,vi=function(Vr){if(ni=ni.filter(function(dr){return pt(dr,Vr)!==1}),!ni.length)return Rt=Math.max(Vr-1,Dn),1},ts=Dn;ts<ve.length&&!vi(ts);ts+=1);for(var Xr=[],Fr=function(Vr){var dr=ve[Vr];if(!dr)return 1;St.some(function(xr){return pt(xr,Vr)>1})&&Xr.push(Vr)},Yi=_r;Yi<=Rt;Yi+=1)Fr(Yi);var Xi=Xr.map(function(Er){var Vr=ve[Er],dr=It(Vr.record,Er),xr=function(Ui){var Ni=Er+Ui-1,Hi=It(ve[Ni].record,Ni),As=jn(dr,Hi);return As.bottom-As.top},ai=jn(dr);return c.createElement(Yr,{key:Er,data:Vr,rowKey:dr,index:Er,style:{top:-Gn+ai.top},extra:!0,getHeight:xr})});return Xi},$t=c.useMemo(function(){return{columnsOffset:Ke}},[Ke]),Qt="".concat(Bt,"-tbody"),an=y(["body","wrapper"]),on={};return l&&(on.position="sticky",on.bottom=0,(0,Pe.Z)(l)==="object"&&l.offsetScroll&&(on.bottom=l.offsetScroll)),c.createElement(Yn.Provider,{value:$t},c.createElement(ar.Z,{fullHeight:!1,ref:H,prefixCls:"".concat(Qt,"-virtual"),styles:{horizontalScrollBar:on},className:Qt,height:d,itemHeight:f||24,data:ve,itemKey:function(hn){return It(hn.record)},component:an,scrollWidth:qt,direction:Xt,onVirtualScroll:function(hn){var bn,Dn=hn.x;Ve({currentTarget:(bn=H.current)===null||bn===void 0?void 0:bn.nativeElement,scrollLeft:Dn})},onScroll:R,extraRender:Dt},function(_n,hn,bn){var Dn=It(_n.record,hn);return c.createElement(Yr,{data:_n,rowKey:Dn,index:hn,style:bn.style})}))}),li=K(zr),Qr=li,Bn=function(ne,Le){var Ve=Le.ref,mt=Le.onScroll;return c.createElement(Qr,{ref:Ve,data:ne,onScroll:mt})};function An(se,ne){var Le=se.data,Ve=se.columns,mt=se.scroll,St=se.sticky,Ot=se.prefixCls,It=Ot===void 0?or:Ot,Ut=se.className,Bt=se.listItemHeight,fn=se.components,qt=se.onScroll,Xt=mt||{},N=Xt.x,l=Xt.y;typeof N!="number"&&(N=1),typeof l!="number"&&(l=500);var d=(0,Re.zX)(function(R,H){return(0,de.Z)(fn,R)||H}),f=(0,Re.zX)(qt),y=c.useMemo(function(){return{sticky:St,scrollY:l,listItemHeight:Bt,getComponent:d,onScroll:f}},[St,l,Bt,d,f]);return c.createElement(Jn.Provider,{value:y},c.createElement(nr,(0,L.Z)({},se,{className:W()(Ut,"".concat(It,"-virtual")),scroll:(0,Ce.Z)((0,Ce.Z)({},mt),{},{x:N}),components:(0,Ce.Z)((0,Ce.Z)({},fn),{},{body:Le!=null&&Le.length?Bn:void 0}),columns:Ve,internalHooks:$,tailor:!0,ref:ne})))}var en=c.forwardRef(An);function sn(se){return A(en,se)}var Rn=sn(),Un=null,Ar=se=>null,cr=se=>null,Ir=m(84105),Jr=m(82661),mi=m(34643),Li=m(34061),Gr=m(18929);function Ri(se){const[ne,Le]=(0,c.useState)(null);return[(0,c.useCallback)((St,Ot,It)=>{const Ut=ne!=null?ne:St,Bt=Math.min(Ut||0,St),fn=Math.max(Ut||0,St),qt=Ot.slice(Bt,fn+1).map(l=>se(l)),Xt=qt.some(l=>!It.has(l)),N=[];return qt.forEach(l=>{Xt?(It.has(l)||N.push(l),It.add(l)):(It.delete(l),N.push(l))}),Le(Xt?fn:null),N},[ne]),St=>{Le(St)}]}var qr=m(32383),bi=m(62673),ri=m(75727),di=m(47889);const ii={},Oi="SELECT_ALL",Lr="SELECT_INVERT",Pi="SELECT_NONE",Mi=[],ki=(se,ne)=>{let Le=[];return(ne||[]).forEach(Ve=>{Le.push(Ve),Ve&&typeof Ve=="object"&&se in Ve&&(Le=[].concat((0,ze.Z)(Le),(0,ze.Z)(ki(se,Ve[se]))))}),Le};var zn=(se,ne)=>{const{preserveSelectedRowKeys:Le,selectedRowKeys:Ve,defaultSelectedRowKeys:mt,getCheckboxProps:St,onChange:Ot,onSelect:It,onSelectAll:Ut,onSelectInvert:Bt,onSelectNone:fn,onSelectMultiple:qt,columnWidth:Xt,type:N,selections:l,fixed:d,renderCell:f,hideSelectAll:y,checkStrictly:R=!0}=ne||{},{prefixCls:H,data:ve,pageData:Te,getRecordByKey:Ke,getRowKey:pt,expandType:Dt,childrenColumnName:$t,locale:Qt,getPopupContainer:an}=se,on=(0,qr.ln)("Table"),[_n,hn]=Ri(Er=>Er),[bn,Dn]=(0,Gr.Z)(Ve||mt||Mi,{value:Ve}),jn=c.useRef(new Map),Gn=(0,c.useCallback)(Er=>{if(Le){const Vr=new Map;Er.forEach(dr=>{let xr=Ke(dr);!xr&&jn.current.has(dr)&&(xr=jn.current.get(dr)),Vr.set(dr,xr)}),jn.current=Vr}},[Ke,Le]);c.useEffect(()=>{Gn(bn)},[bn]);const Mn=(0,c.useMemo)(()=>ki($t,Te),[$t,Te]),{keyEntities:_r}=(0,c.useMemo)(()=>{if(R)return{keyEntities:null};let Er=ve;if(Le){const Vr=new Set(Mn.map((xr,ai)=>pt(xr,ai))),dr=Array.from(jn.current).reduce((xr,ai)=>{let[hi,Ui]=ai;return Vr.has(hi)?xr:xr.concat(Ui)},[]);Er=[].concat((0,ze.Z)(Er),(0,ze.Z)(dr))}return(0,Li.I8)(Er,{externalGetKey:pt,childrenPropName:$t})},[ve,pt,R,$t,Le,Mn]),Tr=(0,c.useMemo)(()=>{const Er=new Map;return Mn.forEach((Vr,dr)=>{const xr=pt(Vr,dr),ai=(St?St(Vr):null)||{};Er.set(xr,ai)}),Er},[Mn,pt,St]),gi=(0,c.useCallback)(Er=>{const Vr=pt(Er);let dr;return Tr.has(Vr)?dr=Tr.get(pt(Er)):dr=St?St(Er):void 0,!!(dr!=null&&dr.disabled)},[Tr,pt]),[ni,Rt]=(0,c.useMemo)(()=>{if(R)return[bn||[],[]];const{checkedKeys:Er,halfCheckedKeys:Vr}=(0,mi.S)(bn,!0,_r,gi);return[Er||[],Vr]},[bn,R,_r,gi]),vi=(0,c.useMemo)(()=>{const Er=N==="radio"?ni.slice(0,1):ni;return new Set(Er)},[ni,N]),ts=(0,c.useMemo)(()=>N==="radio"?new Set:new Set(Rt),[Rt,N]);c.useEffect(()=>{ne||Dn(Mi)},[!!ne]);const Xr=(0,c.useCallback)((Er,Vr)=>{let dr,xr;Gn(Er),Le?(dr=Er,xr=Er.map(ai=>jn.current.get(ai))):(dr=[],xr=[],Er.forEach(ai=>{const hi=Ke(ai);hi!==void 0&&(dr.push(ai),xr.push(hi))})),Dn(dr),Ot==null||Ot(dr,xr,{type:Vr})},[Dn,Ke,Ot,Le]),Fr=(0,c.useCallback)((Er,Vr,dr,xr)=>{if(It){const ai=dr.map(hi=>Ke(hi));It(Ke(Er),Vr,ai,xr)}Xr(dr,"single")},[It,Ke,Xr]),Yi=(0,c.useMemo)(()=>!l||y?null:(l===!0?[Oi,Lr,Pi]:l).map(Vr=>Vr===Oi?{key:"all",text:Qt.selectionAll,onSelect(){Xr(ve.map((dr,xr)=>pt(dr,xr)).filter(dr=>{const xr=Tr.get(dr);return!(xr!=null&&xr.disabled)||vi.has(dr)}),"all")}}:Vr===Lr?{key:"invert",text:Qt.selectInvert,onSelect(){const dr=new Set(vi);Te.forEach((ai,hi)=>{const Ui=pt(ai,hi),Ni=Tr.get(Ui);Ni!=null&&Ni.disabled||(dr.has(Ui)?dr.delete(Ui):dr.add(Ui))});const xr=Array.from(dr);Bt&&(on.deprecated(!1,"onSelectInvert","onChange"),Bt(xr)),Xr(xr,"invert")}}:Vr===Pi?{key:"none",text:Qt.selectNone,onSelect(){fn==null||fn(),Xr(Array.from(vi).filter(dr=>{const xr=Tr.get(dr);return xr==null?void 0:xr.disabled}),"none")}}:Vr).map(Vr=>Object.assign(Object.assign({},Vr),{onSelect:function(){for(var dr,xr,ai=arguments.length,hi=new Array(ai),Ui=0;Ui<ai;Ui++)hi[Ui]=arguments[Ui];(xr=Vr.onSelect)===null||xr===void 0||(dr=xr).call.apply(dr,[Vr].concat(hi)),hn(null)}})),[l,vi,Te,pt,Bt,Xr]);return[(0,c.useCallback)(Er=>{var Vr;if(!ne)return Er.filter(Bi=>Bi!==ii);let dr=(0,ze.Z)(Er);const xr=new Set(vi),ai=Mn.map(pt).filter(Bi=>!Tr.get(Bi).disabled),hi=ai.every(Bi=>xr.has(Bi)),Ui=ai.some(Bi=>xr.has(Bi)),Ni=()=>{const Bi=[];hi?ai.forEach(Wi=>{xr.delete(Wi),Bi.push(Wi)}):ai.forEach(Wi=>{xr.has(Wi)||(xr.add(Wi),Bi.push(Wi))});const Qi=Array.from(xr);Ut==null||Ut(!hi,Qi.map(Wi=>Ke(Wi)),Bi.map(Wi=>Ke(Wi))),Xr(Qi,"all"),hn(null)};let Hi,As;if(N!=="radio"){let Bi;if(Yi){const Di={getPopupContainer:an,items:Yi.map((fs,Vi)=>{const{key:Us,text:hs,onSelect:Vs}=fs;return{key:Us!=null?Us:Vi,onClick:()=>{Vs==null||Vs(ai)},label:hs}})};Bi=c.createElement("div",{className:`${H}-selection-extra`},c.createElement(ri.Z,{menu:Di,getPopupContainer:an},c.createElement("span",null,c.createElement(Ir.Z,null))))}const Qi=Mn.map((Di,fs)=>{const Vi=pt(Di,fs),Us=Tr.get(Vi)||{};return Object.assign({checked:xr.has(Vi)},Us)}).filter(Di=>{let{disabled:fs}=Di;return fs}),Wi=!!Qi.length&&Qi.length===Mn.length,Is=Wi&&Qi.every(Di=>{let{checked:fs}=Di;return fs}),ys=Wi&&Qi.some(Di=>{let{checked:fs}=Di;return fs});As=c.createElement(bi.default,{checked:Wi?Is:!!Mn.length&&hi,indeterminate:Wi?!Is&&ys:!hi&&Ui,onChange:Ni,disabled:Mn.length===0||Wi,"aria-label":Bi?"Custom selection":"Select all",skipGroup:!0}),Hi=!y&&c.createElement("div",{className:`${H}-selection`},As,Bi)}let Sr;N==="radio"?Sr=(Bi,Qi,Wi)=>{const Is=pt(Qi,Wi),ys=xr.has(Is),Di=Tr.get(Is);return{node:c.createElement(di.ZP,Object.assign({},Di,{checked:ys,onClick:fs=>{var Vi;fs.stopPropagation(),(Vi=Di==null?void 0:Di.onClick)===null||Vi===void 0||Vi.call(Di,fs)},onChange:fs=>{var Vi;xr.has(Is)||Fr(Is,!0,[Is],fs.nativeEvent),(Vi=Di==null?void 0:Di.onChange)===null||Vi===void 0||Vi.call(Di,fs)}})),checked:ys}}:Sr=(Bi,Qi,Wi)=>{var Is;const ys=pt(Qi,Wi),Di=xr.has(ys),fs=ts.has(ys),Vi=Tr.get(ys);let Us;return Dt==="nest"?Us=fs:Us=(Is=Vi==null?void 0:Vi.indeterminate)!==null&&Is!==void 0?Is:fs,{node:c.createElement(bi.default,Object.assign({},Vi,{indeterminate:Us,checked:Di,skipGroup:!0,onClick:hs=>{var Vs;hs.stopPropagation(),(Vs=Vi==null?void 0:Vi.onClick)===null||Vs===void 0||Vs.call(Vi,hs)},onChange:hs=>{var Vs;const{nativeEvent:pa}=hs,{shiftKey:fo}=pa,cs=ai.findIndex(Gs=>Gs===ys),Do=ni.some(Gs=>ai.includes(Gs));if(fo&&R&&Do){const Gs=_n(cs,ai,xr),ca=Array.from(xr);qt==null||qt(!Di,ca.map(da=>Ke(da)),Gs.map(da=>Ke(da))),Xr(ca,"multiple")}else{const Gs=ni;if(R){const ca=Di?(0,Jr._5)(Gs,ys):(0,Jr.L0)(Gs,ys);Fr(ys,!Di,ca,pa)}else{const ca=(0,mi.S)([].concat((0,ze.Z)(Gs),[ys]),!0,_r,gi),{checkedKeys:da,halfCheckedKeys:qs}=ca;let Ys=da;if(Di){const ga=new Set(da);ga.delete(ys),Ys=(0,mi.S)(Array.from(ga),{checked:!1,halfCheckedKeys:qs},_r,gi).checkedKeys}Fr(ys,!Di,Ys,pa)}}hn(Di?null:cs),(Vs=Vi==null?void 0:Vi.onChange)===null||Vs===void 0||Vs.call(Vi,hs)}})),checked:Di}};const Mr=(Bi,Qi,Wi)=>{const{node:Is,checked:ys}=Sr(Bi,Qi,Wi);return f?f(ys,Qi,Wi,Is):Is};if(!dr.includes(ii))if(dr.findIndex(Bi=>{var Qi;return((Qi=Bi[at])===null||Qi===void 0?void 0:Qi.columnType)==="EXPAND_COLUMN"})===0){const[Bi,...Qi]=dr;dr=[Bi,ii].concat((0,ze.Z)(Qi))}else dr=[ii].concat((0,ze.Z)(dr));const xi=dr.indexOf(ii);dr=dr.filter((Bi,Qi)=>Bi!==ii||Qi===xi);const Ki=dr[xi-1],Ei=dr[xi+1];let $s=d;$s===void 0&&((Ei==null?void 0:Ei.fixed)!==void 0?$s=Ei.fixed:(Ki==null?void 0:Ki.fixed)!==void 0&&($s=Ki.fixed)),$s&&Ki&&((Vr=Ki[at])===null||Vr===void 0?void 0:Vr.columnType)==="EXPAND_COLUMN"&&Ki.fixed===void 0&&(Ki.fixed=$s);const qi=W()(`${H}-selection-col`,{[`${H}-selection-col-with-dropdown`]:l&&N==="checkbox"}),na=()=>ne!=null&&ne.columnTitle?typeof ne.columnTitle=="function"?ne.columnTitle(As):ne.columnTitle:Hi,rs={fixed:$s,width:Xt,className:`${H}-selection-column`,title:na(),render:Mr,onCell:ne.onCell,[at]:{className:qi}};return dr.map(Bi=>Bi===ii?rs:Bi)},[pt,Mn,ne,ni,vi,ts,Xt,Yi,Dt,Tr,qt,Fr,gi]),vi]},pi=m(2738);function Tn(se,ne){return se._antProxy=se._antProxy||{},Object.keys(ne).forEach(Le=>{if(!(Le in se._antProxy)){const Ve=se[Le];se._antProxy[Le]=Ve,se[Le]=ne[Le]}}),se}function Fi(se,ne){return(0,c.useImperativeHandle)(se,()=>{const Le=ne(),{nativeElement:Ve}=Le;return typeof Proxy!="undefined"?new Proxy(Ve,{get(mt,St){return Le[St]?Le[St]:Reflect.get(mt,St)}}):Tn(Ve,Le)})}var Os=m(83010),vs=m(48755),ss=m(38406),ls=m(83397),Pr=m(31756),Gi=m(13783),ds=m(85981),_s=m(31709),ci=m(29787),zi=m(57700);function ns(se){return ne=>{const{prefixCls:Le,onExpand:Ve,record:mt,expanded:St,expandable:Ot}=ne,It=`${Le}-row-expand-icon`;return c.createElement("button",{type:"button",onClick:Ut=>{Ve(mt,Ut),Ut.stopPropagation()},className:W()(It,{[`${It}-spaced`]:!Ot,[`${It}-expanded`]:Ot&&St,[`${It}-collapsed`]:Ot&&!St}),"aria-label":St?se.collapse:se.expand,"aria-expanded":St})}}var br=ns;function Ur(se){return(Le,Ve)=>{const mt=Le.querySelector(`.${se}-container`);let St=Ve;if(mt){const Ot=getComputedStyle(mt),It=parseInt(Ot.borderLeftWidth,10),Ut=parseInt(Ot.borderRightWidth,10);St=Ve-It-Ut}return St}}const yr=(se,ne)=>"key"in se&&se.key!==void 0&&se.key!==null?se.key:se.dataIndex?Array.isArray(se.dataIndex)?se.dataIndex.join("."):se.dataIndex:ne;function Or(se,ne){return ne?`${ne}-${se}`:`${se}`}const ui=(se,ne)=>typeof se=="function"?se(ne):se,_i=(se,ne)=>{const Le=ui(se,ne);return Object.prototype.toString.call(Le)==="[object Object]"?"":Le};var as={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},ir=as,Dr=m(7657),ei=function(ne,Le){return c.createElement(Dr.Z,(0,L.Z)({},ne,{ref:Le,icon:ir}))},Kr=c.forwardRef(ei),ti=Kr,xs=m(9981),us=m(40192);function Es(se){const ne=c.useRef(se),Le=(0,us.Z)();return[()=>ne.current,Ve=>{ne.current=Ve,Le()}]}var ms=m(7939),ba=m(584),so=m(93041),Ka=m(78857),Ss=m(18287),Fs=m(47472),ks=m(49397),aa=se=>{const{value:ne,filterSearch:Le,tablePrefixCls:Ve,locale:mt,onChange:St}=se;return Le?c.createElement("div",{className:`${Ve}-filter-dropdown-search`},c.createElement(ks.Z,{prefix:c.createElement(Fs.Z,null),placeholder:mt.filterSearchPlaceholder,onChange:St,value:ne,htmlSize:1,className:`${Ve}-filter-dropdown-search-input`})):null},Zs=m(10228);const wa=se=>{const{keyCode:ne}=se;ne===Zs.Z.ENTER&&se.stopPropagation()};var ja=c.forwardRef((se,ne)=>c.createElement("div",{className:se.className,onClick:Le=>Le.stopPropagation(),onKeyDown:wa,ref:ne},se.children));function zs(se){let ne=[];return(se||[]).forEach(Le=>{let{value:Ve,children:mt}=Le;ne.push(Ve),mt&&(ne=[].concat((0,ze.Z)(ne),(0,ze.Z)(zs(mt))))}),ne}function Ca(se){return se.some(ne=>{let{children:Le}=ne;return Le})}function Ls(se,ne){return typeof ne=="string"||typeof ne=="number"?ne==null?void 0:ne.toString().toLowerCase().includes(se.trim().toLowerCase()):!1}function Ma(se){let{filters:ne,prefixCls:Le,filteredKeys:Ve,filterMultiple:mt,searchValue:St,filterSearch:Ot}=se;return ne.map((It,Ut)=>{const Bt=String(It.value);if(It.children)return{key:Bt||Ut,label:It.text,popupClassName:`${Le}-dropdown-submenu`,children:Ma({filters:It.children,prefixCls:Le,filteredKeys:Ve,filterMultiple:mt,searchValue:St,filterSearch:Ot})};const fn=mt?bi.default:di.ZP,qt={key:It.value!==void 0?Bt:Ut,label:c.createElement(c.Fragment,null,c.createElement(fn,{checked:Ve.includes(Bt)}),c.createElement("span",null,It.text))};return St.trim()?typeof Ot=="function"?Ot(St,It)?qt:null:Ls(St,It.text)?qt:null:qt})}function ka(se){return se||[]}var Wa=se=>{var ne,Le,Ve,mt;const{tablePrefixCls:St,prefixCls:Ot,column:It,dropdownPrefixCls:Ut,columnKey:Bt,filterOnClose:fn,filterMultiple:qt,filterMode:Xt="menu",filterSearch:N=!1,filterState:l,triggerFilter:d,locale:f,children:y,getPopupContainer:R,rootClassName:H}=se,{filterResetToDefaultFilteredValue:ve,defaultFilteredValue:Te,filterDropdownProps:Ke={},filterDropdownOpen:pt,filterDropdownVisible:Dt,onFilterDropdownVisibleChange:$t,onFilterDropdownOpenChange:Qt}=It,[an,on]=c.useState(!1),_n=!!(l&&(!((ne=l.filteredKeys)===null||ne===void 0)&&ne.length||l.forceFiltered)),hn=Sr=>{var Mr;on(Sr),(Mr=Ke.onOpenChange)===null||Mr===void 0||Mr.call(Ke,Sr),Qt==null||Qt(Sr),$t==null||$t(Sr)},bn=(mt=(Ve=(Le=Ke.open)!==null&&Le!==void 0?Le:pt)!==null&&Ve!==void 0?Ve:Dt)!==null&&mt!==void 0?mt:an,Dn=l==null?void 0:l.filteredKeys,[jn,Gn]=Es(ka(Dn)),Mn=Sr=>{let{selectedKeys:Mr}=Sr;Gn(Mr)},_r=(Sr,Mr)=>{let{node:xi,checked:Ki}=Mr;Mn(qt?{selectedKeys:Sr}:{selectedKeys:Ki&&xi.key?[xi.key]:[]})};c.useEffect(()=>{an&&Mn({selectedKeys:ka(Dn)})},[Dn]);const[Tr,gi]=c.useState([]),ni=Sr=>{gi(Sr)},[Rt,vi]=c.useState(""),ts=Sr=>{const{value:Mr}=Sr.target;vi(Mr)};c.useEffect(()=>{an||vi("")},[an]);const Xr=Sr=>{const Mr=Sr!=null&&Sr.length?Sr:null;if(Mr===null&&(!l||!l.filteredKeys)||(0,J.Z)(Mr,l==null?void 0:l.filteredKeys,!0))return null;d({column:It,key:Bt,filteredKeys:Mr})},Fr=()=>{hn(!1),Xr(jn())},Yi=function(){let{confirm:Sr,closeDropdown:Mr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Sr&&Xr([]),Mr&&hn(!1),vi(""),Gn(ve?(Te||[]).map(xi=>String(xi)):[])},Xi=function(){let{closeDropdown:Sr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Sr&&hn(!1),Xr(jn())},Er=(Sr,Mr)=>{Mr.source==="trigger"&&(Sr&&Dn!==void 0&&Gn(ka(Dn)),hn(Sr),!Sr&&!It.filterDropdown&&fn&&Fr())},Vr=W()({[`${Ut}-menu-without-submenu`]:!Ca(It.filters||[])}),dr=Sr=>{if(Sr.target.checked){const Mr=zs(It==null?void 0:It.filters).map(xi=>String(xi));Gn(Mr)}else Gn([])},xr=Sr=>{let{filters:Mr}=Sr;return(Mr||[]).map((xi,Ki)=>{const Ei=String(xi.value),$s={title:xi.text,key:xi.value!==void 0?Ei:String(Ki)};return xi.children&&($s.children=xr({filters:xi.children})),$s})},ai=Sr=>{var Mr;return Object.assign(Object.assign({},Sr),{text:Sr.title,value:Sr.key,children:((Mr=Sr.children)===null||Mr===void 0?void 0:Mr.map(xi=>ai(xi)))||[]})};let hi;const{direction:Ui,renderEmpty:Ni}=c.useContext(vs.E_);if(typeof It.filterDropdown=="function")hi=It.filterDropdown({prefixCls:`${Ut}-custom`,setSelectedKeys:Sr=>Mn({selectedKeys:Sr}),selectedKeys:jn(),confirm:Xi,clearFilters:Yi,filters:It.filters,visible:bn,close:()=>{hn(!1)}});else if(It.filterDropdown)hi=It.filterDropdown;else{const Sr=jn()||[],Mr=()=>{var Ki,Ei;const $s=(Ki=Ni==null?void 0:Ni("Table.filter"))!==null&&Ki!==void 0?Ki:c.createElement(ba.Z,{image:ba.Z.PRESENTED_IMAGE_SIMPLE,description:f.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((It.filters||[]).length===0)return $s;if(Xt==="tree")return c.createElement(c.Fragment,null,c.createElement(aa,{filterSearch:N,value:Rt,onChange:ts,tablePrefixCls:St,locale:f}),c.createElement("div",{className:`${St}-filter-dropdown-tree`},qt?c.createElement(bi.default,{checked:Sr.length===zs(It.filters).length,indeterminate:Sr.length>0&&Sr.length<zs(It.filters).length,className:`${St}-filter-dropdown-checkall`,onChange:dr},(Ei=f==null?void 0:f.filterCheckall)!==null&&Ei!==void 0?Ei:f==null?void 0:f.filterCheckAll):null,c.createElement(Ss.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:qt,checkStrictly:!qt,className:`${Ut}-menu`,onCheck:_r,checkedKeys:Sr,selectedKeys:Sr,showIcon:!1,treeData:xr({filters:It.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Rt.trim()?rs=>typeof N=="function"?N(Rt,ai(rs)):Ls(Rt,rs.title):void 0})));const qi=Ma({filters:It.filters||[],filterSearch:N,prefixCls:Ot,filteredKeys:jn(),filterMultiple:qt,searchValue:Rt}),na=qi.every(rs=>rs===null);return c.createElement(c.Fragment,null,c.createElement(aa,{filterSearch:N,value:Rt,onChange:ts,tablePrefixCls:St,locale:f}),na?$s:c.createElement(so.default,{selectable:!0,multiple:qt,prefixCls:`${Ut}-menu`,className:Vr,onSelect:Mn,onDeselect:Mn,selectedKeys:Sr,getPopupContainer:R,openKeys:Tr,onOpenChange:ni,items:qi}))},xi=()=>ve?(0,J.Z)((Te||[]).map(Ki=>String(Ki)),Sr,!0):Sr.length===0;hi=c.createElement(c.Fragment,null,Mr(),c.createElement("div",{className:`${Ot}-dropdown-btns`},c.createElement(ms.ZP,{type:"link",size:"small",disabled:xi(),onClick:()=>Yi()},f.filterReset),c.createElement(ms.ZP,{type:"primary",size:"small",onClick:Fr},f.filterConfirm)))}It.filterDropdown&&(hi=c.createElement(Ka.J,{selectable:void 0},hi)),hi=c.createElement(ja,{className:`${Ot}-dropdown`},hi);const Hi=()=>{let Sr;return typeof It.filterIcon=="function"?Sr=It.filterIcon(_n):It.filterIcon?Sr=It.filterIcon:Sr=c.createElement(ti,null),c.createElement("span",{role:"button",tabIndex:-1,className:W()(`${Ot}-trigger`,{active:_n}),onClick:Mr=>{Mr.stopPropagation()}},Sr)},As=(0,xs.Z)({trigger:["click"],placement:Ui==="rtl"?"bottomLeft":"bottomRight",children:Hi(),getPopupContainer:R},Object.assign(Object.assign({},Ke),{rootClassName:W()(H,Ke.rootClassName),open:bn,onOpenChange:Er,dropdownRender:()=>typeof(Ke==null?void 0:Ke.dropdownRender)=="function"?Ke.dropdownRender(hi):hi}));return c.createElement("div",{className:`${Ot}-column`},c.createElement("span",{className:`${St}-column-title`},y),c.createElement(ri.Z,Object.assign({},As)))};const oa=(se,ne,Le)=>{let Ve=[];return(se||[]).forEach((mt,St)=>{var Ot;const It=Or(St,Le);if(mt.filters||"filterDropdown"in mt||"onFilter"in mt)if("filteredValue"in mt){let Ut=mt.filteredValue;"filterDropdown"in mt||(Ut=(Ot=Ut==null?void 0:Ut.map(String))!==null&&Ot!==void 0?Ot:Ut),Ve.push({column:mt,key:yr(mt,It),filteredKeys:Ut,forceFiltered:mt.filtered})}else Ve.push({column:mt,key:yr(mt,It),filteredKeys:ne&&mt.defaultFilteredValue?mt.defaultFilteredValue:void 0,forceFiltered:mt.filtered});"children"in mt&&(Ve=[].concat((0,ze.Z)(Ve),(0,ze.Z)(oa(mt.children,ne,It))))}),Ve};function js(se,ne,Le,Ve,mt,St,Ot,It,Ut){return Le.map((Bt,fn)=>{const qt=Or(fn,It),{filterOnClose:Xt=!0,filterMultiple:N=!0,filterMode:l,filterSearch:d}=Bt;let f=Bt;if(f.filters||f.filterDropdown){const y=yr(f,qt),R=Ve.find(H=>{let{key:ve}=H;return y===ve});f=Object.assign(Object.assign({},f),{title:H=>c.createElement(Wa,{tablePrefixCls:se,prefixCls:`${se}-filter`,dropdownPrefixCls:ne,column:f,columnKey:y,filterState:R,filterOnClose:Xt,filterMultiple:N,filterMode:l,filterSearch:d,triggerFilter:St,locale:mt,getPopupContainer:Ot,rootClassName:Ut},ui(Bt.title,H))})}return"children"in f&&(f=Object.assign(Object.assign({},f),{children:js(se,ne,f.children,Ve,mt,St,Ot,qt,Ut)})),f})}const fi=se=>{const ne={};return se.forEach(Le=>{let{key:Ve,filteredKeys:mt,column:St}=Le;const Ot=Ve,{filters:It,filterDropdown:Ut}=St;if(Ut)ne[Ot]=mt||null;else if(Array.isArray(mt)){const Bt=zs(It);ne[Ot]=Bt.filter(fn=>mt.includes(String(fn)))}else ne[Ot]=null}),ne},Hr=(se,ne,Le)=>ne.reduce((mt,St)=>{const{column:{onFilter:Ot,filters:It},filteredKeys:Ut}=St;return Ot&&Ut&&Ut.length?mt.map(Bt=>Object.assign({},Bt)).filter(Bt=>Ut.some(fn=>{const qt=zs(It),Xt=qt.findIndex(l=>String(l)===String(fn)),N=Xt!==-1?qt[Xt]:fn;return Bt[Le]&&(Bt[Le]=Hr(Bt[Le],ne,Le)),Ot(N,Bt)})):mt},se),ps=se=>se.flatMap(ne=>"children"in ne?[ne].concat((0,ze.Z)(ps(ne.children||[]))):[ne]);var wi=se=>{const{prefixCls:ne,dropdownPrefixCls:Le,mergedColumns:Ve,onFilterChange:mt,getPopupContainer:St,locale:Ot,rootClassName:It}=se,Ut=(0,qr.ln)("Table"),Bt=c.useMemo(()=>ps(Ve||[]),[Ve]),[fn,qt]=c.useState(()=>oa(Bt,!0)),Xt=c.useMemo(()=>{const f=oa(Bt,!1);if(f.length===0)return f;let y=!0,R=!0;if(f.forEach(H=>{let{filteredKeys:ve}=H;ve!==void 0?y=!1:R=!1}),y){const H=(Bt||[]).map((ve,Te)=>yr(ve,Or(Te)));return fn.filter(ve=>{let{key:Te}=ve;return H.includes(Te)}).map(ve=>{const Te=Bt[H.findIndex(Ke=>Ke===ve.key)];return Object.assign(Object.assign({},ve),{column:Object.assign(Object.assign({},ve.column),Te),forceFiltered:Te.filtered})})}return f},[Bt,fn]),N=c.useMemo(()=>fi(Xt),[Xt]),l=f=>{const y=Xt.filter(R=>{let{key:H}=R;return H!==f.key});y.push(f),qt(y),mt(fi(y),y)};return[f=>js(ne,Le,f,Xt,Ot,l,St,void 0,It),Xt,N]},Ps=(se,ne,Le)=>{const Ve=c.useRef({});function mt(St){var Ot;if(!Ve.current||Ve.current.data!==se||Ve.current.childrenColumnName!==ne||Ve.current.getRowKey!==Le){let Ut=function(Bt){Bt.forEach((fn,qt)=>{const Xt=Le(fn,qt);It.set(Xt,fn),fn&&typeof fn=="object"&&ne in fn&&Ut(fn[ne]||[])})};const It=new Map;Ut(se),Ve.current={data:se,childrenColumnName:ne,kvMap:It,getRowKey:Le}}return(Ot=Ve.current.kvMap)===null||Ot===void 0?void 0:Ot.get(St)}return[mt]},Ms=function(se,ne){var Le={};for(var Ve in se)Object.prototype.hasOwnProperty.call(se,Ve)&&ne.indexOf(Ve)<0&&(Le[Ve]=se[Ve]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,Ve=Object.getOwnPropertySymbols(se);mt<Ve.length;mt++)ne.indexOf(Ve[mt])<0&&Object.prototype.propertyIsEnumerable.call(se,Ve[mt])&&(Le[Ve[mt]]=se[Ve[mt]]);return Le};const Js=10;function Cs(se,ne){const Le={current:se.current,pageSize:se.pageSize};return Object.keys(ne&&typeof ne=="object"?ne:{}).forEach(mt=>{const St=se[mt];typeof St!="function"&&(Le[mt]=St)}),Le}function ta(se,ne,Le){const Ve=Le&&typeof Le=="object"?Le:{},{total:mt=0}=Ve,St=Ms(Ve,["total"]),[Ot,It]=(0,c.useState)(()=>({current:"defaultCurrent"in St?St.defaultCurrent:1,pageSize:"defaultPageSize"in St?St.defaultPageSize:Js})),Ut=(0,xs.Z)(Ot,St,{total:mt>0?mt:se}),Bt=Math.ceil((mt||se)/Ut.pageSize);Ut.current>Bt&&(Ut.current=Bt||1);const fn=(Xt,N)=>{It({current:Xt!=null?Xt:1,pageSize:N||Ut.pageSize})},qt=(Xt,N)=>{var l;Le&&((l=Le.onChange)===null||l===void 0||l.call(Le,Xt,N)),fn(Xt,N),ne(Xt,N||(Ut==null?void 0:Ut.pageSize))};return Le===!1?[{},()=>{}]:[Object.assign(Object.assign({},Ut),{onChange:qt}),fn]}var Hs=ta,la=m(89489),ua=m(59477),Va=m(25399);const Ci="ascend",Ii="descend",ji=se=>typeof se.sorter=="object"&&typeof se.sorter.multiple=="number"?se.sorter.multiple:!1,Ts=se=>typeof se=="function"?se:se&&typeof se=="object"&&se.compare?se.compare:!1,Ns=(se,ne)=>ne?se[se.indexOf(ne)+1]:se[0],_a=(se,ne,Le)=>{let Ve=[];const mt=(St,Ot)=>{Ve.push({column:St,key:yr(St,Ot),multiplePriority:ji(St),sortOrder:St.sortOrder})};return(se||[]).forEach((St,Ot)=>{const It=Or(Ot,Le);St.children?("sortOrder"in St&&mt(St,It),Ve=[].concat((0,ze.Z)(Ve),(0,ze.Z)(_a(St.children,ne,It)))):St.sorter&&("sortOrder"in St?mt(St,It):ne&&St.defaultSortOrder&&Ve.push({column:St,key:yr(St,It),multiplePriority:ji(St),sortOrder:St.defaultSortOrder}))}),Ve},Ta=(se,ne,Le,Ve,mt,St,Ot,It)=>(ne||[]).map((Bt,fn)=>{const qt=Or(fn,It);let Xt=Bt;if(Xt.sorter){const N=Xt.sortDirections||mt,l=Xt.showSorterTooltip===void 0?Ot:Xt.showSorterTooltip,d=yr(Xt,qt),f=Le.find($t=>{let{key:Qt}=$t;return Qt===d}),y=f?f.sortOrder:null,R=Ns(N,y);let H;if(Bt.sortIcon)H=Bt.sortIcon({sortOrder:y});else{const $t=N.includes(Ci)&&c.createElement(ua.Z,{className:W()(`${se}-column-sorter-up`,{active:y===Ci})}),Qt=N.includes(Ii)&&c.createElement(la.Z,{className:W()(`${se}-column-sorter-down`,{active:y===Ii})});H=c.createElement("span",{className:W()(`${se}-column-sorter`,{[`${se}-column-sorter-full`]:!!($t&&Qt)})},c.createElement("span",{className:`${se}-column-sorter-inner`,"aria-hidden":"true"},$t,Qt))}const{cancelSort:ve,triggerAsc:Te,triggerDesc:Ke}=St||{};let pt=ve;R===Ii?pt=Ke:R===Ci&&(pt=Te);const Dt=typeof l=="object"?Object.assign({title:pt},l):{title:pt};Xt=Object.assign(Object.assign({},Xt),{className:W()(Xt.className,{[`${se}-column-sort`]:y}),title:$t=>{const Qt=`${se}-column-sorters`,an=c.createElement("span",{className:`${se}-column-title`},ui(Bt.title,$t)),on=c.createElement("div",{className:Qt},an,H);return l?typeof l!="boolean"&&(l==null?void 0:l.target)==="sorter-icon"?c.createElement("div",{className:`${Qt} ${se}-column-sorters-tooltip-target-sorter`},an,c.createElement(Va.Z,Object.assign({},Dt),H)):c.createElement(Va.Z,Object.assign({},Dt),on):on},onHeaderCell:$t=>{var Qt;const an=((Qt=Bt.onHeaderCell)===null||Qt===void 0?void 0:Qt.call(Bt,$t))||{},on=an.onClick,_n=an.onKeyDown;an.onClick=Dn=>{Ve({column:Bt,key:d,sortOrder:R,multiplePriority:ji(Bt)}),on==null||on(Dn)},an.onKeyDown=Dn=>{Dn.keyCode===Zs.Z.ENTER&&(Ve({column:Bt,key:d,sortOrder:R,multiplePriority:ji(Bt)}),_n==null||_n(Dn))};const hn=_i(Bt.title,{}),bn=hn==null?void 0:hn.toString();return y&&(an["aria-sort"]=y==="ascend"?"ascending":"descending"),an["aria-label"]=bn||"",an.className=W()(an.className,`${se}-column-has-sorters`),an.tabIndex=0,Bt.ellipsis&&(an.title=(hn!=null?hn:"").toString()),an}})}return"children"in Xt&&(Xt=Object.assign(Object.assign({},Xt),{children:Ta(se,Xt.children,Le,Ve,mt,St,Ot,qt)})),Xt}),ha=se=>{const{column:ne,sortOrder:Le}=se;return{column:ne,order:Le,field:ne.dataIndex,columnKey:ne.key}},Ga=se=>{const ne=se.filter(Le=>{let{sortOrder:Ve}=Le;return Ve}).map(ha);if(ne.length===0&&se.length){const Le=se.length-1;return Object.assign(Object.assign({},ha(se[Le])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return ne.length<=1?ne[0]||{}:ne},Aa=(se,ne,Le)=>{const Ve=ne.slice().sort((Ot,It)=>It.multiplePriority-Ot.multiplePriority),mt=se.slice(),St=Ve.filter(Ot=>{let{column:{sorter:It},sortOrder:Ut}=Ot;return Ts(It)&&Ut});return St.length?mt.sort((Ot,It)=>{for(let Ut=0;Ut<St.length;Ut+=1){const Bt=St[Ut],{column:{sorter:fn},sortOrder:qt}=Bt,Xt=Ts(fn);if(Xt&&qt){const N=Xt(Ot,It,qt);if(N!==0)return qt===Ci?N:-N}}return 0}).map(Ot=>{const It=Ot[Le];return It?Object.assign(Object.assign({},Ot),{[Le]:Aa(It,ne,Le)}):Ot}):mt};var Ya=se=>{const{prefixCls:ne,mergedColumns:Le,sortDirections:Ve,tableLocale:mt,showSorterTooltip:St,onSorterChange:Ot}=se,[It,Ut]=c.useState(_a(Le,!0)),Bt=(d,f)=>{const y=[];return d.forEach((R,H)=>{const ve=Or(H,f);if(y.push(yr(R,ve)),Array.isArray(R.children)){const Te=Bt(R.children,ve);y.push.apply(y,(0,ze.Z)(Te))}}),y},fn=c.useMemo(()=>{let d=!0;const f=_a(Le,!1);if(!f.length){const ve=Bt(Le);return It.filter(Te=>{let{key:Ke}=Te;return ve.includes(Ke)})}const y=[];function R(ve){d?y.push(ve):y.push(Object.assign(Object.assign({},ve),{sortOrder:null}))}let H=null;return f.forEach(ve=>{H===null?(R(ve),ve.sortOrder&&(ve.multiplePriority===!1?d=!1:H=!0)):(H&&ve.multiplePriority!==!1||(d=!1),R(ve))}),y},[Le,It]),qt=c.useMemo(()=>{var d,f;const y=fn.map(R=>{let{column:H,sortOrder:ve}=R;return{column:H,order:ve}});return{sortColumns:y,sortColumn:(d=y[0])===null||d===void 0?void 0:d.column,sortOrder:(f=y[0])===null||f===void 0?void 0:f.order}},[fn]),Xt=d=>{let f;d.multiplePriority===!1||!fn.length||fn[0].multiplePriority===!1?f=[d]:f=[].concat((0,ze.Z)(fn.filter(y=>{let{key:R}=y;return R!==d.key})),[d]),Ut(f),Ot(Ga(f),f)};return[d=>Ta(ne,d,fn,Xt,Ve,mt,St),fn,qt,()=>Ga(fn)]};const Na=(se,ne)=>se.map(Ve=>{const mt=Object.assign({},Ve);return mt.title=ui(Ve.title,ne),"children"in mt&&(mt.children=Na(mt.children,ne)),mt});var Bs=se=>[c.useCallback(Le=>Na(Le,se),[se])],Bo=$n((se,ne)=>{const{_renderTimes:Le}=se,{_renderTimes:Ve}=ne;return Le!==Ve}),oo=sn((se,ne)=>{const{_renderTimes:Le}=se,{_renderTimes:Ve}=ne;return Le!==Ve}),Zr=m(36237),Ba=m(17835),Xa=m(63356),Da=m(16931),Qa=m(51636),rl=se=>{const{componentCls:ne,lineWidth:Le,lineType:Ve,tableBorderColor:mt,tableHeaderBg:St,tablePaddingVertical:Ot,tablePaddingHorizontal:It,calc:Ut}=se,Bt=`${(0,Zr.unit)(Le)} ${Ve} ${mt}`,fn=(qt,Xt,N)=>({[`&${ne}-${qt}`]:{[`> ${ne}-container`]:{[`> ${ne}-content, > ${ne}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${ne}-expanded-row-fixed`]:{margin:`${(0,Zr.unit)(Ut(Xt).mul(-1).equal())}
${(0,Zr.unit)(Ut(Ut(N).add(Le)).mul(-1).equal())}`}}}}}});return{[`${ne}-wrapper`]:{[`${ne}${ne}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${ne}-title`]:{border:Bt,borderBottom:0},[`> ${ne}-container`]:{borderInlineStart:Bt,borderTop:Bt,[`
> ${ne}-content,
> ${ne}-header,
> ${ne}-body,
> ${ne}-summary
`]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:Bt},"> thead":{"> tr:not(:last-child) > th":{borderBottom:Bt},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${ne}-cell-fix-right-first::after`]:{borderInlineEnd:Bt}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${ne}-expanded-row-fixed`]:{margin:`${(0,Zr.unit)(Ut(Ot).mul(-1).equal())} ${(0,Zr.unit)(Ut(Ut(It).add(Le)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:Le,bottom:0,borderInlineEnd:Bt,content:'""'}}}}}},[`&${ne}-scroll-horizontal`]:{[`> ${ne}-container > ${ne}-body`]:{"> table > tbody":{[`
> tr${ne}-expanded-row,
> tr${ne}-placeholder
`]:{"> th, > td":{borderInlineEnd:0}}}}}},fn("middle",se.tablePaddingVerticalMiddle,se.tablePaddingHorizontalMiddle)),fn("small",se.tablePaddingVerticalSmall,se.tablePaddingHorizontalSmall)),{[`> ${ne}-footer`]:{border:Bt,borderTop:0}}),[`${ne}-cell`]:{[`${ne}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${(0,Zr.unit)(Le)} 0 ${(0,Zr.unit)(Le)} ${St}`}},[`${ne}-bordered ${ne}-cell-scrollbar`]:{borderInlineEnd:Bt}}}},lo=se=>{const{componentCls:ne}=se;return{[`${ne}-wrapper`]:{[`${ne}-cell-ellipsis`]:Object.assign(Object.assign({},Xa.vS),{wordBreak:"keep-all",[`
&${ne}-cell-fix-left-last,
&${ne}-cell-fix-right-first
`]:{overflow:"visible",[`${ne}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${ne}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},$o=se=>{const{componentCls:ne}=se;return{[`${ne}-wrapper`]:{[`${ne}-tbody > tr${ne}-placeholder`]:{textAlign:"center",color:se.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:se.colorBgContainer}}}}},Fo=se=>{const{componentCls:ne,antCls:Le,motionDurationSlow:Ve,lineWidth:mt,paddingXS:St,lineType:Ot,tableBorderColor:It,tableExpandIconBg:Ut,tableExpandColumnWidth:Bt,borderRadius:fn,tablePaddingVertical:qt,tablePaddingHorizontal:Xt,tableExpandedRowBg:N,paddingXXS:l,expandIconMarginTop:d,expandIconSize:f,expandIconHalfInner:y,expandIconScale:R,calc:H}=se,ve=`${(0,Zr.unit)(mt)} ${Ot} ${It}`,Te=H(l).sub(mt).equal();return{[`${ne}-wrapper`]:{[`${ne}-expand-icon-col`]:{width:Bt},[`${ne}-row-expand-icon-cell`]:{textAlign:"center",[`${ne}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${ne}-row-indent`]:{height:1,float:"left"},[`${ne}-row-expand-icon`]:Object.assign(Object.assign({},(0,Xa.Nd)(se)),{position:"relative",float:"left",width:f,height:f,color:"inherit",lineHeight:(0,Zr.unit)(f),background:Ut,border:ve,borderRadius:fn,transform:`scale(${R})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${Ve} ease-out`,content:'""'},"&::before":{top:y,insetInlineEnd:Te,insetInlineStart:Te,height:mt},"&::after":{top:Te,bottom:Te,insetInlineStart:y,width:mt,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${ne}-row-indent + ${ne}-row-expand-icon`]:{marginTop:d,marginInlineEnd:St},[`tr${ne}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:N}},[`${Le}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${ne}-expanded-row-fixed`]:{position:"relative",margin:`${(0,Zr.unit)(H(qt).mul(-1).equal())} ${(0,Zr.unit)(H(Xt).mul(-1).equal())}`,padding:`${(0,Zr.unit)(qt)} ${(0,Zr.unit)(Xt)}`}}}},xo=se=>{const{componentCls:ne,antCls:Le,iconCls:Ve,tableFilterDropdownWidth:mt,tableFilterDropdownSearchWidth:St,paddingXXS:Ot,paddingXS:It,colorText:Ut,lineWidth:Bt,lineType:fn,tableBorderColor:qt,headerIconColor:Xt,fontSizeSM:N,tablePaddingHorizontal:l,borderRadius:d,motionDurationSlow:f,colorTextDescription:y,colorPrimary:R,tableHeaderFilterActiveBg:H,colorTextDisabled:ve,tableFilterDropdownBg:Te,tableFilterDropdownHeight:Ke,controlItemBgHover:pt,controlItemBgActive:Dt,boxShadowSecondary:$t,filterDropdownMenuBg:Qt,calc:an}=se,on=`${Le}-dropdown`,_n=`${ne}-filter-dropdown`,hn=`${Le}-tree`,bn=`${(0,Zr.unit)(Bt)} ${fn} ${qt}`;return[{[`${ne}-wrapper`]:{[`${ne}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${ne}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:an(Ot).mul(-1).equal(),marginInline:`${(0,Zr.unit)(Ot)} ${(0,Zr.unit)(an(l).div(2).mul(-1).equal())}`,padding:`0 ${(0,Zr.unit)(Ot)}`,color:Xt,fontSize:N,borderRadius:d,cursor:"pointer",transition:`all ${f}`,"&:hover":{color:y,background:H},"&.active":{color:R}}}},{[`${Le}-dropdown`]:{[_n]:Object.assign(Object.assign({},(0,Xa.Wf)(se)),{minWidth:mt,backgroundColor:Te,borderRadius:d,boxShadow:$t,overflow:"hidden",[`${on}-menu`]:{maxHeight:Ke,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:Qt,"&:empty::after":{display:"block",padding:`${(0,Zr.unit)(It)} 0`,color:ve,fontSize:N,textAlign:"center",content:'"Not Found"'}},[`${_n}-tree`]:{paddingBlock:`${(0,Zr.unit)(It)} 0`,paddingInline:It,[hn]:{padding:0},[`${hn}-treenode ${hn}-node-content-wrapper:hover`]:{backgroundColor:pt},[`${hn}-treenode-checkbox-checked ${hn}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:Dt}}},[`${_n}-search`]:{padding:It,borderBottom:bn,"&-input":{input:{minWidth:St},[Ve]:{color:ve}}},[`${_n}-checkall`]:{width:"100%",marginBottom:Ot,marginInlineStart:Ot},[`${_n}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${(0,Zr.unit)(an(It).sub(Bt).equal())} ${(0,Zr.unit)(It)}`,overflow:"hidden",borderTop:bn}})}},{[`${Le}-dropdown ${_n}, ${_n}-submenu`]:{[`${Le}-checkbox-wrapper + span`]:{paddingInlineStart:It,color:Ut},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},qa=se=>{const{componentCls:ne,lineWidth:Le,colorSplit:Ve,motionDurationSlow:mt,zIndexTableFixed:St,tableBg:Ot,zIndexTableSticky:It,calc:Ut}=se,Bt=Ve;return{[`${ne}-wrapper`]:{[`
${ne}-cell-fix-left,
${ne}-cell-fix-right
`]:{position:"sticky !important",zIndex:St,background:Ot},[`
${ne}-cell-fix-left-first::after,
${ne}-cell-fix-left-last::after
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:Ut(Le).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${mt}`,content:'""',pointerEvents:"none"},[`${ne}-cell-fix-left-all::after`]:{display:"none"},[`
${ne}-cell-fix-right-first::after,
${ne}-cell-fix-right-last::after
`]:{position:"absolute",top:0,bottom:Ut(Le).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${mt}`,content:'""',pointerEvents:"none"},[`${ne}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:Ut(It).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${mt}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${ne}-ping-left`]:{[`&:not(${ne}-has-fix-left) ${ne}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${Bt}`},[`
${ne}-cell-fix-left-first::after,
${ne}-cell-fix-left-last::after
`]:{boxShadow:`inset 10px 0 8px -8px ${Bt}`},[`${ne}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${ne}-ping-right`]:{[`&:not(${ne}-has-fix-right) ${ne}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${Bt}`},[`
${ne}-cell-fix-right-first::after,
${ne}-cell-fix-right-last::after
`]:{boxShadow:`inset -10px 0 8px -8px ${Bt}`}},[`${ne}-fixed-column-gapped`]:{[`
${ne}-cell-fix-left-first::after,
${ne}-cell-fix-left-last::after,
${ne}-cell-fix-right-first::after,
${ne}-cell-fix-right-last::after
`]:{boxShadow:"none"}}}}},zo=se=>{const{componentCls:ne,antCls:Le,margin:Ve}=se;return{[`${ne}-wrapper`]:{[`${ne}-pagination${Le}-pagination`]:{margin:`${(0,Zr.unit)(Ve)} 0`},[`${ne}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:se.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Ko=se=>{const{componentCls:ne,tableRadius:Le}=se;return{[`${ne}-wrapper`]:{[ne]:{[`${ne}-title, ${ne}-header`]:{borderRadius:`${(0,Zr.unit)(Le)} ${(0,Zr.unit)(Le)} 0 0`},[`${ne}-title + ${ne}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${ne}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:Le,borderStartEndRadius:Le,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:Le},"> *:last-child":{borderStartEndRadius:Le}}},"&-footer":{borderRadius:`0 0 ${(0,Zr.unit)(Le)} ${(0,Zr.unit)(Le)}`}}}}},Zo=se=>{const{componentCls:ne}=se;return{[`${ne}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${ne}-pagination-left`]:{justifyContent:"flex-end"},[`${ne}-pagination-right`]:{justifyContent:"flex-start"},[`${ne}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${ne}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${ne}-row-indent`]:{float:"right"}}}}},co=se=>{const{componentCls:ne,antCls:Le,iconCls:Ve,fontSizeIcon:mt,padding:St,paddingXS:Ot,headerIconColor:It,headerIconHoverColor:Ut,tableSelectionColumnWidth:Bt,tableSelectedRowBg:fn,tableSelectedRowHoverBg:qt,tableRowHoverBg:Xt,tablePaddingHorizontal:N,calc:l}=se;return{[`${ne}-wrapper`]:{[`${ne}-selection-col`]:{width:Bt,[`&${ne}-selection-col-with-dropdown`]:{width:l(Bt).add(mt).add(l(St).div(4)).equal()}},[`${ne}-bordered ${ne}-selection-col`]:{width:l(Bt).add(l(Ot).mul(2)).equal(),[`&${ne}-selection-col-with-dropdown`]:{width:l(Bt).add(mt).add(l(St).div(4)).add(l(Ot).mul(2)).equal()}},[`
table tr th${ne}-selection-column,
table tr td${ne}-selection-column,
${ne}-selection-column
`]:{paddingInlineEnd:se.paddingXS,paddingInlineStart:se.paddingXS,textAlign:"center",[`${Le}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${ne}-selection-column${ne}-cell-fix-left`]:{zIndex:l(se.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${ne}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${ne}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${ne}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${se.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:(0,Zr.unit)(l(N).div(4).equal()),[Ve]:{color:It,fontSize:mt,verticalAlign:"baseline","&:hover":{color:Ut}}},[`${ne}-tbody`]:{[`${ne}-row`]:{[`&${ne}-row-selected`]:{[`> ${ne}-cell`]:{background:fn,"&-row-hover":{background:qt}}},[`> ${ne}-cell-row-hover`]:{background:Xt}}}}}},wo=se=>{const{componentCls:ne,tableExpandColumnWidth:Le,calc:Ve}=se,mt=(St,Ot,It,Ut)=>({[`${ne}${ne}-${St}`]:{fontSize:Ut,[`
${ne}-title,
${ne}-footer,
${ne}-cell,
${ne}-thead > tr > th,
${ne}-tbody > tr > th,
${ne}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{padding:`${(0,Zr.unit)(Ot)} ${(0,Zr.unit)(It)}`},[`${ne}-filter-trigger`]:{marginInlineEnd:(0,Zr.unit)(Ve(It).div(2).mul(-1).equal())},[`${ne}-expanded-row-fixed`]:{margin:`${(0,Zr.unit)(Ve(Ot).mul(-1).equal())} ${(0,Zr.unit)(Ve(It).mul(-1).equal())}`},[`${ne}-tbody`]:{[`${ne}-wrapper:only-child ${ne}`]:{marginBlock:(0,Zr.unit)(Ve(Ot).mul(-1).equal()),marginInline:`${(0,Zr.unit)(Ve(Le).sub(It).equal())} ${(0,Zr.unit)(Ve(It).mul(-1).equal())}`}},[`${ne}-selection-extra`]:{paddingInlineStart:(0,Zr.unit)(Ve(It).div(4).equal())}}});return{[`${ne}-wrapper`]:Object.assign(Object.assign({},mt("middle",se.tablePaddingVerticalMiddle,se.tablePaddingHorizontalMiddle,se.tableFontSizeMiddle)),mt("small",se.tablePaddingVerticalSmall,se.tablePaddingHorizontalSmall,se.tableFontSizeSmall))}},sl=se=>{const{componentCls:ne,marginXXS:Le,fontSizeIcon:Ve,headerIconColor:mt,headerIconHoverColor:St}=se;return{[`${ne}-wrapper`]:{[`${ne}-thead th${ne}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${se.motionDurationSlow}, left 0s`,"&:hover":{background:se.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:se.colorPrimary},[`
&${ne}-cell-fix-left:hover,
&${ne}-cell-fix-right:hover
`]:{background:se.tableFixedHeaderSortActiveBg}},[`${ne}-thead th${ne}-column-sort`]:{background:se.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${ne}-column-sort`]:{background:se.tableBodySortBg},[`${ne}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${ne}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${ne}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${ne}-column-sorter`]:{marginInlineStart:Le,color:mt,fontSize:0,transition:`color ${se.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:Ve,"&.active":{color:se.colorPrimary}},[`${ne}-column-sorter-up + ${ne}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${ne}-column-sorters:hover ${ne}-column-sorter`]:{color:St}}}},Co=se=>{const{componentCls:ne,opacityLoading:Le,tableScrollThumbBg:Ve,tableScrollThumbBgHover:mt,tableScrollThumbSize:St,tableScrollBg:Ot,zIndexTableSticky:It,stickyScrollBarBorderRadius:Ut,lineWidth:Bt,lineType:fn,tableBorderColor:qt}=se,Xt=`${(0,Zr.unit)(Bt)} ${fn} ${qt}`;return{[`${ne}-wrapper`]:{[`${ne}-sticky`]:{"&-holder":{position:"sticky",zIndex:It,background:se.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${(0,Zr.unit)(St)} !important`,zIndex:It,display:"flex",alignItems:"center",background:Ot,borderTop:Xt,opacity:Le,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:St,backgroundColor:Ve,borderRadius:Ut,transition:`all ${se.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:mt}}}}}}},go=se=>{const{componentCls:ne,lineWidth:Le,tableBorderColor:Ve,calc:mt}=se,St=`${(0,Zr.unit)(Le)} ${se.lineType} ${Ve}`;return{[`${ne}-wrapper`]:{[`${ne}-summary`]:{position:"relative",zIndex:se.zIndexTableFixed,background:se.tableBg,"> tr":{"> th, > td":{borderBottom:St}}},[`div${ne}-summary`]:{boxShadow:`0 ${(0,Zr.unit)(mt(Le).mul(-1).equal())} 0 ${Ve}`}}}},ll=se=>{const{componentCls:ne,motionDurationMid:Le,lineWidth:Ve,lineType:mt,tableBorderColor:St,calc:Ot}=se,It=`${(0,Zr.unit)(Ve)} ${mt} ${St}`,Ut=`${ne}-expanded-row-cell`;return{[`${ne}-wrapper`]:{[`${ne}-tbody-virtual`]:{[`${ne}-tbody-virtual-holder-inner`]:{[`
& > ${ne}-row,
& > div:not(${ne}-row) > ${ne}-row
`]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${ne}-cell`]:{borderBottom:It,transition:`background ${Le}`},[`${ne}-expanded-row`]:{[`${Ut}${Ut}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${(0,Zr.unit)(Ve)})`,borderInlineEnd:"none"}}},[`${ne}-bordered`]:{[`${ne}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:It,position:"absolute"},[`${ne}-cell`]:{borderInlineEnd:It,[`&${ne}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:Ot(Ve).mul(-1).equal(),borderInlineStart:It}}},[`&${ne}-virtual`]:{[`${ne}-placeholder ${ne}-cell`]:{borderInlineEnd:It,borderBottom:It}}}}}};const Ho=se=>{const{componentCls:ne,fontWeightStrong:Le,tablePaddingVertical:Ve,tablePaddingHorizontal:mt,tableExpandColumnWidth:St,lineWidth:Ot,lineType:It,tableBorderColor:Ut,tableFontSize:Bt,tableBg:fn,tableRadius:qt,tableHeaderTextColor:Xt,motionDurationMid:N,tableHeaderBg:l,tableHeaderCellSplitColor:d,tableFooterTextColor:f,tableFooterBg:y,calc:R}=se,H=`${(0,Zr.unit)(Ot)} ${It} ${Ut}`;return{[`${ne}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Xa.dF)()),{[ne]:Object.assign(Object.assign({},(0,Xa.Wf)(se)),{fontSize:Bt,background:fn,borderRadius:`${(0,Zr.unit)(qt)} ${(0,Zr.unit)(qt)} 0 0`,scrollbarColor:`${se.tableScrollThumbBg} ${se.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${(0,Zr.unit)(qt)} ${(0,Zr.unit)(qt)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`
${ne}-cell,
${ne}-thead > tr > th,
${ne}-tbody > tr > th,
${ne}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{position:"relative",padding:`${(0,Zr.unit)(Ve)} ${(0,Zr.unit)(mt)}`,overflowWrap:"break-word"},[`${ne}-title`]:{padding:`${(0,Zr.unit)(Ve)} ${(0,Zr.unit)(mt)}`},[`${ne}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Xt,fontWeight:Le,textAlign:"start",background:l,borderBottom:H,transition:`background ${N} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${ne}-selection-column):not(${ne}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:d,transform:"translateY(-50%)",transition:`background-color ${N}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${ne}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${N}, border-color ${N}`,borderBottom:H,[`
> ${ne}-wrapper:only-child,
> ${ne}-expanded-row-fixed > ${ne}-wrapper:only-child
`]:{[ne]:{marginBlock:(0,Zr.unit)(R(Ve).mul(-1).equal()),marginInline:`${(0,Zr.unit)(R(St).sub(mt).equal())}
${(0,Zr.unit)(R(mt).mul(-1).equal())}`,[`${ne}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Xt,fontWeight:Le,textAlign:"start",background:l,borderBottom:H,transition:`background ${N} ease`}}},[`${ne}-footer`]:{padding:`${(0,Zr.unit)(Ve)} ${(0,Zr.unit)(mt)}`,color:f,background:y}})}},ul=se=>{const{colorFillAlter:ne,colorBgContainer:Le,colorTextHeading:Ve,colorFillSecondary:mt,colorFillContent:St,controlItemBgActive:Ot,controlItemBgActiveHover:It,padding:Ut,paddingSM:Bt,paddingXS:fn,colorBorderSecondary:qt,borderRadiusLG:Xt,controlHeight:N,colorTextPlaceholder:l,fontSize:d,fontSizeSM:f,lineHeight:y,lineWidth:R,colorIcon:H,colorIconHover:ve,opacityLoading:Te,controlInteractiveSize:Ke}=se,pt=new Ba.FastColor(mt).onBackground(Le).toHexString(),Dt=new Ba.FastColor(St).onBackground(Le).toHexString(),$t=new Ba.FastColor(ne).onBackground(Le).toHexString(),Qt=new Ba.FastColor(H),an=new Ba.FastColor(ve),on=Ke/2-R,_n=on*2+R*3;return{headerBg:$t,headerColor:Ve,headerSortActiveBg:pt,headerSortHoverBg:Dt,bodySortBg:$t,rowHoverBg:$t,rowSelectedBg:Ot,rowSelectedHoverBg:It,rowExpandedBg:ne,cellPaddingBlock:Ut,cellPaddingInline:Ut,cellPaddingBlockMD:Bt,cellPaddingInlineMD:fn,cellPaddingBlockSM:fn,cellPaddingInlineSM:fn,borderColor:qt,headerBorderRadius:Xt,footerBg:$t,footerColor:Ve,cellFontSize:d,cellFontSizeMD:d,cellFontSizeSM:d,headerSplitColor:qt,fixedHeaderSortActiveBg:pt,headerFilterHoverBg:St,filterDropdownMenuBg:Le,filterDropdownBg:Le,expandIconBg:Le,selectionColumnWidth:N,stickyScrollBarBg:l,stickyScrollBarBorderRadius:100,expandIconMarginTop:(d*y-R*3)/2-Math.ceil((f*1.4-R*3)/2),headerIconColor:Qt.clone().setA(Qt.a*Te).toRgbString(),headerIconHoverColor:an.clone().setA(an.a*Te).toRgbString(),expandIconHalfInner:on,expandIconSize:_n,expandIconScale:Ke/_n}},it=2;var Wo=(0,Da.I$)("Table",se=>{const{colorTextHeading:ne,colorSplit:Le,colorBgContainer:Ve,controlInteractiveSize:mt,headerBg:St,headerColor:Ot,headerSortActiveBg:It,headerSortHoverBg:Ut,bodySortBg:Bt,rowHoverBg:fn,rowSelectedBg:qt,rowSelectedHoverBg:Xt,rowExpandedBg:N,cellPaddingBlock:l,cellPaddingInline:d,cellPaddingBlockMD:f,cellPaddingInlineMD:y,cellPaddingBlockSM:R,cellPaddingInlineSM:H,borderColor:ve,footerBg:Te,footerColor:Ke,headerBorderRadius:pt,cellFontSize:Dt,cellFontSizeMD:$t,cellFontSizeSM:Qt,headerSplitColor:an,fixedHeaderSortActiveBg:on,headerFilterHoverBg:_n,filterDropdownBg:hn,expandIconBg:bn,selectionColumnWidth:Dn,stickyScrollBarBg:jn,calc:Gn}=se,Mn=(0,Qa.mergeToken)(se,{tableFontSize:Dt,tableBg:Ve,tableRadius:pt,tablePaddingVertical:l,tablePaddingHorizontal:d,tablePaddingVerticalMiddle:f,tablePaddingHorizontalMiddle:y,tablePaddingVerticalSmall:R,tablePaddingHorizontalSmall:H,tableBorderColor:ve,tableHeaderTextColor:Ot,tableHeaderBg:St,tableFooterTextColor:Ke,tableFooterBg:Te,tableHeaderCellSplitColor:an,tableHeaderSortBg:It,tableHeaderSortHoverBg:Ut,tableBodySortBg:Bt,tableFixedHeaderSortActiveBg:on,tableHeaderFilterActiveBg:_n,tableFilterDropdownBg:hn,tableRowHoverBg:fn,tableSelectedRowBg:qt,tableSelectedRowHoverBg:Xt,zIndexTableFixed:it,zIndexTableSticky:Gn(it).add(1).equal({unit:!1}),tableFontSizeMiddle:$t,tableFontSizeSmall:Qt,tableSelectionColumnWidth:Dn,tableExpandIconBg:bn,tableExpandColumnWidth:Gn(mt).add(Gn(se.padding).mul(2)).equal(),tableExpandedRowBg:N,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:jn,tableScrollThumbBgHover:ne,tableScrollBg:Le});return[Ho(Mn),zo(Mn),go(Mn),sl(Mn),xo(Mn),rl(Mn),Ko(Mn),Fo(Mn),go(Mn),$o(Mn),co(Mn),qa(Mn),Co(Mn),lo(Mn),wo(Mn),Zo(Mn),ll(Mn)]},ul,{unitless:{expandIconScale:!0}});const To=[],Ao=(se,ne)=>{var Le,Ve;const{prefixCls:mt,className:St,rootClassName:Ot,style:It,size:Ut,bordered:Bt,dropdownPrefixCls:fn,dataSource:qt,pagination:Xt,rowSelection:N,rowKey:l="key",rowClassName:d,columns:f,children:y,childrenColumnName:R,onChange:H,getPopupContainer:ve,loading:Te,expandIcon:Ke,expandable:pt,expandedRowRender:Dt,expandIconColumnIndex:$t,indentSize:Qt,scroll:an,sortDirections:on,locale:_n,showSorterTooltip:hn={target:"full-header"},virtual:bn}=se,Dn=(0,qr.ln)("Table"),jn=c.useMemo(()=>f||tn(y),[f,y]),Gn=c.useMemo(()=>jn.some(si=>si.responsive),[jn]),Mn=(0,Gi.Z)(Gn),_r=c.useMemo(()=>{const si=new Set(Object.keys(Mn).filter($i=>Mn[$i]));return jn.filter($i=>!$i.responsive||$i.responsive.some(Ji=>si.has(Ji)))},[jn,Mn]),Tr=(0,pi.Z)(se,["className","style","columns"]),{locale:gi=ds.Z,direction:ni,table:Rt,renderEmpty:vi,getPrefixCls:ts,getPopupContainer:Xr}=c.useContext(vs.E_),Fr=(0,Pr.Z)(Ut),Yi=Object.assign(Object.assign({},gi.Table),_n),Xi=qt||To,Er=ts("table",mt),Vr=ts("dropdown",fn),[,dr]=(0,zi.ZP)(),xr=(0,ls.Z)(Er),[ai,hi,Ui]=Wo(Er,xr),Ni=Object.assign(Object.assign({childrenColumnName:R,expandIconColumnIndex:$t},pt),{expandIcon:(Le=pt==null?void 0:pt.expandIcon)!==null&&Le!==void 0?Le:(Ve=Rt==null?void 0:Rt.expandable)===null||Ve===void 0?void 0:Ve.expandIcon}),{childrenColumnName:Hi="children"}=Ni,As=c.useMemo(()=>Xi.some(si=>si==null?void 0:si[Hi])?"nest":Dt||pt!=null&&pt.expandedRowRender?"row":null,[Xi]),Sr={body:c.useRef(null)},Mr=Ur(Er),xi=c.useRef(null),Ki=c.useRef(null);Fi(ne,()=>Object.assign(Object.assign({},Ki.current),{nativeElement:xi.current}));const Ei=c.useMemo(()=>typeof l=="function"?l:si=>si==null?void 0:si[l],[l]),[$s]=Ps(Xi,Hi,Ei),qi={},na=function(si,$i){let Ji=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var bs,Qs,ya,xa;const Ks=Object.assign(Object.assign({},qi),si);Ji&&((bs=qi.resetPagination)===null||bs===void 0||bs.call(qi),!((Qs=Ks.pagination)===null||Qs===void 0)&&Qs.current&&(Ks.pagination.current=1),Xt&&((ya=Xt.onChange)===null||ya===void 0||ya.call(Xt,1,(xa=Ks.pagination)===null||xa===void 0?void 0:xa.pageSize))),an&&an.scrollToFirstRowOnChange!==!1&&Sr.body.current&&(0,Os.Z)(0,{getContainer:()=>Sr.body.current}),H==null||H(Ks.pagination,Ks.filters,Ks.sorter,{currentDataSource:Hr(Aa(Xi,Ks.sorterStates,Hi),Ks.filterStates,Hi),action:$i})},rs=(si,$i)=>{na({sorter:si,sorterStates:$i},"sort",!1)},[Bi,Qi,Wi,Is]=Ya({prefixCls:Er,mergedColumns:_r,onSorterChange:rs,sortDirections:on||["ascend","descend"],tableLocale:Yi,showSorterTooltip:hn}),ys=c.useMemo(()=>Aa(Xi,Qi,Hi),[Xi,Qi]);qi.sorter=Is(),qi.sorterStates=Qi;const Di=(si,$i)=>{na({filters:si,filterStates:$i},"filter",!0)},[fs,Vi,Us]=wi({prefixCls:Er,locale:Yi,dropdownPrefixCls:Vr,mergedColumns:_r,onFilterChange:Di,getPopupContainer:ve||Xr,rootClassName:W()(Ot,xr)}),hs=Hr(ys,Vi,Hi);qi.filters=Us,qi.filterStates=Vi;const Vs=c.useMemo(()=>{const si={};return Object.keys(Us).forEach($i=>{Us[$i]!==null&&(si[$i]=Us[$i])}),Object.assign(Object.assign({},Wi),{filters:si})},[Wi,Us]),[pa]=Bs(Vs),fo=(si,$i)=>{na({pagination:Object.assign(Object.assign({},qi.pagination),{current:si,pageSize:$i})},"paginate")},[cs,Do]=Hs(hs.length,fo,Xt);qi.pagination=Xt===!1?{}:Cs(cs,Xt),qi.resetPagination=Do;const Gs=c.useMemo(()=>{if(Xt===!1||!cs.pageSize)return hs;const{current:si=1,total:$i,pageSize:Ji=Js}=cs;return hs.length<$i?hs.length>Ji?hs.slice((si-1)*Ji,si*Ji):hs:hs.slice((si-1)*Ji,si*Ji)},[!!Xt,hs,cs==null?void 0:cs.current,cs==null?void 0:cs.pageSize,cs==null?void 0:cs.total]),[ca,da]=zn({prefixCls:Er,data:hs,pageData:Gs,getRowKey:Ei,getRecordByKey:$s,expandType:As,childrenColumnName:Hi,locale:Yi,getPopupContainer:ve||Xr},N),qs=(si,$i,Ji)=>{let bs;return typeof d=="function"?bs=W()(d(si,$i,Ji)):bs=W()(d),W()({[`${Er}-row-selected`]:da.has(Ei(si,$i))},bs)};Ni.__PARENT_RENDER_ICON__=Ni.expandIcon,Ni.expandIcon=Ni.expandIcon||Ke||br(Yi),As==="nest"&&Ni.expandIconColumnIndex===void 0?Ni.expandIconColumnIndex=N?1:0:Ni.expandIconColumnIndex>0&&N&&(Ni.expandIconColumnIndex-=1),typeof Ni.indentSize!="number"&&(Ni.indentSize=typeof Qt=="number"?Qt:15);const Ys=c.useCallback(si=>pa(ca(fs(Bi(si)))),[Bi,fs,ca]);let ga,Ra;if(Xt!==!1&&(cs!=null&&cs.total)){let si;cs.size?si=cs.size:si=Fr==="small"||Fr==="middle"?"small":void 0;const $i=Qs=>c.createElement(_s.Z,Object.assign({},cs,{className:W()(`${Er}-pagination ${Er}-pagination-${Qs}`,cs.className),size:si})),Ji=ni==="rtl"?"left":"right",{position:bs}=cs;if(bs!==null&&Array.isArray(bs)){const Qs=bs.find(Ks=>Ks.includes("top")),ya=bs.find(Ks=>Ks.includes("bottom")),xa=bs.every(Ks=>`${Ks}`=="none");!Qs&&!ya&&!xa&&(Ra=$i(Ji)),Qs&&(ga=$i(Qs.toLowerCase().replace("top",""))),ya&&(Ra=$i(ya.toLowerCase().replace("bottom","")))}else Ra=$i(Ji)}let va;typeof Te=="boolean"?va={spinning:Te}:typeof Te=="object"&&(va=Object.assign({spinning:!0},Te));const $a=W()(Ui,xr,`${Er}-wrapper`,Rt==null?void 0:Rt.className,{[`${Er}-wrapper-rtl`]:ni==="rtl"},St,Ot,hi),Xs=Object.assign(Object.assign({},Rt==null?void 0:Rt.style),It),Al=typeof(_n==null?void 0:_n.emptyText)!="undefined"?_n.emptyText:(vi==null?void 0:vi("Table"))||c.createElement(ss.Z,{componentName:"Table"}),cl=bn?oo:Bo,fa={},dl=c.useMemo(()=>{const{fontSize:si,lineHeight:$i,lineWidth:Ji,padding:bs,paddingXS:Qs,paddingSM:ya}=dr,xa=Math.floor(si*$i);switch(Fr){case"middle":return ya*2+xa+Ji;case"small":return Qs*2+xa+Ji;default:return bs*2+xa+Ji}},[dr,Fr]);return bn&&(fa.listItemHeight=dl),ai(c.createElement("div",{ref:xi,className:$a,style:Xs},c.createElement(ci.Z,Object.assign({spinning:!1},va),ga,c.createElement(cl,Object.assign({},fa,Tr,{ref:Ki,columns:_r,direction:ni,expandable:Ni,prefixCls:Er,className:W()({[`${Er}-middle`]:Fr==="middle",[`${Er}-small`]:Fr==="small",[`${Er}-bordered`]:Bt,[`${Er}-empty`]:Xi.length===0},Ui,xr,hi),data:Gs,rowKey:Ei,rowClassName:qs,emptyText:Al,internalHooks:$,internalRefs:Sr,transformColumns:Ys,getContainerWidth:Mr})),Ra)))};var Vo=c.forwardRef(Ao);const eo=(se,ne)=>{const Le=c.useRef(0);return Le.current+=1,c.createElement(Vo,Object.assign({},se,{ref:ne,_renderTimes:Le.current}))},ma=c.forwardRef(eo);ma.SELECTION_COLUMN=ii,ma.EXPAND_COLUMN=ee,ma.SELECTION_ALL=Oi,ma.SELECTION_INVERT=Lr,ma.SELECTION_NONE=Pi,ma.Column=Ar,ma.ColumnGroup=cr,ma.Summary=pe;var Io=ma,Go=Io},93427:function(un,We,m){"use strict";m.d(We,{Z:function(){return ee}});var c=m(34998);function ee($,ie){return c.i.reduce((F,g)=>{const J=$[`${g}1`],X=$[`${g}3`],o=$[`${g}6`],x=$[`${g}7`];return Object.assign(Object.assign({},F),ie(g,{lightColor:J,lightBorderColor:X,darkColor:o,textColor:x}))},{})}},25399:function(un,We,m){"use strict";m.d(We,{Z:function(){return de}});var c=m(59301),ee=m(92310),$=m.n(ee),ie=m(29125),F=m(18929),g=m(62487),J=m(75030),X=m(86641),o=m(52838),x=m(22703),L=m(32383),b=m(55743),S=m(57700),T=m(48755),B=m(36237),z=m(63356),j=m(34925),U=m(37645),A=m(36305),K=m(93427),I=m(51636),M=m(16931);const le=ae=>{const{calc:Q,componentCls:E,tooltipMaxWidth:C,tooltipColor:Y,tooltipBg:be,tooltipBorderRadius:je,zIndexPopup:lt,controlHeight:ke,boxShadowSecondary:Ye,paddingSM:et,paddingXS:_t,arrowOffsetHorizontal:Re,sizePopupArrow:At}=ae,rt=Q(je).add(At).add(Re).equal(),Nt=Q(je).mul(2).add(At).equal();return[{[E]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,z.Wf)(ae)),{position:"absolute",zIndex:lt,display:"block",width:"max-content",maxWidth:C,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":be,[`${E}-inner`]:{minWidth:Nt,minHeight:ke,padding:`${(0,B.unit)(ae.calc(et).div(2).equal())} ${(0,B.unit)(_t)}`,color:Y,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:be,borderRadius:je,boxShadow:Ye,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:rt},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${E}-inner`]:{borderRadius:ae.min(je,U.qN)}},[`${E}-content`]:{position:"relative"}}),(0,K.Z)(ae,(Xe,Ge)=>{let{darkColor:Ne}=Ge;return{[`&${E}-${Xe}`]:{[`${E}-inner`]:{backgroundColor:Ne},[`${E}-arrow`]:{"--antd-arrow-background-color":Ne}}}})),{"&-rtl":{direction:"rtl"}})},(0,U.ZP)(ae,"var(--antd-arrow-background-color)"),{[`${E}-pure`]:{position:"relative",maxWidth:"none",margin:ae.sizePopupArrow}}]},me=ae=>Object.assign(Object.assign({zIndexPopup:ae.zIndexPopupBase+70},(0,U.wZ)({contentRadius:ae.borderRadius,limitVerticalRadius:!0})),(0,A.w)((0,I.mergeToken)(ae,{borderRadiusOuter:Math.min(ae.borderRadiusOuter,4)})));var ce=function(ae){let Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,M.I$)("Tooltip",C=>{const{borderRadius:Y,colorTextLightSolid:be,colorBgSpotlight:je}=C,lt=(0,I.mergeToken)(C,{tooltipMaxWidth:250,tooltipColor:be,tooltipBorderRadius:Y,tooltipBg:je});return[le(lt),(0,j._y)(C,"zoom-big-fast")]},me,{resetStyle:!1,injectStyle:Q})(ae)},De=m(29509);function Pe(ae,Q){const E=(0,De.o2)(Q),C=$()({[`${ae}-${Q}`]:Q&&E}),Y={},be={};return Q&&!E&&(Y.background=Q,be["--antd-arrow-background-color"]=Q),{className:C,overlayStyle:Y,arrowStyle:be}}var He=ae=>{const{prefixCls:Q,className:E,placement:C="top",title:Y,color:be,overlayInnerStyle:je}=ae,{getPrefixCls:lt}=c.useContext(T.E_),ke=lt("tooltip",Q),[Ye,et,_t]=ce(ke),Re=Pe(ke,be),At=Re.arrowStyle,rt=Object.assign(Object.assign({},je),Re.overlayStyle),Nt=$()(et,_t,ke,`${ke}-pure`,`${ke}-placement-${C}`,E,Re.className);return Ye(c.createElement("div",{className:Nt,style:At},c.createElement("div",{className:`${ke}-arrow`}),c.createElement(ie.G,Object.assign({},ae,{className:et,prefixCls:ke,overlayInnerStyle:rt}),Y)))},ue=function(ae,Q){var E={};for(var C in ae)Object.prototype.hasOwnProperty.call(ae,C)&&Q.indexOf(C)<0&&(E[C]=ae[C]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Y=0,C=Object.getOwnPropertySymbols(ae);Y<C.length;Y++)Q.indexOf(C[Y])<0&&Object.prototype.propertyIsEnumerable.call(ae,C[Y])&&(E[C[Y]]=ae[C[Y]]);return E};const P=c.forwardRef((ae,Q)=>{var E,C;const{prefixCls:Y,openClassName:be,getTooltipContainer:je,color:lt,overlayInnerStyle:ke,children:Ye,afterOpenChange:et,afterVisibleChange:_t,destroyTooltipOnHide:Re,arrow:At=!0,title:rt,overlay:Nt,builtinPlacements:Xe,arrowPointAtCenter:Ge=!1,autoAdjustOverflow:Ne=!0,motion:Ie,getPopupContainer:te,placement:$e="top",mouseEnterDelay:Ae=.1,mouseLeaveDelay:Z=.1,overlayStyle:D,rootClassName:he,overlayClassName:_e,styles:pe,classNames:Ee}=ae,Oe=ue(ae,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),Ze=!!At,[,re]=(0,S.ZP)(),{getPopupContainer:fe,getPrefixCls:st,direction:tt,className:ct,style:ut,classNames:Ue,styles:xt}=(0,T.dj)("tooltip"),dt=(0,L.ln)("Tooltip"),gt=c.useRef(null),kt=()=>{var Qn;(Qn=gt.current)===null||Qn===void 0||Qn.forceAlign()};c.useImperativeHandle(Q,()=>{var Qn,gr;return{forceAlign:kt,forcePopupAlign:()=>{dt.deprecated(!1,"forcePopupAlign","forceAlign"),kt()},nativeElement:(Qn=gt.current)===null||Qn===void 0?void 0:Qn.nativeElement,popupElement:(gr=gt.current)===null||gr===void 0?void 0:gr.popupElement}});const[w,O]=(0,F.Z)(!1,{value:(E=ae.open)!==null&&E!==void 0?E:ae.visible,defaultValue:(C=ae.defaultOpen)!==null&&C!==void 0?C:ae.defaultVisible}),qe=!rt&&!Nt&&rt!==0,oe=Qn=>{var gr,Cn;O(qe?!1:Qn),qe||((gr=ae.onOpenChange)===null||gr===void 0||gr.call(ae,Qn),(Cn=ae.onVisibleChange)===null||Cn===void 0||Cn.call(ae,Qn))},xe=c.useMemo(()=>{var Qn,gr;let Cn=Ge;return typeof At=="object"&&(Cn=(gr=(Qn=At.pointAtCenter)!==null&&Qn!==void 0?Qn:At.arrowPointAtCenter)!==null&&gr!==void 0?gr:Ge),Xe||(0,o.Z)({arrowPointAtCenter:Cn,autoAdjustOverflow:Ne,arrowWidth:Ze?re.sizePopupArrow:0,borderRadius:re.borderRadius,offset:re.marginXXS,visibleFirst:!0})},[Ge,At,Xe,re]),jt=c.useMemo(()=>rt===0?rt:Nt||rt||"",[Nt,rt]),Qe=c.createElement(g.Z,{space:!0},typeof jt=="function"?jt():jt),at=st("tooltip",Y),bt=st(),ge=ae["data-popover-inject"];let ye=w;!("open"in ae)&&!("visible"in ae)&&qe&&(ye=!1);const Fe=c.isValidElement(Ye)&&!(0,x.M2)(Ye)?Ye:c.createElement("span",null,Ye),ze=Fe.props,q=!ze.className||typeof ze.className=="string"?$()(ze.className,be||`${at}-open`):ze.className,[Mt,Be,Gt]=ce(at,!ge),pn=Pe(at,lt),En=pn.arrowStyle,sr=$()(_e,{[`${at}-rtl`]:tt==="rtl"},pn.className,he,Be,Gt,ct,Ue.root,Ee==null?void 0:Ee.root),Xn=$()(Ue.body,Ee==null?void 0:Ee.body),[Wn,Cr]=(0,J.Cn)("Tooltip",Oe.zIndex),Rr=c.createElement(ie.Z,Object.assign({},Oe,{zIndex:Wn,showArrow:Ze,placement:$e,mouseEnterDelay:Ae,mouseLeaveDelay:Z,prefixCls:at,classNames:{root:sr,body:Xn},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},En),xt.root),ut),D),pe==null?void 0:pe.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},xt.body),ke),pe==null?void 0:pe.body),pn.overlayStyle)},getTooltipContainer:te||je||fe,ref:gt,builtinPlacements:xe,overlay:Qe,visible:ye,onVisibleChange:oe,afterVisibleChange:et!=null?et:_t,arrowContent:c.createElement("span",{className:`${at}-arrow-content`}),motion:{motionName:(0,X.m)(bt,"zoom-big-fast",ae.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!Re}),ye?(0,x.Tm)(Fe,{className:q}):Fe);return Mt(c.createElement(b.Z.Provider,{value:Cr},Rr))});P._InternalPanelDoNotUseOrYouWillBeFired=He;var de=P},18287:function(un,We,m){"use strict";m.d(We,{default:function(){return lt}});var c=m(87632),ee=m(77654),$=m(59301),ie=m(52671),F=m(8657),g=m(60499),J={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},X=J,o=m(7657),x=function(Ye,et){return $.createElement(o.Z,(0,g.Z)({},Ye,{ref:et,icon:X}))},L=$.forwardRef(x),b=L,S=m(92310),T=m.n(S),B=m(82661),z=m(34061),j=m(48755),U=m(56082),A=m(86641),K=m(57700),I=m(12425);const M=4;function le(ke){const{dropPosition:Ye,dropLevelOffset:et,prefixCls:_t,indent:Re,direction:At="ltr"}=ke,rt=At==="ltr"?"left":"right",Nt=At==="ltr"?"right":"left",Xe={[rt]:-et*Re+M,[Nt]:0};switch(Ye){case-1:Xe.top=-3;break;case 1:Xe.bottom=-3;break;default:Xe.bottom=-3,Xe[rt]=Re+M;break}return $.createElement("div",{style:Xe,className:`${_t}-drop-indicator`})}var me=le,ce=m(85278),Pe=$.forwardRef((ke,Ye)=>{var et;const{getPrefixCls:_t,direction:Re,virtual:At,tree:rt}=$.useContext(j.E_),{prefixCls:Nt,className:Xe,showIcon:Ge=!1,showLine:Ne,switcherIcon:Ie,switcherLoadingIcon:te,blockNode:$e=!1,children:Ae,checkable:Z=!1,selectable:D=!0,draggable:he,motion:_e,style:pe}=ke,Ee=_t("tree",Nt),Oe=_t(),Ze=_e!=null?_e:Object.assign(Object.assign({},(0,A.Z)(Oe)),{motionAppear:!1}),re=Object.assign(Object.assign({},ke),{checkable:Z,selectable:D,showIcon:Ge,motion:Ze,blockNode:$e,showLine:!!Ne,dropIndicatorRender:me}),[fe,st,tt]=(0,I.ZP)(Ee),[,ct]=(0,K.ZP)(),ut=ct.paddingXS/2+(((et=ct.Tree)===null||et===void 0?void 0:et.titleHeight)||ct.controlHeightSM),Ue=$.useMemo(()=>{if(!he)return!1;let dt={};switch(typeof he){case"function":dt.nodeDraggable=he;break;case"object":dt=Object.assign({},he);break;default:break}return dt.icon!==!1&&(dt.icon=dt.icon||$.createElement(U.Z,null)),dt},[he]),xt=dt=>$.createElement(ce.Z,{prefixCls:Ee,switcherIcon:Ie,switcherLoadingIcon:te,treeNodeProps:dt,showLine:Ne});return fe($.createElement(c.ZP,Object.assign({itemHeight:ut,ref:Ye,virtual:At},re,{style:Object.assign(Object.assign({},rt==null?void 0:rt.style),pe),prefixCls:Ee,className:T()({[`${Ee}-icon-hide`]:!Ge,[`${Ee}-block-node`]:$e,[`${Ee}-unselectable`]:!D,[`${Ee}-rtl`]:Re==="rtl"},rt==null?void 0:rt.className,Xe,st,tt),direction:Re,checkable:Z&&$.createElement("span",{className:`${Ee}-checkbox-inner`}),selectable:D,switcherIcon:xt,draggable:Ue}),Ae))});const Ce=0,He=1,ue=2;function W(ke,Ye,et){const{key:_t,children:Re}=et;function At(rt){const Nt=rt[_t],Xe=rt[Re];Ye(Nt,rt)!==!1&&W(Xe||[],Ye,et)}ke.forEach(At)}function P(ke){let{treeData:Ye,expandedKeys:et,startKey:_t,endKey:Re,fieldNames:At}=ke;const rt=[];let Nt=Ce;if(_t&&_t===Re)return[_t];if(!_t||!Re)return[];function Xe(Ge){return Ge===_t||Ge===Re}return W(Ye,Ge=>{if(Nt===ue)return!1;if(Xe(Ge)){if(rt.push(Ge),Nt===Ce)Nt=He;else if(Nt===He)return Nt=ue,!1}else Nt===He&&rt.push(Ge);return et.includes(Ge)},(0,z.w$)(At)),rt}function de(ke,Ye,et){const _t=(0,ee.Z)(Ye),Re=[];return W(ke,(At,rt)=>{const Nt=_t.indexOf(At);return Nt!==-1&&(Re.push(rt),_t.splice(Nt,1)),!!_t.length},(0,z.w$)(et)),Re}var ae=function(ke,Ye){var et={};for(var _t in ke)Object.prototype.hasOwnProperty.call(ke,_t)&&Ye.indexOf(_t)<0&&(et[_t]=ke[_t]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,_t=Object.getOwnPropertySymbols(ke);Re<_t.length;Re++)Ye.indexOf(_t[Re])<0&&Object.prototype.propertyIsEnumerable.call(ke,_t[Re])&&(et[_t[Re]]=ke[_t[Re]]);return et};function Q(ke){const{isLeaf:Ye,expanded:et}=ke;return Ye?$.createElement(ie.Z,null):et?$.createElement(F.Z,null):$.createElement(b,null)}function E(ke){let{treeData:Ye,children:et}=ke;return Ye||(0,z.zn)(et)}const C=(ke,Ye)=>{var{defaultExpandAll:et,defaultExpandParent:_t,defaultExpandedKeys:Re}=ke,At=ae(ke,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const rt=$.useRef(null),Nt=$.useRef(null),Xe=()=>{const{keyEntities:fe}=(0,z.I8)(E(At));let st;return et?st=Object.keys(fe):_t?st=(0,B.r7)(At.expandedKeys||Re||[],fe):st=At.expandedKeys||Re||[],st},[Ge,Ne]=$.useState(At.selectedKeys||At.defaultSelectedKeys||[]),[Ie,te]=$.useState(()=>Xe());$.useEffect(()=>{"selectedKeys"in At&&Ne(At.selectedKeys)},[At.selectedKeys]),$.useEffect(()=>{"expandedKeys"in At&&te(At.expandedKeys)},[At.expandedKeys]);const $e=(fe,st)=>{var tt;return"expandedKeys"in At||te(fe),(tt=At.onExpand)===null||tt===void 0?void 0:tt.call(At,fe,st)},Ae=(fe,st)=>{var tt;const{multiple:ct,fieldNames:ut}=At,{node:Ue,nativeEvent:xt}=st,{key:dt=""}=Ue,gt=E(At),kt=Object.assign(Object.assign({},st),{selected:!0}),w=(xt==null?void 0:xt.ctrlKey)||(xt==null?void 0:xt.metaKey),O=xt==null?void 0:xt.shiftKey;let qe;ct&&w?(qe=fe,rt.current=dt,Nt.current=qe,kt.selectedNodes=de(gt,qe,ut)):ct&&O?(qe=Array.from(new Set([].concat((0,ee.Z)(Nt.current||[]),(0,ee.Z)(P({treeData:gt,expandedKeys:Ie,startKey:dt,endKey:rt.current,fieldNames:ut}))))),kt.selectedNodes=de(gt,qe,ut)):(qe=[dt],rt.current=dt,Nt.current=qe,kt.selectedNodes=de(gt,qe,ut)),(tt=At.onSelect)===null||tt===void 0||tt.call(At,qe,kt),"selectedKeys"in At||Ne(qe)},{getPrefixCls:Z,direction:D}=$.useContext(j.E_),{prefixCls:he,className:_e,showIcon:pe=!0,expandAction:Ee="click"}=At,Oe=ae(At,["prefixCls","className","showIcon","expandAction"]),Ze=Z("tree",he),re=T()(`${Ze}-directory`,{[`${Ze}-directory-rtl`]:D==="rtl"},_e);return $.createElement(Pe,Object.assign({icon:Q,ref:Ye,blockNode:!0},Oe,{showIcon:pe,expandAction:Ee,prefixCls:Ze,className:re,expandedKeys:Ie,selectedKeys:Ge,onSelect:Ae,onExpand:$e}))};var be=$.forwardRef(C);const je=Pe;je.DirectoryTree=be,je.TreeNode=c.OF;var lt=je},12425:function(un,We,m){"use strict";m.d(We,{ZP:function(){return B},Yk:function(){return b},TM:function(){return S}});var c=m(36237),ee=m(36170),$=m(63356),ie=m(34961),F=m(51636),g=m(16931);const J=z=>{let{treeCls:j,treeNodeCls:U,directoryNodeSelectedBg:A,directoryNodeSelectedColor:K,motionDurationMid:I,borderRadius:M,controlItemBgHover:le}=z;return{[`${j}${j}-directory ${U}`]:{[`${j}-node-content-wrapper`]:{position:"static",[`> *:not(${j}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${I}`,content:'""',borderRadius:M},"&:hover:before":{background:le}},[`${j}-switcher, ${j}-checkbox, ${j}-draggable-icon`]:{zIndex:1},"&-selected":{[`${j}-switcher, ${j}-draggable-icon`]:{color:K},[`${j}-node-content-wrapper`]:{color:K,background:"transparent","&:before, &:hover:before":{background:A}}}}}},X=new c.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),o=(z,j)=>({[`.${z}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${j.motionDurationSlow}`}}}),x=(z,j)=>({[`.${z}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:j.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${(0,c.unit)(j.lineWidthBold)} solid ${j.colorPrimary}`,borderRadius:"50%",content:'""'}}}),L=(z,j)=>{const{treeCls:U,treeNodeCls:A,treeNodePadding:K,titleHeight:I,indentSize:M,nodeSelectedBg:le,nodeHoverBg:me,colorTextQuaternary:ce,controlItemBgActiveDisabled:De}=j;return{[U]:Object.assign(Object.assign({},(0,$.Wf)(j)),{background:j.colorBgContainer,borderRadius:j.borderRadius,transition:`background-color ${j.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${U}-rtl ${U}-switcher_close ${U}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${U}-active-focused)`]:Object.assign({},(0,$.oN)(j)),[`${U}-list-holder-inner`]:{alignItems:"flex-start"},[`&${U}-block-node`]:{[`${U}-list-holder-inner`]:{alignItems:"stretch",[`${U}-node-content-wrapper`]:{flex:"auto"},[`${A}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${j.colorPrimary}`,opacity:0,animationName:X,animationDuration:j.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:j.borderRadius}}},[A]:{display:"flex",alignItems:"flex-start",marginBottom:K,lineHeight:(0,c.unit)(I),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:K},[`&-disabled ${U}-node-content-wrapper`]:{color:j.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${U}-checkbox-disabled + ${U}-node-selected,&${A}-disabled${A}-selected ${U}-node-content-wrapper`]:{backgroundColor:De},[`${U}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${A}-disabled)`]:{[`${U}-node-content-wrapper`]:{"&:hover":{color:j.nodeHoverColor}}},[`&-active ${U}-node-content-wrapper`]:{background:j.controlItemBgHover},[`&:not(${A}-disabled).filter-node ${U}-title`]:{color:j.colorPrimary,fontWeight:500},"&-draggable":{cursor:"grab",[`${U}-draggable-icon`]:{flexShrink:0,width:I,textAlign:"center",visibility:"visible",color:ce},[`&${A}-disabled ${U}-draggable-icon`]:{visibility:"hidden"}}},[`${U}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:M}},[`${U}-draggable-icon`]:{visibility:"hidden"},[`${U}-switcher, ${U}-checkbox`]:{marginInlineEnd:j.calc(j.calc(I).sub(j.controlInteractiveSize)).div(2).equal()},[`${U}-switcher`]:Object.assign(Object.assign({},o(z,j)),{position:"relative",flex:"none",alignSelf:"stretch",width:I,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${j.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:I,height:I,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:j.borderRadius,transition:`all ${j.motionDurationSlow}`},[`&:not(${U}-switcher-noop):hover:before`]:{backgroundColor:j.colorBgTextHover},[`&_close ${U}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:j.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:j.calc(I).div(2).equal(),bottom:j.calc(K).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${j.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:j.calc(j.calc(I).div(2).equal()).mul(.8).equal(),height:j.calc(I).div(2).equal(),borderBottom:`1px solid ${j.colorBorder}`,content:'""'}}}),[`${U}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:I,paddingBlock:0,paddingInline:j.paddingXS,background:"transparent",borderRadius:j.borderRadius,cursor:"pointer",transition:`all ${j.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},x(z,j)),{"&:hover":{backgroundColor:me},[`&${U}-node-selected`]:{color:j.nodeSelectedColor,backgroundColor:le},[`${U}-iconEle`]:{display:"inline-block",width:I,height:I,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${U}-unselectable ${U}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${A}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${j.colorPrimary}`},"&-show-line":{[`${U}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:j.calc(I).div(2).equal(),bottom:j.calc(K).mul(-1).equal(),borderInlineEnd:`1px solid ${j.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${U}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${A}-leaf-last ${U}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${(0,c.unit)(j.calc(I).div(2).equal())} !important`}})}},b=function(z,j){let U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const A=`.${z}`,K=`${A}-treenode`,I=j.calc(j.paddingXS).div(2).equal(),M=(0,F.mergeToken)(j,{treeCls:A,treeNodeCls:K,treeNodePadding:I});return[L(z,M),U&&J(M)].filter(Boolean)},S=z=>{const{controlHeightSM:j,controlItemBgHover:U,controlItemBgActive:A}=z,K=j;return{titleHeight:K,indentSize:K,nodeHoverBg:U,nodeHoverColor:z.colorText,nodeSelectedBg:A,nodeSelectedColor:z.colorText}},T=z=>{const{colorTextLightSolid:j,colorPrimary:U}=z;return Object.assign(Object.assign({},S(z)),{directoryNodeSelectedColor:j,directoryNodeSelectedBg:U})};var B=(0,g.I$)("Tree",(z,j)=>{let{prefixCls:U}=j;return[{[z.componentCls]:(0,ee.C2)(`${U}-checkbox`,z)},b(U,z),(0,ie.Z)(z)]},T)},85278:function(un,We,m){"use strict";m.d(We,{Z:function(){return j}});var c=m(59301),ee=m(60499),$={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},ie=$,F=m(7657),g=function(A,K){return c.createElement(F.Z,(0,ee.Z)({},A,{ref:K,icon:ie}))},J=c.forwardRef(g),X=J,o=m(52671),x=m(58617),L=m(15075),b=m(43531),S=m(92310),T=m.n(S),B=m(22703),j=U=>{const{prefixCls:A,switcherIcon:K,treeNodeProps:I,showLine:M,switcherLoadingIcon:le}=U,{isLeaf:me,expanded:ce,loading:De}=I;if(De)return c.isValidElement(le)?le:c.createElement(x.Z,{className:`${A}-switcher-loading-icon`});let Pe;if(M&&typeof M=="object"&&(Pe=M.showLeafIcon),me){if(!M)return null;if(typeof Pe!="boolean"&&Pe){const ue=typeof Pe=="function"?Pe(I):Pe,W=`${A}-switcher-line-custom-icon`;return c.isValidElement(ue)?(0,B.Tm)(ue,{className:T()(ue.props.className||"",W)}):ue}return Pe?c.createElement(o.Z,{className:`${A}-switcher-line-icon`}):c.createElement("span",{className:`${A}-switcher-leaf-line`})}const Ce=`${A}-switcher-icon`,He=typeof K=="function"?K(I):K;return c.isValidElement(He)?(0,B.Tm)(He,{className:T()(He.props.className||"",Ce)}):He!==void 0?He:M?ce?c.createElement(L.Z,{className:`${A}-switcher-line-icon`}):c.createElement(b.Z,{className:`${A}-switcher-line-icon`}):c.createElement(X,{className:Ce})}},64018:function(){var un,We,m,c=!1,ee,$;window.PR_SHOULD_USE_CONTINUATION=!0;var ie,F;(function(){var g=window,J=["break,continue,do,else,for,if,return,while"],X=[J,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],o=[X,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],x=[o,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],L=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],b=[o,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],S="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",T=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],B="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",z=[J,"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"],j=[J,"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"],U=[J,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],A=[x,b,L,T,B,z,j,U],K=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,I="str",M="kwd",le="com",me="typ",ce="lit",De="pun",Pe="pln",Ce="tag",He="dec",ue="src",W="atn",P="atv",de="nocode",ae="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function Q(Ie){for(var te=0,$e=!1,Ae=!1,Z=0,D=Ie.length;Z<D;++Z){var he=Ie[Z];if(he.ignoreCase)Ae=!0;else if(/[a-z]/i.test(he.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){$e=!0,Ae=!1;break}}var _e={b:8,t:9,n:10,v:11,f:12,r:13};function pe(fe){var st=fe.charCodeAt(0);if(st!==92)return st;var tt=fe.charAt(1);return st=_e[tt],st||("0"<=tt&&tt<="7"?parseInt(fe.substring(1),8):tt==="u"||tt==="x"?parseInt(fe.substring(2),16):fe.charCodeAt(1))}function Ee(fe){if(fe<32)return(fe<16?"\\x0":"\\x")+fe.toString(16);var st=String.fromCharCode(fe);return st==="\\"||st==="-"||st==="]"||st==="^"?"\\"+st:st}function Oe(fe){var st=fe.substring(1,fe.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")),tt=[],ct=st[0]==="^",ut=["["];ct&&ut.push("^");for(var Ue=ct?1:0,xt=st.length;Ue<xt;++Ue){var dt=st[Ue];if(/\\[bdsw]/i.test(dt))ut.push(dt);else{var gt=pe(dt),kt;Ue+2<xt&&st[Ue+1]==="-"?(kt=pe(st[Ue+2]),Ue+=2):kt=gt,tt.push([gt,kt]),kt<65||gt>122||(kt<65||gt>90||tt.push([Math.max(65,gt)|32,Math.min(kt,90)|32]),kt<97||gt>122||tt.push([Math.max(97,gt)&-33,Math.min(kt,122)&-33]))}}tt.sort(function(oe,xe){return oe[0]-xe[0]||xe[1]-oe[1]});for(var w=[],O=[],Ue=0;Ue<tt.length;++Ue){var qe=tt[Ue];qe[0]<=O[1]+1?O[1]=Math.max(O[1],qe[1]):w.push(O=qe)}for(var Ue=0;Ue<w.length;++Ue){var qe=w[Ue];ut.push(Ee(qe[0])),qe[1]>qe[0]&&(qe[1]+1>qe[0]&&ut.push("-"),ut.push(Ee(qe[1])))}return ut.push("]"),ut.join("")}function Ze(fe){for(var st=fe.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")),tt=st.length,ct=[],ut=0,Ue=0;ut<tt;++ut){var xt=st[ut];if(xt==="(")++Ue;else if(xt.charAt(0)==="\\"){var dt=+xt.substring(1);dt&&(dt<=Ue?ct[dt]=-1:st[ut]=Ee(dt))}}for(var ut=1;ut<ct.length;++ut)ct[ut]===-1&&(ct[ut]=++te);for(var ut=0,Ue=0;ut<tt;++ut){var xt=st[ut];if(xt==="(")++Ue,ct[Ue]||(st[ut]="(?:");else if(xt.charAt(0)==="\\"){var dt=+xt.substring(1);dt&&dt<=Ue&&(st[ut]="\\"+ct[dt])}}for(var ut=0;ut<tt;++ut)st[ut]==="^"&&st[ut+1]!=="^"&&(st[ut]="");if(fe.ignoreCase&&$e)for(var ut=0;ut<tt;++ut){var xt=st[ut],gt=xt.charAt(0);xt.length>=2&&gt==="["?st[ut]=Oe(xt):gt!=="\\"&&(st[ut]=xt.replace(/[a-zA-Z]/g,function(O){var qe=O.charCodeAt(0);return"["+String.fromCharCode(qe&-33,qe|32)+"]"}))}return st.join("")}for(var re=[],Z=0,D=Ie.length;Z<D;++Z){var he=Ie[Z];if(he.global||he.multiline)throw new Error(""+he);re.push("(?:"+Ze(he)+")")}return new RegExp(re.join("|"),Ae?"gi":"g")}function E(Ie,te){var $e=/(?:^|\s)nocode(?:\s|$)/,Ae=[],Z=0,D=[],he=0;function _e(pe){var Ee=pe.nodeType;if(Ee==1){if($e.test(pe.className))return;for(var Oe=pe.firstChild;Oe;Oe=Oe.nextSibling)_e(Oe);var Ze=pe.nodeName.toLowerCase();(Ze==="br"||Ze==="li")&&(Ae[he]=`
`,D[he<<1]=Z++,D[he++<<1|1]=pe)}else if(Ee==3||Ee==4){var re=pe.nodeValue;re.length&&(te?re=re.replace(/\r\n?/g,`
`):re=re.replace(/[ \t\r\n]+/g," "),Ae[he]=re,D[he<<1]=Z,Z+=re.length,D[he++<<1|1]=pe)}}return _e(Ie),{sourceCode:Ae.join("").replace(/\n$/,""),spans:D}}function C(Ie,te,$e,Ae,Z){if($e){var D={sourceNode:Ie,pre:1,langExtension:null,numberLines:null,sourceCode:$e,spans:null,basePos:te,decorations:null};Ae(D),Z.push.apply(Z,D.decorations)}}var Y=/\S/;function be(Ie){for(var te=void 0,$e=Ie.firstChild;$e;$e=$e.nextSibling){var Ae=$e.nodeType;te=Ae===1?te?Ie:$e:Ae===3&&Y.test($e.nodeValue)?Ie:te}return te===Ie?void 0:te}function je(Ie,te){var $e={},Ae;(function(){for(var he=Ie.concat(te),_e=[],pe={},Ee=0,Oe=he.length;Ee<Oe;++Ee){var Ze=he[Ee],re=Ze[3];if(re)for(var fe=re.length;--fe>=0;)$e[re.charAt(fe)]=Ze;var st=Ze[1],tt=""+st;pe.hasOwnProperty(tt)||(_e.push(st),pe[tt]=null)}_e.push(/[\0-\uffff]/),Ae=Q(_e)})();var Z=te.length,D=function(he){for(var _e=he.sourceCode,pe=he.basePos,Ee=he.sourceNode,Oe=[pe,Pe],Ze=0,re=_e.match(Ae)||[],fe={},st=0,tt=re.length;st<tt;++st){var ct=re[st],ut=fe[ct],Ue=void 0,xt;if(typeof ut=="string")xt=!1;else{var dt=$e[ct.charAt(0)];if(dt)Ue=ct.match(dt[1]),ut=dt[0];else{for(var gt=0;gt<Z;++gt)if(dt=te[gt],Ue=ct.match(dt[1]),Ue){ut=dt[0];break}Ue||(ut=Pe)}xt=ut.length>=5&&ut.substring(0,5)==="lang-",xt&&!(Ue&&typeof Ue[1]=="string")&&(xt=!1,ut=ue),xt||(fe[ct]=ut)}var kt=Ze;if(Ze+=ct.length,!xt)Oe.push(pe+kt,ut);else{var w=Ue[1],O=ct.indexOf(w),qe=O+w.length;Ue[2]&&(qe=ct.length-Ue[2].length,O=qe-w.length);var oe=ut.substring(5);C(Ee,pe+kt,ct.substring(0,O),D,Oe),C(Ee,pe+kt+O,w,At(oe,w),Oe),C(Ee,pe+kt+qe,ct.substring(qe),D,Oe)}}he.decorations=Oe};return D}function lt(Ie){var te=[],$e=[];Ie.tripleQuotedStrings?te.push([I,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ie.multiLineStrings?te.push([I,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):te.push([I,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ie.verbatimStrings&&$e.push([I,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ae=Ie.hashComments;Ae&&(Ie.cStyleComments?(Ae>1?te.push([le,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):te.push([le,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),$e.push([I,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):te.push([le,/^#[^\r\n]*/,null,"#"])),Ie.cStyleComments&&($e.push([le,/^\/\/[^\r\n]*/,null]),$e.push([le,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Z=Ie.regexLiterals;if(Z){var D=Z>1?"":`
\r`,he=D?".":"[\\S\\s]",_e="/(?=[^/*"+D+"])(?:[^/\\x5B\\x5C"+D+"]|\\x5C"+he+"|\\x5B(?:[^\\x5C\\x5D"+D+"]|\\x5C"+he+")*(?:\\x5D|$))+/";$e.push(["lang-regex",RegExp("^"+ae+"("+_e+")")])}var pe=Ie.types;pe&&$e.push([me,pe]);var Ee=(""+Ie.keywords).replace(/^ | $/g,"");Ee.length&&$e.push([M,new RegExp("^(?:"+Ee.replace(/[\s,]+/g,"|")+")\\b"),null]),te.push([Pe,/^\s+/,null,` \r
\xA0`]);var Oe="^.[^\\s\\w.$@'\"`/\\\\]*";return Ie.regexLiterals&&(Oe+="(?!s*/)"),$e.push([ce,/^@[a-z_$][a-z_$@0-9]*/i,null],[me,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Pe,/^[a-z_$][a-z_$@0-9]*/i,null],[ce,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Pe,/^\\[\s\S]?/,null],[De,new RegExp(Oe),null]),je(te,$e)}var ke=lt({keywords:A,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ye(Ie,te,$e){for(var Ae=/(?:^|\s)nocode(?:\s|$)/,Z=/\r\n?|\n/,D=Ie.ownerDocument,he=D.createElement("li");Ie.firstChild;)he.appendChild(Ie.firstChild);var _e=[he];function pe(st){var tt=st.nodeType;if(tt==1&&!Ae.test(st.className))if(st.nodeName==="br")Ee(st),st.parentNode&&st.parentNode.removeChild(st);else for(var ct=st.firstChild;ct;ct=ct.nextSibling)pe(ct);else if((tt==3||tt==4)&&$e){var ut=st.nodeValue,Ue=ut.match(Z);if(Ue){var xt=ut.substring(0,Ue.index);st.nodeValue=xt;var dt=ut.substring(Ue.index+Ue[0].length);if(dt){var gt=st.parentNode;gt.insertBefore(D.createTextNode(dt),st.nextSibling)}Ee(st),xt||st.parentNode.removeChild(st)}}}function Ee(st){for(;!st.nextSibling;)if(st=st.parentNode,!st)return;function tt(Ue,xt){var dt=xt?Ue.cloneNode(!1):Ue,gt=Ue.parentNode;if(gt){var kt=tt(gt,1),w=Ue.nextSibling;kt.appendChild(dt);for(var O=w;O;O=w)w=O.nextSibling,kt.appendChild(O)}return dt}for(var ct=tt(st.nextSibling,0),ut;(ut=ct.parentNode)&&ut.nodeType===1;)ct=ut;_e.push(ct)}for(var Oe=0;Oe<_e.length;++Oe)pe(_e[Oe]);te===(te|0)&&_e[0].setAttribute("value",te);var Ze=D.createElement("ol");Ze.className="linenums";for(var re=Math.max(0,te-1|0)||0,Oe=0,fe=_e.length;Oe<fe;++Oe)he=_e[Oe],he.className="L"+(Oe+re)%10,he.firstChild||he.appendChild(D.createTextNode("\xA0")),Ze.appendChild(he);Ie.appendChild(Ze)}function et(Ie){var te=/\bMSIE\s(\d+)/.exec(navigator.userAgent);te=te&&+te[1]<=8;var $e=/\n/g,Ae=Ie.sourceCode,Z=Ae.length,D=0,he=Ie.spans,_e=he.length,pe=0,Ee=Ie.decorations,Oe=Ee.length,Ze=0;Ee[Oe]=Z;var re,fe;for(fe=re=0;fe<Oe;)Ee[fe]!==Ee[fe+2]?(Ee[re++]=Ee[fe++],Ee[re++]=Ee[fe++]):fe+=2;for(Oe=re,fe=re=0;fe<Oe;){for(var st=Ee[fe],tt=Ee[fe+1],ct=fe+2;ct+2<=Oe&&Ee[ct+1]===tt;)ct+=2;Ee[re++]=st,Ee[re++]=tt,fe=ct}Oe=Ee.length=re;var ut=Ie.sourceNode,Ue="";ut&&(Ue=ut.style.display,ut.style.display="none");try{for(var xt=null;pe<_e;){var dt=he[pe],gt=he[pe+2]||Z,kt=Ee[Ze+2]||Z,ct=Math.min(gt,kt),w=he[pe+1],O;if(w.nodeType!==1&&(O=Ae.substring(D,ct))){te&&(O=O.replace($e,"\r")),w.nodeValue=O;var qe=w.ownerDocument,oe=qe.createElement("span");oe.className=Ee[Ze+1];var xe=w.parentNode;xe.replaceChild(oe,w),oe.appendChild(w),D<gt&&(he[pe+1]=w=qe.createTextNode(Ae.substring(ct,gt)),xe.insertBefore(w,oe.nextSibling))}D=ct,D>=gt&&(pe+=2),D>=kt&&(Ze+=2)}}finally{ut&&(ut.style.display=Ue)}}var _t={};function Re(Ie,te){for(var $e=te.length;--$e>=0;){var Ae=te[$e];_t.hasOwnProperty(Ae)?g.console&&console.warn("cannot override language handler %s",Ae):_t[Ae]=Ie}}function At(Ie,te){return Ie&&_t.hasOwnProperty(Ie)||(Ie=/^\s*</.test(te)?"default-markup":"default-code"),_t[Ie]}Re(ke,["default-code"]),Re(je([],[[Pe,/^[^<?]+/],[He,/^<!\w[^>]*(?:>|$)/],[le,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[De,/^(?:<[%?]|[%?]>)/],["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"]),Re(je([[Pe,/^[\s]+/,null,` \r
`],[P,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Ce,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[W,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[De,/^[=<>\/]+/],["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"]),Re(je([],[[P,/^[\s\S]+/]]),["uq.val"]),Re(lt({keywords:x,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]),Re(lt({keywords:"null,true,false"}),["json"]),Re(lt({keywords:b,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]),Re(lt({keywords:L,cStyleComments:!0}),["java"]),Re(lt({keywords:U,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Re(lt({keywords:z,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Re(lt({keywords:B,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Re(lt({keywords:j,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Re(lt({keywords:T,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Re(lt({keywords:S,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Re(je([],[[I,/^[\s\S]+/]]),["regex"]);function rt(Ie){var te=Ie.langExtension;try{var $e=E(Ie.sourceNode,Ie.pre),Ae=$e.sourceCode;Ie.sourceCode=Ae,Ie.spans=$e.spans,Ie.basePos=0,At(te,Ae)(Ie),et(Ie)}catch(Z){g.console&&console.log(Z&&Z.stack||Z)}}function Nt(Ie,te,$e){var Ae=$e||!1,Z=te||null,D=document.createElement("div");D.innerHTML="<pre>"+Ie+"</pre>",D=D.firstChild,Ae&&Ye(D,Ae,!0);var he={langExtension:Z,numberLines:Ae,sourceNode:D,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return rt(he),D.innerHTML}function Xe(Ie,te){var $e=te||document.body,Ae=$e.ownerDocument||document;function Z(dt){return $e.getElementsByTagName(dt)}for(var D=[Z("pre"),Z("code"),Z("xmp")],he=[],_e=0;_e<D.length;++_e)for(var pe=0,Ee=D[_e].length;pe<Ee;++pe)he.push(D[_e][pe]);D=null;var Oe=Date;Oe.now||(Oe={now:function(){return+new Date}});var Ze=0,re=/\blang(?:uage)?-([\w.]+)(?!\S)/,fe=/\bprettyprint\b/,st=/\bprettyprinted\b/,tt=/pre|xmp/i,ct=/^code$/i,ut=/^(?:pre|code|xmp)$/i,Ue={};function xt(){for(var dt=g.PR_SHOULD_USE_CONTINUATION?Oe.now()+250:1/0;Ze<he.length&&Oe.now()<dt;Ze++){for(var gt=he[Ze],kt=Ue,w=gt;w=w.previousSibling;){var O=w.nodeType,qe=(O===7||O===8)&&w.nodeValue;if(qe?!/^\??prettify\b/.test(qe):O!==3||/\S/.test(w.nodeValue))break;if(qe){kt={},qe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Be,Gt,pn){kt[Gt]=pn});break}}var oe=gt.className;if((kt!==Ue||fe.test(oe))&&!st.test(oe)){for(var xe=!1,jt=gt.parentNode;jt;jt=jt.parentNode){var Qe=jt.tagName;if(ut.test(Qe)&&jt.className&&fe.test(jt.className)){xe=!0;break}}if(!xe){gt.className+=" prettyprinted";var at=kt.lang;if(!at){at=oe.match(re);var bt;!at&&(bt=be(gt))&&ct.test(bt.tagName)&&(at=bt.className.match(re)),at&&(at=at[1])}var ge;if(tt.test(gt.tagName))ge=1;else{var ye=gt.currentStyle,Fe=Ae.defaultView,ze=ye?ye.whiteSpace:Fe&&Fe.getComputedStyle?Fe.getComputedStyle(gt,null).getPropertyValue("white-space"):0;ge=ze&&ze.substring(0,3)==="pre"}var q=kt.linenums;(q=q==="true"||+q)||(q=oe.match(/\blinenums\b(?::(\d+))?/),q=q?q[1]&&q[1].length?+q[1]:!0:!1),q&&Ye(gt,q,ge);var Mt={langExtension:at,sourceNode:gt,numberLines:q,pre:ge,sourceCode:null,basePos:null,spans:null,decorations:null};rt(Mt)}}}Ze<he.length?g.setTimeout(xt,250):typeof Ie=="function"&&Ie()}xt()}var Ge=g.PR={createSimpleLexer:je,registerLangHandler:Re,sourceDecorator:lt,PR_ATTRIB_NAME:W,PR_ATTRIB_VALUE:P,PR_COMMENT:le,PR_DECLARATION:He,PR_KEYWORD:M,PR_LITERAL:ce,PR_NOCODE:de,PR_PLAIN:Pe,PR_PUNCTUATION:De,PR_SOURCE:ue,PR_STRING:I,PR_TAG:Ce,PR_TYPE:me,prettyPrintOne:c?g.prettyPrintOne=Nt:ie=Nt,prettyPrint:F=c?g.prettyPrint=Xe:F=Xe},Ne=g.define;typeof Ne=="function"&&Ne.amd&&Ne("google-code-prettify",[],function(){return Ge})})()},25769:function(un,We,m){"use strict";var c=m(98040),ee={"text/plain":"Text","text/html":"Url",default:"Text"},$="Copy to clipboard: #{key}, Enter";function ie(g){var J=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return g.replace(/#{\s*key\s*}/g,J)}function F(g,J){var X,o,x,L,b,S,T=!1;J||(J={}),X=J.debug||!1;try{x=c(),L=document.createRange(),b=document.getSelection(),S=document.createElement("span"),S.textContent=g,S.ariaHidden="true",S.style.all="unset",S.style.position="fixed",S.style.top=0,S.style.clip="rect(0, 0, 0, 0)",S.style.whiteSpace="pre",S.style.webkitUserSelect="text",S.style.MozUserSelect="text",S.style.msUserSelect="text",S.style.userSelect="text",S.addEventListener("copy",function(z){if(z.stopPropagation(),J.format)if(z.preventDefault(),typeof z.clipboardData=="undefined"){X&&console.warn("unable to use e.clipboardData"),X&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var j=ee[J.format]||ee.default;window.clipboardData.setData(j,g)}else z.clipboardData.clearData(),z.clipboardData.setData(J.format,g);J.onCopy&&(z.preventDefault(),J.onCopy(z.clipboardData))}),document.body.appendChild(S),L.selectNodeContents(S),b.addRange(L);var B=document.execCommand("copy");if(!B)throw new Error("copy command was unsuccessful");T=!0}catch(z){X&&console.error("unable to copy using execCommand: ",z),X&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(J.format||"text",g),J.onCopy&&J.onCopy(window.clipboardData),T=!0}catch(j){X&&console.error("unable to copy using clipboardData: ",j),X&&console.error("falling back to prompt"),o=ie("message"in J?J.message:$),window.prompt(o,g)}}finally{b&&(typeof b.removeRange=="function"?b.removeRange(L):b.removeAllRanges()),S&&document.body.removeChild(S),x()}return T}un.exports=F},97774:function(un,We,m){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.default=void 0;var c=Object.assign||function(z){for(var j=1;j<arguments.length;j++){var U=arguments[j];for(var A in U)Object.prototype.hasOwnProperty.call(U,A)&&(z[A]=U[A])}return z},ee=function(){function z(j,U){for(var A=0;A<U.length;A++){var K=U[A];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(j,K.key,K)}}return function(j,U,A){return U&&z(j.prototype,U),A&&z(j,A),j}}(),$=m(59301),ie=L($),F=m(12708),g=L(F),J=m(53291),X=L(J),o=m(10413),x=m(65429);function L(z){return z&&z.__esModule?z:{default:z}}function b(z,j){if(!(z instanceof j))throw new TypeError("Cannot call a class as a function")}function S(z,j){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:z}function T(z,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);z.prototype=Object.create(j&&j.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(z,j):z.__proto__=j)}var B=function(z){T(j,z);function j(U){b(this,j);var A=S(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,U));return A.getEchartsInstance=function(){return A.echartsLib.getInstanceByDom(A.echartsElement)||A.echartsLib.init(A.echartsElement,A.props.theme,A.props.opts)},A.dispose=function(){if(A.echartsElement){try{(0,o.clear)(A.echartsElement)}catch(K){console.warn(K)}A.echartsLib.dispose(A.echartsElement)}},A.rerender=function(){var K=A.props,I=K.onEvents,M=K.onChartReady,le=A.renderEchartDom();A.bindEvents(le,I||{}),typeof M=="function"&&A.props.onChartReady(le),A.echartsElement&&(0,o.bind)(A.echartsElement,function(){try{le.resize()}catch(me){console.warn(me)}})},A.bindEvents=function(K,I){var M=function(ce,De){typeof ce=="string"&&typeof De=="function"&&K.on(ce,function(Pe){De(Pe,K)})};for(var le in I)Object.prototype.hasOwnProperty.call(I,le)&&M(le,I[le])},A.renderEchartDom=function(){var K=A.getEchartsInstance();return K.setOption(A.props.option,A.props.notMerge||!1,A.props.lazyUpdate||!1),A.props.showLoading?K.showLoading(A.props.loadingOption||null):K.hideLoading(),K},A.echartsLib=U.echarts,A.echartsElement=null,A}return ee(j,[{key:"componentDidMount",value:function(){this.rerender()}},{key:"componentDidUpdate",value:function(A){if(!(typeof this.props.shouldSetOption=="function"&&!this.props.shouldSetOption(A,this.props))){if(!(0,X.default)(A.theme,this.props.theme)||!(0,X.default)(A.opts,this.props.opts)||!(0,X.default)(A.onEvents,this.props.onEvents)){this.dispose(),this.rerender();return}var K=["option","notMerge","lazyUpdate","showLoading","loadingOption"];if(!(0,X.default)((0,x.pick)(this.props,K),(0,x.pick)(A,K))){var I=this.renderEchartDom();if(!(0,X.default)(A.style,this.props.style)||!(0,X.default)(A.className,this.props.className))try{I.resize()}catch(M){console.warn(M)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var A=this,K=this.props,I=K.style,M=K.className,le=c({height:300},I);return ie.default.createElement("div",{ref:function(ce){A.echartsElement=ce},style:le,className:"echarts-for-react "+M})}}]),j}($.Component);We.default=B,B.propTypes={option:g.default.object.isRequired,echarts:g.default.object,notMerge:g.default.bool,lazyUpdate:g.default.bool,style:g.default.object,className:g.default.string,theme:g.default.oneOfType([g.default.string,g.default.object]),onChartReady:g.default.func,showLoading:g.default.bool,loadingOption:g.default.object,onEvents:g.default.object,opts:g.default.shape({devicePixelRatio:g.default.number,renderer:g.default.oneOf(["canvas","svg"]),width:g.default.oneOfType([g.default.number,g.default.oneOf([null,void 0,"auto"])]),height:g.default.oneOfType([g.default.number,g.default.oneOf([null,void 0,"auto"])])}),shouldSetOption:g.default.func},B.defaultProps={echarts:{},notMerge:!1,lazyUpdate:!1,style:{},className:"",theme:null,onChartReady:function(){},showLoading:!1,loadingOption:null,onEvents:{},opts:{},shouldSetOption:function(){return!0}}},42441:function(un,We,m){"use strict";var c;c={value:!0},We.Z=void 0;var ee=m(76411),$=g(ee),ie=m(97774),F=g(ie);function g(L){return L&&L.__esModule?L:{default:L}}function J(L,b){if(!(L instanceof b))throw new TypeError("Cannot call a class as a function")}function X(L,b){if(!L)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:L}function o(L,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);L.prototype=Object.create(b&&b.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(L,b):L.__proto__=b)}var x=function(L){o(b,L);function b(S){J(this,b);var T=X(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,S));return T.echartsLib=$.default,T}return b}(F.default);We.Z=x},65429:function(un,We){"use strict";Object.defineProperty(We,"__esModule",{value:!0});var m=We.pick=function(ee,$){var ie={};return $.forEach(function(F){ie[F]=ee[F]}),ie}},53291:function(un){"use strict";var We=Array.isArray,m=Object.keys,c=Object.prototype.hasOwnProperty;un.exports=function ee($,ie){if($===ie)return!0;if($&&ie&&typeof $=="object"&&typeof ie=="object"){var F=We($),g=We(ie),J,X,o;if(F&&g){if(X=$.length,X!=ie.length)return!1;for(J=X;J--!==0;)if(!ee($[J],ie[J]))return!1;return!0}if(F!=g)return!1;var x=$ instanceof Date,L=ie instanceof Date;if(x!=L)return!1;if(x&&L)return $.getTime()==ie.getTime();var b=$ instanceof RegExp,S=ie instanceof RegExp;if(b!=S)return!1;if(b&&S)return $.toString()==ie.toString();var T=m($);if(X=T.length,X!==m(ie).length)return!1;for(J=X;J--!==0;)if(!c.call(ie,T[J]))return!1;for(J=X;J--!==0;)if(o=T[J],!ee($[o],ie[o]))return!1;return!0}return $!==$&&ie!==ie}},53184:function(un,We,m){"use strict";var c,ee;function $(ie,F,g){var J=function(X,o){return ie.js_beautify(X,o)};return J.js=ie.js_beautify,J.css=F.css_beautify,J.html=g.html_beautify,J.js_beautify=ie.js_beautify,J.css_beautify=F.css_beautify,J.html_beautify=g.html_beautify,J}c=[m(58553),m(87804),m(40998)],ee=function(ie,F,g){return $(ie,F,g)}.apply(We,c),ee!==void 0&&(un.exports=ee)},87804:function(un,We){var m,c;(function(){var ee;(function(){"use strict";var ie=[,,function(X){function o(b){this.__parent=b,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var b=new o(this.__parent);return b.set_indent(this.__indent_count,this.__alignment_count),b},o.prototype.item=function(b){return b<0?this.__items[this.__items.length+b]:this.__items[b]},o.prototype.has_match=function(b){for(var S=this.__items.length-1;S>=0;S--)if(this.__items[S].match(b))return!0;return!1},o.prototype.set_indent=function(b,S){this.is_empty()&&(this.__indent_count=b||0,this.__alignment_count=S||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var b=this.__parent.current_line;return b.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),b.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),b.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,b.__items[0]===" "&&(b.__items.splice(0,1),b.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(b){this.__items.push(b);var S=b.lastIndexOf(`
`);S!==-1?this.__character_count=b.length-S:this.__character_count+=b.length},o.prototype.pop=function(){var b=null;return this.is_empty()||(b=this.__items.pop(),this.__character_count-=b.length),b},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var b="";return this.is_empty()?this.__parent.indent_empty_lines&&(b=this.__parent.get_indent_string(this.__indent_count)):(b=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),b+=this.__items.join("")),b};function x(b,S){this.__cache=[""],this.__indent_size=b.indent_size,this.__indent_string=b.indent_char,b.indent_with_tabs||(this.__indent_string=new Array(b.indent_size+1).join(b.indent_char)),S=S||"",b.indent_level>0&&(S=new Array(b.indent_level+1).join(this.__indent_string)),this.__base_string=S,this.__base_string_length=S.length}x.prototype.get_indent_size=function(b,S){var T=this.__base_string_length;return S=S||0,b<0&&(T=0),T+=b*this.__indent_size,T+=S,T},x.prototype.get_indent_string=function(b,S){var T=this.__base_string;return S=S||0,b<0&&(b=0,T=""),S+=b*this.__indent_size,this.__ensure_cache(S),T+=this.__cache[S],T},x.prototype.__ensure_cache=function(b){for(;b>=this.__cache.length;)this.__add_column()},x.prototype.__add_column=function(){var b=this.__cache.length,S=0,T="";this.__indent_size&&b>=this.__indent_size&&(S=Math.floor(b/this.__indent_size),b-=S*this.__indent_size,T=new Array(S+1).join(this.__indent_string)),b&&(T+=new Array(b+1).join(" ")),this.__cache.push(T)};function L(b,S){this.__indent_cache=new x(b,S),this.raw=!1,this._end_with_newline=b.end_with_newline,this.indent_size=b.indent_size,this.wrap_line_length=b.wrap_line_length,this.indent_empty_lines=b.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}L.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},L.prototype.get_line_number=function(){return this.__lines.length},L.prototype.get_indent_string=function(b,S){return this.__indent_cache.get_indent_string(b,S)},L.prototype.get_indent_size=function(b,S){return this.__indent_cache.get_indent_size(b,S)},L.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},L.prototype.add_new_line=function(b){return this.is_empty()||!b&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},L.prototype.get_code=function(b){this.trim(!0);var S=this.current_line.pop();S&&(S[S.length-1]===`
`&&(S=S.replace(/\n+$/g,"")),this.current_line.push(S)),this._end_with_newline&&this.__add_outputline();var T=this.__lines.join(`
`);return b!==`
`&&(T=T.replace(/[\n]/g,b)),T},L.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},L.prototype.set_indent=function(b,S){return b=b||0,S=S||0,this.next_line.set_indent(b,S),this.__lines.length>1?(this.current_line.set_indent(b,S),!0):(this.current_line.set_indent(),!1)},L.prototype.add_raw_token=function(b){for(var S=0;S<b.newlines;S++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(b.whitespace_before),this.current_line.push(b.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},L.prototype.add_token=function(b){this.__add_space_before_token(),this.current_line.push(b),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},L.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(" "))},L.prototype.remove_indent=function(b){for(var S=this.__lines.length;b<S;)this.__lines[b]._remove_indent(),b++;this.current_line._remove_wrap_indent()},L.prototype.trim=function(b){for(b=b===void 0?!1:b,this.current_line.trim();b&&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},L.prototype.just_added_newline=function(){return this.current_line.is_empty()},L.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},L.prototype.ensure_empty_line_above=function(b,S){for(var T=this.__lines.length-2;T>=0;){var B=this.__lines[T];if(B.is_empty())break;if(B.item(0).indexOf(b)!==0&&B.item(-1)!==S){this.__lines.splice(T+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}T--}},X.exports.Output=L},,,,function(X){function o(b,S){this.raw_options=x(b,S),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(b,S){var T=this.raw_options[b],B=S||[];return typeof T=="object"?T!==null&&typeof T.concat=="function"&&(B=T.concat()):typeof T=="string"&&(B=T.split(/[^a-zA-Z0-9_\/\-]+/)),B},o.prototype._get_boolean=function(b,S){var T=this.raw_options[b],B=T===void 0?!!S:!!T;return B},o.prototype._get_characters=function(b,S){var T=this.raw_options[b],B=S||"";return typeof T=="string"&&(B=T.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),B},o.prototype._get_number=function(b,S){var T=this.raw_options[b];S=parseInt(S,10),isNaN(S)&&(S=0);var B=parseInt(T,10);return isNaN(B)&&(B=S),B},o.prototype._get_selection=function(b,S,T){var B=this._get_selection_list(b,S,T);if(B.length!==1)throw new Error("Invalid Option Value: The option '"+b+`' can only be one of the following values:
`+S+`
You passed in: '`+this.raw_options[b]+"'");return B[0]},o.prototype._get_selection_list=function(b,S,T){if(!S||S.length===0)throw new Error("Selection list cannot be empty.");if(T=T||[S[0]],!this._is_valid_selection(T,S))throw new Error("Invalid Default Value!");var B=this._get_array(b,T);if(!this._is_valid_selection(B,S))throw new Error("Invalid Option Value: The option '"+b+`' can contain only the following values:
`+S+`
You passed in: '`+this.raw_options[b]+"'");return B},o.prototype._is_valid_selection=function(b,S){return b.length&&S.length&&!b.some(function(T){return S.indexOf(T)===-1})};function x(b,S){var T={};b=L(b);var B;for(B in b)B!==S&&(T[B]=b[B]);if(S&&b[S])for(B in b[S])T[B]=b[S][B];return T}function L(b){var S={},T;for(T in b){var B=T.replace(/-/g,"_");S[B]=b[T]}return S}X.exports.Options=o,X.exports.normalizeOpts=L,X.exports.mergeOpts=x},,function(X){var o=RegExp.prototype.hasOwnProperty("sticky");function x(L){this.__input=L||"",this.__input_length=this.__input.length,this.__position=0}x.prototype.restart=function(){this.__position=0},x.prototype.back=function(){this.__position>0&&(this.__position-=1)},x.prototype.hasNext=function(){return this.__position<this.__input_length},x.prototype.next=function(){var L=null;return this.hasNext()&&(L=this.__input.charAt(this.__position),this.__position+=1),L},x.prototype.peek=function(L){var b=null;return L=L||0,L+=this.__position,L>=0&&L<this.__input_length&&(b=this.__input.charAt(L)),b},x.prototype.__match=function(L,b){L.lastIndex=b;var S=L.exec(this.__input);return S&&!(o&&L.sticky)&&S.index!==b&&(S=null),S},x.prototype.test=function(L,b){return b=b||0,b+=this.__position,b>=0&&b<this.__input_length?!!this.__match(L,b):!1},x.prototype.testChar=function(L,b){var S=this.peek(b);return L.lastIndex=0,S!==null&&L.test(S)},x.prototype.match=function(L){var b=this.__match(L,this.__position);return b?this.__position+=b[0].length:b=null,b},x.prototype.read=function(L,b,S){var T="",B;return L&&(B=this.match(L),B&&(T+=B[0])),b&&(B||!L)&&(T+=this.readUntil(b,S)),T},x.prototype.readUntil=function(L,b){var S="",T=this.__position;L.lastIndex=this.__position;var B=L.exec(this.__input);return B?(T=B.index,b&&(T+=B[0].length)):T=this.__input_length,S=this.__input.substring(this.__position,T),this.__position=T,S},x.prototype.readUntilAfter=function(L){return this.readUntil(L,!0)},x.prototype.get_regexp=function(L,b){var S=null,T="g";return b&&o&&(T="y"),typeof L=="string"&&L!==""?S=new RegExp(L,T):L&&(S=new RegExp(L.source,T)),S},x.prototype.get_literal_regexp=function(L){return RegExp(L.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},x.prototype.peekUntilAfter=function(L){var b=this.__position,S=this.readUntilAfter(L);return this.__position=b,S},x.prototype.lookBack=function(L){var b=this.__position-1;return b>=L.length&&this.__input.substring(b-L.length,b).toLowerCase()===L},X.exports.InputScanner=x},,,,,function(X){function o(x,L){x=typeof x=="string"?x:x.source,L=typeof L=="string"?L:L.source,this.__directives_block_pattern=new RegExp(x+/ beautify( \w+[:]\w+)+ /.source+L,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(x+/\sbeautify\signore:end\s/.source+L,"g")}o.prototype.get_directives=function(x){if(!x.match(this.__directives_block_pattern))return null;var L={};this.__directive_pattern.lastIndex=0;for(var b=this.__directive_pattern.exec(x);b;)L[b[1]]=b[2],b=this.__directive_pattern.exec(x);return L},o.prototype.readIgnored=function(x){return x.readUntilAfter(this.__directives_end_ignore_pattern)},X.exports.Directives=o},,function(X,o,x){var L=x(16).Beautifier,b=x(17).Options;function S(T,B){var z=new L(T,B);return z.beautify()}X.exports=S,X.exports.defaultOptions=function(){return new b}},function(X,o,x){var L=x(17).Options,b=x(2).Output,S=x(8).InputScanner,T=x(13).Directives,B=new T(/\/\*/,/\*\//),z=/\r\n|[\r\n]/,j=/\r\n|[\r\n]/g,U=/\s/,A=/(?:\s|\n)+/g,K=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,I=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function M(le,me){this._source_text=le||"",this._options=new L(me),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"]}M.prototype.eatString=function(le){var me="";for(this._ch=this._input.next();this._ch;){if(me+=this._ch,this._ch==="\\")me+=this._input.next();else if(le.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return me},M.prototype.eatWhitespace=function(le){for(var me=U.test(this._input.peek()),ce=0;U.test(this._input.peek());)this._ch=this._input.next(),le&&this._ch===`
`&&(ce===0||ce<this._options.max_preserve_newlines)&&(ce++,this._output.add_new_line(!0));return me},M.prototype.foundNestedPseudoClass=function(){for(var le=0,me=1,ce=this._input.peek(me);ce;){if(ce==="{")return!0;if(ce==="(")le+=1;else if(ce===")"){if(le===0)return!1;le-=1}else if(ce===";"||ce==="}")return!1;me++,ce=this._input.peek(me)}return!1},M.prototype.print_string=function(le){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(le)},M.prototype.preserveSingleSpace=function(le){le&&(this._output.space_before_token=!0)},M.prototype.indent=function(){this._indentLevel++},M.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},M.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var le=this._source_text,me=this._options.eol;me==="auto"&&(me=`
`,le&&z.test(le||"")&&(me=le.match(z)[0])),le=le.replace(j,`
`);var ce=le.match(/^[\t ]*/)[0];this._output=new b(this._options,ce),this._input=new S(le),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var De=0,Pe=!1,Ce=!1,He=!1,ue=!1,W=!1,P=this._ch,de=!1,ae,Q,E;ae=this._input.read(A),Q=ae!=="",E=P,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),P=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var C=this._input.read(K),Y=B.get_directives(C);Y&&Y.ignore==="start"&&(C+=B.readIgnored(this._input)),this.print_string(C),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(I)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(Q),this.print_string(this._ch);var be=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);be.match(/[ :]$/)&&(be=this.eatString(": ").replace(/\s+$/,""),this.print_string(be),this._output.space_before_token=!0),De===0&&be.indexOf(":")!==-1&&(Ce=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(Q),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var je=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);je.match(/[ :]$/)&&(je=this.eatString(": ").replace(/\s+$/,""),this.print_string(je),this._output.space_before_token=!0),De===0&&je.indexOf(":")!==-1?(Ce=!0,this.indent()):je in this.NESTED_AT_RULE?(this._nestedLevel+=1,je in this.CONDITIONAL_GROUP_RULE&&(He=!0)):De===0&&!Ce&&(ue=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(Q),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")Ce&&(Ce=!1,this.outdent()),ue=!1,He?(He=!1,Pe=this._indentLevel>=this._nestedLevel):Pe=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Pe&&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)):(E==="("?this._output.space_before_token=!1:E!==","&&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(),E==="{"&&this._output.trim(!0),Ce&&(this.outdent(),Ce=!1),this.print_string(this._ch),Pe=!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 lt=0;lt<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;lt++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[lt])){de=!0;break}(Pe||He)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!ue&&De===0?(this.print_string(":"),Ce||(Ce=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var ke=E==='"'||E==="'";this.preserveSingleSpace(ke||Q),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")de=!1,De===0?(Ce&&(this.outdent(),Ce=!1),ue=!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(),De++,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(")")),De&&(De--,this.outdent()));else{var Ye=!1;this._input.lookBack("with")&&(Ye=!0),this.preserveSingleSpace(Q||Ye),this.print_string(this._ch),Ce&&E==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),W=!0):(this.eatWhitespace(),De++,this.indent())}else if(this._ch===")")De&&(De--,this.outdent()),W&&this._input.peek()===";"&&this._options.selector_separator_newline&&(W=!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&&(!Ce||W)&&De===0&&!ue?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!Ce&&De===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&&U.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(Q),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),U.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var et=E==='"'||E==="'";this.preserveSingleSpace(et||Q),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&de&&this._output.add_new_line()}var _t=this._output.get_code(me);return _t},X.exports.Beautifier=M},function(X,o,x){var L=x(6).Options;function b(S){L.call(this,S,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var T=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||T;var B=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var z=0;z<B.length;z++)B[z]!=="expand"?this.brace_style="collapse":this.brace_style=B[z]}b.prototype=new L,X.exports.Options=b}],F={};function g(X){var o=F[X];if(o!==void 0)return o.exports;var x=F[X]={exports:{}};return ie[X](x,x.exports,g),x.exports}var J=g(15);ee=J})();var $=ee;m=[],c=function(){return{css_beautify:$}}.apply(We,m),c!==void 0&&(un.exports=c)})()},40998:function(un,We,m){var c,ee;(function(){var $;(function(){"use strict";var J=[,,function(L){function b(B){this.__parent=B,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=[]}b.prototype.clone_empty=function(){var B=new b(this.__parent);return B.set_indent(this.__indent_count,this.__alignment_count),B},b.prototype.item=function(B){return B<0?this.__items[this.__items.length+B]:this.__items[B]},b.prototype.has_match=function(B){for(var z=this.__items.length-1;z>=0;z--)if(this.__items[z].match(B))return!0;return!1},b.prototype.set_indent=function(B,z){this.is_empty()&&(this.__indent_count=B||0,this.__alignment_count=z||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},b.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)},b.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},b.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var B=this.__parent.current_line;return B.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),B.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),B.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,B.__items[0]===" "&&(B.__items.splice(0,1),B.__character_count-=1),!0}return!1},b.prototype.is_empty=function(){return this.__items.length===0},b.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},b.prototype.push=function(B){this.__items.push(B);var z=B.lastIndexOf(`
`);z!==-1?this.__character_count=B.length-z:this.__character_count+=B.length},b.prototype.pop=function(){var B=null;return this.is_empty()||(B=this.__items.pop(),this.__character_count-=B.length),B},b.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},b.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},b.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},b.prototype.toString=function(){var B="";return this.is_empty()?this.__parent.indent_empty_lines&&(B=this.__parent.get_indent_string(this.__indent_count)):(B=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),B+=this.__items.join("")),B};function S(B,z){this.__cache=[""],this.__indent_size=B.indent_size,this.__indent_string=B.indent_char,B.indent_with_tabs||(this.__indent_string=new Array(B.indent_size+1).join(B.indent_char)),z=z||"",B.indent_level>0&&(z=new Array(B.indent_level+1).join(this.__indent_string)),this.__base_string=z,this.__base_string_length=z.length}S.prototype.get_indent_size=function(B,z){var j=this.__base_string_length;return z=z||0,B<0&&(j=0),j+=B*this.__indent_size,j+=z,j},S.prototype.get_indent_string=function(B,z){var j=this.__base_string;return z=z||0,B<0&&(B=0,j=""),z+=B*this.__indent_size,this.__ensure_cache(z),j+=this.__cache[z],j},S.prototype.__ensure_cache=function(B){for(;B>=this.__cache.length;)this.__add_column()},S.prototype.__add_column=function(){var B=this.__cache.length,z=0,j="";this.__indent_size&&B>=this.__indent_size&&(z=Math.floor(B/this.__indent_size),B-=z*this.__indent_size,j=new Array(z+1).join(this.__indent_string)),B&&(j+=new Array(B+1).join(" ")),this.__cache.push(j)};function T(B,z){this.__indent_cache=new S(B,z),this.raw=!1,this._end_with_newline=B.end_with_newline,this.indent_size=B.indent_size,this.wrap_line_length=B.wrap_line_length,this.indent_empty_lines=B.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new b(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(B,z){return this.__indent_cache.get_indent_string(B,z)},T.prototype.get_indent_size=function(B,z){return this.__indent_cache.get_indent_size(B,z)},T.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},T.prototype.add_new_line=function(B){return this.is_empty()||!B&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},T.prototype.get_code=function(B){this.trim(!0);var z=this.current_line.pop();z&&(z[z.length-1]===`
`&&(z=z.replace(/\n+$/g,"")),this.current_line.push(z)),this._end_with_newline&&this.__add_outputline();var j=this.__lines.join(`
`);return B!==`
`&&(j=j.replace(/[\n]/g,B)),j},T.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},T.prototype.set_indent=function(B,z){return B=B||0,z=z||0,this.next_line.set_indent(B,z),this.__lines.length>1?(this.current_line.set_indent(B,z),!0):(this.current_line.set_indent(),!1)},T.prototype.add_raw_token=function(B){for(var z=0;z<B.newlines;z++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(B.whitespace_before),this.current_line.push(B.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},T.prototype.add_token=function(B){this.__add_space_before_token(),this.current_line.push(B),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(B){for(var z=this.__lines.length;B<z;)this.__lines[B]._remove_indent(),B++;this.current_line._remove_wrap_indent()},T.prototype.trim=function(B){for(B=B===void 0?!1:B,this.current_line.trim();B&&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(B,z){for(var j=this.__lines.length-2;j>=0;){var U=this.__lines[j];if(U.is_empty())break;if(U.item(0).indexOf(B)!==0&&U.item(-1)!==z){this.__lines.splice(j+1,0,new b(this)),this.previous_line=this.__lines[this.__lines.length-2];break}j--}},L.exports.Output=T},function(L){function b(S,T,B,z){this.type=S,this.text=T,this.comments_before=null,this.newlines=B||0,this.whitespace_before=z||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}L.exports.Token=b},,,function(L){function b(B,z){this.raw_options=S(B,z),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"])}b.prototype._get_array=function(B,z){var j=this.raw_options[B],U=z||[];return typeof j=="object"?j!==null&&typeof j.concat=="function"&&(U=j.concat()):typeof j=="string"&&(U=j.split(/[^a-zA-Z0-9_\/\-]+/)),U},b.prototype._get_boolean=function(B,z){var j=this.raw_options[B],U=j===void 0?!!z:!!j;return U},b.prototype._get_characters=function(B,z){var j=this.raw_options[B],U=z||"";return typeof j=="string"&&(U=j.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),U},b.prototype._get_number=function(B,z){var j=this.raw_options[B];z=parseInt(z,10),isNaN(z)&&(z=0);var U=parseInt(j,10);return isNaN(U)&&(U=z),U},b.prototype._get_selection=function(B,z,j){var U=this._get_selection_list(B,z,j);if(U.length!==1)throw new Error("Invalid Option Value: The option '"+B+`' can only be one of the following values:
`+z+`
You passed in: '`+this.raw_options[B]+"'");return U[0]},b.prototype._get_selection_list=function(B,z,j){if(!z||z.length===0)throw new Error("Selection list cannot be empty.");if(j=j||[z[0]],!this._is_valid_selection(j,z))throw new Error("Invalid Default Value!");var U=this._get_array(B,j);if(!this._is_valid_selection(U,z))throw new Error("Invalid Option Value: The option '"+B+`' can contain only the following values:
`+z+`
You passed in: '`+this.raw_options[B]+"'");return U},b.prototype._is_valid_selection=function(B,z){return B.length&&z.length&&!B.some(function(j){return z.indexOf(j)===-1})};function S(B,z){var j={};B=T(B);var U;for(U in B)U!==z&&(j[U]=B[U]);if(z&&B[z])for(U in B[z])j[U]=B[z][U];return j}function T(B){var z={},j;for(j in B){var U=j.replace(/-/g,"_");z[U]=B[j]}return z}L.exports.Options=b,L.exports.normalizeOpts=T,L.exports.mergeOpts=S},,function(L){var b=RegExp.prototype.hasOwnProperty("sticky");function S(T){this.__input=T||"",this.__input_length=this.__input.length,this.__position=0}S.prototype.restart=function(){this.__position=0},S.prototype.back=function(){this.__position>0&&(this.__position-=1)},S.prototype.hasNext=function(){return this.__position<this.__input_length},S.prototype.next=function(){var T=null;return this.hasNext()&&(T=this.__input.charAt(this.__position),this.__position+=1),T},S.prototype.peek=function(T){var B=null;return T=T||0,T+=this.__position,T>=0&&T<this.__input_length&&(B=this.__input.charAt(T)),B},S.prototype.__match=function(T,B){T.lastIndex=B;var z=T.exec(this.__input);return z&&!(b&&T.sticky)&&z.index!==B&&(z=null),z},S.prototype.test=function(T,B){return B=B||0,B+=this.__position,B>=0&&B<this.__input_length?!!this.__match(T,B):!1},S.prototype.testChar=function(T,B){var z=this.peek(B);return T.lastIndex=0,z!==null&&T.test(z)},S.prototype.match=function(T){var B=this.__match(T,this.__position);return B?this.__position+=B[0].length:B=null,B},S.prototype.read=function(T,B,z){var j="",U;return T&&(U=this.match(T),U&&(j+=U[0])),B&&(U||!T)&&(j+=this.readUntil(B,z)),j},S.prototype.readUntil=function(T,B){var z="",j=this.__position;T.lastIndex=this.__position;var U=T.exec(this.__input);return U?(j=U.index,B&&(j+=U[0].length)):j=this.__input_length,z=this.__input.substring(this.__position,j),this.__position=j,z},S.prototype.readUntilAfter=function(T){return this.readUntil(T,!0)},S.prototype.get_regexp=function(T,B){var z=null,j="g";return B&&b&&(j="y"),typeof T=="string"&&T!==""?z=new RegExp(T,j):T&&(z=new RegExp(T.source,j)),z},S.prototype.get_literal_regexp=function(T){return RegExp(T.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},S.prototype.peekUntilAfter=function(T){var B=this.__position,z=this.readUntilAfter(T);return this.__position=B,z},S.prototype.lookBack=function(T){var B=this.__position-1;return B>=T.length&&this.__input.substring(B-T.length,B).toLowerCase()===T},L.exports.InputScanner=S},function(L,b,S){var T=S(8).InputScanner,B=S(3).Token,z=S(10).TokenStream,j=S(11).WhitespacePattern,U={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},A=function(K,I){this._input=new T(K),this._options=I||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new j(this._input)};A.prototype.tokenize=function(){this._input.restart(),this.__tokens=new z,this._reset();for(var K,I=new B(U.START,""),M=null,le=[],me=new z;I.type!==U.EOF;){for(K=this._get_next_token(I,M);this._is_comment(K);)me.add(K),K=this._get_next_token(I,M);me.isEmpty()||(K.comments_before=me,me=new z),K.parent=M,this._is_opening(K)?(le.push(M),M=K):M&&this._is_closing(K,M)&&(K.opened=M,M.closed=K,M=le.pop(),K.parent=M),K.previous=I,I.next=K,this.__tokens.add(K),I=K}return this.__tokens},A.prototype._is_first_token=function(){return this.__tokens.isEmpty()},A.prototype._reset=function(){},A.prototype._get_next_token=function(K,I){this._readWhitespace();var M=this._input.read(/.+/g);return M?this._create_token(U.RAW,M):this._create_token(U.EOF,"")},A.prototype._is_comment=function(K){return!1},A.prototype._is_opening=function(K){return!1},A.prototype._is_closing=function(K,I){return!1},A.prototype._create_token=function(K,I){var M=new B(K,I,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return M},A.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},L.exports.Tokenizer=A,L.exports.TOKEN=U},function(L){function b(S){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=S}b.prototype.restart=function(){this.__position=0},b.prototype.isEmpty=function(){return this.__tokens_length===0},b.prototype.hasNext=function(){return this.__position<this.__tokens_length},b.prototype.next=function(){var S=null;return this.hasNext()&&(S=this.__tokens[this.__position],this.__position+=1),S},b.prototype.peek=function(S){var T=null;return S=S||0,S+=this.__position,S>=0&&S<this.__tokens_length&&(T=this.__tokens[S]),T},b.prototype.add=function(S){this.__parent_token&&(S.parent=this.__parent_token),this.__tokens.push(S),this.__tokens_length+=1},L.exports.TokenStream=b},function(L,b,S){var T=S(12).Pattern;function B(z,j){T.call(this,z,j),j?this._line_regexp=this._input.get_regexp(j._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}B.prototype=new T,B.prototype.__set_whitespace_patterns=function(z,j){z+="\\t ",j+="\\n\\r",this._match_pattern=this._input.get_regexp("["+z+j+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+j+"]")},B.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var z=this._input.read(this._match_pattern);if(z===" ")this.whitespace_before_token=" ";else if(z){var j=this.__split(this._newline_regexp,z);this.newline_count=j.length-1,this.whitespace_before_token=j[this.newline_count]}return z},B.prototype.matching=function(z,j){var U=this._create();return U.__set_whitespace_patterns(z,j),U._update(),U},B.prototype._create=function(){return new B(this._input,this)},B.prototype.__split=function(z,j){z.lastIndex=0;for(var U=0,A=[],K=z.exec(j);K;)A.push(j.substring(U,K.index)),U=K.index+K[0].length,K=z.exec(j);return U<j.length?A.push(j.substring(U,j.length)):A.push(""),A},L.exports.WhitespacePattern=B},function(L){function b(S,T){this._input=S,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)}b.prototype.read=function(){var S=this._input.read(this._starting_pattern);return(!this._starting_pattern||S)&&(S+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),S},b.prototype.read_match=function(){return this._input.match(this._match_pattern)},b.prototype.until_after=function(S){var T=this._create();return T._until_after=!0,T._until_pattern=this._input.get_regexp(S),T._update(),T},b.prototype.until=function(S){var T=this._create();return T._until_after=!1,T._until_pattern=this._input.get_regexp(S),T._update(),T},b.prototype.starting_with=function(S){var T=this._create();return T._starting_pattern=this._input.get_regexp(S,!0),T._update(),T},b.prototype.matching=function(S){var T=this._create();return T._match_pattern=this._input.get_regexp(S,!0),T._update(),T},b.prototype._create=function(){return new b(this._input,this)},b.prototype._update=function(){},L.exports.Pattern=b},function(L){function b(S,T){S=typeof S=="string"?S:S.source,T=typeof T=="string"?T:T.source,this.__directives_block_pattern=new RegExp(S+/ beautify( \w+[:]\w+)+ /.source+T,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(S+/\sbeautify\signore:end\s/.source+T,"g")}b.prototype.get_directives=function(S){if(!S.match(this.__directives_block_pattern))return null;var T={};this.__directive_pattern.lastIndex=0;for(var B=this.__directive_pattern.exec(S);B;)T[B[1]]=B[2],B=this.__directive_pattern.exec(S);return T},b.prototype.readIgnored=function(S){return S.readUntilAfter(this.__directives_end_ignore_pattern)},L.exports.Directives=b},function(L,b,S){var T=S(12).Pattern,B={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function z(j,U){T.call(this,j,U),this.__template_pattern=null,this._disabled=Object.assign({},B),this._excluded=Object.assign({},B),U&&(this.__template_pattern=this._input.get_regexp(U.__template_pattern),this._excluded=Object.assign(this._excluded,U._excluded),this._disabled=Object.assign(this._disabled,U._disabled));var A=new T(j);this.__patterns={handlebars_comment:A.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:A.starting_with(/{{{/).until_after(/}}}/),handlebars:A.starting_with(/{{/).until_after(/}}/),php:A.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:A.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:A.starting_with(/{%/).until_after(/%}/),django_value:A.starting_with(/{{/).until_after(/}}/),django_comment:A.starting_with(/{#/).until_after(/#}/),smarty:A.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:A.starting_with(/{\*/).until_after(/\*}/),smarty_literal:A.starting_with(/{literal}/).until_after(/{\/literal}/)}}z.prototype=new T,z.prototype._create=function(){return new z(this._input,this)},z.prototype._update=function(){this.__set_templated_pattern()},z.prototype.disable=function(j){var U=this._create();return U._disabled[j]=!0,U._update(),U},z.prototype.read_options=function(j){var U=this._create();for(var A in B)U._disabled[A]=j.templating.indexOf(A)===-1;return U._update(),U},z.prototype.exclude=function(j){var U=this._create();return U._excluded[j]=!0,U._update(),U},z.prototype.read=function(){var j="";this._match_pattern?j=this._input.read(this._starting_pattern):j=this._input.read(this._starting_pattern,this.__template_pattern);for(var U=this._read_template();U;)this._match_pattern?U+=this._input.read(this._match_pattern):U+=this._input.readUntil(this.__template_pattern),j+=U,U=this._read_template();return this._until_after&&(j+=this._input.readUntilAfter(this._until_pattern)),j},z.prototype.__set_templated_pattern=function(){var j=[];this._disabled.php||j.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||j.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||j.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||j.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(j.push(this.__patterns.django._starting_pattern.source),j.push(this.__patterns.django_value._starting_pattern.source),j.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||j.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&j.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+j.join("|")+")")},z.prototype._read_template=function(){var j="",U=this._input.peek();if(U==="<"){var A=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&A==="?"&&(j=j||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&A==="%"&&(j=j||this.__patterns.erb.read())}else U==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(j=j||this.__patterns.handlebars_comment.read(),j=j||this.__patterns.handlebars_unescaped.read(),j=j||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(j=j||this.__patterns.django_value.read()),this._excluded.django||(j=j||this.__patterns.django_comment.read(),j=j||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(j=j||this.__patterns.smarty_comment.read(),j=j||this.__patterns.smarty_literal.read(),j=j||this.__patterns.smarty.read()));return j},L.exports.TemplatablePattern=z},,,,function(L,b,S){var T=S(19).Beautifier,B=S(20).Options;function z(j,U,A,K){var I=new T(j,U,A,K);return I.beautify()}L.exports=z,L.exports.defaultOptions=function(){return new B}},function(L,b,S){var T=S(20).Options,B=S(2).Output,z=S(21).Tokenizer,j=S(21).TOKEN,U=/\r\n|[\r\n]/,A=/\r\n|[\r\n]/g,K=function(ue,W){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=ue.max_preserve_newlines,this.preserve_newlines=ue.preserve_newlines,this._output=new B(ue,W)};K.prototype.current_line_has_match=function(ue){return this._output.current_line.has_match(ue)},K.prototype.set_space_before_token=function(ue,W){this._output.space_before_token=ue,this._output.non_breaking_space=W},K.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},K.prototype.add_raw_token=function(ue){this._output.add_raw_token(ue)},K.prototype.print_preserved_newlines=function(ue){var W=0;ue.type!==j.TEXT&&ue.previous.type!==j.TEXT&&(W=ue.newlines?1:0),this.preserve_newlines&&(W=ue.newlines<this.max_preserve_newlines+1?ue.newlines:this.max_preserve_newlines+1);for(var P=0;P<W;P++)this.print_newline(P>0);return W!==0},K.prototype.traverse_whitespace=function(ue){return ue.whitespace_before||ue.newlines?(this.print_preserved_newlines(ue)||(this._output.space_before_token=!0),!0):!1},K.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},K.prototype.print_newline=function(ue){this._output.add_new_line(ue)},K.prototype.print_token=function(ue){ue.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(ue.text))},K.prototype.indent=function(){this.indent_level++},K.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},K.prototype.get_full_indent=function(ue){return ue=this.indent_level+(ue||0),ue<1?"":this._output.get_indent_string(ue)};var I=function(ue){for(var W=null,P=ue.next;P.type!==j.EOF&&ue.closed!==P;){if(P.type===j.ATTRIBUTE&&P.text==="type"){P.next&&P.next.type===j.EQUALS&&P.next.next&&P.next.next.type===j.VALUE&&(W=P.next.next.text);break}P=P.next}return W},M=function(ue,W){var P=null,de=null;return W.closed?(ue==="script"?P="text/javascript":ue==="style"&&(P="text/css"),P=I(W)||P,P.search("text/css")>-1?de="css":P.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?de="javascript":P.search(/(text|application|dojo)\/(x-)?(html)/)>-1?de="html":P.search(/test\/null/)>-1&&(de="null"),de):null};function le(ue,W){return W.indexOf(ue)!==-1}function me(ue,W,P){this.parent=ue||null,this.tag=W?W.tag_name:"",this.indent_level=P||0,this.parser_token=W||null}function ce(ue){this._printer=ue,this._current_frame=null}ce.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},ce.prototype.record_tag=function(ue){var W=new me(this._current_frame,ue,this._printer.indent_level);this._current_frame=W},ce.prototype._try_pop_frame=function(ue){var W=null;return ue&&(W=ue.parser_token,this._printer.indent_level=ue.indent_level,this._current_frame=ue.parent),W},ce.prototype._get_frame=function(ue,W){for(var P=this._current_frame;P&&ue.indexOf(P.tag)===-1;){if(W&&W.indexOf(P.tag)!==-1){P=null;break}P=P.parent}return P},ce.prototype.try_pop=function(ue,W){var P=this._get_frame([ue],W);return this._try_pop_frame(P)},ce.prototype.indent_to_tag=function(ue){var W=this._get_frame(ue);W&&(this._printer.indent_level=W.indent_level)};function De(ue,W,P,de){this._source_text=ue||"",W=W||{},this._js_beautify=P,this._css_beautify=de,this._tag_stack=null;var ae=new T(W,"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"}De.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var ue=this._source_text,W=this._options.eol;this._options.eol==="auto"&&(W=`
`,ue&&U.test(ue)&&(W=ue.match(U)[0])),ue=ue.replace(A,`
`);var P=ue.match(/^[\t ]*/)[0],de={text:"",type:""},ae=new Pe(this._options),Q=new K(this._options,P),E=new z(ue,this._options).tokenize();this._tag_stack=new ce(Q);for(var C=null,Y=E.next();Y.type!==j.EOF;)Y.type===j.TAG_OPEN||Y.type===j.COMMENT?(C=this._handle_tag_open(Q,Y,ae,de,E),ae=C):Y.type===j.ATTRIBUTE||Y.type===j.EQUALS||Y.type===j.VALUE||Y.type===j.TEXT&&!ae.tag_complete?C=this._handle_inside_tag(Q,Y,ae,de):Y.type===j.TAG_CLOSE?C=this._handle_tag_close(Q,Y,ae):Y.type===j.TEXT?C=this._handle_text(Q,Y,ae):Y.type===j.CONTROL_FLOW_OPEN?C=this._handle_control_flow_open(Q,Y):Y.type===j.CONTROL_FLOW_CLOSE?C=this._handle_control_flow_close(Q,Y):Q.add_raw_token(Y),de=C,Y=E.next();var be=Q._output.get_code(W);return be},De.prototype._handle_control_flow_open=function(ue,W){var P={text:W.text,type:W.type};return ue.set_space_before_token(W.newlines||W.whitespace_before!=="",!0),W.newlines?ue.print_preserved_newlines(W):ue.set_space_before_token(W.newlines||W.whitespace_before!=="",!0),ue.print_token(W),ue.indent(),P},De.prototype._handle_control_flow_close=function(ue,W){var P={text:W.text,type:W.type};return ue.deindent(),W.newlines?ue.print_preserved_newlines(W):ue.set_space_before_token(W.newlines||W.whitespace_before!=="",!0),ue.print_token(W),P},De.prototype._handle_tag_close=function(ue,W,P){var de={text:W.text,type:W.type};return ue.alignment_size=0,P.tag_complete=!0,ue.set_space_before_token(W.newlines||W.whitespace_before!=="",!0),P.is_unformatted?ue.add_raw_token(W):(P.tag_start_char==="<"&&(ue.set_space_before_token(W.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&P.has_wrapped_attrs&&ue.print_newline(!1)),ue.print_token(W)),P.indent_content&&!(P.is_unformatted||P.is_content_unformatted)&&(ue.indent(),P.indent_content=!1),!P.is_inline_element&&!(P.is_unformatted||P.is_content_unformatted)&&ue.set_wrap_point(),de},De.prototype._handle_inside_tag=function(ue,W,P,de){var ae=P.has_wrapped_attrs,Q={text:W.text,type:W.type};return ue.set_space_before_token(W.newlines||W.whitespace_before!=="",!0),P.is_unformatted?ue.add_raw_token(W):P.tag_start_char==="{"&&W.type===j.TEXT?ue.print_preserved_newlines(W)?(W.newlines=0,ue.add_raw_token(W)):ue.print_token(W):(W.type===j.ATTRIBUTE?ue.set_space_before_token(!0):(W.type===j.EQUALS||W.type===j.VALUE&&W.previous.type===j.EQUALS)&&ue.set_space_before_token(!1),W.type===j.ATTRIBUTE&&P.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(ue.traverse_whitespace(W),ae=ae||W.newlines!==0),this._is_wrap_attributes_force&&P.attr_count>=this._options.wrap_attributes_min_attrs&&(de.type!==j.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(ue.print_newline(!1),ae=!0)),ue.print_token(W),ae=ae||ue.previous_token_wrapped(),P.has_wrapped_attrs=ae),Q},De.prototype._handle_text=function(ue,W,P){var de={text:W.text,type:"TK_CONTENT"};return P.custom_beautifier_name?this._print_custom_beatifier_text(ue,W,P):P.is_unformatted||P.is_content_unformatted?ue.add_raw_token(W):(ue.traverse_whitespace(W),ue.print_token(W)),de},De.prototype._print_custom_beatifier_text=function(ue,W,P){var de=this;if(W.text!==""){var ae=W.text,Q,E=1,C="",Y="";P.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?Q=this._js_beautify:P.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?Q=this._css_beautify:P.custom_beautifier_name==="html"&&(Q=function(et,_t){var Re=new De(et,_t,de._js_beautify,de._css_beautify);return Re.beautify()}),this._options.indent_scripts==="keep"?E=0:this._options.indent_scripts==="separate"&&(E=-ue.indent_level);var be=ue.get_full_indent(E);if(ae=ae.replace(/\n[ \t]*$/,""),P.custom_beautifier_name!=="html"&&ae[0]==="<"&&ae.match(/^(<!--|<!\[CDATA\[)/)){var je=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(ae);if(!je){ue.add_raw_token(W);return}C=be+je[1]+`
`,ae=je[4],je[5]&&(Y=be+je[5]),ae=ae.replace(/\n[ \t]*$/,""),(je[2]||je[3].indexOf(`
`)!==-1)&&(je=je[3].match(/[ \t]+$/),je&&(W.whitespace_before=je[0]))}if(ae)if(Q){var lt=function(){this.eol=`
`};lt.prototype=this._options.raw_options;var ke=new lt;ae=Q(be+ae,ke)}else{var Ye=W.whitespace_before;Ye&&(ae=ae.replace(new RegExp(`
(`+Ye+")?","g"),`
`)),ae=be+ae.replace(/\n/g,`
`+be)}C&&(ae?ae=C+ae+`
`+Y:ae=C+Y),ue.print_newline(!1),ae&&(W.text=ae,W.whitespace_before="",W.newlines=0,ue.add_raw_token(W),ue.print_newline(!0))}},De.prototype._handle_tag_open=function(ue,W,P,de,ae){var Q=this._get_tag_open_token(W);if((P.is_unformatted||P.is_content_unformatted)&&!P.is_empty_element&&W.type===j.TAG_OPEN&&!Q.is_start_tag?(ue.add_raw_token(W),Q.start_tag_token=this._tag_stack.try_pop(Q.tag_name)):(ue.traverse_whitespace(W),this._set_tag_position(ue,W,Q,P,de),Q.is_inline_element||ue.set_wrap_point(),ue.print_token(W)),Q.is_start_tag&&this._is_wrap_attributes_force){var E=0,C;do C=ae.peek(E),C.type===j.ATTRIBUTE&&(Q.attr_count+=1),E+=1;while(C.type!==j.EOF&&C.type!==j.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(Q.alignment_size=W.text.length+1),!Q.tag_complete&&!Q.is_unformatted&&(ue.alignment_size=Q.alignment_size),Q};var Pe=function(ue,W,P){if(this.parent=W||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="",!P)this.tag_complete=!0;else{var de;this.tag_start_char=P.text[0],this.text=P.text,this.tag_start_char==="<"?(de=P.text.match(/^<([^\s>]*)/),this.tag_check=de?de[1]:""):(de=P.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=de?de[1]:"",(P.text.startsWith("{{#>")||P.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&P.next!==null?this.tag_check=P.next.text.split(" ")[0]:this.tag_check=P.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),P.type===j.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||P.closed&&P.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==="{"&&(!ue.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(ae)))}};De.prototype._get_tag_open_token=function(ue){var W=new Pe(this._options,this._tag_stack.get_parser_token(),ue);return W.alignment_size=this._options.wrap_attributes_indent_size,W.is_end_tag=W.is_end_tag||le(W.tag_check,this._options.void_elements),W.is_empty_element=W.tag_complete||W.is_start_tag&&W.is_end_tag,W.is_unformatted=!W.tag_complete&&le(W.tag_check,this._options.unformatted),W.is_content_unformatted=!W.is_empty_element&&le(W.tag_check,this._options.content_unformatted),W.is_inline_element=le(W.tag_name,this._options.inline)||this._options.inline_custom_elements&&W.tag_name.includes("-")||W.tag_start_char==="{",W},De.prototype._set_tag_position=function(ue,W,P,de,ae){if(P.is_empty_element||(P.is_end_tag?P.start_tag_token=this._tag_stack.try_pop(P.tag_name):(this._do_optional_end_element(P)&&(P.is_inline_element||ue.print_newline(!1)),this._tag_stack.record_tag(P),(P.tag_name==="script"||P.tag_name==="style")&&!(P.is_unformatted||P.is_content_unformatted)&&(P.custom_beautifier_name=M(P.tag_check,W)))),le(P.tag_check,this._options.extra_liners)&&(ue.print_newline(!1),ue._output.just_added_blankline()||ue.print_newline(!0)),P.is_empty_element){if(P.tag_start_char==="{"&&P.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),P.indent_content=!0;var Q=ue.current_line_has_match(/{{#if/);Q||ue.print_newline(!1)}P.tag_name==="!--"&&ae.type===j.TAG_CLOSE&&de.is_end_tag&&P.text.indexOf(`
`)===-1||(P.is_inline_element||P.is_unformatted||ue.print_newline(!1),this._calcluate_parent_multiline(ue,P))}else if(P.is_end_tag){var E=!1;E=P.start_tag_token&&P.start_tag_token.multiline_content,E=E||!P.is_inline_element&&!(de.is_inline_element||de.is_unformatted)&&!(ae.type===j.TAG_CLOSE&&P.start_tag_token===de)&&ae.type!=="TK_CONTENT",(P.is_content_unformatted||P.is_unformatted)&&(E=!1),E&&ue.print_newline(!1)}else P.indent_content=!P.custom_beautifier_name,P.tag_start_char==="<"&&(P.tag_name==="html"?P.indent_content=this._options.indent_inner_html:P.tag_name==="head"?P.indent_content=this._options.indent_head_inner_html:P.tag_name==="body"&&(P.indent_content=this._options.indent_body_inner_html)),!(P.is_inline_element||P.is_unformatted)&&(ae.type!=="TK_CONTENT"||P.is_content_unformatted)&&ue.print_newline(!1),this._calcluate_parent_multiline(ue,P)},De.prototype._calcluate_parent_multiline=function(ue,W){W.parent&&ue._output.just_added_newline()&&!((W.is_inline_element||W.is_unformatted)&&W.parent.is_inline_element)&&(W.parent.multiline_content=!0)};var Ce=["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"],He=["a","audio","del","ins","map","noscript","video"];De.prototype._do_optional_end_element=function(ue){var W=null;if(!(ue.is_empty_element||!ue.is_start_tag||!ue.parent)){if(ue.tag_name==="body")W=W||this._tag_stack.try_pop("head");else if(ue.tag_name==="li")W=W||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(ue.tag_name==="dd"||ue.tag_name==="dt")W=W||this._tag_stack.try_pop("dt",["dl"]),W=W||this._tag_stack.try_pop("dd",["dl"]);else if(ue.parent.tag_name==="p"&&Ce.indexOf(ue.tag_name)!==-1){var P=ue.parent.parent;(!P||He.indexOf(P.tag_name)===-1)&&(W=W||this._tag_stack.try_pop("p"))}else ue.tag_name==="rp"||ue.tag_name==="rt"?(W=W||this._tag_stack.try_pop("rt",["ruby","rtc"]),W=W||this._tag_stack.try_pop("rp",["ruby","rtc"])):ue.tag_name==="optgroup"?W=W||this._tag_stack.try_pop("optgroup",["select"]):ue.tag_name==="option"?W=W||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):ue.tag_name==="colgroup"?W=W||this._tag_stack.try_pop("caption",["table"]):ue.tag_name==="thead"?(W=W||this._tag_stack.try_pop("caption",["table"]),W=W||this._tag_stack.try_pop("colgroup",["table"])):ue.tag_name==="tbody"||ue.tag_name==="tfoot"?(W=W||this._tag_stack.try_pop("caption",["table"]),W=W||this._tag_stack.try_pop("colgroup",["table"]),W=W||this._tag_stack.try_pop("thead",["table"]),W=W||this._tag_stack.try_pop("tbody",["table"])):ue.tag_name==="tr"?(W=W||this._tag_stack.try_pop("caption",["table"]),W=W||this._tag_stack.try_pop("colgroup",["table"]),W=W||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(ue.tag_name==="th"||ue.tag_name==="td")&&(W=W||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),W=W||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return ue.parent=this._tag_stack.get_parser_token(),W}},L.exports.Beautifier=De},function(L,b,S){var T=S(6).Options;function B(z){T.call(this,z,"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"])}B.prototype=new T,L.exports.Options=B},function(L,b,S){var T=S(9).Tokenizer,B=S(9).TOKEN,z=S(13).Directives,j=S(14).TemplatablePattern,U=S(12).Pattern,A={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:B.START,RAW:B.RAW,EOF:B.EOF},K=new z(/<\!--/,/-->/),I=function(M,le){T.call(this,M,le),this._current_tag_name="";var me=new j(this._input).read_options(this._options),ce=new U(this._input);if(this.__patterns={word:me.until(/[\n\r\t <]/),word_control_flow_close_excluded:me.until(/[\n\r\t <}]/),single_quote:me.until_after(/'/),double_quote:me.until_after(/"/),attribute:me.until(/[\n\r\t =>]|\/>/),element_name:me.until(/[\n\r\t >\/]/),angular_control_flow_start:ce.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:ce.starting_with(/{{!--/).until_after(/--}}/),handlebars:ce.starting_with(/{{/).until_after(/}}/),handlebars_open:ce.until(/[\n\r\t }]/),handlebars_raw_close:ce.until(/}}/),comment:ce.starting_with(/<!--/).until_after(/-->/),cdata:ce.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:ce.starting_with(/<!\[/).until_after(/]>/),processing:ce.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var De=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=ce.matching(De).until_after(De)}};I.prototype=new T,I.prototype._is_comment=function(M){return!1},I.prototype._is_opening=function(M){return M.type===A.TAG_OPEN||M.type===A.CONTROL_FLOW_OPEN},I.prototype._is_closing=function(M,le){return M.type===A.TAG_CLOSE&&le&&((M.text===">"||M.text==="/>")&&le.text[0]==="<"||M.text==="}}"&&le.text[0]==="{"&&le.text[1]==="{")||M.type===A.CONTROL_FLOW_CLOSE&&M.text==="}"&&le.text.endsWith("{")},I.prototype._reset=function(){this._current_tag_name=""},I.prototype._get_next_token=function(M,le){var me=null;this._readWhitespace();var ce=this._input.peek();return ce===null?this._create_token(A.EOF,""):(me=me||this._read_open_handlebars(ce,le),me=me||this._read_attribute(ce,M,le),me=me||this._read_close(ce,le),me=me||this._read_script_and_style(ce,M),me=me||this._read_control_flows(ce,le),me=me||this._read_raw_content(ce,M,le),me=me||this._read_content_word(ce,le),me=me||this._read_comment_or_cdata(ce),me=me||this._read_processing(ce),me=me||this._read_open(ce,le),me=me||this._create_token(A.UNKNOWN,this._input.next()),me)},I.prototype._read_comment_or_cdata=function(M){var le=null,me=null,ce=null;if(M==="<"){var De=this._input.peek(1);De==="!"&&(me=this.__patterns.comment.read(),me?(ce=K.get_directives(me),ce&&ce.ignore==="start"&&(me+=K.readIgnored(this._input))):me=this.__patterns.cdata.read()),me&&(le=this._create_token(A.COMMENT,me),le.directives=ce)}return le},I.prototype._read_processing=function(M){var le=null,me=null,ce=null;if(M==="<"){var De=this._input.peek(1);(De==="!"||De==="?")&&(me=this.__patterns.conditional_comment.read(),me=me||this.__patterns.processing.read()),me&&(le=this._create_token(A.COMMENT,me),le.directives=ce)}return le},I.prototype._read_open=function(M,le){var me=null,ce=null;return(!le||le.type===A.CONTROL_FLOW_OPEN)&&M==="<"&&(me=this._input.next(),this._input.peek()==="/"&&(me+=this._input.next()),me+=this.__patterns.element_name.read(),ce=this._create_token(A.TAG_OPEN,me)),ce},I.prototype._read_open_handlebars=function(M,le){var me=null,ce=null;return(!le||le.type===A.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&M==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(me=this.__patterns.handlebars_comment.read(),me=me||this.__patterns.handlebars.read(),ce=this._create_token(A.COMMENT,me)):(me=this.__patterns.handlebars_open.read(),ce=this._create_token(A.TAG_OPEN,me))),ce},I.prototype._read_control_flows=function(M,le){var me="",ce=null;if(!this._options.templating.includes("angular"))return ce;if(M==="@"){if(me=this.__patterns.angular_control_flow_start.read(),me==="")return ce;for(var De=me.endsWith("(")?1:0,Pe=0;!(me.endsWith("{")&&De===Pe);){var Ce=this._input.next();if(Ce===null)break;Ce==="("?De++:Ce===")"&&Pe++,me+=Ce}ce=this._create_token(A.CONTROL_FLOW_OPEN,me)}else M==="}"&&le&&le.type===A.CONTROL_FLOW_OPEN&&(me=this._input.next(),ce=this._create_token(A.CONTROL_FLOW_CLOSE,me));return ce},I.prototype._read_close=function(M,le){var me=null,ce=null;return le&&le.type===A.TAG_OPEN&&(le.text[0]==="<"&&(M===">"||M==="/"&&this._input.peek(1)===">")?(me=this._input.next(),M==="/"&&(me+=this._input.next()),ce=this._create_token(A.TAG_CLOSE,me)):le.text[0]==="{"&&M==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),ce=this._create_token(A.TAG_CLOSE,"}}"))),ce},I.prototype._read_attribute=function(M,le,me){var ce=null,De="";if(me&&me.text[0]==="<")if(M==="=")ce=this._create_token(A.EQUALS,this._input.next());else if(M==='"'||M==="'"){var Pe=this._input.next();M==='"'?Pe+=this.__patterns.double_quote.read():Pe+=this.__patterns.single_quote.read(),ce=this._create_token(A.VALUE,Pe)}else De=this.__patterns.attribute.read(),De&&(le.type===A.EQUALS?ce=this._create_token(A.VALUE,De):ce=this._create_token(A.ATTRIBUTE,De));return ce},I.prototype._is_content_unformatted=function(M){return this._options.void_elements.indexOf(M)===-1&&(this._options.content_unformatted.indexOf(M)!==-1||this._options.unformatted.indexOf(M)!==-1)},I.prototype._read_raw_content=function(M,le,me){var ce="";if(me&&me.text[0]==="{")ce=this.__patterns.handlebars_raw_close.read();else if(le.type===A.TAG_CLOSE&&le.opened.text[0]==="<"&&le.text[0]!=="/"){var De=le.opened.text.substr(1).toLowerCase();this._is_content_unformatted(De)&&(ce=this._input.readUntil(new RegExp("</"+De+"[\\n\\r\\t ]*?>","ig")))}return ce?this._create_token(A.TEXT,ce):null},I.prototype._read_script_and_style=function(M,le){if(le.type===A.TAG_CLOSE&&le.opened.text[0]==="<"&&le.text[0]!=="/"){var me=le.opened.text.substr(1).toLowerCase();if(me==="script"||me==="style"){var ce=this._read_comment_or_cdata(M);if(ce)return ce.type=A.TEXT,ce;var De=this._input.readUntil(new RegExp("</"+me+"[\\n\\r\\t ]*?>","ig"));if(De)return this._create_token(A.TEXT,De)}}return null},I.prototype._read_content_word=function(M,le){var me="";return this._options.unformatted_content_delimiter&&M===this._options.unformatted_content_delimiter[0]&&(me=this.__patterns.unformatted_content_delimiter.read()),me||(me=le&&le.type===A.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),me?this._create_token(A.TEXT,me):null},L.exports.Tokenizer=I,L.exports.TOKEN=A}],X={};function o(L){var b=X[L];if(b!==void 0)return b.exports;var S=X[L]={exports:{}};return J[L](S,S.exports,o),S.exports}var x=o(18);$=x})();var ie=$;if(1)c=[m,m(58553),m(87804)],ee=function(J){var X=m(58553),o=m(87804);return{html_beautify:function(x,L){return ie(x,L,X.js_beautify,o.css_beautify)}}}.apply(We,c),ee!==void 0&&(un.exports=ee);else var F,g})()},58553:function(un,We){var m,c;(function(){var ee;(function(){"use strict";var ie=[function(X,o,x){var L=x(1).Beautifier,b=x(5).Options;function S(T,B){var z=new L(T,B);return z.beautify()}X.exports=S,X.exports.defaultOptions=function(){return new b}},function(X,o,x){var L=x(2).Output,b=x(3).Token,S=x(4),T=x(5).Options,B=x(7).Tokenizer,z=x(7).line_starters,j=x(7).positionable_operators,U=x(7).TOKEN;function A(C,Y){return Y.indexOf(C)!==-1}function K(C){return C.replace(/^\s+/g,"")}function I(C){for(var Y={},be=0;be<C.length;be++)Y[C[be].replace(/-/g,"_")]=C[be];return Y}function M(C,Y){return C&&C.type===U.RESERVED&&C.text===Y}function le(C,Y){return C&&C.type===U.RESERVED&&A(C.text,Y)}var me=["case","return","do","if","throw","else","await","break","continue","async"],ce=["before-newline","after-newline","preserve-newline"],De=I(ce),Pe=[De.before_newline,De.preserve_newline],Ce={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function He(C,Y){Y.multiline_frame||Y.mode===Ce.ForInitializer||Y.mode===Ce.Conditional||C.remove_indent(Y.start_line_index)}function ue(C){C=C.replace(S.allLineBreaks,`
`);for(var Y=[],be=C.indexOf(`
`);be!==-1;)Y.push(C.substring(0,be)),C=C.substring(be+1),be=C.indexOf(`
`);return C.length&&Y.push(C),Y}function W(C){return C===Ce.ArrayLiteral}function P(C){return A(C,[Ce.Expression,Ce.ForInitializer,Ce.Conditional])}function de(C,Y){for(var be=0;be<C.length;be++){var je=C[be].trim();if(je.charAt(0)!==Y)return!1}return!0}function ae(C,Y){for(var be=0,je=C.length,lt;be<je;be++)if(lt=C[be],lt&&lt.indexOf(Y)!==0)return!1;return!0}function Q(C,Y){Y=Y||{},this._source_text=C||"",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 T(Y)}Q.prototype.create_flags=function(C,Y){var be=0;C&&(be=C.indentation_level,!this._output.just_added_newline()&&C.line_indent_level>be&&(be=C.line_indent_level));var je={mode:Y,parent:C,last_token:C?C.last_token:new b(U.START_BLOCK,""),last_word:C?C.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:be,alignment:0,line_indent_level:C?C.line_indent_level:be,start_line_index:this._output.get_line_number(),ternary_depth:0};return je},Q.prototype._reset=function(C){var Y=C.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new L(this._options,Y),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(Ce.BlockStatement);var be=new B(C,this._options);return this._tokens=be.tokenize(),C},Q.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var C,Y=this._reset(this._source_text),be=this._options.eol;this._options.eol==="auto"&&(be=`
`,Y&&S.lineBreak.test(Y||"")&&(be=Y.match(S.lineBreak)[0]));for(var je=this._tokens.next();je;)this.handle_token(je),this._last_last_text=this._flags.last_token.text,this._flags.last_token=je,je=this._tokens.next();return C=this._output.get_code(be),C},Q.prototype.handle_token=function(C,Y){C.type===U.START_EXPR?this.handle_start_expr(C):C.type===U.END_EXPR?this.handle_end_expr(C):C.type===U.START_BLOCK?this.handle_start_block(C):C.type===U.END_BLOCK?this.handle_end_block(C):C.type===U.WORD?this.handle_word(C):C.type===U.RESERVED?this.handle_word(C):C.type===U.SEMICOLON?this.handle_semicolon(C):C.type===U.STRING?this.handle_string(C):C.type===U.EQUALS?this.handle_equals(C):C.type===U.OPERATOR?this.handle_operator(C):C.type===U.COMMA?this.handle_comma(C):C.type===U.BLOCK_COMMENT?this.handle_block_comment(C,Y):C.type===U.COMMENT?this.handle_comment(C,Y):C.type===U.DOT?this.handle_dot(C):C.type===U.EOF?this.handle_eof(C):C.type===U.UNKNOWN?this.handle_unknown(C,Y):this.handle_unknown(C,Y)},Q.prototype.handle_whitespace_and_comments=function(C,Y){var be=C.newlines,je=this._options.keep_array_indentation&&W(this._flags.mode);if(C.comments_before)for(var lt=C.comments_before.next();lt;)this.handle_whitespace_and_comments(lt,Y),this.handle_token(lt,Y),lt=C.comments_before.next();if(je)for(var ke=0;ke<be;ke+=1)this.print_newline(ke>0,Y);else if(this._options.max_preserve_newlines&&be>this._options.max_preserve_newlines&&(be=this._options.max_preserve_newlines),this._options.preserve_newlines&&be>1){this.print_newline(!1,Y);for(var Ye=1;Ye<be;Ye+=1)this.print_newline(!0,Y)}};var E=["async","break","continue","return","throw","yield"];Q.prototype.allow_wrap_or_preserved_newline=function(C,Y){if(Y=Y===void 0?!1:Y,!this._output.just_added_newline()){var be=this._options.preserve_newlines&&C.newlines||Y,je=A(this._flags.last_token.text,j)||A(C.text,j);if(je){var lt=A(this._flags.last_token.text,j)&&A(this._options.operator_position,Pe)||A(C.text,j);be=be&&lt}if(be)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(le(this._flags.last_token,E))return;this._output.set_wrap_point()}}},Q.prototype.print_newline=function(C,Y){if(!Y&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==U.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var be=this._tokens.peek();this._flags.mode===Ce.Statement&&!(this._flags.if_block&&M(be,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(C)&&(this._flags.multiline_frame=!0)},Q.prototype.print_token_line_indentation=function(C){this._output.just_added_newline()&&(this._options.keep_array_indentation&&C.newlines&&(C.text==="["||W(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(C.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},Q.prototype.print_token=function(C){if(this._output.raw){this._output.add_raw_token(C);return}if(this._options.comma_first&&C.previous&&C.previous.type===U.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var Y=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(Y),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(C),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(C),this._output.non_breaking_space=!0,this._output.add_token(C.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},Q.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Q.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},Q.prototype.set_mode=function(C){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,C),this._flags=this.create_flags(this._previous_flags,C),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Q.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===Ce.Statement&&He(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},Q.prototype.start_of_object_property=function(){return this._flags.parent.mode===Ce.ObjectLiteral&&this._flags.mode===Ce.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||le(this._flags.last_token,["get","set"]))},Q.prototype.start_of_statement=function(C){var Y=!1;return Y=Y||le(this._flags.last_token,["var","let","const"])&&C.type===U.WORD,Y=Y||M(this._flags.last_token,"do"),Y=Y||!(this._flags.parent.mode===Ce.ObjectLiteral&&this._flags.mode===Ce.Statement)&&le(this._flags.last_token,E)&&!C.newlines,Y=Y||M(this._flags.last_token,"else")&&!(M(C,"if")&&!C.comments_before),Y=Y||this._flags.last_token.type===U.END_EXPR&&(this._previous_flags.mode===Ce.ForInitializer||this._previous_flags.mode===Ce.Conditional),Y=Y||this._flags.last_token.type===U.WORD&&this._flags.mode===Ce.BlockStatement&&!this._flags.in_case&&!(C.text==="--"||C.text==="++")&&this._last_last_text!=="function"&&C.type!==U.WORD&&C.type!==U.RESERVED,Y=Y||this._flags.mode===Ce.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||le(this._flags.last_token,["get","set"])),Y?(this.set_mode(Ce.Statement),this.indent(),this.handle_whitespace_and_comments(C,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(C,le(C,["do","for","if","while"])),!0):!1},Q.prototype.handle_start_expr=function(C){this.start_of_statement(C)||this.handle_whitespace_and_comments(C);var Y=Ce.Expression;if(C.text==="["){if(this._flags.last_token.type===U.WORD||this._flags.last_token.text===")"){le(this._flags.last_token,z)&&(this._output.space_before_token=!0),this.print_token(C),this.set_mode(Y),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Y=Ce.ArrayLiteral,W(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()),A(this._flags.last_token.type,[U.START_EXPR,U.END_EXPR,U.WORD,U.OPERATOR,U.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===U.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,Y=Ce.ForInitializer):A(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Y=Ce.Conditional):A(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&C.whitespace_before===""?this._output.space_before_token=!1:(A(this._flags.last_token.text,z)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===U.EQUALS||this._flags.last_token.type===U.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(C);else if(this._flags.last_token.type===U.WORD){this._output.space_before_token=!1;var be=this._tokens.peek(-3);if(this._options.space_after_named_function&&be){var je=this._tokens.peek(-4);le(be,["async","function"])||be.text==="*"&&le(je,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Ce.ObjectLiteral?(be.text==="{"||be.text===","||be.text==="*"&&(je.text==="{"||je.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(C);(this._flags.last_token.type===U.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(A(this._last_last_text,["function","yield"])||this._flags.mode===Ce.ObjectLiteral&&A(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===U.START_BLOCK?this.print_newline():(this._flags.last_token.type===U.END_EXPR||this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===U.COMMA)&&this.allow_wrap_or_preserved_newline(C,C.newlines),this.print_token(C),this.set_mode(Y),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},Q.prototype.handle_end_expr=function(C){for(;this._flags.mode===Ce.Statement;)this.restore_mode();this.handle_whitespace_and_comments(C),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(C,C.text==="]"&&W(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===U.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(C),this.restore_mode(),He(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Ce.Conditional&&(this._previous_flags.mode=Ce.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},Q.prototype.handle_start_block=function(C){this.handle_whitespace_and_comments(C);var Y=this._tokens.peek(),be=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===U.END_EXPR?(this.set_mode(Ce.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Ce.BlockStatement):be&&(A(be.text,[":",","])&&A(Y.type,[U.STRING,U.WORD,U.RESERVED])||A(Y.text,["get","set","..."])&&A(be.type,[U.WORD,U.RESERVED]))?A(this._last_last_text,["class","interface"])&&!A(be.text,[":",","])?this.set_mode(Ce.BlockStatement):this.set_mode(Ce.ObjectLiteral):this._flags.last_token.type===U.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Ce.BlockStatement):A(this._flags.last_token.type,[U.EQUALS,U.START_EXPR,U.COMMA,U.OPERATOR])||le(this._flags.last_token,["return","throw","import","default"])?this.set_mode(Ce.ObjectLiteral):this.set_mode(Ce.BlockStatement),this._flags.last_token&&le(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var je=!Y.comments_before&&Y.text==="}",lt=je&&this._flags.last_word==="function"&&this._flags.last_token.type===U.END_EXPR;if(this._options.brace_preserve_inline){var ke=0,Ye=null;this._flags.inline_frame=!0;do if(ke+=1,Ye=this._tokens.peek(ke-1),Ye.newlines){this._flags.inline_frame=!1;break}while(Ye.type!==U.EOF&&!(Ye.type===U.END_BLOCK&&Ye.opened===C))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&C.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==U.OPERATOR&&(lt||this._flags.last_token.type===U.EQUALS||le(this._flags.last_token,me)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(W(this._previous_flags.mode)&&(this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.COMMA)&&((this._flags.last_token.type===U.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(C),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==U.OPERATOR&&this._flags.last_token.type!==U.START_EXPR&&(A(this._flags.last_token.type,[U.START_BLOCK,U.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(C),this.indent(),!je&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},Q.prototype.handle_end_block=function(C){for(this.handle_whitespace_and_comments(C);this._flags.mode===Ce.Statement;)this.restore_mode();var Y=this._flags.last_token.type===U.START_BLOCK;this._flags.inline_frame&&!Y?this._output.space_before_token=!0:this._options.brace_style==="expand"?Y||this.print_newline():Y||(W(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(C)},Q.prototype.handle_word=function(C){if(C.type===U.RESERVED){if(A(C.text,["set","get"])&&this._flags.mode!==Ce.ObjectLiteral)C.type=U.WORD;else if(C.text==="import"&&A(this._tokens.peek().text,["(","."]))C.type=U.WORD;else if(A(C.text,["as","from"])&&!this._flags.import_block)C.type=U.WORD;else if(this._flags.mode===Ce.ObjectLiteral){var Y=this._tokens.peek();Y.text===":"&&(C.type=U.WORD)}}if(this.start_of_statement(C)?le(this._flags.last_token,["var","let","const"])&&C.type===U.WORD&&(this._flags.declaration_statement=!0):C.newlines&&!P(this._flags.mode)&&(this._flags.last_token.type!==U.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==U.EQUALS&&(this._options.preserve_newlines||!le(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(C),this.print_newline()):this.handle_whitespace_and_comments(C),this._flags.do_block&&!this._flags.do_while)if(M(C,"while")){this._output.space_before_token=!0,this.print_token(C),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&&M(C,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===Ce.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&le(C,["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(C),this._flags.in_case=!0;return}if((this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.EQUALS||this._flags.last_token.type===U.OPERATOR)&&!this.start_of_object_property()&&!(A(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===Ce.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(C),M(C,"function")){(A(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(A(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===U.OPERATOR))&&!this._output.just_added_blankline()&&!C.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===U.RESERVED||this._flags.last_token.type===U.WORD?le(this._flags.last_token,["get","set","new","export"])||le(this._flags.last_token,E)?this._output.space_before_token=!0:M(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===U.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(P(this._flags.mode)||W(this._flags.mode))||this.print_newline(),this.print_token(C),this._flags.last_word=C.text;return}var be="NONE";if(this._flags.last_token.type===U.END_BLOCK?this._previous_flags.inline_frame?be="SPACE":le(C,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&C.newlines?be="NEWLINE":(be="SPACE",this._output.space_before_token=!0):be="NEWLINE":this._flags.last_token.type===U.SEMICOLON&&this._flags.mode===Ce.BlockStatement?be="NEWLINE":this._flags.last_token.type===U.SEMICOLON&&P(this._flags.mode)?be="SPACE":this._flags.last_token.type===U.STRING?be="NEWLINE":this._flags.last_token.type===U.RESERVED||this._flags.last_token.type===U.WORD||this._flags.last_token.text==="*"&&(A(this._last_last_text,["function","yield"])||this._flags.mode===Ce.ObjectLiteral&&A(this._last_last_text,["{",","]))?be="SPACE":this._flags.last_token.type===U.START_BLOCK?this._flags.inline_frame?be="SPACE":be="NEWLINE":this._flags.last_token.type===U.END_EXPR&&(this._output.space_before_token=!0,be="NEWLINE"),le(C,z)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?be="SPACE":be="NEWLINE"),le(C,["else","catch","finally"]))if((!(this._flags.last_token.type===U.END_BLOCK&&this._previous_flags.mode===Ce.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&C.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var je=this._output.current_line;je.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else be==="NEWLINE"?le(this._flags.last_token,me)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&le(C,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==U.END_EXPR?(this._flags.last_token.type!==U.START_EXPR||!le(C,["var","let","const"]))&&this._flags.last_token.text!==":"&&(M(C,"if")&&M(C.previous,"else")?this._output.space_before_token=!0:this.print_newline()):le(C,z)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&W(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():be==="SPACE"&&(this._output.space_before_token=!0);C.previous&&(C.previous.type===U.WORD||C.previous.type===U.RESERVED)&&(this._output.space_before_token=!0),this.print_token(C),this._flags.last_word=C.text,C.type===U.RESERVED&&(C.text==="do"?this._flags.do_block=!0:C.text==="if"?this._flags.if_block=!0:C.text==="import"?this._flags.import_block=!0:this._flags.import_block&&M(C,"from")&&(this._flags.import_block=!1))},Q.prototype.handle_semicolon=function(C){this.start_of_statement(C)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(C);for(var Y=this._tokens.peek();this._flags.mode===Ce.Statement&&!(this._flags.if_block&&M(Y,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(C)},Q.prototype.handle_string=function(C){C.text.startsWith("`")&&C.newlines===0&&C.whitespace_before===""&&(C.previous.text===")"||this._flags.last_token.type===U.WORD)||(this.start_of_statement(C)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(C),this._flags.last_token.type===U.RESERVED||this._flags.last_token.type===U.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.EQUALS||this._flags.last_token.type===U.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(C):C.text.startsWith("`")&&this._flags.last_token.type===U.END_EXPR&&(C.previous.text==="]"||C.previous.text===")")&&C.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(C)},Q.prototype.handle_equals=function(C){this.start_of_statement(C)||this.handle_whitespace_and_comments(C),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(C),this._output.space_before_token=!0},Q.prototype.handle_comma=function(C){this.handle_whitespace_and_comments(C,!0),this.print_token(C),this._output.space_before_token=!0,this._flags.declaration_statement?(P(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(C)):this._flags.mode===Ce.ObjectLiteral||this._flags.mode===Ce.Statement&&this._flags.parent.mode===Ce.ObjectLiteral?(this._flags.mode===Ce.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(C)},Q.prototype.handle_operator=function(C){var Y=C.text==="*"&&(le(this._flags.last_token,["function","yield"])||A(this._flags.last_token.type,[U.START_BLOCK,U.COMMA,U.END_BLOCK,U.SEMICOLON])),be=A(C.text,["-","+"])&&(A(this._flags.last_token.type,[U.START_BLOCK,U.START_EXPR,U.EQUALS,U.OPERATOR])||A(this._flags.last_token.text,z)||this._flags.last_token.text===",");if(!this.start_of_statement(C)){var je=!Y;this.handle_whitespace_and_comments(C,je)}if(C.text==="*"&&this._flags.last_token.type===U.DOT){this.print_token(C);return}if(C.text==="::"){this.print_token(C);return}if(A(C.text,["-","+"])&&this.start_of_object_property()){this.print_token(C);return}if(this._flags.last_token.type===U.OPERATOR&&A(this._options.operator_position,Pe)&&this.allow_wrap_or_preserved_newline(C),C.text===":"&&this._flags.in_case){this.print_token(C),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==U.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 lt=!0,ke=!0,Ye=!1;if(C.text===":"?this._flags.ternary_depth===0?lt=!1:(this._flags.ternary_depth-=1,Ye=!0):C.text==="?"&&(this._flags.ternary_depth+=1),!be&&!Y&&this._options.preserve_newlines&&A(C.text,j)){var et=C.text===":",_t=et&&Ye,Re=et&&!Ye;switch(this._options.operator_position){case De.before_newline:this._output.space_before_token=!Re,this.print_token(C),(!et||_t)&&this.allow_wrap_or_preserved_newline(C),this._output.space_before_token=!0;return;case De.after_newline:this._output.space_before_token=!0,!et||_t?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(C):this._output.space_before_token=!1,this.print_token(C),this._output.space_before_token=!0;return;case De.preserve_newline:Re||this.allow_wrap_or_preserved_newline(C),lt=!(this._output.just_added_newline()||Re),this._output.space_before_token=lt,this.print_token(C),this._output.space_before_token=!0;return}}if(Y){this.allow_wrap_or_preserved_newline(C),lt=!1;var At=this._tokens.peek();ke=At&&A(At.type,[U.WORD,U.RESERVED])}else if(C.text==="...")this.allow_wrap_or_preserved_newline(C),lt=this._flags.last_token.type===U.START_BLOCK,ke=!1;else if(A(C.text,["--","++","!","~"])||be){if((this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR)&&this.allow_wrap_or_preserved_newline(C),lt=!1,ke=!1,C.newlines&&(C.text==="--"||C.text==="++"||C.text==="~")){var rt=le(this._flags.last_token,me)&&C.newlines;rt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(rt,!0)}this._flags.last_token.text===";"&&P(this._flags.mode)&&(lt=!0),this._flags.last_token.type===U.RESERVED?lt=!0:this._flags.last_token.type===U.END_EXPR?lt=!(this._flags.last_token.text==="]"&&(C.text==="--"||C.text==="++")):this._flags.last_token.type===U.OPERATOR&&(lt=A(C.text,["--","-","++","+"])&&A(this._flags.last_token.text,["--","-","++","+"]),A(C.text,["+","-"])&&A(this._flags.last_token.text,["--","++"])&&(ke=!0)),(this._flags.mode===Ce.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Ce.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||lt,this.print_token(C),this._output.space_before_token=ke},Q.prototype.handle_block_comment=function(C,Y){if(this._output.raw){this._output.add_raw_token(C),C.directives&&C.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(C.directives){this.print_newline(!1,Y),this.print_token(C),C.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!S.newline.test(C.text)&&!C.newlines){this._output.space_before_token=!0,this.print_token(C),this._output.space_before_token=!0;return}else this.print_block_commment(C,Y)},Q.prototype.print_block_commment=function(C,Y){var be=ue(C.text),je,lt=!1,ke=!1,Ye=C.whitespace_before,et=Ye.length;if(this.print_newline(!1,Y),this.print_token_line_indentation(C),this._output.add_token(be[0]),this.print_newline(!1,Y),be.length>1){for(be=be.slice(1),lt=de(be,"*"),ke=ae(be,Ye),lt&&(this._flags.alignment=1),je=0;je<be.length;je++)lt?(this.print_token_line_indentation(C),this._output.add_token(K(be[je]))):ke&&be[je]?(this.print_token_line_indentation(C),this._output.add_token(be[je].substring(et))):(this._output.current_line.set_indent(-1),this._output.add_token(be[je])),this.print_newline(!1,Y);this._flags.alignment=0}},Q.prototype.handle_comment=function(C,Y){C.newlines?this.print_newline(!1,Y):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(C),this.print_newline(!1,Y)},Q.prototype.handle_dot=function(C){this.start_of_statement(C)||this.handle_whitespace_and_comments(C,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),le(this._flags.last_token,me)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(C,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(C)},Q.prototype.handle_unknown=function(C,Y){this.print_token(C),C.text[C.text.length-1]===`
`&&this.print_newline(!1,Y)},Q.prototype.handle_eof=function(C){for(;this._flags.mode===Ce.Statement;)this.restore_mode();this.handle_whitespace_and_comments(C)},X.exports.Beautifier=Q},function(X){function o(b){this.__parent=b,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var b=new o(this.__parent);return b.set_indent(this.__indent_count,this.__alignment_count),b},o.prototype.item=function(b){return b<0?this.__items[this.__items.length+b]:this.__items[b]},o.prototype.has_match=function(b){for(var S=this.__items.length-1;S>=0;S--)if(this.__items[S].match(b))return!0;return!1},o.prototype.set_indent=function(b,S){this.is_empty()&&(this.__indent_count=b||0,this.__alignment_count=S||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var b=this.__parent.current_line;return b.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),b.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),b.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,b.__items[0]===" "&&(b.__items.splice(0,1),b.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(b){this.__items.push(b);var S=b.lastIndexOf(`
`);S!==-1?this.__character_count=b.length-S:this.__character_count+=b.length},o.prototype.pop=function(){var b=null;return this.is_empty()||(b=this.__items.pop(),this.__character_count-=b.length),b},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var b="";return this.is_empty()?this.__parent.indent_empty_lines&&(b=this.__parent.get_indent_string(this.__indent_count)):(b=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),b+=this.__items.join("")),b};function x(b,S){this.__cache=[""],this.__indent_size=b.indent_size,this.__indent_string=b.indent_char,b.indent_with_tabs||(this.__indent_string=new Array(b.indent_size+1).join(b.indent_char)),S=S||"",b.indent_level>0&&(S=new Array(b.indent_level+1).join(this.__indent_string)),this.__base_string=S,this.__base_string_length=S.length}x.prototype.get_indent_size=function(b,S){var T=this.__base_string_length;return S=S||0,b<0&&(T=0),T+=b*this.__indent_size,T+=S,T},x.prototype.get_indent_string=function(b,S){var T=this.__base_string;return S=S||0,b<0&&(b=0,T=""),S+=b*this.__indent_size,this.__ensure_cache(S),T+=this.__cache[S],T},x.prototype.__ensure_cache=function(b){for(;b>=this.__cache.length;)this.__add_column()},x.prototype.__add_column=function(){var b=this.__cache.length,S=0,T="";this.__indent_size&&b>=this.__indent_size&&(S=Math.floor(b/this.__indent_size),b-=S*this.__indent_size,T=new Array(S+1).join(this.__indent_string)),b&&(T+=new Array(b+1).join(" ")),this.__cache.push(T)};function L(b,S){this.__indent_cache=new x(b,S),this.raw=!1,this._end_with_newline=b.end_with_newline,this.indent_size=b.indent_size,this.wrap_line_length=b.wrap_line_length,this.indent_empty_lines=b.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}L.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},L.prototype.get_line_number=function(){return this.__lines.length},L.prototype.get_indent_string=function(b,S){return this.__indent_cache.get_indent_string(b,S)},L.prototype.get_indent_size=function(b,S){return this.__indent_cache.get_indent_size(b,S)},L.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},L.prototype.add_new_line=function(b){return this.is_empty()||!b&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},L.prototype.get_code=function(b){this.trim(!0);var S=this.current_line.pop();S&&(S[S.length-1]===`
`&&(S=S.replace(/\n+$/g,"")),this.current_line.push(S)),this._end_with_newline&&this.__add_outputline();var T=this.__lines.join(`
`);return b!==`
`&&(T=T.replace(/[\n]/g,b)),T},L.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},L.prototype.set_indent=function(b,S){return b=b||0,S=S||0,this.next_line.set_indent(b,S),this.__lines.length>1?(this.current_line.set_indent(b,S),!0):(this.current_line.set_indent(),!1)},L.prototype.add_raw_token=function(b){for(var S=0;S<b.newlines;S++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(b.whitespace_before),this.current_line.push(b.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},L.prototype.add_token=function(b){this.__add_space_before_token(),this.current_line.push(b),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},L.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(" "))},L.prototype.remove_indent=function(b){for(var S=this.__lines.length;b<S;)this.__lines[b]._remove_indent(),b++;this.current_line._remove_wrap_indent()},L.prototype.trim=function(b){for(b=b===void 0?!1:b,this.current_line.trim();b&&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},L.prototype.just_added_newline=function(){return this.current_line.is_empty()},L.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},L.prototype.ensure_empty_line_above=function(b,S){for(var T=this.__lines.length-2;T>=0;){var B=this.__lines[T];if(B.is_empty())break;if(B.item(0).indexOf(b)!==0&&B.item(-1)!==S){this.__lines.splice(T+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}T--}},X.exports.Output=L},function(X){function o(x,L,b,S){this.type=x,this.text=L,this.comments_before=null,this.newlines=b||0,this.whitespace_before=S||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}X.exports.Token=o},function(X,o){var x="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",L="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",b="\\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",S="\\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",T="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",B="(?:"+T+"|["+x+b+"])",z="(?:"+T+"|["+L+b+S+"])*";o.identifier=new RegExp(B+z,"g"),o.identifierStart=new RegExp(B),o.identifierMatch=new RegExp("(?:"+T+"|["+L+b+S+"])+");var j=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;o.newline=/[\n\r\u2028\u2029]/,o.lineBreak=new RegExp(`\r
|`+o.newline.source),o.allLineBreaks=new RegExp(o.lineBreak.source,"g")},function(X,o,x){var L=x(6).Options,b=["before-newline","after-newline","preserve-newline"];function S(T){L.call(this,T,"js");var B=this.raw_options.brace_style||null;B==="expand-strict"?this.raw_options.brace_style="expand":B==="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 z=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var j=0;j<z.length;j++)z[j]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=z[j];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",b),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}S.prototype=new L,X.exports.Options=S},function(X){function o(b,S){this.raw_options=x(b,S),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(b,S){var T=this.raw_options[b],B=S||[];return typeof T=="object"?T!==null&&typeof T.concat=="function"&&(B=T.concat()):typeof T=="string"&&(B=T.split(/[^a-zA-Z0-9_\/\-]+/)),B},o.prototype._get_boolean=function(b,S){var T=this.raw_options[b],B=T===void 0?!!S:!!T;return B},o.prototype._get_characters=function(b,S){var T=this.raw_options[b],B=S||"";return typeof T=="string"&&(B=T.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),B},o.prototype._get_number=function(b,S){var T=this.raw_options[b];S=parseInt(S,10),isNaN(S)&&(S=0);var B=parseInt(T,10);return isNaN(B)&&(B=S),B},o.prototype._get_selection=function(b,S,T){var B=this._get_selection_list(b,S,T);if(B.length!==1)throw new Error("Invalid Option Value: The option '"+b+`' can only be one of the following values:
`+S+`
You passed in: '`+this.raw_options[b]+"'");return B[0]},o.prototype._get_selection_list=function(b,S,T){if(!S||S.length===0)throw new Error("Selection list cannot be empty.");if(T=T||[S[0]],!this._is_valid_selection(T,S))throw new Error("Invalid Default Value!");var B=this._get_array(b,T);if(!this._is_valid_selection(B,S))throw new Error("Invalid Option Value: The option '"+b+`' can contain only the following values:
`+S+`
You passed in: '`+this.raw_options[b]+"'");return B},o.prototype._is_valid_selection=function(b,S){return b.length&&S.length&&!b.some(function(T){return S.indexOf(T)===-1})};function x(b,S){var T={};b=L(b);var B;for(B in b)B!==S&&(T[B]=b[B]);if(S&&b[S])for(B in b[S])T[B]=b[S][B];return T}function L(b){var S={},T;for(T in b){var B=T.replace(/-/g,"_");S[B]=b[T]}return S}X.exports.Options=o,X.exports.normalizeOpts=L,X.exports.mergeOpts=x},function(X,o,x){var L=x(8).InputScanner,b=x(9).Tokenizer,S=x(9).TOKEN,T=x(13).Directives,B=x(4),z=x(12).Pattern,j=x(14).TemplatablePattern;function U(de,ae){return ae.indexOf(de)!==-1}var A={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:S.START,RAW:S.RAW,EOF:S.EOF},K=new T(/\/\*/,/\*\//),I=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,M=/[0-9]/,le=/[^\d\.]/,me=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),ce=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";ce=ce.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),ce="\\?\\.(?!\\d) "+ce,ce=ce.replace(/ /g,"|");var De=new RegExp(ce),Pe="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Ce=Pe.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),He=new RegExp("^(?:"+Ce.join("|")+")$"),ue,W=function(de,ae){b.call(this,de,ae),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var Q=new z(this._input),E=new j(this._input).read_options(this._options);this.__patterns={template:E,identifier:E.starting_with(B.identifier).matching(B.identifierMatch),number:Q.matching(I),punct:Q.matching(De),comment:Q.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:Q.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:Q.matching(/<!--/),html_comment_end:Q.matching(/-->/),include:Q.starting_with(/#include/).until_after(B.lineBreak),shebang:Q.starting_with(/#!/).until_after(B.lineBreak),xml:Q.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:E.until(/['\\\n\r\u2028\u2029]/),double_quote:E.until(/["\\\n\r\u2028\u2029]/),template_text:E.until(/[`\\$]/),template_expression:E.until(/[`}\\]/)}};W.prototype=new b,W.prototype._is_comment=function(de){return de.type===A.COMMENT||de.type===A.BLOCK_COMMENT||de.type===A.UNKNOWN},W.prototype._is_opening=function(de){return de.type===A.START_BLOCK||de.type===A.START_EXPR},W.prototype._is_closing=function(de,ae){return(de.type===A.END_BLOCK||de.type===A.END_EXPR)&&ae&&(de.text==="]"&&ae.text==="["||de.text===")"&&ae.text==="("||de.text==="}"&&ae.text==="{")},W.prototype._reset=function(){ue=!1},W.prototype._get_next_token=function(de,ae){var Q=null;this._readWhitespace();var E=this._input.peek();return E===null?this._create_token(A.EOF,""):(Q=Q||this._read_non_javascript(E),Q=Q||this._read_string(E),Q=Q||this._read_pair(E,this._input.peek(1)),Q=Q||this._read_word(de),Q=Q||this._read_singles(E),Q=Q||this._read_comment(E),Q=Q||this._read_regexp(E,de),Q=Q||this._read_xml(E,de),Q=Q||this._read_punctuation(),Q=Q||this._create_token(A.UNKNOWN,this._input.next()),Q)},W.prototype._read_word=function(de){var ae;if(ae=this.__patterns.identifier.read(),ae!=="")return ae=ae.replace(B.allLineBreaks,`
`),!(de.type===A.DOT||de.type===A.RESERVED&&(de.text==="set"||de.text==="get"))&&He.test(ae)?(ae==="in"||ae==="of")&&(de.type===A.WORD||de.type===A.STRING)?this._create_token(A.OPERATOR,ae):this._create_token(A.RESERVED,ae):this._create_token(A.WORD,ae);if(ae=this.__patterns.number.read(),ae!=="")return this._create_token(A.WORD,ae)},W.prototype._read_singles=function(de){var ae=null;return de==="("||de==="["?ae=this._create_token(A.START_EXPR,de):de===")"||de==="]"?ae=this._create_token(A.END_EXPR,de):de==="{"?ae=this._create_token(A.START_BLOCK,de):de==="}"?ae=this._create_token(A.END_BLOCK,de):de===";"?ae=this._create_token(A.SEMICOLON,de):de==="."&&le.test(this._input.peek(1))?ae=this._create_token(A.DOT,de):de===","&&(ae=this._create_token(A.COMMA,de)),ae&&this._input.next(),ae},W.prototype._read_pair=function(de,ae){var Q=null;return de==="#"&&ae==="{"&&(Q=this._create_token(A.START_BLOCK,de+ae)),Q&&(this._input.next(),this._input.next()),Q},W.prototype._read_punctuation=function(){var de=this.__patterns.punct.read();if(de!=="")return de==="="?this._create_token(A.EQUALS,de):de==="?."?this._create_token(A.DOT,de):this._create_token(A.OPERATOR,de)},W.prototype._read_non_javascript=function(de){var ae="";if(de==="#"){if(this._is_first_token()&&(ae=this.__patterns.shebang.read(),ae))return this._create_token(A.UNKNOWN,ae.trim()+`
`);if(ae=this.__patterns.include.read(),ae)return this._create_token(A.UNKNOWN,ae.trim()+`
`);de=this._input.next();var Q="#";if(this._input.hasNext()&&this._input.testChar(M)){do de=this._input.next(),Q+=de;while(this._input.hasNext()&&de!=="#"&&de!=="=");return de==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(Q+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(Q+="{}",this._input.next(),this._input.next())),this._create_token(A.WORD,Q)}this._input.back()}else if(de==="<"&&this._is_first_token()){if(ae=this.__patterns.html_comment_start.read(),ae){for(;this._input.hasNext()&&!this._input.testChar(B.newline);)ae+=this._input.next();return ue=!0,this._create_token(A.COMMENT,ae)}}else if(ue&&de==="-"&&(ae=this.__patterns.html_comment_end.read(),ae))return ue=!1,this._create_token(A.COMMENT,ae);return null},W.prototype._read_comment=function(de){var ae=null;if(de==="/"){var Q="";if(this._input.peek(1)==="*"){Q=this.__patterns.block_comment.read();var E=K.get_directives(Q);E&&E.ignore==="start"&&(Q+=K.readIgnored(this._input)),Q=Q.replace(B.allLineBreaks,`
`),ae=this._create_token(A.BLOCK_COMMENT,Q),ae.directives=E}else this._input.peek(1)==="/"&&(Q=this.__patterns.comment.read(),ae=this._create_token(A.COMMENT,Q))}return ae},W.prototype._read_string=function(de){if(de==="`"||de==="'"||de==='"'){var ae=this._input.next();return this.has_char_escapes=!1,de==="`"?ae+=this._read_string_recursive("`",!0,"${"):ae+=this._read_string_recursive(de),this.has_char_escapes&&this._options.unescape_strings&&(ae=P(ae)),this._input.peek()===de&&(ae+=this._input.next()),ae=ae.replace(B.allLineBreaks,`
`),this._create_token(A.STRING,ae)}return null},W.prototype._allow_regexp_or_xml=function(de){return de.type===A.RESERVED&&U(de.text,["return","case","throw","else","do","typeof","yield"])||de.type===A.END_EXPR&&de.text===")"&&de.opened.previous.type===A.RESERVED&&U(de.opened.previous.text,["if","while","for"])||U(de.type,[A.COMMENT,A.START_EXPR,A.START_BLOCK,A.START,A.END_BLOCK,A.OPERATOR,A.EQUALS,A.EOF,A.SEMICOLON,A.COMMA])},W.prototype._read_regexp=function(de,ae){if(de==="/"&&this._allow_regexp_or_xml(ae)){for(var Q=this._input.next(),E=!1,C=!1;this._input.hasNext()&&(E||C||this._input.peek()!==de)&&!this._input.testChar(B.newline);)Q+=this._input.peek(),E?E=!1:(E=this._input.peek()==="\\",this._input.peek()==="["?C=!0:this._input.peek()==="]"&&(C=!1)),this._input.next();return this._input.peek()===de&&(Q+=this._input.next(),Q+=this._input.read(B.identifier)),this._create_token(A.STRING,Q)}return null},W.prototype._read_xml=function(de,ae){if(this._options.e4x&&de==="<"&&this._allow_regexp_or_xml(ae)){var Q="",E=this.__patterns.xml.read_match();if(E){for(var C=E[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Y=C.indexOf("{")===0,be=0;E;){var je=!!E[1],lt=E[2],ke=!!E[E.length-1]||lt.slice(0,8)==="![CDATA[";if(!ke&&(lt===C||Y&&lt.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(je?--be:++be),Q+=E[0],be<=0)break;E=this.__patterns.xml.read_match()}return E||(Q+=this._input.match(/[\s\S]*/g)[0]),Q=Q.replace(B.allLineBreaks,`
`),this._create_token(A.STRING,Q)}}return null};function P(de){for(var ae="",Q=0,E=new L(de),C=null;E.hasNext();)if(C=E.match(/([\s]|[^\\]|\\\\)+/g),C&&(ae+=C[0]),E.peek()==="\\"){if(E.next(),E.peek()==="x")C=E.match(/x([0-9A-Fa-f]{2})/g);else if(E.peek()==="u")C=E.match(/u([0-9A-Fa-f]{4})/g),C||(C=E.match(/u\{([0-9A-Fa-f]+)\}/g));else{ae+="\\",E.hasNext()&&(ae+=E.next());continue}if(!C||(Q=parseInt(C[1],16),Q>126&&Q<=255&&C[0].indexOf("x")===0))return de;Q>=0&&Q<32||Q>1114111?ae+="\\"+C[0]:Q===34||Q===39||Q===92?ae+="\\"+String.fromCharCode(Q):ae+=String.fromCharCode(Q)}return ae}W.prototype._read_string_recursive=function(de,ae,Q){var E,C;de==="'"?C=this.__patterns.single_quote:de==='"'?C=this.__patterns.double_quote:de==="`"?C=this.__patterns.template_text:de==="}"&&(C=this.__patterns.template_expression);for(var Y=C.read(),be="";this._input.hasNext();){if(be=this._input.next(),be===de||!ae&&B.newline.test(be)){this._input.back();break}else be==="\\"&&this._input.hasNext()?(E=this._input.peek(),E==="x"||E==="u"?this.has_char_escapes=!0:E==="\r"&&this._input.peek(1)===`
`&&this._input.next(),be+=this._input.next()):Q&&(Q==="${"&&be==="$"&&this._input.peek()==="{"&&(be+=this._input.next()),Q===be&&(de==="`"?be+=this._read_string_recursive("}",ae,"`"):be+=this._read_string_recursive("`",ae,"${"),this._input.hasNext()&&(be+=this._input.next())));be+=C.read(),Y+=be}return Y},X.exports.Tokenizer=W,X.exports.TOKEN=A,X.exports.positionable_operators=me.slice(),X.exports.line_starters=Pe.slice()},function(X){var o=RegExp.prototype.hasOwnProperty("sticky");function x(L){this.__input=L||"",this.__input_length=this.__input.length,this.__position=0}x.prototype.restart=function(){this.__position=0},x.prototype.back=function(){this.__position>0&&(this.__position-=1)},x.prototype.hasNext=function(){return this.__position<this.__input_length},x.prototype.next=function(){var L=null;return this.hasNext()&&(L=this.__input.charAt(this.__position),this.__position+=1),L},x.prototype.peek=function(L){var b=null;return L=L||0,L+=this.__position,L>=0&&L<this.__input_length&&(b=this.__input.charAt(L)),b},x.prototype.__match=function(L,b){L.lastIndex=b;var S=L.exec(this.__input);return S&&!(o&&L.sticky)&&S.index!==b&&(S=null),S},x.prototype.test=function(L,b){return b=b||0,b+=this.__position,b>=0&&b<this.__input_length?!!this.__match(L,b):!1},x.prototype.testChar=function(L,b){var S=this.peek(b);return L.lastIndex=0,S!==null&&L.test(S)},x.prototype.match=function(L){var b=this.__match(L,this.__position);return b?this.__position+=b[0].length:b=null,b},x.prototype.read=function(L,b,S){var T="",B;return L&&(B=this.match(L),B&&(T+=B[0])),b&&(B||!L)&&(T+=this.readUntil(b,S)),T},x.prototype.readUntil=function(L,b){var S="",T=this.__position;L.lastIndex=this.__position;var B=L.exec(this.__input);return B?(T=B.index,b&&(T+=B[0].length)):T=this.__input_length,S=this.__input.substring(this.__position,T),this.__position=T,S},x.prototype.readUntilAfter=function(L){return this.readUntil(L,!0)},x.prototype.get_regexp=function(L,b){var S=null,T="g";return b&&o&&(T="y"),typeof L=="string"&&L!==""?S=new RegExp(L,T):L&&(S=new RegExp(L.source,T)),S},x.prototype.get_literal_regexp=function(L){return RegExp(L.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},x.prototype.peekUntilAfter=function(L){var b=this.__position,S=this.readUntilAfter(L);return this.__position=b,S},x.prototype.lookBack=function(L){var b=this.__position-1;return b>=L.length&&this.__input.substring(b-L.length,b).toLowerCase()===L},X.exports.InputScanner=x},function(X,o,x){var L=x(8).InputScanner,b=x(3).Token,S=x(10).TokenStream,T=x(11).WhitespacePattern,B={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},z=function(j,U){this._input=new L(j),this._options=U||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new T(this._input)};z.prototype.tokenize=function(){this._input.restart(),this.__tokens=new S,this._reset();for(var j,U=new b(B.START,""),A=null,K=[],I=new S;U.type!==B.EOF;){for(j=this._get_next_token(U,A);this._is_comment(j);)I.add(j),j=this._get_next_token(U,A);I.isEmpty()||(j.comments_before=I,I=new S),j.parent=A,this._is_opening(j)?(K.push(A),A=j):A&&this._is_closing(j,A)&&(j.opened=A,A.closed=j,A=K.pop(),j.parent=A),j.previous=U,U.next=j,this.__tokens.add(j),U=j}return this.__tokens},z.prototype._is_first_token=function(){return this.__tokens.isEmpty()},z.prototype._reset=function(){},z.prototype._get_next_token=function(j,U){this._readWhitespace();var A=this._input.read(/.+/g);return A?this._create_token(B.RAW,A):this._create_token(B.EOF,"")},z.prototype._is_comment=function(j){return!1},z.prototype._is_opening=function(j){return!1},z.prototype._is_closing=function(j,U){return!1},z.prototype._create_token=function(j,U){var A=new b(j,U,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return A},z.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},X.exports.Tokenizer=z,X.exports.TOKEN=B},function(X){function o(x){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=x}o.prototype.restart=function(){this.__position=0},o.prototype.isEmpty=function(){return this.__tokens_length===0},o.prototype.hasNext=function(){return this.__position<this.__tokens_length},o.prototype.next=function(){var x=null;return this.hasNext()&&(x=this.__tokens[this.__position],this.__position+=1),x},o.prototype.peek=function(x){var L=null;return x=x||0,x+=this.__position,x>=0&&x<this.__tokens_length&&(L=this.__tokens[x]),L},o.prototype.add=function(x){this.__parent_token&&(x.parent=this.__parent_token),this.__tokens.push(x),this.__tokens_length+=1},X.exports.TokenStream=o},function(X,o,x){var L=x(12).Pattern;function b(S,T){L.call(this,S,T),T?this._line_regexp=this._input.get_regexp(T._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}b.prototype=new L,b.prototype.__set_whitespace_patterns=function(S,T){S+="\\t ",T+="\\n\\r",this._match_pattern=this._input.get_regexp("["+S+T+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+T+"]")},b.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var S=this._input.read(this._match_pattern);if(S===" ")this.whitespace_before_token=" ";else if(S){var T=this.__split(this._newline_regexp,S);this.newline_count=T.length-1,this.whitespace_before_token=T[this.newline_count]}return S},b.prototype.matching=function(S,T){var B=this._create();return B.__set_whitespace_patterns(S,T),B._update(),B},b.prototype._create=function(){return new b(this._input,this)},b.prototype.__split=function(S,T){S.lastIndex=0;for(var B=0,z=[],j=S.exec(T);j;)z.push(T.substring(B,j.index)),B=j.index+j[0].length,j=S.exec(T);return B<T.length?z.push(T.substring(B,T.length)):z.push(""),z},X.exports.WhitespacePattern=b},function(X){function o(x,L){this._input=x,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,L&&(this._starting_pattern=this._input.get_regexp(L._starting_pattern,!0),this._match_pattern=this._input.get_regexp(L._match_pattern,!0),this._until_pattern=this._input.get_regexp(L._until_pattern),this._until_after=L._until_after)}o.prototype.read=function(){var x=this._input.read(this._starting_pattern);return(!this._starting_pattern||x)&&(x+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),x},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(x){var L=this._create();return L._until_after=!0,L._until_pattern=this._input.get_regexp(x),L._update(),L},o.prototype.until=function(x){var L=this._create();return L._until_after=!1,L._until_pattern=this._input.get_regexp(x),L._update(),L},o.prototype.starting_with=function(x){var L=this._create();return L._starting_pattern=this._input.get_regexp(x,!0),L._update(),L},o.prototype.matching=function(x){var L=this._create();return L._match_pattern=this._input.get_regexp(x,!0),L._update(),L},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},X.exports.Pattern=o},function(X){function o(x,L){x=typeof x=="string"?x:x.source,L=typeof L=="string"?L:L.source,this.__directives_block_pattern=new RegExp(x+/ beautify( \w+[:]\w+)+ /.source+L,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(x+/\sbeautify\signore:end\s/.source+L,"g")}o.prototype.get_directives=function(x){if(!x.match(this.__directives_block_pattern))return null;var L={};this.__directive_pattern.lastIndex=0;for(var b=this.__directive_pattern.exec(x);b;)L[b[1]]=b[2],b=this.__directive_pattern.exec(x);return L},o.prototype.readIgnored=function(x){return x.readUntilAfter(this.__directives_end_ignore_pattern)},X.exports.Directives=o},function(X,o,x){var L=x(12).Pattern,b={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function S(T,B){L.call(this,T,B),this.__template_pattern=null,this._disabled=Object.assign({},b),this._excluded=Object.assign({},b),B&&(this.__template_pattern=this._input.get_regexp(B.__template_pattern),this._excluded=Object.assign(this._excluded,B._excluded),this._disabled=Object.assign(this._disabled,B._disabled));var z=new L(T);this.__patterns={handlebars_comment:z.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:z.starting_with(/{{{/).until_after(/}}}/),handlebars:z.starting_with(/{{/).until_after(/}}/),php:z.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:z.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:z.starting_with(/{%/).until_after(/%}/),django_value:z.starting_with(/{{/).until_after(/}}/),django_comment:z.starting_with(/{#/).until_after(/#}/),smarty:z.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:z.starting_with(/{\*/).until_after(/\*}/),smarty_literal:z.starting_with(/{literal}/).until_after(/{\/literal}/)}}S.prototype=new L,S.prototype._create=function(){return new S(this._input,this)},S.prototype._update=function(){this.__set_templated_pattern()},S.prototype.disable=function(T){var B=this._create();return B._disabled[T]=!0,B._update(),B},S.prototype.read_options=function(T){var B=this._create();for(var z in b)B._disabled[z]=T.templating.indexOf(z)===-1;return B._update(),B},S.prototype.exclude=function(T){var B=this._create();return B._excluded[T]=!0,B._update(),B},S.prototype.read=function(){var T="";this._match_pattern?T=this._input.read(this._starting_pattern):T=this._input.read(this._starting_pattern,this.__template_pattern);for(var B=this._read_template();B;)this._match_pattern?B+=this._input.read(this._match_pattern):B+=this._input.readUntil(this.__template_pattern),T+=B,B=this._read_template();return this._until_after&&(T+=this._input.readUntilAfter(this._until_pattern)),T},S.prototype.__set_templated_pattern=function(){var T=[];this._disabled.php||T.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||T.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||T.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||T.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(T.push(this.__patterns.django._starting_pattern.source),T.push(this.__patterns.django_value._starting_pattern.source),T.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||T.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&T.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+T.join("|")+")")},S.prototype._read_template=function(){var T="",B=this._input.peek();if(B==="<"){var z=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&z==="?"&&(T=T||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&z==="%"&&(T=T||this.__patterns.erb.read())}else B==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(T=T||this.__patterns.handlebars_comment.read(),T=T||this.__patterns.handlebars_unescaped.read(),T=T||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(T=T||this.__patterns.django_value.read()),this._excluded.django||(T=T||this.__patterns.django_comment.read(),T=T||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(T=T||this.__patterns.smarty_comment.read(),T=T||this.__patterns.smarty_literal.read(),T=T||this.__patterns.smarty.read()));return T},X.exports.TemplatablePattern=S}],F={};function g(X){var o=F[X];if(o!==void 0)return o.exports;var x=F[X]={exports:{}};return ie[X](x,x.exports,g),x.exports}var J=g(0);ee=J})();var $=ee;m=[],c=function(){return{js_beautify:$}}.apply(We,m),c!==void 0&&(un.exports=c)})()},15342:function(un){(function(m,c){un.exports=c()})(typeof self!="undefined"?self:this,function(){return function(We){var m={};function c(ee){if(m[ee])return m[ee].exports;var $=m[ee]={i:ee,l:!1,exports:{}};return We[ee].call($.exports,$,$.exports,c),$.l=!0,$.exports}return c.m=We,c.c=m,c.d=function(ee,$,ie){c.o(ee,$)||Object.defineProperty(ee,$,{enumerable:!0,get:ie})},c.r=function(ee){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ee,"__esModule",{value:!0})},c.t=function(ee,$){if($&1&&(ee=c(ee)),$&8||$&4&&typeof ee=="object"&&ee&&ee.__esModule)return ee;var ie=Object.create(null);if(c.r(ie),Object.defineProperty(ie,"default",{enumerable:!0,value:ee}),$&2&&typeof ee!="string")for(var F in ee)c.d(ie,F,function(g){return ee[g]}.bind(null,F));return ie},c.n=function(ee){var $=ee&&ee.__esModule?function(){return ee.default}:function(){return ee};return c.d($,"a",$),$},c.o=function(ee,$){return Object.prototype.hasOwnProperty.call(ee,$)},c.p="",c(c.s=1)}([function(We,m,c){},function(We,m,c){"use strict";c.r(m);var ee=c(0),$=function(){function N(l,d,f){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=l,this.start=d,this.end=f}return N.range=function(d,f){return f?!d||!d.loc||!f.loc||d.loc.lexer!==f.loc.lexer?null:new N(d.loc.lexer,d.loc.start,f.loc.end):d&&d.loc},N}(),ie=function(){function N(d,f){this.text=void 0,this.loc=void 0,this.text=d,this.loc=f}var l=N.prototype;return l.range=function(f,y){return new N(y,$.range(this,f))},N}(),F=function N(l,d){this.position=void 0;var f="KaTeX parse error: "+l,y,R=d&&d.loc;if(R&&R.start<=R.end){var H=R.lexer.input;y=R.start;var ve=R.end;y===H.length?f+=" at end of input: ":f+=" at position "+(y+1)+": ";var Te=H.slice(y,ve).replace(/[^]/g,"$&\u0332"),Ke;y>15?Ke="\u2026"+H.slice(y-15,y):Ke=H.slice(0,y);var pt;ve+15<H.length?pt=H.slice(ve,ve+15)+"\u2026":pt=H.slice(ve),f+=Ke+Te+pt}var Dt=new Error(f);return Dt.name="ParseError",Dt.__proto__=N.prototype,Dt.position=y,Dt};F.prototype.__proto__=Error.prototype;var g=F,J=function(l,d){return l.indexOf(d)!==-1},X=function(l,d){return l===void 0?d:l},o=/([A-Z])/g,x=function(l){return l.replace(o,"-$1").toLowerCase()},L={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},b=/[&><"']/g;function S(N){return String(N).replace(b,function(l){return L[l]})}var T=function N(l){return l.type==="ordgroup"||l.type==="color"?l.body.length===1?N(l.body[0]):l:l.type==="font"?N(l.body):l},B=function(l){var d=T(l);return d.type==="mathord"||d.type==="textord"||d.type==="atom"},z=function(l){if(!l)throw new Error("Expected non-null, but got "+String(l));return l},j=function(l){var d=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(l);return d!=null?d[1]:"_relative"},U={contains:J,deflt:X,escape:S,hyphenate:x,getBaseElem:T,isCharacterBox:B,protocolFromUrl:j},A=function(){function N(d){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,d=d||{},this.displayMode=U.deflt(d.displayMode,!1),this.output=U.deflt(d.output,"htmlAndMathml"),this.leqno=U.deflt(d.leqno,!1),this.fleqn=U.deflt(d.fleqn,!1),this.throwOnError=U.deflt(d.throwOnError,!0),this.errorColor=U.deflt(d.errorColor,"#cc0000"),this.macros=d.macros||{},this.minRuleThickness=Math.max(0,U.deflt(d.minRuleThickness,0)),this.colorIsTextColor=U.deflt(d.colorIsTextColor,!1),this.strict=U.deflt(d.strict,"warn"),this.trust=U.deflt(d.trust,!1),this.maxSize=Math.max(0,U.deflt(d.maxSize,1/0)),this.maxExpand=Math.max(0,U.deflt(d.maxExpand,1e3))}var l=N.prototype;return l.reportNonstrict=function(f,y,R){var H=this.strict;if(typeof H=="function"&&(H=H(f,y,R)),!(!H||H==="ignore")){if(H===!0||H==="error")throw new g("LaTeX-incompatible input and strict mode is set to 'error': "+(y+" ["+f+"]"),R);H==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(y+" ["+f+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+H+"': "+y+" ["+f+"]"))}},l.useStrictBehavior=function(f,y,R){var H=this.strict;if(typeof H=="function")try{H=H(f,y,R)}catch(ve){H="error"}return!H||H==="ignore"?!1:H===!0||H==="error"?!0:H==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(y+" ["+f+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+H+"': "+y+" ["+f+"]")),!1)},l.isTrusted=function(f){f.url&&!f.protocol&&(f.protocol=U.protocolFromUrl(f.url));var y=typeof this.trust=="function"?this.trust(f):this.trust;return!!y},N}(),K=function(){function N(d,f,y){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=d,this.size=f,this.cramped=y}var l=N.prototype;return l.sup=function(){return He[ue[this.id]]},l.sub=function(){return He[W[this.id]]},l.fracNum=function(){return He[P[this.id]]},l.fracDen=function(){return He[de[this.id]]},l.cramp=function(){return He[ae[this.id]]},l.text=function(){return He[Q[this.id]]},l.isTight=function(){return this.size>=2},N}(),I=0,M=1,le=2,me=3,ce=4,De=5,Pe=6,Ce=7,He=[new K(I,0,!1),new K(M,0,!0),new K(le,1,!1),new K(me,1,!0),new K(ce,2,!1),new K(De,2,!0),new K(Pe,3,!1),new K(Ce,3,!0)],ue=[ce,De,ce,De,Pe,Ce,Pe,Ce],W=[De,De,De,De,Ce,Ce,Ce,Ce],P=[le,me,ce,De,Pe,Ce,Pe,Ce],de=[me,me,De,De,Ce,Ce,Ce,Ce],ae=[M,M,me,me,De,De,Ce,Ce],Q=[I,M,le,me,le,me,le,me],E={DISPLAY:He[I],TEXT:He[le],SCRIPT:He[ce],SCRIPTSCRIPT:He[Pe]},C=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Y(N){for(var l=0;l<C.length;l++)for(var d=C[l],f=0;f<d.blocks.length;f++){var y=d.blocks[f];if(N>=y[0]&&N<=y[1])return d.name}return null}var be=[];C.forEach(function(N){return N.blocks.forEach(function(l){return be.push.apply(be,l)})});function je(N){for(var l=0;l<be.length;l+=2)if(N>=be[l]&&N<=be[l+1])return!0;return!1}var lt=80,ke=function(l,d){return"M95,"+(622+l+d)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+l/2.075+" -"+l+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+l)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+l)+" "+d+"h400000v"+(40+l)+"h-400000z"},Ye=function(l,d){return"M263,"+(601+l+d)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+l/2.084+" -"+l+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+l)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+l)+" "+d+"h400000v"+(40+l)+"h-400000z"},et=function(l,d){return"M983 "+(10+l+d)+`
l`+l/3.13+" -"+l+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+l)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+l)+" "+d+"h400000v"+(40+l)+"h-400000z"},_t=function(l,d){return"M424,"+(2398+l+d)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+l/4.223+" -"+l+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+l)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+l)+" "+d+`
h400000v`+(40+l)+"h-400000z"},Re=function(l,d){return"M473,"+(2713+l+d)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+l/5.298+" -"+l+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+l)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+l)+" "+d+"h400000v"+(40+l)+"H1017.7z"},At=function(l,d,f){var y=f-54-d-l;return"M702 "+(l+d)+"H400000"+(40+l)+`
H742v`+y+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+d+"H400000v"+(40+l)+"H742z"},rt=function(l,d,f){d=1e3*d;var y="";switch(l){case"sqrtMain":y=ke(d,lt);break;case"sqrtSize1":y=Ye(d,lt);break;case"sqrtSize2":y=et(d,lt);break;case"sqrtSize3":y=_t(d,lt);break;case"sqrtSize4":y=Re(d,lt);break;case"sqrtTall":y=At(d,lt,f)}return y},Nt={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Xe=function(){function N(d){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=d,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var l=N.prototype;return l.hasClass=function(f){return U.contains(this.classes,f)},l.toNode=function(){for(var f=document.createDocumentFragment(),y=0;y<this.children.length;y++)f.appendChild(this.children[y].toNode());return f},l.toMarkup=function(){for(var f="",y=0;y<this.children.length;y++)f+=this.children[y].toMarkup();return f},l.toText=function(){var f=function(R){return R.toText()};return this.children.map(f).join("")},N}(),Ge=function(l){return l.filter(function(d){return d}).join(" ")},Ne=function(l,d,f){if(this.classes=l||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=f||{},d){d.style.isTight()&&this.classes.push("mtight");var y=d.getColor();y&&(this.style.color=y)}},Ie=function(l){var d=document.createElement(l);d.className=Ge(this.classes);for(var f in this.style)this.style.hasOwnProperty(f)&&(d.style[f]=this.style[f]);for(var y in this.attributes)this.attributes.hasOwnProperty(y)&&d.setAttribute(y,this.attributes[y]);for(var R=0;R<this.children.length;R++)d.appendChild(this.children[R].toNode());return d},te=function(l){var d="<"+l;this.classes.length&&(d+=' class="'+U.escape(Ge(this.classes))+'"');var f="";for(var y in this.style)this.style.hasOwnProperty(y)&&(f+=U.hyphenate(y)+":"+this.style[y]+";");f&&(d+=' style="'+U.escape(f)+'"');for(var R in this.attributes)this.attributes.hasOwnProperty(R)&&(d+=" "+R+'="'+U.escape(this.attributes[R])+'"');d+=">";for(var H=0;H<this.children.length;H++)d+=this.children[H].toMarkup();return d+="</"+l+">",d},$e=function(){function N(d,f,y,R){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Ne.call(this,d,y,R),this.children=f||[]}var l=N.prototype;return l.setAttribute=function(f,y){this.attributes[f]=y},l.hasClass=function(f){return U.contains(this.classes,f)},l.toNode=function(){return Ie.call(this,"span")},l.toMarkup=function(){return te.call(this,"span")},N}(),Ae=function(){function N(d,f,y,R){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Ne.call(this,f,R),this.children=y||[],this.setAttribute("href",d)}var l=N.prototype;return l.setAttribute=function(f,y){this.attributes[f]=y},l.hasClass=function(f){return U.contains(this.classes,f)},l.toNode=function(){return Ie.call(this,"a")},l.toMarkup=function(){return te.call(this,"a")},N}(),Z=function(){function N(d,f,y){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=f,this.src=d,this.classes=["mord"],this.style=y}var l=N.prototype;return l.hasClass=function(f){return U.contains(this.classes,f)},l.toNode=function(){var f=document.createElement("img");f.src=this.src,f.alt=this.alt,f.className="mord";for(var y in this.style)this.style.hasOwnProperty(y)&&(f.style[y]=this.style[y]);return f},l.toMarkup=function(){var f="<img src='"+this.src+" 'alt='"+this.alt+"' ",y="";for(var R in this.style)this.style.hasOwnProperty(R)&&(y+=U.hyphenate(R)+":"+this.style[R]+";");return y&&(f+=' style="'+U.escape(y)+'"'),f+="'/>",f},N}(),D={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},he=function(){function N(d,f,y,R,H,ve,Te,Ke){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=d,this.height=f||0,this.depth=y||0,this.italic=R||0,this.skew=H||0,this.width=ve||0,this.classes=Te||[],this.style=Ke||{},this.maxFontSize=0;var pt=Y(this.text.charCodeAt(0));pt&&this.classes.push(pt+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=D[this.text])}var l=N.prototype;return l.hasClass=function(f){return U.contains(this.classes,f)},l.toNode=function(){var f=document.createTextNode(this.text),y=null;this.italic>0&&(y=document.createElement("span"),y.style.marginRight=this.italic+"em"),this.classes.length>0&&(y=y||document.createElement("span"),y.className=Ge(this.classes));for(var R in this.style)this.style.hasOwnProperty(R)&&(y=y||document.createElement("span"),y.style[R]=this.style[R]);return y?(y.appendChild(f),y):f},l.toMarkup=function(){var f=!1,y="<span";this.classes.length&&(f=!0,y+=' class="',y+=U.escape(Ge(this.classes)),y+='"');var R="";this.italic>0&&(R+="margin-right:"+this.italic+"em;");for(var H in this.style)this.style.hasOwnProperty(H)&&(R+=U.hyphenate(H)+":"+this.style[H]+";");R&&(f=!0,y+=' style="'+U.escape(R)+'"');var ve=U.escape(this.text);return f?(y+=">",y+=ve,y+="</span>",y):ve},N}(),_e=function(){function N(d,f){this.children=void 0,this.attributes=void 0,this.children=d||[],this.attributes=f||{}}var l=N.prototype;return l.toNode=function(){var f="http://www.w3.org/2000/svg",y=document.createElementNS(f,"svg");for(var R in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,R)&&y.setAttribute(R,this.attributes[R]);for(var H=0;H<this.children.length;H++)y.appendChild(this.children[H].toNode());return y},l.toMarkup=function(){var f="<svg";for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&(f+=" "+y+"='"+this.attributes[y]+"'");f+=">";for(var R=0;R<this.children.length;R++)f+=this.children[R].toMarkup();return f+="</svg>",f},N}(),pe=function(){function N(d,f){this.pathName=void 0,this.alternate=void 0,this.pathName=d,this.alternate=f}var l=N.prototype;return l.toNode=function(){var f="http://www.w3.org/2000/svg",y=document.createElementNS(f,"path");return this.alternate?y.setAttribute("d",this.alternate):y.setAttribute("d",Nt[this.pathName]),y},l.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+Nt[this.pathName]+"'/>"},N}(),Ee=function(){function N(d){this.attributes=void 0,this.attributes=d||{}}var l=N.prototype;return l.toNode=function(){var f="http://www.w3.org/2000/svg",y=document.createElementNS(f,"line");for(var R in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,R)&&y.setAttribute(R,this.attributes[R]);return y},l.toMarkup=function(){var f="<line";for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&(f+=" "+y+"='"+this.attributes[y]+"'");return f+="/>",f},N}();function Oe(N){if(N instanceof he)return N;throw new Error("Expected symbolNode but got "+String(N)+".")}function Ze(N){if(N instanceof $e)return N;throw new Error("Expected span<HtmlDomNode> but got "+String(N)+".")}var re={"AMS-Regular":{65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473]},"Fraktur-Regular":{33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],163:[0,.69444,0,0,.86853],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],163:[0,.69444,0,0,.76909],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],305:[0,.43056,0,.02778,.32246],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],567:[.19444,.43056,0,.08334,.38403],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,1],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.67,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.744,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.744,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333]},"Math-Italic":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"Math-Regular":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"SansSerif-Bold":{33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212]},"Size1-Regular":{40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},fe={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},st={\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function tt(N,l){re[N]=l}function ct(N,l,d){if(!re[l])throw new Error("Font metrics not found for font: "+l+".");var f=N.charCodeAt(0),y=re[l][f];if(!y&&N[0]in st&&(f=st[N[0]].charCodeAt(0),y=re[l][f]),!y&&d==="text"&&je(f)&&(y=re[l][77]),y)return{depth:y[0],height:y[1],italic:y[2],skew:y[3],width:y[4]}}var ut={};function Ue(N){var l;if(N>=5?l=0:N>=3?l=1:l=2,!ut[l]){var d=ut[l]={cssEmPerMu:fe.quad[l]/18};for(var f in fe)fe.hasOwnProperty(f)&&(d[f]=fe[f][l])}return ut[l]}var xt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},dt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},gt={math:{},text:{}},kt=gt;function w(N,l,d,f,y,R){gt[N][y]={font:l,group:d,replace:f},R&&f&&(gt[N][f]=gt[N][y])}var O="math",qe="text",oe="main",xe="ams",jt="accent-token",Qe="bin",at="close",bt="inner",ge="mathord",ye="op-token",Fe="open",ze="punct",q="rel",Mt="spacing",Be="textord";w(O,oe,q,"\u2261","\\equiv",!0),w(O,oe,q,"\u227A","\\prec",!0),w(O,oe,q,"\u227B","\\succ",!0),w(O,oe,q,"\u223C","\\sim",!0),w(O,oe,q,"\u22A5","\\perp"),w(O,oe,q,"\u2AAF","\\preceq",!0),w(O,oe,q,"\u2AB0","\\succeq",!0),w(O,oe,q,"\u2243","\\simeq",!0),w(O,oe,q,"\u2223","\\mid",!0),w(O,oe,q,"\u226A","\\ll",!0),w(O,oe,q,"\u226B","\\gg",!0),w(O,oe,q,"\u224D","\\asymp",!0),w(O,oe,q,"\u2225","\\parallel"),w(O,oe,q,"\u22C8","\\bowtie",!0),w(O,oe,q,"\u2323","\\smile",!0),w(O,oe,q,"\u2291","\\sqsubseteq",!0),w(O,oe,q,"\u2292","\\sqsupseteq",!0),w(O,oe,q,"\u2250","\\doteq",!0),w(O,oe,q,"\u2322","\\frown",!0),w(O,oe,q,"\u220B","\\ni",!0),w(O,oe,q,"\u221D","\\propto",!0),w(O,oe,q,"\u22A2","\\vdash",!0),w(O,oe,q,"\u22A3","\\dashv",!0),w(O,oe,q,"\u220B","\\owns"),w(O,oe,ze,".","\\ldotp"),w(O,oe,ze,"\u22C5","\\cdotp"),w(O,oe,Be,"#","\\#"),w(qe,oe,Be,"#","\\#"),w(O,oe,Be,"&","\\&"),w(qe,oe,Be,"&","\\&"),w(O,oe,Be,"\u2135","\\aleph",!0),w(O,oe,Be,"\u2200","\\forall",!0),w(O,oe,Be,"\u210F","\\hbar",!0),w(O,oe,Be,"\u2203","\\exists",!0),w(O,oe,Be,"\u2207","\\nabla",!0),w(O,oe,Be,"\u266D","\\flat",!0),w(O,oe,Be,"\u2113","\\ell",!0),w(O,oe,Be,"\u266E","\\natural",!0),w(O,oe,Be,"\u2663","\\clubsuit",!0),w(O,oe,Be,"\u2118","\\wp",!0),w(O,oe,Be,"\u266F","\\sharp",!0),w(O,oe,Be,"\u2662","\\diamondsuit",!0),w(O,oe,Be,"\u211C","\\Re",!0),w(O,oe,Be,"\u2661","\\heartsuit",!0),w(O,oe,Be,"\u2111","\\Im",!0),w(O,oe,Be,"\u2660","\\spadesuit",!0),w(qe,oe,Be,"\xA7","\\S",!0),w(qe,oe,Be,"\xB6","\\P",!0),w(O,oe,Be,"\u2020","\\dag"),w(qe,oe,Be,"\u2020","\\dag"),w(qe,oe,Be,"\u2020","\\textdagger"),w(O,oe,Be,"\u2021","\\ddag"),w(qe,oe,Be,"\u2021","\\ddag"),w(qe,oe,Be,"\u2021","\\textdaggerdbl"),w(O,oe,at,"\u23B1","\\rmoustache",!0),w(O,oe,Fe,"\u23B0","\\lmoustache",!0),w(O,oe,at,"\u27EF","\\rgroup",!0),w(O,oe,Fe,"\u27EE","\\lgroup",!0),w(O,oe,Qe,"\u2213","\\mp",!0),w(O,oe,Qe,"\u2296","\\ominus",!0),w(O,oe,Qe,"\u228E","\\uplus",!0),w(O,oe,Qe,"\u2293","\\sqcap",!0),w(O,oe,Qe,"\u2217","\\ast"),w(O,oe,Qe,"\u2294","\\sqcup",!0),w(O,oe,Qe,"\u25EF","\\bigcirc"),w(O,oe,Qe,"\u2219","\\bullet"),w(O,oe,Qe,"\u2021","\\ddagger"),w(O,oe,Qe,"\u2240","\\wr",!0),w(O,oe,Qe,"\u2A3F","\\amalg"),w(O,oe,Qe,"&","\\And"),w(O,oe,q,"\u27F5","\\longleftarrow",!0),w(O,oe,q,"\u21D0","\\Leftarrow",!0),w(O,oe,q,"\u27F8","\\Longleftarrow",!0),w(O,oe,q,"\u27F6","\\longrightarrow",!0),w(O,oe,q,"\u21D2","\\Rightarrow",!0),w(O,oe,q,"\u27F9","\\Longrightarrow",!0),w(O,oe,q,"\u2194","\\leftrightarrow",!0),w(O,oe,q,"\u27F7","\\longleftrightarrow",!0),w(O,oe,q,"\u21D4","\\Leftrightarrow",!0),w(O,oe,q,"\u27FA","\\Longleftrightarrow",!0),w(O,oe,q,"\u21A6","\\mapsto",!0),w(O,oe,q,"\u27FC","\\longmapsto",!0),w(O,oe,q,"\u2197","\\nearrow",!0),w(O,oe,q,"\u21A9","\\hookleftarrow",!0),w(O,oe,q,"\u21AA","\\hookrightarrow",!0),w(O,oe,q,"\u2198","\\searrow",!0),w(O,oe,q,"\u21BC","\\leftharpoonup",!0),w(O,oe,q,"\u21C0","\\rightharpoonup",!0),w(O,oe,q,"\u2199","\\swarrow",!0),w(O,oe,q,"\u21BD","\\leftharpoondown",!0),w(O,oe,q,"\u21C1","\\rightharpoondown",!0),w(O,oe,q,"\u2196","\\nwarrow",!0),w(O,oe,q,"\u21CC","\\rightleftharpoons",!0),w(O,xe,q,"\u226E","\\nless",!0),w(O,xe,q,"\uE010","\\@nleqslant"),w(O,xe,q,"\uE011","\\@nleqq"),w(O,xe,q,"\u2A87","\\lneq",!0),w(O,xe,q,"\u2268","\\lneqq",!0),w(O,xe,q,"\uE00C","\\@lvertneqq"),w(O,xe,q,"\u22E6","\\lnsim",!0),w(O,xe,q,"\u2A89","\\lnapprox",!0),w(O,xe,q,"\u2280","\\nprec",!0),w(O,xe,q,"\u22E0","\\npreceq",!0),w(O,xe,q,"\u22E8","\\precnsim",!0),w(O,xe,q,"\u2AB9","\\precnapprox",!0),w(O,xe,q,"\u2241","\\nsim",!0),w(O,xe,q,"\uE006","\\@nshortmid"),w(O,xe,q,"\u2224","\\nmid",!0),w(O,xe,q,"\u22AC","\\nvdash",!0),w(O,xe,q,"\u22AD","\\nvDash",!0),w(O,xe,q,"\u22EA","\\ntriangleleft"),w(O,xe,q,"\u22EC","\\ntrianglelefteq",!0),w(O,xe,q,"\u228A","\\subsetneq",!0),w(O,xe,q,"\uE01A","\\@varsubsetneq"),w(O,xe,q,"\u2ACB","\\subsetneqq",!0),w(O,xe,q,"\uE017","\\@varsubsetneqq"),w(O,xe,q,"\u226F","\\ngtr",!0),w(O,xe,q,"\uE00F","\\@ngeqslant"),w(O,xe,q,"\uE00E","\\@ngeqq"),w(O,xe,q,"\u2A88","\\gneq",!0),w(O,xe,q,"\u2269","\\gneqq",!0),w(O,xe,q,"\uE00D","\\@gvertneqq"),w(O,xe,q,"\u22E7","\\gnsim",!0),w(O,xe,q,"\u2A8A","\\gnapprox",!0),w(O,xe,q,"\u2281","\\nsucc",!0),w(O,xe,q,"\u22E1","\\nsucceq",!0),w(O,xe,q,"\u22E9","\\succnsim",!0),w(O,xe,q,"\u2ABA","\\succnapprox",!0),w(O,xe,q,"\u2246","\\ncong",!0),w(O,xe,q,"\uE007","\\@nshortparallel"),w(O,xe,q,"\u2226","\\nparallel",!0),w(O,xe,q,"\u22AF","\\nVDash",!0),w(O,xe,q,"\u22EB","\\ntriangleright"),w(O,xe,q,"\u22ED","\\ntrianglerighteq",!0),w(O,xe,q,"\uE018","\\@nsupseteqq"),w(O,xe,q,"\u228B","\\supsetneq",!0),w(O,xe,q,"\uE01B","\\@varsupsetneq"),w(O,xe,q,"\u2ACC","\\supsetneqq",!0),w(O,xe,q,"\uE019","\\@varsupsetneqq"),w(O,xe,q,"\u22AE","\\nVdash",!0),w(O,xe,q,"\u2AB5","\\precneqq",!0),w(O,xe,q,"\u2AB6","\\succneqq",!0),w(O,xe,q,"\uE016","\\@nsubseteqq"),w(O,xe,Qe,"\u22B4","\\unlhd"),w(O,xe,Qe,"\u22B5","\\unrhd"),w(O,xe,q,"\u219A","\\nleftarrow",!0),w(O,xe,q,"\u219B","\\nrightarrow",!0),w(O,xe,q,"\u21CD","\\nLeftarrow",!0),w(O,xe,q,"\u21CF","\\nRightarrow",!0),w(O,xe,q,"\u21AE","\\nleftrightarrow",!0),w(O,xe,q,"\u21CE","\\nLeftrightarrow",!0),w(O,xe,q,"\u25B3","\\vartriangle"),w(O,xe,Be,"\u210F","\\hslash"),w(O,xe,Be,"\u25BD","\\triangledown"),w(O,xe,Be,"\u25CA","\\lozenge"),w(O,xe,Be,"\u24C8","\\circledS"),w(O,xe,Be,"\xAE","\\circledR"),w(qe,xe,Be,"\xAE","\\circledR"),w(O,xe,Be,"\u2221","\\measuredangle",!0),w(O,xe,Be,"\u2204","\\nexists"),w(O,xe,Be,"\u2127","\\mho"),w(O,xe,Be,"\u2132","\\Finv",!0),w(O,xe,Be,"\u2141","\\Game",!0),w(O,xe,Be,"\u2035","\\backprime"),w(O,xe,Be,"\u25B2","\\blacktriangle"),w(O,xe,Be,"\u25BC","\\blacktriangledown"),w(O,xe,Be,"\u25A0","\\blacksquare"),w(O,xe,Be,"\u29EB","\\blacklozenge"),w(O,xe,Be,"\u2605","\\bigstar"),w(O,xe,Be,"\u2222","\\sphericalangle",!0),w(O,xe,Be,"\u2201","\\complement",!0),w(O,xe,Be,"\xF0","\\eth",!0),w(O,xe,Be,"\u2571","\\diagup"),w(O,xe,Be,"\u2572","\\diagdown"),w(O,xe,Be,"\u25A1","\\square"),w(O,xe,Be,"\u25A1","\\Box"),w(O,xe,Be,"\u25CA","\\Diamond"),w(O,xe,Be,"\xA5","\\yen",!0),w(qe,xe,Be,"\xA5","\\yen",!0),w(O,xe,Be,"\u2713","\\checkmark",!0),w(qe,xe,Be,"\u2713","\\checkmark"),w(O,xe,Be,"\u2136","\\beth",!0),w(O,xe,Be,"\u2138","\\daleth",!0),w(O,xe,Be,"\u2137","\\gimel",!0),w(O,xe,Be,"\u03DD","\\digamma",!0),w(O,xe,Be,"\u03F0","\\varkappa"),w(O,xe,Fe,"\u250C","\\ulcorner",!0),w(O,xe,at,"\u2510","\\urcorner",!0),w(O,xe,Fe,"\u2514","\\llcorner",!0),w(O,xe,at,"\u2518","\\lrcorner",!0),w(O,xe,q,"\u2266","\\leqq",!0),w(O,xe,q,"\u2A7D","\\leqslant",!0),w(O,xe,q,"\u2A95","\\eqslantless",!0),w(O,xe,q,"\u2272","\\lesssim",!0),w(O,xe,q,"\u2A85","\\lessapprox",!0),w(O,xe,q,"\u224A","\\approxeq",!0),w(O,xe,Qe,"\u22D6","\\lessdot"),w(O,xe,q,"\u22D8","\\lll",!0),w(O,xe,q,"\u2276","\\lessgtr",!0),w(O,xe,q,"\u22DA","\\lesseqgtr",!0),w(O,xe,q,"\u2A8B","\\lesseqqgtr",!0),w(O,xe,q,"\u2251","\\doteqdot"),w(O,xe,q,"\u2253","\\risingdotseq",!0),w(O,xe,q,"\u2252","\\fallingdotseq",!0),w(O,xe,q,"\u223D","\\backsim",!0),w(O,xe,q,"\u22CD","\\backsimeq",!0),w(O,xe,q,"\u2AC5","\\subseteqq",!0),w(O,xe,q,"\u22D0","\\Subset",!0),w(O,xe,q,"\u228F","\\sqsubset",!0),w(O,xe,q,"\u227C","\\preccurlyeq",!0),w(O,xe,q,"\u22DE","\\curlyeqprec",!0),w(O,xe,q,"\u227E","\\precsim",!0),w(O,xe,q,"\u2AB7","\\precapprox",!0),w(O,xe,q,"\u22B2","\\vartriangleleft"),w(O,xe,q,"\u22B4","\\trianglelefteq"),w(O,xe,q,"\u22A8","\\vDash",!0),w(O,xe,q,"\u22AA","\\Vvdash",!0),w(O,xe,q,"\u2323","\\smallsmile"),w(O,xe,q,"\u2322","\\smallfrown"),w(O,xe,q,"\u224F","\\bumpeq",!0),w(O,xe,q,"\u224E","\\Bumpeq",!0),w(O,xe,q,"\u2267","\\geqq",!0),w(O,xe,q,"\u2A7E","\\geqslant",!0),w(O,xe,q,"\u2A96","\\eqslantgtr",!0),w(O,xe,q,"\u2273","\\gtrsim",!0),w(O,xe,q,"\u2A86","\\gtrapprox",!0),w(O,xe,Qe,"\u22D7","\\gtrdot"),w(O,xe,q,"\u22D9","\\ggg",!0),w(O,xe,q,"\u2277","\\gtrless",!0),w(O,xe,q,"\u22DB","\\gtreqless",!0),w(O,xe,q,"\u2A8C","\\gtreqqless",!0),w(O,xe,q,"\u2256","\\eqcirc",!0),w(O,xe,q,"\u2257","\\circeq",!0),w(O,xe,q,"\u225C","\\triangleq",!0),w(O,xe,q,"\u223C","\\thicksim"),w(O,xe,q,"\u2248","\\thickapprox"),w(O,xe,q,"\u2AC6","\\supseteqq",!0),w(O,xe,q,"\u22D1","\\Supset",!0),w(O,xe,q,"\u2290","\\sqsupset",!0),w(O,xe,q,"\u227D","\\succcurlyeq",!0),w(O,xe,q,"\u22DF","\\curlyeqsucc",!0),w(O,xe,q,"\u227F","\\succsim",!0),w(O,xe,q,"\u2AB8","\\succapprox",!0),w(O,xe,q,"\u22B3","\\vartriangleright"),w(O,xe,q,"\u22B5","\\trianglerighteq"),w(O,xe,q,"\u22A9","\\Vdash",!0),w(O,xe,q,"\u2223","\\shortmid"),w(O,xe,q,"\u2225","\\shortparallel"),w(O,xe,q,"\u226C","\\between",!0),w(O,xe,q,"\u22D4","\\pitchfork",!0),w(O,xe,q,"\u221D","\\varpropto"),w(O,xe,q,"\u25C0","\\blacktriangleleft"),w(O,xe,q,"\u2234","\\therefore",!0),w(O,xe,q,"\u220D","\\backepsilon"),w(O,xe,q,"\u25B6","\\blacktriangleright"),w(O,xe,q,"\u2235","\\because",!0),w(O,xe,q,"\u22D8","\\llless"),w(O,xe,q,"\u22D9","\\gggtr"),w(O,xe,Qe,"\u22B2","\\lhd"),w(O,xe,Qe,"\u22B3","\\rhd"),w(O,xe,q,"\u2242","\\eqsim",!0),w(O,oe,q,"\u22C8","\\Join"),w(O,xe,q,"\u2251","\\Doteq",!0),w(O,xe,Qe,"\u2214","\\dotplus",!0),w(O,xe,Qe,"\u2216","\\smallsetminus"),w(O,xe,Qe,"\u22D2","\\Cap",!0),w(O,xe,Qe,"\u22D3","\\Cup",!0),w(O,xe,Qe,"\u2A5E","\\doublebarwedge",!0),w(O,xe,Qe,"\u229F","\\boxminus",!0),w(O,xe,Qe,"\u229E","\\boxplus",!0),w(O,xe,Qe,"\u22C7","\\divideontimes",!0),w(O,xe,Qe,"\u22C9","\\ltimes",!0),w(O,xe,Qe,"\u22CA","\\rtimes",!0),w(O,xe,Qe,"\u22CB","\\leftthreetimes",!0),w(O,xe,Qe,"\u22CC","\\rightthreetimes",!0),w(O,xe,Qe,"\u22CF","\\curlywedge",!0),w(O,xe,Qe,"\u22CE","\\curlyvee",!0),w(O,xe,Qe,"\u229D","\\circleddash",!0),w(O,xe,Qe,"\u229B","\\circledast",!0),w(O,xe,Qe,"\u22C5","\\centerdot"),w(O,xe,Qe,"\u22BA","\\intercal",!0),w(O,xe,Qe,"\u22D2","\\doublecap"),w(O,xe,Qe,"\u22D3","\\doublecup"),w(O,xe,Qe,"\u22A0","\\boxtimes",!0),w(O,xe,q,"\u21E2","\\dashrightarrow",!0),w(O,xe,q,"\u21E0","\\dashleftarrow",!0),w(O,xe,q,"\u21C7","\\leftleftarrows",!0),w(O,xe,q,"\u21C6","\\leftrightarrows",!0),w(O,xe,q,"\u21DA","\\Lleftarrow",!0),w(O,xe,q,"\u219E","\\twoheadleftarrow",!0),w(O,xe,q,"\u21A2","\\leftarrowtail",!0),w(O,xe,q,"\u21AB","\\looparrowleft",!0),w(O,xe,q,"\u21CB","\\leftrightharpoons",!0),w(O,xe,q,"\u21B6","\\curvearrowleft",!0),w(O,xe,q,"\u21BA","\\circlearrowleft",!0),w(O,xe,q,"\u21B0","\\Lsh",!0),w(O,xe,q,"\u21C8","\\upuparrows",!0),w(O,xe,q,"\u21BF","\\upharpoonleft",!0),w(O,xe,q,"\u21C3","\\downharpoonleft",!0),w(O,xe,q,"\u22B8","\\multimap",!0),w(O,xe,q,"\u21AD","\\leftrightsquigarrow",!0),w(O,xe,q,"\u21C9","\\rightrightarrows",!0),w(O,xe,q,"\u21C4","\\rightleftarrows",!0),w(O,xe,q,"\u21A0","\\twoheadrightarrow",!0),w(O,xe,q,"\u21A3","\\rightarrowtail",!0),w(O,xe,q,"\u21AC","\\looparrowright",!0),w(O,xe,q,"\u21B7","\\curvearrowright",!0),w(O,xe,q,"\u21BB","\\circlearrowright",!0),w(O,xe,q,"\u21B1","\\Rsh",!0),w(O,xe,q,"\u21CA","\\downdownarrows",!0),w(O,xe,q,"\u21BE","\\upharpoonright",!0),w(O,xe,q,"\u21C2","\\downharpoonright",!0),w(O,xe,q,"\u21DD","\\rightsquigarrow",!0),w(O,xe,q,"\u21DD","\\leadsto"),w(O,xe,q,"\u21DB","\\Rrightarrow",!0),w(O,xe,q,"\u21BE","\\restriction"),w(O,oe,Be,"\u2018","`"),w(O,oe,Be,"$","\\$"),w(qe,oe,Be,"$","\\$"),w(qe,oe,Be,"$","\\textdollar"),w(O,oe,Be,"%","\\%"),w(qe,oe,Be,"%","\\%"),w(O,oe,Be,"_","\\_"),w(qe,oe,Be,"_","\\_"),w(qe,oe,Be,"_","\\textunderscore"),w(O,oe,Be,"\u2220","\\angle",!0),w(O,oe,Be,"\u221E","\\infty",!0),w(O,oe,Be,"\u2032","\\prime"),w(O,oe,Be,"\u25B3","\\triangle"),w(O,oe,Be,"\u0393","\\Gamma",!0),w(O,oe,Be,"\u0394","\\Delta",!0),w(O,oe,Be,"\u0398","\\Theta",!0),w(O,oe,Be,"\u039B","\\Lambda",!0),w(O,oe,Be,"\u039E","\\Xi",!0),w(O,oe,Be,"\u03A0","\\Pi",!0),w(O,oe,Be,"\u03A3","\\Sigma",!0),w(O,oe,Be,"\u03A5","\\Upsilon",!0),w(O,oe,Be,"\u03A6","\\Phi",!0),w(O,oe,Be,"\u03A8","\\Psi",!0),w(O,oe,Be,"\u03A9","\\Omega",!0),w(O,oe,Be,"A","\u0391"),w(O,oe,Be,"B","\u0392"),w(O,oe,Be,"E","\u0395"),w(O,oe,Be,"Z","\u0396"),w(O,oe,Be,"H","\u0397"),w(O,oe,Be,"I","\u0399"),w(O,oe,Be,"K","\u039A"),w(O,oe,Be,"M","\u039C"),w(O,oe,Be,"N","\u039D"),w(O,oe,Be,"O","\u039F"),w(O,oe,Be,"P","\u03A1"),w(O,oe,Be,"T","\u03A4"),w(O,oe,Be,"X","\u03A7"),w(O,oe,Be,"\xAC","\\neg",!0),w(O,oe,Be,"\xAC","\\lnot"),w(O,oe,Be,"\u22A4","\\top"),w(O,oe,Be,"\u22A5","\\bot"),w(O,oe,Be,"\u2205","\\emptyset"),w(O,xe,Be,"\u2205","\\varnothing"),w(O,oe,ge,"\u03B1","\\alpha",!0),w(O,oe,ge,"\u03B2","\\beta",!0),w(O,oe,ge,"\u03B3","\\gamma",!0),w(O,oe,ge,"\u03B4","\\delta",!0),w(O,oe,ge,"\u03F5","\\epsilon",!0),w(O,oe,ge,"\u03B6","\\zeta",!0),w(O,oe,ge,"\u03B7","\\eta",!0),w(O,oe,ge,"\u03B8","\\theta",!0),w(O,oe,ge,"\u03B9","\\iota",!0),w(O,oe,ge,"\u03BA","\\kappa",!0),w(O,oe,ge,"\u03BB","\\lambda",!0),w(O,oe,ge,"\u03BC","\\mu",!0),w(O,oe,ge,"\u03BD","\\nu",!0),w(O,oe,ge,"\u03BE","\\xi",!0),w(O,oe,ge,"\u03BF","\\omicron",!0),w(O,oe,ge,"\u03C0","\\pi",!0),w(O,oe,ge,"\u03C1","\\rho",!0),w(O,oe,ge,"\u03C3","\\sigma",!0),w(O,oe,ge,"\u03C4","\\tau",!0),w(O,oe,ge,"\u03C5","\\upsilon",!0),w(O,oe,ge,"\u03D5","\\phi",!0),w(O,oe,ge,"\u03C7","\\chi",!0),w(O,oe,ge,"\u03C8","\\psi",!0),w(O,oe,ge,"\u03C9","\\omega",!0),w(O,oe,ge,"\u03B5","\\varepsilon",!0),w(O,oe,ge,"\u03D1","\\vartheta",!0),w(O,oe,ge,"\u03D6","\\varpi",!0),w(O,oe,ge,"\u03F1","\\varrho",!0),w(O,oe,ge,"\u03C2","\\varsigma",!0),w(O,oe,ge,"\u03C6","\\varphi",!0),w(O,oe,Qe,"\u2217","*"),w(O,oe,Qe,"+","+"),w(O,oe,Qe,"\u2212","-"),w(O,oe,Qe,"\u22C5","\\cdot",!0),w(O,oe,Qe,"\u2218","\\circ"),w(O,oe,Qe,"\xF7","\\div",!0),w(O,oe,Qe,"\xB1","\\pm",!0),w(O,oe,Qe,"\xD7","\\times",!0),w(O,oe,Qe,"\u2229","\\cap",!0),w(O,oe,Qe,"\u222A","\\cup",!0),w(O,oe,Qe,"\u2216","\\setminus"),w(O,oe,Qe,"\u2227","\\land"),w(O,oe,Qe,"\u2228","\\lor"),w(O,oe,Qe,"\u2227","\\wedge",!0),w(O,oe,Qe,"\u2228","\\vee",!0),w(O,oe,Be,"\u221A","\\surd"),w(O,oe,Fe,"(","("),w(O,oe,Fe,"[","["),w(O,oe,Fe,"\u27E8","\\langle",!0),w(O,oe,Fe,"\u2223","\\lvert"),w(O,oe,Fe,"\u2225","\\lVert"),w(O,oe,at,")",")"),w(O,oe,at,"]","]"),w(O,oe,at,"?","?"),w(O,oe,at,"!","!"),w(O,oe,at,"\u27E9","\\rangle",!0),w(O,oe,at,"\u2223","\\rvert"),w(O,oe,at,"\u2225","\\rVert"),w(O,oe,q,"=","="),w(O,oe,q,"<","<"),w(O,oe,q,">",">"),w(O,oe,q,":",":"),w(O,oe,q,"\u2248","\\approx",!0),w(O,oe,q,"\u2245","\\cong",!0),w(O,oe,q,"\u2265","\\ge"),w(O,oe,q,"\u2265","\\geq",!0),w(O,oe,q,"\u2190","\\gets"),w(O,oe,q,">","\\gt"),w(O,oe,q,"\u2208","\\in",!0),w(O,oe,q,"\uE020","\\@not"),w(O,oe,q,"\u2282","\\subset",!0),w(O,oe,q,"\u2283","\\supset",!0),w(O,oe,q,"\u2286","\\subseteq",!0),w(O,oe,q,"\u2287","\\supseteq",!0),w(O,xe,q,"\u2288","\\nsubseteq",!0),w(O,xe,q,"\u2289","\\nsupseteq",!0),w(O,oe,q,"\u22A8","\\models"),w(O,oe,q,"\u2190","\\leftarrow",!0),w(O,oe,q,"\u2264","\\le"),w(O,oe,q,"\u2264","\\leq",!0),w(O,oe,q,"<","\\lt"),w(O,oe,q,"\u2192","\\rightarrow",!0),w(O,oe,q,"\u2192","\\to"),w(O,xe,q,"\u2271","\\ngeq",!0),w(O,xe,q,"\u2270","\\nleq",!0),w(O,oe,Mt,"\xA0","\\ "),w(O,oe,Mt,"\xA0","~"),w(O,oe,Mt,"\xA0","\\space"),w(O,oe,Mt,"\xA0","\\nobreakspace"),w(qe,oe,Mt,"\xA0","\\ "),w(qe,oe,Mt,"\xA0","~"),w(qe,oe,Mt,"\xA0","\\space"),w(qe,oe,Mt,"\xA0","\\nobreakspace"),w(O,oe,Mt,null,"\\nobreak"),w(O,oe,Mt,null,"\\allowbreak"),w(O,oe,ze,",",","),w(O,oe,ze,";",";"),w(O,xe,Qe,"\u22BC","\\barwedge",!0),w(O,xe,Qe,"\u22BB","\\veebar",!0),w(O,oe,Qe,"\u2299","\\odot",!0),w(O,oe,Qe,"\u2295","\\oplus",!0),w(O,oe,Qe,"\u2297","\\otimes",!0),w(O,oe,Be,"\u2202","\\partial",!0),w(O,oe,Qe,"\u2298","\\oslash",!0),w(O,xe,Qe,"\u229A","\\circledcirc",!0),w(O,xe,Qe,"\u22A1","\\boxdot",!0),w(O,oe,Qe,"\u25B3","\\bigtriangleup"),w(O,oe,Qe,"\u25BD","\\bigtriangledown"),w(O,oe,Qe,"\u2020","\\dagger"),w(O,oe,Qe,"\u22C4","\\diamond"),w(O,oe,Qe,"\u22C6","\\star"),w(O,oe,Qe,"\u25C3","\\triangleleft"),w(O,oe,Qe,"\u25B9","\\triangleright"),w(O,oe,Fe,"{","\\{"),w(qe,oe,Be,"{","\\{"),w(qe,oe,Be,"{","\\textbraceleft"),w(O,oe,at,"}","\\}"),w(qe,oe,Be,"}","\\}"),w(qe,oe,Be,"}","\\textbraceright"),w(O,oe,Fe,"{","\\lbrace"),w(O,oe,at,"}","\\rbrace"),w(O,oe,Fe,"[","\\lbrack"),w(qe,oe,Be,"[","\\lbrack"),w(O,oe,at,"]","\\rbrack"),w(qe,oe,Be,"]","\\rbrack"),w(O,oe,Fe,"(","\\lparen"),w(O,oe,at,")","\\rparen"),w(qe,oe,Be,"<","\\textless"),w(qe,oe,Be,">","\\textgreater"),w(O,oe,Fe,"\u230A","\\lfloor",!0),w(O,oe,at,"\u230B","\\rfloor",!0),w(O,oe,Fe,"\u2308","\\lceil",!0),w(O,oe,at,"\u2309","\\rceil",!0),w(O,oe,Be,"\\","\\backslash"),w(O,oe,Be,"\u2223","|"),w(O,oe,Be,"\u2223","\\vert"),w(qe,oe,Be,"|","\\textbar"),w(O,oe,Be,"\u2225","\\|"),w(O,oe,Be,"\u2225","\\Vert"),w(qe,oe,Be,"\u2225","\\textbardbl"),w(qe,oe,Be,"~","\\textasciitilde"),w(qe,oe,Be,"\\","\\textbackslash"),w(qe,oe,Be,"^","\\textasciicircum"),w(O,oe,q,"\u2191","\\uparrow",!0),w(O,oe,q,"\u21D1","\\Uparrow",!0),w(O,oe,q,"\u2193","\\downarrow",!0),w(O,oe,q,"\u21D3","\\Downarrow",!0),w(O,oe,q,"\u2195","\\updownarrow",!0),w(O,oe,q,"\u21D5","\\Updownarrow",!0),w(O,oe,ye,"\u2210","\\coprod"),w(O,oe,ye,"\u22C1","\\bigvee"),w(O,oe,ye,"\u22C0","\\bigwedge"),w(O,oe,ye,"\u2A04","\\biguplus"),w(O,oe,ye,"\u22C2","\\bigcap"),w(O,oe,ye,"\u22C3","\\bigcup"),w(O,oe,ye,"\u222B","\\int"),w(O,oe,ye,"\u222B","\\intop"),w(O,oe,ye,"\u222C","\\iint"),w(O,oe,ye,"\u222D","\\iiint"),w(O,oe,ye,"\u220F","\\prod"),w(O,oe,ye,"\u2211","\\sum"),w(O,oe,ye,"\u2A02","\\bigotimes"),w(O,oe,ye,"\u2A01","\\bigoplus"),w(O,oe,ye,"\u2A00","\\bigodot"),w(O,oe,ye,"\u222E","\\oint"),w(O,oe,ye,"\u222F","\\oiint"),w(O,oe,ye,"\u2230","\\oiiint"),w(O,oe,ye,"\u2A06","\\bigsqcup"),w(O,oe,ye,"\u222B","\\smallint"),w(qe,oe,bt,"\u2026","\\textellipsis"),w(O,oe,bt,"\u2026","\\mathellipsis"),w(qe,oe,bt,"\u2026","\\ldots",!0),w(O,oe,bt,"\u2026","\\ldots",!0),w(O,oe,bt,"\u22EF","\\@cdots",!0),w(O,oe,bt,"\u22F1","\\ddots",!0),w(O,oe,Be,"\u22EE","\\varvdots"),w(O,oe,jt,"\u02CA","\\acute"),w(O,oe,jt,"\u02CB","\\grave"),w(O,oe,jt,"\xA8","\\ddot"),w(O,oe,jt,"~","\\tilde"),w(O,oe,jt,"\u02C9","\\bar"),w(O,oe,jt,"\u02D8","\\breve"),w(O,oe,jt,"\u02C7","\\check"),w(O,oe,jt,"^","\\hat"),w(O,oe,jt,"\u20D7","\\vec"),w(O,oe,jt,"\u02D9","\\dot"),w(O,oe,jt,"\u02DA","\\mathring"),w(O,oe,ge,"\u0131","\\imath",!0),w(O,oe,ge,"\u0237","\\jmath",!0),w(qe,oe,Be,"\u0131","\\i",!0),w(qe,oe,Be,"\u0237","\\j",!0),w(qe,oe,Be,"\xDF","\\ss",!0),w(qe,oe,Be,"\xE6","\\ae",!0),w(qe,oe,Be,"\xE6","\\ae",!0),w(qe,oe,Be,"\u0153","\\oe",!0),w(qe,oe,Be,"\xF8","\\o",!0),w(qe,oe,Be,"\xC6","\\AE",!0),w(qe,oe,Be,"\u0152","\\OE",!0),w(qe,oe,Be,"\xD8","\\O",!0),w(qe,oe,jt,"\u02CA","\\'"),w(qe,oe,jt,"\u02CB","\\`"),w(qe,oe,jt,"\u02C6","\\^"),w(qe,oe,jt,"\u02DC","\\~"),w(qe,oe,jt,"\u02C9","\\="),w(qe,oe,jt,"\u02D8","\\u"),w(qe,oe,jt,"\u02D9","\\."),w(qe,oe,jt,"\u02DA","\\r"),w(qe,oe,jt,"\u02C7","\\v"),w(qe,oe,jt,"\xA8",'\\"'),w(qe,oe,jt,"\u02DD","\\H"),w(qe,oe,jt,"\u25EF","\\textcircled");var Gt={"--":!0,"---":!0,"``":!0,"''":!0};w(qe,oe,Be,"\u2013","--"),w(qe,oe,Be,"\u2013","\\textendash"),w(qe,oe,Be,"\u2014","---"),w(qe,oe,Be,"\u2014","\\textemdash"),w(qe,oe,Be,"\u2018","`"),w(qe,oe,Be,"\u2018","\\textquoteleft"),w(qe,oe,Be,"\u2019","'"),w(qe,oe,Be,"\u2019","\\textquoteright"),w(qe,oe,Be,"\u201C","``"),w(qe,oe,Be,"\u201C","\\textquotedblleft"),w(qe,oe,Be,"\u201D","''"),w(qe,oe,Be,"\u201D","\\textquotedblright"),w(O,oe,Be,"\xB0","\\degree",!0),w(qe,oe,Be,"\xB0","\\degree"),w(qe,oe,Be,"\xB0","\\textdegree",!0),w(O,oe,ge,"\xA3","\\pounds"),w(O,oe,ge,"\xA3","\\mathsterling",!0),w(qe,oe,ge,"\xA3","\\pounds"),w(qe,oe,ge,"\xA3","\\textsterling",!0),w(O,xe,Be,"\u2720","\\maltese"),w(qe,xe,Be,"\u2720","\\maltese"),w(qe,oe,Mt,"\xA0","\\ "),w(qe,oe,Mt,"\xA0"," "),w(qe,oe,Mt,"\xA0","~");for(var pn='0123456789/@."',En=0;En<pn.length;En++){var sr=pn.charAt(En);w(O,oe,Be,sr,sr)}for(var Xn='0123456789!@*()-=+[]<>|";:?/.,',Wn=0;Wn<Xn.length;Wn++){var Cr=Xn.charAt(Wn);w(qe,oe,Be,Cr,Cr)}for(var Rr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Qn=0;Qn<Rr.length;Qn++){var gr=Rr.charAt(Qn);w(O,oe,ge,gr,gr),w(qe,oe,Be,gr,gr)}w(O,xe,Be,"C","\u2102"),w(qe,xe,Be,"C","\u2102"),w(O,xe,Be,"H","\u210D"),w(qe,xe,Be,"H","\u210D"),w(O,xe,Be,"N","\u2115"),w(qe,xe,Be,"N","\u2115"),w(O,xe,Be,"P","\u2119"),w(qe,xe,Be,"P","\u2119"),w(O,xe,Be,"Q","\u211A"),w(qe,xe,Be,"Q","\u211A"),w(O,xe,Be,"R","\u211D"),w(qe,xe,Be,"R","\u211D"),w(O,xe,Be,"Z","\u2124"),w(qe,xe,Be,"Z","\u2124"),w(O,oe,ge,"h","\u210E"),w(qe,oe,ge,"h","\u210E");for(var Cn="",tn=0;tn<Rr.length;tn++){var dn=Rr.charAt(tn);Cn=String.fromCharCode(55349,56320+tn),w(O,oe,ge,dn,Cn),w(qe,oe,Be,dn,Cn),Cn=String.fromCharCode(55349,56372+tn),w(O,oe,ge,dn,Cn),w(qe,oe,Be,dn,Cn),Cn=String.fromCharCode(55349,56424+tn),w(O,oe,ge,dn,Cn),w(qe,oe,Be,dn,Cn),Cn=String.fromCharCode(55349,56580+tn),w(O,oe,ge,dn,Cn),w(qe,oe,Be,dn,Cn),Cn=String.fromCharCode(55349,56736+tn),w(O,oe,ge,dn,Cn),w(qe,oe,Be,dn,Cn),Cn=String.fromCharCode(55349,56788+tn),w(O,oe,ge,dn,Cn),w(qe,oe,Be,dn,Cn),Cn=String.fromCharCode(55349,56840+tn),w(O,oe,ge,dn,Cn),w(qe,oe,Be,dn,Cn),Cn=String.fromCharCode(55349,56944+tn),w(O,oe,ge,dn,Cn),w(qe,oe,Be,dn,Cn),tn<26&&(Cn=String.fromCharCode(55349,56632+tn),w(O,oe,ge,dn,Cn),w(qe,oe,Be,dn,Cn),Cn=String.fromCharCode(55349,56476+tn),w(O,oe,ge,dn,Cn),w(qe,oe,Be,dn,Cn))}Cn="\u{1D55C}",w(O,oe,ge,"k",Cn),w(qe,oe,Be,"k",Cn);for(var Vn=0;Vn<10;Vn++){var vr=Vn.toString();Cn=String.fromCharCode(55349,57294+Vn),w(O,oe,ge,vr,Cn),w(qe,oe,Be,vr,Cn),Cn=String.fromCharCode(55349,57314+Vn),w(O,oe,ge,vr,Cn),w(qe,oe,Be,vr,Cn),Cn=String.fromCharCode(55349,57324+Vn),w(O,oe,ge,vr,Cn),w(qe,oe,Be,vr,Cn),Cn=String.fromCharCode(55349,57334+Vn),w(O,oe,ge,vr,Cn),w(qe,oe,Be,vr,Cn)}for(var Et="\xC7\xD0\xDE\xE7\xFE",wt=0;wt<Et.length;wt++){var Me=Et.charAt(wt);w(O,oe,ge,Me,Me),w(qe,oe,Be,Me,Me)}w(qe,oe,Be,"\xF0","\xF0"),w(qe,oe,Be,"\u2013","\u2013"),w(qe,oe,Be,"\u2014","\u2014"),w(qe,oe,Be,"\u2018","\u2018"),w(qe,oe,Be,"\u2019","\u2019"),w(qe,oe,Be,"\u201C","\u201C"),w(qe,oe,Be,"\u201D","\u201D");var nt=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathdefault","textit","Math-Italic"],["mathdefault","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],vt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],yt=function(l,d){var f=l.charCodeAt(0),y=l.charCodeAt(1),R=(f-55296)*1024+(y-56320)+65536,H=d==="math"?0:1;if(119808<=R&&R<120484){var ve=Math.floor((R-119808)/26);return[nt[ve][2],nt[ve][H]]}else if(120782<=R&&R<=120831){var Te=Math.floor((R-120782)/10);return[vt[Te][2],vt[Te][H]]}else{if(R===120485||R===120486)return[nt[0][2],nt[0][H]];if(120486<R&&R<120782)return["",""];throw new g("Unsupported character: "+l)}},Tt=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Jt=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],mn=function(l,d){return d.size<2?l:Tt[l-1][d.size-1]},yn=function(){function N(d){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=d.style,this.color=d.color,this.size=d.size||N.BASESIZE,this.textSize=d.textSize||this.size,this.phantom=!!d.phantom,this.font=d.font||"",this.fontFamily=d.fontFamily||"",this.fontWeight=d.fontWeight||"",this.fontShape=d.fontShape||"",this.sizeMultiplier=Jt[this.size-1],this.maxSize=d.maxSize,this.minRuleThickness=d.minRuleThickness,this._fontMetrics=void 0}var l=N.prototype;return l.extend=function(f){var y={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var R in f)f.hasOwnProperty(R)&&(y[R]=f[R]);return new N(y)},l.havingStyle=function(f){return this.style===f?this:this.extend({style:f,size:mn(this.textSize,f)})},l.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},l.havingSize=function(f){return this.size===f&&this.textSize===f?this:this.extend({style:this.style.text(),size:f,textSize:f,sizeMultiplier:Jt[f-1]})},l.havingBaseStyle=function(f){f=f||this.style.text();var y=mn(N.BASESIZE,f);return this.size===y&&this.textSize===N.BASESIZE&&this.style===f?this:this.extend({style:f,size:y})},l.havingBaseSizing=function(){var f;switch(this.style.id){case 4:case 5:f=3;break;case 6:case 7:f=1;break;default:f=6}return this.extend({style:this.style.text(),size:f})},l.withColor=function(f){return this.extend({color:f})},l.withPhantom=function(){return this.extend({phantom:!0})},l.withFont=function(f){return this.extend({font:f})},l.withTextFontFamily=function(f){return this.extend({fontFamily:f,font:""})},l.withTextFontWeight=function(f){return this.extend({fontWeight:f,font:""})},l.withTextFontShape=function(f){return this.extend({fontShape:f,font:""})},l.sizingClasses=function(f){return f.size!==this.size?["sizing","reset-size"+f.size,"size"+this.size]:[]},l.baseSizingClasses=function(){return this.size!==N.BASESIZE?["sizing","reset-size"+this.size,"size"+N.BASESIZE]:[]},l.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=Ue(this.size)),this._fontMetrics},l.getColor=function(){return this.phantom?"transparent":this.color},N}();yn.BASESIZE=6;var Wt=yn,gn={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Ln={ex:!0,em:!0,mu:!0},vn=function(l){return typeof l!="string"&&(l=l.unit),l in gn||l in Ln||l==="ex"},ht=function(l,d){var f;if(l.unit in gn)f=gn[l.unit]/d.fontMetrics().ptPerEm/d.sizeMultiplier;else if(l.unit==="mu")f=d.fontMetrics().cssEmPerMu;else{var y;if(d.style.isTight()?y=d.havingStyle(d.style.text()):y=d,l.unit==="ex")f=y.fontMetrics().xHeight;else if(l.unit==="em")f=y.fontMetrics().quad;else throw new g("Invalid unit: '"+l.unit+"'");y!==d&&(f*=y.sizeMultiplier/d.sizeMultiplier)}return Math.min(l.number*f,d.maxSize)},Ct=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],Zt=function(l,d,f){return kt[f][l]&&kt[f][l].replace&&(l=kt[f][l].replace),{value:l,metrics:ct(l,d,f)}},Lt=function(l,d,f,y,R){var H=Zt(l,d,f),ve=H.metrics;l=H.value;var Te;if(ve){var Ke=ve.italic;(f==="text"||y&&y.font==="mathit")&&(Ke=0),Te=new he(l,ve.height,ve.depth,Ke,ve.skew,ve.width,R)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+l+"' in style '"+d+"' and mode '"+f+"'")),Te=new he(l,0,0,0,0,0,R);if(y){Te.maxFontSize=y.sizeMultiplier,y.style.isTight()&&Te.classes.push("mtight");var pt=y.getColor();pt&&(Te.style.color=pt)}return Te},zt=function(l,d,f,y){return y===void 0&&(y=[]),f.font==="boldsymbol"&&Zt(l,"Main-Bold",d).metrics?Lt(l,"Main-Bold",d,f,y.concat(["mathbf"])):l==="\\"||kt[d][l].font==="main"?Lt(l,"Main-Regular",d,f,y):Lt(l,"AMS-Regular",d,f,y.concat(["amsrm"]))},Vt=function(l,d,f,y){return/[0-9]/.test(l.charAt(0))||U.contains(Ct,l)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},nn=function(l,d,f,y){return U.contains(Ct,l)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(l.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},rn=function(l,d,f,y){return Zt(l,"Math-BoldItalic",d).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Sn=function(l,d,f){var y=l.mode,R=l.text,H=["mord"],ve=y==="math"||y==="text"&&d.font,Te=ve?d.font:d.fontFamily;if(R.charCodeAt(0)===55349){var Ke=yt(R,y),pt=Ke[0],Dt=Ke[1];return Lt(R,pt,y,d,H.concat(Dt))}else if(Te){var $t,Qt;if(Te==="boldsymbol"||Te==="mathnormal"){var an=Te==="boldsymbol"?rn(R,y,d,H):nn(R,y,d,H);$t=an.fontName,Qt=[an.fontClass]}else U.contains(Ct,R)?($t="Main-Italic",Qt=["mathit"]):ve?($t=qn[Te].fontName,Qt=[Te]):($t=Yn(Te,d.fontWeight,d.fontShape),Qt=[Te,d.fontWeight,d.fontShape]);if(Zt(R,$t,y).metrics)return Lt(R,$t,y,d,H.concat(Qt));if(Gt.hasOwnProperty(R)&&$t.substr(0,10)==="Typewriter"){for(var on=[],_n=0;_n<R.length;_n++)on.push(Lt(R[_n],$t,y,d,H.concat(Qt)));return $n(on)}}if(f==="mathord"){var hn=Vt(R,y,d,H);return Lt(R,hn.fontName,y,d,H.concat([hn.fontClass]))}else if(f==="textord"){var bn=kt[y][R]&&kt[y][R].font;if(bn==="ams"){var Dn=Yn("amsrm",d.fontWeight,d.fontShape);return Lt(R,Dn,y,d,H.concat("amsrm",d.fontWeight,d.fontShape))}else if(bn==="main"||!bn){var jn=Yn("textrm",d.fontWeight,d.fontShape);return Lt(R,jn,y,d,H.concat(d.fontWeight,d.fontShape))}else{var Gn=Yn(bn,d.fontWeight,d.fontShape);return Lt(R,Gn,y,d,H.concat(Gn,d.fontWeight,d.fontShape))}}else throw new Error("unexpected type: "+f+" in makeOrd")},On=function(l,d){if(Ge(l.classes)!==Ge(d.classes)||l.skew!==d.skew||l.maxFontSize!==d.maxFontSize)return!1;for(var f in l.style)if(l.style.hasOwnProperty(f)&&l.style[f]!==d.style[f])return!1;for(var y in d.style)if(d.style.hasOwnProperty(y)&&l.style[y]!==d.style[y])return!1;return!0},or=function(l){for(var d=0;d<l.length-1;d++){var f=l[d],y=l[d+1];f instanceof he&&y instanceof he&&On(f,y)&&(f.text+=y.text,f.height=Math.max(f.height,y.height),f.depth=Math.max(f.depth,y.depth),f.italic=y.italic,l.splice(d+1,1),d--)}return l},Nn=function(l){for(var d=0,f=0,y=0,R=0;R<l.children.length;R++){var H=l.children[R];H.height>d&&(d=H.height),H.depth>f&&(f=H.depth),H.maxFontSize>y&&(y=H.maxFontSize)}l.height=d,l.depth=f,l.maxFontSize=y},Pn=function(l,d,f,y){var R=new $e(l,d,f,y);return Nn(R),R},Hn=function(l,d,f,y){return new $e(l,d,f,y)},Kn=function(l,d,f){var y=Pn([l],[],d);return y.height=Math.max(f||d.fontMetrics().defaultRuleThickness,d.minRuleThickness),y.style.borderBottomWidth=y.height+"em",y.maxFontSize=1,y},er=function(l,d,f,y){var R=new Ae(l,d,f,y);return Nn(R),R},$n=function(l){var d=new Xe(l);return Nn(d),d},Zn=function(l,d){return l instanceof Xe?Pn([],[l],d):l},nr=function(l){if(l.positionType==="individualShift"){for(var d=l.children,f=[d[0]],y=-d[0].shift-d[0].elem.depth,R=y,H=1;H<d.length;H++){var ve=-d[H].shift-R-d[H].elem.depth,Te=ve-(d[H-1].elem.height+d[H-1].elem.depth);R=R+ve,f.push({type:"kern",size:Te}),f.push(d[H])}return{children:f,depth:y}}var Ke;if(l.positionType==="top"){for(var pt=l.positionData,Dt=0;Dt<l.children.length;Dt++){var $t=l.children[Dt];pt-=$t.type==="kern"?$t.size:$t.elem.height+$t.elem.depth}Ke=pt}else if(l.positionType==="bottom")Ke=-l.positionData;else{var Qt=l.children[0];if(Qt.type!=="elem")throw new Error('First child must have type "elem".');if(l.positionType==="shift")Ke=-Qt.elem.depth-l.positionData;else if(l.positionType==="firstBaseline")Ke=-Qt.elem.depth;else throw new Error("Invalid positionType "+l.positionType+".")}return{children:l.children,depth:Ke}},ar=function(l,d){for(var f=nr(l),y=f.children,R=f.depth,H=0,ve=0;ve<y.length;ve++){var Te=y[ve];if(Te.type==="elem"){var Ke=Te.elem;H=Math.max(H,Ke.maxFontSize,Ke.height)}}H+=2;var pt=Pn(["pstrut"],[]);pt.style.height=H+"em";for(var Dt=[],$t=R,Qt=R,an=R,on=0;on<y.length;on++){var _n=y[on];if(_n.type==="kern")an+=_n.size;else{var hn=_n.elem,bn=_n.wrapperClasses||[],Dn=_n.wrapperStyle||{},jn=Pn(bn,[pt,hn],void 0,Dn);jn.style.top=-H-an-hn.depth+"em",_n.marginLeft&&(jn.style.marginLeft=_n.marginLeft),_n.marginRight&&(jn.style.marginRight=_n.marginRight),Dt.push(jn),an+=hn.height+hn.depth}$t=Math.min($t,an),Qt=Math.max(Qt,an)}var Gn=Pn(["vlist"],Dt);Gn.style.height=Qt+"em";var Mn;if($t<0){var _r=Pn([],[]),Tr=Pn(["vlist"],[_r]);Tr.style.height=-$t+"em";var gi=Pn(["vlist-s"],[new he("\u200B")]);Mn=[Pn(["vlist-r"],[Gn,gi]),Pn(["vlist-r"],[Tr])]}else Mn=[Pn(["vlist-r"],[Gn])];var ni=Pn(["vlist-t"],Mn);return Mn.length===2&&ni.classes.push("vlist-t2"),ni.height=Qt,ni.depth=-$t,ni},Jn=function(l,d){var f=Pn(["mspace"],[],d),y=ht(l,d);return f.style.marginRight=y+"em",f},Yn=function(l,d,f){var y="";switch(l){case"amsrm":y="AMS";break;case"textrm":y="Main";break;case"textsf":y="SansSerif";break;case"texttt":y="Typewriter";break;default:y=l}var R;return d==="textbf"&&f==="textit"?R="BoldItalic":d==="textbf"?R="Bold":d==="textit"?R="Italic":R="Regular",y+"-"+R},qn={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Fn={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},$r=function(l,d){var f=Fn[l],y=f[0],R=f[1],H=f[2],ve=new pe(y),Te=new _e([ve],{width:R+"em",height:H+"em",style:"width:"+R+"em",viewBox:"0 0 "+1e3*R+" "+1e3*H,preserveAspectRatio:"xMinYMin"}),Ke=Hn(["overlay"],[Te],d);return Ke.height=H,Ke.style.height=H+"em",Ke.style.width=R+"em",Ke},Ft={fontMap:qn,makeSymbol:Lt,mathsym:zt,makeSpan:Pn,makeSvgSpan:Hn,makeLineSpan:Kn,makeAnchor:er,makeFragment:$n,wrapFragment:Zn,makeVList:ar,makeOrd:Sn,makeGlue:Jn,staticSvg:$r,svgData:Fn,tryCombineChars:or};function tr(N,l){var d=ur(N,l);if(!d)throw new Error("Expected node of type "+l+", but got "+(N?"node of type "+N.type:String(N)));return d}function ur(N,l){return N&&N.type===l?N:null}function Yr(N,l){var d=zr(N,l);if(!d)throw new Error('Expected node of type "atom" and family "'+l+'", but got '+(N?N.type==="atom"?"atom of family "+N.family:"node of type "+N.type:String(N)));return d}function zr(N,l){return N&&N.type==="atom"&&N.family===l?N:null}function li(N){var l=Qr(N);if(!l)throw new Error("Expected node of symbol group type, but got "+(N?"node of type "+N.type:String(N)));return l}function Qr(N){return N&&(N.type==="atom"||dt.hasOwnProperty(N.type))?N:null}var Bn={number:3,unit:"mu"},An={number:4,unit:"mu"},en={number:5,unit:"mu"},sn={mord:{mop:Bn,mbin:An,mrel:en,minner:Bn},mop:{mord:Bn,mop:Bn,mrel:en,minner:Bn},mbin:{mord:An,mop:An,mopen:An,minner:An},mrel:{mord:en,mop:en,mopen:en,minner:en},mopen:{},mclose:{mop:Bn,mbin:An,mrel:en,minner:Bn},mpunct:{mord:Bn,mop:Bn,mrel:en,mopen:Bn,mclose:Bn,mpunct:Bn,minner:Bn},minner:{mord:Bn,mop:Bn,mbin:An,mrel:en,mopen:Bn,mpunct:Bn,minner:Bn}},Rn={mord:{mop:Bn},mop:{mord:Bn,mop:Bn},mbin:{},mrel:{},mopen:{},mclose:{mop:Bn},mpunct:{},minner:{mop:Bn}},Un={},rr={},Ar={};function wn(N){for(var l=N.type,d=N.names,f=N.props,y=N.handler,R=N.htmlBuilder,H=N.mathmlBuilder,ve={type:l,numArgs:f.numArgs,argTypes:f.argTypes,greediness:f.greediness===void 0?1:f.greediness,allowedInText:!!f.allowedInText,allowedInMath:f.allowedInMath===void 0?!0:f.allowedInMath,numOptionalArgs:f.numOptionalArgs||0,infix:!!f.infix,handler:y},Te=0;Te<d.length;++Te)Un[d[Te]]=ve;l&&(R&&(rr[l]=R),H&&(Ar[l]=H))}function cr(N){var l=N.type,d=N.htmlBuilder,f=N.mathmlBuilder;wn({type:l,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:d,mathmlBuilder:f})}var Ir=function(l){var d=ur(l,"ordgroup");return d?d.body:[l]},Jr=Ft.makeSpan,mi=["leftmost","mbin","mopen","mrel","mop","mpunct"],Li=["rightmost","mrel","mclose","mpunct"],Gr={display:E.DISPLAY,text:E.TEXT,script:E.SCRIPT,scriptscript:E.SCRIPTSCRIPT},Ri={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},qr=function(l,d,f,y){y===void 0&&(y=[null,null]);for(var R=[],H=0;H<l.length;H++){var ve=Lr(l[H],d);if(ve instanceof Xe){var Te=ve.children;R.push.apply(R,Te)}else R.push(ve)}if(!f)return R;var Ke=d;if(l.length===1){var pt=ur(l[0],"sizing")||ur(l[0],"styling");pt&&(pt.type==="sizing"?Ke=d.havingSize(pt.size):pt.type==="styling"&&(Ke=d.havingStyle(Gr[pt.style])))}var Dt=Jr([y[0]||"leftmost"],[],d),$t=Jr([y[1]||"rightmost"],[],d);return bi(R,function(Qt,an){var on=an.classes[0],_n=Qt.classes[0];on==="mbin"&&U.contains(Li,_n)?an.classes[0]="mord":_n==="mbin"&&U.contains(mi,on)&&(Qt.classes[0]="mord")},{node:Dt},$t),bi(R,function(Qt,an){var on=ii(an),_n=ii(Qt),hn=on&&_n?Qt.hasClass("mtight")?Rn[on][_n]:sn[on][_n]:null;if(hn)return Ft.makeGlue(hn,Ke)},{node:Dt},$t),R},bi=function N(l,d,f,y){y&&l.push(y);for(var R=0;R<l.length;R++){var H=l[R],ve=ri(H);if(ve){N(ve.children,d,f);continue}if(H.classes[0]!=="mspace"){var Te=d(H,f.node);Te&&(f.insertAfter?f.insertAfter(Te):(l.unshift(Te),R++)),f.node=H,f.insertAfter=function(Ke){return function(pt){l.splice(Ke+1,0,pt),R++}}(R)}}y&&l.pop()},ri=function(l){return l instanceof Xe||l instanceof Ae?l:null},di=function N(l,d){var f=ri(l);if(f){var y=f.children;if(y.length){if(d==="right")return N(y[y.length-1],"right");if(d==="left")return N(y[0],"left")}}return l},ii=function(l,d){return l?(d&&(l=di(l,d)),Ri[l.classes[0]]||null):null},Oi=function(l,d){var f=["nulldelimiter"].concat(l.baseSizingClasses());return Jr(d.concat(f))},Lr=function(l,d,f){if(!l)return Jr();if(rr[l.type]){var y=rr[l.type](l,d);if(f&&d.size!==f.size){y=Jr(d.sizingClasses(f),[y],d);var R=d.sizeMultiplier/f.sizeMultiplier;y.height*=R,y.depth*=R}return y}else throw new g("Got group of unknown type: '"+l.type+"'")};function Pi(N,l){var d=Jr(["base"],N,l),f=Jr(["strut"]);return f.style.height=d.height+d.depth+"em",f.style.verticalAlign=-d.depth+"em",d.children.unshift(f),d}function Mi(N,l){var d=null;N.length===1&&N[0].type==="tag"&&(d=N[0].tag,N=N[0].body);for(var f=qr(N,l,!0),y=[],R=[],H=0;H<f.length;H++)if(R.push(f[H]),f[H].hasClass("mbin")||f[H].hasClass("mrel")||f[H].hasClass("allowbreak")){for(var ve=!1;H<f.length-1&&f[H+1].hasClass("mspace")&&!f[H+1].hasClass("newline");)H++,R.push(f[H]),f[H].hasClass("nobreak")&&(ve=!0);ve||(y.push(Pi(R,l)),R=[])}else f[H].hasClass("newline")&&(R.pop(),R.length>0&&(y.push(Pi(R,l)),R=[]),y.push(f[H]));R.length>0&&y.push(Pi(R,l));var Te;d&&(Te=Pi(qr(d,l,!0)),Te.classes=["tag"],y.push(Te));var Ke=Jr(["katex-html"],y);if(Ke.setAttribute("aria-hidden","true"),Te){var pt=Te.children[0];pt.style.height=Ke.height+Ke.depth+"em",pt.style.verticalAlign=-Ke.depth+"em"}return Ke}function ki(N){return new Xe(N)}var mr=function(){function N(d,f){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=d,this.attributes={},this.children=f||[]}var l=N.prototype;return l.setAttribute=function(f,y){this.attributes[f]=y},l.getAttribute=function(f){return this.attributes[f]},l.toNode=function(){var f=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&f.setAttribute(y,this.attributes[y]);for(var R=0;R<this.children.length;R++)f.appendChild(this.children[R].toNode());return f},l.toMarkup=function(){var f="<"+this.type;for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&(f+=" "+y+'="',f+=U.escape(this.attributes[y]),f+='"');f+=">";for(var R=0;R<this.children.length;R++)f+=this.children[R].toMarkup();return f+="</"+this.type+">",f},l.toText=function(){return this.children.map(function(f){return f.toText()}).join("")},N}(),zn=function(){function N(d){this.text=void 0,this.text=d}var l=N.prototype;return l.toNode=function(){return document.createTextNode(this.text)},l.toMarkup=function(){return U.escape(this.toText())},l.toText=function(){return this.text},N}(),pi=function(){function N(d){this.width=void 0,this.character=void 0,this.width=d,d>=.05555&&d<=.05556?this.character="\u200A":d>=.1666&&d<=.1667?this.character="\u2009":d>=.2222&&d<=.2223?this.character="\u2005":d>=.2777&&d<=.2778?this.character="\u2005\u200A":d>=-.05556&&d<=-.05555?this.character="\u200A\u2063":d>=-.1667&&d<=-.1666?this.character="\u2009\u2063":d>=-.2223&&d<=-.2222?this.character="\u205F\u2063":d>=-.2778&&d<=-.2777?this.character="\u2005\u2063":this.character=null}var l=N.prototype;return l.toNode=function(){if(this.character)return document.createTextNode(this.character);var f=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return f.setAttribute("width",this.width+"em"),f},l.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+this.width+'em"/>'},l.toText=function(){return this.character?this.character:" "},N}(),Tn={MathNode:mr,TextNode:zn,SpaceNode:pi,newDocumentFragment:ki},Fi=function(l,d,f){return kt[d][l]&&kt[d][l].replace&&l.charCodeAt(0)!==55349&&!(Gt.hasOwnProperty(l)&&f&&(f.fontFamily&&f.fontFamily.substr(4,2)==="tt"||f.font&&f.font.substr(4,2)==="tt"))&&(l=kt[d][l].replace),new Tn.TextNode(l)},Os=function(l){return l.length===1?l[0]:new Tn.MathNode("mrow",l)},vs=function(l,d){if(d.fontFamily==="texttt")return"monospace";if(d.fontFamily==="textsf")return d.fontShape==="textit"&&d.fontWeight==="textbf"?"sans-serif-bold-italic":d.fontShape==="textit"?"sans-serif-italic":d.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(d.fontShape==="textit"&&d.fontWeight==="textbf")return"bold-italic";if(d.fontShape==="textit")return"italic";if(d.fontWeight==="textbf")return"bold";var f=d.font;if(!f||f==="mathnormal")return null;var y=l.mode;if(f==="mathit")return"italic";if(f==="boldsymbol")return"bold-italic";if(f==="mathbf")return"bold";if(f==="mathbb")return"double-struck";if(f==="mathfrak")return"fraktur";if(f==="mathscr"||f==="mathcal")return"script";if(f==="mathsf")return"sans-serif";if(f==="mathtt")return"monospace";var R=l.text;if(U.contains(["\\imath","\\jmath"],R))return null;kt[y][R]&&kt[y][R].replace&&(R=kt[y][R].replace);var H=Ft.fontMap[f].fontName;return ct(R,H,y)?Ft.fontMap[f].variant:null},ss=function(l,d,f){if(l.length===1){var y=Pr(l[0],d);return f&&y instanceof mr&&y.type==="mo"&&(y.setAttribute("lspace","0em"),y.setAttribute("rspace","0em")),[y]}for(var R=[],H,ve=0;ve<l.length;ve++){var Te=Pr(l[ve],d);if(Te instanceof mr&&H instanceof mr){if(Te.type==="mtext"&&H.type==="mtext"&&Te.getAttribute("mathvariant")===H.getAttribute("mathvariant")){var Ke;(Ke=H.children).push.apply(Ke,Te.children);continue}else if(Te.type==="mn"&&H.type==="mn"){var pt;(pt=H.children).push.apply(pt,Te.children);continue}else if(Te.type==="mi"&&Te.children.length===1&&H.type==="mn"){var Dt=Te.children[0];if(Dt instanceof zn&&Dt.text==="."){var $t;($t=H.children).push.apply($t,Te.children);continue}}else if(H.type==="mi"&&H.children.length===1){var Qt=H.children[0];if(Qt instanceof zn&&Qt.text==="\u0338"&&(Te.type==="mo"||Te.type==="mi"||Te.type==="mn")){var an=Te.children[0];an instanceof zn&&an.text.length>0&&(an.text=an.text.slice(0,1)+"\u0338"+an.text.slice(1),R.pop())}}}R.push(Te),H=Te}return R},ls=function(l,d,f){return Os(ss(l,d,f))},Pr=function(l,d){if(!l)return new Tn.MathNode("mrow");if(Ar[l.type]){var f=Ar[l.type](l,d);return f}else throw new g("Got group of unknown type: '"+l.type+"'")};function Gi(N,l,d,f){var y=ss(N,d),R;y.length===1&&y[0]instanceof mr&&U.contains(["mrow","mtable"],y[0].type)?R=y[0]:R=new Tn.MathNode("mrow",y);var H=new Tn.MathNode("annotation",[new Tn.TextNode(l)]);H.setAttribute("encoding","application/x-tex");var ve=new Tn.MathNode("semantics",[R,H]),Te=new Tn.MathNode("math",[ve]);Te.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var Ke=f?"katex":"katex-mathml";return Ft.makeSpan([Ke],[Te])}var ds=function(l){return new Wt({style:l.displayMode?E.DISPLAY:E.TEXT,maxSize:l.maxSize,minRuleThickness:l.minRuleThickness})},_s=function(l,d){if(d.displayMode){var f=["katex-display"];d.leqno&&f.push("leqno"),d.fleqn&&f.push("fleqn"),l=Ft.makeSpan(f,[l])}return l},ci=function(l,d,f){var y=ds(f),R;if(f.output==="mathml")return Gi(l,d,y,!0);if(f.output==="html"){var H=Mi(l,y);R=Ft.makeSpan(["katex"],[H])}else{var ve=Gi(l,d,y,!1),Te=Mi(l,y);R=Ft.makeSpan(["katex"],[ve,Te])}return _s(R,f)},zi=function(l,d,f){var y=ds(f),R=Mi(l,y),H=Ft.makeSpan(["katex"],[R]);return _s(H,f)},ns=ci,br={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB"},Ur=function(l){var d=new Tn.MathNode("mo",[new Tn.TextNode(br[l.substr(1)])]);return d.setAttribute("stretchy","true"),d},yr={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Or=function(l){return l.type==="ordgroup"?l.body.length:1},ui=function(l,d){function f(){var Te=4e5,Ke=l.label.substr(1);if(U.contains(["widehat","widecheck","widetilde","utilde"],Ke)){var pt=l,Dt=Or(pt.base),$t,Qt,an;if(Dt>5)Ke==="widehat"||Ke==="widecheck"?($t=420,Te=2364,an=.42,Qt=Ke+"4"):($t=312,Te=2340,an=.34,Qt="tilde4");else{var on=[1,1,2,2,3,3][Dt];Ke==="widehat"||Ke==="widecheck"?(Te=[0,1062,2364,2364,2364][on],$t=[0,239,300,360,420][on],an=[0,.24,.3,.3,.36,.42][on],Qt=Ke+on):(Te=[0,600,1033,2339,2340][on],$t=[0,260,286,306,312][on],an=[0,.26,.286,.3,.306,.34][on],Qt="tilde"+on)}var _n=new pe(Qt),hn=new _e([_n],{width:"100%",height:an+"em",viewBox:"0 0 "+Te+" "+$t,preserveAspectRatio:"none"});return{span:Ft.makeSvgSpan([],[hn],d),minWidth:0,height:an}}else{var bn=[],Dn=yr[Ke],jn=Dn[0],Gn=Dn[1],Mn=Dn[2],_r=Mn/1e3,Tr=jn.length,gi,ni;if(Tr===1){var Rt=Dn[3];gi=["hide-tail"],ni=[Rt]}else if(Tr===2)gi=["halfarrow-left","halfarrow-right"],ni=["xMinYMin","xMaxYMin"];else if(Tr===3)gi=["brace-left","brace-center","brace-right"],ni=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
`+Tr+" children.");for(var vi=0;vi<Tr;vi++){var ts=new pe(jn[vi]),Xr=new _e([ts],{width:"400em",height:_r+"em",viewBox:"0 0 "+Te+" "+Mn,preserveAspectRatio:ni[vi]+" slice"}),Fr=Ft.makeSvgSpan([gi[vi]],[Xr],d);if(Tr===1)return{span:Fr,minWidth:Gn,height:_r};Fr.style.height=_r+"em",bn.push(Fr)}return{span:Ft.makeSpan(["stretchy"],bn,d),minWidth:Gn,height:_r}}}var y=f(),R=y.span,H=y.minWidth,ve=y.height;return R.height=ve,R.style.height=ve+"em",H>0&&(R.style.minWidth=H+"em"),R},_i=function(l,d,f,y){var R,H=l.height+l.depth+2*f;if(/fbox|color/.test(d)){if(R=Ft.makeSpan(["stretchy",d],[],y),d==="fbox"){var ve=y.color&&y.getColor();ve&&(R.style.borderColor=ve)}}else{var Te=[];/^[bx]cancel$/.test(d)&&Te.push(new Ee({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(d)&&Te.push(new Ee({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var Ke=new _e(Te,{width:"100%",height:H+"em"});R=Ft.makeSvgSpan([],[Ke],y)}return R.height=H,R.style.height=H+"em",R},as={encloseSpan:_i,mathMLnode:Ur,svgSpan:ui},ir=function(l,d){var f,y,R=ur(l,"supsub"),H;R?(y=tr(R.base,"accent"),f=y.base,R.base=f,H=Ze(Lr(R,d)),R.base=y):(y=tr(l,"accent"),f=y.base);var ve=Lr(f,d.havingCrampedStyle()),Te=y.isShifty&&U.isCharacterBox(f),Ke=0;if(Te){var pt=U.getBaseElem(f),Dt=Lr(pt,d.havingCrampedStyle());Ke=Oe(Dt).skew}var $t=Math.min(ve.height,d.fontMetrics().xHeight),Qt;if(y.isStretchy)Qt=as.svgSpan(y,d),Qt=Ft.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ve},{type:"elem",elem:Qt,wrapperClasses:["svg-align"],wrapperStyle:Ke>0?{width:"calc(100% - "+2*Ke+"em)",marginLeft:2*Ke+"em"}:void 0}]},d);else{var an,on;y.label==="\\vec"?(an=Ft.staticSvg("vec",d),on=Ft.svgData.vec[1]):(an=Ft.makeOrd({mode:y.mode,text:y.label},d,"textord"),an=Oe(an),an.italic=0,on=an.width),Qt=Ft.makeSpan(["accent-body"],[an]);var _n=y.label==="\\textcircled";_n&&(Qt.classes.push("accent-full"),$t=ve.height);var hn=Ke;_n||(hn-=on/2),Qt.style.left=hn+"em",y.label==="\\textcircled"&&(Qt.style.top=".2em"),Qt=Ft.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ve},{type:"kern",size:-$t},{type:"elem",elem:Qt}]},d)}var bn=Ft.makeSpan(["mord","accent"],[Qt],d);return H?(H.children[0]=bn,H.height=Math.max(bn.height,H.height),H.classes[0]="mord",H):bn},Dr=function(l,d){var f=l.isStretchy?as.mathMLnode(l.label):new Tn.MathNode("mo",[Fi(l.label,l.mode)]),y=new Tn.MathNode("mover",[Pr(l.base,d),f]);return y.setAttribute("accent","true"),y},ei=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(N){return"\\"+N}).join("|"));wn({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(l,d){var f=d[0],y=!ei.test(l.funcName),R=!y||l.funcName==="\\widehat"||l.funcName==="\\widetilde"||l.funcName==="\\widecheck";return{type:"accent",mode:l.parser.mode,label:l.funcName,isStretchy:y,isShifty:R,base:f}},htmlBuilder:ir,mathmlBuilder:Dr}),wn({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(l,d){var f=d[0];return{type:"accent",mode:l.parser.mode,label:l.funcName,isStretchy:!1,isShifty:!0,base:f}},htmlBuilder:ir,mathmlBuilder:Dr}),wn({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(l,d){var f=l.parser,y=l.funcName,R=d[0];return{type:"accentUnder",mode:f.mode,label:y,base:R}},htmlBuilder:function(l,d){var f=Lr(l.base,d),y=as.svgSpan(l,d),R=l.label==="\\utilde"?.12:0,H=Ft.makeVList({positionType:"bottom",positionData:y.height+R,children:[{type:"elem",elem:y,wrapperClasses:["svg-align"]},{type:"kern",size:R},{type:"elem",elem:f}]},d);return Ft.makeSpan(["mord","accentunder"],[H],d)},mathmlBuilder:function(l,d){var f=as.mathMLnode(l.label),y=new Tn.MathNode("munder",[Pr(l.base,d),f]);return y.setAttribute("accentunder","true"),y}});var Kr=function(l){var d=new Tn.MathNode("mpadded",l?[l]:[]);return d.setAttribute("width","+0.6em"),d.setAttribute("lspace","0.3em"),d};wn({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],props:{numArgs:1,numOptionalArgs:1},handler:function(l,d,f){var y=l.parser,R=l.funcName;return{type:"xArrow",mode:y.mode,label:R,body:d[0],below:f[0]}},htmlBuilder:function(l,d){var f=d.style,y=d.havingStyle(f.sup()),R=Ft.wrapFragment(Lr(l.body,y,d),d);R.classes.push("x-arrow-pad");var H;l.below&&(y=d.havingStyle(f.sub()),H=Ft.wrapFragment(Lr(l.below,y,d),d),H.classes.push("x-arrow-pad"));var ve=as.svgSpan(l,d),Te=-d.fontMetrics().axisHeight+.5*ve.height,Ke=-d.fontMetrics().axisHeight-.5*ve.height-.111;(R.depth>.25||l.label==="\\xleftequilibrium")&&(Ke-=R.depth);var pt;if(H){var Dt=-d.fontMetrics().axisHeight+H.height+.5*ve.height+.111;pt=Ft.makeVList({positionType:"individualShift",children:[{type:"elem",elem:R,shift:Ke},{type:"elem",elem:ve,shift:Te},{type:"elem",elem:H,shift:Dt}]},d)}else pt=Ft.makeVList({positionType:"individualShift",children:[{type:"elem",elem:R,shift:Ke},{type:"elem",elem:ve,shift:Te}]},d);return pt.children[0].children[0].children[1].classes.push("svg-align"),Ft.makeSpan(["mrel","x-arrow"],[pt],d)},mathmlBuilder:function(l,d){var f=as.mathMLnode(l.label),y;if(l.body){var R=Kr(Pr(l.body,d));if(l.below){var H=Kr(Pr(l.below,d));y=new Tn.MathNode("munderover",[f,H,R])}else y=new Tn.MathNode("mover",[f,R])}else if(l.below){var ve=Kr(Pr(l.below,d));y=new Tn.MathNode("munder",[f,ve])}else y=Kr(),y=new Tn.MathNode("mover",[f,y]);return y}}),wn({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(l,d){for(var f=l.parser,y=tr(d[0],"ordgroup"),R=y.body,H="",ve=0;ve<R.length;ve++){var Te=tr(R[ve],"textord");H+=Te.text}var Ke=parseInt(H);if(isNaN(Ke))throw new g("\\@char has non-numeric argument "+H);return{type:"textord",mode:f.mode,text:String.fromCharCode(Ke)}}});var ti=function(l,d){var f=qr(l.body,d.withColor(l.color),!1);return Ft.makeFragment(f)},xs=function(l,d){var f=ss(l.body,d.withColor(l.color)),y=new Tn.MathNode("mstyle",f);return y.setAttribute("mathcolor",l.color),y};wn({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(l,d){var f=l.parser,y=tr(d[0],"color-token").color,R=d[1];return{type:"color",mode:f.mode,color:y,body:Ir(R)}},htmlBuilder:ti,mathmlBuilder:xs}),wn({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(l,d){var f=l.parser,y=l.breakOnTokenText,R=tr(d[0],"color-token").color;f.gullet.macros.set("\\current@color",R);var H=f.parseExpression(!0,y);return{type:"color",mode:f.mode,color:R,body:H}},htmlBuilder:ti,mathmlBuilder:xs}),wn({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(l,d,f){var y=l.parser,R=l.funcName,H=f[0],ve=R==="\\cr",Te=!1;return ve||(y.settings.displayMode&&y.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?Te=!1:Te=!0),{type:"cr",mode:y.mode,newLine:Te,newRow:ve,size:H&&tr(H,"size").value}},htmlBuilder:function(l,d){if(l.newRow)throw new g("\\cr valid only within a tabular/array environment");var f=Ft.makeSpan(["mspace"],[],d);return l.newLine&&(f.classes.push("newline"),l.size&&(f.style.marginTop=ht(l.size,d)+"em")),f},mathmlBuilder:function(l,d){var f=new Tn.MathNode("mspace");return l.newLine&&(f.setAttribute("linebreak","newline"),l.size&&f.setAttribute("height",ht(l.size,d)+"em")),f}});var us=function(l,d,f){var y=kt.math[l]&&kt.math[l].replace,R=ct(y||l,d,f);if(!R)throw new Error("Unsupported symbol "+l+" and font size "+d+".");return R},Es=function(l,d,f,y){var R=f.havingBaseStyle(d),H=Ft.makeSpan(y.concat(R.sizingClasses(f)),[l],f),ve=R.sizeMultiplier/f.sizeMultiplier;return H.height*=ve,H.depth*=ve,H.maxFontSize=R.sizeMultiplier,H},ms=function(l,d,f){var y=d.havingBaseStyle(f),R=(1-d.sizeMultiplier/y.sizeMultiplier)*d.fontMetrics().axisHeight;l.classes.push("delimcenter"),l.style.top=R+"em",l.height-=R,l.depth+=R},ba=function(l,d,f,y,R,H){var ve=Ft.makeSymbol(l,"Main-Regular",R,y),Te=Es(ve,d,y,H);return f&&ms(Te,y,d),Te},so=function(l,d,f,y){return Ft.makeSymbol(l,"Size"+d+"-Regular",f,y)},Ka=function(l,d,f,y,R,H){var ve=so(l,d,R,y),Te=Es(Ft.makeSpan(["delimsizing","size"+d],[ve],y),E.TEXT,y,H);return f&&ms(Te,y,E.TEXT),Te},Ss=function(l,d,f){var y;d==="Size1-Regular"?y="delim-size1":y="delim-size4";var R=Ft.makeSpan(["delimsizinginner",y],[Ft.makeSpan([],[Ft.makeSymbol(l,d,f)])]);return{type:"elem",elem:R}},Fs={type:"kern",size:-.005},ks=function(l,d,f,y,R,H){var ve,Te,Ke,pt;ve=Ke=pt=l,Te=null;var Dt="Size1-Regular";l==="\\uparrow"?Ke=pt="\u23D0":l==="\\Uparrow"?Ke=pt="\u2016":l==="\\downarrow"?ve=Ke="\u23D0":l==="\\Downarrow"?ve=Ke="\u2016":l==="\\updownarrow"?(ve="\\uparrow",Ke="\u23D0",pt="\\downarrow"):l==="\\Updownarrow"?(ve="\\Uparrow",Ke="\u2016",pt="\\Downarrow"):l==="["||l==="\\lbrack"?(ve="\u23A1",Ke="\u23A2",pt="\u23A3",Dt="Size4-Regular"):l==="]"||l==="\\rbrack"?(ve="\u23A4",Ke="\u23A5",pt="\u23A6",Dt="Size4-Regular"):l==="\\lfloor"||l==="\u230A"?(Ke=ve="\u23A2",pt="\u23A3",Dt="Size4-Regular"):l==="\\lceil"||l==="\u2308"?(ve="\u23A1",Ke=pt="\u23A2",Dt="Size4-Regular"):l==="\\rfloor"||l==="\u230B"?(Ke=ve="\u23A5",pt="\u23A6",Dt="Size4-Regular"):l==="\\rceil"||l==="\u2309"?(ve="\u23A4",Ke=pt="\u23A5",Dt="Size4-Regular"):l==="("||l==="\\lparen"?(ve="\u239B",Ke="\u239C",pt="\u239D",Dt="Size4-Regular"):l===")"||l==="\\rparen"?(ve="\u239E",Ke="\u239F",pt="\u23A0",Dt="Size4-Regular"):l==="\\{"||l==="\\lbrace"?(ve="\u23A7",Te="\u23A8",pt="\u23A9",Ke="\u23AA",Dt="Size4-Regular"):l==="\\}"||l==="\\rbrace"?(ve="\u23AB",Te="\u23AC",pt="\u23AD",Ke="\u23AA",Dt="Size4-Regular"):l==="\\lgroup"||l==="\u27EE"?(ve="\u23A7",pt="\u23A9",Ke="\u23AA",Dt="Size4-Regular"):l==="\\rgroup"||l==="\u27EF"?(ve="\u23AB",pt="\u23AD",Ke="\u23AA",Dt="Size4-Regular"):l==="\\lmoustache"||l==="\u23B0"?(ve="\u23A7",pt="\u23AD",Ke="\u23AA",Dt="Size4-Regular"):(l==="\\rmoustache"||l==="\u23B1")&&(ve="\u23AB",pt="\u23A9",Ke="\u23AA",Dt="Size4-Regular");var $t=us(ve,Dt,R),Qt=$t.height+$t.depth,an=us(Ke,Dt,R),on=an.height+an.depth,_n=us(pt,Dt,R),hn=_n.height+_n.depth,bn=0,Dn=1;if(Te!==null){var jn=us(Te,Dt,R);bn=jn.height+jn.depth,Dn=2}var Gn=Qt+hn+bn,Mn=Math.max(0,Math.ceil((d-Gn)/(Dn*on))),_r=Gn+Mn*Dn*on,Tr=y.fontMetrics().axisHeight;f&&(Tr*=y.sizeMultiplier);var gi=_r/2-Tr,ni=(Mn+1)*.005-on,Rt=[];if(Rt.push(Ss(pt,Dt,R)),Te===null)for(var vi=0;vi<Mn;vi++)Rt.push(Fs),Rt.push(Ss(Ke,Dt,R));else{for(var ts=0;ts<Mn;ts++)Rt.push(Fs),Rt.push(Ss(Ke,Dt,R));Rt.push({type:"kern",size:ni}),Rt.push(Ss(Ke,Dt,R)),Rt.push(Fs),Rt.push(Ss(Te,Dt,R));for(var Xr=0;Xr<Mn;Xr++)Rt.push(Fs),Rt.push(Ss(Ke,Dt,R))}Rt.push({type:"kern",size:ni}),Rt.push(Ss(Ke,Dt,R)),Rt.push(Fs),Rt.push(Ss(ve,Dt,R));var Fr=y.havingBaseStyle(E.TEXT),Yi=Ft.makeVList({positionType:"bottom",positionData:gi,children:Rt},Fr);return Es(Ft.makeSpan(["delimsizing","mult"],[Yi],Fr),E.TEXT,y,H)},Za=80,aa=.08,Zs=function(l,d,f,y,R){var H=rt(l,y,f),ve=new pe(l,H),Te=new _e([ve],{width:"400em",height:d+"em",viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});return Ft.makeSvgSpan(["hide-tail"],[Te],R)},wa=function(l,d){var f=d.havingBaseSizing(),y=oa("\\surd",l*f.sizeMultiplier,Ha,f),R=f.sizeMultiplier,H=Math.max(0,d.minRuleThickness-d.fontMetrics().sqrtRuleThickness),ve,Te=0,Ke=0,pt=0,Dt;return y.type==="small"?(pt=1e3+1e3*H+Za,l<1?R=1:l<1.4&&(R=.7),Te=(1+H+aa)/R,Ke=(1+H)/R,ve=Zs("sqrtMain",Te,pt,H,d),ve.style.minWidth="0.853em",Dt=.833/R):y.type==="large"?(pt=(1e3+Za)*Ca[y.size],Ke=(Ca[y.size]+H)/R,Te=(Ca[y.size]+H+aa)/R,ve=Zs("sqrtSize"+y.size,Te,pt,H,d),ve.style.minWidth="1.02em",Dt=1/R):(Te=l+H+aa,Ke=l+H,pt=Math.floor(1e3*l+H)+Za,ve=Zs("sqrtTall",Te,pt,H,d),ve.style.minWidth="0.742em",Dt=1.056),ve.height=Ke,ve.style.height=Te+"em",{span:ve,advanceWidth:Dt,ruleWidth:(d.fontMetrics().sqrtRuleThickness+H)*R}},Pa=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],ja=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],zs=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Ca=[0,1.2,1.8,2.4,3],Ls=function(l,d,f,y,R){if(l==="<"||l==="\\lt"||l==="\u27E8"?l="\\langle":(l===">"||l==="\\gt"||l==="\u27E9")&&(l="\\rangle"),U.contains(Pa,l)||U.contains(zs,l))return Ka(l,d,!1,f,y,R);if(U.contains(ja,l))return ks(l,Ca[d],!1,f,y,R);throw new g("Illegal delimiter: '"+l+"'")},Ma=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ka=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"stack"}],Ha=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Wa=function(l){if(l.type==="small")return"Main-Regular";if(l.type==="large")return"Size"+l.size+"-Regular";if(l.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+l.type+"' here.")},oa=function(l,d,f,y){for(var R=Math.min(2,3-y.style.size),H=R;H<f.length&&f[H].type!=="stack";H++){var ve=us(l,Wa(f[H]),"math"),Te=ve.height+ve.depth;if(f[H].type==="small"){var Ke=y.havingBaseStyle(f[H].style);Te*=Ke.sizeMultiplier}if(Te>d)return f[H]}return f[f.length-1]},js=function(l,d,f,y,R,H){l==="<"||l==="\\lt"||l==="\u27E8"?l="\\langle":(l===">"||l==="\\gt"||l==="\u27E9")&&(l="\\rangle");var ve;U.contains(zs,l)?ve=Ma:U.contains(Pa,l)?ve=Ha:ve=ka;var Te=oa(l,d,ve,y);return Te.type==="small"?ba(l,Te.style,f,y,R,H):Te.type==="large"?Ka(l,Te.size,f,y,R,H):ks(l,d,f,y,R,H)},fi=function(l,d,f,y,R,H){var ve=y.fontMetrics().axisHeight*y.sizeMultiplier,Te=901,Ke=5/y.fontMetrics().ptPerEm,pt=Math.max(d-ve,f+ve),Dt=Math.max(pt/500*Te,2*pt-Ke);return js(l,Dt,!0,y,R,H)},Hr={sqrtImage:wa,sizedDelim:Ls,customSizedDelim:js,leftRightDelim:fi},ps={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},ws=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function wi(N,l){var d=Qr(N);if(d&&U.contains(ws,d.text))return d;throw new g("Invalid delimiter: '"+(d?d.text:JSON.stringify(N))+"' after '"+l.funcName+"'",N)}wn({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1},handler:function(l,d){var f=wi(d[0],l);return{type:"delimsizing",mode:l.parser.mode,size:ps[l.funcName].size,mclass:ps[l.funcName].mclass,delim:f.text}},htmlBuilder:function(l,d){return l.delim==="."?Ft.makeSpan([l.mclass]):Hr.sizedDelim(l.delim,l.size,d,l.mode,[l.mclass])},mathmlBuilder:function(l){var d=[];l.delim!=="."&&d.push(Fi(l.delim,l.mode));var f=new Tn.MathNode("mo",d);return l.mclass==="mopen"||l.mclass==="mclose"?f.setAttribute("fence","true"):f.setAttribute("fence","false"),f}});function os(N){if(!N.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}wn({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(l,d){var f=l.parser.gullet.macros.get("\\current@color");if(f&&typeof f!="string")throw new g("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:l.parser.mode,delim:wi(d[0],l).text,color:f}}}),wn({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(l,d){var f=wi(d[0],l),y=l.parser;++y.leftrightDepth;var R=y.parseExpression(!1);--y.leftrightDepth,y.expect("\\right",!1);var H=tr(y.parseFunction(),"leftright-right");return{type:"leftright",mode:y.mode,body:R,left:f.text,right:H.delim,rightColor:H.color}},htmlBuilder:function(l,d){os(l);for(var f=qr(l.body,d,!0,["mopen","mclose"]),y=0,R=0,H=!1,ve=0;ve<f.length;ve++)f[ve].isMiddle?H=!0:(y=Math.max(f[ve].height,y),R=Math.max(f[ve].depth,R));y*=d.sizeMultiplier,R*=d.sizeMultiplier;var Te;if(l.left==="."?Te=Oi(d,["mopen"]):Te=Hr.leftRightDelim(l.left,y,R,d,l.mode,["mopen"]),f.unshift(Te),H)for(var Ke=1;Ke<f.length;Ke++){var pt=f[Ke],Dt=pt.isMiddle;Dt&&(f[Ke]=Hr.leftRightDelim(Dt.delim,y,R,Dt.options,l.mode,[]))}var $t;if(l.right===".")$t=Oi(d,["mclose"]);else{var Qt=l.rightColor?d.withColor(l.rightColor):d;$t=Hr.leftRightDelim(l.right,y,R,Qt,l.mode,["mclose"])}return f.push($t),Ft.makeSpan(["minner"],f,d)},mathmlBuilder:function(l,d){os(l);var f=ss(l.body,d);if(l.left!=="."){var y=new Tn.MathNode("mo",[Fi(l.left,l.mode)]);y.setAttribute("fence","true"),f.unshift(y)}if(l.right!=="."){var R=new Tn.MathNode("mo",[Fi(l.right,l.mode)]);R.setAttribute("fence","true"),l.rightColor&&R.setAttribute("mathcolor",l.rightColor),f.push(R)}return Os(f)}}),wn({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(l,d){var f=wi(d[0],l);if(!l.parser.leftrightDepth)throw new g("\\middle without preceding \\left",f);return{type:"middle",mode:l.parser.mode,delim:f.text}},htmlBuilder:function(l,d){var f;if(l.delim===".")f=Oi(d,[]);else{f=Hr.sizedDelim(l.delim,1,d,l.mode,[]);var y={delim:l.delim,options:d};f.isMiddle=y}return f},mathmlBuilder:function(l,d){var f=l.delim==="\\vert"||l.delim==="|"?Fi("|","text"):Fi(l.delim,l.mode),y=new Tn.MathNode("mo",[f]);return y.setAttribute("fence","true"),y.setAttribute("lspace","0.05em"),y.setAttribute("rspace","0.05em"),y}});var Ps=function(l,d){var f=Ft.wrapFragment(Lr(l.body,d),d),y=l.label.substr(1),R=d.sizeMultiplier,H,ve=0,Te=U.isCharacterBox(l.body);if(y==="sout")H=Ft.makeSpan(["stretchy","sout"]),H.height=d.fontMetrics().defaultRuleThickness/R,ve=-.5*d.fontMetrics().xHeight;else{/cancel/.test(y)?Te||f.classes.push("cancel-pad"):f.classes.push("boxpad");var Ke=0,pt=0;/box/.test(y)?(pt=Math.max(d.fontMetrics().fboxrule,d.minRuleThickness),Ke=d.fontMetrics().fboxsep+(y==="colorbox"?0:pt)):Ke=Te?.2:0,H=as.encloseSpan(f,y,Ke,d),/fbox|boxed|fcolorbox/.test(y)&&(H.style.borderStyle="solid",H.style.borderWidth=pt+"em"),ve=f.depth+Ke,l.backgroundColor&&(H.style.backgroundColor=l.backgroundColor,l.borderColor&&(H.style.borderColor=l.borderColor))}var Dt;return l.backgroundColor?Dt=Ft.makeVList({positionType:"individualShift",children:[{type:"elem",elem:H,shift:ve},{type:"elem",elem:f,shift:0}]},d):Dt=Ft.makeVList({positionType:"individualShift",children:[{type:"elem",elem:f,shift:0},{type:"elem",elem:H,shift:ve,wrapperClasses:/cancel/.test(y)?["svg-align"]:[]}]},d),/cancel/.test(y)&&(Dt.height=f.height,Dt.depth=f.depth),/cancel/.test(y)&&!Te?Ft.makeSpan(["mord","cancel-lap"],[Dt],d):Ft.makeSpan(["mord"],[Dt],d)},Ms=function(l,d){var f=0,y=new Tn.MathNode(l.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Pr(l.body,d)]);switch(l.label){case"\\cancel":y.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":y.setAttribute("notation","downdiagonalstrike");break;case"\\sout":y.setAttribute("notation","horizontalstrike");break;case"\\fbox":y.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(f=d.fontMetrics().fboxsep*d.fontMetrics().ptPerEm,y.setAttribute("width","+"+2*f+"pt"),y.setAttribute("height","+"+2*f+"pt"),y.setAttribute("lspace",f+"pt"),y.setAttribute("voffset",f+"pt"),l.label==="\\fcolorbox"){var R=Math.max(d.fontMetrics().fboxrule,d.minRuleThickness);y.setAttribute("style","border: "+R+"em solid "+String(l.borderColor))}break;case"\\xcancel":y.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return l.backgroundColor&&y.setAttribute("mathbackground",l.backgroundColor),y};wn({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(l,d,f){var y=l.parser,R=l.funcName,H=tr(d[0],"color-token").color,ve=d[1];return{type:"enclose",mode:y.mode,label:R,backgroundColor:H,body:ve}},htmlBuilder:Ps,mathmlBuilder:Ms}),wn({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(l,d,f){var y=l.parser,R=l.funcName,H=tr(d[0],"color-token").color,ve=tr(d[1],"color-token").color,Te=d[2];return{type:"enclose",mode:y.mode,label:R,backgroundColor:ve,borderColor:H,body:Te}},htmlBuilder:Ps,mathmlBuilder:Ms}),wn({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(l,d){var f=l.parser;return{type:"enclose",mode:f.mode,label:"\\fbox",body:d[0]}}}),wn({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(l,d,f){var y=l.parser,R=l.funcName,H=d[0];return{type:"enclose",mode:y.mode,label:R,body:H}},htmlBuilder:Ps,mathmlBuilder:Ms});var Js={};function Cs(N){for(var l=N.type,d=N.names,f=N.props,y=N.handler,R=N.htmlBuilder,H=N.mathmlBuilder,ve={type:l,numArgs:f.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:y},Te=0;Te<d.length;++Te)Js[d[Te]]=ve;R&&(rr[l]=R),H&&(Ar[l]=H)}function ta(N){var l=[];N.consumeSpaces();for(var d=N.fetch().text;d==="\\hline"||d==="\\hdashline";)N.consume(),l.push(d==="\\hdashline"),N.consumeSpaces(),d=N.fetch().text;return l}function Hs(N,l,d){var f=l.hskipBeforeAndAfter,y=l.addJot,R=l.cols,H=l.arraystretch,ve=l.colSeparationType;if(N.gullet.beginGroup(),N.gullet.macros.set("\\\\","\\cr"),!H){var Te=N.gullet.expandMacroAsText("\\arraystretch");if(Te==null)H=1;else if(H=parseFloat(Te),!H||H<0)throw new g("Invalid \\arraystretch: "+Te)}N.gullet.beginGroup();var Ke=[],pt=[Ke],Dt=[],$t=[];for($t.push(ta(N));;){var Qt=N.parseExpression(!1,"\\cr");N.gullet.endGroup(),N.gullet.beginGroup(),Qt={type:"ordgroup",mode:N.mode,body:Qt},d&&(Qt={type:"styling",mode:N.mode,style:d,body:[Qt]}),Ke.push(Qt);var an=N.fetch().text;if(an==="&")N.consume();else if(an==="\\end"){Ke.length===1&&Qt.type==="styling"&&Qt.body[0].body.length===0&&pt.pop(),$t.length<pt.length+1&&$t.push([]);break}else if(an==="\\cr"){var on=tr(N.parseFunction(),"cr");Dt.push(on.size),$t.push(ta(N)),Ke=[],pt.push(Ke)}else throw new g("Expected & or \\\\ or \\cr or \\end",N.nextToken)}return N.gullet.endGroup(),N.gullet.endGroup(),{type:"array",mode:N.mode,addJot:y,arraystretch:H,body:pt,cols:R,rowGaps:Dt,hskipBeforeAndAfter:f,hLinesBeforeRow:$t,colSeparationType:ve}}function la(N){return N.substr(0,1)==="d"?"display":"text"}var ua=function(l,d){var f,y,R=l.body.length,H=l.hLinesBeforeRow,ve=0,Te=new Array(R),Ke=[],pt=Math.max(d.fontMetrics().arrayRuleWidth,d.minRuleThickness),Dt=1/d.fontMetrics().ptPerEm,$t=5*Dt;if(l.colSeparationType&&l.colSeparationType==="small"){var Qt=d.havingStyle(E.SCRIPT).sizeMultiplier;$t=.2778*(Qt/d.sizeMultiplier)}var an=12*Dt,on=3*Dt,_n=l.arraystretch*an,hn=.7*_n,bn=.3*_n,Dn=0;function jn(Ki){for(var Ei=0;Ei<Ki.length;++Ei)Ei>0&&(Dn+=.25),Ke.push({pos:Dn,isDashed:Ki[Ei]})}for(jn(H[0]),f=0;f<l.body.length;++f){var Gn=l.body[f],Mn=hn,_r=bn;ve<Gn.length&&(ve=Gn.length);var Tr=new Array(Gn.length);for(y=0;y<Gn.length;++y){var gi=Lr(Gn[y],d);_r<gi.depth&&(_r=gi.depth),Mn<gi.height&&(Mn=gi.height),Tr[y]=gi}var ni=l.rowGaps[f],Rt=0;ni&&(Rt=ht(ni,d),Rt>0&&(Rt+=bn,_r<Rt&&(_r=Rt),Rt=0)),l.addJot&&(_r+=on),Tr.height=Mn,Tr.depth=_r,Dn+=Mn,Tr.pos=Dn,Dn+=_r+Rt,Te[f]=Tr,jn(H[f+1])}var vi=Dn/2+d.fontMetrics().axisHeight,ts=l.cols||[],Xr=[],Fr,Yi;for(y=0,Yi=0;y<ve||Yi<ts.length;++y,++Yi){for(var Xi=ts[Yi]||{},Er=!0;Xi.type==="separator";){if(Er||(Fr=Ft.makeSpan(["arraycolsep"],[]),Fr.style.width=d.fontMetrics().doubleRuleSep+"em",Xr.push(Fr)),Xi.separator==="|"||Xi.separator===":"){var Vr=Xi.separator==="|"?"solid":"dashed",dr=Ft.makeSpan(["vertical-separator"],[],d);dr.style.height=Dn+"em",dr.style.borderRightWidth=pt+"em",dr.style.borderRightStyle=Vr,dr.style.margin="0 -"+pt/2+"em",dr.style.verticalAlign=-(Dn-vi)+"em",Xr.push(dr)}else throw new g("Invalid separator type: "+Xi.separator);Yi++,Xi=ts[Yi]||{},Er=!1}if(!(y>=ve)){var xr=void 0;(y>0||l.hskipBeforeAndAfter)&&(xr=U.deflt(Xi.pregap,$t),xr!==0&&(Fr=Ft.makeSpan(["arraycolsep"],[]),Fr.style.width=xr+"em",Xr.push(Fr)));var ai=[];for(f=0;f<R;++f){var hi=Te[f],Ui=hi[y];if(Ui){var Ni=hi.pos-vi;Ui.depth=hi.depth,Ui.height=hi.height,ai.push({type:"elem",elem:Ui,shift:Ni})}}ai=Ft.makeVList({positionType:"individualShift",children:ai},d),ai=Ft.makeSpan(["col-align-"+(Xi.align||"c")],[ai]),Xr.push(ai),(y<ve-1||l.hskipBeforeAndAfter)&&(xr=U.deflt(Xi.postgap,$t),xr!==0&&(Fr=Ft.makeSpan(["arraycolsep"],[]),Fr.style.width=xr+"em",Xr.push(Fr)))}}if(Te=Ft.makeSpan(["mtable"],Xr),Ke.length>0){for(var Hi=Ft.makeLineSpan("hline",d,pt),As=Ft.makeLineSpan("hdashline",d,pt),Sr=[{type:"elem",elem:Te,shift:0}];Ke.length>0;){var Mr=Ke.pop(),xi=Mr.pos-vi;Mr.isDashed?Sr.push({type:"elem",elem:As,shift:xi}):Sr.push({type:"elem",elem:Hi,shift:xi})}Te=Ft.makeVList({positionType:"individualShift",children:Sr},d)}return Ft.makeSpan(["mord"],[Te],d)},Va={c:"center ",l:"left ",r:"right "},Ci=function(l,d){var f=new Tn.MathNode("mtable",l.body.map(function(Dn){return new Tn.MathNode("mtr",Dn.map(function(jn){return new Tn.MathNode("mtd",[Pr(jn,d)])}))})),y=l.arraystretch===.5?.1:.16+l.arraystretch-1+(l.addJot?.09:0);f.setAttribute("rowspacing",y+"em");var R="",H="";if(l.cols){var ve=l.cols,Te="",Ke=!1,pt=0,Dt=ve.length;ve[0].type==="separator"&&(R+="top ",pt=1),ve[ve.length-1].type==="separator"&&(R+="bottom ",Dt-=1);for(var $t=pt;$t<Dt;$t++)ve[$t].type==="align"?(H+=Va[ve[$t].align],Ke&&(Te+="none "),Ke=!0):ve[$t].type==="separator"&&Ke&&(Te+=ve[$t].separator==="|"?"solid ":"dashed ",Ke=!1);f.setAttribute("columnalign",H.trim()),/[sd]/.test(Te)&&f.setAttribute("columnlines",Te.trim())}if(l.colSeparationType==="align"){for(var Qt=l.cols||[],an="",on=1;on<Qt.length;on++)an+=on%2?"0em ":"1em ";f.setAttribute("columnspacing",an.trim())}else l.colSeparationType==="alignat"?f.setAttribute("columnspacing","0em"):l.colSeparationType==="small"?f.setAttribute("columnspacing","0.2778em"):f.setAttribute("columnspacing","1em");var _n="",hn=l.hLinesBeforeRow;R+=hn[0].length>0?"left ":"",R+=hn[hn.length-1].length>0?"right ":"";for(var bn=1;bn<hn.length-1;bn++)_n+=hn[bn].length===0?"none ":hn[bn][0]?"dashed ":"solid ";return/[sd]/.test(_n)&&f.setAttribute("rowlines",_n.trim()),R!==""&&(f=new Tn.MathNode("menclose",[f]),f.setAttribute("notation",R.trim())),l.arraystretch&&l.arraystretch<1&&(f=new Tn.MathNode("mstyle",[f]),f.setAttribute("scriptlevel","1")),f},Ii=function(l,d){var f=[],y=Hs(l.parser,{cols:f,addJot:!0},"display"),R,H=0,ve={type:"ordgroup",mode:l.mode,body:[]},Te=ur(d[0],"ordgroup");if(Te){for(var Ke="",pt=0;pt<Te.body.length;pt++){var Dt=tr(Te.body[pt],"textord");Ke+=Dt.text}R=Number(Ke),H=R*2}var $t=!H;y.body.forEach(function(_n){for(var hn=1;hn<_n.length;hn+=2){var bn=tr(_n[hn],"styling"),Dn=tr(bn.body[0],"ordgroup");Dn.body.unshift(ve)}if($t)H<_n.length&&(H=_n.length);else{var jn=_n.length/2;if(R<jn)throw new g("Too many math in a row: "+("expected "+R+", but got "+jn),_n[0])}});for(var Qt=0;Qt<H;++Qt){var an="r",on=0;Qt%2===1?an="l":Qt>0&&$t&&(on=1),f[Qt]={type:"align",align:an,pregap:on,postgap:0}}return y.colSeparationType=$t?"align":"alignat",y};Cs({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(l,d){var f=Qr(d[0]),y=f?[d[0]]:tr(d[0],"ordgroup").body,R=y.map(function(ve){var Te=li(ve),Ke=Te.text;if("lcr".indexOf(Ke)!==-1)return{type:"align",align:Ke};if(Ke==="|")return{type:"separator",separator:"|"};if(Ke===":")return{type:"separator",separator:":"};throw new g("Unknown column alignment: "+Ke,ve)}),H={cols:R,hskipBeforeAndAfter:!0};return Hs(l.parser,H,la(l.envName))},htmlBuilder:ua,mathmlBuilder:Ci}),Cs({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(l){var d={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[l.envName],f={hskipBeforeAndAfter:!1},y=Hs(l.parser,f,la(l.envName));return d?{type:"leftright",mode:l.mode,body:[y],left:d[0],right:d[1],rightColor:void 0}:y},htmlBuilder:ua,mathmlBuilder:Ci}),Cs({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(l){var d={arraystretch:.5},f=Hs(l.parser,d,"script");return f.colSeparationType="small",f},htmlBuilder:ua,mathmlBuilder:Ci}),Cs({type:"array",names:["subarray"],props:{numArgs:1},handler:function(l,d){var f=Qr(d[0]),y=f?[d[0]]:tr(d[0],"ordgroup").body,R=y.map(function(ve){var Te=li(ve),Ke=Te.text;if("lc".indexOf(Ke)!==-1)return{type:"align",align:Ke};throw new g("Unknown column alignment: "+Ke,ve)});if(R.length>1)throw new g("{subarray} can contain only one column");var H={cols:R,hskipBeforeAndAfter:!1,arraystretch:.5};if(H=Hs(l.parser,H,"script"),H.body[0].length>1)throw new g("{subarray} can contain only one column");return H},htmlBuilder:ua,mathmlBuilder:Ci}),Cs({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(l){var d={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},f=Hs(l.parser,d,la(l.envName));return{type:"leftright",mode:l.mode,body:[f],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:ua,mathmlBuilder:Ci}),Cs({type:"array",names:["aligned"],props:{numArgs:0},handler:Ii,htmlBuilder:ua,mathmlBuilder:Ci}),Cs({type:"array",names:["gathered"],props:{numArgs:0},handler:function(l){var d={cols:[{type:"align",align:"c"}],addJot:!0};return Hs(l.parser,d,"display")},htmlBuilder:ua,mathmlBuilder:Ci}),Cs({type:"array",names:["alignedat"],props:{numArgs:1},handler:Ii,htmlBuilder:ua,mathmlBuilder:Ci}),wn({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(l,d){throw new g(l.funcName+" valid only within array environment")}});var ji=Js,Ts=ji;wn({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(l,d){var f=l.parser,y=l.funcName,R=d[0];if(R.type!=="ordgroup")throw new g("Invalid environment name",R);for(var H="",ve=0;ve<R.body.length;++ve)H+=tr(R.body[ve],"textord").text;if(y==="\\begin"){if(!Ts.hasOwnProperty(H))throw new g("No such environment: "+H,R);var Te=Ts[H],Ke=f.parseArguments("\\begin{"+H+"}",Te),pt=Ke.args,Dt=Ke.optArgs,$t={mode:f.mode,envName:H,parser:f},Qt=Te.handler($t,pt,Dt);f.expect("\\end",!1);var an=f.nextToken,on=tr(f.parseFunction(),"environment");if(on.name!==H)throw new g("Mismatch: \\begin{"+H+"} matched by \\end{"+on.name+"}",an);return Qt}return{type:"environment",mode:f.mode,name:H,nameGroup:R}}});var Ns=Ft.makeSpan;function _a(N,l){var d=qr(N.body,l,!0);return Ns([N.mclass],d,l)}function Ta(N,l){var d,f=ss(N.body,l);return N.mclass==="minner"?Tn.newDocumentFragment(f):(N.mclass==="mord"?N.isCharacterBox?(d=f[0],d.type="mi"):d=new Tn.MathNode("mi",f):(N.isCharacterBox?(d=f[0],d.type="mo"):d=new Tn.MathNode("mo",f),N.mclass==="mbin"?(d.attributes.lspace="0.22em",d.attributes.rspace="0.22em"):N.mclass==="mpunct"?(d.attributes.lspace="0em",d.attributes.rspace="0.17em"):(N.mclass==="mopen"||N.mclass==="mclose")&&(d.attributes.lspace="0em",d.attributes.rspace="0em")),d)}wn({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(l,d){var f=l.parser,y=l.funcName,R=d[0];return{type:"mclass",mode:f.mode,mclass:"m"+y.substr(5),body:Ir(R),isCharacterBox:U.isCharacterBox(R)}},htmlBuilder:_a,mathmlBuilder:Ta});var ha=function(l){var d=l.type==="ordgroup"&&l.body.length?l.body[0]:l;return d.type==="atom"&&(d.family==="bin"||d.family==="rel")?"m"+d.family:"mord"};wn({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(l,d){var f=l.parser;return{type:"mclass",mode:f.mode,mclass:ha(d[0]),body:[d[1]],isCharacterBox:U.isCharacterBox(d[1])}}}),wn({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(l,d){var f=l.parser,y=l.funcName,R=d[1],H=d[0],ve;y!=="\\stackrel"?ve=ha(R):ve="mrel";var Te={type:"op",mode:R.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:y!=="\\stackrel",body:Ir(R)},Ke={type:"supsub",mode:H.mode,base:Te,sup:y==="\\underset"?null:H,sub:y==="\\underset"?H:null};return{type:"mclass",mode:f.mode,mclass:ve,body:[Ke],isCharacterBox:U.isCharacterBox(Ke)}},htmlBuilder:_a,mathmlBuilder:Ta});var Ga=function(l,d){var f=l.font,y=d.withFont(f);return Lr(l.body,y)},Aa=function(l,d){var f=l.font,y=d.withFont(f);return Pr(l.body,y)},Ia={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};wn({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(l,d){var f=l.parser,y=l.funcName,R=d[0],H=y;return H in Ia&&(H=Ia[H]),{type:"font",mode:f.mode,font:H.slice(1),body:R}},htmlBuilder:Ga,mathmlBuilder:Aa}),wn({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(l,d){var f=l.parser,y=d[0],R=U.isCharacterBox(y);return{type:"mclass",mode:f.mode,mclass:ha(y),body:[{type:"font",mode:f.mode,font:"boldsymbol",body:y}],isCharacterBox:R}}}),wn({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(l,d){var f=l.parser,y=l.funcName,R=l.breakOnTokenText,H=f.mode,ve=f.parseExpression(!0,R),Te="math"+y.slice(1);return{type:"font",mode:H,font:Te,body:{type:"ordgroup",mode:f.mode,body:ve}}},htmlBuilder:Ga,mathmlBuilder:Aa});var Ya=function(l,d){var f=d;return l==="display"?f=f.id>=E.SCRIPT.id?f.text():E.DISPLAY:l==="text"&&f.size===E.DISPLAY.size?f=E.TEXT:l==="script"?f=E.SCRIPT:l==="scriptscript"&&(f=E.SCRIPTSCRIPT),f},Na=function(l,d){var f=Ya(l.size,d.style),y=f.fracNum(),R=f.fracDen(),H;H=d.havingStyle(y);var ve=Lr(l.numer,H,d);if(l.continued){var Te=8.5/d.fontMetrics().ptPerEm,Ke=3.5/d.fontMetrics().ptPerEm;ve.height=ve.height<Te?Te:ve.height,ve.depth=ve.depth<Ke?Ke:ve.depth}H=d.havingStyle(R);var pt=Lr(l.denom,H,d),Dt,$t,Qt;l.hasBarLine?(l.barSize?($t=ht(l.barSize,d),Dt=Ft.makeLineSpan("frac-line",d,$t)):Dt=Ft.makeLineSpan("frac-line",d),$t=Dt.height,Qt=Dt.height):(Dt=null,$t=0,Qt=d.fontMetrics().defaultRuleThickness);var an,on,_n;f.size===E.DISPLAY.size||l.size==="display"?(an=d.fontMetrics().num1,$t>0?on=3*Qt:on=7*Qt,_n=d.fontMetrics().denom1):($t>0?(an=d.fontMetrics().num2,on=Qt):(an=d.fontMetrics().num3,on=3*Qt),_n=d.fontMetrics().denom2);var hn;if(Dt){var Dn=d.fontMetrics().axisHeight;an-ve.depth-(Dn+.5*$t)<on&&(an+=on-(an-ve.depth-(Dn+.5*$t))),Dn-.5*$t-(pt.height-_n)<on&&(_n+=on-(Dn-.5*$t-(pt.height-_n)));var jn=-(Dn-.5*$t);hn=Ft.makeVList({positionType:"individualShift",children:[{type:"elem",elem:pt,shift:_n},{type:"elem",elem:Dt,shift:jn},{type:"elem",elem:ve,shift:-an}]},d)}else{var bn=an-ve.depth-(pt.height-_n);bn<on&&(an+=.5*(on-bn),_n+=.5*(on-bn)),hn=Ft.makeVList({positionType:"individualShift",children:[{type:"elem",elem:pt,shift:_n},{type:"elem",elem:ve,shift:-an}]},d)}H=d.havingStyle(f),hn.height*=H.sizeMultiplier/d.sizeMultiplier,hn.depth*=H.sizeMultiplier/d.sizeMultiplier;var Gn;f.size===E.DISPLAY.size?Gn=d.fontMetrics().delim1:Gn=d.fontMetrics().delim2;var Mn,_r;return l.leftDelim==null?Mn=Oi(d,["mopen"]):Mn=Hr.customSizedDelim(l.leftDelim,Gn,!0,d.havingStyle(f),l.mode,["mopen"]),l.continued?_r=Ft.makeSpan([]):l.rightDelim==null?_r=Oi(d,["mclose"]):_r=Hr.customSizedDelim(l.rightDelim,Gn,!0,d.havingStyle(f),l.mode,["mclose"]),Ft.makeSpan(["mord"].concat(H.sizingClasses(d)),[Mn,Ft.makeSpan(["mfrac"],[hn]),_r],d)},ao=function(l,d){var f=new Tn.MathNode("mfrac",[Pr(l.numer,d),Pr(l.denom,d)]);if(!l.hasBarLine)f.setAttribute("linethickness","0px");else if(l.barSize){var y=ht(l.barSize,d);f.setAttribute("linethickness",y+"em")}var R=Ya(l.size,d.style);if(R.size!==d.style.size){f=new Tn.MathNode("mstyle",[f]);var H=R.size===E.DISPLAY.size?"true":"false";f.setAttribute("displaystyle",H),f.setAttribute("scriptlevel","0")}if(l.leftDelim!=null||l.rightDelim!=null){var ve=[];if(l.leftDelim!=null){var Te=new Tn.MathNode("mo",[new Tn.TextNode(l.leftDelim.replace("\\",""))]);Te.setAttribute("fence","true"),ve.push(Te)}if(ve.push(f),l.rightDelim!=null){var Ke=new Tn.MathNode("mo",[new Tn.TextNode(l.rightDelim.replace("\\",""))]);Ke.setAttribute("fence","true"),ve.push(Ke)}return Os(ve)}return f};wn({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(l,d){var f=l.parser,y=l.funcName,R=d[0],H=d[1],ve,Te=null,Ke=null,pt="auto";switch(y){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":ve=!0;break;case"\\\\atopfrac":ve=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":ve=!1,Te="(",Ke=")";break;case"\\\\bracefrac":ve=!1,Te="\\{",Ke="\\}";break;case"\\\\brackfrac":ve=!1,Te="[",Ke="]";break;default:throw new Error("Unrecognized genfrac command")}switch(y){case"\\cfrac":case"\\dfrac":case"\\dbinom":pt="display";break;case"\\tfrac":case"\\tbinom":pt="text";break}return{type:"genfrac",mode:f.mode,continued:y==="\\cfrac",numer:R,denom:H,hasBarLine:ve,leftDelim:Te,rightDelim:Ke,size:pt,barSize:null}},htmlBuilder:Na,mathmlBuilder:ao}),wn({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(l){var d=l.parser,f=l.funcName,y=l.token,R;switch(f){case"\\over":R="\\frac";break;case"\\choose":R="\\binom";break;case"\\atop":R="\\\\atopfrac";break;case"\\brace":R="\\\\bracefrac";break;case"\\brack":R="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:d.mode,replaceWith:R,token:y}}});var Bs=["display","text","script","scriptscript"],Ws=function(l){var d=null;return l.length>0&&(d=l,d=d==="."?null:d),d};wn({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(l,d){var f=l.parser,y=d[4],R=d[5],H=ur(d[0],"atom");H&&(H=Yr(d[0],"open"));var ve=H?Ws(H.text):null,Te=ur(d[1],"atom");Te&&(Te=Yr(d[1],"close"));var Ke=Te?Ws(Te.text):null,pt=tr(d[2],"size"),Dt,$t=null;pt.isBlank?Dt=!0:($t=pt.value,Dt=$t.number>0);var Qt="auto",an=ur(d[3],"ordgroup");if(an){if(an.body.length>0){var on=tr(an.body[0],"textord");Qt=Bs[Number(on.text)]}}else an=tr(d[3],"textord"),Qt=Bs[Number(an.text)];return{type:"genfrac",mode:f.mode,numer:y,denom:R,continued:!1,hasBarLine:Dt,barSize:$t,leftDelim:ve,rightDelim:Ke,size:Qt}},htmlBuilder:Na,mathmlBuilder:ao}),wn({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(l,d){var f=l.parser,y=l.funcName,R=l.token;return{type:"infix",mode:f.mode,replaceWith:"\\\\abovefrac",size:tr(d[0],"size").value,token:R}}}),wn({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(l,d){var f=l.parser,y=l.funcName,R=d[0],H=z(tr(d[1],"infix").size),ve=d[2],Te=H.number>0;return{type:"genfrac",mode:f.mode,numer:R,denom:ve,continued:!1,hasBarLine:Te,barSize:H,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Na,mathmlBuilder:ao});var Bo=function(l,d){var f=d.style,y,R,H=ur(l,"supsub");H?(y=H.sup?Lr(H.sup,d.havingStyle(f.sup()),d):Lr(H.sub,d.havingStyle(f.sub()),d),R=tr(H.base,"horizBrace")):R=tr(l,"horizBrace");var ve=Lr(R.base,d.havingBaseStyle(E.DISPLAY)),Te=as.svgSpan(R,d),Ke;if(R.isOver?(Ke=Ft.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ve},{type:"kern",size:.1},{type:"elem",elem:Te}]},d),Ke.children[0].children[0].children[1].classes.push("svg-align")):(Ke=Ft.makeVList({positionType:"bottom",positionData:ve.depth+.1+Te.height,children:[{type:"elem",elem:Te},{type:"kern",size:.1},{type:"elem",elem:ve}]},d),Ke.children[0].children[0].children[0].classes.push("svg-align")),y){var pt=Ft.makeSpan(["mord",R.isOver?"mover":"munder"],[Ke],d);R.isOver?Ke=Ft.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:pt},{type:"kern",size:.2},{type:"elem",elem:y}]},d):Ke=Ft.makeVList({positionType:"bottom",positionData:pt.depth+.2+y.height+y.depth,children:[{type:"elem",elem:y},{type:"kern",size:.2},{type:"elem",elem:pt}]},d)}return Ft.makeSpan(["mord",R.isOver?"mover":"munder"],[Ke],d)},In=function(l,d){var f=as.mathMLnode(l.label);return new Tn.MathNode(l.isOver?"mover":"munder",[Pr(l.base,d),f])};wn({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(l,d){var f=l.parser,y=l.funcName;return{type:"horizBrace",mode:f.mode,label:y,isOver:/^\\over/.test(y),base:d[0]}},htmlBuilder:Bo,mathmlBuilder:In}),wn({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(l,d){var f=l.parser,y=d[1],R=tr(d[0],"url").url;return f.settings.isTrusted({command:"\\href",url:R})?{type:"href",mode:f.mode,href:R,body:Ir(y)}:f.formatUnsupportedCmd("\\href")},htmlBuilder:function(l,d){var f=qr(l.body,d,!1);return Ft.makeAnchor(l.href,[],f,d)},mathmlBuilder:function(l,d){var f=ls(l.body,d);return f instanceof mr||(f=new mr("mrow",[f])),f.setAttribute("href",l.href),f}}),wn({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(l,d){var f=l.parser,y=tr(d[0],"url").url;if(!f.settings.isTrusted({command:"\\url",url:y}))return f.formatUnsupportedCmd("\\url");for(var R=[],H=0;H<y.length;H++){var ve=y[H];ve==="~"&&(ve="\\textasciitilde"),R.push({type:"textord",mode:"text",text:ve})}var Te={type:"text",mode:f.mode,font:"\\texttt",body:R};return{type:"href",mode:f.mode,href:y,body:Ir(Te)}}}),wn({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(l,d){var f=l.parser;return{type:"htmlmathml",mode:f.mode,html:Ir(d[0]),mathml:Ir(d[1])}},htmlBuilder:function(l,d){var f=qr(l.html,d,!1);return Ft.makeFragment(f)},mathmlBuilder:function(l,d){return ls(l.mathml,d)}});var oo=function(l){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(l))return{number:+l,unit:"bp"};var d=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(l);if(!d)throw new g("Invalid size: '"+l+"' in \\includegraphics");var f={number:+(d[1]+d[2]),unit:d[3]};if(!vn(f))throw new g("Invalid unit: '"+f.unit+"' in \\includegraphics.");return f};wn({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(l,d,f){var y=l.parser,R={number:0,unit:"em"},H={number:.9,unit:"em"},ve={number:0,unit:"em"},Te="";if(f[0])for(var Ke=tr(f[0],"raw").string,pt=Ke.split(","),Dt=0;Dt<pt.length;Dt++){var $t=pt[Dt].split("=");if($t.length===2){var Qt=$t[1].trim();switch($t[0].trim()){case"alt":Te=Qt;break;case"width":R=oo(Qt);break;case"height":H=oo(Qt);break;case"totalheight":ve=oo(Qt);break;default:throw new g("Invalid key: '"+$t[0]+"' in \\includegraphics.")}}}var an=tr(d[0],"url").url;return Te===""&&(Te=an,Te=Te.replace(/^.*[\\/]/,""),Te=Te.substring(0,Te.lastIndexOf("."))),y.settings.isTrusted({command:"\\includegraphics",url:an})?{type:"includegraphics",mode:y.mode,alt:Te,width:R,height:H,totalheight:ve,src:an}:y.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(l,d){var f=ht(l.height,d),y=0;l.totalheight.number>0&&(y=ht(l.totalheight,d)-f,y=Number(y.toFixed(2)));var R=0;l.width.number>0&&(R=ht(l.width,d));var H={height:f+y+"em"};R>0&&(H.width=R+"em"),y>0&&(H.verticalAlign=-y+"em");var ve=new Z(l.src,l.alt,H);return ve.height=f,ve.depth=y,ve},mathmlBuilder:function(l,d){var f=new Tn.MathNode("mglyph",[]);f.setAttribute("alt",l.alt);var y=ht(l.height,d),R=0;if(l.totalheight.number>0&&(R=ht(l.totalheight,d)-y,R=R.toFixed(2),f.setAttribute("valign","-"+R+"em")),f.setAttribute("height",y+R+"em"),l.width.number>0){var H=ht(l.width,d);f.setAttribute("width",H+"em")}return f.setAttribute("src",l.src),f}}),wn({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(l,d){var f=l.parser,y=l.funcName,R=tr(d[0],"size");if(f.settings.strict){var H=y[1]==="m",ve=R.value.unit==="mu";H?(ve||f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+y+" supports only mu units, "+("not "+R.value.unit+" units")),f.mode!=="math"&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+y+" works only in math mode")):ve&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+y+" doesn't support mu units")}return{type:"kern",mode:f.mode,dimension:R.value}},htmlBuilder:function(l,d){return Ft.makeGlue(l.dimension,d)},mathmlBuilder:function(l,d){var f=ht(l.dimension,d);return new Tn.SpaceNode(f)}}),wn({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(l,d){var f=l.parser,y=l.funcName,R=d[0];return{type:"lap",mode:f.mode,alignment:y.slice(5),body:R}},htmlBuilder:function(l,d){var f;l.alignment==="clap"?(f=Ft.makeSpan([],[Lr(l.body,d)]),f=Ft.makeSpan(["inner"],[f],d)):f=Ft.makeSpan(["inner"],[Lr(l.body,d)]);var y=Ft.makeSpan(["fix"],[]),R=Ft.makeSpan([l.alignment],[f,y],d),H=Ft.makeSpan(["strut"]);return H.style.height=R.height+R.depth+"em",H.style.verticalAlign=-R.depth+"em",R.children.unshift(H),R=Ft.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:R}]},d),Ft.makeSpan(["mord"],[R],d)},mathmlBuilder:function(l,d){var f=new Tn.MathNode("mpadded",[Pr(l.body,d)]);if(l.alignment!=="rlap"){var y=l.alignment==="llap"?"-1":"-0.5";f.setAttribute("lspace",y+"width")}return f.setAttribute("width","0px"),f}}),wn({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(l,d){var f=l.funcName,y=l.parser,R=y.mode;y.switchMode("math");var H=f==="\\("?"\\)":"$",ve=y.parseExpression(!1,H);return y.expect(H),y.switchMode(R),{type:"styling",mode:y.mode,style:"text",body:ve}}}),wn({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(l,d){throw new g("Mismatched "+l.funcName)}});var Zr=function(l,d){switch(d.style.size){case E.DISPLAY.size:return l.display;case E.TEXT.size:return l.text;case E.SCRIPT.size:return l.script;case E.SCRIPTSCRIPT.size:return l.scriptscript;default:return l.text}};wn({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(l,d){var f=l.parser;return{type:"mathchoice",mode:f.mode,display:Ir(d[0]),text:Ir(d[1]),script:Ir(d[2]),scriptscript:Ir(d[3])}},htmlBuilder:function(l,d){var f=Zr(l,d),y=qr(f,d,!1);return Ft.makeFragment(y)},mathmlBuilder:function(l,d){var f=Zr(l,d);return ls(f,d)}});var Ba=function(l,d,f,y,R,H,ve){l=Ft.makeSpan([],[l]);var Te,Ke;if(d){var pt=Lr(d,y.havingStyle(R.sup()),y);Ke={elem:pt,kern:Math.max(y.fontMetrics().bigOpSpacing1,y.fontMetrics().bigOpSpacing3-pt.depth)}}if(f){var Dt=Lr(f,y.havingStyle(R.sub()),y);Te={elem:Dt,kern:Math.max(y.fontMetrics().bigOpSpacing2,y.fontMetrics().bigOpSpacing4-Dt.height)}}var $t;if(Ke&&Te){var Qt=y.fontMetrics().bigOpSpacing5+Te.elem.height+Te.elem.depth+Te.kern+l.depth+ve;$t=Ft.makeVList({positionType:"bottom",positionData:Qt,children:[{type:"kern",size:y.fontMetrics().bigOpSpacing5},{type:"elem",elem:Te.elem,marginLeft:-H+"em"},{type:"kern",size:Te.kern},{type:"elem",elem:l},{type:"kern",size:Ke.kern},{type:"elem",elem:Ke.elem,marginLeft:H+"em"},{type:"kern",size:y.fontMetrics().bigOpSpacing5}]},y)}else if(Te){var an=l.height-ve;$t=Ft.makeVList({positionType:"top",positionData:an,children:[{type:"kern",size:y.fontMetrics().bigOpSpacing5},{type:"elem",elem:Te.elem,marginLeft:-H+"em"},{type:"kern",size:Te.kern},{type:"elem",elem:l}]},y)}else if(Ke){var on=l.depth+ve;$t=Ft.makeVList({positionType:"bottom",positionData:on,children:[{type:"elem",elem:l},{type:"kern",size:Ke.kern},{type:"elem",elem:Ke.elem,marginLeft:H+"em"},{type:"kern",size:y.fontMetrics().bigOpSpacing5}]},y)}else return l;return Ft.makeSpan(["mop","op-limits"],[$t],y)},Xa=["\\smallint"],Da=function(l,d){var f,y,R=!1,H,ve=ur(l,"supsub");ve?(f=ve.sup,y=ve.sub,H=tr(ve.base,"op"),R=!0):H=tr(l,"op");var Te=d.style,Ke=!1;Te.size===E.DISPLAY.size&&H.symbol&&!U.contains(Xa,H.name)&&(Ke=!0);var pt;if(H.symbol){var Dt=Ke?"Size2-Regular":"Size1-Regular",$t="";if((H.name==="\\oiint"||H.name==="\\oiiint")&&($t=H.name.substr(1),H.name=$t==="oiint"?"\\iint":"\\iiint"),pt=Ft.makeSymbol(H.name,Dt,"math",d,["mop","op-symbol",Ke?"large-op":"small-op"]),$t.length>0){var Qt=pt.italic,an=Ft.staticSvg($t+"Size"+(Ke?"2":"1"),d);pt=Ft.makeVList({positionType:"individualShift",children:[{type:"elem",elem:pt,shift:0},{type:"elem",elem:an,shift:Ke?.08:0}]},d),H.name="\\"+$t,pt.classes.unshift("mop"),pt.italic=Qt}}else if(H.body){var on=qr(H.body,d,!0);on.length===1&&on[0]instanceof he?(pt=on[0],pt.classes[0]="mop"):pt=Ft.makeSpan(["mop"],Ft.tryCombineChars(on),d)}else{for(var _n=[],hn=1;hn<H.name.length;hn++)_n.push(Ft.mathsym(H.name[hn],H.mode,d));pt=Ft.makeSpan(["mop"],_n,d)}var bn=0,Dn=0;return(pt instanceof he||H.name==="\\oiint"||H.name==="\\oiiint")&&!H.suppressBaseShift&&(bn=(pt.height-pt.depth)/2-d.fontMetrics().axisHeight,Dn=pt.italic),R?Ba(pt,f,y,d,Te,Dn,bn):(bn&&(pt.style.position="relative",pt.style.top=bn+"em"),pt)},Qa=function(l,d){var f;if(l.symbol)f=new mr("mo",[Fi(l.name,l.mode)]),U.contains(Xa,l.name)&&f.setAttribute("largeop","false");else if(l.body)f=new mr("mo",ss(l.body,d));else{f=new mr("mi",[new zn(l.name.slice(1))]);var y=new mr("mo",[Fi("\u2061","text")]);l.parentIsSupSub?f=new mr("mo",[f,y]):f=ki([f,y])}return f},Sl={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};wn({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:function(l,d){var f=l.parser,y=l.funcName,R=y;return R.length===1&&(R=Sl[R]),{type:"op",mode:f.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:R}},htmlBuilder:Da,mathmlBuilder:Qa}),wn({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(l,d){var f=l.parser,y=d[0];return{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ir(y)}},htmlBuilder:Da,mathmlBuilder:Qa});var rl={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};wn({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler:function(l){var d=l.parser,f=l.funcName;return{type:"op",mode:d.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:f}},htmlBuilder:Da,mathmlBuilder:Qa}),wn({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(l){var d=l.parser,f=l.funcName;return{type:"op",mode:d.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:f}},htmlBuilder:Da,mathmlBuilder:Qa}),wn({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(l){var d=l.parser,f=l.funcName,y=f;return y.length===1&&(y=rl[y]),{type:"op",mode:d.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:y}},htmlBuilder:Da,mathmlBuilder:Qa});var _o=function(l,d){var f,y,R=!1,H,ve=ur(l,"supsub");ve?(f=ve.sup,y=ve.sub,H=tr(ve.base,"operatorname"),R=!0):H=tr(l,"operatorname");var Te;if(H.body.length>0){for(var Ke=H.body.map(function(Qt){var an=Qt.text;return typeof an=="string"?{type:"textord",mode:Qt.mode,text:an}:Qt}),pt=qr(Ke,d.withFont("mathrm"),!0),Dt=0;Dt<pt.length;Dt++){var $t=pt[Dt];$t instanceof he&&($t.text=$t.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}Te=Ft.makeSpan(["mop"],pt,d)}else Te=Ft.makeSpan(["mop"],[],d);return R?Ba(Te,f,y,d,d.style,0,0):Te},lo=function(l,d){for(var f=ss(l.body,d.withFont("mathrm")),y=!0,R=0;R<f.length;R++){var H=f[R];if(!(H instanceof Tn.SpaceNode))if(H instanceof Tn.MathNode)switch(H.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var ve=H.children[0];H.children.length===1&&ve instanceof Tn.TextNode?ve.text=ve.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):y=!1;break}default:y=!1}else y=!1}if(y){var Te=f.map(function(Dt){return Dt.toText()}).join("");f=[new Tn.TextNode(Te)]}var Ke=new Tn.MathNode("mi",f);Ke.setAttribute("mathvariant","normal");var pt=new Tn.MathNode("mo",[Fi("\u2061","text")]);return l.parentIsSupSub?new Tn.MathNode("mo",[Ke,pt]):Tn.newDocumentFragment([Ke,pt])};wn({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(l,d){var f=l.parser,y=l.funcName,R=d[0];return{type:"operatorname",mode:f.mode,body:Ir(R),alwaysHandleSupSub:y==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:_o,mathmlBuilder:lo}),cr({type:"ordgroup",htmlBuilder:function(l,d){return l.semisimple?Ft.makeFragment(qr(l.body,d,!1)):Ft.makeSpan(["mord"],qr(l.body,d,!0),d)},mathmlBuilder:function(l,d){return ls(l.body,d,!0)}}),wn({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(l,d){var f=l.parser,y=d[0];return{type:"overline",mode:f.mode,body:y}},htmlBuilder:function(l,d){var f=Lr(l.body,d.havingCrampedStyle()),y=Ft.makeLineSpan("overline-line",d),R=d.fontMetrics().defaultRuleThickness,H=Ft.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"kern",size:3*R},{type:"elem",elem:y},{type:"kern",size:R}]},d);return Ft.makeSpan(["mord","overline"],[H],d)},mathmlBuilder:function(l,d){var f=new Tn.MathNode("mo",[new Tn.TextNode("\u203E")]);f.setAttribute("stretchy","true");var y=new Tn.MathNode("mover",[Pr(l.body,d),f]);return y.setAttribute("accent","true"),y}}),wn({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(l,d){var f=l.parser,y=d[0];return{type:"phantom",mode:f.mode,body:Ir(y)}},htmlBuilder:function(l,d){var f=qr(l.body,d.withPhantom(),!1);return Ft.makeFragment(f)},mathmlBuilder:function(l,d){var f=ss(l.body,d);return new Tn.MathNode("mphantom",f)}}),wn({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(l,d){var f=l.parser,y=d[0];return{type:"hphantom",mode:f.mode,body:y}},htmlBuilder:function(l,d){var f=Ft.makeSpan([],[Lr(l.body,d.withPhantom())]);if(f.height=0,f.depth=0,f.children)for(var y=0;y<f.children.length;y++)f.children[y].height=0,f.children[y].depth=0;return f=Ft.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},d),Ft.makeSpan(["mord"],[f],d)},mathmlBuilder:function(l,d){var f=ss(Ir(l.body),d),y=new Tn.MathNode("mphantom",f),R=new Tn.MathNode("mpadded",[y]);return R.setAttribute("height","0px"),R.setAttribute("depth","0px"),R}}),wn({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(l,d){var f=l.parser,y=d[0];return{type:"vphantom",mode:f.mode,body:y}},htmlBuilder:function(l,d){var f=Ft.makeSpan(["inner"],[Lr(l.body,d.withPhantom())]),y=Ft.makeSpan(["fix"],[]);return Ft.makeSpan(["mord","rlap"],[f,y],d)},mathmlBuilder:function(l,d){var f=ss(Ir(l.body),d),y=new Tn.MathNode("mphantom",f),R=new Tn.MathNode("mpadded",[y]);return R.setAttribute("width","0px"),R}}),wn({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(l,d){var f=l.parser,y=tr(d[0],"size").value,R=d[1];return{type:"raisebox",mode:f.mode,dy:y,body:R}},htmlBuilder:function(l,d){var f=Lr(l.body,d),y=ht(l.dy,d);return Ft.makeVList({positionType:"shift",positionData:-y,children:[{type:"elem",elem:f}]},d)},mathmlBuilder:function(l,d){var f=new Tn.MathNode("mpadded",[Pr(l.body,d)]),y=l.dy.number+l.dy.unit;return f.setAttribute("voffset",y),f}}),wn({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(l,d,f){var y=l.parser,R=f[0],H=tr(d[0],"size"),ve=tr(d[1],"size");return{type:"rule",mode:y.mode,shift:R&&tr(R,"size").value,width:H.value,height:ve.value}},htmlBuilder:function(l,d){var f=Ft.makeSpan(["mord","rule"],[],d),y=ht(l.width,d),R=ht(l.height,d),H=l.shift?ht(l.shift,d):0;return f.style.borderRightWidth=y+"em",f.style.borderTopWidth=R+"em",f.style.bottom=H+"em",f.width=y,f.height=R+H,f.depth=-H,f.maxFontSize=R*1.125*d.sizeMultiplier,f},mathmlBuilder:function(l,d){var f=ht(l.width,d),y=ht(l.height,d),R=l.shift?ht(l.shift,d):0,H=d.color&&d.getColor()||"black",ve=new Tn.MathNode("mspace");ve.setAttribute("mathbackground",H),ve.setAttribute("width",f+"em"),ve.setAttribute("height",y+"em");var Te=new Tn.MathNode("mpadded",[ve]);return R>=0?Te.setAttribute("height","+"+R+"em"):(Te.setAttribute("height",R+"em"),Te.setAttribute("depth","+"+-R+"em")),Te.setAttribute("voffset",R+"em"),Te}});function Ja(N,l,d){for(var f=qr(N,l,!1),y=l.sizeMultiplier/d.sizeMultiplier,R=0;R<f.length;R++){var H=f[R].classes.indexOf("sizing");H<0?Array.prototype.push.apply(f[R].classes,l.sizingClasses(d)):f[R].classes[H+1]==="reset-size"+l.size&&(f[R].classes[H+1]="reset-size"+d.size),f[R].height*=y,f[R].depth*=y}return Ft.makeFragment(f)}var $o=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],wl=function(l,d){var f=d.havingSize(l.size);return Ja(l.body,f,d)};wn({type:"sizing",names:$o,props:{numArgs:0,allowedInText:!0},handler:function(l,d){var f=l.breakOnTokenText,y=l.funcName,R=l.parser,H=R.parseExpression(!1,f);return{type:"sizing",mode:R.mode,size:$o.indexOf(y)+1,body:H}},htmlBuilder:wl,mathmlBuilder:function(l,d){var f=d.havingSize(l.size),y=ss(l.body,f),R=new Tn.MathNode("mstyle",y);return R.setAttribute("mathsize",f.sizeMultiplier+"em"),R}}),wn({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(l,d,f){var y=l.parser,R=!1,H=!1,ve=f[0]&&tr(f[0],"ordgroup");if(ve)for(var Te="",Ke=0;Ke<ve.body.length;++Ke){var pt=ve.body[Ke];if(Te=pt.text,Te==="t")R=!0;else if(Te==="b")H=!0;else{R=!1,H=!1;break}}else R=!0,H=!0;var Dt=d[0];return{type:"smash",mode:y.mode,body:Dt,smashHeight:R,smashDepth:H}},htmlBuilder:function(l,d){var f=Ft.makeSpan([],[Lr(l.body,d)]);if(!l.smashHeight&&!l.smashDepth)return f;if(l.smashHeight&&(f.height=0,f.children))for(var y=0;y<f.children.length;y++)f.children[y].height=0;if(l.smashDepth&&(f.depth=0,f.children))for(var R=0;R<f.children.length;R++)f.children[R].depth=0;var H=Ft.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},d);return Ft.makeSpan(["mord"],[H],d)},mathmlBuilder:function(l,d){var f=new Tn.MathNode("mpadded",[Pr(l.body,d)]);return l.smashHeight&&f.setAttribute("height","0px"),l.smashDepth&&f.setAttribute("depth","0px"),f}}),wn({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(l,d,f){var y=l.parser,R=f[0],H=d[0];return{type:"sqrt",mode:y.mode,body:H,index:R}},htmlBuilder:function(l,d){var f=Lr(l.body,d.havingCrampedStyle());f.height===0&&(f.height=d.fontMetrics().xHeight),f=Ft.wrapFragment(f,d);var y=d.fontMetrics(),R=y.defaultRuleThickness,H=R;d.style.id<E.TEXT.id&&(H=d.fontMetrics().xHeight);var ve=R+H/4,Te=f.height+f.depth+ve+R,Ke=Hr.sqrtImage(Te,d),pt=Ke.span,Dt=Ke.ruleWidth,$t=Ke.advanceWidth,Qt=pt.height-Dt;Qt>f.height+f.depth+ve&&(ve=(ve+Qt-f.height-f.depth)/2);var an=pt.height-f.height-ve-Dt;f.style.paddingLeft=$t+"em";var on=Ft.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f,wrapperClasses:["svg-align"]},{type:"kern",size:-(f.height+an)},{type:"elem",elem:pt},{type:"kern",size:Dt}]},d);if(l.index){var _n=d.havingStyle(E.SCRIPTSCRIPT),hn=Lr(l.index,_n,d),bn=.6*(on.height-on.depth),Dn=Ft.makeVList({positionType:"shift",positionData:-bn,children:[{type:"elem",elem:hn}]},d),jn=Ft.makeSpan(["root"],[Dn]);return Ft.makeSpan(["mord","sqrt"],[jn,on],d)}else return Ft.makeSpan(["mord","sqrt"],[on],d)},mathmlBuilder:function(l,d){var f=l.body,y=l.index;return y?new Tn.MathNode("mroot",[Pr(f,d),Pr(y,d)]):new Tn.MathNode("msqrt",[Pr(f,d)])}});var Fo={display:E.DISPLAY,text:E.TEXT,script:E.SCRIPT,scriptscript:E.SCRIPTSCRIPT};wn({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(l,d){var f=l.breakOnTokenText,y=l.funcName,R=l.parser,H=R.parseExpression(!0,f),ve=y.slice(1,y.length-5);return{type:"styling",mode:R.mode,style:ve,body:H}},htmlBuilder:function(l,d){var f=Fo[l.style],y=d.havingStyle(f).withFont("");return Ja(l.body,y,d)},mathmlBuilder:function(l,d){var f=Fo[l.style],y=d.havingStyle(f),R=ss(l.body,y),H=new Tn.MathNode("mstyle",R),ve={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},Te=ve[l.style];return H.setAttribute("scriptlevel",Te[0]),H.setAttribute("displaystyle",Te[1]),H}});var Cl=function(l,d){var f=l.base;if(f)if(f.type==="op"){var y=f.limits&&(d.style.size===E.DISPLAY.size||f.alwaysHandleSupSub);return y?Da:null}else if(f.type==="operatorname"){var R=f.alwaysHandleSupSub&&(d.style.size===E.DISPLAY.size||f.limits);return R?_o:null}else{if(f.type==="accent")return U.isCharacterBox(f.base)?ir:null;if(f.type==="horizBrace"){var H=!l.sub;return H===f.isOver?Bo:null}else return null}else return null};cr({type:"supsub",htmlBuilder:function(l,d){var f=Cl(l,d);if(f)return f(l,d);var y=l.base,R=l.sup,H=l.sub,ve=Lr(y,d),Te,Ke,pt=d.fontMetrics(),Dt=0,$t=0,Qt=y&&U.isCharacterBox(y);if(R){var an=d.havingStyle(d.style.sup());Te=Lr(R,an,d),Qt||(Dt=ve.height-an.fontMetrics().supDrop*an.sizeMultiplier/d.sizeMultiplier)}if(H){var on=d.havingStyle(d.style.sub());Ke=Lr(H,on,d),Qt||($t=ve.depth+on.fontMetrics().subDrop*on.sizeMultiplier/d.sizeMultiplier)}var _n;d.style===E.DISPLAY?_n=pt.sup1:d.style.cramped?_n=pt.sup3:_n=pt.sup2;var hn=d.sizeMultiplier,bn=.5/pt.ptPerEm/hn+"em",Dn=null;if(Ke){var jn=l.base&&l.base.type==="op"&&l.base.name&&(l.base.name==="\\oiint"||l.base.name==="\\oiiint");(ve instanceof he||jn)&&(Dn=-ve.italic+"em")}var Gn;if(Te&&Ke){Dt=Math.max(Dt,_n,Te.depth+.25*pt.xHeight),$t=Math.max($t,pt.sub2);var Mn=pt.defaultRuleThickness,_r=4*Mn;if(Dt-Te.depth-(Ke.height-$t)<_r){$t=_r-(Dt-Te.depth)+Ke.height;var Tr=.8*pt.xHeight-(Dt-Te.depth);Tr>0&&(Dt+=Tr,$t-=Tr)}var gi=[{type:"elem",elem:Ke,shift:$t,marginRight:bn,marginLeft:Dn},{type:"elem",elem:Te,shift:-Dt,marginRight:bn}];Gn=Ft.makeVList({positionType:"individualShift",children:gi},d)}else if(Ke){$t=Math.max($t,pt.sub1,Ke.height-.8*pt.xHeight);var ni=[{type:"elem",elem:Ke,marginLeft:Dn,marginRight:bn}];Gn=Ft.makeVList({positionType:"shift",positionData:$t,children:ni},d)}else if(Te)Dt=Math.max(Dt,_n,Te.depth+.25*pt.xHeight),Gn=Ft.makeVList({positionType:"shift",positionData:-Dt,children:[{type:"elem",elem:Te,marginRight:bn}]},d);else throw new Error("supsub must have either sup or sub.");var Rt=ii(ve,"right")||"mord";return Ft.makeSpan([Rt],[ve,Ft.makeSpan(["msupsub"],[Gn])],d)},mathmlBuilder:function(l,d){var f=!1,y,R,H=ur(l.base,"horizBrace");H&&(R=!!l.sup,R===H.isOver&&(f=!0,y=H.isOver)),l.base&&(l.base.type==="op"||l.base.type==="operatorname")&&(l.base.parentIsSupSub=!0);var ve=[Pr(l.base,d)];l.sub&&ve.push(Pr(l.sub,d)),l.sup&&ve.push(Pr(l.sup,d));var Te;if(f)Te=y?"mover":"munder";else if(l.sub)if(l.sup){var Dt=l.base;Dt&&Dt.type==="op"&&Dt.limits&&d.style===E.DISPLAY||Dt&&Dt.type==="operatorname"&&Dt.alwaysHandleSupSub&&(d.style===E.DISPLAY||Dt.limits)?Te="munderover":Te="msubsup"}else{var pt=l.base;pt&&pt.type==="op"&&pt.limits&&(d.style===E.DISPLAY||pt.alwaysHandleSupSub)||pt&&pt.type==="operatorname"&&pt.alwaysHandleSupSub&&(pt.limits||d.style===E.DISPLAY)?Te="munder":Te="msub"}else{var Ke=l.base;Ke&&Ke.type==="op"&&Ke.limits&&(d.style===E.DISPLAY||Ke.alwaysHandleSupSub)||Ke&&Ke.type==="operatorname"&&Ke.alwaysHandleSupSub&&(Ke.limits||d.style===E.DISPLAY)?Te="mover":Te="msup"}var $t=new Tn.MathNode(Te,ve);return $t}}),cr({type:"atom",htmlBuilder:function(l,d){return Ft.mathsym(l.text,l.mode,d,["m"+l.family])},mathmlBuilder:function(l,d){var f=new Tn.MathNode("mo",[Fi(l.text,l.mode)]);if(l.family==="bin"){var y=vs(l,d);y==="bold-italic"&&f.setAttribute("mathvariant",y)}else l.family==="punct"?f.setAttribute("separator","true"):(l.family==="open"||l.family==="close")&&f.setAttribute("stretchy","false");return f}});var xo={mi:"italic",mn:"normal",mtext:"normal"};cr({type:"mathord",htmlBuilder:function(l,d){return Ft.makeOrd(l,d,"mathord")},mathmlBuilder:function(l,d){var f=new Tn.MathNode("mi",[Fi(l.text,l.mode,d)]),y=vs(l,d)||"italic";return y!==xo[f.type]&&f.setAttribute("mathvariant",y),f}}),cr({type:"textord",htmlBuilder:function(l,d){return Ft.makeOrd(l,d,"textord")},mathmlBuilder:function(l,d){var f=Fi(l.text,l.mode,d),y=vs(l,d)||"normal",R;return l.mode==="text"?R=new Tn.MathNode("mtext",[f]):/[0-9]/.test(l.text)?R=new Tn.MathNode("mn",[f]):l.text==="\\prime"?R=new Tn.MathNode("mo",[f]):R=new Tn.MathNode("mi",[f]),y!==xo[R.type]&&R.setAttribute("mathvariant",y),R}});var po={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},qa={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};cr({type:"spacing",htmlBuilder:function(l,d){if(qa.hasOwnProperty(l.text)){var f=qa[l.text].className||"";if(l.mode==="text"){var y=Ft.makeOrd(l,d,"textord");return y.classes.push(f),y}else return Ft.makeSpan(["mspace",f],[Ft.mathsym(l.text,l.mode,d)],d)}else{if(po.hasOwnProperty(l.text))return Ft.makeSpan(["mspace",po[l.text]],[],d);throw new g('Unknown type of space "'+l.text+'"')}},mathmlBuilder:function(l,d){var f;if(qa.hasOwnProperty(l.text))f=new Tn.MathNode("mtext",[new Tn.TextNode("\xA0")]);else{if(po.hasOwnProperty(l.text))return new Tn.MathNode("mspace");throw new g('Unknown type of space "'+l.text+'"')}return f}});var uo=function(){var l=new Tn.MathNode("mtd",[]);return l.setAttribute("width","50%"),l};cr({type:"tag",mathmlBuilder:function(l,d){var f=new Tn.MathNode("mtable",[new Tn.MathNode("mtr",[uo(),new Tn.MathNode("mtd",[ls(l.body,d)]),uo(),new Tn.MathNode("mtd",[ls(l.tag,d)])])]);return f.setAttribute("width","100%"),f}});var zo={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Uo={"\\textbf":"textbf","\\textmd":"textmd"},Ko={"\\textit":"textit","\\textup":"textup"},Eo=function(l,d){var f=l.font;return f?zo[f]?d.withTextFontFamily(zo[f]):Uo[f]?d.withTextFontWeight(Uo[f]):d.withTextFontShape(Ko[f]):d};wn({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(l,d){var f=l.parser,y=l.funcName,R=d[0];return{type:"text",mode:f.mode,body:Ir(R),font:y}},htmlBuilder:function(l,d){var f=Eo(l,d),y=qr(l.body,f,!0);return Ft.makeSpan(["mord","text"],Ft.tryCombineChars(y),f)},mathmlBuilder:function(l,d){var f=Eo(l,d);return ls(l.body,f)}}),wn({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(l,d){var f=l.parser;return{type:"underline",mode:f.mode,body:d[0]}},htmlBuilder:function(l,d){var f=Lr(l.body,d),y=Ft.makeLineSpan("underline-line",d),R=d.fontMetrics().defaultRuleThickness,H=Ft.makeVList({positionType:"top",positionData:f.height,children:[{type:"kern",size:R},{type:"elem",elem:y},{type:"kern",size:3*R},{type:"elem",elem:f}]},d);return Ft.makeSpan(["mord","underline"],[H],d)},mathmlBuilder:function(l,d){var f=new Tn.MathNode("mo",[new Tn.TextNode("\u203E")]);f.setAttribute("stretchy","true");var y=new Tn.MathNode("munder",[Pr(l.body,d),f]);return y.setAttribute("accentunder","true"),y}}),wn({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(l,d,f){throw new g("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(l,d){for(var f=Zo(l),y=[],R=d.havingStyle(d.style.text()),H=0;H<f.length;H++){var ve=f[H];ve==="~"&&(ve="\\textasciitilde"),y.push(Ft.makeSymbol(ve,"Typewriter-Regular",l.mode,R,["mord","texttt"]))}return Ft.makeSpan(["mord","text"].concat(R.sizingClasses(d)),Ft.tryCombineChars(y),R)},mathmlBuilder:function(l,d){var f=new Tn.TextNode(Zo(l)),y=new Tn.MathNode("mtext",[f]);return y.setAttribute("mathvariant","monospace"),y}});var Zo=function(l){return l.body.replace(/ /g,l.star?"\u2423":"\xA0")},So=Un,co=So,jo=`[ \r
]`,wo="\\\\[a-zA-Z@]+",il="\\\\[^\uD800-\uDFFF]",sl=""+wo+jo+"*",al=new RegExp("^("+wo+")"+jo+"*$"),Co="[\u0300-\u036F]",Tl=new RegExp(Co+"+$"),go="("+jo+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(Co+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Co+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+sl)+("|"+il+")"),ol=function(){function N(d,f){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=d,this.settings=f,this.tokenRegex=new RegExp(go,"g"),this.catcodes={"%":14}}var l=N.prototype;return l.setCatcode=function(f,y){this.catcodes[f]=y},l.lex=function(){var f=this.input,y=this.tokenRegex.lastIndex;if(y===f.length)return new ie("EOF",new $(this,y,y));var R=this.tokenRegex.exec(f);if(R===null||R.index!==y)throw new g("Unexpected character: '"+f[y]+"'",new ie(f[y],new $(this,y,y+1)));var H=R[2]||" ";if(this.catcodes[H]===14){var ve=f.indexOf(`
`,this.tokenRegex.lastIndex);return ve===-1?(this.tokenRegex.lastIndex=f.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=ve+1,this.lex()}var Te=H.match(al);return Te&&(H=Te[1]),new ie(H,new $(this,y,this.tokenRegex.lastIndex))},N}(),ll=function(){function N(d,f){d===void 0&&(d={}),f===void 0&&(f={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=f,this.builtins=d,this.undefStack=[]}var l=N.prototype;return l.beginGroup=function(){this.undefStack.push({})},l.endGroup=function(){if(this.undefStack.length===0)throw new g("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var f=this.undefStack.pop();for(var y in f)f.hasOwnProperty(y)&&(f[y]===void 0?delete this.current[y]:this.current[y]=f[y])},l.has=function(f){return this.current.hasOwnProperty(f)||this.builtins.hasOwnProperty(f)},l.get=function(f){return this.current.hasOwnProperty(f)?this.current[f]:this.builtins[f]},l.set=function(f,y,R){if(R===void 0&&(R=!1),R){for(var H=0;H<this.undefStack.length;H++)delete this.undefStack[H][f];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][f]=y)}else{var ve=this.undefStack[this.undefStack.length-1];ve&&!ve.hasOwnProperty(f)&&(ve[f]=this.current[f])}this.current[f]=y},N}(),Ho={},ul=Ho;function it(N,l){Ho[N]=l}it("\\@firstoftwo",function(N){var l=N.consumeArgs(2);return{tokens:l[0],numArgs:0}}),it("\\@secondoftwo",function(N){var l=N.consumeArgs(2);return{tokens:l[1],numArgs:0}}),it("\\@ifnextchar",function(N){var l=N.consumeArgs(3),d=N.future();return l[0].length===1&&l[0][0].text===d.text?{tokens:l[1],numArgs:0}:{tokens:l[2],numArgs:0}}),it("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),it("\\TextOrMath",function(N){var l=N.consumeArgs(2);return N.mode==="text"?{tokens:l[0],numArgs:0}:{tokens:l[1],numArgs:0}});var Wo={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};it("\\char",function(N){var l=N.popToken(),d,f="";if(l.text==="'")d=8,l=N.popToken();else if(l.text==='"')d=16,l=N.popToken();else if(l.text==="`")if(l=N.popToken(),l.text[0]==="\\")f=l.text.charCodeAt(1);else{if(l.text==="EOF")throw new g("\\char` missing argument");f=l.text.charCodeAt(0)}else d=10;if(d){if(f=Wo[l.text],f==null||f>=d)throw new g("Invalid base-"+d+" digit "+l.text);for(var y;(y=Wo[N.future().text])!=null&&y<d;)f*=d,f+=y,N.popToken()}return"\\@char{"+f+"}"});var To=function(l,d){var f=l.consumeArgs(1)[0];if(f.length!==1)throw new g("\\gdef's first argument must be a macro name");var y=f[0].text,R=0;for(f=l.consumeArgs(1)[0];f.length===1&&f[0].text==="#";){if(f=l.consumeArgs(1)[0],f.length!==1)throw new g('Invalid argument number length "'+f.length+'"');if(!/^[1-9]$/.test(f[0].text))throw new g('Invalid argument number "'+f[0].text+'"');if(R++,parseInt(f[0].text)!==R)throw new g('Argument number "'+f[0].text+'" out of order');f=l.consumeArgs(1)[0]}return l.macros.set(y,{tokens:f,numArgs:R},d),""};it("\\gdef",function(N){return To(N,!0)}),it("\\def",function(N){return To(N,!1)}),it("\\global",function(N){var l=N.consumeArgs(1)[0];if(l.length!==1)throw new g("Invalid command after \\global");var d=l[0].text;if(d==="\\def")return To(N,!0);throw new g("Invalid command '"+d+"' after \\global")});var Ao=function(l,d,f){var y=l.consumeArgs(1)[0];if(y.length!==1)throw new g("\\newcommand's first argument must be a macro name");var R=y[0].text,H=l.isDefined(R);if(H&&!d)throw new g("\\newcommand{"+R+"} attempting to redefine "+(R+"; use \\renewcommand"));if(!H&&!f)throw new g("\\renewcommand{"+R+"} when command "+R+" does not yet exist; use \\newcommand");var ve=0;if(y=l.consumeArgs(1)[0],y.length===1&&y[0].text==="["){for(var Te="",Ke=l.expandNextToken();Ke.text!=="]"&&Ke.text!=="EOF";)Te+=Ke.text,Ke=l.expandNextToken();if(!Te.match(/^\s*[0-9]+\s*$/))throw new g("Invalid number of arguments: "+Te);ve=parseInt(Te),y=l.consumeArgs(1)[0]}return l.macros.set(R,{tokens:y,numArgs:ve}),""};it("\\newcommand",function(N){return Ao(N,!1,!0)}),it("\\renewcommand",function(N){return Ao(N,!0,!1)}),it("\\providecommand",function(N){return Ao(N,!0,!0)}),it("\\bgroup","{"),it("\\egroup","}"),it("\\lq","`"),it("\\rq","'"),it("\\aa","\\r a"),it("\\AA","\\r A"),it("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),it("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),it("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),it("\u212C","\\mathscr{B}"),it("\u2130","\\mathscr{E}"),it("\u2131","\\mathscr{F}"),it("\u210B","\\mathscr{H}"),it("\u2110","\\mathscr{I}"),it("\u2112","\\mathscr{L}"),it("\u2133","\\mathscr{M}"),it("\u211B","\\mathscr{R}"),it("\u212D","\\mathfrak{C}"),it("\u210C","\\mathfrak{H}"),it("\u2128","\\mathfrak{Z}"),it("\\Bbbk","\\Bbb{k}"),it("\xB7","\\cdotp"),it("\\llap","\\mathllap{\\textrm{#1}}"),it("\\rlap","\\mathrlap{\\textrm{#1}}"),it("\\clap","\\mathclap{\\textrm{#1}}"),it("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),it("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),it("\\ne","\\neq"),it("\u2260","\\neq"),it("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),it("\u2209","\\notin"),it("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),it("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),it("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),it("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),it("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),it("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),it("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),it("\u27C2","\\perp"),it("\u203C","\\mathclose{!\\mkern-0.8mu!}"),it("\u220C","\\notni"),it("\u231C","\\ulcorner"),it("\u231D","\\urcorner"),it("\u231E","\\llcorner"),it("\u231F","\\lrcorner"),it("\xA9","\\copyright"),it("\xAE","\\textregistered"),it("\uFE0F","\\textregistered"),it("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),it("\u22EE","\\vdots"),it("\\varGamma","\\mathit{\\Gamma}"),it("\\varDelta","\\mathit{\\Delta}"),it("\\varTheta","\\mathit{\\Theta}"),it("\\varLambda","\\mathit{\\Lambda}"),it("\\varXi","\\mathit{\\Xi}"),it("\\varPi","\\mathit{\\Pi}"),it("\\varSigma","\\mathit{\\Sigma}"),it("\\varUpsilon","\\mathit{\\Upsilon}"),it("\\varPhi","\\mathit{\\Phi}"),it("\\varPsi","\\mathit{\\Psi}"),it("\\varOmega","\\mathit{\\Omega}"),it("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),it("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),it("\\boxed","\\fbox{$\\displaystyle{#1}$}"),it("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),it("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),it("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var Vo={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};it("\\dots",function(N){var l="\\dotso",d=N.expandAfterFuture().text;return d in Vo?l=Vo[d]:(d.substr(0,4)==="\\not"||d in kt.math&&U.contains(["bin","rel"],kt.math[d].group))&&(l="\\dotsb"),l});var eo={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};it("\\dotso",function(N){var l=N.future().text;return l in eo?"\\ldots\\,":"\\ldots"}),it("\\dotsc",function(N){var l=N.future().text;return l in eo&&l!==","?"\\ldots\\,":"\\ldots"}),it("\\cdots",function(N){var l=N.future().text;return l in eo?"\\@cdots\\,":"\\@cdots"}),it("\\dotsb","\\cdots"),it("\\dotsm","\\cdots"),it("\\dotsi","\\!\\cdots"),it("\\dotsx","\\ldots\\,"),it("\\DOTSI","\\relax"),it("\\DOTSB","\\relax"),it("\\DOTSX","\\relax"),it("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),it("\\,","\\tmspace+{3mu}{.1667em}"),it("\\thinspace","\\,"),it("\\>","\\mskip{4mu}"),it("\\:","\\tmspace+{4mu}{.2222em}"),it("\\medspace","\\:"),it("\\;","\\tmspace+{5mu}{.2777em}"),it("\\thickspace","\\;"),it("\\!","\\tmspace-{3mu}{.1667em}"),it("\\negthinspace","\\!"),it("\\negmedspace","\\tmspace-{4mu}{.2222em}"),it("\\negthickspace","\\tmspace-{5mu}{.277em}"),it("\\enspace","\\kern.5em "),it("\\enskip","\\hskip.5em\\relax"),it("\\quad","\\hskip1em\\relax"),it("\\qquad","\\hskip2em\\relax"),it("\\tag","\\@ifstar\\tag@literal\\tag@paren"),it("\\tag@paren","\\tag@literal{({#1})}"),it("\\tag@literal",function(N){if(N.macros.get("\\df@tag"))throw new g("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),it("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),it("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),it("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),it("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),it("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),it("\\\\","\\newline"),it("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ma=re["Main-Regular"][84][1]-.7*re["Main-Regular"][65][1]+"em";it("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ma+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),it("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ma+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),it("\\hspace","\\@ifstar\\@hspacer\\@hspace"),it("\\@hspace","\\hskip #1\\relax"),it("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),it("\\ordinarycolon",":"),it("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),it("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),it("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),it("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),it("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),it("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),it("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),it("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),it("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),it("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),it("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),it("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),it("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),it("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),it("\u2237","\\dblcolon"),it("\u2239","\\eqcolon"),it("\u2254","\\coloneqq"),it("\u2255","\\eqqcolon"),it("\u2A74","\\Coloneqq"),it("\\ratio","\\vcentcolon"),it("\\coloncolon","\\dblcolon"),it("\\colonequals","\\coloneqq"),it("\\coloncolonequals","\\Coloneqq"),it("\\equalscolon","\\eqqcolon"),it("\\equalscoloncolon","\\Eqqcolon"),it("\\colonminus","\\coloneq"),it("\\coloncolonminus","\\Coloneq"),it("\\minuscolon","\\eqcolon"),it("\\minuscoloncolon","\\Eqcolon"),it("\\coloncolonapprox","\\Colonapprox"),it("\\coloncolonsim","\\Colonsim"),it("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),it("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),it("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),it("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),it("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),it("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),it("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),it("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),it("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),it("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),it("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),it("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),it("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),it("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),it("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),it("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),it("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),it("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),it("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),it("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),it("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),it("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),it("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),it("\u27E6","\\llbracket"),it("\u27E7","\\rrbracket"),it("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),it("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),it("\u2983","\\lBrace"),it("\u2984","\\rBrace"),it("\\darr","\\downarrow"),it("\\dArr","\\Downarrow"),it("\\Darr","\\Downarrow"),it("\\lang","\\langle"),it("\\rang","\\rangle"),it("\\uarr","\\uparrow"),it("\\uArr","\\Uparrow"),it("\\Uarr","\\Uparrow"),it("\\N","\\mathbb{N}"),it("\\R","\\mathbb{R}"),it("\\Z","\\mathbb{Z}"),it("\\alef","\\aleph"),it("\\alefsym","\\aleph"),it("\\Alpha","\\mathrm{A}"),it("\\Beta","\\mathrm{B}"),it("\\bull","\\bullet"),it("\\Chi","\\mathrm{X}"),it("\\clubs","\\clubsuit"),it("\\cnums","\\mathbb{C}"),it("\\Complex","\\mathbb{C}"),it("\\Dagger","\\ddagger"),it("\\diamonds","\\diamondsuit"),it("\\empty","\\emptyset"),it("\\Epsilon","\\mathrm{E}"),it("\\Eta","\\mathrm{H}"),it("\\exist","\\exists"),it("\\harr","\\leftrightarrow"),it("\\hArr","\\Leftrightarrow"),it("\\Harr","\\Leftrightarrow"),it("\\hearts","\\heartsuit"),it("\\image","\\Im"),it("\\infin","\\infty"),it("\\Iota","\\mathrm{I}"),it("\\isin","\\in"),it("\\Kappa","\\mathrm{K}"),it("\\larr","\\leftarrow"),it("\\lArr","\\Leftarrow"),it("\\Larr","\\Leftarrow"),it("\\lrarr","\\leftrightarrow"),it("\\lrArr","\\Leftrightarrow"),it("\\Lrarr","\\Leftrightarrow"),it("\\Mu","\\mathrm{M}"),it("\\natnums","\\mathbb{N}"),it("\\Nu","\\mathrm{N}"),it("\\Omicron","\\mathrm{O}"),it("\\plusmn","\\pm"),it("\\rarr","\\rightarrow"),it("\\rArr","\\Rightarrow"),it("\\Rarr","\\Rightarrow"),it("\\real","\\Re"),it("\\reals","\\mathbb{R}"),it("\\Reals","\\mathbb{R}"),it("\\Rho","\\mathrm{P}"),it("\\sdot","\\cdot"),it("\\sect","\\S"),it("\\spades","\\spadesuit"),it("\\sub","\\subset"),it("\\sube","\\subseteq"),it("\\supe","\\supseteq"),it("\\Tau","\\mathrm{T}"),it("\\thetasym","\\vartheta"),it("\\weierp","\\wp"),it("\\Zeta","\\mathrm{Z}"),it("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),it("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),it("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),it("\\blue","\\textcolor{##6495ed}{#1}"),it("\\orange","\\textcolor{##ffa500}{#1}"),it("\\pink","\\textcolor{##ff00af}{#1}"),it("\\red","\\textcolor{##df0030}{#1}"),it("\\green","\\textcolor{##28ae7b}{#1}"),it("\\gray","\\textcolor{gray}{#1}"),it("\\purple","\\textcolor{##9d38bd}{#1}"),it("\\blueA","\\textcolor{##ccfaff}{#1}"),it("\\blueB","\\textcolor{##80f6ff}{#1}"),it("\\blueC","\\textcolor{##63d9ea}{#1}"),it("\\blueD","\\textcolor{##11accd}{#1}"),it("\\blueE","\\textcolor{##0c7f99}{#1}"),it("\\tealA","\\textcolor{##94fff5}{#1}"),it("\\tealB","\\textcolor{##26edd5}{#1}"),it("\\tealC","\\textcolor{##01d1c1}{#1}"),it("\\tealD","\\textcolor{##01a995}{#1}"),it("\\tealE","\\textcolor{##208170}{#1}"),it("\\greenA","\\textcolor{##b6ffb0}{#1}"),it("\\greenB","\\textcolor{##8af281}{#1}"),it("\\greenC","\\textcolor{##74cf70}{#1}"),it("\\greenD","\\textcolor{##1fab54}{#1}"),it("\\greenE","\\textcolor{##0d923f}{#1}"),it("\\goldA","\\textcolor{##ffd0a9}{#1}"),it("\\goldB","\\textcolor{##ffbb71}{#1}"),it("\\goldC","\\textcolor{##ff9c39}{#1}"),it("\\goldD","\\textcolor{##e07d10}{#1}"),it("\\goldE","\\textcolor{##a75a05}{#1}"),it("\\redA","\\textcolor{##fca9a9}{#1}"),it("\\redB","\\textcolor{##ff8482}{#1}"),it("\\redC","\\textcolor{##f9685d}{#1}"),it("\\redD","\\textcolor{##e84d39}{#1}"),it("\\redE","\\textcolor{##bc2612}{#1}"),it("\\maroonA","\\textcolor{##ffbde0}{#1}"),it("\\maroonB","\\textcolor{##ff92c6}{#1}"),it("\\maroonC","\\textcolor{##ed5fa6}{#1}"),it("\\maroonD","\\textcolor{##ca337c}{#1}"),it("\\maroonE","\\textcolor{##9e034e}{#1}"),it("\\purpleA","\\textcolor{##ddd7ff}{#1}"),it("\\purpleB","\\textcolor{##c6b9fc}{#1}"),it("\\purpleC","\\textcolor{##aa87ff}{#1}"),it("\\purpleD","\\textcolor{##7854ab}{#1}"),it("\\purpleE","\\textcolor{##543b78}{#1}"),it("\\mintA","\\textcolor{##f5f9e8}{#1}"),it("\\mintB","\\textcolor{##edf2df}{#1}"),it("\\mintC","\\textcolor{##e0e5cc}{#1}"),it("\\grayA","\\textcolor{##f6f7f7}{#1}"),it("\\grayB","\\textcolor{##f0f1f2}{#1}"),it("\\grayC","\\textcolor{##e3e5e6}{#1}"),it("\\grayD","\\textcolor{##d6d8da}{#1}"),it("\\grayE","\\textcolor{##babec2}{#1}"),it("\\grayF","\\textcolor{##888d93}{#1}"),it("\\grayG","\\textcolor{##626569}{#1}"),it("\\grayH","\\textcolor{##3b3e40}{#1}"),it("\\grayI","\\textcolor{##21242c}{#1}"),it("\\kaBlue","\\textcolor{##314453}{#1}"),it("\\kaGreen","\\textcolor{##71B307}{#1}");var Io={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Go=function(){function N(d,f,y){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=f,this.expansionCount=0,this.feed(d),this.macros=new ll(ul,f.macros),this.mode=y,this.stack=[]}var l=N.prototype;return l.feed=function(f){this.lexer=new ol(f,this.settings)},l.switchMode=function(f){this.mode=f},l.beginGroup=function(){this.macros.beginGroup()},l.endGroup=function(){this.macros.endGroup()},l.future=function(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},l.popToken=function(){return this.future(),this.stack.pop()},l.pushToken=function(f){this.stack.push(f)},l.pushTokens=function(f){var y;(y=this.stack).push.apply(y,f)},l.consumeSpaces=function(){for(;;){var f=this.future();if(f.text===" ")this.stack.pop();else break}},l.consumeArgs=function(f){for(var y=[],R=0;R<f;++R){this.consumeSpaces();var H=this.popToken();if(H.text==="{"){for(var ve=[],Te=1;Te!==0;){var Ke=this.popToken();if(ve.push(Ke),Ke.text==="{")++Te;else if(Ke.text==="}")--Te;else if(Ke.text==="EOF")throw new g("End of input in macro argument",H)}ve.pop(),ve.reverse(),y[R]=ve}else{if(H.text==="EOF")throw new g("End of input expecting macro argument");y[R]=[H]}}return y},l.expandOnce=function(){var f=this.popToken(),y=f.text,R=this._getExpansion(y);if(R==null)return this.pushToken(f),f;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new g("Too many expansions: infinite loop or need to increase maxExpand setting");var H=R.tokens;if(R.numArgs){var ve=this.consumeArgs(R.numArgs);H=H.slice();for(var Te=H.length-1;Te>=0;--Te){var Ke=H[Te];if(Ke.text==="#"){if(Te===0)throw new g("Incomplete placeholder at end of macro body",Ke);if(Ke=H[--Te],Ke.text==="#")H.splice(Te+1,1);else if(/^[1-9]$/.test(Ke.text)){var pt;(pt=H).splice.apply(pt,[Te,2].concat(ve[+Ke.text-1]))}else throw new g("Not a valid argument number",Ke)}}}return this.pushTokens(H),H},l.expandAfterFuture=function(){return this.expandOnce(),this.future()},l.expandNextToken=function(){for(;;){var f=this.expandOnce();if(f instanceof ie)if(f.text==="\\relax")this.stack.pop();else return this.stack.pop()}throw new Error},l.expandMacro=function(f){if(this.macros.get(f)){var y=[],R=this.stack.length;for(this.pushToken(new ie(f));this.stack.length>R;){var H=this.expandOnce();H instanceof ie&&y.push(this.stack.pop())}return y}},l.expandMacroAsText=function(f){var y=this.expandMacro(f);return y&&y.map(function(R){return R.text}).join("")},l._getExpansion=function(f){var y=this.macros.get(f);if(y==null)return y;var R=typeof y=="function"?y(this):y;if(typeof R=="string"){var H=0;if(R.indexOf("#")!==-1)for(var ve=R.replace(/##/g,"");ve.indexOf("#"+(H+1))!==-1;)++H;for(var Te=new ol(R,this.settings),Ke=[],pt=Te.lex();pt.text!=="EOF";)Ke.push(pt),pt=Te.lex();Ke.reverse();var Dt={tokens:Ke,numArgs:H};return Dt}return R},l.isDefined=function(f){return this.macros.has(f)||co.hasOwnProperty(f)||kt.math.hasOwnProperty(f)||kt.text.hasOwnProperty(f)||Io.hasOwnProperty(f)},N}(),se={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"}},ne={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u010F:"d\u030C",\u1E0B:"d\u0307",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u013A:"l\u0301",\u013E:"l\u030C",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u010E:"D\u030C",\u1E0A:"D\u0307",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0139:"L\u0301",\u013D:"L\u030C",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u0164:"T\u030C",\u1E6A:"T\u0307",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},Le=function(){function N(d,f){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Go(d,f,this.mode),this.settings=f,this.leftrightDepth=0}var l=N.prototype;return l.expect=function(f,y){if(y===void 0&&(y=!0),this.fetch().text!==f)throw new g("Expected '"+f+"', got '"+this.fetch().text+"'",this.fetch());y&&this.consume()},l.consume=function(){this.nextToken=null},l.fetch=function(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},l.switchMode=function(f){this.mode=f,this.gullet.switchMode(f)},l.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var f=this.parseExpression(!1);return this.expect("EOF"),this.gullet.endGroup(),f},l.parseExpression=function(f,y){for(var R=[];;){this.mode==="math"&&this.consumeSpaces();var H=this.fetch();if(N.endOfExpression.indexOf(H.text)!==-1||y&&H.text===y||f&&co[H.text]&&co[H.text].infix)break;var ve=this.parseAtom(y);if(!ve)break;R.push(ve)}return this.mode==="text"&&this.formLigatures(R),this.handleInfixNodes(R)},l.handleInfixNodes=function(f){for(var y=-1,R,H=0;H<f.length;H++){var ve=ur(f[H],"infix");if(ve){if(y!==-1)throw new g("only one infix operator per group",ve.token);y=H,R=ve.replaceWith}}if(y!==-1&&R){var Te,Ke,pt=f.slice(0,y),Dt=f.slice(y+1);pt.length===1&&pt[0].type==="ordgroup"?Te=pt[0]:Te={type:"ordgroup",mode:this.mode,body:pt},Dt.length===1&&Dt[0].type==="ordgroup"?Ke=Dt[0]:Ke={type:"ordgroup",mode:this.mode,body:Dt};var $t;return R==="\\\\abovefrac"?$t=this.callFunction(R,[Te,f[y],Ke],[]):$t=this.callFunction(R,[Te,Ke],[]),[$t]}else return f},l.handleSupSubscript=function(f){var y=this.fetch(),R=y.text;this.consume();var H=this.parseGroup(f,!1,N.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!H)throw new g("Expected group after '"+R+"'",y);return H},l.formatUnsupportedCmd=function(f){for(var y=[],R=0;R<f.length;R++)y.push({type:"textord",mode:"text",text:f[R]});var H={type:"text",mode:this.mode,body:y},ve={type:"color",mode:this.mode,color:this.settings.errorColor,body:[H]};return ve},l.parseAtom=function(f){var y=this.parseGroup("atom",!1,null,f);if(this.mode==="text")return y;for(var R,H;;){this.consumeSpaces();var ve=this.fetch();if(ve.text==="\\limits"||ve.text==="\\nolimits"){var Te=ur(y,"op");if(Te){var Ke=ve.text==="\\limits";Te.limits=Ke,Te.alwaysHandleSupSub=!0}else if(Te=ur(y,"operatorname"),Te&&Te.alwaysHandleSupSub){var pt=ve.text==="\\limits";Te.limits=pt}else throw new g("Limit controls must follow a math operator",ve);this.consume()}else if(ve.text==="^"){if(R)throw new g("Double superscript",ve);R=this.handleSupSubscript("superscript")}else if(ve.text==="_"){if(H)throw new g("Double subscript",ve);H=this.handleSupSubscript("subscript")}else if(ve.text==="'"){if(R)throw new g("Double superscript",ve);var Dt={type:"textord",mode:this.mode,text:"\\prime"},$t=[Dt];for(this.consume();this.fetch().text==="'";)$t.push(Dt),this.consume();this.fetch().text==="^"&&$t.push(this.handleSupSubscript("superscript")),R={type:"ordgroup",mode:this.mode,body:$t}}else break}return R||H?{type:"supsub",mode:this.mode,base:y,sup:R,sub:H}:y},l.parseFunction=function(f,y,R){var H=this.fetch(),ve=H.text,Te=co[ve];if(!Te)return null;if(this.consume(),R!=null&&Te.greediness<=R)throw new g("Got function '"+ve+"' with no arguments"+(y?" as "+y:""),H);if(this.mode==="text"&&!Te.allowedInText)throw new g("Can't use function '"+ve+"' in text mode",H);if(this.mode==="math"&&Te.allowedInMath===!1)throw new g("Can't use function '"+ve+"' in math mode",H);var Ke=this.parseArguments(ve,Te),pt=Ke.args,Dt=Ke.optArgs;return this.callFunction(ve,pt,Dt,H,f)},l.callFunction=function(f,y,R,H,ve){var Te={funcName:f,parser:this,token:H,breakOnTokenText:ve},Ke=co[f];if(Ke&&Ke.handler)return Ke.handler(Te,y,R);throw new g("No function handler for "+f)},l.parseArguments=function(f,y){var R=y.numArgs+y.numOptionalArgs;if(R===0)return{args:[],optArgs:[]};for(var H=y.greediness,ve=[],Te=[],Ke=0;Ke<R;Ke++){var pt=y.argTypes&&y.argTypes[Ke],Dt=Ke<y.numOptionalArgs,$t=Ke>0&&!Dt||Ke===0&&!Dt&&this.mode==="math",Qt=this.parseGroupOfType("argument to '"+f+"'",pt,Dt,H,$t);if(!Qt){if(Dt){Te.push(null);continue}throw new g("Expected group after '"+f+"'",this.fetch())}(Dt?Te:ve).push(Qt)}return{args:ve,optArgs:Te}},l.parseGroupOfType=function(f,y,R,H,ve){switch(y){case"color":return ve&&this.consumeSpaces(),this.parseColorGroup(R);case"size":return ve&&this.consumeSpaces(),this.parseSizeGroup(R);case"url":return this.parseUrlGroup(R,ve);case"math":case"text":return this.parseGroup(f,R,H,void 0,y,ve);case"hbox":{var Te=this.parseGroup(f,R,H,void 0,"text",ve);if(!Te)return Te;var Ke={type:"styling",mode:Te.mode,body:[Te],style:"text"};return Ke}case"raw":{if(ve&&this.consumeSpaces(),R&&this.fetch().text==="{")return null;var pt=this.parseStringGroup("raw",R,!0);if(pt)return{type:"raw",mode:"text",string:pt.text};throw new g("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(f,R,H,void 0,void 0,ve);default:throw new g("Unknown group type as "+f,this.fetch())}},l.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},l.parseStringGroup=function(f,y,R){var H=y?"[":"{",ve=y?"]":"}",Te=this.fetch();if(Te.text!==H){if(y)return null;if(R&&Te.text!=="EOF"&&/[^{}[\]]/.test(Te.text))return this.consume(),Te}var Ke=this.mode;this.mode="text",this.expect(H);for(var pt="",Dt=this.fetch(),$t=0,Qt=Dt,an;(an=this.fetch()).text!==ve||R&&$t>0;){switch(an.text){case"EOF":throw new g("Unexpected end of input in "+f,Dt.range(Qt,pt));case H:$t++;break;case ve:$t--;break}Qt=an,pt+=Qt.text,this.consume()}return this.expect(ve),this.mode=Ke,Dt.range(Qt,pt)},l.parseRegexGroup=function(f,y){var R=this.mode;this.mode="text";for(var H=this.fetch(),ve=H,Te="",Ke;(Ke=this.fetch()).text!=="EOF"&&f.test(Te+Ke.text);)ve=Ke,Te+=ve.text,this.consume();if(Te==="")throw new g("Invalid "+y+": '"+H.text+"'",H);return this.mode=R,H.range(ve,Te)},l.parseColorGroup=function(f){var y=this.parseStringGroup("color",f);if(!y)return null;var R=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(y.text);if(!R)throw new g("Invalid color: '"+y.text+"'",y);var H=R[0];return/^[0-9a-f]{6}$/i.test(H)&&(H="#"+H),{type:"color-token",mode:this.mode,color:H}},l.parseSizeGroup=function(f){var y,R=!1;if(!f&&this.fetch().text!=="{"?y=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):y=this.parseStringGroup("size",f),!y)return null;!f&&y.text.length===0&&(y.text="0pt",R=!0);var H=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(y.text);if(!H)throw new g("Invalid size: '"+y.text+"'",y);var ve={number:+(H[1]+H[2]),unit:H[3]};if(!vn(ve))throw new g("Invalid unit: '"+ve.unit+"'",y);return{type:"size",mode:this.mode,value:ve,isBlank:R}},l.parseUrlGroup=function(f,y){this.gullet.lexer.setCatcode("%",13);var R=this.parseStringGroup("url",f,!0);if(this.gullet.lexer.setCatcode("%",14),!R)return null;var H=R.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:H}},l.parseGroup=function(f,y,R,H,ve,Te){var Ke=this.mode;ve&&this.switchMode(ve),Te&&this.consumeSpaces();var pt=this.fetch(),Dt=pt.text,$t;if(y?Dt==="[":Dt==="{"||Dt==="\\begingroup"){this.consume();var Qt=N.endOfGroup[Dt];this.gullet.beginGroup();var an=this.parseExpression(!1,Qt),on=this.fetch();this.expect(Qt),this.gullet.endGroup(),$t={type:"ordgroup",mode:this.mode,loc:$.range(pt,on),body:an,semisimple:Dt==="\\begingroup"||void 0}}else if(y)$t=null;else if($t=this.parseFunction(H,f,R)||this.parseSymbol(),$t==null&&Dt[0]==="\\"&&!Io.hasOwnProperty(Dt)){if(this.settings.throwOnError)throw new g("Undefined control sequence: "+Dt,pt);$t=this.formatUnsupportedCmd(Dt),this.consume()}return ve&&this.switchMode(Ke),$t},l.formLigatures=function(f){for(var y=f.length-1,R=0;R<y;++R){var H=f[R],ve=H.text;ve==="-"&&f[R+1].text==="-"&&(R+1<y&&f[R+2].text==="-"?(f.splice(R,3,{type:"textord",mode:"text",loc:$.range(H,f[R+2]),text:"---"}),y-=2):(f.splice(R,2,{type:"textord",mode:"text",loc:$.range(H,f[R+1]),text:"--"}),y-=1)),(ve==="'"||ve==="`")&&f[R+1].text===ve&&(f.splice(R,2,{type:"textord",mode:"text",loc:$.range(H,f[R+1]),text:ve+ve}),y-=1)}},l.parseSymbol=function(){var f=this.fetch(),y=f.text;if(/^\\verb[^a-zA-Z]/.test(y)){this.consume();var R=y.slice(5),H=R.charAt(0)==="*";if(H&&(R=R.slice(1)),R.length<2||R.charAt(0)!==R.slice(-1))throw new g(`\\verb assertion failed --
please report what input caused this bug`);return R=R.slice(1,-1),{type:"verb",mode:"text",body:R,star:H}}ne.hasOwnProperty(y[0])&&!kt[this.mode][y[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+y[0]+'" used in math mode',f),y=ne[y[0]]+y.substr(1));var ve=Tl.exec(y);ve&&(y=y.substring(0,ve.index),y==="i"?y="\u0131":y==="j"&&(y="\u0237"));var Te;if(kt[this.mode][y]){this.settings.strict&&this.mode==="math"&&Et.indexOf(y)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+y[0]+'" used in math mode',f);var Ke=kt[this.mode][y].group,pt=$.range(f),Dt;if(xt.hasOwnProperty(Ke)){var $t=Ke;Dt={type:"atom",mode:this.mode,family:$t,loc:pt,text:y}}else Dt={type:Ke,mode:this.mode,loc:pt,text:y};Te=Dt}else if(y.charCodeAt(0)>=128)this.settings.strict&&(je(y.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+y[0]+'" used in math mode',f):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+y[0]+'"'+(" ("+y.charCodeAt(0)+")"),f)),Te={type:"textord",mode:"text",loc:$.range(f),text:y};else return null;if(this.consume(),ve)for(var Qt=0;Qt<ve[0].length;Qt++){var an=ve[0][Qt];if(!se[an])throw new g("Unknown accent ' "+an+"'",f);var on=se[an][this.mode];if(!on)throw new g("Accent "+an+" unsupported in "+this.mode+" mode",f);Te={type:"accent",mode:this.mode,loc:$.range(f),label:on,isStretchy:!1,isShifty:!0,base:Te}}return Te},N}();Le.endOfExpression=["}","\\endgroup","\\end","\\right","&"],Le.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},Le.SUPSUB_GREEDINESS=1;var Ve=function(l,d){if(!(typeof l=="string"||l instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var f=new Le(l,d);delete f.gullet.macros.current["\\df@tag"];var y=f.parse();if(f.gullet.macros.get("\\df@tag")){if(!d.displayMode)throw new g("\\tag works only in display equations");f.gullet.feed("\\df@tag"),y=[{type:"tag",mode:"text",body:y,tag:f.parse()}]}return y},mt=Ve,St=function(l,d,f){d.textContent="";var y=Bt(l,f).toNode();d.appendChild(y)};typeof document!="undefined"&&document.compatMode!=="CSS1Compat"&&(typeof console!="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),St=function(){throw new g("KaTeX doesn't work in quirks mode.")});var Ot=function(l,d){var f=Bt(l,d).toMarkup();return f},It=function(l,d){var f=new A(d);return mt(l,f)},Ut=function(l,d,f){if(f.throwOnError||!(l instanceof g))throw l;var y=Ft.makeSpan(["katex-error"],[new he(d)]);return y.setAttribute("title",l.toString()),y.setAttribute("style","color:"+f.errorColor),y},Bt=function(l,d){var f=new A(d);try{var y=mt(l,f);return ci(y,l,f)}catch(R){return Ut(R,l,f)}},fn=function(l,d){var f=new A(d);try{var y=mt(l,f);return zi(y,l,f)}catch(R){return Ut(R,l,f)}},qt={version:"0.11.1",render:St,renderToString:Ot,ParseError:g,__parse:It,__renderToDomTree:Bt,__renderToHTMLTree:fn,__setFontMetrics:tt,__defineSymbol:w,__defineMacro:it,__domTree:{Span:$e,Anchor:Ae,SymbolNode:he,SvgNode:_e,PathNode:pe,LineNode:Ee}},Xt=m.default=qt}]).default})},32834:function(un){(function(We,m){un.exports=m()})(this,function(){"use strict";function We(Qe,at){for(var bt=0;bt<at.length;bt++){var ge=at[bt];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(Qe,ge.key,ge)}}function m(Qe,at,bt){return at&&We(Qe.prototype,at),bt&&We(Qe,bt),Qe}function c(Qe,at){if(Qe){if(typeof Qe=="string")return ee(Qe,at);var bt=Object.prototype.toString.call(Qe).slice(8,-1);if(bt==="Object"&&Qe.constructor&&(bt=Qe.constructor.name),bt==="Map"||bt==="Set")return Array.from(Qe);if(bt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(bt))return ee(Qe,at)}}function ee(Qe,at){(at==null||at>Qe.length)&&(at=Qe.length);for(var bt=0,ge=new Array(at);bt<at;bt++)ge[bt]=Qe[bt];return ge}function $(Qe,at){var bt=typeof Symbol!="undefined"&&Qe[Symbol.iterator]||Qe["@@iterator"];if(bt)return(bt=bt.call(Qe)).next.bind(bt);if(Array.isArray(Qe)||(bt=c(Qe))||at&&Qe&&typeof Qe.length=="number"){bt&&(Qe=bt);var ge=0;return function(){return ge>=Qe.length?{done:!0}:{done:!1,value:Qe[ge++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ie={exports:{}};function F(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function g(Qe){ie.exports.defaults=Qe}ie.exports={defaults:F(),getDefaults:F,changeDefaults:g};var J=/[&<>"']/,X=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,x=/[<>"']|&(?!#?\w+;)/g,L={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},b=function(at){return L[at]};function S(Qe,at){if(at){if(J.test(Qe))return Qe.replace(X,b)}else if(o.test(Qe))return Qe.replace(x,b);return Qe}var T=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function B(Qe){return Qe.replace(T,function(at,bt){return bt=bt.toLowerCase(),bt==="colon"?":":bt.charAt(0)==="#"?bt.charAt(1)==="x"?String.fromCharCode(parseInt(bt.substring(2),16)):String.fromCharCode(+bt.substring(1)):""})}var z=/(^|[^\[])\^/g;function j(Qe,at){Qe=Qe.source||Qe,at=at||"";var bt={replace:function(ye,Fe){return Fe=Fe.source||Fe,Fe=Fe.replace(z,"$1"),Qe=Qe.replace(ye,Fe),bt},getRegex:function(){return new RegExp(Qe,at)}};return bt}var U=/[^\w:]/g,A=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function K(Qe,at,bt){if(Qe){var ge;try{ge=decodeURIComponent(B(bt)).replace(U,"").toLowerCase()}catch(ye){return null}if(ge.indexOf("javascript:")===0||ge.indexOf("vbscript:")===0||ge.indexOf("data:")===0)return null}at&&!A.test(bt)&&(bt=ce(at,bt));try{bt=encodeURI(bt).replace(/%25/g,"%")}catch(ye){return null}return bt}var I={},M=/^[^:]+:\/*[^/]*$/,le=/^([^:]+:)[\s\S]*$/,me=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ce(Qe,at){I[" "+Qe]||(M.test(Qe)?I[" "+Qe]=Qe+"/":I[" "+Qe]=He(Qe,"/",!0)),Qe=I[" "+Qe];var bt=Qe.indexOf(":")===-1;return at.substring(0,2)==="//"?bt?at:Qe.replace(le,"$1")+at:at.charAt(0)==="/"?bt?at:Qe.replace(me,"$1")+at:Qe+at}var De={exec:function(){}};function Pe(Qe){for(var at=1,bt,ge;at<arguments.length;at++){bt=arguments[at];for(ge in bt)Object.prototype.hasOwnProperty.call(bt,ge)&&(Qe[ge]=bt[ge])}return Qe}function Ce(Qe,at){var bt=Qe.replace(/\|/g,function(Fe,ze,q){for(var Mt=!1,Be=ze;--Be>=0&&q[Be]==="\\";)Mt=!Mt;return Mt?"|":" |"}),ge=bt.split(/ \|/),ye=0;if(ge.length>at)ge.splice(at);else for(;ge.length<at;)ge.push("");for(;ye<ge.length;ye++)ge[ye]=ge[ye].trim().replace(/\\\|/g,"|");return ge}function He(Qe,at,bt){var ge=Qe.length;if(ge===0)return"";for(var ye=0;ye<ge;){var Fe=Qe.charAt(ge-ye-1);if(Fe===at&&!bt)ye++;else if(Fe!==at&&bt)ye++;else break}return Qe.substr(0,ge-ye)}function ue(Qe,at){if(Qe.indexOf(at[1])===-1)return-1;for(var bt=Qe.length,ge=0,ye=0;ye<bt;ye++)if(Qe[ye]==="\\")ye++;else if(Qe[ye]===at[0])ge++;else if(Qe[ye]===at[1]&&(ge--,ge<0))return ye;return-1}function W(Qe){Qe&&Qe.sanitize&&!Qe.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 P(Qe,at){if(at<1)return"";for(var bt="";at>1;)at&1&&(bt+=Qe),at>>=1,Qe+=Qe;return bt+Qe}var de={escape:S,unescape:B,edit:j,cleanUrl:K,resolveUrl:ce,noopTest:De,merge:Pe,splitCells:Ce,rtrim:He,findClosingBracket:ue,checkSanitizeDeprecation:W,repeatString:P},ae=ie.exports.defaults,Q=de.rtrim,E=de.splitCells,C=de.escape,Y=de.findClosingBracket;function be(Qe,at,bt){var ge=at.href,ye=at.title?C(at.title):null,Fe=Qe[1].replace(/\\([\[\]])/g,"$1");return Qe[0].charAt(0)!=="!"?{type:"link",raw:bt,href:ge,title:ye,text:Fe}:{type:"image",raw:bt,href:ge,title:ye,text:C(Fe)}}function je(Qe,at){var bt=Qe.match(/^(\s+)(?:```)/);if(bt===null)return at;var ge=bt[1];return at.split(`
`).map(function(ye){var Fe=ye.match(/^\s+/);if(Fe===null)return ye;var ze=Fe[0];return ze.length>=ge.length?ye.slice(ge.length):ye}).join(`
`)}var lt=function(){function Qe(bt){this.options=bt||ae}var at=Qe.prototype;return at.space=function(ge){var ye=this.rules.block.newline.exec(ge);if(ye)return ye[0].length>1?{type:"space",raw:ye[0]}:{raw:`
`}},at.code=function(ge){var ye=this.rules.block.code.exec(ge);if(ye){var Fe=ye[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ye[0],codeBlockStyle:"indented",text:this.options.pedantic?Fe:Q(Fe,`
`)}}},at.fences=function(ge){var ye=this.rules.block.fences.exec(ge);if(ye){var Fe=ye[0],ze=je(Fe,ye[3]||"");return{type:"code",raw:Fe,lang:ye[2]?ye[2].trim():ye[2],text:ze}}},at.heading=function(ge){var ye=this.rules.block.heading.exec(ge);if(ye){var Fe=ye[2].trim();if(/#$/.test(Fe)){var ze=Q(Fe,"#");(this.options.pedantic||!ze||/ $/.test(ze))&&(Fe=ze.trim())}return{type:"heading",raw:ye[0],depth:ye[1].length,text:Fe}}},at.nptable=function(ge){var ye=this.rules.block.nptable.exec(ge);if(ye){var Fe={type:"table",header:E(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(`
`):[],raw:ye[0]};if(Fe.header.length===Fe.align.length){var ze=Fe.align.length,q;for(q=0;q<ze;q++)/^ *-+: *$/.test(Fe.align[q])?Fe.align[q]="right":/^ *:-+: *$/.test(Fe.align[q])?Fe.align[q]="center":/^ *:-+ *$/.test(Fe.align[q])?Fe.align[q]="left":Fe.align[q]=null;for(ze=Fe.cells.length,q=0;q<ze;q++)Fe.cells[q]=E(Fe.cells[q],Fe.header.length);return Fe}}},at.hr=function(ge){var ye=this.rules.block.hr.exec(ge);if(ye)return{type:"hr",raw:ye[0]}},at.blockquote=function(ge){var ye=this.rules.block.blockquote.exec(ge);if(ye){var Fe=ye[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ye[0],text:Fe}}},at.list=function(ge){var ye=this.rules.block.list.exec(ge);if(ye){var Fe=ye[0],ze=ye[2],q=ze.length>1,Mt={type:"list",raw:Fe,ordered:q,start:q?+ze.slice(0,-1):"",loose:!1,items:[]},Be=ye[0].match(this.rules.block.item),Gt=!1,pn,En,sr,Xn,Wn,Cr,Rr,Qn,gr,Cn=Be.length;sr=this.rules.block.listItemStart.exec(Be[0]);for(var tn=0;tn<Cn;tn++){if(pn=Be[tn],Fe=pn,this.options.pedantic||(gr=pn.match(new RegExp("\\n\\s*\\n {0,"+(sr[0].length-1)+"}\\S")),gr&&(Wn=pn.length-gr.index+Be.slice(tn+1).join(`
`).length,Mt.raw=Mt.raw.substring(0,Mt.raw.length-Wn),pn=pn.substring(0,gr.index),Fe=pn,Cn=tn+1)),tn!==Cn-1){if(Xn=this.rules.block.listItemStart.exec(Be[tn+1]),this.options.pedantic?Xn[1].length>sr[1].length:Xn[1].length>=sr[0].length||Xn[1].length>3){Be.splice(tn,2,Be[tn]+(!this.options.pedantic&&Xn[1].length<sr[0].length&&!Be[tn].match(/\n$/)?"":`
`)+Be[tn+1]),tn--,Cn--;continue}else(!this.options.pedantic||this.options.smartLists?Xn[2][Xn[2].length-1]!==ze[ze.length-1]:q===(Xn[2].length===1))&&(Wn=Be.slice(tn+1).join(`
`).length,Mt.raw=Mt.raw.substring(0,Mt.raw.length-Wn),tn=Cn-1);sr=Xn}En=pn.length,pn=pn.replace(/^ *([*+-]|\d+[.)]) ?/,""),~pn.indexOf(`
`)&&(En-=pn.length,pn=this.options.pedantic?pn.replace(/^ {1,4}/gm,""):pn.replace(new RegExp("^ {1,"+En+"}","gm"),"")),pn=Q(pn,`
`),tn!==Cn-1&&(Fe=Fe+`
`),Cr=Gt||/\n\n(?!\s*$)/.test(Fe),tn!==Cn-1&&(Gt=Fe.slice(-2)===`
`,Cr||(Cr=Gt)),Cr&&(Mt.loose=!0),this.options.gfm&&(Rr=/^\[[ xX]\] /.test(pn),Qn=void 0,Rr&&(Qn=pn[1]!==" ",pn=pn.replace(/^\[[ xX]\] +/,""))),Mt.items.push({type:"list_item",raw:Fe,task:Rr,checked:Qn,loose:Cr,text:pn})}return Mt}},at.html=function(ge){var ye=this.rules.block.html.exec(ge);if(ye)return{type:this.options.sanitize?"paragraph":"html",raw:ye[0],pre:!this.options.sanitizer&&(ye[1]==="pre"||ye[1]==="script"||ye[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):C(ye[0]):ye[0]}},at.def=function(ge){var ye=this.rules.block.def.exec(ge);if(ye){ye[3]&&(ye[3]=ye[3].substring(1,ye[3].length-1));var Fe=ye[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:Fe,raw:ye[0],href:ye[2],title:ye[3]}}},at.table=function(ge){var ye=this.rules.block.table.exec(ge);if(ye){var Fe={type:"table",header:E(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(`
`):[]};if(Fe.header.length===Fe.align.length){Fe.raw=ye[0];var ze=Fe.align.length,q;for(q=0;q<ze;q++)/^ *-+: *$/.test(Fe.align[q])?Fe.align[q]="right":/^ *:-+: *$/.test(Fe.align[q])?Fe.align[q]="center":/^ *:-+ *$/.test(Fe.align[q])?Fe.align[q]="left":Fe.align[q]=null;for(ze=Fe.cells.length,q=0;q<ze;q++)Fe.cells[q]=E(Fe.cells[q].replace(/^ *\| *| *\| *$/g,""),Fe.header.length);return Fe}}},at.lheading=function(ge){var ye=this.rules.block.lheading.exec(ge);if(ye)return{type:"heading",raw:ye[0],depth:ye[2].charAt(0)==="="?1:2,text:ye[1]}},at.paragraph=function(ge){var ye=this.rules.block.paragraph.exec(ge);if(ye)return{type:"paragraph",raw:ye[0],text:ye[1].charAt(ye[1].length-1)===`
`?ye[1].slice(0,-1):ye[1]}},at.text=function(ge){var ye=this.rules.block.text.exec(ge);if(ye)return{type:"text",raw:ye[0],text:ye[0]}},at.escape=function(ge){var ye=this.rules.inline.escape.exec(ge);if(ye)return{type:"escape",raw:ye[0],text:C(ye[1])}},at.tag=function(ge,ye,Fe){var ze=this.rules.inline.tag.exec(ge);if(ze)return!ye&&/^<a /i.test(ze[0])?ye=!0:ye&&/^<\/a>/i.test(ze[0])&&(ye=!1),!Fe&&/^<(pre|code|kbd|script)(\s|>)/i.test(ze[0])?Fe=!0:Fe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ze[0])&&(Fe=!1),{type:this.options.sanitize?"text":"html",raw:ze[0],inLink:ye,inRawBlock:Fe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ze[0]):C(ze[0]):ze[0]}},at.link=function(ge){var ye=this.rules.inline.link.exec(ge);if(ye){var Fe=ye[2].trim();if(!this.options.pedantic&&/^</.test(Fe)){if(!/>$/.test(Fe))return;var ze=Q(Fe.slice(0,-1),"\\");if((Fe.length-ze.length)%2===0)return}else{var q=Y(ye[2],"()");if(q>-1){var Mt=ye[0].indexOf("!")===0?5:4,Be=Mt+ye[1].length+q;ye[2]=ye[2].substring(0,q),ye[0]=ye[0].substring(0,Be).trim(),ye[3]=""}}var Gt=ye[2],pn="";if(this.options.pedantic){var En=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Gt);En&&(Gt=En[1],pn=En[3])}else pn=ye[3]?ye[3].slice(1,-1):"";return Gt=Gt.trim(),/^</.test(Gt)&&(this.options.pedantic&&!/>$/.test(Fe)?Gt=Gt.slice(1):Gt=Gt.slice(1,-1)),be(ye,{href:Gt&&Gt.replace(this.rules.inline._escapes,"$1"),title:pn&&pn.replace(this.rules.inline._escapes,"$1")},ye[0])}},at.reflink=function(ge,ye){var Fe;if((Fe=this.rules.inline.reflink.exec(ge))||(Fe=this.rules.inline.nolink.exec(ge))){var ze=(Fe[2]||Fe[1]).replace(/\s+/g," ");if(ze=ye[ze.toLowerCase()],!ze||!ze.href){var q=Fe[0].charAt(0);return{type:"text",raw:q,text:q}}return be(Fe,ze,Fe[0])}},at.emStrong=function(ge,ye,Fe){Fe===void 0&&(Fe="");var ze=this.rules.inline.emStrong.lDelim.exec(ge);if(ze&&!(ze[3]&&Fe.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 q=ze[1]||ze[2]||"";if(!q||q&&(Fe===""||this.rules.inline.punctuation.exec(Fe))){var Mt=ze[0].length-1,Be,Gt,pn=Mt,En=0,sr=ze[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(sr.lastIndex=0,ye=ye.slice(-1*ge.length+Mt);(ze=sr.exec(ye))!=null;)if(Be=ze[1]||ze[2]||ze[3]||ze[4]||ze[5]||ze[6],!!Be){if(Gt=Be.length,ze[3]||ze[4]){pn+=Gt;continue}else if((ze[5]||ze[6])&&Mt%3&&!((Mt+Gt)%3)){En+=Gt;continue}if(pn-=Gt,!(pn>0))return Gt=Math.min(Gt,Gt+pn+En),Math.min(Mt,Gt)%2?{type:"em",raw:ge.slice(0,Mt+ze.index+Gt+1),text:ge.slice(1,Mt+ze.index+Gt)}:{type:"strong",raw:ge.slice(0,Mt+ze.index+Gt+1),text:ge.slice(2,Mt+ze.index+Gt-1)}}}}},at.codespan=function(ge){var ye=this.rules.inline.code.exec(ge);if(ye){var Fe=ye[2].replace(/\n/g," "),ze=/[^ ]/.test(Fe),q=/^ /.test(Fe)&&/ $/.test(Fe);return ze&&q&&(Fe=Fe.substring(1,Fe.length-1)),Fe=C(Fe,!0),{type:"codespan",raw:ye[0],text:Fe}}},at.br=function(ge){var ye=this.rules.inline.br.exec(ge);if(ye)return{type:"br",raw:ye[0]}},at.del=function(ge){var ye=this.rules.inline.del.exec(ge);if(ye)return{type:"del",raw:ye[0],text:ye[2]}},at.autolink=function(ge,ye){var Fe=this.rules.inline.autolink.exec(ge);if(Fe){var ze,q;return Fe[2]==="@"?(ze=C(this.options.mangle?ye(Fe[1]):Fe[1]),q="mailto:"+ze):(ze=C(Fe[1]),q=ze),{type:"link",raw:Fe[0],text:ze,href:q,tokens:[{type:"text",raw:ze,text:ze}]}}},at.url=function(ge,ye){var Fe;if(Fe=this.rules.inline.url.exec(ge)){var ze,q;if(Fe[2]==="@")ze=C(this.options.mangle?ye(Fe[0]):Fe[0]),q="mailto:"+ze;else{var Mt;do Mt=Fe[0],Fe[0]=this.rules.inline._backpedal.exec(Fe[0])[0];while(Mt!==Fe[0]);ze=C(Fe[0]),Fe[1]==="www."?q="http://"+ze:q=ze}return{type:"link",raw:Fe[0],text:ze,href:q,tokens:[{type:"text",raw:ze,text:ze}]}}},at.inlineText=function(ge,ye,Fe){var ze=this.rules.inline.text.exec(ge);if(ze){var q;return ye?q=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ze[0]):C(ze[0]):ze[0]:q=C(this.options.smartypants?Fe(ze[0]):ze[0]),{type:"text",raw:ze[0],text:q}}},Qe}(),ke=de.noopTest,Ye=de.edit,et=de.merge,_t={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ke,table:ke,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};_t._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_t._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,_t.def=Ye(_t.def).replace("label",_t._label).replace("title",_t._title).getRegex(),_t.bullet=/(?:[*+-]|\d{1,9}[.)])/,_t.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,_t.item=Ye(_t.item,"gm").replace(/bull/g,_t.bullet).getRegex(),_t.listItemStart=Ye(/^( *)(bull) */).replace("bull",_t.bullet).getRegex(),_t.list=Ye(_t.list).replace(/bull/g,_t.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+_t.def.source+")").getRegex(),_t._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",_t._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,_t.html=Ye(_t.html,"i").replace("comment",_t._comment).replace("tag",_t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_t.paragraph=Ye(_t._paragraph).replace("hr",_t.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",_t._tag).getRegex(),_t.blockquote=Ye(_t.blockquote).replace("paragraph",_t.paragraph).getRegex(),_t.normal=et({},_t),_t.gfm=et({},_t.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*|$)"}),_t.gfm.nptable=Ye(_t.gfm.nptable).replace("hr",_t.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",_t._tag).getRegex(),_t.gfm.table=Ye(_t.gfm.table).replace("hr",_t.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",_t._tag).getRegex(),_t.pedantic=et({},_t.normal,{html:Ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_t._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ke,paragraph:Ye(_t.normal._paragraph).replace("hr",_t.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",_t.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Re={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ke,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ke,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Re._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Re.punctuation=Ye(Re.punctuation).replace(/punctuation/g,Re._punctuation).getRegex(),Re.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Re.escapedEmSt=/\\\*|\\_/g,Re._comment=Ye(_t._comment).replace("(?:-->|$)","-->").getRegex(),Re.emStrong.lDelim=Ye(Re.emStrong.lDelim).replace(/punct/g,Re._punctuation).getRegex(),Re.emStrong.rDelimAst=Ye(Re.emStrong.rDelimAst,"g").replace(/punct/g,Re._punctuation).getRegex(),Re.emStrong.rDelimUnd=Ye(Re.emStrong.rDelimUnd,"g").replace(/punct/g,Re._punctuation).getRegex(),Re._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Re._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Re._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])?)+(?![-_])/,Re.autolink=Ye(Re.autolink).replace("scheme",Re._scheme).replace("email",Re._email).getRegex(),Re._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Re.tag=Ye(Re.tag).replace("comment",Re._comment).replace("attribute",Re._attribute).getRegex(),Re._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Re._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Re._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Re.link=Ye(Re.link).replace("label",Re._label).replace("href",Re._href).replace("title",Re._title).getRegex(),Re.reflink=Ye(Re.reflink).replace("label",Re._label).getRegex(),Re.reflinkSearch=Ye(Re.reflinkSearch,"g").replace("reflink",Re.reflink).replace("nolink",Re.nolink).getRegex(),Re.normal=et({},Re),Re.pedantic=et({},Re.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:Ye(/^!?\[(label)\]\((.*?)\)/).replace("label",Re._label).getRegex(),reflink:Ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Re._label).getRegex()}),Re.gfm=et({},Re.normal,{escape:Ye(Re.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Re.gfm.url=Ye(Re.gfm.url,"i").replace("email",Re.gfm._extended_email).getRegex(),Re.breaks=et({},Re.gfm,{br:Ye(Re.br).replace("{2,}","*").getRegex(),text:Ye(Re.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var At={block:_t,inline:Re},rt=lt,Nt=ie.exports.defaults,Xe=At.block,Ge=At.inline,Ne=de.repeatString;function Ie(Qe){return Qe.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 te(Qe){var at="",bt,ge,ye=Qe.length;for(bt=0;bt<ye;bt++)ge=Qe.charCodeAt(bt),Math.random()>.5&&(ge="x"+ge.toString(16)),at+="&#"+ge+";";return at}var $e=function(){function Qe(bt){this.tokens=[],this.tokens.links=Object.create(null),this.options=bt||Nt,this.options.tokenizer=this.options.tokenizer||new rt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ge={block:Xe.normal,inline:Ge.normal};this.options.pedantic?(ge.block=Xe.pedantic,ge.inline=Ge.pedantic):this.options.gfm&&(ge.block=Xe.gfm,this.options.breaks?ge.inline=Ge.breaks:ge.inline=Ge.gfm),this.tokenizer.rules=ge}Qe.lex=function(ge,ye){var Fe=new Qe(ye);return Fe.lex(ge)},Qe.lexInline=function(ge,ye){var Fe=new Qe(ye);return Fe.inlineTokens(ge)};var at=Qe.prototype;return at.lex=function(ge){return ge=ge.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ge,this.tokens,!0),this.inline(this.tokens),this.tokens},at.blockTokens=function(ge,ye,Fe){ye===void 0&&(ye=[]),Fe===void 0&&(Fe=!0),this.options.pedantic&&(ge=ge.replace(/^ +$/gm,""));for(var ze,q,Mt,Be;ge;){if(ze=this.tokenizer.space(ge)){ge=ge.substring(ze.raw.length),ze.type&&ye.push(ze);continue}if(ze=this.tokenizer.code(ge)){ge=ge.substring(ze.raw.length),Be=ye[ye.length-1],Be&&Be.type==="paragraph"?(Be.raw+=`
`+ze.raw,Be.text+=`
`+ze.text):ye.push(ze);continue}if(ze=this.tokenizer.fences(ge)){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(ze=this.tokenizer.heading(ge)){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(ze=this.tokenizer.nptable(ge)){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(ze=this.tokenizer.hr(ge)){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(ze=this.tokenizer.blockquote(ge)){ge=ge.substring(ze.raw.length),ze.tokens=this.blockTokens(ze.text,[],Fe),ye.push(ze);continue}if(ze=this.tokenizer.list(ge)){for(ge=ge.substring(ze.raw.length),Mt=ze.items.length,q=0;q<Mt;q++)ze.items[q].tokens=this.blockTokens(ze.items[q].text,[],!1);ye.push(ze);continue}if(ze=this.tokenizer.html(ge)){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(Fe&&(ze=this.tokenizer.def(ge))){ge=ge.substring(ze.raw.length),this.tokens.links[ze.tag]||(this.tokens.links[ze.tag]={href:ze.href,title:ze.title});continue}if(ze=this.tokenizer.table(ge)){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(ze=this.tokenizer.lheading(ge)){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(Fe&&(ze=this.tokenizer.paragraph(ge))){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(ze=this.tokenizer.text(ge)){ge=ge.substring(ze.raw.length),Be=ye[ye.length-1],Be&&Be.type==="text"?(Be.raw+=`
`+ze.raw,Be.text+=`
`+ze.text):ye.push(ze);continue}if(ge){var Gt="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(Gt);break}else throw new Error(Gt)}}return ye},at.inline=function(ge){var ye,Fe,ze,q,Mt,Be,Gt=ge.length;for(ye=0;ye<Gt;ye++)switch(Be=ge[ye],Be.type){case"paragraph":case"text":case"heading":{Be.tokens=[],this.inlineTokens(Be.text,Be.tokens);break}case"table":{for(Be.tokens={header:[],cells:[]},q=Be.header.length,Fe=0;Fe<q;Fe++)Be.tokens.header[Fe]=[],this.inlineTokens(Be.header[Fe],Be.tokens.header[Fe]);for(q=Be.cells.length,Fe=0;Fe<q;Fe++)for(Mt=Be.cells[Fe],Be.tokens.cells[Fe]=[],ze=0;ze<Mt.length;ze++)Be.tokens.cells[Fe][ze]=[],this.inlineTokens(Mt[ze],Be.tokens.cells[Fe][ze]);break}case"blockquote":{this.inline(Be.tokens);break}case"list":{for(q=Be.items.length,Fe=0;Fe<q;Fe++)this.inline(Be.items[Fe].tokens);break}}return ge},at.inlineTokens=function(ge,ye,Fe,ze){ye===void 0&&(ye=[]),Fe===void 0&&(Fe=!1),ze===void 0&&(ze=!1);var q,Mt,Be=ge,Gt,pn,En;if(this.tokens.links){var sr=Object.keys(this.tokens.links);if(sr.length>0)for(;(Gt=this.tokenizer.rules.inline.reflinkSearch.exec(Be))!=null;)sr.includes(Gt[0].slice(Gt[0].lastIndexOf("[")+1,-1))&&(Be=Be.slice(0,Gt.index)+"["+Ne("a",Gt[0].length-2)+"]"+Be.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Gt=this.tokenizer.rules.inline.blockSkip.exec(Be))!=null;)Be=Be.slice(0,Gt.index)+"["+Ne("a",Gt[0].length-2)+"]"+Be.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Gt=this.tokenizer.rules.inline.escapedEmSt.exec(Be))!=null;)Be=Be.slice(0,Gt.index)+"++"+Be.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;ge;){if(pn||(En=""),pn=!1,q=this.tokenizer.escape(ge)){ge=ge.substring(q.raw.length),ye.push(q);continue}if(q=this.tokenizer.tag(ge,Fe,ze)){ge=ge.substring(q.raw.length),Fe=q.inLink,ze=q.inRawBlock;var Xn=ye[ye.length-1];Xn&&q.type==="text"&&Xn.type==="text"?(Xn.raw+=q.raw,Xn.text+=q.text):ye.push(q);continue}if(q=this.tokenizer.link(ge)){ge=ge.substring(q.raw.length),q.type==="link"&&(q.tokens=this.inlineTokens(q.text,[],!0,ze)),ye.push(q);continue}if(q=this.tokenizer.reflink(ge,this.tokens.links)){ge=ge.substring(q.raw.length);var Wn=ye[ye.length-1];q.type==="link"?(q.tokens=this.inlineTokens(q.text,[],!0,ze),ye.push(q)):Wn&&q.type==="text"&&Wn.type==="text"?(Wn.raw+=q.raw,Wn.text+=q.text):ye.push(q);continue}if(q=this.tokenizer.emStrong(ge,Be,En)){ge=ge.substring(q.raw.length),q.tokens=this.inlineTokens(q.text,[],Fe,ze),ye.push(q);continue}if(q=this.tokenizer.codespan(ge)){ge=ge.substring(q.raw.length),ye.push(q);continue}if(q=this.tokenizer.br(ge)){ge=ge.substring(q.raw.length),ye.push(q);continue}if(q=this.tokenizer.del(ge)){ge=ge.substring(q.raw.length),q.tokens=this.inlineTokens(q.text,[],Fe,ze),ye.push(q);continue}if(q=this.tokenizer.autolink(ge,te)){ge=ge.substring(q.raw.length),ye.push(q);continue}if(!Fe&&(q=this.tokenizer.url(ge,te))){ge=ge.substring(q.raw.length),ye.push(q);continue}if(q=this.tokenizer.inlineText(ge,ze,Ie)){ge=ge.substring(q.raw.length),q.raw.slice(-1)!=="_"&&(En=q.raw.slice(-1)),pn=!0,Mt=ye[ye.length-1],Mt&&Mt.type==="text"?(Mt.raw+=q.raw,Mt.text+=q.text):ye.push(q);continue}if(ge){var Cr="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(Cr);break}else throw new Error(Cr)}}return ye},m(Qe,null,[{key:"rules",get:function(){return{block:Xe,inline:Ge}}}]),Qe}(),Ae=ie.exports.defaults,Z=de.cleanUrl,D=de.escape,he=function(){function Qe(bt){this.options=bt||Ae}var at=Qe.prototype;return at.code=function(ge,ye,Fe){var ze=(ye||"").match(/\S*/)[0];if(this.options.highlight){var q=this.options.highlight(ge,ze);q!=null&&q!==ge&&(Fe=!0,ge=q)}return ge=ge.replace(/\n$/,"")+`
`,ze?'<pre><code class="'+this.options.langPrefix+D(ze,!0)+'">'+(Fe?ge:D(ge,!0))+`</code></pre>
`:"<pre><code>"+(Fe?ge:D(ge,!0))+`</code></pre>
`},at.blockquote=function(ge){return`<blockquote>
`+ge+`</blockquote>
`},at.html=function(ge){return ge},at.heading=function(ge,ye,Fe,ze){return this.options.headerIds?"<h"+ye+' id="'+this.options.headerPrefix+ze.slug(Fe)+'">'+ge+"</h"+ye+`>
`:"<h"+ye+">"+ge+"</h"+ye+`>
`},at.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},at.list=function(ge,ye,Fe){var ze=ye?"ol":"ul",q=ye&&Fe!==1?' start="'+Fe+'"':"";return"<"+ze+q+`>
`+ge+"</"+ze+`>
`},at.listitem=function(ge){return"<li>"+ge+`</li>
`},at.checkbox=function(ge){return"<input "+(ge?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},at.paragraph=function(ge){return"<p>"+ge+`</p>
`},at.table=function(ge,ye){return ye&&(ye="<tbody>"+ye+"</tbody>"),`<table>
<thead>
`+ge+`</thead>
`+ye+`</table>
`},at.tablerow=function(ge){return`<tr>
`+ge+`</tr>
`},at.tablecell=function(ge,ye){var Fe=ye.header?"th":"td",ze=ye.align?"<"+Fe+' align="'+ye.align+'">':"<"+Fe+">";return ze+ge+"</"+Fe+`>
`},at.strong=function(ge){return"<strong>"+ge+"</strong>"},at.em=function(ge){return"<em>"+ge+"</em>"},at.codespan=function(ge){return"<code>"+ge+"</code>"},at.br=function(){return this.options.xhtml?"<br/>":"<br>"},at.del=function(ge){return"<del>"+ge+"</del>"},at.link=function(ge,ye,Fe){if(ge=Z(this.options.sanitize,this.options.baseUrl,ge),ge===null)return Fe;var ze='<a href="'+D(ge)+'"';return ye&&(ze+=' title="'+ye+'"'),ze+=">"+Fe+"</a>",ze},at.image=function(ge,ye,Fe){if(ge=Z(this.options.sanitize,this.options.baseUrl,ge),ge===null)return Fe;var ze='<img src="'+ge+'" alt="'+Fe+'"';return ye&&(ze+=' title="'+ye+'"'),ze+=this.options.xhtml?"/>":">",ze},at.text=function(ge){return ge},Qe}(),_e=function(){function Qe(){}var at=Qe.prototype;return at.strong=function(ge){return ge},at.em=function(ge){return ge},at.codespan=function(ge){return ge},at.del=function(ge){return ge},at.html=function(ge){return ge},at.text=function(ge){return ge},at.link=function(ge,ye,Fe){return""+Fe},at.image=function(ge,ye,Fe){return""+Fe},at.br=function(){return""},Qe}(),pe=function(){function Qe(){this.seen={}}var at=Qe.prototype;return at.serialize=function(ge){return ge.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},at.getNextSafeSlug=function(ge,ye){var Fe=ge,ze=0;if(this.seen.hasOwnProperty(Fe)){ze=this.seen[ge];do ze++,Fe=ge+"-"+ze;while(this.seen.hasOwnProperty(Fe))}return ye||(this.seen[ge]=ze,this.seen[Fe]=0),Fe},at.slug=function(ge,ye){ye===void 0&&(ye={});var Fe=this.serialize(ge);return this.getNextSafeSlug(Fe,ye.dryrun)},Qe}(),Ee=he,Oe=_e,Ze=pe,re=ie.exports.defaults,fe=de.unescape,st=function(){function Qe(bt){this.options=bt||re,this.options.renderer=this.options.renderer||new Ee,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Oe,this.slugger=new Ze}Qe.parse=function(ge,ye){var Fe=new Qe(ye);return Fe.parse(ge)},Qe.parseInline=function(ge,ye){var Fe=new Qe(ye);return Fe.parseInline(ge)};var at=Qe.prototype;return at.parse=function(ge,ye){ye===void 0&&(ye=!0);var Fe="",ze,q,Mt,Be,Gt,pn,En,sr,Xn,Wn,Cr,Rr,Qn,gr,Cn,tn,dn,Vn,vr=ge.length;for(ze=0;ze<vr;ze++)switch(Wn=ge[ze],Wn.type){case"space":continue;case"hr":{Fe+=this.renderer.hr();continue}case"heading":{Fe+=this.renderer.heading(this.parseInline(Wn.tokens),Wn.depth,fe(this.parseInline(Wn.tokens,this.textRenderer)),this.slugger);continue}case"code":{Fe+=this.renderer.code(Wn.text,Wn.lang,Wn.escaped);continue}case"table":{for(sr="",En="",Be=Wn.header.length,q=0;q<Be;q++)En+=this.renderer.tablecell(this.parseInline(Wn.tokens.header[q]),{header:!0,align:Wn.align[q]});for(sr+=this.renderer.tablerow(En),Xn="",Be=Wn.cells.length,q=0;q<Be;q++){for(pn=Wn.tokens.cells[q],En="",Gt=pn.length,Mt=0;Mt<Gt;Mt++)En+=this.renderer.tablecell(this.parseInline(pn[Mt]),{header:!1,align:Wn.align[Mt]});Xn+=this.renderer.tablerow(En)}Fe+=this.renderer.table(sr,Xn);continue}case"blockquote":{Xn=this.parse(Wn.tokens),Fe+=this.renderer.blockquote(Xn);continue}case"list":{for(Cr=Wn.ordered,Rr=Wn.start,Qn=Wn.loose,Be=Wn.items.length,Xn="",q=0;q<Be;q++)Cn=Wn.items[q],tn=Cn.checked,dn=Cn.task,gr="",Cn.task&&(Vn=this.renderer.checkbox(tn),Qn?Cn.tokens.length>0&&Cn.tokens[0].type==="text"?(Cn.tokens[0].text=Vn+" "+Cn.tokens[0].text,Cn.tokens[0].tokens&&Cn.tokens[0].tokens.length>0&&Cn.tokens[0].tokens[0].type==="text"&&(Cn.tokens[0].tokens[0].text=Vn+" "+Cn.tokens[0].tokens[0].text)):Cn.tokens.unshift({type:"text",text:Vn}):gr+=Vn),gr+=this.parse(Cn.tokens,Qn),Xn+=this.renderer.listitem(gr,dn,tn);Fe+=this.renderer.list(Xn,Cr,Rr);continue}case"html":{Fe+=this.renderer.html(Wn.text);continue}case"paragraph":{Fe+=this.renderer.paragraph(this.parseInline(Wn.tokens));continue}case"text":{for(Xn=Wn.tokens?this.parseInline(Wn.tokens):Wn.text;ze+1<vr&&ge[ze+1].type==="text";)Wn=ge[++ze],Xn+=`
`+(Wn.tokens?this.parseInline(Wn.tokens):Wn.text);Fe+=ye?this.renderer.paragraph(Xn):Xn;continue}default:{var Et='Token with "'+Wn.type+'" type was not found.';if(this.options.silent){console.error(Et);return}else throw new Error(Et)}}return Fe},at.parseInline=function(ge,ye){ye=ye||this.renderer;var Fe="",ze,q,Mt=ge.length;for(ze=0;ze<Mt;ze++)switch(q=ge[ze],q.type){case"escape":{Fe+=ye.text(q.text);break}case"html":{Fe+=ye.html(q.text);break}case"link":{Fe+=ye.link(q.href,q.title,this.parseInline(q.tokens,ye));break}case"image":{Fe+=ye.image(q.href,q.title,q.text);break}case"strong":{Fe+=ye.strong(this.parseInline(q.tokens,ye));break}case"em":{Fe+=ye.em(this.parseInline(q.tokens,ye));break}case"codespan":{Fe+=ye.codespan(q.text);break}case"br":{Fe+=ye.br();break}case"del":{Fe+=ye.del(this.parseInline(q.tokens,ye));break}case"text":{Fe+=ye.text(q.text);break}default:{var Be='Token with "'+q.type+'" type was not found.';if(this.options.silent){console.error(Be);return}else throw new Error(Be)}}return Fe},Qe}(),tt=$e,ct=st,ut=lt,Ue=he,xt=_e,dt=pe,gt=de.merge,kt=de.checkSanitizeDeprecation,w=de.escape,O=ie.exports.getDefaults,qe=ie.exports.changeDefaults,oe=ie.exports.defaults;function xe(Qe,at,bt){if(typeof Qe=="undefined"||Qe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Qe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Qe)+", string expected");if(typeof at=="function"&&(bt=at,at=null),at=gt({},xe.defaults,at||{}),kt(at),bt){var ge=at.highlight,ye;try{ye=tt.lex(Qe,at)}catch(Mt){return bt(Mt)}var Fe=function(Be){var Gt;if(!Be)try{at.walkTokens&&xe.walkTokens(ye,at.walkTokens),Gt=ct.parse(ye,at)}catch(pn){Be=pn}return at.highlight=ge,Be?bt(Be):bt(null,Gt)};if(!ge||ge.length<3||(delete at.highlight,!ye.length))return Fe();var ze=0;xe.walkTokens(ye,function(Mt){Mt.type==="code"&&(ze++,setTimeout(function(){ge(Mt.text,Mt.lang,function(Be,Gt){if(Be)return Fe(Be);Gt!=null&&Gt!==Mt.text&&(Mt.text=Gt,Mt.escaped=!0),ze--,ze===0&&Fe()})},0))}),ze===0&&Fe();return}try{var q=tt.lex(Qe,at);return at.walkTokens&&xe.walkTokens(q,at.walkTokens),ct.parse(q,at)}catch(Mt){if(Mt.message+=`
Please report this to https://github.com/markedjs/marked.`,at.silent)return"<p>An error occurred:</p><pre>"+w(Mt.message+"",!0)+"</pre>";throw Mt}}xe.options=xe.setOptions=function(Qe){return gt(xe.defaults,Qe),qe(xe.defaults),xe},xe.getDefaults=O,xe.defaults=oe,xe.use=function(Qe){var at=gt({},Qe);if(Qe.renderer&&function(){var ge=xe.defaults.renderer||new Ue,ye=function(q){var Mt=ge[q];ge[q]=function(){for(var Be=arguments.length,Gt=new Array(Be),pn=0;pn<Be;pn++)Gt[pn]=arguments[pn];var En=Qe.renderer[q].apply(ge,Gt);return En===!1&&(En=Mt.apply(ge,Gt)),En}};for(var Fe in Qe.renderer)ye(Fe);at.renderer=ge}(),Qe.tokenizer&&function(){var ge=xe.defaults.tokenizer||new ut,ye=function(q){var Mt=ge[q];ge[q]=function(){for(var Be=arguments.length,Gt=new Array(Be),pn=0;pn<Be;pn++)Gt[pn]=arguments[pn];var En=Qe.tokenizer[q].apply(ge,Gt);return En===!1&&(En=Mt.apply(ge,Gt)),En}};for(var Fe in Qe.tokenizer)ye(Fe);at.tokenizer=ge}(),Qe.walkTokens){var bt=xe.defaults.walkTokens;at.walkTokens=function(ge){Qe.walkTokens(ge),bt&&bt(ge)}}xe.setOptions(at)},xe.walkTokens=function(Qe,at){for(var bt=$(Qe),ge;!(ge=bt()).done;){var ye=ge.value;switch(at(ye),ye.type){case"table":{for(var Fe=$(ye.tokens.header),ze;!(ze=Fe()).done;){var q=ze.value;xe.walkTokens(q,at)}for(var Mt=$(ye.tokens.cells),Be;!(Be=Mt()).done;)for(var Gt=Be.value,pn=$(Gt),En;!(En=pn()).done;){var sr=En.value;xe.walkTokens(sr,at)}break}case"list":{xe.walkTokens(ye.items,at);break}default:ye.tokens&&xe.walkTokens(ye.tokens,at)}}},xe.parseInline=function(Qe,at){if(typeof Qe=="undefined"||Qe===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Qe!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Qe)+", string expected");at=gt({},xe.defaults,at||{}),kt(at);try{var bt=tt.lexInline(Qe,at);return at.walkTokens&&xe.walkTokens(bt,at.walkTokens),ct.parseInline(bt,at)}catch(ge){if(ge.message+=`
Please report this to https://github.com/markedjs/marked.`,at.silent)return"<p>An error occurred:</p><pre>"+w(ge.message+"",!0)+"</pre>";throw ge}},xe.Parser=ct,xe.parser=ct.parse,xe.Renderer=Ue,xe.TextRenderer=xt,xe.Lexer=tt,xe.lexer=tt.lex,xe.Tokenizer=ut,xe.Slugger=dt,xe.parse=xe;var jt=xe;return jt})},11690:function(un){const We=/[&<>"']/,m=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,ee=/[<>"']|&(?!#?\w+;)/g,$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ie=ce=>$[ce];function F(ce,De){if(De){if(We.test(ce))return ce.replace(m,ie)}else if(c.test(ce))return ce.replace(ee,ie);return ce}const g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function J(ce){return ce.replace(g,(De,Pe)=>(Pe=Pe.toLowerCase(),Pe==="colon"?":":Pe.charAt(0)==="#"?Pe.charAt(1)==="x"?String.fromCharCode(parseInt(Pe.substring(2),16)):String.fromCharCode(+Pe.substring(1)):""))}const X=/(^|[^\[])\^/g;function o(ce,De){ce=ce.source||ce,De=De||"";const Pe={replace:(Ce,He)=>(He=He.source||He,He=He.replace(X,"$1"),ce=ce.replace(Ce,He),Pe),getRegex:()=>new RegExp(ce,De)};return Pe}const x=/[^\w:]/g,L=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(ce,De,Pe){if(ce){let Ce;try{Ce=decodeURIComponent(J(Pe)).replace(x,"").toLowerCase()}catch(He){return null}if(Ce.indexOf("javascript:")===0||Ce.indexOf("vbscript:")===0||Ce.indexOf("data:")===0)return null}De&&!L.test(Pe)&&(Pe=j(De,Pe));try{Pe=encodeURI(Pe).replace(/%25/g,"%")}catch(Ce){return null}return Pe}const S={},T=/^[^:]+:\/*[^/]*$/,B=/^([^:]+:)[\s\S]*$/,z=/^([^:]+:\/*[^/]*)[\s\S]*$/;function j(ce,De){S[" "+ce]||(T.test(ce)?S[" "+ce]=ce+"/":S[" "+ce]=I(ce,"/",!0)),ce=S[" "+ce];const Pe=ce.indexOf(":")===-1;return De.substring(0,2)==="//"?Pe?De:ce.replace(B,"$1")+De:De.charAt(0)==="/"?Pe?De:ce.replace(z,"$1")+De:ce+De}const U={exec:function(){}};function A(ce){let De=1,Pe,Ce;for(;De<arguments.length;De++){Pe=arguments[De];for(Ce in Pe)Object.prototype.hasOwnProperty.call(Pe,Ce)&&(ce[Ce]=Pe[Ce])}return ce}function K(ce,De){const Pe=ce.replace(/\|/g,(ue,W,P)=>{let de=!1,ae=W;for(;--ae>=0&&P[ae]==="\\";)de=!de;return de?"|":" |"}),Ce=Pe.split(/ \|/);let He=0;if(Ce.length>De)Ce.splice(De);else for(;Ce.length<De;)Ce.push("");for(;He<Ce.length;He++)Ce[He]=Ce[He].trim().replace(/\\\|/g,"|");return Ce}function I(ce,De,Pe){const Ce=ce.length;if(Ce===0)return"";let He=0;for(;He<Ce;){const ue=ce.charAt(Ce-He-1);if(ue===De&&!Pe)He++;else if(ue!==De&&Pe)He++;else break}return ce.substr(0,Ce-He)}function M(ce,De){if(ce.indexOf(De[1])===-1)return-1;const Pe=ce.length;let Ce=0,He=0;for(;He<Pe;He++)if(ce[He]==="\\")He++;else if(ce[He]===De[0])Ce++;else if(ce[He]===De[1]&&(Ce--,Ce<0))return He;return-1}function le(ce){ce&&ce.sanitize&&!ce.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function me(ce,De){if(De<1)return"";let Pe="";for(;De>1;)De&1&&(Pe+=ce),De>>=1,ce+=ce;return Pe+ce}un.exports={escape:F,unescape:J,edit:o,cleanUrl:b,resolveUrl:j,noopTest:U,merge:A,splitCells:K,rtrim:I,findClosingBracket:M,checkSanitizeDeprecation:le,repeatString:me}},75918:function(un,We,m){"use strict";m.d(We,{Wi:function(){return g},Z0:function(){return J},aU:function(){return F},eZ:function(){return o},wY:function(){return X}});var c=m(4348),ee=m(69323),$=m(13268),ie=function(x,L,b,S){function T(B){return B instanceof b?B:new b(function(z){z(B)})}return new(b||(b=Promise))(function(B,z){function j(K){try{A(S.next(K))}catch(I){z(I)}}function U(K){try{A(S.throw(K))}catch(I){z(I)}}function A(K){K.done?B(K.value):T(K.value).then(j,U)}A((S=S.apply(x,L||[])).next())})};class F extends ee.JT{constructor(L,b="",S="",T=!0,B){super(),this._onDidChange=this._register(new c.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=L,this._label=b,this._cssClass=S,this._enabled=T,this._actionCallback=B}get id(){return this._id}get label(){return this._label}set label(L){this._setLabel(L)}_setLabel(L){this._label!==L&&(this._label=L,this._onDidChange.fire({label:L}))}get tooltip(){return this._tooltip||""}set tooltip(L){this._setTooltip(L)}_setTooltip(L){this._tooltip!==L&&(this._tooltip=L,this._onDidChange.fire({tooltip:L}))}get class(){return this._cssClass}set class(L){this._setClass(L)}_setClass(L){this._cssClass!==L&&(this._cssClass=L,this._onDidChange.fire({class:L}))}get enabled(){return this._enabled}set enabled(L){this._setEnabled(L)}_setEnabled(L){this._enabled!==L&&(this._enabled=L,this._onDidChange.fire({enabled:L}))}get checked(){return this._checked}set checked(L){this._setChecked(L)}_setChecked(L){this._checked!==L&&(this._checked=L,this._onDidChange.fire({checked:L}))}run(L,b){return ie(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(L))})}}class g extends ee.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new c.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new c.Q5),this.onDidRun=this._onDidRun.event}run(L,b){return ie(this,void 0,void 0,function*(){if(!L.enabled)return;this._onBeforeRun.fire({action:L});let S;try{yield this.runAction(L,b)}catch(T){S=T}this._onDidRun.fire({action:L,error:S})})}runAction(L,b){return ie(this,void 0,void 0,function*(){yield L.run(b)})}}class J extends F{constructor(L){super(J.ID,L,L?"separator text":"separator"),this.checked=!1,this.enabled=!1}}J.ID="vs.actions.separator";class X{constructor(L,b,S,T){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=L,this.label=b,this.class=T,this._actions=S}get actions(){return this._actions}dispose(){}run(){return ie(this,void 0,void 0,function*(){})}}class o extends F{constructor(){super(o.ID,$.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(un,We,m){"use strict";m.d(We,{ok:function(){return c}});function c(ee,$){if(!ee)throw new Error($?`Assertion failed (${$})`:"Assertion Failed")}},52615:function(un,We,m){"use strict";m.d(We,{CM:function(){return F},JL:function(){return g},dT:function(){return X},fK:function(){return ie},lA:function(){return J}});var c=m(4348);class ee{constructor(){this._icons=new Map,this._onDidRegister=new c.Q5}add(x){const L=this._icons.get(x.id);L?x.description?L.description=x.description:console.error(`Duplicate registration of codicon ${x.id}`):(this._icons.set(x.id,x),this._onDidRegister.fire(x))}get(x){return this._icons.get(x)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const $=new ee,ie=$;function F(o,x){return new J(o,x)}function g(o){return o?o.replace(/\$\((.*?)\)/g,(x,L)=>` ${L} `).trim():""}class J{constructor(x,L,b){this.id=x,this.definition=L,this.description=b,$.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var X;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const x=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function L(T){if(T instanceof J)return["codicon","codicon-"+T.id];const B=x.exec(T.id);if(!B)return L(J.error);let[,z,j]=B;const U=["codicon","codicon-"+z];return j&&U.push("codicon-modifier-"+j.substr(1)),U}o.asClassNameArray=L;function b(T){return L(T).join(" ")}o.asClassName=b;function S(T){return"."+L(T).join(".")}o.asCSSSelector=S})(X||(X={})),function(o){o.add=new o("add",{fontCharacter:"\\ea60"}),o.plus=new o("plus",o.add.definition),o.gistNew=new o("gist-new",o.add.definition),o.repoCreate=new o("repo-create",o.add.definition),o.lightbulb=new o("lightbulb",{fontCharacter:"\\ea61"}),o.lightBulb=new o("light-bulb",{fontCharacter:"\\ea61"}),o.repo=new o("repo",{fontCharacter:"\\ea62"}),o.repoDelete=new o("repo-delete",{fontCharacter:"\\ea62"}),o.gistFork=new o("gist-fork",{fontCharacter:"\\ea63"}),o.repoForked=new o("repo-forked",{fontCharacter:"\\ea63"}),o.gitPullRequest=new o("git-pull-request",{fontCharacter:"\\ea64"}),o.gitPullRequestAbandoned=new o("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),o.recordKeys=new o("record-keys",{fontCharacter:"\\ea65"}),o.keyboard=new o("keyboard",{fontCharacter:"\\ea65"}),o.tag=new o("tag",{fontCharacter:"\\ea66"}),o.tagAdd=new o("tag-add",{fontCharacter:"\\ea66"}),o.tagRemove=new o("tag-remove",{fontCharacter:"\\ea66"}),o.person=new o("person",{fontCharacter:"\\ea67"}),o.personFollow=new o("person-follow",{fontCharacter:"\\ea67"}),o.personOutline=new o("person-outline",{fontCharacter:"\\ea67"}),o.personFilled=new o("person-filled",{fontCharacter:"\\ea67"}),o.gitBranch=new o("git-branch",{fontCharacter:"\\ea68"}),o.gitBranchCreate=new o("git-branch-create",{fontCharacter:"\\ea68"}),o.gitBranchDelete=new o("git-branch-delete",{fontCharacter:"\\ea68"}),o.sourceControl=new o("source-control",{fontCharacter:"\\ea68"}),o.mirror=new o("mirror",{fontCharacter:"\\ea69"}),o.mirrorPublic=new o("mirror-public",{fontCharacter:"\\ea69"}),o.star=new o("star",{fontCharacter:"\\ea6a"}),o.starAdd=new o("star-add",{fontCharacter:"\\ea6a"}),o.starDelete=new o("star-delete",{fontCharacter:"\\ea6a"}),o.starEmpty=new o("star-empty",{fontCharacter:"\\ea6a"}),o.comment=new o("comment",{fontCharacter:"\\ea6b"}),o.commentAdd=new o("comment-add",{fontCharacter:"\\ea6b"}),o.alert=new o("alert",{fontCharacter:"\\ea6c"}),o.warning=new o("warning",{fontCharacter:"\\ea6c"}),o.search=new o("search",{fontCharacter:"\\ea6d"}),o.searchSave=new o("search-save",{fontCharacter:"\\ea6d"}),o.logOut=new o("log-out",{fontCharacter:"\\ea6e"}),o.signOut=new o("sign-out",{fontCharacter:"\\ea6e"}),o.logIn=new o("log-in",{fontCharacter:"\\ea6f"}),o.signIn=new o("sign-in",{fontCharacter:"\\ea6f"}),o.eye=new o("eye",{fontCharacter:"\\ea70"}),o.eyeUnwatch=new o("eye-unwatch",{fontCharacter:"\\ea70"}),o.eyeWatch=new o("eye-watch",{fontCharacter:"\\ea70"}),o.circleFilled=new o("circle-filled",{fontCharacter:"\\ea71"}),o.primitiveDot=new o("primitive-dot",{fontCharacter:"\\ea71"}),o.closeDirty=new o("close-dirty",{fontCharacter:"\\ea71"}),o.debugBreakpoint=new o("debug-breakpoint",{fontCharacter:"\\ea71"}),o.debugBreakpointDisabled=new o("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),o.debugHint=new o("debug-hint",{fontCharacter:"\\ea71"}),o.primitiveSquare=new o("primitive-square",{fontCharacter:"\\ea72"}),o.edit=new o("edit",{fontCharacter:"\\ea73"}),o.pencil=new o("pencil",{fontCharacter:"\\ea73"}),o.info=new o("info",{fontCharacter:"\\ea74"}),o.issueOpened=new o("issue-opened",{fontCharacter:"\\ea74"}),o.gistPrivate=new o("gist-private",{fontCharacter:"\\ea75"}),o.gitForkPrivate=new o("git-fork-private",{fontCharacter:"\\ea75"}),o.lock=new o("lock",{fontCharacter:"\\ea75"}),o.mirrorPrivate=new o("mirror-private",{fontCharacter:"\\ea75"}),o.close=new o("close",{fontCharacter:"\\ea76"}),o.removeClose=new o("remove-close",{fontCharacter:"\\ea76"}),o.x=new o("x",{fontCharacter:"\\ea76"}),o.repoSync=new o("repo-sync",{fontCharacter:"\\ea77"}),o.sync=new o("sync",{fontCharacter:"\\ea77"}),o.clone=new o("clone",{fontCharacter:"\\ea78"}),o.desktopDownload=new o("desktop-download",{fontCharacter:"\\ea78"}),o.beaker=new o("beaker",{fontCharacter:"\\ea79"}),o.microscope=new o("microscope",{fontCharacter:"\\ea79"}),o.vm=new o("vm",{fontCharacter:"\\ea7a"}),o.deviceDesktop=new o("device-desktop",{fontCharacter:"\\ea7a"}),o.file=new o("file",{fontCharacter:"\\ea7b"}),o.fileText=new o("file-text",{fontCharacter:"\\ea7b"}),o.more=new o("more",{fontCharacter:"\\ea7c"}),o.ellipsis=new o("ellipsis",{fontCharacter:"\\ea7c"}),o.kebabHorizontal=new o("kebab-horizontal",{fontCharacter:"\\ea7c"}),o.mailReply=new o("mail-reply",{fontCharacter:"\\ea7d"}),o.reply=new o("reply",{fontCharacter:"\\ea7d"}),o.organization=new o("organization",{fontCharacter:"\\ea7e"}),o.organizationFilled=new o("organization-filled",{fontCharacter:"\\ea7e"}),o.organizationOutline=new o("organization-outline",{fontCharacter:"\\ea7e"}),o.newFile=new o("new-file",{fontCharacter:"\\ea7f"}),o.fileAdd=new o("file-add",{fontCharacter:"\\ea7f"}),o.newFolder=new o("new-folder",{fontCharacter:"\\ea80"}),o.fileDirectoryCreate=new o("file-directory-create",{fontCharacter:"\\ea80"}),o.trash=new o("trash",{fontCharacter:"\\ea81"}),o.trashcan=new o("trashcan",{fontCharacter:"\\ea81"}),o.history=new o("history",{fontCharacter:"\\ea82"}),o.clock=new o("clock",{fontCharacter:"\\ea82"}),o.folder=new o("folder",{fontCharacter:"\\ea83"}),o.fileDirectory=new o("file-directory",{fontCharacter:"\\ea83"}),o.symbolFolder=new o("symbol-folder",{fontCharacter:"\\ea83"}),o.logoGithub=new o("logo-github",{fontCharacter:"\\ea84"}),o.markGithub=new o("mark-github",{fontCharacter:"\\ea84"}),o.github=new o("github",{fontCharacter:"\\ea84"}),o.terminal=new o("terminal",{fontCharacter:"\\ea85"}),o.console=new o("console",{fontCharacter:"\\ea85"}),o.repl=new o("repl",{fontCharacter:"\\ea85"}),o.zap=new o("zap",{fontCharacter:"\\ea86"}),o.symbolEvent=new o("symbol-event",{fontCharacter:"\\ea86"}),o.error=new o("error",{fontCharacter:"\\ea87"}),o.stop=new o("stop",{fontCharacter:"\\ea87"}),o.variable=new o("variable",{fontCharacter:"\\ea88"}),o.symbolVariable=new o("symbol-variable",{fontCharacter:"\\ea88"}),o.array=new o("array",{fontCharacter:"\\ea8a"}),o.symbolArray=new o("symbol-array",{fontCharacter:"\\ea8a"}),o.symbolModule=new o("symbol-module",{fontCharacter:"\\ea8b"}),o.symbolPackage=new o("symbol-package",{fontCharacter:"\\ea8b"}),o.symbolNamespace=new o("symbol-namespace",{fontCharacter:"\\ea8b"}),o.symbolObject=new o("symbol-object",{fontCharacter:"\\ea8b"}),o.symbolMethod=new o("symbol-method",{fontCharacter:"\\ea8c"}),o.symbolFunction=new o("symbol-function",{fontCharacter:"\\ea8c"}),o.symbolConstructor=new o("symbol-constructor",{fontCharacter:"\\ea8c"}),o.symbolBoolean=new o("symbol-boolean",{fontCharacter:"\\ea8f"}),o.symbolNull=new o("symbol-null",{fontCharacter:"\\ea8f"}),o.symbolNumeric=new o("symbol-numeric",{fontCharacter:"\\ea90"}),o.symbolNumber=new o("symbol-number",{fontCharacter:"\\ea90"}),o.symbolStructure=new o("symbol-structure",{fontCharacter:"\\ea91"}),o.symbolStruct=new o("symbol-struct",{fontCharacter:"\\ea91"}),o.symbolParameter=new o("symbol-parameter",{fontCharacter:"\\ea92"}),o.symbolTypeParameter=new o("symbol-type-parameter",{fontCharacter:"\\ea92"}),o.symbolKey=new o("symbol-key",{fontCharacter:"\\ea93"}),o.symbolText=new o("symbol-text",{fontCharacter:"\\ea93"}),o.symbolReference=new o("symbol-reference",{fontCharacter:"\\ea94"}),o.goToFile=new o("go-to-file",{fontCharacter:"\\ea94"}),o.symbolEnum=new o("symbol-enum",{fontCharacter:"\\ea95"}),o.symbolValue=new o("symbol-value",{fontCharacter:"\\ea95"}),o.symbolRuler=new o("symbol-ruler",{fontCharacter:"\\ea96"}),o.symbolUnit=new o("symbol-unit",{fontCharacter:"\\ea96"}),o.activateBreakpoints=new o("activate-breakpoints",{fontCharacter:"\\ea97"}),o.archive=new o("archive",{fontCharacter:"\\ea98"}),o.arrowBoth=new o("arrow-both",{fontCharacter:"\\ea99"}),o.arrowDown=new o("arrow-down",{fontCharacter:"\\ea9a"}),o.arrowLeft=new o("arrow-left",{fontCharacter:"\\ea9b"}),o.arrowRight=new o("arrow-right",{fontCharacter:"\\ea9c"}),o.arrowSmallDown=new o("arrow-small-down",{fontCharacter:"\\ea9d"}),o.arrowSmallLeft=new o("arrow-small-left",{fontCharacter:"\\ea9e"}),o.arrowSmallRight=new o("arrow-small-right",{fontCharacter:"\\ea9f"}),o.arrowSmallUp=new o("arrow-small-up",{fontCharacter:"\\eaa0"}),o.arrowUp=new o("arrow-up",{fontCharacter:"\\eaa1"}),o.bell=new o("bell",{fontCharacter:"\\eaa2"}),o.bold=new o("bold",{fontCharacter:"\\eaa3"}),o.book=new o("book",{fontCharacter:"\\eaa4"}),o.bookmark=new o("bookmark",{fontCharacter:"\\eaa5"}),o.debugBreakpointConditionalUnverified=new o("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),o.debugBreakpointConditional=new o("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),o.debugBreakpointConditionalDisabled=new o("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),o.debugBreakpointDataUnverified=new o("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),o.debugBreakpointData=new o("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),o.debugBreakpointDataDisabled=new o("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),o.debugBreakpointLogUnverified=new o("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),o.debugBreakpointLog=new o("debug-breakpoint-log",{fontCharacter:"\\eaab"}),o.debugBreakpointLogDisabled=new o("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),o.briefcase=new o("briefcase",{fontCharacter:"\\eaac"}),o.broadcast=new o("broadcast",{fontCharacter:"\\eaad"}),o.browser=new o("browser",{fontCharacter:"\\eaae"}),o.bug=new o("bug",{fontCharacter:"\\eaaf"}),o.calendar=new o("calendar",{fontCharacter:"\\eab0"}),o.caseSensitive=new o("case-sensitive",{fontCharacter:"\\eab1"}),o.check=new o("check",{fontCharacter:"\\eab2"}),o.checklist=new o("checklist",{fontCharacter:"\\eab3"}),o.chevronDown=new o("chevron-down",{fontCharacter:"\\eab4"}),o.dropDownButton=new o("drop-down-button",o.chevronDown.definition),o.chevronLeft=new o("chevron-left",{fontCharacter:"\\eab5"}),o.chevronRight=new o("chevron-right",{fontCharacter:"\\eab6"}),o.chevronUp=new o("chevron-up",{fontCharacter:"\\eab7"}),o.chromeClose=new o("chrome-close",{fontCharacter:"\\eab8"}),o.chromeMaximize=new o("chrome-maximize",{fontCharacter:"\\eab9"}),o.chromeMinimize=new o("chrome-minimize",{fontCharacter:"\\eaba"}),o.chromeRestore=new o("chrome-restore",{fontCharacter:"\\eabb"}),o.circleOutline=new o("circle-outline",{fontCharacter:"\\eabc"}),o.debugBreakpointUnverified=new o("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),o.circleSlash=new o("circle-slash",{fontCharacter:"\\eabd"}),o.circuitBoard=new o("circuit-board",{fontCharacter:"\\eabe"}),o.clearAll=new o("clear-all",{fontCharacter:"\\eabf"}),o.clippy=new o("clippy",{fontCharacter:"\\eac0"}),o.closeAll=new o("close-all",{fontCharacter:"\\eac1"}),o.cloudDownload=new o("cloud-download",{fontCharacter:"\\eac2"}),o.cloudUpload=new o("cloud-upload",{fontCharacter:"\\eac3"}),o.code=new o("code",{fontCharacter:"\\eac4"}),o.collapseAll=new o("collapse-all",{fontCharacter:"\\eac5"}),o.colorMode=new o("color-mode",{fontCharacter:"\\eac6"}),o.commentDiscussion=new o("comment-discussion",{fontCharacter:"\\eac7"}),o.compareChanges=new o("compare-changes",{fontCharacter:"\\eafd"}),o.creditCard=new o("credit-card",{fontCharacter:"\\eac9"}),o.dash=new o("dash",{fontCharacter:"\\eacc"}),o.dashboard=new o("dashboard",{fontCharacter:"\\eacd"}),o.database=new o("database",{fontCharacter:"\\eace"}),o.debugContinue=new o("debug-continue",{fontCharacter:"\\eacf"}),o.debugDisconnect=new o("debug-disconnect",{fontCharacter:"\\ead0"}),o.debugPause=new o("debug-pause",{fontCharacter:"\\ead1"}),o.debugRestart=new o("debug-restart",{fontCharacter:"\\ead2"}),o.debugStart=new o("debug-start",{fontCharacter:"\\ead3"}),o.debugStepInto=new o("debug-step-into",{fontCharacter:"\\ead4"}),o.debugStepOut=new o("debug-step-out",{fontCharacter:"\\ead5"}),o.debugStepOver=new o("debug-step-over",{fontCharacter:"\\ead6"}),o.debugStop=new o("debug-stop",{fontCharacter:"\\ead7"}),o.debug=new o("debug",{fontCharacter:"\\ead8"}),o.deviceCameraVideo=new o("device-camera-video",{fontCharacter:"\\ead9"}),o.deviceCamera=new o("device-camera",{fontCharacter:"\\eada"}),o.deviceMobile=new o("device-mobile",{fontCharacter:"\\eadb"}),o.diffAdded=new o("diff-added",{fontCharacter:"\\eadc"}),o.diffIgnored=new o("diff-ignored",{fontCharacter:"\\eadd"}),o.diffModified=new o("diff-modified",{fontCharacter:"\\eade"}),o.diffRemoved=new o("diff-removed",{fontCharacter:"\\eadf"}),o.diffRenamed=new o("diff-renamed",{fontCharacter:"\\eae0"}),o.diff=new o("diff",{fontCharacter:"\\eae1"}),o.discard=new o("discard",{fontCharacter:"\\eae2"}),o.editorLayout=new o("editor-layout",{fontCharacter:"\\eae3"}),o.emptyWindow=new o("empty-window",{fontCharacter:"\\eae4"}),o.exclude=new o("exclude",{fontCharacter:"\\eae5"}),o.extensions=new o("extensions",{fontCharacter:"\\eae6"}),o.eyeClosed=new o("eye-closed",{fontCharacter:"\\eae7"}),o.fileBinary=new o("file-binary",{fontCharacter:"\\eae8"}),o.fileCode=new o("file-code",{fontCharacter:"\\eae9"}),o.fileMedia=new o("file-media",{fontCharacter:"\\eaea"}),o.filePdf=new o("file-pdf",{fontCharacter:"\\eaeb"}),o.fileSubmodule=new o("file-submodule",{fontCharacter:"\\eaec"}),o.fileSymlinkDirectory=new o("file-symlink-directory",{fontCharacter:"\\eaed"}),o.fileSymlinkFile=new o("file-symlink-file",{fontCharacter:"\\eaee"}),o.fileZip=new o("file-zip",{fontCharacter:"\\eaef"}),o.files=new o("files",{fontCharacter:"\\eaf0"}),o.filter=new o("filter",{fontCharacter:"\\eaf1"}),o.flame=new o("flame",{fontCharacter:"\\eaf2"}),o.foldDown=new o("fold-down",{fontCharacter:"\\eaf3"}),o.foldUp=new o("fold-up",{fontCharacter:"\\eaf4"}),o.fold=new o("fold",{fontCharacter:"\\eaf5"}),o.folderActive=new o("folder-active",{fontCharacter:"\\eaf6"}),o.folderOpened=new o("folder-opened",{fontCharacter:"\\eaf7"}),o.gear=new o("gear",{fontCharacter:"\\eaf8"}),o.gift=new o("gift",{fontCharacter:"\\eaf9"}),o.gistSecret=new o("gist-secret",{fontCharacter:"\\eafa"}),o.gist=new o("gist",{fontCharacter:"\\eafb"}),o.gitCommit=new o("git-commit",{fontCharacter:"\\eafc"}),o.gitCompare=new o("git-compare",{fontCharacter:"\\eafd"}),o.gitMerge=new o("git-merge",{fontCharacter:"\\eafe"}),o.githubAction=new o("github-action",{fontCharacter:"\\eaff"}),o.githubAlt=new o("github-alt",{fontCharacter:"\\eb00"}),o.globe=new o("globe",{fontCharacter:"\\eb01"}),o.grabber=new o("grabber",{fontCharacter:"\\eb02"}),o.graph=new o("graph",{fontCharacter:"\\eb03"}),o.gripper=new o("gripper",{fontCharacter:"\\eb04"}),o.heart=new o("heart",{fontCharacter:"\\eb05"}),o.home=new o("home",{fontCharacter:"\\eb06"}),o.horizontalRule=new o("horizontal-rule",{fontCharacter:"\\eb07"}),o.hubot=new o("hubot",{fontCharacter:"\\eb08"}),o.inbox=new o("inbox",{fontCharacter:"\\eb09"}),o.issueClosed=new o("issue-closed",{fontCharacter:"\\eba4"}),o.issueReopened=new o("issue-reopened",{fontCharacter:"\\eb0b"}),o.issues=new o("issues",{fontCharacter:"\\eb0c"}),o.italic=new o("italic",{fontCharacter:"\\eb0d"}),o.jersey=new o("jersey",{fontCharacter:"\\eb0e"}),o.json=new o("json",{fontCharacter:"\\eb0f"}),o.kebabVertical=new o("kebab-vertical",{fontCharacter:"\\eb10"}),o.key=new o("key",{fontCharacter:"\\eb11"}),o.law=new o("law",{fontCharacter:"\\eb12"}),o.lightbulbAutofix=new o("lightbulb-autofix",{fontCharacter:"\\eb13"}),o.linkExternal=new o("link-external",{fontCharacter:"\\eb14"}),o.link=new o("link",{fontCharacter:"\\eb15"}),o.listOrdered=new o("list-ordered",{fontCharacter:"\\eb16"}),o.listUnordered=new o("list-unordered",{fontCharacter:"\\eb17"}),o.liveShare=new o("live-share",{fontCharacter:"\\eb18"}),o.loading=new o("loading",{fontCharacter:"\\eb19"}),o.location=new o("location",{fontCharacter:"\\eb1a"}),o.mailRead=new o("mail-read",{fontCharacter:"\\eb1b"}),o.mail=new o("mail",{fontCharacter:"\\eb1c"}),o.markdown=new o("markdown",{fontCharacter:"\\eb1d"}),o.megaphone=new o("megaphone",{fontCharacter:"\\eb1e"}),o.mention=new o("mention",{fontCharacter:"\\eb1f"}),o.milestone=new o("milestone",{fontCharacter:"\\eb20"}),o.mortarBoard=new o("mortar-board",{fontCharacter:"\\eb21"}),o.move=new o("move",{fontCharacter:"\\eb22"}),o.multipleWindows=new o("multiple-windows",{fontCharacter:"\\eb23"}),o.mute=new o("mute",{fontCharacter:"\\eb24"}),o.noNewline=new o("no-newline",{fontCharacter:"\\eb25"}),o.note=new o("note",{fontCharacter:"\\eb26"}),o.octoface=new o("octoface",{fontCharacter:"\\eb27"}),o.openPreview=new o("open-preview",{fontCharacter:"\\eb28"}),o.package_=new o("package",{fontCharacter:"\\eb29"}),o.paintcan=new o("paintcan",{fontCharacter:"\\eb2a"}),o.pin=new o("pin",{fontCharacter:"\\eb2b"}),o.play=new o("play",{fontCharacter:"\\eb2c"}),o.run=new o("run",{fontCharacter:"\\eb2c"}),o.plug=new o("plug",{fontCharacter:"\\eb2d"}),o.preserveCase=new o("preserve-case",{fontCharacter:"\\eb2e"}),o.preview=new o("preview",{fontCharacter:"\\eb2f"}),o.project=new o("project",{fontCharacter:"\\eb30"}),o.pulse=new o("pulse",{fontCharacter:"\\eb31"}),o.question=new o("question",{fontCharacter:"\\eb32"}),o.quote=new o("quote",{fontCharacter:"\\eb33"}),o.radioTower=new o("radio-tower",{fontCharacter:"\\eb34"}),o.reactions=new o("reactions",{fontCharacter:"\\eb35"}),o.references=new o("references",{fontCharacter:"\\eb36"}),o.refresh=new o("refresh",{fontCharacter:"\\eb37"}),o.regex=new o("regex",{fontCharacter:"\\eb38"}),o.remoteExplorer=new o("remote-explorer",{fontCharacter:"\\eb39"}),o.remote=new o("remote",{fontCharacter:"\\eb3a"}),o.remove=new o("remove",{fontCharacter:"\\eb3b"}),o.replaceAll=new o("replace-all",{fontCharacter:"\\eb3c"}),o.replace=new o("replace",{fontCharacter:"\\eb3d"}),o.repoClone=new o("repo-clone",{fontCharacter:"\\eb3e"}),o.repoForcePush=new o("repo-force-push",{fontCharacter:"\\eb3f"}),o.repoPull=new o("repo-pull",{fontCharacter:"\\eb40"}),o.repoPush=new o("repo-push",{fontCharacter:"\\eb41"}),o.report=new o("report",{fontCharacter:"\\eb42"}),o.requestChanges=new o("request-changes",{fontCharacter:"\\eb43"}),o.rocket=new o("rocket",{fontCharacter:"\\eb44"}),o.rootFolderOpened=new o("root-folder-opened",{fontCharacter:"\\eb45"}),o.rootFolder=new o("root-folder",{fontCharacter:"\\eb46"}),o.rss=new o("rss",{fontCharacter:"\\eb47"}),o.ruby=new o("ruby",{fontCharacter:"\\eb48"}),o.saveAll=new o("save-all",{fontCharacter:"\\eb49"}),o.saveAs=new o("save-as",{fontCharacter:"\\eb4a"}),o.save=new o("save",{fontCharacter:"\\eb4b"}),o.screenFull=new o("screen-full",{fontCharacter:"\\eb4c"}),o.screenNormal=new o("screen-normal",{fontCharacter:"\\eb4d"}),o.searchStop=new o("search-stop",{fontCharacter:"\\eb4e"}),o.server=new o("server",{fontCharacter:"\\eb50"}),o.settingsGear=new o("settings-gear",{fontCharacter:"\\eb51"}),o.settings=new o("settings",{fontCharacter:"\\eb52"}),o.shield=new o("shield",{fontCharacter:"\\eb53"}),o.smiley=new o("smiley",{fontCharacter:"\\eb54"}),o.sortPrecedence=new o("sort-precedence",{fontCharacter:"\\eb55"}),o.splitHorizontal=new o("split-horizontal",{fontCharacter:"\\eb56"}),o.splitVertical=new o("split-vertical",{fontCharacter:"\\eb57"}),o.squirrel=new o("squirrel",{fontCharacter:"\\eb58"}),o.starFull=new o("star-full",{fontCharacter:"\\eb59"}),o.starHalf=new o("star-half",{fontCharacter:"\\eb5a"}),o.symbolClass=new o("symbol-class",{fontCharacter:"\\eb5b"}),o.symbolColor=new o("symbol-color",{fontCharacter:"\\eb5c"}),o.symbolConstant=new o("symbol-constant",{fontCharacter:"\\eb5d"}),o.symbolEnumMember=new o("symbol-enum-member",{fontCharacter:"\\eb5e"}),o.symbolField=new o("symbol-field",{fontCharacter:"\\eb5f"}),o.symbolFile=new o("symbol-file",{fontCharacter:"\\eb60"}),o.symbolInterface=new o("symbol-interface",{fontCharacter:"\\eb61"}),o.symbolKeyword=new o("symbol-keyword",{fontCharacter:"\\eb62"}),o.symbolMisc=new o("symbol-misc",{fontCharacter:"\\eb63"}),o.symbolOperator=new o("symbol-operator",{fontCharacter:"\\eb64"}),o.symbolProperty=new o("symbol-property",{fontCharacter:"\\eb65"}),o.wrench=new o("wrench",{fontCharacter:"\\eb65"}),o.wrenchSubaction=new o("wrench-subaction",{fontCharacter:"\\eb65"}),o.symbolSnippet=new o("symbol-snippet",{fontCharacter:"\\eb66"}),o.tasklist=new o("tasklist",{fontCharacter:"\\eb67"}),o.telescope=new o("telescope",{fontCharacter:"\\eb68"}),o.textSize=new o("text-size",{fontCharacter:"\\eb69"}),o.threeBars=new o("three-bars",{fontCharacter:"\\eb6a"}),o.thumbsdown=new o("thumbsdown",{fontCharacter:"\\eb6b"}),o.thumbsup=new o("thumbsup",{fontCharacter:"\\eb6c"}),o.tools=new o("tools",{fontCharacter:"\\eb6d"}),o.triangleDown=new o("triangle-down",{fontCharacter:"\\eb6e"}),o.triangleLeft=new o("triangle-left",{fontCharacter:"\\eb6f"}),o.triangleRight=new o("triangle-right",{fontCharacter:"\\eb70"}),o.triangleUp=new o("triangle-up",{fontCharacter:"\\eb71"}),o.twitter=new o("twitter",{fontCharacter:"\\eb72"}),o.unfold=new o("unfold",{fontCharacter:"\\eb73"}),o.unlock=new o("unlock",{fontCharacter:"\\eb74"}),o.unmute=new o("unmute",{fontCharacter:"\\eb75"}),o.unverified=new o("unverified",{fontCharacter:"\\eb76"}),o.verified=new o("verified",{fontCharacter:"\\eb77"}),o.versions=new o("versions",{fontCharacter:"\\eb78"}),o.vmActive=new o("vm-active",{fontCharacter:"\\eb79"}),o.vmOutline=new o("vm-outline",{fontCharacter:"\\eb7a"}),o.vmRunning=new o("vm-running",{fontCharacter:"\\eb7b"}),o.watch=new o("watch",{fontCharacter:"\\eb7c"}),o.whitespace=new o("whitespace",{fontCharacter:"\\eb7d"}),o.wholeWord=new o("whole-word",{fontCharacter:"\\eb7e"}),o.window=new o("window",{fontCharacter:"\\eb7f"}),o.wordWrap=new o("word-wrap",{fontCharacter:"\\eb80"}),o.zoomIn=new o("zoom-in",{fontCharacter:"\\eb81"}),o.zoomOut=new o("zoom-out",{fontCharacter:"\\eb82"}),o.listFilter=new o("list-filter",{fontCharacter:"\\eb83"}),o.listFlat=new o("list-flat",{fontCharacter:"\\eb84"}),o.listSelection=new o("list-selection",{fontCharacter:"\\eb85"}),o.selection=new o("selection",{fontCharacter:"\\eb85"}),o.listTree=new o("list-tree",{fontCharacter:"\\eb86"}),o.debugBreakpointFunctionUnverified=new o("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),o.debugBreakpointFunction=new o("debug-breakpoint-function",{fontCharacter:"\\eb88"}),o.debugBreakpointFunctionDisabled=new o("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),o.debugStackframeActive=new o("debug-stackframe-active",{fontCharacter:"\\eb89"}),o.debugStackframeDot=new o("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),o.debugStackframe=new o("debug-stackframe",{fontCharacter:"\\eb8b"}),o.debugStackframeFocused=new o("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),o.debugBreakpointUnsupported=new o("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),o.symbolString=new o("symbol-string",{fontCharacter:"\\eb8d"}),o.debugReverseContinue=new o("debug-reverse-continue",{fontCharacter:"\\eb8e"}),o.debugStepBack=new o("debug-step-back",{fontCharacter:"\\eb8f"}),o.debugRestartFrame=new o("debug-restart-frame",{fontCharacter:"\\eb90"}),o.callIncoming=new o("call-incoming",{fontCharacter:"\\eb92"}),o.callOutgoing=new o("call-outgoing",{fontCharacter:"\\eb93"}),o.menu=new o("menu",{fontCharacter:"\\eb94"}),o.expandAll=new o("expand-all",{fontCharacter:"\\eb95"}),o.feedback=new o("feedback",{fontCharacter:"\\eb96"}),o.groupByRefType=new o("group-by-ref-type",{fontCharacter:"\\eb97"}),o.ungroupByRefType=new o("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),o.account=new o("account",{fontCharacter:"\\eb99"}),o.bellDot=new o("bell-dot",{fontCharacter:"\\eb9a"}),o.debugConsole=new o("debug-console",{fontCharacter:"\\eb9b"}),o.library=new o("library",{fontCharacter:"\\eb9c"}),o.output=new o("output",{fontCharacter:"\\eb9d"}),o.runAll=new o("run-all",{fontCharacter:"\\eb9e"}),o.syncIgnored=new o("sync-ignored",{fontCharacter:"\\eb9f"}),o.pinned=new o("pinned",{fontCharacter:"\\eba0"}),o.githubInverted=new o("github-inverted",{fontCharacter:"\\eba1"}),o.debugAlt=new o("debug-alt",{fontCharacter:"\\eb91"}),o.serverProcess=new o("server-process",{fontCharacter:"\\eba2"}),o.serverEnvironment=new o("server-environment",{fontCharacter:"\\eba3"}),o.pass=new o("pass",{fontCharacter:"\\eba4"}),o.stopCircle=new o("stop-circle",{fontCharacter:"\\eba5"}),o.playCircle=new o("play-circle",{fontCharacter:"\\eba6"}),o.record=new o("record",{fontCharacter:"\\eba7"}),o.debugAltSmall=new o("debug-alt-small",{fontCharacter:"\\eba8"}),o.vmConnect=new o("vm-connect",{fontCharacter:"\\eba9"}),o.cloud=new o("cloud",{fontCharacter:"\\ebaa"}),o.merge=new o("merge",{fontCharacter:"\\ebab"}),o.exportIcon=new o("export",{fontCharacter:"\\ebac"}),o.graphLeft=new o("graph-left",{fontCharacter:"\\ebad"}),o.magnet=new o("magnet",{fontCharacter:"\\ebae"}),o.notebook=new o("notebook",{fontCharacter:"\\ebaf"}),o.redo=new o("redo",{fontCharacter:"\\ebb0"}),o.checkAll=new o("check-all",{fontCharacter:"\\ebb1"}),o.pinnedDirty=new o("pinned-dirty",{fontCharacter:"\\ebb2"}),o.passFilled=new o("pass-filled",{fontCharacter:"\\ebb3"}),o.circleLargeFilled=new o("circle-large-filled",{fontCharacter:"\\ebb4"}),o.circleLargeOutline=new o("circle-large-outline",{fontCharacter:"\\ebb5"}),o.combine=new o("combine",{fontCharacter:"\\ebb6"}),o.gather=new o("gather",{fontCharacter:"\\ebb6"}),o.table=new o("table",{fontCharacter:"\\ebb7"}),o.variableGroup=new o("variable-group",{fontCharacter:"\\ebb8"}),o.typeHierarchy=new o("type-hierarchy",{fontCharacter:"\\ebb9"}),o.typeHierarchySub=new o("type-hierarchy-sub",{fontCharacter:"\\ebba"}),o.typeHierarchySuper=new o("type-hierarchy-super",{fontCharacter:"\\ebbb"}),o.gitPullRequestCreate=new o("git-pull-request-create",{fontCharacter:"\\ebbc"}),o.runAbove=new o("run-above",{fontCharacter:"\\ebbd"}),o.runBelow=new o("run-below",{fontCharacter:"\\ebbe"}),o.notebookTemplate=new o("notebook-template",{fontCharacter:"\\ebbf"}),o.debugRerun=new o("debug-rerun",{fontCharacter:"\\ebc0"}),o.workspaceTrusted=new o("workspace-trusted",{fontCharacter:"\\ebc1"}),o.workspaceUntrusted=new o("workspace-untrusted",{fontCharacter:"\\ebc2"}),o.workspaceUnspecified=new o("workspace-unspecified",{fontCharacter:"\\ebc3"}),o.terminalCmd=new o("terminal-cmd",{fontCharacter:"\\ebc4"}),o.terminalDebian=new o("terminal-debian",{fontCharacter:"\\ebc5"}),o.terminalLinux=new o("terminal-linux",{fontCharacter:"\\ebc6"}),o.terminalPowershell=new o("terminal-powershell",{fontCharacter:"\\ebc7"}),o.terminalTmux=new o("terminal-tmux",{fontCharacter:"\\ebc8"}),o.terminalUbuntu=new o("terminal-ubuntu",{fontCharacter:"\\ebc9"}),o.terminalBash=new o("terminal-bash",{fontCharacter:"\\ebca"}),o.arrowSwap=new o("arrow-swap",{fontCharacter:"\\ebcb"}),o.copy=new o("copy",{fontCharacter:"\\ebcc"}),o.personAdd=new o("person-add",{fontCharacter:"\\ebcd"}),o.filterFilled=new o("filter-filled",{fontCharacter:"\\ebce"}),o.wand=new o("wand",{fontCharacter:"\\ebcf"}),o.debugLineByLine=new o("debug-line-by-line",{fontCharacter:"\\ebd0"}),o.inspect=new o("inspect",{fontCharacter:"\\ebd1"}),o.layers=new o("layers",{fontCharacter:"\\ebd2"}),o.layersDot=new o("layers-dot",{fontCharacter:"\\ebd3"}),o.layersActive=new o("layers-active",{fontCharacter:"\\ebd4"}),o.compass=new o("compass",{fontCharacter:"\\ebd5"}),o.compassDot=new o("compass-dot",{fontCharacter:"\\ebd6"}),o.compassActive=new o("compass-active",{fontCharacter:"\\ebd7"}),o.azure=new o("azure",{fontCharacter:"\\ebd8"}),o.issueDraft=new o("issue-draft",{fontCharacter:"\\ebd9"}),o.gitPullRequestClosed=new o("git-pull-request-closed",{fontCharacter:"\\ebda"}),o.gitPullRequestDraft=new o("git-pull-request-draft",{fontCharacter:"\\ebdb"}),o.debugAll=new o("debug-all",{fontCharacter:"\\ebdc"}),o.debugCoverage=new o("debug-coverage",{fontCharacter:"\\ebdd"}),o.runErrors=new o("run-errors",{fontCharacter:"\\ebde"}),o.folderLibrary=new o("folder-library",{fontCharacter:"\\ebdf"}),o.debugContinueSmall=new o("debug-continue-small",{fontCharacter:"\\ebe0"}),o.beakerStop=new o("beaker-stop",{fontCharacter:"\\ebe1"}),o.graphLine=new o("graph-line",{fontCharacter:"\\ebe2"}),o.graphScatter=new o("graph-scatter",{fontCharacter:"\\ebe3"}),o.pieChart=new o("pie-chart",{fontCharacter:"\\ebe4"}),o.bracket=new o("bracket",o.json.definition),o.bracketDot=new o("bracket-dot",{fontCharacter:"\\ebe5"}),o.bracketError=new o("bracket-error",{fontCharacter:"\\ebe6"}),o.lockSmall=new o("lock-small",{fontCharacter:"\\ebe7"}),o.azureDevops=new o("azure-devops",{fontCharacter:"\\ebe8"}),o.verifiedFilled=new o("verified-filled",{fontCharacter:"\\ebe9"})}(J||(J={}))},79881:function(un,We,m){"use strict";m.d(We,{B8:function(){return L},Cp:function(){return ie},F0:function(){return X},L6:function(){return x},VV:function(){return J},b1:function(){return o},dL:function(){return $},ri:function(){return F}});class c{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(S){setTimeout(()=>{throw S.stack?new Error(S.message+`
`+S.stack):S},0)}}emit(S){this.listeners.forEach(T=>{T(S)})}onUnexpectedError(S){this.unexpectedErrorHandler(S),this.emit(S)}onUnexpectedExternalError(S){this.unexpectedErrorHandler(S)}}const ee=new c;function $(b){J(b)||ee.onUnexpectedError(b)}function ie(b){J(b)||ee.onUnexpectedExternalError(b)}function F(b){if(b instanceof Error){let{name:S,message:T}=b;const B=b.stacktrace||b.stack;return{$isError:!0,name:S,message:T,stack:B}}return b}const g="Canceled";function J(b){return b instanceof Error&&b.name===g&&b.message===g}function X(){const b=new Error(g);return b.name=b.message,b}function o(b){return b?new Error(`Illegal argument: ${b}`):new Error("Illegal argument")}function x(b){return b?new Error(`Illegal state: ${b}`):new Error("Illegal state")}class L extends Error{constructor(S){super("NotSupported"),S&&(this.message=S)}}},4348:function(un,We,m){"use strict";m.d(We,{D0:function(){return L},E7:function(){return b},K3:function(){return x},Q5:function(){return o},ZD:function(){return S},ju:function(){return F}});var c=m(79881),ee=m(69323),$=m(34502),ie=m(95830),F;(function(T){T.None=()=>ee.JT.None;function B(P){return(de,ae=null,Q)=>{let E=!1,C;return C=P(Y=>{if(!E)return C?C.dispose():E=!0,de.call(ae,Y)},null,Q),E&&C.dispose(),C}}T.once=B;function z(P,de){return M((ae,Q=null,E)=>P(C=>ae.call(Q,de(C)),null,E))}T.map=z;function j(P,de){return M((ae,Q=null,E)=>P(C=>{de(C),ae.call(Q,C)},null,E))}T.forEach=j;function U(P,de){return M((ae,Q=null,E)=>P(C=>de(C)&&ae.call(Q,C),null,E))}T.filter=U;function A(P){return P}T.signal=A;function K(...P){return(de,ae=null,Q)=>(0,ee.F8)(...P.map(E=>E(C=>de.call(ae,C),null,Q)))}T.any=K;function I(P,de,ae){let Q=ae;return z(P,E=>(Q=de(Q,E),Q))}T.reduce=I;function M(P){let de;const ae=new o({onFirstListenerAdd(){de=P(ae.fire,ae)},onLastListenerRemove(){de.dispose()}});return ae.event}function le(P,de,ae=100,Q=!1,E){let C,Y,be,je=0;const lt=new o({leakWarningThreshold:E,onFirstListenerAdd(){C=P(ke=>{je++,Y=de(Y,ke),Q&&!be&&(lt.fire(Y),Y=void 0),clearTimeout(be),be=setTimeout(()=>{const Ye=Y;Y=void 0,be=void 0,(!Q||je>1)&&lt.fire(Ye),je=0},ae)})},onLastListenerRemove(){C.dispose()}});return lt.event}T.debounce=le;function me(P,de=(ae,Q)=>ae===Q){let ae=!0,Q;return U(P,E=>{const C=ae||!de(E,Q);return ae=!1,Q=E,C})}T.latch=me;function ce(P,de){return[T.filter(P,de),T.filter(P,ae=>!de(ae))]}T.split=ce;function De(P,de=!1,ae=[]){let Q=ae.slice(),E=P(be=>{Q?Q.push(be):Y.fire(be)});const C=()=>{Q&&Q.forEach(be=>Y.fire(be)),Q=null},Y=new o({onFirstListenerAdd(){E||(E=P(be=>Y.fire(be)))},onFirstListenerDidAdd(){Q&&(de?setTimeout(C):C())},onLastListenerRemove(){E&&E.dispose(),E=null}});return Y.event}T.buffer=De;class Pe{constructor(de){this.event=de}map(de){return new Pe(z(this.event,de))}forEach(de){return new Pe(j(this.event,de))}filter(de){return new Pe(U(this.event,de))}reduce(de,ae){return new Pe(I(this.event,de,ae))}latch(){return new Pe(me(this.event))}debounce(de,ae=100,Q=!1,E){return new Pe(le(this.event,de,ae,Q,E))}on(de,ae,Q){return this.event(de,ae,Q)}once(de,ae,Q){return B(this.event)(de,ae,Q)}}function Ce(P){return new Pe(P)}T.chain=Ce;function He(P,de,ae=Q=>Q){const Q=(...be)=>Y.fire(ae(...be)),E=()=>P.on(de,Q),C=()=>P.removeListener(de,Q),Y=new o({onFirstListenerAdd:E,onLastListenerRemove:C});return Y.event}T.fromNodeEventEmitter=He;function ue(P,de,ae=Q=>Q){const Q=(...be)=>Y.fire(ae(...be)),E=()=>P.addEventListener(de,Q),C=()=>P.removeEventListener(de,Q),Y=new o({onFirstListenerAdd:E,onLastListenerRemove:C});return Y.event}T.fromDOMEventEmitter=ue;function W(P){return new Promise(de=>B(P)(de))}T.toPromise=W})(F||(F={}));class g{constructor(B){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${B}_${g._idPool++}`}start(B){this._stopWatch=new ie.G(!0),this._listenerCount=B}stop(){if(this._stopWatch){const B=this._stopWatch.elapsed();this._elapsedOverall+=B,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${B.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}g._idPool=0;let J=-1;class X{constructor(B,z=Math.random().toString(18).slice(2,5)){this.customThreshold=B,this.name=z,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(B){let z=J;if(typeof this.customThreshold=="number"&&(z=this.customThreshold),z<=0||B<z)return;this._stacks||(this._stacks=new Map);const j=new Error().stack.split(`
`).slice(3).join(`
`),U=this._stacks.get(j)||0;if(this._stacks.set(j,U+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=z*.5;let A,K=0;for(const[I,M]of this._stacks)(!A||K<M)&&(A=I,K=M);console.warn(`[${this.name}] potential listener LEAK detected, having ${B} listeners already. MOST frequent listener (${K}):`),console.warn(A)}return()=>{const A=this._stacks.get(j)||0;this._stacks.set(j,A-1)}}}class o{constructor(B){var z;this._disposed=!1,this._options=B,this._leakageMon=J>0?new X(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((z=this._options)===null||z===void 0)&&z._profName?new g(this._options._profName):void 0}get event(){return this._event||(this._event=(B,z,j)=>{var U;this._listeners||(this._listeners=new $.S);const A=this._listeners.isEmpty();A&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const K=this._listeners.push(z?[B,z]:B);A&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,B,z);const I=(U=this._leakageMon)===null||U===void 0?void 0:U.check(this._listeners.size),M=(0,ee.OF)(()=>{I&&I(),this._disposed||(K(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return j instanceof ee.SL?j.add(M):Array.isArray(j)&&j.push(M),M}),this._event}fire(B){var z,j;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new $.S);for(let U of this._listeners)this._deliveryQueue.push([U,B]);for((z=this._perfMon)===null||z===void 0||z.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[U,A]=this._deliveryQueue.shift();try{typeof U=="function"?U.call(void 0,A):U[0].call(U[1],A)}catch(K){(0,c.dL)(K)}}(j=this._perfMon)===null||j===void 0||j.stop()}}dispose(){var B,z,j,U,A;this._disposed||(this._disposed=!0,(B=this._listeners)===null||B===void 0||B.clear(),(z=this._deliveryQueue)===null||z===void 0||z.clear(),(U=(j=this._options)===null||j===void 0?void 0:j.onLastListenerRemove)===null||U===void 0||U.call(j),(A=this._leakageMon)===null||A===void 0||A.dispose())}}class x extends o{constructor(B){super(B),this._isPaused=0,this._eventQueue=new $.S,this._mergeFn=B==null?void 0:B.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const B=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(B))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(B){this._listeners&&(this._isPaused!==0?this._eventQueue.push(B):super.fire(B))}}class L extends x{constructor(B){var z;super(B),this._delay=(z=B.delay)!==null&&z!==void 0?z:100}fire(B){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(B)}}class b{constructor(){this.buffers=[]}wrapEvent(B){return(z,j,U)=>B(A=>{const K=this.buffers[this.buffers.length-1];K?K.push(()=>z.call(j,A)):z.call(j,A)},void 0,U)}bufferEvents(B){const z=[];this.buffers.push(z);const j=B();return this.buffers.pop(),z.forEach(U=>U()),j}}class S{constructor(){this.listening=!1,this.inputEvent=F.None,this.inputEventListener=ee.JT.None,this.emitter=new o({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(B){this.inputEvent=B,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=B(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(un,We,m){"use strict";m.d(We,{I:function(){return c}});function c(ee){const $=this;let ie=!1,F;return function(){return ie||(ie=!0,F=ee.apply($,arguments)),F}}},88226:function(un,We,m){"use strict";m.d(We,{$:function(){return c}});var c;(function(ee){function $(K){return K&&typeof K=="object"&&typeof K[Symbol.iterator]=="function"}ee.is=$;const ie=Object.freeze([]);function F(){return ie}ee.empty=F;function*g(K){yield K}ee.single=g;function J(K){return K||ie}ee.from=J;function X(K){return!K||K[Symbol.iterator]().next().done===!0}ee.isEmpty=X;function o(K){return K[Symbol.iterator]().next().value}ee.first=o;function x(K,I){for(const M of K)if(I(M))return!0;return!1}ee.some=x;function L(K,I){for(const M of K)if(I(M))return M}ee.find=L;function*b(K,I){for(const M of K)I(M)&&(yield M)}ee.filter=b;function*S(K,I){let M=0;for(const le of K)yield I(le,M++)}ee.map=S;function*T(...K){for(const I of K)for(const M of I)yield M}ee.concat=T;function*B(K){for(const I of K)for(const M of I)yield M}ee.concatNested=B;function z(K,I,M){let le=M;for(const me of K)le=I(le,me);return le}ee.reduce=z;function*j(K,I,M=K.length){for(I<0&&(I+=K.length),M<0?M+=K.length:M>K.length&&(M=K.length);I<M;I++)yield K[I]}ee.slice=j;function U(K,I=Number.POSITIVE_INFINITY){const M=[];if(I===0)return[M,K];const le=K[Symbol.iterator]();for(let me=0;me<I;me++){const ce=le.next();if(ce.done)return[M,ee.empty()];M.push(ce.value)}return[M,{[Symbol.iterator](){return le}}]}ee.consume=U;function A(K,I,M=(le,me)=>le===me){const le=K[Symbol.iterator](),me=I[Symbol.iterator]();for(;;){const ce=le.next(),De=me.next();if(ce.done!==De.done)return!1;if(ce.done)return!0;if(!M(ce.value,De.value))return!1}}ee.equals=A})(c||(c={}))},69323:function(un,We,m){"use strict";m.d(We,{B9:function(){return S},F8:function(){return T},JT:function(){return j},Jz:function(){return A},OF:function(){return B},SL:function(){return z},Wf:function(){return b},XK:function(){return U},dk:function(){return x}});var c=m(17845),ee=m(88226);const $=!1;let ie=null;function F(K){ie=K}if($){const K="__is_disposable_tracked__";F(new class{trackDisposable(I){const M=new Error("Potentially leaked disposable").stack;setTimeout(()=>{I[K]||console.log(M)},3e3)}setParent(I,M){if(I&&I!==j.None)try{I[K]=!0}catch(le){}}markAsDisposed(I){if(I&&I!==j.None)try{I[K]=!0}catch(M){}}markAsSingleton(I){}})}function g(K){return ie==null||ie.trackDisposable(K),K}function J(K){ie==null||ie.markAsDisposed(K)}function X(K,I){ie==null||ie.setParent(K,I)}function o(K,I){if(ie)for(const M of K)ie.setParent(M,I)}function x(K){return ie==null||ie.markAsSingleton(K),K}class L extends Error{constructor(I){super(`Encountered errors while disposing of store. Errors: [${I.join(", ")}]`),this.errors=I}}function b(K){return typeof K.dispose=="function"&&K.dispose.length===0}function S(K){if(ee.$.is(K)){let I=[];for(const M of K)if(M)try{M.dispose()}catch(le){I.push(le)}if(I.length===1)throw I[0];if(I.length>1)throw new L(I);return Array.isArray(K)?[]:K}else if(K)return K.dispose(),K}function T(...K){const I=B(()=>S(K));return o(K,I),I}function B(K){const I=g({dispose:(0,c.I)(()=>{J(I),K()})});return I}class z{constructor(){this._toDispose=new Set,this._isDisposed=!1,g(this)}dispose(){this._isDisposed||(J(this),this._isDisposed=!0,this.clear())}clear(){try{S(this._toDispose.values())}finally{this._toDispose.clear()}}add(I){if(!I)return I;if(I===this)throw new Error("Cannot register a disposable on itself!");return X(I,this),this._isDisposed?z.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(I),I}}z.DISABLE_DISPOSED_WARNING=!1;class j{constructor(){this._store=new z,g(this),X(this._store,this)}dispose(){J(this),this._store.dispose()}_register(I){if(I===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(I)}}j.None=Object.freeze({dispose(){}});class U{constructor(){this._isDisposed=!1,g(this)}get value(){return this._isDisposed?void 0:this._value}set value(I){var M;this._isDisposed||I===this._value||((M=this._value)===null||M===void 0||M.dispose(),I&&X(I,this),this._value=I)}clear(){this.value=void 0}dispose(){var I;this._isDisposed=!0,J(this),(I=this._value)===null||I===void 0||I.dispose(),this._value=void 0}clearAndLeak(){const I=this._value;return this._value=void 0,I&&X(I,null),I}}class A{constructor(I){this.object=I}dispose(){}}},34502:function(un,We,m){"use strict";m.d(We,{S:function(){return ee}});class c{constructor(ie){this.element=ie,this.next=c.Undefined,this.prev=c.Undefined}}c.Undefined=new c(void 0);class ee{constructor(){this._first=c.Undefined,this._last=c.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===c.Undefined}clear(){let ie=this._first;for(;ie!==c.Undefined;){const F=ie.next;ie.prev=c.Undefined,ie.next=c.Undefined,ie=F}this._first=c.Undefined,this._last=c.Undefined,this._size=0}unshift(ie){return this._insert(ie,!1)}push(ie){return this._insert(ie,!0)}_insert(ie,F){const g=new c(ie);if(this._first===c.Undefined)this._first=g,this._last=g;else if(F){const X=this._last;this._last=g,g.prev=X,X.next=g}else{const X=this._first;this._first=g,g.next=X,X.prev=g}this._size+=1;let J=!1;return()=>{J||(J=!0,this._remove(g))}}shift(){if(this._first!==c.Undefined){const ie=this._first.element;return this._remove(this._first),ie}}pop(){if(this._last!==c.Undefined){const ie=this._last.element;return this._remove(this._last),ie}}_remove(ie){if(ie.prev!==c.Undefined&&ie.next!==c.Undefined){const F=ie.prev;F.next=ie.next,ie.next.prev=F}else ie.prev===c.Undefined&&ie.next===c.Undefined?(this._first=c.Undefined,this._last=c.Undefined):ie.next===c.Undefined?(this._last=this._last.prev,this._last.next=c.Undefined):ie.prev===c.Undefined&&(this._first=this._first.next,this._first.prev=c.Undefined);this._size-=1}*[Symbol.iterator](){let ie=this._first;for(;ie!==c.Undefined;)yield ie.element,ie=ie.next}}},23345:function(un,We,m){"use strict";m.d(We,{$L:function(){return le},ED:function(){return A},IJ:function(){return I},OS:function(){return Pe},WE:function(){return ce},dz:function(){return K},gn:function(){return me},li:function(){return B},r:function(){return ue},tY:function(){return M},xS:function(){return De}});var c=m(97671),ee;const $="en";let ie=!1,F=!1,g=!1,J=!1,X=!1,o=!1,x=!1,L,b=null,S=null,T;const B=typeof self=="object"?self:typeof m.g=="object"?m.g:{};let z;typeof B.vscode!="undefined"&&typeof B.vscode.process!="undefined"?z=B.vscode.process:typeof c!="undefined"&&(z=c);const j=typeof((ee=z==null?void 0:z.versions)===null||ee===void 0?void 0:ee.electron)=="string"&&z.type==="renderer";if(typeof navigator=="object"&&!j)T=navigator.userAgent,ie=T.indexOf("Windows")>=0,F=T.indexOf("Macintosh")>=0,x=(T.indexOf("Macintosh")>=0||T.indexOf("iPad")>=0||T.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,g=T.indexOf("Linux")>=0,o=!0,L=navigator.language,b=L;else if(typeof z=="object"){ie=z.platform==="win32",F=z.platform==="darwin",g=z.platform==="linux",J=g&&!!z.env.SNAP&&!!z.env.SNAP_REVISION,L=$,b=$;const W=z.env.VSCODE_NLS_CONFIG;if(W)try{const P=JSON.parse(W),de=P.availableLanguages["*"];L=P.locale,b=de||$,S=P._translationsConfigFile}catch(P){}X=!0}else console.error("Unable to resolve platform.");let U=0;F?U=1:ie?U=3:g&&(U=2);const A=ie,K=F,I=g,M=X,le=o,me=x,ce=T,De=function(){if(B.setImmediate)return B.setImmediate.bind(B);if(typeof B.postMessage=="function"&&!B.importScripts){let de=[];B.addEventListener("message",Q=>{if(Q.data&&Q.data.vscodeSetImmediateId)for(let E=0,C=de.length;E<C;E++){const Y=de[E];if(Y.id===Q.data.vscodeSetImmediateId){de.splice(E,1),Y.callback();return}}});let ae=0;return Q=>{const E=++ae;de.push({id:E,callback:Q}),B.postMessage({vscodeSetImmediateId:E},"*")}}if(typeof(z==null?void 0:z.nextTick)=="function")return z.nextTick.bind(z);const P=Promise.resolve();return de=>P.then(de)}(),Pe=F||x?2:ie?1:3;let Ce=!0,He=!1;function ue(){if(!He){He=!0;const W=new Uint8Array(2);W[0]=1,W[1]=2,Ce=new Uint16Array(W.buffer)[0]===513}return Ce}},95830:function(un,We,m){"use strict";m.d(We,{G:function(){return $}});var c=m(23345);const ee=c.li.performance&&typeof c.li.performance.now=="function";class ${constructor(F){this._highResolution=ee&&F,this._startTime=this._now(),this._stopTime=-1}static create(F=!0){return new $(F)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?c.li.performance.now():Date.now()}}},82983:function(un,We,m){"use strict";m.d(We,{$i:function(){return je},C8:function(){return _t},GF:function(){return L},HO:function(){return ae},IO:function(){return b},K7:function(){return et},Kw:function(){return rt},LC:function(){return B},Mh:function(){return De},P1:function(){return Pe},PJ:function(){return Nt},Qe:function(){return lt},R1:function(){return x},RP:function(){return Y},S6:function(){return Xe},TT:function(){return A},Ut:function(){return E},V8:function(){return z},WU:function(){return $},YK:function(){return He},YU:function(){return ie},ZG:function(){return Ce},ZH:function(){return W},ab:function(){return ke},c1:function(){return Re},df:function(){return le},ec:function(){return F},fi:function(){return Ge},fy:function(){return g},j3:function(){return J},j_:function(){return I},m5:function(){return c},mK:function(){return M},mr:function(){return S},oH:function(){return te},oL:function(){return X},ok:function(){return ce},ow:function(){return j},qq:function(){return me},qu:function(){return U},rL:function(){return ue},uS:function(){return At},un:function(){return o},uq:function(){return T},vH:function(){return de},xe:function(){return Ye},zY:function(){return K}});function c(D){return!D||typeof D!="string"?!0:D.trim().length===0}const ee=/{(\d+)}/g;function $(D,...he){return he.length===0?D:D.replace(ee,function(_e,pe){const Ee=parseInt(pe,10);return isNaN(Ee)||Ee<0||Ee>=he.length?_e:he[Ee]})}function ie(D){return D.replace(/[<>&]/g,function(he){switch(he){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return he}})}function F(D){return D.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function g(D,he=" "){const _e=J(D,he);return X(_e,he)}function J(D,he){if(!D||!he)return D;const _e=he.length;if(_e===0||D.length===0)return D;let pe=0;for(;D.indexOf(he,pe)===pe;)pe=pe+_e;return D.substring(pe)}function X(D,he){if(!D||!he)return D;const _e=he.length,pe=D.length;if(_e===0||pe===0)return D;let Ee=pe,Oe=-1;for(;Oe=D.lastIndexOf(he,Ee-1),!(Oe===-1||Oe+_e!==Ee);){if(Oe===0)return"";Ee=Oe}return D.substring(0,Ee)}function o(D){return D.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function x(D){return D.replace(/\*/g,"")}function L(D,he,_e={}){if(!D)throw new Error("Cannot create regex from empty string");he||(D=F(D)),_e.wholeWord&&(/\B/.test(D.charAt(0))||(D="\\b"+D),/\B/.test(D.charAt(D.length-1))||(D=D+"\\b"));let pe="";return _e.global&&(pe+="g"),_e.matchCase||(pe+="i"),_e.multiline&&(pe+="m"),_e.unicode&&(pe+="u"),new RegExp(D,pe)}function b(D){return D.source==="^"||D.source==="^$"||D.source==="$"||D.source==="^\\s*$"?!1:!!(D.exec("")&&D.lastIndex===0)}function S(D){return(D.global?"g":"")+(D.ignoreCase?"i":"")+(D.multiline?"m":"")+(D.unicode?"u":"")}function T(D){return D.split(/\r\n|\r|\n/)}function B(D){for(let he=0,_e=D.length;he<_e;he++){const pe=D.charCodeAt(he);if(pe!==32&&pe!==9)return he}return-1}function z(D,he=0,_e=D.length){for(let pe=he;pe<_e;pe++){const Ee=D.charCodeAt(pe);if(Ee!==32&&Ee!==9)return D.substring(he,pe)}return D.substring(he,_e)}function j(D,he=D.length-1){for(let _e=he;_e>=0;_e--){const pe=D.charCodeAt(_e);if(pe!==32&&pe!==9)return _e}return-1}function U(D,he){return D<he?-1:D>he?1:0}function A(D,he,_e=0,pe=D.length,Ee=0,Oe=he.length){for(;_e<pe&&Ee<Oe;_e++,Ee++){let fe=D.charCodeAt(_e),st=he.charCodeAt(Ee);if(fe<st)return-1;if(fe>st)return 1}const Ze=pe-_e,re=Oe-Ee;return Ze<re?-1:Ze>re?1:0}function K(D,he){return I(D,he,0,D.length,0,he.length)}function I(D,he,_e=0,pe=D.length,Ee=0,Oe=he.length){for(;_e<pe&&Ee<Oe;_e++,Ee++){let fe=D.charCodeAt(_e),st=he.charCodeAt(Ee);if(fe===st)continue;if(fe>=128||st>=128)return A(D.toLowerCase(),he.toLowerCase(),_e,pe,Ee,Oe);M(fe)&&(fe-=32),M(st)&&(st-=32);const tt=fe-st;if(tt!==0)return tt}const Ze=pe-_e,re=Oe-Ee;return Ze<re?-1:Ze>re?1:0}function M(D){return D>=97&&D<=122}function le(D){return D>=65&&D<=90}function me(D,he){return D.length===he.length&&I(D,he)===0}function ce(D,he){const _e=he.length;return he.length>D.length?!1:I(D,he,0,_e)===0}function De(D,he){let _e,pe=Math.min(D.length,he.length);for(_e=0;_e<pe;_e++)if(D.charCodeAt(_e)!==he.charCodeAt(_e))return _e;return pe}function Pe(D,he){let _e,pe=Math.min(D.length,he.length);const Ee=D.length-1,Oe=he.length-1;for(_e=0;_e<pe;_e++)if(D.charCodeAt(Ee-_e)!==he.charCodeAt(Oe-_e))return _e;return pe}function Ce(D){return 55296<=D&&D<=56319}function He(D){return 56320<=D&&D<=57343}function ue(D,he){return(D-55296<<10)+(he-56320)+65536}function W(D,he,_e){const pe=D.charCodeAt(_e);if(Ce(pe)&&_e+1<he){const Ee=D.charCodeAt(_e+1);if(He(Ee))return ue(pe,Ee)}return pe}function P(D,he){const _e=D.charCodeAt(he-1);if(He(_e)&&he>1){const pe=D.charCodeAt(he-2);if(Ce(pe))return ue(pe,_e)}return _e}function de(D,he){const _e=Ne.getInstance(),pe=he,Ee=D.length,Oe=W(D,Ee,he);he+=Oe>=65536?2:1;let Ze=_e.getGraphemeBreakType(Oe);for(;he<Ee;){const re=W(D,Ee,he),fe=_e.getGraphemeBreakType(re);if(Ge(Ze,fe))break;he+=re>=65536?2:1,Ze=fe}return he-pe}function ae(D,he){const _e=Ne.getInstance(),pe=he,Ee=P(D,he);he-=Ee>=65536?2:1;let Oe=_e.getGraphemeBreakType(Ee);for(;he>0;){const Ze=P(D,he),re=_e.getGraphemeBreakType(Ze);if(Ge(re,Oe))break;he-=Ze>=65536?2:1,Oe=re}return pe-he}const Q=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function E(D){return Q.test(D)}const C=/(?:[\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 Y(D){return C.test(D)}const be=/^[\t\n\r\x20-\x7E]*$/;function je(D){return be.test(D)}const lt=/[\u2028\u2029]/;function ke(D){return lt.test(D)}function Ye(D){for(let he=0,_e=D.length;he<_e;he++)if(et(D.charCodeAt(he)))return!0;return!1}function et(D){return D=+D,D>=11904&&D<=55215||D>=63744&&D<=64255||D>=65281&&D<=65374}function _t(D){return D>=127462&&D<=127487||D===8986||D===8987||D===9200||D===9203||D>=9728&&D<=10175||D===11088||D===11093||D>=127744&&D<=128591||D>=128640&&D<=128764||D>=128992&&D<=129003||D>=129280&&D<=129535||D>=129648&&D<=129750}const Re="\uFEFF";function At(D){return!!(D&&D.length>0&&D.charCodeAt(0)===65279)}function rt(D,he=!1){return D?(he&&(D=D.replace(/\\./g,"")),D.toLowerCase()!==D):!1}function Nt(D){return D=D%(2*26),D<26?String.fromCharCode(97+D):String.fromCharCode(65+D-26)}function Xe(D){return Ne.getInstance().getGraphemeBreakType(D)}function Ge(D,he){return D===0?he!==5&&he!==7:D===2&&he===3?!1:D===4||D===2||D===3||he===4||he===2||he===3?!0:!(D===8&&(he===8||he===9||he===11||he===12)||(D===11||D===9)&&(he===9||he===10)||(D===12||D===10)&&he===10||he===5||he===13||he===7||D===1||D===13&&he===14||D===6&&he===6)}class Ne{constructor(){this._data=Ie()}static getInstance(){return Ne._INSTANCE||(Ne._INSTANCE=new Ne),Ne._INSTANCE}getGraphemeBreakType(he){if(he<32)return he===10?3:he===13?2:4;if(he<127)return 0;const _e=this._data,pe=_e.length/3;let Ee=1;for(;Ee<=pe;)if(he<_e[3*Ee])Ee=2*Ee;else if(he>_e[3*Ee+1])Ee=2*Ee+1;else return _e[3*Ee+2];return 0}}Ne._INSTANCE=null;function Ie(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function te(D,he){if(D===0)return 0;const _e=$e(D,he);if(_e!==void 0)return _e;const pe=P(he,D);return D-=Ae(pe),D}function $e(D,he){let _e=P(he,D);for(D-=Ae(_e);Z(_e)||_e===65039||_e===8419;){if(D===0)return;_e=P(he,D),D-=Ae(_e)}if(_t(_e)){if(D>=0){const pe=P(he,D);pe===8205&&(D-=Ae(pe))}return D}}function Ae(D){return D>=65536?2:1}function Z(D){return 127995<=D&&D<=127999}},72999:function(un,We,m){"use strict";m.d(We,{$E:function(){return B},$K:function(){return J},D8:function(){return b},HD:function(){return ee},IU:function(){return z},Jp:function(){return X},Kn:function(){return $},cW:function(){return x},f6:function(){return j},hj:function(){return ie},jn:function(){return F},kJ:function(){return c},mf:function(){return L},o8:function(){return g},p_:function(){return o},vE:function(){return U}});function c(A){return Array.isArray(A)}function ee(A){return typeof A=="string"}function $(A){return typeof A=="object"&&A!==null&&!Array.isArray(A)&&!(A instanceof RegExp)&&!(A instanceof Date)}function ie(A){return typeof A=="number"&&!isNaN(A)}function F(A){return A===!0||A===!1}function g(A){return typeof A=="undefined"}function J(A){return!X(A)}function X(A){return g(A)||A===null}function o(A,K){if(!A)throw new Error(K?`Unexpected type, expected '${K}'`:"Unexpected type")}function x(A){if(X(A))throw new Error("Assertion Failed: argument is undefined or null");return A}function L(A){return typeof A=="function"}function b(A,K){const I=Math.min(A.length,K.length);for(let M=0;M<I;M++)S(A[M],K[M])}function S(A,K){if(ee(K)){if(typeof A!==K)throw new Error(`argument does not match constraint: typeof ${K}`)}else if(L(K)){try{if(A instanceof K)return}catch(I){}if(!X(A)&&A.constructor===K||K.length===1&&K.call(void 0,A)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function T(A){let K=[],I=Object.getPrototypeOf(A);for(;Object.prototype!==I;)K=K.concat(Object.getOwnPropertyNames(I)),I=Object.getPrototypeOf(I);return K}function B(A){const K=[];for(const I of T(A))typeof A[I]=="function"&&K.push(I);return K}function z(A,K){const I=le=>function(){const me=Array.prototype.slice.call(arguments,0);return K(le,me)};let M={};for(const le of A)M[le]=I(le);return M}function j(A){return A===null?void 0:A}function U(A,K="Unreachable"){throw new Error(K)}},13268:function(un,We,m){"use strict";m.d(We,{N:function(){return ee}});function c($,ie){let F;return ie.length===0?F=$:F=$.replace(/\{(\d+)\}/g,function(g,J){const X=J[0];return typeof ie[X]!="undefined"?ie[X]:g}),F}function ee($,ie,...F){return c(ie,F)}},96236:function(un,We,m){"use strict";m.d(We,{BH:function(){return z},NZ:function(){return j},U8:function(){return U},co:function(){return B},eH:function(){return T},vr:function(){return S}});var c=m(75918),ee=m(52615),$=m(4348),ie=m(88226),F=m(69323),g=m(34502),J=m(35884),X=m(90689),o=m(16925),x=m(49055),L=function(A,K,I,M){var le=arguments.length,me=le<3?K:M===null?M=Object.getOwnPropertyDescriptor(K,I):M,ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")me=Reflect.decorate(A,K,I,M);else for(var De=A.length-1;De>=0;De--)(ce=A[De])&&(me=(le<3?ce(me):le>3?ce(K,I,me):ce(K,I))||me);return le>3&&me&&Object.defineProperty(K,I,me),me},b=function(A,K){return function(I,M){K(I,M,A)}};function S(A){return A.command!==void 0}class T{constructor(K){this.id=T._idPool++,this._debugName=K}}T._idPool=0,T.CommandPalette=new T("CommandPalette"),T.EditorContext=new T("EditorContext"),T.SimpleEditorContext=new T("SimpleEditorContext"),T.EditorContextCopy=new T("EditorContextCopy"),T.EditorContextPeek=new T("EditorContextPeek"),T.MenubarEditMenu=new T("MenubarEditMenu"),T.MenubarCopy=new T("MenubarCopy"),T.MenubarGoMenu=new T("MenubarGoMenu"),T.MenubarSelectionMenu=new T("MenubarSelectionMenu"),T.InlineCompletionsActions=new T("InlineCompletionsActions");const B=(0,o.yh)("menuService"),z=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new $.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:A=>A===T.CommandPalette}}addCommand(A){return this.addCommands(ie.$.single(A))}addCommands(A){for(const K of A)this._commands.set(K.id,K);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,F.OF)(()=>{let K=!1;for(const I of A)K=this._commands.delete(I.id)||K;K&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(A){return this._commands.get(A)}getCommands(){const A=new Map;return this._commands.forEach((K,I)=>A.set(I,K)),A}appendMenuItem(A,K){return this.appendMenuItems(ie.$.single({id:A,item:K}))}appendMenuItems(A){const K=new Set,I=new g.S;for(const{id:M,item:le}of A){let me=this._menuItems.get(M);me||(me=new g.S,this._menuItems.set(M,me)),I.push(me.push(le)),K.add(M)}return this._onDidChangeMenu.fire(K),(0,F.OF)(()=>{if(I.size>0){for(let M of I)M();this._onDidChangeMenu.fire(K),I.clear()}})}getMenuItems(A){let K;return this._menuItems.has(A)?K=[...this._menuItems.get(A)]:K=[],A===T.CommandPalette&&this._appendImplicitItems(K),K}_appendImplicitItems(A){const K=new Set;for(const I of A)S(I)&&(K.add(I.command.id),I.alt&&K.add(I.alt.id));this._commands.forEach((I,M)=>{K.has(M)||A.push({command:I})})}};class j extends c.wY{constructor(K,I,M,le){super(`submenuitem.${K.submenu.id}`,typeof K.title=="string"?K.title:K.title.value,[],"submenu"),this.item=K,this._menuService=I,this._contextKeyService=M,this._options=le}get actions(){const K=[],I=this._menuService.createMenu(this.item.submenu,this._contextKeyService),M=I.getActions(this._options);I.dispose();for(const[,le]of M)le.length>0&&(K.push(...le),K.push(new c.Z0));return K.length&&K.pop(),K}}let U=class cc{constructor(K,I,M,le,me){var ce,De;if(this._commandService=me,this.id=K.id,this.label=M!=null&&M.renderShortTitle&&K.shortTitle?typeof K.shortTitle=="string"?K.shortTitle:K.shortTitle.value:typeof K.title=="string"?K.title:K.title.value,this.tooltip=(De=typeof K.tooltip=="string"?K.tooltip:(ce=K.tooltip)===null||ce===void 0?void 0:ce.value)!==null&&De!==void 0?De:"",this.enabled=!K.precondition||le.contextMatchesRules(K.precondition),this.checked=void 0,K.toggled){const Pe=K.toggled.condition?K.toggled:{condition:K.toggled};this.checked=le.contextMatchesRules(Pe.condition),this.checked&&Pe.tooltip&&(this.tooltip=typeof Pe.tooltip=="string"?Pe.tooltip:Pe.tooltip.value),Pe.title&&(this.label=typeof Pe.title=="string"?Pe.title:Pe.title.value)}this.item=K,this.alt=I?new cc(I,void 0,M,le,me):void 0,this._options=M,x.kS.isThemeIcon(K.icon)&&(this.class=ee.dT.asClassName(K.icon))}dispose(){}run(...K){var I,M;let le=[];return!((I=this._options)===null||I===void 0)&&I.arg&&(le=[...le,this._options.arg]),!((M=this._options)===null||M===void 0)&&M.shouldForwardArgs&&(le=[...le,...K]),this._commandService.executeCommand(this.id,...le)}};U=L([b(3,X.i6),b(4,J.H)],U)},35884:function(un,We,m){"use strict";m.d(We,{H:function(){return J},P:function(){return X}});var c=m(4348),ee=m(88226),$=m(69323),ie=m(34502),F=m(72999),g=m(16925);const J=(0,g.yh)("commandService"),X=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new c.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,x){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!x)throw new Error("invalid command");return this.registerCommand({id:o,handler:x})}if(o.description){const B=[];for(let j of o.description.args)B.push(j.constraint);const z=o.handler;o.handler=function(j,...U){return(0,F.D8)(U,B),z(j,...U)}}const{id:L}=o;let b=this._commands.get(L);b||(b=new ie.S,this._commands.set(L,b));let S=b.unshift(o),T=(0,$.OF)(()=>{S();const B=this._commands.get(L);B!=null&&B.isEmpty()&&this._commands.delete(L)});return this._onDidRegisterCommand.fire(L),T}registerCommandAlias(o,x){return X.registerCommand(o,(L,...b)=>L.get(J).executeCommand(x,...b))}getCommand(o){const x=this._commands.get(o);if(!(!x||x.isEmpty()))return ee.$.first(x)}getCommands(){const o=new Map;for(const x of this._commands.keys()){const L=this.getCommand(x);L&&o.set(x,L)}return o}};X.registerCommand("noop",()=>{})},90689:function(un,We,m){"use strict";m.d(We,{Ao:function(){return J},Eq:function(){return ue},Fb:function(){return X},K8:function(){return de},i6:function(){return He},uy:function(){return Ce}});var c=m(23345),ee=m(82983),$=m(16925);let ie=c.WE||"";const F=new Map;F.set("false",!1),F.set("true",!0),F.set("isMac",c.dz),F.set("isLinux",c.IJ),F.set("isWindows",c.ED),F.set("isWeb",c.$L),F.set("isMacNative",c.dz&&!c.$L),F.set("isEdge",ie.indexOf("Edg/")>=0),F.set("isFirefox",ie.indexOf("Firefox")>=0),F.set("isChrome",ie.indexOf("Chrome")>=0),F.set("isSafari",ie.indexOf("Safari")>=0);const g=Object.prototype.hasOwnProperty;class J{static has(E){return b.create(E)}static equals(E,C){return S.create(E,C)}static regex(E,C){return le.create(E,C)}static not(E){return j.create(E)}static and(...E){return De.create(E,null)}static or(...E){return Pe.create(E,null,!0)}static deserialize(E,C=!1){if(E)return this._deserializeOrExpression(E,C)}static _deserializeOrExpression(E,C){let Y=E.split("||");return Pe.create(Y.map(be=>this._deserializeAndExpression(be,C)),null,!0)}static _deserializeAndExpression(E,C){let Y=E.split("&&");return De.create(Y.map(be=>this._deserializeOne(be,C)),null)}static _deserializeOne(E,C){if(E=E.trim(),E.indexOf("!=")>=0){let Y=E.split("!=");return z.create(Y[0].trim(),this._deserializeValue(Y[1],C))}if(E.indexOf("==")>=0){let Y=E.split("==");return S.create(Y[0].trim(),this._deserializeValue(Y[1],C))}if(E.indexOf("=~")>=0){let Y=E.split("=~");return le.create(Y[0].trim(),this._deserializeRegexValue(Y[1],C))}if(E.indexOf(" in ")>=0){let Y=E.split(" in ");return T.create(Y[0].trim(),Y[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(E)){const Y=E.split(">=");return K.create(Y[0].trim(),Y[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(E)){const Y=E.split(">");return A.create(Y[0].trim(),Y[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(E)){const Y=E.split("<=");return M.create(Y[0].trim(),Y[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(E)){const Y=E.split("<");return I.create(Y[0].trim(),Y[1].trim())}return/^\!\s*/.test(E)?j.create(E.substr(1).trim()):b.create(E)}static _deserializeValue(E,C){if(E=E.trim(),E==="true")return!0;if(E==="false")return!1;let Y=/^'([^']*)'$/.exec(E);return Y?Y[1].trim():E}static _deserializeRegexValue(E,C){if((0,ee.m5)(E)){if(C)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let Y=E.indexOf("/"),be=E.lastIndexOf("/");if(Y===be||Y<0){if(C)throw new Error(`bad regexp-value '${E}', missing /-enclosure`);return console.warn(`bad regexp-value '${E}', missing /-enclosure`),null}let je=E.slice(Y+1,be),lt=E[be+1]==="i"?"i":"";try{return new RegExp(je,lt)}catch(ke){if(C)throw new Error(`bad regexp-value '${E}', parse error: ${ke}`);return console.warn(`bad regexp-value '${E}', parse error: ${ke}`),null}}}function X(Q,E){const C=Q?Q.substituteConstants():void 0,Y=E?E.substituteConstants():void 0;return!C&&!Y?!0:!C||!Y?!1:C.equals(Y)}function o(Q,E){return Q.cmp(E)}class x{constructor(){this.type=0}cmp(E){return this.type-E.type}equals(E){return E.type===this.type}substituteConstants(){return this}evaluate(E){return!1}serialize(){return"false"}keys(){return[]}negate(){return L.INSTANCE}}x.INSTANCE=new x;class L{constructor(){this.type=1}cmp(E){return this.type-E.type}equals(E){return E.type===this.type}substituteConstants(){return this}evaluate(E){return!0}serialize(){return"true"}keys(){return[]}negate(){return x.INSTANCE}}L.INSTANCE=new L;class b{constructor(E,C){this.key=E,this.negated=C,this.type=2}static create(E,C=null){const Y=F.get(E);return typeof Y=="boolean"?Y?L.INSTANCE:x.INSTANCE:new b(E,C)}cmp(E){return E.type!==this.type?this.type-E.type:W(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}substituteConstants(){const E=F.get(this.key);return typeof E=="boolean"?E?L.INSTANCE:x.INSTANCE:this}evaluate(E){return!!E.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=j.create(this.key,this)),this.negated}}class S{constructor(E,C,Y){this.key=E,this.value=C,this.negated=Y,this.type=4}static create(E,C,Y=null){if(typeof C=="boolean")return C?b.create(E,Y):j.create(E,Y);const be=F.get(E);return typeof be=="boolean"?C===(be?"true":"false")?L.INSTANCE:x.INSTANCE:new S(E,C,Y)}cmp(E){return E.type!==this.type?this.type-E.type:P(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){const E=F.get(this.key);if(typeof E=="boolean"){const C=E?"true":"false";return this.value===C?L.INSTANCE:x.INSTANCE}return this}evaluate(E){return E.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=z.create(this.key,this.value,this)),this.negated}}class T{constructor(E,C){this.key=E,this.valueKey=C,this.type=10,this.negated=null}static create(E,C){return new T(E,C)}cmp(E){return E.type!==this.type?this.type-E.type:P(this.key,this.valueKey,E.key,E.valueKey)}equals(E){return E.type===this.type?this.key===E.key&&this.valueKey===E.valueKey:!1}substituteConstants(){return this}evaluate(E){const C=E.getValue(this.valueKey),Y=E.getValue(this.key);return Array.isArray(C)?C.indexOf(Y)>=0:typeof Y=="string"&&typeof C=="object"&&C!==null?g.call(C,Y):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=B.create(this)),this.negated}}class B{constructor(E){this._actual=E,this.type=11}static create(E){return new B(E)}cmp(E){return E.type!==this.type?this.type-E.type:this._actual.cmp(E._actual)}equals(E){return E.type===this.type?this._actual.equals(E._actual):!1}substituteConstants(){return this}evaluate(E){return!this._actual.evaluate(E)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class z{constructor(E,C,Y){this.key=E,this.value=C,this.negated=Y,this.type=5}static create(E,C,Y=null){if(typeof C=="boolean")return C?j.create(E,Y):b.create(E,Y);const be=F.get(E);return typeof be=="boolean"?C===(be?"true":"false")?x.INSTANCE:L.INSTANCE:new z(E,C,Y)}cmp(E){return E.type!==this.type?this.type-E.type:P(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){const E=F.get(this.key);if(typeof E=="boolean"){const C=E?"true":"false";return this.value===C?x.INSTANCE:L.INSTANCE}return this}evaluate(E){return E.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this.key,this.value,this)),this.negated}}class j{constructor(E,C){this.key=E,this.negated=C,this.type=3}static create(E,C=null){const Y=F.get(E);return typeof Y=="boolean"?Y?x.INSTANCE:L.INSTANCE:new j(E,C)}cmp(E){return E.type!==this.type?this.type-E.type:W(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}substituteConstants(){const E=F.get(this.key);return typeof E=="boolean"?E?x.INSTANCE:L.INSTANCE:this}evaluate(E){return!E.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this)),this.negated}}function U(Q,E){if(typeof Q=="string"){const C=parseFloat(Q);isNaN(C)||(Q=C)}return typeof Q=="string"||typeof Q=="number"?E(Q):x.INSTANCE}class A{constructor(E,C,Y){this.key=E,this.value=C,this.negated=Y,this.type=12}static create(E,C,Y=null){return U(C,be=>new A(E,be,Y))}cmp(E){return E.type!==this.type?this.type-E.type:P(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}class K{constructor(E,C,Y){this.key=E,this.value=C,this.negated=Y,this.type=13}static create(E,C,Y=null){return U(C,be=>new K(E,be,Y))}cmp(E){return E.type!==this.type?this.type-E.type:P(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.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 I{constructor(E,C,Y){this.key=E,this.value=C,this.negated=Y,this.type=14}static create(E,C,Y=null){return U(C,be=>new I(E,be,Y))}cmp(E){return E.type!==this.type?this.type-E.type:P(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=K.create(this.key,this.value,this)),this.negated}}class M{constructor(E,C,Y){this.key=E,this.value=C,this.negated=Y,this.type=15}static create(E,C,Y=null){return U(C,be=>new M(E,be,Y))}cmp(E){return E.type!==this.type?this.type-E.type:P(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class le{constructor(E,C){this.key=E,this.regexp=C,this.type=7,this.negated=null}static create(E,C){return new le(E,C)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.key<E.key)return-1;if(this.key>E.key)return 1;const C=this.regexp?this.regexp.source:"",Y=E.regexp?E.regexp.source:"";return C<Y?-1:C>Y?1:0}equals(E){if(E.type===this.type){const C=this.regexp?this.regexp.source:"",Y=E.regexp?E.regexp.source:"";return this.key===E.key&&C===Y}return!1}substituteConstants(){return this}evaluate(E){let C=E.getValue(this.key);return this.regexp?this.regexp.test(C):!1}serialize(){const E=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${E}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=me.create(this)),this.negated}}class me{constructor(E){this._actual=E,this.type=8}static create(E){return new me(E)}cmp(E){return E.type!==this.type?this.type-E.type:this._actual.cmp(E._actual)}equals(E){return E.type===this.type?this._actual.equals(E._actual):!1}substituteConstants(){return this}evaluate(E){return!this._actual.evaluate(E)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function ce(Q){let E=null;for(let C=0,Y=Q.length;C<Y;C++){const be=Q[C].substituteConstants();if(Q[C]!==be&&E===null){E=[];for(let je=0;je<C;je++)E[je]=Q[je]}E!==null&&(E[C]=be)}return E===null?Q:E}class De{constructor(E,C){this.expr=E,this.negated=C,this.type=6}static create(E,C){return De._normalizeArr(E,C)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.expr.length<E.expr.length)return-1;if(this.expr.length>E.expr.length)return 1;for(let C=0,Y=this.expr.length;C<Y;C++){const be=o(this.expr[C],E.expr[C]);if(be!==0)return be}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let C=0,Y=this.expr.length;C<Y;C++)if(!this.expr[C].equals(E.expr[C]))return!1;return!0}return!1}substituteConstants(){const E=ce(this.expr);return E===this.expr?this:De.create(E,this.negated)}evaluate(E){for(let C=0,Y=this.expr.length;C<Y;C++)if(!this.expr[C].evaluate(E))return!1;return!0}static _normalizeArr(E,C){const Y=[];let be=!1;for(const je of E)if(je){if(je.type===1){be=!0;continue}if(je.type===0)return x.INSTANCE;if(je.type===6){Y.push(...je.expr);continue}Y.push(je)}if(Y.length===0&&be)return L.INSTANCE;if(Y.length!==0){if(Y.length===1)return Y[0];Y.sort(o);for(let je=1;je<Y.length;je++)Y[je-1].equals(Y[je])&&(Y.splice(je,1),je--);if(Y.length===1)return Y[0];for(;Y.length>1;){const je=Y[Y.length-1];if(je.type!==9)break;Y.pop();const lt=Y.pop(),ke=Y.length===0,Ye=Pe.create(je.expr.map(et=>De.create([et,lt],null)),null,ke);Ye&&(Y.push(Ye),Y.sort(o))}return Y.length===1?Y[0]:new De(Y,C)}}serialize(){return this.expr.map(E=>E.serialize()).join(" && ")}keys(){const E=[];for(let C of this.expr)E.push(...C.keys());return E}negate(){if(!this.negated){const E=[];for(let C of this.expr)E.push(C.negate());this.negated=Pe.create(E,this,!0)}return this.negated}}class Pe{constructor(E,C){this.expr=E,this.negated=C,this.type=9}static create(E,C,Y){return Pe._normalizeArr(E,C,Y)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.expr.length<E.expr.length)return-1;if(this.expr.length>E.expr.length)return 1;for(let C=0,Y=this.expr.length;C<Y;C++){const be=o(this.expr[C],E.expr[C]);if(be!==0)return be}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let C=0,Y=this.expr.length;C<Y;C++)if(!this.expr[C].equals(E.expr[C]))return!1;return!0}return!1}substituteConstants(){const E=ce(this.expr);return E===this.expr?this:Pe.create(E,this.negated,!1)}evaluate(E){for(let C=0,Y=this.expr.length;C<Y;C++)if(this.expr[C].evaluate(E))return!0;return!1}static _normalizeArr(E,C,Y){let be=[],je=!1;if(E){for(let lt=0,ke=E.length;lt<ke;lt++){const Ye=E[lt];if(Ye){if(Ye.type===0){je=!0;continue}if(Ye.type===1)return L.INSTANCE;if(Ye.type===9){be=be.concat(Ye.expr);continue}be.push(Ye)}}if(be.length===0&&je)return x.INSTANCE;be.sort(o)}if(be.length!==0){if(be.length===1)return be[0];for(let lt=1;lt<be.length;lt++)be[lt-1].equals(be[lt])&&(be.splice(lt,1),lt--);if(be.length===1)return be[0];if(Y){for(let lt=0;lt<be.length;lt++)for(let ke=lt+1;ke<be.length;ke++)de(be[lt],be[ke])&&(be.splice(ke,1),ke--);if(be.length===1)return be[0]}return new Pe(be,C)}}serialize(){return this.expr.map(E=>E.serialize()).join(" || ")}keys(){const E=[];for(let C of this.expr)E.push(...C.keys());return E}negate(){if(!this.negated){let E=[];for(let C of this.expr)E.push(C.negate());for(;E.length>1;){const C=E.shift(),Y=E.shift(),be=[];for(const lt of ae(C))for(const ke of ae(Y))be.push(De.create([lt,ke],null));const je=E.length===0;E.unshift(Pe.create(be,null,je))}this.negated=E[0]}return this.negated}}class Ce extends b{constructor(E,C,Y){super(E,null),this._defaultValue=C,typeof Y=="object"?Ce._info.push(Object.assign(Object.assign({},Y),{key:E})):Y!==!0&&Ce._info.push({key:E,description:Y,type:C!=null?typeof C:void 0})}static all(){return Ce._info.values()}bindTo(E){return E.createKey(this.key,this._defaultValue)}getValue(E){return E.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(E){return S.create(this.key,E)}}Ce._info=[];const He=(0,$.yh)("contextKeyService"),ue="setContext";function W(Q,E){return Q<E?-1:Q>E?1:0}function P(Q,E,C,Y){return Q<C?-1:Q>C?1:E<Y?-1:E>Y?1:0}function de(Q,E){if(E.type===6&&Q.type!==9&&Q.type!==6){for(const be of E.expr)if(Q.equals(be))return!0}const C=Q.negate(),Y=ae(C).concat(ae(E));Y.sort(o);for(let be=0;be<Y.length;be++){const lt=Y[be].negate();for(let ke=be+1;ke<Y.length;ke++){const Ye=Y[ke];if(lt.equals(Ye))return!0}}return!1}function ae(Q){return Q.type===9?Q.expr:[Q]}},16925:function(un,We,m){"use strict";m.d(We,{I8:function(){return c},TG:function(){return ee},jt:function(){return F},yh:function(){return ie}});var c;(function(g){g.serviceIds=new Map,g.DI_TARGET="$di$target",g.DI_DEPENDENCIES="$di$dependencies";function J(X){return X[g.DI_DEPENDENCIES]||[]}g.getServiceDependencies=J})(c||(c={}));const ee=ie("instantiationService");function $(g,J,X,o){J[c.DI_TARGET]===J?J[c.DI_DEPENDENCIES].push({id:g,index:X,optional:o}):(J[c.DI_DEPENDENCIES]=[{id:g,index:X,optional:o}],J[c.DI_TARGET]=J)}function ie(g){if(c.serviceIds.has(g))return c.serviceIds.get(g);const J=function(X,o,x){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");$(J,X,x,!1)};return J.toString=()=>g,c.serviceIds.set(g,J),J}function F(g){return function(J,X,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");$(g,J,o,!0)}}},44650:function(un,We,m){"use strict";m.d(We,{B:function(){return ie}});var c=m(76068),ee=m(72999);class ${constructor(){this.data=new Map}add(g,J){c.ok(ee.HD(g)),c.ok(ee.Kn(J)),c.ok(!this.data.has(g),"There is already an extension with this id"),this.data.set(g,J)}as(g){return this.data.get(g)||null}}const ie=new $},66213:function(un,We,m){"use strict";m.d(We,{e:function(){return c}});var c;(function(ee){ee.DARK="dark",ee.LIGHT="light",ee.HIGH_CONTRAST="hc"})(c||(c={}))},49055:function(un,We,m){"use strict";m.d(We,{EN:function(){return o},IP:function(){return b},Ic:function(){return B},XE:function(){return J},bB:function(){return z},kS:function(){return x},m6:function(){return L}});var c=m(52615),ee=m(4348),$=m(69323),ie=m(16925),F=m(44650),g=m(66213);const J=(0,ie.yh)("themeService");var X;(function(j){function U(A){return A&&typeof A=="object"&&typeof A.id=="string"}j.isThemeColor=U})(X||(X={}));function o(j){return{id:j}}var x;(function(j){function U(me){return me&&typeof me=="object"&&typeof me.id=="string"&&(typeof me.color=="undefined"||X.isThemeColor(me.color))}j.isThemeIcon=U;const A=new RegExp(`^\\$\\((${c.dT.iconNameExpression}(?:${c.dT.iconModifierExpression})?)\\)$`);function K(me){const ce=A.exec(me);if(!ce)return;let[,De]=ce;return{id:De}}j.fromString=K;function I(me,ce){let De=me.id;const Pe=De.lastIndexOf("~");return Pe!==-1&&(De=De.substring(0,Pe)),ce&&(De=`${De}~${ce}`),{id:De}}j.modify=I;function M(me,ce){var De,Pe;return me.id===ce.id&&((De=me.color)===null||De===void 0?void 0:De.id)===((Pe=ce.color)===null||Pe===void 0?void 0:Pe.id)}j.isEqual=M;function le(me,ce){return{id:me.id,color:ce?o(ce):void 0}}j.asThemeIcon=le,j.asClassNameArray=c.dT.asClassNameArray,j.asClassName=c.dT.asClassName,j.asCSSSelector=c.dT.asCSSSelector})(x||(x={}));function L(j){switch(j){case g.e.DARK:return"vs-dark";case g.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const b={ThemingContribution:"base.contributions.theming"};class S{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new ee.Q5}onColorThemeChange(U){return this.themingParticipants.push(U),this.onThemingParticipantAddedEmitter.fire(U),(0,$.OF)(()=>{const A=this.themingParticipants.indexOf(U);this.themingParticipants.splice(A,1)})}getThemingParticipants(){return this.themingParticipants}}let T=new S;F.B.add(b.ThemingContribution,T);function B(j){return T.onColorThemeChange(j)}class z extends $.JT{constructor(U){super(),this.themeService=U,this.theme=U.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(A=>this.onThemeChange(A)))}onThemeChange(U){this.theme=U,this.updateStyles()}updateStyles(){}}},16632:function(un,We,m){"use strict";var c=m(60499),ee=m(85899),$=m(18642),ie=m(72190),F=m(42244),g=m(92310),J=m.n(g),X=m(18929),o=m(59301),x=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],L=(0,o.forwardRef)(function(b,S){var T=b.prefixCls,B=T===void 0?"rc-checkbox":T,z=b.className,j=b.style,U=b.checked,A=b.disabled,K=b.defaultChecked,I=K===void 0?!1:K,M=b.type,le=M===void 0?"checkbox":M,me=b.title,ce=b.onChange,De=(0,F.Z)(b,x),Pe=(0,o.useRef)(null),Ce=(0,o.useRef)(null),He=(0,X.Z)(I,{value:U}),ue=(0,ie.Z)(He,2),W=ue[0],P=ue[1];(0,o.useImperativeHandle)(S,function(){return{focus:function(E){var C;(C=Pe.current)===null||C===void 0||C.focus(E)},blur:function(){var E;(E=Pe.current)===null||E===void 0||E.blur()},input:Pe.current,nativeElement:Ce.current}});var de=J()(B,z,(0,$.Z)((0,$.Z)({},"".concat(B,"-checked"),W),"".concat(B,"-disabled"),A)),ae=function(E){A||("checked"in b||P(E.target.checked),ce==null||ce({target:(0,ee.Z)((0,ee.Z)({},b),{},{type:le,checked:E.target.checked}),stopPropagation:function(){E.stopPropagation()},preventDefault:function(){E.preventDefault()},nativeEvent:E.nativeEvent}))};return o.createElement("span",{className:de,title:me,style:j,ref:Ce},o.createElement("input",(0,c.Z)({},De,{className:"".concat(B,"-input"),ref:Pe,onChange:ae,disabled:A,checked:!!W,type:le})),o.createElement("span",{className:"".concat(B,"-inner")}))});We.Z=L},96478:function(un,We,m){"use strict";m.d(We,{Z:function(){return me}});var c=m(60499),ee=m(18642),$=m(72190),ie=m(42244),F=m(68196),g=m(92310),J=m.n(g),X=m(8654),o=m(59301),x=m(10228),L=m(16089),b=x.Z.ESC,S=x.Z.TAB;function T(ce){var De=ce.visible,Pe=ce.triggerRef,Ce=ce.onVisibleChange,He=ce.autoFocus,ue=ce.overlayRef,W=o.useRef(!1),P=function(){if(De){var E,C;(E=Pe.current)===null||E===void 0||(C=E.focus)===null||C===void 0||C.call(E),Ce==null||Ce(!1)}},de=function(){var E;return(E=ue.current)!==null&&E!==void 0&&E.focus?(ue.current.focus(),W.current=!0,!0):!1},ae=function(E){switch(E.keyCode){case b:P();break;case S:{var C=!1;W.current||(C=de()),C?E.preventDefault():P();break}}};o.useEffect(function(){return De?(window.addEventListener("keydown",ae),He&&(0,L.Z)(de,3),function(){window.removeEventListener("keydown",ae),W.current=!1}):function(){W.current=!1}},[De])}var B=(0,o.forwardRef)(function(ce,De){var Pe=ce.overlay,Ce=ce.arrow,He=ce.prefixCls,ue=(0,o.useMemo)(function(){var P;return typeof Pe=="function"?P=Pe():P=Pe,P},[Pe]),W=(0,X.sQ)(De,(0,X.C4)(ue));return o.createElement(o.Fragment,null,Ce&&o.createElement("div",{className:"".concat(He,"-arrow")}),o.cloneElement(ue,{ref:(0,X.Yr)(ue)?W:void 0}))}),z=B,j={adjustX:1,adjustY:1},U=[0,0],A={topLeft:{points:["bl","tl"],overflow:j,offset:[0,-4],targetOffset:U},top:{points:["bc","tc"],overflow:j,offset:[0,-4],targetOffset:U},topRight:{points:["br","tr"],overflow:j,offset:[0,-4],targetOffset:U},bottomLeft:{points:["tl","bl"],overflow:j,offset:[0,4],targetOffset:U},bottom:{points:["tc","bc"],overflow:j,offset:[0,4],targetOffset:U},bottomRight:{points:["tr","br"],overflow:j,offset:[0,4],targetOffset:U}},K=A,I=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function M(ce,De){var Pe,Ce=ce.arrow,He=Ce===void 0?!1:Ce,ue=ce.prefixCls,W=ue===void 0?"rc-dropdown":ue,P=ce.transitionName,de=ce.animation,ae=ce.align,Q=ce.placement,E=Q===void 0?"bottomLeft":Q,C=ce.placements,Y=C===void 0?K:C,be=ce.getPopupContainer,je=ce.showAction,lt=ce.hideAction,ke=ce.overlayClassName,Ye=ce.overlayStyle,et=ce.visible,_t=ce.trigger,Re=_t===void 0?["hover"]:_t,At=ce.autoFocus,rt=ce.overlay,Nt=ce.children,Xe=ce.onVisibleChange,Ge=(0,ie.Z)(ce,I),Ne=o.useState(),Ie=(0,$.Z)(Ne,2),te=Ie[0],$e=Ie[1],Ae="visible"in ce?et:te,Z=o.useRef(null),D=o.useRef(null),he=o.useRef(null);o.useImperativeHandle(De,function(){return Z.current});var _e=function(ct){$e(ct),Xe==null||Xe(ct)};T({visible:Ae,triggerRef:he,onVisibleChange:_e,autoFocus:At,overlayRef:D});var pe=function(ct){var ut=ce.onOverlayClick;$e(!1),ut&&ut(ct)},Ee=function(){return o.createElement(z,{ref:D,overlay:rt,prefixCls:W,arrow:He})},Oe=function(){return typeof rt=="function"?Ee:Ee()},Ze=function(){var ct=ce.minOverlayWidthMatchTrigger,ut=ce.alignPoint;return"minOverlayWidthMatchTrigger"in ce?ct:!ut},re=function(){var ct=ce.openClassName;return ct!==void 0?ct:"".concat(W,"-open")},fe=o.cloneElement(Nt,{className:J()((Pe=Nt.props)===null||Pe===void 0?void 0:Pe.className,Ae&&re()),ref:(0,X.Yr)(Nt)?(0,X.sQ)(he,(0,X.C4)(Nt)):void 0}),st=lt;return!st&&Re.indexOf("contextMenu")!==-1&&(st=["click"]),o.createElement(F.Z,(0,c.Z)({builtinPlacements:Y},Ge,{prefixCls:W,ref:Z,popupClassName:J()(ke,(0,ee.Z)({},"".concat(W,"-show-arrow"),He)),popupStyle:Ye,action:Re,showAction:je,hideAction:st,popupPlacement:E,popupAlign:ae,popupTransitionName:P,popupAnimation:de,popupVisible:Ae,stretch:Ze()?"minWidth":"",popup:Oe(),onPopupVisibleChange:_e,onPopupClick:pe,getPopupContainer:be}),fe)}var le=o.forwardRef(M),me=le},66003:function(un,We,m){"use strict";m.d(We,{Z:function(){return J}});var c=m(42244),ee=m(85899),$=m(43749),ie=m(59301),F=["show"];function g(X,o){if(!o.max)return!0;var x=o.strategy(X);return x<=o.max}function J(X,o){return ie.useMemo(function(){var x={};o&&(x.show=(0,$.Z)(o)==="object"&&o.formatter?o.formatter:!!o),x=(0,ee.Z)((0,ee.Z)({},x),X);var L=x,b=L.show,S=(0,c.Z)(L,F);return(0,ee.Z)((0,ee.Z)({},S),{},{show:!!b,showFormatter:typeof b=="function"?b:void 0,strategy:S.strategy||function(T){return T.length}})},[X,o])}},36901:function(un,We,m){"use strict";m.r(We),m.d(We,{BaseInput:function(){return x},default:function(){return K}});var c=m(85899),ee=m(60499),$=m(18642),ie=m(43749),F=m(92310),g=m.n(F),J=m(59301),X=m(30292),o=J.forwardRef(function(I,M){var le,me,ce,De=I.inputElement,Pe=I.children,Ce=I.prefixCls,He=I.prefix,ue=I.suffix,W=I.addonBefore,P=I.addonAfter,de=I.className,ae=I.style,Q=I.disabled,E=I.readOnly,C=I.focused,Y=I.triggerFocus,be=I.allowClear,je=I.value,lt=I.handleReset,ke=I.hidden,Ye=I.classes,et=I.classNames,_t=I.dataAttrs,Re=I.styles,At=I.components,rt=I.onClear,Nt=Pe!=null?Pe:De,Xe=(At==null?void 0:At.affixWrapper)||"span",Ge=(At==null?void 0:At.groupWrapper)||"span",Ne=(At==null?void 0:At.wrapper)||"span",Ie=(At==null?void 0:At.groupAddon)||"span",te=(0,J.useRef)(null),$e=function(xt){var dt;(dt=te.current)!==null&&dt!==void 0&&dt.contains(xt.target)&&(Y==null||Y())},Ae=(0,X.X3)(I),Z=(0,J.cloneElement)(Nt,{value:je,className:g()((le=Nt.props)===null||le===void 0?void 0:le.className,!Ae&&(et==null?void 0:et.variant))||null}),D=(0,J.useRef)(null);if(J.useImperativeHandle(M,function(){return{nativeElement:D.current||te.current}}),Ae){var he=null;if(be){var _e=!Q&&!E&&je,pe="".concat(Ce,"-clear-icon"),Ee=(0,ie.Z)(be)==="object"&&be!==null&&be!==void 0&&be.clearIcon?be.clearIcon:"\u2716";he=J.createElement("button",{type:"button",tabIndex:-1,onClick:function(xt){lt==null||lt(xt),rt==null||rt()},onMouseDown:function(xt){return xt.preventDefault()},className:g()(pe,(0,$.Z)((0,$.Z)({},"".concat(pe,"-hidden"),!_e),"".concat(pe,"-has-suffix"),!!ue))},Ee)}var Oe="".concat(Ce,"-affix-wrapper"),Ze=g()(Oe,(0,$.Z)((0,$.Z)((0,$.Z)((0,$.Z)((0,$.Z)({},"".concat(Ce,"-disabled"),Q),"".concat(Oe,"-disabled"),Q),"".concat(Oe,"-focused"),C),"".concat(Oe,"-readonly"),E),"".concat(Oe,"-input-with-clear-btn"),ue&&be&&je),Ye==null?void 0:Ye.affixWrapper,et==null?void 0:et.affixWrapper,et==null?void 0:et.variant),re=(ue||be)&&J.createElement("span",{className:g()("".concat(Ce,"-suffix"),et==null?void 0:et.suffix),style:Re==null?void 0:Re.suffix},he,ue);Z=J.createElement(Xe,(0,ee.Z)({className:Ze,style:Re==null?void 0:Re.affixWrapper,onClick:$e},_t==null?void 0:_t.affixWrapper,{ref:te}),He&&J.createElement("span",{className:g()("".concat(Ce,"-prefix"),et==null?void 0:et.prefix),style:Re==null?void 0:Re.prefix},He),Z,re)}if((0,X.He)(I)){var fe="".concat(Ce,"-group"),st="".concat(fe,"-addon"),tt="".concat(fe,"-wrapper"),ct=g()("".concat(Ce,"-wrapper"),fe,Ye==null?void 0:Ye.wrapper,et==null?void 0:et.wrapper),ut=g()(tt,(0,$.Z)({},"".concat(tt,"-disabled"),Q),Ye==null?void 0:Ye.group,et==null?void 0:et.groupWrapper);Z=J.createElement(Ge,{className:ut,ref:D},J.createElement(Ne,{className:ct},W&&J.createElement(Ie,{className:st},W),Z,P&&J.createElement(Ie,{className:st},P)))}return J.cloneElement(Z,{className:g()((me=Z.props)===null||me===void 0?void 0:me.className,de)||null,style:(0,c.Z)((0,c.Z)({},(ce=Z.props)===null||ce===void 0?void 0:ce.style),ae),hidden:ke})}),x=o,L=m(77654),b=m(72190),S=m(42244),T=m(18929),B=m(2738),z=m(66003),j=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],U=(0,J.forwardRef)(function(I,M){var le=I.autoComplete,me=I.onChange,ce=I.onFocus,De=I.onBlur,Pe=I.onPressEnter,Ce=I.onKeyDown,He=I.onKeyUp,ue=I.prefixCls,W=ue===void 0?"rc-input":ue,P=I.disabled,de=I.htmlSize,ae=I.className,Q=I.maxLength,E=I.suffix,C=I.showCount,Y=I.count,be=I.type,je=be===void 0?"text":be,lt=I.classes,ke=I.classNames,Ye=I.styles,et=I.onCompositionStart,_t=I.onCompositionEnd,Re=(0,S.Z)(I,j),At=(0,J.useState)(!1),rt=(0,b.Z)(At,2),Nt=rt[0],Xe=rt[1],Ge=(0,J.useRef)(!1),Ne=(0,J.useRef)(!1),Ie=(0,J.useRef)(null),te=(0,J.useRef)(null),$e=function(jt){Ie.current&&(0,X.nH)(Ie.current,jt)},Ae=(0,T.Z)(I.defaultValue,{value:I.value}),Z=(0,b.Z)(Ae,2),D=Z[0],he=Z[1],_e=D==null?"":String(D),pe=(0,J.useState)(null),Ee=(0,b.Z)(pe,2),Oe=Ee[0],Ze=Ee[1],re=(0,z.Z)(Y,C),fe=re.max||Q,st=re.strategy(_e),tt=!!fe&&st>fe;(0,J.useImperativeHandle)(M,function(){var xe;return{focus:$e,blur:function(){var Qe;(Qe=Ie.current)===null||Qe===void 0||Qe.blur()},setSelectionRange:function(Qe,at,bt){var ge;(ge=Ie.current)===null||ge===void 0||ge.setSelectionRange(Qe,at,bt)},select:function(){var Qe;(Qe=Ie.current)===null||Qe===void 0||Qe.select()},input:Ie.current,nativeElement:((xe=te.current)===null||xe===void 0?void 0:xe.nativeElement)||Ie.current}}),(0,J.useEffect)(function(){Ne.current&&(Ne.current=!1),Xe(function(xe){return xe&&P?!1:xe})},[P]);var ct=function(jt,Qe,at){var bt=Qe;if(!Ge.current&&re.exceedFormatter&&re.max&&re.strategy(Qe)>re.max){if(bt=re.exceedFormatter(Qe,{max:re.max}),Qe!==bt){var ge,ye;Ze([((ge=Ie.current)===null||ge===void 0?void 0:ge.selectionStart)||0,((ye=Ie.current)===null||ye===void 0?void 0:ye.selectionEnd)||0])}}else if(at.source==="compositionEnd")return;he(bt),Ie.current&&(0,X.rJ)(Ie.current,jt,me,bt)};(0,J.useEffect)(function(){if(Oe){var xe;(xe=Ie.current)===null||xe===void 0||xe.setSelectionRange.apply(xe,(0,L.Z)(Oe))}},[Oe]);var ut=function(jt){ct(jt,jt.target.value,{source:"change"})},Ue=function(jt){Ge.current=!1,ct(jt,jt.currentTarget.value,{source:"compositionEnd"}),_t==null||_t(jt)},xt=function(jt){Pe&&jt.key==="Enter"&&!Ne.current&&(Ne.current=!0,Pe(jt)),Ce==null||Ce(jt)},dt=function(jt){jt.key==="Enter"&&(Ne.current=!1),He==null||He(jt)},gt=function(jt){Xe(!0),ce==null||ce(jt)},kt=function(jt){Ne.current&&(Ne.current=!1),Xe(!1),De==null||De(jt)},w=function(jt){he(""),$e(),Ie.current&&(0,X.rJ)(Ie.current,jt,me)},O=tt&&"".concat(W,"-out-of-range"),qe=function(){var jt=(0,B.Z)(I,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return J.createElement("input",(0,ee.Z)({autoComplete:le},jt,{onChange:ut,onFocus:gt,onBlur:kt,onKeyDown:xt,onKeyUp:dt,className:g()(W,(0,$.Z)({},"".concat(W,"-disabled"),P),ke==null?void 0:ke.input),style:Ye==null?void 0:Ye.input,ref:Ie,size:de,type:je,onCompositionStart:function(at){Ge.current=!0,et==null||et(at)},onCompositionEnd:Ue}))},oe=function(){var jt=Number(fe)>0;if(E||re.show){var Qe=re.showFormatter?re.showFormatter({value:_e,count:st,maxLength:fe}):"".concat(st).concat(jt?" / ".concat(fe):"");return J.createElement(J.Fragment,null,re.show&&J.createElement("span",{className:g()("".concat(W,"-show-count-suffix"),(0,$.Z)({},"".concat(W,"-show-count-has-suffix"),!!E),ke==null?void 0:ke.count),style:(0,c.Z)({},Ye==null?void 0:Ye.count)},Qe),E)}return null};return J.createElement(x,(0,ee.Z)({},Re,{prefixCls:W,className:g()(ae,O),handleReset:w,value:_e,focused:Nt,triggerFocus:$e,suffix:oe(),disabled:P,classes:lt,classNames:ke,styles:Ye}),qe())}),A=U,K=A},30292:function(un,We,m){"use strict";m.d(We,{He:function(){return c},X3:function(){return ee},nH:function(){return F},rJ:function(){return ie}});function c(g){return!!(g.addonBefore||g.addonAfter)}function ee(g){return!!(g.prefix||g.suffix||g.allowClear)}function $(g,J,X){var o=J.cloneNode(!0),x=Object.create(g,{target:{value:o},currentTarget:{value:o}});return o.value=X,typeof J.selectionStart=="number"&&typeof J.selectionEnd=="number"&&(o.selectionStart=J.selectionStart,o.selectionEnd=J.selectionEnd),o.setSelectionRange=function(){J.setSelectionRange.apply(J,arguments)},x}function ie(g,J,X,o){if(X){var x=J;if(J.type==="click"){x=$(J,g,""),X(x);return}if(g.type!=="file"&&o!==void 0){x=$(J,g,o),X(x);return}X(x)}}function F(g,J){if(g){g.focus(J);var X=J||{},o=X.cursor;if(o){var x=g.value.length;switch(o){case"start":g.setSelectionRange(0,0);break;case"end":g.setSelectionRange(x,x);break;default:g.setSelectionRange(0,x)}}}}},28321:function(un,We,m){"use strict";m.d(We,{iz:function(){return Et},ck:function(){return bt},BW:function(){return vt},sN:function(){return bt},Wd:function(){return Vn},ZP:function(){return vn},Xl:function(){return Pe}});var c=m(60499),ee=m(18642),$=m(85899),ie=m(77654),F=m(72190),g=m(42244),J=m(92310),X=m.n(J),o=m(83836),x=m(18929),L=m(13697),b=m(48736),S=m(59301),T=m(4676),B=S.createContext(null);function z(ht,Ct){return ht===void 0?null:"".concat(ht,"-").concat(Ct)}function j(ht){var Ct=S.useContext(B);return z(Ct,ht)}var U=m(80547),A=["children","locked"],K=S.createContext(null);function I(ht,Ct){var Zt=(0,$.Z)({},ht);return Object.keys(Ct).forEach(function(Lt){var zt=Ct[Lt];zt!==void 0&&(Zt[Lt]=zt)}),Zt}function M(ht){var Ct=ht.children,Zt=ht.locked,Lt=(0,g.Z)(ht,A),zt=S.useContext(K),Vt=(0,U.Z)(function(){return I(zt,Lt)},[zt,Lt],function(nn,rn){return!Zt&&(nn[0]!==rn[0]||!(0,L.Z)(nn[1],rn[1],!0))});return S.createElement(K.Provider,{value:Vt},Ct)}var le=[],me=S.createContext(null);function ce(){return S.useContext(me)}var De=S.createContext(le);function Pe(ht){var Ct=S.useContext(De);return S.useMemo(function(){return ht!==void 0?[].concat((0,ie.Z)(Ct),[ht]):Ct},[Ct,ht])}var Ce=S.createContext(null),He=S.createContext({}),ue=He,W=m(29194);function P(ht){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,W.Z)(ht)){var Zt=ht.nodeName.toLowerCase(),Lt=["input","select","textarea","button"].includes(Zt)||ht.isContentEditable||Zt==="a"&&!!ht.getAttribute("href"),zt=ht.getAttribute("tabindex"),Vt=Number(zt),nn=null;return zt&&!Number.isNaN(Vt)?nn=Vt:Lt&&nn===null&&(nn=0),Lt&&ht.disabled&&(nn=null),nn!==null&&(nn>=0||Ct&&nn<0)}return!1}function de(ht){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Zt=(0,ie.Z)(ht.querySelectorAll("*")).filter(function(Lt){return P(Lt,Ct)});return P(ht,Ct)&&Zt.unshift(ht),Zt}var ae=null;function Q(){ae=document.activeElement}function E(){ae=null}function C(){if(ae)try{ae.focus()}catch(ht){}}function Y(ht,Ct){if(Ct.keyCode===9){var Zt=de(ht),Lt=Zt[Ct.shiftKey?0:Zt.length-1],zt=Lt===document.activeElement||ht===document.activeElement;if(zt){var Vt=Zt[Ct.shiftKey?Zt.length-1:0];Vt.focus(),Ct.preventDefault()}}}var be=m(10228),je=m(16089),lt=be.Z.LEFT,ke=be.Z.RIGHT,Ye=be.Z.UP,et=be.Z.DOWN,_t=be.Z.ENTER,Re=be.Z.ESC,At=be.Z.HOME,rt=be.Z.END,Nt=[Ye,et,lt,ke];function Xe(ht,Ct,Zt,Lt){var zt,Vt="prev",nn="next",rn="children",Sn="parent";if(ht==="inline"&&Lt===_t)return{inlineTrigger:!0};var On=(0,ee.Z)((0,ee.Z)({},Ye,Vt),et,nn),or=(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)({},lt,Zt?nn:Vt),ke,Zt?Vt:nn),et,rn),_t,rn),Nn=(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)({},Ye,Vt),et,nn),_t,rn),Re,Sn),lt,Zt?rn:Sn),ke,Zt?Sn:rn),Pn={inline:On,horizontal:or,vertical:Nn,inlineSub:On,horizontalSub:Nn,verticalSub:Nn},Hn=(zt=Pn["".concat(ht).concat(Ct?"":"Sub")])===null||zt===void 0?void 0:zt[Lt];switch(Hn){case Vt:return{offset:-1,sibling:!0};case nn:return{offset:1,sibling:!0};case Sn:return{offset:-1,sibling:!1};case rn:return{offset:1,sibling:!1};default:return null}}function Ge(ht){for(var Ct=ht;Ct;){if(Ct.getAttribute("data-menu-list"))return Ct;Ct=Ct.parentElement}return null}function Ne(ht,Ct){for(var Zt=ht||document.activeElement;Zt;){if(Ct.has(Zt))return Zt;Zt=Zt.parentElement}return null}function Ie(ht,Ct){var Zt=de(ht,!0);return Zt.filter(function(Lt){return Ct.has(Lt)})}function te(ht,Ct,Zt){var Lt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!ht)return null;var zt=Ie(ht,Ct),Vt=zt.length,nn=zt.findIndex(function(rn){return Zt===rn});return Lt<0?nn===-1?nn=Vt-1:nn-=1:Lt>0&&(nn+=1),nn=(nn+Vt)%Vt,zt[nn]}var $e=function(Ct,Zt){var Lt=new Set,zt=new Map,Vt=new Map;return Ct.forEach(function(nn){var rn=document.querySelector("[data-menu-id='".concat(z(Zt,nn),"']"));rn&&(Lt.add(rn),Vt.set(rn,nn),zt.set(nn,rn))}),{elements:Lt,key2element:zt,element2key:Vt}};function Ae(ht,Ct,Zt,Lt,zt,Vt,nn,rn,Sn,On){var or=S.useRef(),Nn=S.useRef();Nn.current=Ct;var Pn=function(){je.Z.cancel(or.current)};return S.useEffect(function(){return function(){Pn()}},[]),function(Hn){var Kn=Hn.which;if([].concat(Nt,[_t,Re,At,rt]).includes(Kn)){var er=Vt(),$n=$e(er,Lt),Zn=$n,nr=Zn.elements,ar=Zn.key2element,Jn=Zn.element2key,Yn=ar.get(Ct),qn=Ne(Yn,nr),Fn=Jn.get(qn),$r=Xe(ht,nn(Fn,!0).length===1,Zt,Kn);if(!$r&&Kn!==At&&Kn!==rt)return;(Nt.includes(Kn)||[At,rt].includes(Kn))&&Hn.preventDefault();var Ft=function(An){if(An){var en=An,sn=An.querySelector("a");sn!=null&&sn.getAttribute("href")&&(en=sn);var Rn=Jn.get(An);rn(Rn),Pn(),or.current=(0,je.Z)(function(){Nn.current===Rn&&en.focus()})}};if([At,rt].includes(Kn)||$r.sibling||!qn){var tr;!qn||ht==="inline"?tr=zt.current:tr=Ge(qn);var ur,Yr=Ie(tr,nr);Kn===At?ur=Yr[0]:Kn===rt?ur=Yr[Yr.length-1]:ur=te(tr,nr,qn,$r.offset),Ft(ur)}else if($r.inlineTrigger)Sn(Fn);else if($r.offset>0)Sn(Fn,!0),Pn(),or.current=(0,je.Z)(function(){$n=$e(er,Lt);var Bn=qn.getAttribute("aria-controls"),An=document.getElementById(Bn),en=te(An,$n.elements);Ft(en)},5);else if($r.offset<0){var zr=nn(Fn,!0),li=zr[zr.length-2],Qr=ar.get(li);Sn(li,!1),Ft(Qr)}}On==null||On(Hn)}}function Z(ht){Promise.resolve().then(ht)}var D="__RC_UTIL_PATH_SPLIT__",he=function(Ct){return Ct.join(D)},_e=function(Ct){return Ct.split(D)},pe="rc-menu-more";function Ee(){var ht=S.useState({}),Ct=(0,F.Z)(ht,2),Zt=Ct[1],Lt=(0,S.useRef)(new Map),zt=(0,S.useRef)(new Map),Vt=S.useState([]),nn=(0,F.Z)(Vt,2),rn=nn[0],Sn=nn[1],On=(0,S.useRef)(0),or=(0,S.useRef)(!1),Nn=function(){or.current||Zt({})},Pn=(0,S.useCallback)(function(ar,Jn){var Yn=he(Jn);zt.current.set(Yn,ar),Lt.current.set(ar,Yn),On.current+=1;var qn=On.current;Z(function(){qn===On.current&&Nn()})},[]),Hn=(0,S.useCallback)(function(ar,Jn){var Yn=he(Jn);zt.current.delete(Yn),Lt.current.delete(ar)},[]),Kn=(0,S.useCallback)(function(ar){Sn(ar)},[]),er=(0,S.useCallback)(function(ar,Jn){var Yn=Lt.current.get(ar)||"",qn=_e(Yn);return Jn&&rn.includes(qn[0])&&qn.unshift(pe),qn},[rn]),$n=(0,S.useCallback)(function(ar,Jn){return ar.filter(function(Yn){return Yn!==void 0}).some(function(Yn){var qn=er(Yn,!0);return qn.includes(Jn)})},[er]),Zn=function(){var Jn=(0,ie.Z)(Lt.current.keys());return rn.length&&Jn.push(pe),Jn},nr=(0,S.useCallback)(function(ar){var Jn="".concat(Lt.current.get(ar)).concat(D),Yn=new Set;return(0,ie.Z)(zt.current.keys()).forEach(function(qn){qn.startsWith(Jn)&&Yn.add(zt.current.get(qn))}),Yn},[]);return S.useEffect(function(){return function(){or.current=!0}},[]),{registerPath:Pn,unregisterPath:Hn,refreshOverflowKeys:Kn,isSubPathKey:$n,getKeyPath:er,getKeys:Zn,getSubPathKeys:nr}}function Oe(ht){var Ct=S.useRef(ht);Ct.current=ht;var Zt=S.useCallback(function(){for(var Lt,zt=arguments.length,Vt=new Array(zt),nn=0;nn<zt;nn++)Vt[nn]=arguments[nn];return(Lt=Ct.current)===null||Lt===void 0?void 0:Lt.call.apply(Lt,[Ct].concat(Vt))},[]);return ht?Zt:void 0}var Ze=Math.random().toFixed(5).toString().slice(2),re=0;function fe(ht){var Ct=(0,x.Z)(ht,{value:ht}),Zt=(0,F.Z)(Ct,2),Lt=Zt[0],zt=Zt[1];return S.useEffect(function(){re+=1;var Vt="".concat(Ze,"-").concat(re);zt("rc-menu-uuid-".concat(Vt))},[]),Lt}var st=m(38705),tt=m(17212),ct=m(39153),ut=m(55401),Ue=m(2738),xt=m(8654);function dt(ht,Ct,Zt,Lt){var zt=S.useContext(K),Vt=zt.activeKey,nn=zt.onActive,rn=zt.onInactive,Sn={active:Vt===ht};return Ct||(Sn.onMouseEnter=function(On){Zt==null||Zt({key:ht,domEvent:On}),nn(ht)},Sn.onMouseLeave=function(On){Lt==null||Lt({key:ht,domEvent:On}),rn(ht)}),Sn}function gt(ht){var Ct=S.useContext(K),Zt=Ct.mode,Lt=Ct.rtl,zt=Ct.inlineIndent;if(Zt!=="inline")return null;var Vt=ht;return Lt?{paddingRight:Vt*zt}:{paddingLeft:Vt*zt}}function kt(ht){var Ct=ht.icon,Zt=ht.props,Lt=ht.children,zt;return Ct===null||Ct===!1?null:(typeof Ct=="function"?zt=S.createElement(Ct,(0,$.Z)({},Zt)):typeof Ct!="boolean"&&(zt=Ct),zt||Lt||null)}var w=["item"];function O(ht){var Ct=ht.item,Zt=(0,g.Z)(ht,w);return Object.defineProperty(Zt,"item",{get:function(){return(0,b.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Ct}}),Zt}var qe=["title","attribute","elementRef"],oe=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],xe=["active"],jt=function(ht){(0,ct.Z)(Zt,ht);var Ct=(0,ut.Z)(Zt);function Zt(){return(0,st.Z)(this,Zt),Ct.apply(this,arguments)}return(0,tt.Z)(Zt,[{key:"render",value:function(){var zt=this.props,Vt=zt.title,nn=zt.attribute,rn=zt.elementRef,Sn=(0,g.Z)(zt,qe),On=(0,Ue.Z)(Sn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,b.ZP)(!nn,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),S.createElement(o.Z.Item,(0,c.Z)({},nn,{title:typeof Vt=="string"?Vt:void 0},On,{ref:rn}))}}]),Zt}(S.Component),Qe=S.forwardRef(function(ht,Ct){var Zt=ht.style,Lt=ht.className,zt=ht.eventKey,Vt=ht.warnKey,nn=ht.disabled,rn=ht.itemIcon,Sn=ht.children,On=ht.role,or=ht.onMouseEnter,Nn=ht.onMouseLeave,Pn=ht.onClick,Hn=ht.onKeyDown,Kn=ht.onFocus,er=(0,g.Z)(ht,oe),$n=j(zt),Zn=S.useContext(K),nr=Zn.prefixCls,ar=Zn.onItemClick,Jn=Zn.disabled,Yn=Zn.overflowDisabled,qn=Zn.itemIcon,Fn=Zn.selectedKeys,$r=Zn.onActive,Ft=S.useContext(ue),tr=Ft._internalRenderMenuItem,ur="".concat(nr,"-item"),Yr=S.useRef(),zr=S.useRef(),li=Jn||nn,Qr=(0,xt.x1)(Ct,zr),Bn=Pe(zt),An=function(Gr){return{key:zt,keyPath:(0,ie.Z)(Bn).reverse(),item:Yr.current,domEvent:Gr}},en=rn||qn,sn=dt(zt,li,or,Nn),Rn=sn.active,Un=(0,g.Z)(sn,xe),rr=Fn.includes(zt),Ar=gt(Bn.length),wn=function(Gr){if(!li){var Ri=An(Gr);Pn==null||Pn(O(Ri)),ar(Ri)}},cr=function(Gr){if(Hn==null||Hn(Gr),Gr.which===be.Z.ENTER){var Ri=An(Gr);Pn==null||Pn(O(Ri)),ar(Ri)}},Ir=function(Gr){$r(zt),Kn==null||Kn(Gr)},Jr={};ht.role==="option"&&(Jr["aria-selected"]=rr);var mi=S.createElement(jt,(0,c.Z)({ref:Yr,elementRef:Qr,role:On===null?"none":On||"menuitem",tabIndex:nn?null:-1,"data-menu-id":Yn&&$n?null:$n},(0,Ue.Z)(er,["extra"]),Un,Jr,{component:"li","aria-disabled":nn,style:(0,$.Z)((0,$.Z)({},Ar),Zt),className:X()(ur,(0,ee.Z)((0,ee.Z)((0,ee.Z)({},"".concat(ur,"-active"),Rn),"".concat(ur,"-selected"),rr),"".concat(ur,"-disabled"),li),Lt),onClick:wn,onKeyDown:cr,onFocus:Ir}),Sn,S.createElement(kt,{props:(0,$.Z)((0,$.Z)({},ht),{},{isSelected:rr}),icon:en}));return tr&&(mi=tr(mi,ht,{selected:rr})),mi});function at(ht,Ct){var Zt=ht.eventKey,Lt=ce(),zt=Pe(Zt);return S.useEffect(function(){if(Lt)return Lt.registerPath(Zt,zt),function(){Lt.unregisterPath(Zt,zt)}},[zt]),Lt?null:S.createElement(Qe,(0,c.Z)({},ht,{ref:Ct}))}var bt=S.forwardRef(at),ge=["className","children"],ye=function(Ct,Zt){var Lt=Ct.className,zt=Ct.children,Vt=(0,g.Z)(Ct,ge),nn=S.useContext(K),rn=nn.prefixCls,Sn=nn.mode,On=nn.rtl;return S.createElement("ul",(0,c.Z)({className:X()(rn,On&&"".concat(rn,"-rtl"),"".concat(rn,"-sub"),"".concat(rn,"-").concat(Sn==="inline"?"inline":"vertical"),Lt),role:"menu"},Vt,{"data-menu-list":!0,ref:Zt}),zt)},Fe=S.forwardRef(ye);Fe.displayName="SubMenuList";var ze=Fe,q=m(11592);function Mt(ht,Ct){return(0,q.Z)(ht).map(function(Zt,Lt){if(S.isValidElement(Zt)){var zt,Vt,nn=Zt.key,rn=(zt=(Vt=Zt.props)===null||Vt===void 0?void 0:Vt.eventKey)!==null&&zt!==void 0?zt:nn,Sn=rn==null;Sn&&(rn="tmp_key-".concat([].concat((0,ie.Z)(Ct),[Lt]).join("-")));var On={key:rn,eventKey:rn};return S.cloneElement(Zt,On)}return Zt})}var Be=m(68196),Gt={adjustX:1,adjustY:1},pn={topLeft:{points:["bl","tl"],overflow:Gt},topRight:{points:["br","tr"],overflow:Gt},bottomLeft:{points:["tl","bl"],overflow:Gt},bottomRight:{points:["tr","br"],overflow:Gt},leftTop:{points:["tr","tl"],overflow:Gt},leftBottom:{points:["br","bl"],overflow:Gt},rightTop:{points:["tl","tr"],overflow:Gt},rightBottom:{points:["bl","br"],overflow:Gt}},En={topLeft:{points:["bl","tl"],overflow:Gt},topRight:{points:["br","tr"],overflow:Gt},bottomLeft:{points:["tl","bl"],overflow:Gt},bottomRight:{points:["tr","br"],overflow:Gt},rightTop:{points:["tr","tl"],overflow:Gt},rightBottom:{points:["br","bl"],overflow:Gt},leftTop:{points:["tl","tr"],overflow:Gt},leftBottom:{points:["bl","br"],overflow:Gt}},sr=null;function Xn(ht,Ct,Zt){if(Ct)return Ct;if(Zt)return Zt[ht]||Zt.other}var Wn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Cr(ht){var Ct=ht.prefixCls,Zt=ht.visible,Lt=ht.children,zt=ht.popup,Vt=ht.popupStyle,nn=ht.popupClassName,rn=ht.popupOffset,Sn=ht.disabled,On=ht.mode,or=ht.onVisibleChange,Nn=S.useContext(K),Pn=Nn.getPopupContainer,Hn=Nn.rtl,Kn=Nn.subMenuOpenDelay,er=Nn.subMenuCloseDelay,$n=Nn.builtinPlacements,Zn=Nn.triggerSubMenuAction,nr=Nn.forceSubMenuRender,ar=Nn.rootClassName,Jn=Nn.motion,Yn=Nn.defaultMotions,qn=S.useState(!1),Fn=(0,F.Z)(qn,2),$r=Fn[0],Ft=Fn[1],tr=Hn?(0,$.Z)((0,$.Z)({},En),$n):(0,$.Z)((0,$.Z)({},pn),$n),ur=Wn[On],Yr=Xn(On,Jn,Yn),zr=S.useRef(Yr);On!=="inline"&&(zr.current=Yr);var li=(0,$.Z)((0,$.Z)({},zr.current),{},{leavedClassName:"".concat(Ct,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Qr=S.useRef();return S.useEffect(function(){return Qr.current=(0,je.Z)(function(){Ft(Zt)}),function(){je.Z.cancel(Qr.current)}},[Zt]),S.createElement(Be.Z,{prefixCls:Ct,popupClassName:X()("".concat(Ct,"-popup"),(0,ee.Z)({},"".concat(Ct,"-rtl"),Hn),nn,ar),stretch:On==="horizontal"?"minWidth":null,getPopupContainer:Pn,builtinPlacements:tr,popupPlacement:ur,popupVisible:$r,popup:zt,popupStyle:Vt,popupAlign:rn&&{offset:rn},action:Sn?[]:[Zn],mouseEnterDelay:Kn,mouseLeaveDelay:er,onPopupVisibleChange:or,forceRender:nr,popupMotion:li,fresh:!0},Lt)}var Rr=m(77900);function Qn(ht){var Ct=ht.id,Zt=ht.open,Lt=ht.keyPath,zt=ht.children,Vt="inline",nn=S.useContext(K),rn=nn.prefixCls,Sn=nn.forceSubMenuRender,On=nn.motion,or=nn.defaultMotions,Nn=nn.mode,Pn=S.useRef(!1);Pn.current=Nn===Vt;var Hn=S.useState(!Pn.current),Kn=(0,F.Z)(Hn,2),er=Kn[0],$n=Kn[1],Zn=Pn.current?Zt:!1;S.useEffect(function(){Pn.current&&$n(!1)},[Nn]);var nr=(0,$.Z)({},Xn(Vt,On,or));Lt.length>1&&(nr.motionAppear=!1);var ar=nr.onVisibleChanged;return nr.onVisibleChanged=function(Jn){return!Pn.current&&!Jn&&$n(!0),ar==null?void 0:ar(Jn)},er?null:S.createElement(M,{mode:Vt,locked:!Pn.current},S.createElement(Rr.default,(0,c.Z)({visible:Zn},nr,{forceRender:Sn,removeOnLeave:!1,leavedClassName:"".concat(rn,"-hidden")}),function(Jn){var Yn=Jn.className,qn=Jn.style;return S.createElement(ze,{id:Ct,className:Yn,style:qn},zt)}))}var gr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Cn=["active"],tn=S.forwardRef(function(ht,Ct){var Zt=ht.style,Lt=ht.className,zt=ht.title,Vt=ht.eventKey,nn=ht.warnKey,rn=ht.disabled,Sn=ht.internalPopupClose,On=ht.children,or=ht.itemIcon,Nn=ht.expandIcon,Pn=ht.popupClassName,Hn=ht.popupOffset,Kn=ht.popupStyle,er=ht.onClick,$n=ht.onMouseEnter,Zn=ht.onMouseLeave,nr=ht.onTitleClick,ar=ht.onTitleMouseEnter,Jn=ht.onTitleMouseLeave,Yn=(0,g.Z)(ht,gr),qn=j(Vt),Fn=S.useContext(K),$r=Fn.prefixCls,Ft=Fn.mode,tr=Fn.openKeys,ur=Fn.disabled,Yr=Fn.overflowDisabled,zr=Fn.activeKey,li=Fn.selectedKeys,Qr=Fn.itemIcon,Bn=Fn.expandIcon,An=Fn.onItemClick,en=Fn.onOpenChange,sn=Fn.onActive,Rn=S.useContext(ue),Un=Rn._internalRenderSubMenuItem,rr=S.useContext(Ce),Ar=rr.isSubPathKey,wn=Pe(),cr="".concat($r,"-submenu"),Ir=ur||rn,Jr=S.useRef(),mi=S.useRef(),Li=or!=null?or:Qr,Gr=Nn!=null?Nn:Bn,Ri=tr.includes(Vt),qr=!Yr&&Ri,bi=Ar(li,Vt),ri=dt(Vt,Ir,ar,Jn),di=ri.active,ii=(0,g.Z)(ri,Cn),Oi=S.useState(!1),Lr=(0,F.Z)(Oi,2),Pi=Lr[0],Mi=Lr[1],ki=function(ns){Ir||Mi(ns)},mr=function(ns){ki(!0),$n==null||$n({key:Vt,domEvent:ns})},zn=function(ns){ki(!1),Zn==null||Zn({key:Vt,domEvent:ns})},pi=S.useMemo(function(){return di||(Ft!=="inline"?Pi||Ar([zr],Vt):!1)},[Ft,di,zr,Pi,Vt,Ar]),Tn=gt(wn.length),Fi=function(ns){Ir||(nr==null||nr({key:Vt,domEvent:ns}),Ft==="inline"&&en(Vt,!Ri))},Os=Oe(function(zi){er==null||er(O(zi)),An(zi)}),vs=function(ns){Ft!=="inline"&&en(Vt,ns)},ss=function(){sn(Vt)},ls=qn&&"".concat(qn,"-popup"),Pr=S.useMemo(function(){return S.createElement(kt,{icon:Ft!=="horizontal"?Gr:void 0,props:(0,$.Z)((0,$.Z)({},ht),{},{isOpen:qr,isSubMenu:!0})},S.createElement("i",{className:"".concat(cr,"-arrow")}))},[Ft,Gr,ht,qr,cr]),Gi=S.createElement("div",(0,c.Z)({role:"menuitem",style:Tn,className:"".concat(cr,"-title"),tabIndex:Ir?null:-1,ref:Jr,title:typeof zt=="string"?zt:null,"data-menu-id":Yr&&qn?null:qn,"aria-expanded":qr,"aria-haspopup":!0,"aria-controls":ls,"aria-disabled":Ir,onClick:Fi,onFocus:ss},ii),zt,Pr),ds=S.useRef(Ft);if(Ft!=="inline"&&wn.length>1?ds.current="vertical":ds.current=Ft,!Yr){var _s=ds.current;Gi=S.createElement(Cr,{mode:_s,prefixCls:cr,visible:!Sn&&qr&&Ft!=="inline",popupClassName:Pn,popupOffset:Hn,popupStyle:Kn,popup:S.createElement(M,{mode:_s==="horizontal"?"vertical":_s},S.createElement(ze,{id:ls,ref:mi},On)),disabled:Ir,onVisibleChange:vs},Gi)}var ci=S.createElement(o.Z.Item,(0,c.Z)({ref:Ct,role:"none"},Yn,{component:"li",style:Zt,className:X()(cr,"".concat(cr,"-").concat(Ft),Lt,(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)({},"".concat(cr,"-open"),qr),"".concat(cr,"-active"),pi),"".concat(cr,"-selected"),bi),"".concat(cr,"-disabled"),Ir)),onMouseEnter:mr,onMouseLeave:zn}),Gi,!Yr&&S.createElement(Qn,{id:ls,open:qr,keyPath:wn},On));return Un&&(ci=Un(ci,ht,{selected:bi,active:pi,open:qr,disabled:Ir})),S.createElement(M,{onItemClick:Os,mode:Ft==="horizontal"?"vertical":Ft,itemIcon:Li,expandIcon:Gr},ci)}),dn=S.forwardRef(function(ht,Ct){var Zt=ht.eventKey,Lt=ht.children,zt=Pe(Zt),Vt=Mt(Lt,zt),nn=ce();S.useEffect(function(){if(nn)return nn.registerPath(Zt,zt),function(){nn.unregisterPath(Zt,zt)}},[zt]);var rn;return nn?rn=Vt:rn=S.createElement(tn,(0,c.Z)({ref:Ct},ht),Vt),S.createElement(De.Provider,{value:zt},rn)}),Vn=dn,vr=m(43749);function Et(ht){var Ct=ht.className,Zt=ht.style,Lt=S.useContext(K),zt=Lt.prefixCls,Vt=ce();return Vt?null:S.createElement("li",{role:"separator",className:X()("".concat(zt,"-item-divider"),Ct),style:Zt})}var wt=["className","title","eventKey","children"],Me=S.forwardRef(function(ht,Ct){var Zt=ht.className,Lt=ht.title,zt=ht.eventKey,Vt=ht.children,nn=(0,g.Z)(ht,wt),rn=S.useContext(K),Sn=rn.prefixCls,On="".concat(Sn,"-item-group");return S.createElement("li",(0,c.Z)({ref:Ct,role:"presentation"},nn,{onClick:function(Nn){return Nn.stopPropagation()},className:X()(On,Zt)}),S.createElement("div",{role:"presentation",className:"".concat(On,"-title"),title:typeof Lt=="string"?Lt:void 0},Lt),S.createElement("ul",{role:"group",className:"".concat(On,"-list")},Vt))}),nt=S.forwardRef(function(ht,Ct){var Zt=ht.eventKey,Lt=ht.children,zt=Pe(Zt),Vt=Mt(Lt,zt),nn=ce();return nn?Vt:S.createElement(Me,(0,c.Z)({ref:Ct},(0,Ue.Z)(ht,["warnKey"])),Vt)}),vt=nt,yt=["label","children","key","type","extra"];function Tt(ht,Ct,Zt){var Lt=Ct.item,zt=Ct.group,Vt=Ct.submenu,nn=Ct.divider;return(ht||[]).map(function(rn,Sn){if(rn&&(0,vr.Z)(rn)==="object"){var On=rn,or=On.label,Nn=On.children,Pn=On.key,Hn=On.type,Kn=On.extra,er=(0,g.Z)(On,yt),$n=Pn!=null?Pn:"tmp-".concat(Sn);return Nn||Hn==="group"?Hn==="group"?S.createElement(zt,(0,c.Z)({key:$n},er,{title:or}),Tt(Nn,Ct,Zt)):S.createElement(Vt,(0,c.Z)({key:$n},er,{title:or}),Tt(Nn,Ct,Zt)):Hn==="divider"?S.createElement(nn,(0,c.Z)({key:$n},er)):S.createElement(Lt,(0,c.Z)({key:$n},er,{extra:Kn}),or,(!!Kn||Kn===0)&&S.createElement("span",{className:"".concat(Zt,"-item-extra")},Kn))}return null}).filter(function(rn){return rn})}function Jt(ht,Ct,Zt,Lt,zt){var Vt=ht,nn=(0,$.Z)({divider:Et,item:bt,group:vt,submenu:Vn},Lt);return Ct&&(Vt=Tt(Ct,nn,zt)),Mt(Vt,Zt)}var mn=["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"],yn=[],Wt=S.forwardRef(function(ht,Ct){var Zt,Lt=ht,zt=Lt.prefixCls,Vt=zt===void 0?"rc-menu":zt,nn=Lt.rootClassName,rn=Lt.style,Sn=Lt.className,On=Lt.tabIndex,or=On===void 0?0:On,Nn=Lt.items,Pn=Lt.children,Hn=Lt.direction,Kn=Lt.id,er=Lt.mode,$n=er===void 0?"vertical":er,Zn=Lt.inlineCollapsed,nr=Lt.disabled,ar=Lt.disabledOverflow,Jn=Lt.subMenuOpenDelay,Yn=Jn===void 0?.1:Jn,qn=Lt.subMenuCloseDelay,Fn=qn===void 0?.1:qn,$r=Lt.forceSubMenuRender,Ft=Lt.defaultOpenKeys,tr=Lt.openKeys,ur=Lt.activeKey,Yr=Lt.defaultActiveFirst,zr=Lt.selectable,li=zr===void 0?!0:zr,Qr=Lt.multiple,Bn=Qr===void 0?!1:Qr,An=Lt.defaultSelectedKeys,en=Lt.selectedKeys,sn=Lt.onSelect,Rn=Lt.onDeselect,Un=Lt.inlineIndent,rr=Un===void 0?24:Un,Ar=Lt.motion,wn=Lt.defaultMotions,cr=Lt.triggerSubMenuAction,Ir=cr===void 0?"hover":cr,Jr=Lt.builtinPlacements,mi=Lt.itemIcon,Li=Lt.expandIcon,Gr=Lt.overflowedIndicator,Ri=Gr===void 0?"...":Gr,qr=Lt.overflowedIndicatorPopupClassName,bi=Lt.getPopupContainer,ri=Lt.onClick,di=Lt.onOpenChange,ii=Lt.onKeyDown,Oi=Lt.openAnimation,Lr=Lt.openTransitionName,Pi=Lt._internalRenderMenuItem,Mi=Lt._internalRenderSubMenuItem,ki=Lt._internalComponents,mr=(0,g.Z)(Lt,mn),zn=S.useMemo(function(){return[Jt(Pn,Nn,yn,ki,Vt),Jt(Pn,Nn,yn,{},Vt)]},[Pn,Nn,ki]),pi=(0,F.Z)(zn,2),Tn=pi[0],Fi=pi[1],Os=S.useState(!1),vs=(0,F.Z)(Os,2),ss=vs[0],ls=vs[1],Pr=S.useRef(),Gi=fe(Kn),ds=Hn==="rtl",_s=(0,x.Z)(Ft,{value:tr,postState:function(Ii){return Ii||yn}}),ci=(0,F.Z)(_s,2),zi=ci[0],ns=ci[1],br=function(Ii){var ji=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Ts(){ns(Ii),di==null||di(Ii)}ji?(0,T.flushSync)(Ts):Ts()},Ur=S.useState(zi),yr=(0,F.Z)(Ur,2),Or=yr[0],ui=yr[1],_i=S.useRef(!1),as=S.useMemo(function(){return($n==="inline"||$n==="vertical")&&Zn?["vertical",Zn]:[$n,!1]},[$n,Zn]),ir=(0,F.Z)(as,2),Dr=ir[0],ei=ir[1],Kr=Dr==="inline",ti=S.useState(Dr),xs=(0,F.Z)(ti,2),us=xs[0],Es=xs[1],ms=S.useState(ei),ba=(0,F.Z)(ms,2),so=ba[0],Ka=ba[1];S.useEffect(function(){Es(Dr),Ka(ei),_i.current&&(Kr?ns(Or):br(yn))},[Dr,ei]);var Ss=S.useState(0),Fs=(0,F.Z)(Ss,2),ks=Fs[0],Za=Fs[1],aa=ks>=Tn.length-1||us!=="horizontal"||ar;S.useEffect(function(){Kr&&ui(zi)},[zi]),S.useEffect(function(){return _i.current=!0,function(){_i.current=!1}},[]);var Zs=Ee(),wa=Zs.registerPath,Pa=Zs.unregisterPath,ja=Zs.refreshOverflowKeys,zs=Zs.isSubPathKey,Ca=Zs.getKeyPath,Ls=Zs.getKeys,Ma=Zs.getSubPathKeys,ka=S.useMemo(function(){return{registerPath:wa,unregisterPath:Pa}},[wa,Pa]),Ha=S.useMemo(function(){return{isSubPathKey:zs}},[zs]);S.useEffect(function(){ja(aa?yn:Tn.slice(ks+1).map(function(Ci){return Ci.key}))},[ks,aa]);var Wa=(0,x.Z)(ur||Yr&&((Zt=Tn[0])===null||Zt===void 0?void 0:Zt.key),{value:ur}),oa=(0,F.Z)(Wa,2),js=oa[0],fi=oa[1],Hr=Oe(function(Ci){fi(Ci)}),ps=Oe(function(){fi(void 0)});(0,S.useImperativeHandle)(Ct,function(){return{list:Pr.current,focus:function(Ii){var ji,Ts=Ls(),Ns=$e(Ts,Gi),_a=Ns.elements,Ta=Ns.key2element,ha=Ns.element2key,Ga=Ie(Pr.current,_a),Aa=js!=null?js:Ga[0]?ha.get(Ga[0]):(ji=Tn.find(function(Na){return!Na.props.disabled}))===null||ji===void 0?void 0:ji.key,Ia=Ta.get(Aa);if(Aa&&Ia){var Ya;Ia==null||(Ya=Ia.focus)===null||Ya===void 0||Ya.call(Ia,Ii)}}}});var ws=(0,x.Z)(An||[],{value:en,postState:function(Ii){return Array.isArray(Ii)?Ii:Ii==null?yn:[Ii]}}),wi=(0,F.Z)(ws,2),os=wi[0],Ps=wi[1],Ms=function(Ii){if(li){var ji=Ii.key,Ts=os.includes(ji),Ns;Bn?Ts?Ns=os.filter(function(Ta){return Ta!==ji}):Ns=[].concat((0,ie.Z)(os),[ji]):Ns=[ji],Ps(Ns);var _a=(0,$.Z)((0,$.Z)({},Ii),{},{selectedKeys:Ns});Ts?Rn==null||Rn(_a):sn==null||sn(_a)}!Bn&&zi.length&&us!=="inline"&&br(yn)},Js=Oe(function(Ci){ri==null||ri(O(Ci)),Ms(Ci)}),Cs=Oe(function(Ci,Ii){var ji=zi.filter(function(Ns){return Ns!==Ci});if(Ii)ji.push(Ci);else if(us!=="inline"){var Ts=Ma(Ci);ji=ji.filter(function(Ns){return!Ts.has(Ns)})}(0,L.Z)(zi,ji,!0)||br(ji,!0)}),ta=function(Ii,ji){var Ts=ji!=null?ji:!zi.includes(Ii);Cs(Ii,Ts)},Hs=Ae(us,js,ds,Gi,Pr,Ls,Ca,fi,ta,ii);S.useEffect(function(){ls(!0)},[]);var la=S.useMemo(function(){return{_internalRenderMenuItem:Pi,_internalRenderSubMenuItem:Mi}},[Pi,Mi]),ua=us!=="horizontal"||ar?Tn:Tn.map(function(Ci,Ii){return S.createElement(M,{key:Ci.key,overflowDisabled:Ii>ks},Ci)}),Va=S.createElement(o.Z,(0,c.Z)({id:Kn,ref:Pr,prefixCls:"".concat(Vt,"-overflow"),component:"ul",itemComponent:bt,className:X()(Vt,"".concat(Vt,"-root"),"".concat(Vt,"-").concat(us),Sn,(0,ee.Z)((0,ee.Z)({},"".concat(Vt,"-inline-collapsed"),so),"".concat(Vt,"-rtl"),ds),nn),dir:Hn,style:rn,role:"menu",tabIndex:or,data:ua,renderRawItem:function(Ii){return Ii},renderRawRest:function(Ii){var ji=Ii.length,Ts=ji?Tn.slice(-ji):null;return S.createElement(Vn,{eventKey:pe,title:Ri,disabled:aa,internalPopupClose:ji===0,popupClassName:qr},Ts)},maxCount:us!=="horizontal"||ar?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Ii){Za(Ii)},onKeyDown:Hs},mr));return S.createElement(ue.Provider,{value:la},S.createElement(B.Provider,{value:Gi},S.createElement(M,{prefixCls:Vt,rootClassName:nn,mode:us,openKeys:zi,rtl:ds,disabled:nr,motion:ss?Ar:null,defaultMotions:ss?wn:null,activeKey:js,onActive:Hr,onInactive:ps,selectedKeys:os,inlineIndent:rr,subMenuOpenDelay:Yn,subMenuCloseDelay:Fn,forceSubMenuRender:$r,builtinPlacements:Jr,triggerSubMenuAction:Ir,getPopupContainer:bi,itemIcon:mi,expandIcon:Li,onItemClick:Js,onOpenChange:Cs},S.createElement(Ce.Provider,{value:Ha},Va),S.createElement("div",{style:{display:"none"},"aria-hidden":!0},S.createElement(me.Provider,{value:ka},Fi)))))}),gn=Wt,Ln=gn;Ln.Item=bt,Ln.SubMenu=Vn,Ln.ItemGroup=vt,Ln.Divider=Et;var vn=Ln},83836:function(un,We,m){"use strict";m.d(We,{Z:function(){return Q}});var c=m(60499),ee=m(85899),$=m(72190),ie=m(42244),F=m(59301),g=m(92310),J=m.n(g),X=m(29301),o=m(34280),x=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],L=void 0;function b(E,C){var Y=E.prefixCls,be=E.invalidate,je=E.item,lt=E.renderItem,ke=E.responsive,Ye=E.responsiveDisabled,et=E.registerSize,_t=E.itemKey,Re=E.className,At=E.style,rt=E.children,Nt=E.display,Xe=E.order,Ge=E.component,Ne=Ge===void 0?"div":Ge,Ie=(0,ie.Z)(E,x),te=ke&&!Nt;function $e(_e){et(_t,_e)}F.useEffect(function(){return function(){$e(null)}},[]);var Ae=lt&&je!==L?lt(je,{index:Xe}):rt,Z;be||(Z={opacity:te?0:1,height:te?0:L,overflowY:te?"hidden":L,order:ke?Xe:L,pointerEvents:te?"none":L,position:te?"absolute":L});var D={};te&&(D["aria-hidden"]=!0);var he=F.createElement(Ne,(0,c.Z)({className:J()(!be&&Y,Re),style:(0,ee.Z)((0,ee.Z)({},Z),At)},D,Ie,{ref:C}),Ae);return ke&&(he=F.createElement(X.Z,{onResize:function(pe){var Ee=pe.offsetWidth;$e(Ee)},disabled:Ye},he)),he}var S=F.forwardRef(b);S.displayName="Item";var T=S,B=m(6089),z=m(4676),j=m(16089);function U(E){if(typeof MessageChannel=="undefined")(0,j.Z)(E);else{var C=new MessageChannel;C.port1.onmessage=function(){return E()},C.port2.postMessage(void 0)}}function A(){var E=F.useRef(null),C=function(be){E.current||(E.current=[],U(function(){(0,z.unstable_batchedUpdates)(function(){E.current.forEach(function(je){je()}),E.current=null})})),E.current.push(be)};return C}function K(E,C){var Y=F.useState(C),be=(0,$.Z)(Y,2),je=be[0],lt=be[1],ke=(0,B.Z)(function(Ye){E(function(){lt(Ye)})});return[je,ke]}var I=F.createContext(null),M=["component"],le=["className"],me=["className"],ce=function(C,Y){var be=F.useContext(I);if(!be){var je=C.component,lt=je===void 0?"div":je,ke=(0,ie.Z)(C,M);return F.createElement(lt,(0,c.Z)({},ke,{ref:Y}))}var Ye=be.className,et=(0,ie.Z)(be,le),_t=C.className,Re=(0,ie.Z)(C,me);return F.createElement(I.Provider,{value:null},F.createElement(T,(0,c.Z)({ref:Y,className:J()(Ye,_t)},et,Re)))},De=F.forwardRef(ce);De.displayName="RawItem";var Pe=De,Ce=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],He="responsive",ue="invalidate";function W(E){return"+ ".concat(E.length," ...")}function P(E,C){var Y=E.prefixCls,be=Y===void 0?"rc-overflow":Y,je=E.data,lt=je===void 0?[]:je,ke=E.renderItem,Ye=E.renderRawItem,et=E.itemKey,_t=E.itemWidth,Re=_t===void 0?10:_t,At=E.ssr,rt=E.style,Nt=E.className,Xe=E.maxCount,Ge=E.renderRest,Ne=E.renderRawRest,Ie=E.prefix,te=E.suffix,$e=E.component,Ae=$e===void 0?"div":$e,Z=E.itemComponent,D=E.onVisibleChange,he=(0,ie.Z)(E,Ce),_e=At==="full",pe=A(),Ee=K(pe,null),Oe=(0,$.Z)(Ee,2),Ze=Oe[0],re=Oe[1],fe=Ze||0,st=K(pe,new Map),tt=(0,$.Z)(st,2),ct=tt[0],ut=tt[1],Ue=K(pe,0),xt=(0,$.Z)(Ue,2),dt=xt[0],gt=xt[1],kt=K(pe,0),w=(0,$.Z)(kt,2),O=w[0],qe=w[1],oe=K(pe,0),xe=(0,$.Z)(oe,2),jt=xe[0],Qe=xe[1],at=K(pe,0),bt=(0,$.Z)(at,2),ge=bt[0],ye=bt[1],Fe=(0,F.useState)(null),ze=(0,$.Z)(Fe,2),q=ze[0],Mt=ze[1],Be=(0,F.useState)(null),Gt=(0,$.Z)(Be,2),pn=Gt[0],En=Gt[1],sr=F.useMemo(function(){return pn===null&&_e?Number.MAX_SAFE_INTEGER:pn||0},[pn,Ze]),Xn=(0,F.useState)(!1),Wn=(0,$.Z)(Xn,2),Cr=Wn[0],Rr=Wn[1],Qn="".concat(be,"-item"),gr=Math.max(dt,O),Cn=Xe===He,tn=lt.length&&Cn,dn=Xe===ue,Vn=tn||typeof Xe=="number"&&lt.length>Xe,vr=(0,F.useMemo)(function(){var zt=lt;return tn?Ze===null&&_e?zt=lt:zt=lt.slice(0,Math.min(lt.length,fe/Re)):typeof Xe=="number"&&(zt=lt.slice(0,Xe)),zt},[lt,Re,Ze,Xe,tn]),Et=(0,F.useMemo)(function(){return tn?lt.slice(sr+1):lt.slice(vr.length)},[lt,vr,tn,sr]),wt=(0,F.useCallback)(function(zt,Vt){var nn;return typeof et=="function"?et(zt):(nn=et&&(zt==null?void 0:zt[et]))!==null&&nn!==void 0?nn:Vt},[et]),Me=(0,F.useCallback)(ke||function(zt){return zt},[ke]);function nt(zt,Vt,nn){pn===zt&&(Vt===void 0||Vt===q)||(En(zt),nn||(Rr(zt<lt.length-1),D==null||D(zt)),Vt!==void 0&&Mt(Vt))}function vt(zt,Vt){re(Vt.clientWidth)}function yt(zt,Vt){ut(function(nn){var rn=new Map(nn);return Vt===null?rn.delete(zt):rn.set(zt,Vt),rn})}function Tt(zt,Vt){qe(Vt),gt(O)}function Jt(zt,Vt){Qe(Vt)}function mn(zt,Vt){ye(Vt)}function yn(zt){return ct.get(wt(vr[zt],zt))}(0,o.Z)(function(){if(fe&&typeof gr=="number"&&vr){var zt=jt+ge,Vt=vr.length,nn=Vt-1;if(!Vt){nt(0,null);return}for(var rn=0;rn<Vt;rn+=1){var Sn=yn(rn);if(_e&&(Sn=Sn||0),Sn===void 0){nt(rn-1,void 0,!0);break}if(zt+=Sn,nn===0&&zt<=fe||rn===nn-1&&zt+yn(nn)<=fe){nt(nn,null);break}else if(zt+gr>fe){nt(rn-1,zt-Sn-ge+O);break}}te&&yn(0)+ge>fe&&Mt(null)}},[fe,ct,O,jt,ge,wt,vr]);var Wt=Cr&&!!Et.length,gn={};q!==null&&tn&&(gn={position:"absolute",left:q,top:0});var Ln={prefixCls:Qn,responsive:tn,component:Z,invalidate:dn},vn=Ye?function(zt,Vt){var nn=wt(zt,Vt);return F.createElement(I.Provider,{key:nn,value:(0,ee.Z)((0,ee.Z)({},Ln),{},{order:Vt,item:zt,itemKey:nn,registerSize:yt,display:Vt<=sr})},Ye(zt,Vt))}:function(zt,Vt){var nn=wt(zt,Vt);return F.createElement(T,(0,c.Z)({},Ln,{order:Vt,key:nn,item:zt,renderItem:Me,itemKey:nn,registerSize:yt,display:Vt<=sr}))},ht={order:Wt?sr:Number.MAX_SAFE_INTEGER,className:"".concat(Qn,"-rest"),registerSize:Tt,display:Wt},Ct=Ge||W,Zt=Ne?F.createElement(I.Provider,{value:(0,ee.Z)((0,ee.Z)({},Ln),ht)},Ne(Et)):F.createElement(T,(0,c.Z)({},Ln,ht),typeof Ct=="function"?Ct(Et):Ct),Lt=F.createElement(Ae,(0,c.Z)({className:J()(!dn&&be,Nt),style:rt,ref:C},he),Ie&&F.createElement(T,(0,c.Z)({},Ln,{responsive:Cn,responsiveDisabled:!tn,order:-1,className:"".concat(Qn,"-prefix"),registerSize:Jt,display:!0}),Ie),vr.map(vn),Vn?Zt:null,te&&F.createElement(T,(0,c.Z)({},Ln,{responsive:Cn,responsiveDisabled:!tn,order:sr,className:"".concat(Qn,"-suffix"),registerSize:mn,display:!0,style:gn}),te));return Cn?F.createElement(X.Z,{onResize:vt,disabled:!tn},Lt):Lt}var de=F.forwardRef(P);de.displayName="Overflow",de.Item=Pe,de.RESPONSIVE=He,de.INVALIDATE=ue;var ae=de,Q=ae},29301:function(un,We,m){"use strict";m.d(We,{Z:function(){return ue}});var c=m(60499),ee=m(59301),$=m(11592),ie=m(48736),F=m(85899),g=m(43749),J=m(76846),X=m(8654),o=ee.createContext(null);function x(W){var P=W.children,de=W.onBatchResize,ae=ee.useRef(0),Q=ee.useRef([]),E=ee.useContext(o),C=ee.useCallback(function(Y,be,je){ae.current+=1;var lt=ae.current;Q.current.push({size:Y,element:be,data:je}),Promise.resolve().then(function(){lt===ae.current&&(de==null||de(Q.current),Q.current=[])}),E==null||E(Y,be,je)},[de,E]);return ee.createElement(o.Provider,{value:C},P)}var L=m(76374),b=new Map;function S(W){W.forEach(function(P){var de,ae=P.target;(de=b.get(ae))===null||de===void 0||de.forEach(function(Q){return Q(ae)})})}var T=new L.Z(S),B=null,z=null;function j(W,P){b.has(W)||(b.set(W,new Set),T.observe(W)),b.get(W).add(P)}function U(W,P){b.has(W)&&(b.get(W).delete(P),b.get(W).size||(T.unobserve(W),b.delete(W)))}var A=m(38705),K=m(17212),I=m(39153),M=m(55401),le=function(W){(0,I.Z)(de,W);var P=(0,M.Z)(de);function de(){return(0,A.Z)(this,de),P.apply(this,arguments)}return(0,K.Z)(de,[{key:"render",value:function(){return this.props.children}}]),de}(ee.Component);function me(W,P){var de=W.children,ae=W.disabled,Q=ee.useRef(null),E=ee.useRef(null),C=ee.useContext(o),Y=typeof de=="function",be=Y?de(Q):de,je=ee.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),lt=!Y&&ee.isValidElement(be)&&(0,X.Yr)(be),ke=lt?(0,X.C4)(be):null,Ye=(0,X.x1)(ke,Q),et=function(){var rt;return(0,J.ZP)(Q.current)||(Q.current&&(0,g.Z)(Q.current)==="object"?(0,J.ZP)((rt=Q.current)===null||rt===void 0?void 0:rt.nativeElement):null)||(0,J.ZP)(E.current)};ee.useImperativeHandle(P,function(){return et()});var _t=ee.useRef(W);_t.current=W;var Re=ee.useCallback(function(At){var rt=_t.current,Nt=rt.onResize,Xe=rt.data,Ge=At.getBoundingClientRect(),Ne=Ge.width,Ie=Ge.height,te=At.offsetWidth,$e=At.offsetHeight,Ae=Math.floor(Ne),Z=Math.floor(Ie);if(je.current.width!==Ae||je.current.height!==Z||je.current.offsetWidth!==te||je.current.offsetHeight!==$e){var D={width:Ae,height:Z,offsetWidth:te,offsetHeight:$e};je.current=D;var he=te===Math.round(Ne)?Ne:te,_e=$e===Math.round(Ie)?Ie:$e,pe=(0,F.Z)((0,F.Z)({},D),{},{offsetWidth:he,offsetHeight:_e});C==null||C(pe,At,Xe),Nt&&Promise.resolve().then(function(){Nt(pe,At)})}},[]);return ee.useEffect(function(){var At=et();return At&&!ae&&j(At,Re),function(){return U(At,Re)}},[Q.current,ae]),ee.createElement(le,{ref:E},lt?ee.cloneElement(be,{ref:Ye}):be)}var ce=ee.forwardRef(me),De=ce,Pe="rc-observer-key";function Ce(W,P){var de=W.children,ae=typeof de=="function"?[de]:(0,$.Z)(de);return ae.map(function(Q,E){var C=(Q==null?void 0:Q.key)||"".concat(Pe,"-").concat(E);return ee.createElement(De,(0,c.Z)({},W,{key:C,ref:E===0?P:void 0}),Q)})}var He=ee.forwardRef(Ce);He.Collection=x;var ue=He},6551:function(un,We,m){"use strict";m.d(We,{ZP:function(){return J}});var c=m(72190),ee=m(59301),$=m(47273),ie=0,F=(0,$.Z)();function g(){var X;return F?(X=ie,ie+=1):X="TEST_OR_SSR",X}function J(X){var o=ee.useState(),x=(0,c.Z)(o,2),L=x[0],b=x[1];return ee.useEffect(function(){b("rc_select_".concat(g()))},[]),X||L}},37463:function(un,We,m){"use strict";m.d(We,{Ac:function(){return Ue},Xo:function(){return dt},Wx:function(){return kt},ZP:function(){return vr},lk:function(){return K}});var c=m(60499),ee=m(77654),$=m(18642),ie=m(85899),F=m(72190),g=m(42244),J=m(43749),X=m(18929),o=m(48736),x=m(59301),L=m(92310),b=m.n(L),S=m(34280),T=m(49658),B=m(8654),z=function(wt){var Me=wt.className,nt=wt.customizeIcon,vt=wt.customizeIconProps,yt=wt.children,Tt=wt.onMouseDown,Jt=wt.onClick,mn=typeof nt=="function"?nt(vt):nt;return x.createElement("span",{className:Me,onMouseDown:function(Wt){Wt.preventDefault(),Tt==null||Tt(Wt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Jt,"aria-hidden":!0},mn!==void 0?mn:x.createElement("span",{className:b()(Me.split(/\s+/).map(function(yn){return"".concat(yn,"-icon")}))},yt))},j=z,U=function(wt,Me,nt,vt,yt){var Tt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Jt=arguments.length>6?arguments[6]:void 0,mn=arguments.length>7?arguments[7]:void 0,yn=x.useMemo(function(){if((0,J.Z)(vt)==="object")return vt.clearIcon;if(yt)return yt},[vt,yt]),Wt=x.useMemo(function(){return!!(!Tt&&vt&&(nt.length||Jt)&&!(mn==="combobox"&&Jt===""))},[vt,Tt,nt.length,Jt,mn]);return{allowClear:Wt,clearIcon:x.createElement(j,{className:"".concat(wt,"-clear"),onMouseDown:Me,customizeIcon:yn},"\xD7")}},A=x.createContext(null);function K(){return x.useContext(A)}function I(){var Et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,wt=x.useState(!1),Me=(0,F.Z)(wt,2),nt=Me[0],vt=Me[1],yt=x.useRef(null),Tt=function(){window.clearTimeout(yt.current)};x.useEffect(function(){return Tt},[]);var Jt=function(yn,Wt){Tt(),yt.current=window.setTimeout(function(){vt(yn),Wt&&Wt()},Et)};return[nt,Jt,Tt]}function M(){var Et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,wt=x.useRef(null),Me=x.useRef(null);x.useEffect(function(){return function(){window.clearTimeout(Me.current)}},[]);function nt(vt){(vt||wt.current===null)&&(wt.current=vt),window.clearTimeout(Me.current),Me.current=window.setTimeout(function(){wt.current=null},Et)}return[function(){return wt.current},nt]}function le(Et,wt,Me,nt){var vt=x.useRef(null);vt.current={open:wt,triggerOpen:Me,customizedTrigger:nt},x.useEffect(function(){function yt(Tt){var Jt;if(!((Jt=vt.current)!==null&&Jt!==void 0&&Jt.customizedTrigger)){var mn=Tt.target;mn.shadowRoot&&Tt.composed&&(mn=Tt.composedPath()[0]||mn),vt.current.open&&Et().filter(function(yn){return yn}).every(function(yn){return!yn.contains(mn)&&yn!==mn})&&vt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",yt),function(){return window.removeEventListener("mousedown",yt)}},[])}var me=m(10228);function ce(Et){return Et&&![me.Z.ESC,me.Z.SHIFT,me.Z.BACKSPACE,me.Z.TAB,me.Z.WIN_KEY,me.Z.ALT,me.Z.META,me.Z.WIN_KEY_RIGHT,me.Z.CTRL,me.Z.SEMICOLON,me.Z.EQUALS,me.Z.CAPS_LOCK,me.Z.CONTEXT_MENU,me.Z.F1,me.Z.F2,me.Z.F3,me.Z.F4,me.Z.F5,me.Z.F6,me.Z.F7,me.Z.F8,me.Z.F9,me.Z.F10,me.Z.F11,me.Z.F12].includes(Et)}var De=m(26112),Pe=m(83836);function Ce(Et,wt,Me){var nt=(0,ie.Z)((0,ie.Z)({},Et),Me?wt:{});return Object.keys(wt).forEach(function(vt){var yt=wt[vt];typeof yt=="function"&&(nt[vt]=function(){for(var Tt,Jt=arguments.length,mn=new Array(Jt),yn=0;yn<Jt;yn++)mn[yn]=arguments[yn];return yt.apply(void 0,mn),(Tt=Et[vt])===null||Tt===void 0?void 0:Tt.call.apply(Tt,[Et].concat(mn))})}),nt}var He=Ce,ue=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],W=function(wt,Me){var nt=wt.prefixCls,vt=wt.id,yt=wt.inputElement,Tt=wt.autoFocus,Jt=wt.autoComplete,mn=wt.editable,yn=wt.activeDescendantId,Wt=wt.value,gn=wt.open,Ln=wt.attrs,vn=(0,g.Z)(wt,ue),ht=yt||x.createElement("input",null),Ct=ht,Zt=Ct.ref,Lt=Ct.props;return(0,o.Kp)(!("maxLength"in ht.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),ht=x.cloneElement(ht,(0,ie.Z)((0,ie.Z)((0,ie.Z)({type:"search"},He(vn,Lt,!0)),{},{id:vt,ref:(0,B.sQ)(Me,Zt),autoComplete:Jt||"off",autoFocus:Tt,className:b()("".concat(nt,"-selection-search-input"),Lt==null?void 0:Lt.className),role:"combobox","aria-expanded":gn||!1,"aria-haspopup":"listbox","aria-owns":"".concat(vt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(vt,"_list"),"aria-activedescendant":gn?yn:void 0},Ln),{},{value:mn?Wt:"",readOnly:!mn,unselectable:mn?null:"on",style:(0,ie.Z)((0,ie.Z)({},Lt.style),{},{opacity:mn?null:0})})),ht},P=x.forwardRef(W),de=P;function ae(Et){return Array.isArray(Et)?Et:Et!==void 0?[Et]:[]}var Q=typeof window!="undefined"&&window.document&&window.document.documentElement,E=Q;function C(Et){return Et!=null}function Y(Et){return!Et&&Et!==0}function be(Et){return["string","number"].includes((0,J.Z)(Et))}function je(Et){var wt=void 0;return Et&&(be(Et.title)?wt=Et.title.toString():be(Et.label)&&(wt=Et.label.toString())),wt}function lt(Et,wt){E?x.useLayoutEffect(Et,wt):x.useEffect(Et,wt)}function ke(Et){var wt;return(wt=Et.key)!==null&&wt!==void 0?wt:Et.value}var Ye=function(wt){wt.preventDefault(),wt.stopPropagation()},et=function(wt){var Me=wt.id,nt=wt.prefixCls,vt=wt.values,yt=wt.open,Tt=wt.searchValue,Jt=wt.autoClearSearchValue,mn=wt.inputRef,yn=wt.placeholder,Wt=wt.disabled,gn=wt.mode,Ln=wt.showSearch,vn=wt.autoFocus,ht=wt.autoComplete,Ct=wt.activeDescendantId,Zt=wt.tabIndex,Lt=wt.removeIcon,zt=wt.maxTagCount,Vt=wt.maxTagTextLength,nn=wt.maxTagPlaceholder,rn=nn===void 0?function(Rn){return"+ ".concat(Rn.length," ...")}:nn,Sn=wt.tagRender,On=wt.onToggleOpen,or=wt.onRemove,Nn=wt.onInputChange,Pn=wt.onInputPaste,Hn=wt.onInputKeyDown,Kn=wt.onInputMouseDown,er=wt.onInputCompositionStart,$n=wt.onInputCompositionEnd,Zn=wt.onInputBlur,nr=x.useRef(null),ar=(0,x.useState)(0),Jn=(0,F.Z)(ar,2),Yn=Jn[0],qn=Jn[1],Fn=(0,x.useState)(!1),$r=(0,F.Z)(Fn,2),Ft=$r[0],tr=$r[1],ur="".concat(nt,"-selection"),Yr=yt||gn==="multiple"&&Jt===!1||gn==="tags"?Tt:"",zr=gn==="tags"||gn==="multiple"&&Jt===!1||Ln&&(yt||Ft);lt(function(){qn(nr.current.scrollWidth)},[Yr]);var li=function(Un,rr,Ar,wn,cr){return x.createElement("span",{title:je(Un),className:b()("".concat(ur,"-item"),(0,$.Z)({},"".concat(ur,"-item-disabled"),Ar))},x.createElement("span",{className:"".concat(ur,"-item-content")},rr),wn&&x.createElement(j,{className:"".concat(ur,"-item-remove"),onMouseDown:Ye,onClick:cr,customizeIcon:Lt},"\xD7"))},Qr=function(Un,rr,Ar,wn,cr,Ir){var Jr=function(Li){Ye(Li),On(!yt)};return x.createElement("span",{onMouseDown:Jr},Sn({label:rr,value:Un,disabled:Ar,closable:wn,onClose:cr,isMaxTag:!!Ir}))},Bn=function(Un){var rr=Un.disabled,Ar=Un.label,wn=Un.value,cr=!Wt&&!rr,Ir=Ar;if(typeof Vt=="number"&&(typeof Ar=="string"||typeof Ar=="number")){var Jr=String(Ir);Jr.length>Vt&&(Ir="".concat(Jr.slice(0,Vt),"..."))}var mi=function(Gr){Gr&&Gr.stopPropagation(),or(Un)};return typeof Sn=="function"?Qr(wn,Ir,rr,cr,mi):li(Un,Ir,rr,cr,mi)},An=function(Un){if(!vt.length)return null;var rr=typeof rn=="function"?rn(Un):rn;return typeof Sn=="function"?Qr(void 0,rr,!1,!1,void 0,!0):li({title:rr},rr,!1)},en=x.createElement("div",{className:"".concat(ur,"-search"),style:{width:Yn},onFocus:function(){tr(!0)},onBlur:function(){tr(!1)}},x.createElement(de,{ref:mn,open:yt,prefixCls:nt,id:Me,inputElement:null,disabled:Wt,autoFocus:vn,autoComplete:ht,editable:zr,activeDescendantId:Ct,value:Yr,onKeyDown:Hn,onMouseDown:Kn,onChange:Nn,onPaste:Pn,onCompositionStart:er,onCompositionEnd:$n,onBlur:Zn,tabIndex:Zt,attrs:(0,De.Z)(wt,!0)}),x.createElement("span",{ref:nr,className:"".concat(ur,"-search-mirror"),"aria-hidden":!0},Yr,"\xA0")),sn=x.createElement(Pe.Z,{prefixCls:"".concat(ur,"-overflow"),data:vt,renderItem:Bn,renderRest:An,suffix:en,itemKey:ke,maxCount:zt});return x.createElement("span",{className:"".concat(ur,"-wrap")},sn,!vt.length&&!Yr&&x.createElement("span",{className:"".concat(ur,"-placeholder")},yn))},_t=et,Re=function(wt){var Me=wt.inputElement,nt=wt.prefixCls,vt=wt.id,yt=wt.inputRef,Tt=wt.disabled,Jt=wt.autoFocus,mn=wt.autoComplete,yn=wt.activeDescendantId,Wt=wt.mode,gn=wt.open,Ln=wt.values,vn=wt.placeholder,ht=wt.tabIndex,Ct=wt.showSearch,Zt=wt.searchValue,Lt=wt.activeValue,zt=wt.maxLength,Vt=wt.onInputKeyDown,nn=wt.onInputMouseDown,rn=wt.onInputChange,Sn=wt.onInputPaste,On=wt.onInputCompositionStart,or=wt.onInputCompositionEnd,Nn=wt.onInputBlur,Pn=wt.title,Hn=x.useState(!1),Kn=(0,F.Z)(Hn,2),er=Kn[0],$n=Kn[1],Zn=Wt==="combobox",nr=Zn||Ct,ar=Ln[0],Jn=Zt||"";Zn&&Lt&&!er&&(Jn=Lt),x.useEffect(function(){Zn&&$n(!1)},[Zn,Lt]);var Yn=Wt!=="combobox"&&!gn&&!Ct?!1:!!Jn,qn=Pn===void 0?je(ar):Pn,Fn=x.useMemo(function(){return ar?null:x.createElement("span",{className:"".concat(nt,"-selection-placeholder"),style:Yn?{visibility:"hidden"}:void 0},vn)},[ar,Yn,vn,nt]);return x.createElement("span",{className:"".concat(nt,"-selection-wrap")},x.createElement("span",{className:"".concat(nt,"-selection-search")},x.createElement(de,{ref:yt,prefixCls:nt,id:vt,open:gn,inputElement:Me,disabled:Tt,autoFocus:Jt,autoComplete:mn,editable:nr,activeDescendantId:yn,value:Jn,onKeyDown:Vt,onMouseDown:nn,onChange:function(Ft){$n(!0),rn(Ft)},onPaste:Sn,onCompositionStart:On,onCompositionEnd:or,onBlur:Nn,tabIndex:ht,attrs:(0,De.Z)(wt,!0),maxLength:Zn?zt:void 0})),!Zn&&ar?x.createElement("span",{className:"".concat(nt,"-selection-item"),title:qn,style:Yn?{visibility:"hidden"}:void 0},ar.label):null,Fn)},At=Re,rt=function(wt,Me){var nt=(0,x.useRef)(null),vt=(0,x.useRef)(!1),yt=wt.prefixCls,Tt=wt.open,Jt=wt.mode,mn=wt.showSearch,yn=wt.tokenWithEnter,Wt=wt.disabled,gn=wt.prefix,Ln=wt.autoClearSearchValue,vn=wt.onSearch,ht=wt.onSearchSubmit,Ct=wt.onToggleOpen,Zt=wt.onInputKeyDown,Lt=wt.onInputBlur,zt=wt.domRef;x.useImperativeHandle(Me,function(){return{focus:function(qn){nt.current.focus(qn)},blur:function(){nt.current.blur()}}});var Vt=M(0),nn=(0,F.Z)(Vt,2),rn=nn[0],Sn=nn[1],On=function(qn){var Fn=qn.which,$r=nt.current instanceof HTMLTextAreaElement;!$r&&Tt&&(Fn===me.Z.UP||Fn===me.Z.DOWN)&&qn.preventDefault(),Zt&&Zt(qn),Fn===me.Z.ENTER&&Jt==="tags"&&!vt.current&&!Tt&&(ht==null||ht(qn.target.value)),!($r&&!Tt&&~[me.Z.UP,me.Z.DOWN,me.Z.LEFT,me.Z.RIGHT].indexOf(Fn))&&ce(Fn)&&Ct(!0)},or=function(){Sn(!0)},Nn=(0,x.useRef)(null),Pn=function(qn){vn(qn,!0,vt.current)!==!1&&Ct(!0)},Hn=function(){vt.current=!0},Kn=function(qn){vt.current=!1,Jt!=="combobox"&&Pn(qn.target.value)},er=function(qn){var Fn=qn.target.value;if(yn&&Nn.current&&/[\r\n]/.test(Nn.current)){var $r=Nn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Fn=Fn.replace($r,Nn.current)}Nn.current=null,Pn(Fn)},$n=function(qn){var Fn=qn.clipboardData,$r=Fn==null?void 0:Fn.getData("text");Nn.current=$r||""},Zn=function(qn){var Fn=qn.target;if(Fn!==nt.current){var $r=document.body.style.msTouchAction!==void 0;$r?setTimeout(function(){nt.current.focus()}):nt.current.focus()}},nr=function(qn){var Fn=rn();qn.target!==nt.current&&!Fn&&!(Jt==="combobox"&&Wt)&&qn.preventDefault(),(Jt!=="combobox"&&(!mn||!Fn)||!Tt)&&(Tt&&Ln!==!1&&vn("",!0,!1),Ct())},ar={inputRef:nt,onInputKeyDown:On,onInputMouseDown:or,onInputChange:er,onInputPaste:$n,onInputCompositionStart:Hn,onInputCompositionEnd:Kn,onInputBlur:Lt},Jn=Jt==="multiple"||Jt==="tags"?x.createElement(_t,(0,c.Z)({},wt,ar)):x.createElement(At,(0,c.Z)({},wt,ar));return x.createElement("div",{ref:zt,className:"".concat(yt,"-selector"),onClick:Zn,onMouseDown:nr},gn&&x.createElement("div",{className:"".concat(yt,"-prefix")},gn),Jn)},Nt=x.forwardRef(rt),Xe=Nt,Ge=m(68196),Ne=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ie=function(wt){var Me=wt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Me,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Me,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Me,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Me,adjustY:1},htmlRegion:"scroll"}}},te=function(wt,Me){var nt=wt.prefixCls,vt=wt.disabled,yt=wt.visible,Tt=wt.children,Jt=wt.popupElement,mn=wt.animation,yn=wt.transitionName,Wt=wt.dropdownStyle,gn=wt.dropdownClassName,Ln=wt.direction,vn=Ln===void 0?"ltr":Ln,ht=wt.placement,Ct=wt.builtinPlacements,Zt=wt.dropdownMatchSelectWidth,Lt=wt.dropdownRender,zt=wt.dropdownAlign,Vt=wt.getPopupContainer,nn=wt.empty,rn=wt.getTriggerDOMNode,Sn=wt.onPopupVisibleChange,On=wt.onPopupMouseEnter,or=(0,g.Z)(wt,Ne),Nn="".concat(nt,"-dropdown"),Pn=Jt;Lt&&(Pn=Lt(Jt));var Hn=x.useMemo(function(){return Ct||Ie(Zt)},[Ct,Zt]),Kn=mn?"".concat(Nn,"-").concat(mn):yn,er=typeof Zt=="number",$n=x.useMemo(function(){return er?null:Zt===!1?"minWidth":"width"},[Zt,er]),Zn=Wt;er&&(Zn=(0,ie.Z)((0,ie.Z)({},Zn),{},{width:Zt}));var nr=x.useRef(null);return x.useImperativeHandle(Me,function(){return{getPopupElement:function(){var Jn;return(Jn=nr.current)===null||Jn===void 0?void 0:Jn.popupElement}}}),x.createElement(Ge.Z,(0,c.Z)({},or,{showAction:Sn?["click"]:[],hideAction:Sn?["click"]:[],popupPlacement:ht||(vn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Hn,prefixCls:Nn,popupTransitionName:Kn,popup:x.createElement("div",{onMouseEnter:On},Pn),ref:nr,stretch:$n,popupAlign:zt,popupVisible:yt,getPopupContainer:Vt,popupClassName:b()(gn,(0,$.Z)({},"".concat(Nn,"-empty"),nn)),popupStyle:Zn,getTriggerDOMNode:rn,onPopupVisibleChange:Sn}),Tt)},$e=x.forwardRef(te),Ae=$e,Z=m(48745);function D(Et,wt){var Me=Et.key,nt;return"value"in Et&&(nt=Et.value),Me!=null?Me:nt!==void 0?nt:"rc-index-key-".concat(wt)}function he(Et){return typeof Et!="undefined"&&!Number.isNaN(Et)}function _e(Et,wt){var Me=Et||{},nt=Me.label,vt=Me.value,yt=Me.options,Tt=Me.groupLabel,Jt=nt||(wt?"children":"label");return{label:Jt,value:vt||"value",options:yt||"options",groupLabel:Tt||Jt}}function pe(Et){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Me=wt.fieldNames,nt=wt.childrenAsData,vt=[],yt=_e(Me,!1),Tt=yt.label,Jt=yt.value,mn=yt.options,yn=yt.groupLabel;function Wt(gn,Ln){Array.isArray(gn)&&gn.forEach(function(vn){if(Ln||!(mn in vn)){var ht=vn[Jt];vt.push({key:D(vn,vt.length),groupOption:Ln,data:vn,label:vn[Tt],value:ht})}else{var Ct=vn[yn];Ct===void 0&&nt&&(Ct=vn.label),vt.push({key:D(vn,vt.length),group:!0,data:vn,label:Ct}),Wt(vn[mn],!0)}})}return Wt(Et,!1),vt}function Ee(Et){var wt=(0,ie.Z)({},Et);return"props"in wt||Object.defineProperty(wt,"props",{get:function(){return(0,o.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),wt}}),wt}var Oe=function(wt,Me,nt){if(!Me||!Me.length)return null;var vt=!1,yt=function Jt(mn,yn){var Wt=(0,Z.Z)(yn),gn=Wt[0],Ln=Wt.slice(1);if(!gn)return[mn];var vn=mn.split(gn);return vt=vt||vn.length>1,vn.reduce(function(ht,Ct){return[].concat((0,ee.Z)(ht),(0,ee.Z)(Jt(Ct,Ln)))},[]).filter(Boolean)},Tt=yt(wt,Me);return vt?typeof nt!="undefined"?Tt.slice(0,nt):Tt:null},Ze=x.createContext(null),re=Ze;function fe(Et){var wt=Et.visible,Me=Et.values;if(!wt)return null;var nt=50;return x.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Me.slice(0,nt).map(function(vt){var yt=vt.label,Tt=vt.value;return["number","string"].includes((0,J.Z)(yt))?yt:Tt}).join(", ")),Me.length>nt?", ...":null)}var st=["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"],tt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],ct=function(wt){return wt==="tags"||wt==="multiple"},ut=x.forwardRef(function(Et,wt){var Me,nt=Et.id,vt=Et.prefixCls,yt=Et.className,Tt=Et.showSearch,Jt=Et.tagRender,mn=Et.direction,yn=Et.omitDomProps,Wt=Et.displayValues,gn=Et.onDisplayValuesChange,Ln=Et.emptyOptions,vn=Et.notFoundContent,ht=vn===void 0?"Not Found":vn,Ct=Et.onClear,Zt=Et.mode,Lt=Et.disabled,zt=Et.loading,Vt=Et.getInputElement,nn=Et.getRawInputElement,rn=Et.open,Sn=Et.defaultOpen,On=Et.onDropdownVisibleChange,or=Et.activeValue,Nn=Et.onActiveValueChange,Pn=Et.activeDescendantId,Hn=Et.searchValue,Kn=Et.autoClearSearchValue,er=Et.onSearch,$n=Et.onSearchSplit,Zn=Et.tokenSeparators,nr=Et.allowClear,ar=Et.prefix,Jn=Et.suffixIcon,Yn=Et.clearIcon,qn=Et.OptionList,Fn=Et.animation,$r=Et.transitionName,Ft=Et.dropdownStyle,tr=Et.dropdownClassName,ur=Et.dropdownMatchSelectWidth,Yr=Et.dropdownRender,zr=Et.dropdownAlign,li=Et.placement,Qr=Et.builtinPlacements,Bn=Et.getPopupContainer,An=Et.showAction,en=An===void 0?[]:An,sn=Et.onFocus,Rn=Et.onBlur,Un=Et.onKeyUp,rr=Et.onKeyDown,Ar=Et.onMouseDown,wn=(0,g.Z)(Et,st),cr=ct(Zt),Ir=(Tt!==void 0?Tt:cr)||Zt==="combobox",Jr=(0,ie.Z)({},wn);tt.forEach(function(fi){delete Jr[fi]}),yn==null||yn.forEach(function(fi){delete Jr[fi]});var mi=x.useState(!1),Li=(0,F.Z)(mi,2),Gr=Li[0],Ri=Li[1];x.useEffect(function(){Ri((0,T.Z)())},[]);var qr=x.useRef(null),bi=x.useRef(null),ri=x.useRef(null),di=x.useRef(null),ii=x.useRef(null),Oi=x.useRef(!1),Lr=I(),Pi=(0,F.Z)(Lr,3),Mi=Pi[0],ki=Pi[1],mr=Pi[2];x.useImperativeHandle(wt,function(){var fi,Hr;return{focus:(fi=di.current)===null||fi===void 0?void 0:fi.focus,blur:(Hr=di.current)===null||Hr===void 0?void 0:Hr.blur,scrollTo:function(ws){var wi;return(wi=ii.current)===null||wi===void 0?void 0:wi.scrollTo(ws)},nativeElement:qr.current||bi.current}});var zn=x.useMemo(function(){var fi;if(Zt!=="combobox")return Hn;var Hr=(fi=Wt[0])===null||fi===void 0?void 0:fi.value;return typeof Hr=="string"||typeof Hr=="number"?String(Hr):""},[Hn,Zt,Wt]),pi=Zt==="combobox"&&typeof Vt=="function"&&Vt()||null,Tn=typeof nn=="function"&&nn(),Fi=(0,B.x1)(bi,Tn==null||(Me=Tn.props)===null||Me===void 0?void 0:Me.ref),Os=x.useState(!1),vs=(0,F.Z)(Os,2),ss=vs[0],ls=vs[1];(0,S.Z)(function(){ls(!0)},[]);var Pr=(0,X.Z)(!1,{defaultValue:Sn,value:rn}),Gi=(0,F.Z)(Pr,2),ds=Gi[0],_s=Gi[1],ci=ss?ds:!1,zi=!ht&&Ln;(Lt||zi&&ci&&Zt==="combobox")&&(ci=!1);var ns=zi?!1:ci,br=x.useCallback(function(fi){var Hr=fi!==void 0?fi:!ci;Lt||(_s(Hr),ci!==Hr&&(On==null||On(Hr)))},[Lt,ci,_s,On]),Ur=x.useMemo(function(){return(Zn||[]).some(function(fi){return[`
`,`\r
`].includes(fi)})},[Zn]),yr=x.useContext(re)||{},Or=yr.maxCount,ui=yr.rawValues,_i=function(Hr,ps,ws){if(!(cr&&he(Or)&&(ui==null?void 0:ui.size)>=Or)){var wi=!0,os=Hr;Nn==null||Nn(null);var Ps=Oe(Hr,Zn,he(Or)?Or-ui.size:void 0),Ms=ws?null:Ps;return Zt!=="combobox"&&Ms&&(os="",$n==null||$n(Ms),br(!1),wi=!1),er&&zn!==os&&er(os,{source:ps?"typing":"effect"}),wi}},as=function(Hr){!Hr||!Hr.trim()||er(Hr,{source:"submit"})};x.useEffect(function(){!ci&&!cr&&Zt!=="combobox"&&_i("",!1,!1)},[ci]),x.useEffect(function(){ds&&Lt&&_s(!1),Lt&&!Oi.current&&ki(!1)},[Lt]);var ir=M(),Dr=(0,F.Z)(ir,2),ei=Dr[0],Kr=Dr[1],ti=x.useRef(!1),xs=function(Hr){var ps=ei(),ws=Hr.key,wi=ws==="Enter";if(wi&&(Zt!=="combobox"&&Hr.preventDefault(),ci||br(!0)),Kr(!!zn),ws==="Backspace"&&!ps&&cr&&!zn&&Wt.length){for(var os=(0,ee.Z)(Wt),Ps=null,Ms=os.length-1;Ms>=0;Ms-=1){var Js=os[Ms];if(!Js.disabled){os.splice(Ms,1),Ps=Js;break}}Ps&&gn(os,{type:"remove",values:[Ps]})}for(var Cs=arguments.length,ta=new Array(Cs>1?Cs-1:0),Hs=1;Hs<Cs;Hs++)ta[Hs-1]=arguments[Hs];if(ci&&(!wi||!ti.current)){var la;wi&&(ti.current=!0),(la=ii.current)===null||la===void 0||la.onKeyDown.apply(la,[Hr].concat(ta))}rr==null||rr.apply(void 0,[Hr].concat(ta))},us=function(Hr){for(var ps=arguments.length,ws=new Array(ps>1?ps-1:0),wi=1;wi<ps;wi++)ws[wi-1]=arguments[wi];if(ci){var os;(os=ii.current)===null||os===void 0||os.onKeyUp.apply(os,[Hr].concat(ws))}Hr.key==="Enter"&&(ti.current=!1),Un==null||Un.apply(void 0,[Hr].concat(ws))},Es=function(Hr){var ps=Wt.filter(function(ws){return ws!==Hr});gn(ps,{type:"remove",values:[Hr]})},ms=function(){ti.current=!1},ba=x.useRef(!1),so=function(){ki(!0),Lt||(sn&&!ba.current&&sn.apply(void 0,arguments),en.includes("focus")&&br(!0)),ba.current=!0},Ka=function(){Oi.current=!0,ki(!1,function(){ba.current=!1,Oi.current=!1,br(!1)}),!Lt&&(zn&&(Zt==="tags"?er(zn,{source:"submit"}):Zt==="multiple"&&er("",{source:"blur"})),Rn&&Rn.apply(void 0,arguments))},Ss=[];x.useEffect(function(){return function(){Ss.forEach(function(fi){return clearTimeout(fi)}),Ss.splice(0,Ss.length)}},[]);var Fs=function(Hr){var ps,ws=Hr.target,wi=(ps=ri.current)===null||ps===void 0?void 0:ps.getPopupElement();if(wi&&wi.contains(ws)){var os=setTimeout(function(){var Cs=Ss.indexOf(os);if(Cs!==-1&&Ss.splice(Cs,1),mr(),!Gr&&!wi.contains(document.activeElement)){var ta;(ta=di.current)===null||ta===void 0||ta.focus()}});Ss.push(os)}for(var Ps=arguments.length,Ms=new Array(Ps>1?Ps-1:0),Js=1;Js<Ps;Js++)Ms[Js-1]=arguments[Js];Ar==null||Ar.apply(void 0,[Hr].concat(Ms))},ks=x.useState({}),Za=(0,F.Z)(ks,2),aa=Za[1];function Zs(){aa({})}var wa;Tn&&(wa=function(Hr){br(Hr)}),le(function(){var fi;return[qr.current,(fi=ri.current)===null||fi===void 0?void 0:fi.getPopupElement()]},ns,br,!!Tn);var Pa=x.useMemo(function(){return(0,ie.Z)((0,ie.Z)({},Et),{},{notFoundContent:ht,open:ci,triggerOpen:ns,id:nt,showSearch:Ir,multiple:cr,toggleOpen:br})},[Et,ht,ns,ci,nt,Ir,cr,br]),ja=!!Jn||zt,zs;ja&&(zs=x.createElement(j,{className:b()("".concat(vt,"-arrow"),(0,$.Z)({},"".concat(vt,"-arrow-loading"),zt)),customizeIcon:Jn,customizeIconProps:{loading:zt,searchValue:zn,open:ci,focused:Mi,showSearch:Ir}}));var Ca=function(){var Hr;Ct==null||Ct(),(Hr=di.current)===null||Hr===void 0||Hr.focus(),gn([],{type:"clear",values:Wt}),_i("",!1,!1)},Ls=U(vt,Ca,Wt,nr,Yn,Lt,zn,Zt),Ma=Ls.allowClear,ka=Ls.clearIcon,Ha=x.createElement(qn,{ref:ii}),Wa=b()(vt,yt,(0,$.Z)((0,$.Z)((0,$.Z)((0,$.Z)((0,$.Z)((0,$.Z)((0,$.Z)((0,$.Z)((0,$.Z)((0,$.Z)({},"".concat(vt,"-focused"),Mi),"".concat(vt,"-multiple"),cr),"".concat(vt,"-single"),!cr),"".concat(vt,"-allow-clear"),nr),"".concat(vt,"-show-arrow"),ja),"".concat(vt,"-disabled"),Lt),"".concat(vt,"-loading"),zt),"".concat(vt,"-open"),ci),"".concat(vt,"-customize-input"),pi),"".concat(vt,"-show-search"),Ir)),oa=x.createElement(Ae,{ref:ri,disabled:Lt,prefixCls:vt,visible:ns,popupElement:Ha,animation:Fn,transitionName:$r,dropdownStyle:Ft,dropdownClassName:tr,direction:mn,dropdownMatchSelectWidth:ur,dropdownRender:Yr,dropdownAlign:zr,placement:li,builtinPlacements:Qr,getPopupContainer:Bn,empty:Ln,getTriggerDOMNode:function(Hr){return bi.current||Hr},onPopupVisibleChange:wa,onPopupMouseEnter:Zs},Tn?x.cloneElement(Tn,{ref:Fi}):x.createElement(Xe,(0,c.Z)({},Et,{domRef:bi,prefixCls:vt,inputElement:pi,ref:di,id:nt,prefix:ar,showSearch:Ir,autoClearSearchValue:Kn,mode:Zt,activeDescendantId:Pn,tagRender:Jt,values:Wt,open:ci,onToggleOpen:br,activeValue:or,searchValue:zn,onSearch:_i,onSearchSubmit:as,onRemove:Es,tokenWithEnter:Ur,onInputBlur:ms}))),js;return Tn?js=oa:js=x.createElement("div",(0,c.Z)({className:Wa},Jr,{ref:qr,onMouseDown:Fs,onKeyDown:xs,onKeyUp:us,onFocus:so,onBlur:Ka}),x.createElement(fe,{visible:Mi&&!ci,values:Wt}),oa,zs,Ma&&ka),x.createElement(A.Provider,{value:Pa},js)}),Ue=ut,xt=function(){return null};xt.isSelectOptGroup=!0;var dt=xt,gt=function(){return null};gt.isSelectOption=!0;var kt=gt,w=m(80547),O=m(2738),qe=m(48911);function oe(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var xe=["disabled","title","children","style","className"];function jt(Et){return typeof Et=="string"||typeof Et=="number"}var Qe=function(wt,Me){var nt=K(),vt=nt.prefixCls,yt=nt.id,Tt=nt.open,Jt=nt.multiple,mn=nt.mode,yn=nt.searchValue,Wt=nt.toggleOpen,gn=nt.notFoundContent,Ln=nt.onPopupScroll,vn=x.useContext(re),ht=vn.maxCount,Ct=vn.flattenOptions,Zt=vn.onActiveValue,Lt=vn.defaultActiveFirstOption,zt=vn.onSelect,Vt=vn.menuItemSelectedIcon,nn=vn.rawValues,rn=vn.fieldNames,Sn=vn.virtual,On=vn.direction,or=vn.listHeight,Nn=vn.listItemHeight,Pn=vn.optionRender,Hn="".concat(vt,"-item"),Kn=(0,w.Z)(function(){return Ct},[Tt,Ct],function(An,en){return en[0]&&An[1]!==en[1]}),er=x.useRef(null),$n=x.useMemo(function(){return Jt&&he(ht)&&(nn==null?void 0:nn.size)>=ht},[Jt,ht,nn==null?void 0:nn.size]),Zn=function(en){en.preventDefault()},nr=function(en){var sn;(sn=er.current)===null||sn===void 0||sn.scrollTo(typeof en=="number"?{index:en}:en)},ar=x.useCallback(function(An){return mn==="combobox"?!1:nn.has(An)},[mn,(0,ee.Z)(nn).toString(),nn.size]),Jn=function(en){for(var sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Rn=Kn.length,Un=0;Un<Rn;Un+=1){var rr=(en+Un*sn+Rn)%Rn,Ar=Kn[rr]||{},wn=Ar.group,cr=Ar.data;if(!wn&&!(cr!=null&&cr.disabled)&&(ar(cr.value)||!$n))return rr}return-1},Yn=x.useState(function(){return Jn(0)}),qn=(0,F.Z)(Yn,2),Fn=qn[0],$r=qn[1],Ft=function(en){var sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;$r(en);var Rn={source:sn?"keyboard":"mouse"},Un=Kn[en];if(!Un){Zt(null,-1,Rn);return}Zt(Un.value,en,Rn)};(0,x.useEffect)(function(){Ft(Lt!==!1?Jn(0):-1)},[Kn.length,yn]);var tr=x.useCallback(function(An){return mn==="combobox"?String(An).toLowerCase()===yn.toLowerCase():nn.has(An)},[mn,yn,(0,ee.Z)(nn).toString(),nn.size]);(0,x.useEffect)(function(){var An=setTimeout(function(){if(!Jt&&Tt&&nn.size===1){var sn=Array.from(nn)[0],Rn=Kn.findIndex(function(Un){var rr=Un.data;return yn?String(rr.value).startsWith(yn):rr.value===sn});Rn!==-1&&(Ft(Rn),nr(Rn))}});if(Tt){var en;(en=er.current)===null||en===void 0||en.scrollTo(void 0)}return function(){return clearTimeout(An)}},[Tt,yn]);var ur=function(en){en!==void 0&&zt(en,{selected:!nn.has(en)}),Jt||Wt(!1)};if(x.useImperativeHandle(Me,function(){return{onKeyDown:function(en){var sn=en.which,Rn=en.ctrlKey;switch(sn){case me.Z.N:case me.Z.P:case me.Z.UP:case me.Z.DOWN:{var Un=0;if(sn===me.Z.UP?Un=-1:sn===me.Z.DOWN?Un=1:oe()&&Rn&&(sn===me.Z.N?Un=1:sn===me.Z.P&&(Un=-1)),Un!==0){var rr=Jn(Fn+Un,Un);nr(rr),Ft(rr,!0)}break}case me.Z.TAB:case me.Z.ENTER:{var Ar,wn=Kn[Fn];wn&&!(wn!=null&&(Ar=wn.data)!==null&&Ar!==void 0&&Ar.disabled)&&!$n?ur(wn.value):ur(void 0),Tt&&en.preventDefault();break}case me.Z.ESC:Wt(!1),Tt&&en.stopPropagation()}},onKeyUp:function(){},scrollTo:function(en){nr(en)}}}),Kn.length===0)return x.createElement("div",{role:"listbox",id:"".concat(yt,"_list"),className:"".concat(Hn,"-empty"),onMouseDown:Zn},gn);var Yr=Object.keys(rn).map(function(An){return rn[An]}),zr=function(en){return en.label};function li(An,en){var sn=An.group;return{role:sn?"presentation":"option",id:"".concat(yt,"_list_").concat(en)}}var Qr=function(en){var sn=Kn[en];if(!sn)return null;var Rn=sn.data||{},Un=Rn.value,rr=sn.group,Ar=(0,De.Z)(Rn,!0),wn=zr(sn);return sn?x.createElement("div",(0,c.Z)({"aria-label":typeof wn=="string"&&!rr?wn:null},Ar,{key:en},li(sn,en),{"aria-selected":tr(Un)}),Un):null},Bn={role:"listbox",id:"".concat(yt,"_list")};return x.createElement(x.Fragment,null,Sn&&x.createElement("div",(0,c.Z)({},Bn,{style:{height:0,width:0,overflow:"hidden"}}),Qr(Fn-1),Qr(Fn),Qr(Fn+1)),x.createElement(qe.Z,{itemKey:"key",ref:er,data:Kn,height:or,itemHeight:Nn,fullHeight:!1,onMouseDown:Zn,onScroll:Ln,virtual:Sn,direction:On,innerProps:Sn?null:Bn},function(An,en){var sn=An.group,Rn=An.groupOption,Un=An.data,rr=An.label,Ar=An.value,wn=Un.key;if(sn){var cr,Ir=(cr=Un.title)!==null&&cr!==void 0?cr:jt(rr)?rr.toString():void 0;return x.createElement("div",{className:b()(Hn,"".concat(Hn,"-group"),Un.className),title:Ir},rr!==void 0?rr:wn)}var Jr=Un.disabled,mi=Un.title,Li=Un.children,Gr=Un.style,Ri=Un.className,qr=(0,g.Z)(Un,xe),bi=(0,O.Z)(qr,Yr),ri=ar(Ar),di=Jr||!ri&&$n,ii="".concat(Hn,"-option"),Oi=b()(Hn,ii,Ri,(0,$.Z)((0,$.Z)((0,$.Z)((0,$.Z)({},"".concat(ii,"-grouped"),Rn),"".concat(ii,"-active"),Fn===en&&!di),"".concat(ii,"-disabled"),di),"".concat(ii,"-selected"),ri)),Lr=zr(An),Pi=!Vt||typeof Vt=="function"||ri,Mi=typeof Lr=="number"?Lr:Lr||Ar,ki=jt(Mi)?Mi.toString():void 0;return mi!==void 0&&(ki=mi),x.createElement("div",(0,c.Z)({},(0,De.Z)(bi),Sn?{}:li(An,en),{"aria-selected":tr(Ar),className:Oi,title:ki,onMouseMove:function(){Fn===en||di||Ft(en)},onClick:function(){di||ur(Ar)},style:Gr}),x.createElement("div",{className:"".concat(ii,"-content")},typeof Pn=="function"?Pn(An,{index:en}):Mi),x.isValidElement(Vt)||ri,Pi&&x.createElement(j,{className:"".concat(Hn,"-option-state"),customizeIcon:Vt,customizeIconProps:{value:Ar,disabled:di,isSelected:ri}},ri?"\u2713":null))}))},at=x.forwardRef(Qe),bt=at,ge=function(Et,wt){var Me=x.useRef({values:new Map,options:new Map}),nt=x.useMemo(function(){var yt=Me.current,Tt=yt.values,Jt=yt.options,mn=Et.map(function(gn){if(gn.label===void 0){var Ln;return(0,ie.Z)((0,ie.Z)({},gn),{},{label:(Ln=Tt.get(gn.value))===null||Ln===void 0?void 0:Ln.label})}return gn}),yn=new Map,Wt=new Map;return mn.forEach(function(gn){yn.set(gn.value,gn),Wt.set(gn.value,wt.get(gn.value)||Jt.get(gn.value))}),Me.current.values=yn,Me.current.options=Wt,mn},[Et,wt]),vt=x.useCallback(function(yt){return wt.get(yt)||Me.current.options.get(yt)},[wt]);return[nt,vt]};function ye(Et,wt){return ae(Et).join("").toUpperCase().includes(wt)}var Fe=function(Et,wt,Me,nt,vt){return x.useMemo(function(){if(!Me||nt===!1)return Et;var yt=wt.options,Tt=wt.label,Jt=wt.value,mn=[],yn=typeof nt=="function",Wt=Me.toUpperCase(),gn=yn?nt:function(vn,ht){return vt?ye(ht[vt],Wt):ht[yt]?ye(ht[Tt!=="children"?Tt:"label"],Wt):ye(ht[Jt],Wt)},Ln=yn?function(vn){return Ee(vn)}:function(vn){return vn};return Et.forEach(function(vn){if(vn[yt]){var ht=gn(Me,Ln(vn));if(ht)mn.push(vn);else{var Ct=vn[yt].filter(function(Zt){return gn(Me,Ln(Zt))});Ct.length&&mn.push((0,ie.Z)((0,ie.Z)({},vn),{},(0,$.Z)({},yt,Ct)))}return}gn(Me,Ln(vn))&&mn.push(vn)}),mn},[Et,nt,vt,Me,wt])},ze=m(6551),q=m(11592),Mt=["children","value"],Be=["children"];function Gt(Et){var wt=Et,Me=wt.key,nt=wt.props,vt=nt.children,yt=nt.value,Tt=(0,g.Z)(nt,Mt);return(0,ie.Z)({key:Me,value:yt!==void 0?yt:Me,children:vt},Tt)}function pn(Et){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,q.Z)(Et).map(function(Me,nt){if(!x.isValidElement(Me)||!Me.type)return null;var vt=Me,yt=vt.type.isSelectOptGroup,Tt=vt.key,Jt=vt.props,mn=Jt.children,yn=(0,g.Z)(Jt,Be);return wt||!yt?Gt(Me):(0,ie.Z)((0,ie.Z)({key:"__RC_SELECT_GRP__".concat(Tt===null?nt:Tt,"__"),label:Tt},yn),{},{options:pn(mn)})}).filter(function(Me){return Me})}var En=function(wt,Me,nt,vt,yt){return x.useMemo(function(){var Tt=wt,Jt=!wt;Jt&&(Tt=pn(Me));var mn=new Map,yn=new Map,Wt=function(vn,ht,Ct){Ct&&typeof Ct=="string"&&vn.set(ht[Ct],ht)},gn=function Ln(vn){for(var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ct=0;Ct<vn.length;Ct+=1){var Zt=vn[Ct];!Zt[nt.options]||ht?(mn.set(Zt[nt.value],Zt),Wt(yn,Zt,nt.label),Wt(yn,Zt,vt),Wt(yn,Zt,yt)):Ln(Zt[nt.options],!0)}};return gn(Tt),{options:Tt,valueOptions:mn,labelOptions:yn}},[wt,Me,nt,vt,yt])},sr=En;function Xn(Et){var wt=x.useRef();wt.current=Et;var Me=x.useCallback(function(){return wt.current.apply(wt,arguments)},[]);return Me}function Wn(Et){var wt=Et.mode,Me=Et.options,nt=Et.children,vt=Et.backfill,yt=Et.allowClear,Tt=Et.placeholder,Jt=Et.getInputElement,mn=Et.showSearch,yn=Et.onSearch,Wt=Et.defaultOpen,gn=Et.autoFocus,Ln=Et.labelInValue,vn=Et.value,ht=Et.inputValue,Ct=Et.optionLabelProp,Zt=isMultiple(wt),Lt=mn!==void 0?mn:Zt||wt==="combobox",zt=Me||convertChildrenToData(nt);if(warning(wt!=="tags"||zt.every(function(Sn){return!Sn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),wt==="tags"||wt==="combobox"){var Vt=zt.some(function(Sn){return Sn.options?Sn.options.some(function(On){return typeof("value"in On?On.value:On.key)=="number"}):typeof("value"in Sn?Sn.value:Sn.key)=="number"});warning(!Vt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(wt!=="combobox"||!Ct,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(wt==="combobox"||!vt,"`backfill` only works with `combobox` mode."),warning(wt==="combobox"||!Jt,"`getInputElement` only work with `combobox` mode."),noteOnce(wt!=="combobox"||!Jt||!yt||!Tt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),yn&&!Lt&&wt!=="combobox"&&wt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Wt||gn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),vn!=null){var nn=toArray(vn);warning(!Ln||nn.every(function(Sn){return _typeof(Sn)==="object"&&("key"in Sn||"value"in Sn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Zt||Array.isArray(vn),"`value` should be array when `mode` is `multiple` or `tags`")}if(nt){var rn=null;toNodeArray(nt).some(function(Sn){if(!React.isValidElement(Sn)||!Sn.type)return!1;var On=Sn,or=On.type;if(or.isSelectOption)return!1;if(or.isSelectOptGroup){var Nn=toNodeArray(Sn.props.children).every(function(Pn){return!React.isValidElement(Pn)||!Sn.type||Pn.type.isSelectOption?!0:(rn=Pn.type,!1)});return!Nn}return rn=or,!0}),rn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(rn.displayName||rn.name||rn,"`.")),warning(ht===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Cr(Et,wt){if(Et){var Me=function nt(vt){for(var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Tt=0;Tt<vt.length;Tt++){var Jt=vt[Tt];if(Jt[wt==null?void 0:wt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!yt&&Array.isArray(Jt[wt==null?void 0:wt.options])&&nt(Jt[wt==null?void 0:wt.options],!0))break}};Me(Et)}}var Rr=null,Qn=["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"],gr=["inputValue"];function Cn(Et){return!Et||(0,J.Z)(Et)!=="object"}var tn=x.forwardRef(function(Et,wt){var Me=Et.id,nt=Et.mode,vt=Et.prefixCls,yt=vt===void 0?"rc-select":vt,Tt=Et.backfill,Jt=Et.fieldNames,mn=Et.inputValue,yn=Et.searchValue,Wt=Et.onSearch,gn=Et.autoClearSearchValue,Ln=gn===void 0?!0:gn,vn=Et.onSelect,ht=Et.onDeselect,Ct=Et.dropdownMatchSelectWidth,Zt=Ct===void 0?!0:Ct,Lt=Et.filterOption,zt=Et.filterSort,Vt=Et.optionFilterProp,nn=Et.optionLabelProp,rn=Et.options,Sn=Et.optionRender,On=Et.children,or=Et.defaultActiveFirstOption,Nn=Et.menuItemSelectedIcon,Pn=Et.virtual,Hn=Et.direction,Kn=Et.listHeight,er=Kn===void 0?200:Kn,$n=Et.listItemHeight,Zn=$n===void 0?20:$n,nr=Et.labelRender,ar=Et.value,Jn=Et.defaultValue,Yn=Et.labelInValue,qn=Et.onChange,Fn=Et.maxCount,$r=(0,g.Z)(Et,Qn),Ft=(0,ze.ZP)(Me),tr=ct(nt),ur=!!(!rn&&On),Yr=x.useMemo(function(){return Lt===void 0&&nt==="combobox"?!1:Lt},[Lt,nt]),zr=x.useMemo(function(){return _e(Jt,ur)},[JSON.stringify(Jt),ur]),li=(0,X.Z)("",{value:yn!==void 0?yn:mn,postState:function(Ur){return Ur||""}}),Qr=(0,F.Z)(li,2),Bn=Qr[0],An=Qr[1],en=sr(rn,On,zr,Vt,nn),sn=en.valueOptions,Rn=en.labelOptions,Un=en.options,rr=x.useCallback(function(br){var Ur=ae(br);return Ur.map(function(yr){var Or,ui,_i,as,ir;if(Cn(yr))Or=yr;else{var Dr;_i=yr.key,ui=yr.label,Or=(Dr=yr.value)!==null&&Dr!==void 0?Dr:_i}var ei=sn.get(Or);if(ei){var Kr;if(ui===void 0&&(ui=ei==null?void 0:ei[nn||zr.label]),_i===void 0&&(_i=(Kr=ei==null?void 0:ei.key)!==null&&Kr!==void 0?Kr:Or),as=ei==null?void 0:ei.disabled,ir=ei==null?void 0:ei.title,0)var ti}return{label:ui,value:Or,key:_i,disabled:as,title:ir}})},[zr,nn,sn]),Ar=(0,X.Z)(Jn,{value:ar}),wn=(0,F.Z)(Ar,2),cr=wn[0],Ir=wn[1],Jr=x.useMemo(function(){var br,Ur=tr&&cr===null?[]:cr,yr=rr(Ur);return nt==="combobox"&&Y((br=yr[0])===null||br===void 0?void 0:br.value)?[]:yr},[cr,rr,nt,tr]),mi=ge(Jr,sn),Li=(0,F.Z)(mi,2),Gr=Li[0],Ri=Li[1],qr=x.useMemo(function(){if(!nt&&Gr.length===1){var br=Gr[0];if(br.value===null&&(br.label===null||br.label===void 0))return[]}return Gr.map(function(Ur){var yr;return(0,ie.Z)((0,ie.Z)({},Ur),{},{label:(yr=typeof nr=="function"?nr(Ur):Ur.label)!==null&&yr!==void 0?yr:Ur.value})})},[nt,Gr,nr]),bi=x.useMemo(function(){return new Set(Gr.map(function(br){return br.value}))},[Gr]);x.useEffect(function(){if(nt==="combobox"){var br,Ur=(br=Gr[0])===null||br===void 0?void 0:br.value;An(C(Ur)?String(Ur):"")}},[Gr]);var ri=Xn(function(br,Ur){var yr=Ur!=null?Ur:br;return(0,$.Z)((0,$.Z)({},zr.value,br),zr.label,yr)}),di=x.useMemo(function(){if(nt!=="tags")return Un;var br=(0,ee.Z)(Un),Ur=function(Or){return sn.has(Or)};return(0,ee.Z)(Gr).sort(function(yr,Or){return yr.value<Or.value?-1:1}).forEach(function(yr){var Or=yr.value;Ur(Or)||br.push(ri(Or,yr.label))}),br},[ri,Un,sn,Gr,nt]),ii=Fe(di,zr,Bn,Yr,Vt),Oi=x.useMemo(function(){return nt!=="tags"||!Bn||ii.some(function(br){return br[Vt||"value"]===Bn})||ii.some(function(br){return br[zr.value]===Bn})?ii:[ri(Bn)].concat((0,ee.Z)(ii))},[ri,Vt,nt,ii,Bn,zr]),Lr=function br(Ur){var yr=(0,ee.Z)(Ur).sort(function(Or,ui){return zt(Or,ui,{searchValue:Bn})});return yr.map(function(Or){return Array.isArray(Or.options)?(0,ie.Z)((0,ie.Z)({},Or),{},{options:Or.options.length>0?br(Or.options):Or.options}):Or})},Pi=x.useMemo(function(){return zt?Lr(Oi):Oi},[Oi,zt,Bn]),Mi=x.useMemo(function(){return pe(Pi,{fieldNames:zr,childrenAsData:ur})},[Pi,zr,ur]),ki=function(Ur){var yr=rr(Ur);if(Ir(yr),qn&&(yr.length!==Gr.length||yr.some(function(_i,as){var ir;return((ir=Gr[as])===null||ir===void 0?void 0:ir.value)!==(_i==null?void 0:_i.value)}))){var Or=Yn?yr:yr.map(function(_i){return _i.value}),ui=yr.map(function(_i){return Ee(Ri(_i.value))});qn(tr?Or:Or[0],tr?ui:ui[0])}},mr=x.useState(null),zn=(0,F.Z)(mr,2),pi=zn[0],Tn=zn[1],Fi=x.useState(0),Os=(0,F.Z)(Fi,2),vs=Os[0],ss=Os[1],ls=or!==void 0?or:nt!=="combobox",Pr=x.useCallback(function(br,Ur){var yr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Or=yr.source,ui=Or===void 0?"keyboard":Or;ss(Ur),Tt&&nt==="combobox"&&br!==null&&ui==="keyboard"&&Tn(String(br))},[Tt,nt]),Gi=function(Ur,yr,Or){var ui=function(){var Es,ms=Ri(Ur);return[Yn?{label:ms==null?void 0:ms[zr.label],value:Ur,key:(Es=ms==null?void 0:ms.key)!==null&&Es!==void 0?Es:Ur}:Ur,Ee(ms)]};if(yr&&vn){var _i=ui(),as=(0,F.Z)(_i,2),ir=as[0],Dr=as[1];vn(ir,Dr)}else if(!yr&&ht&&Or!=="clear"){var ei=ui(),Kr=(0,F.Z)(ei,2),ti=Kr[0],xs=Kr[1];ht(ti,xs)}},ds=Xn(function(br,Ur){var yr,Or=tr?Ur.selected:!0;Or?yr=tr?[].concat((0,ee.Z)(Gr),[br]):[br]:yr=Gr.filter(function(ui){return ui.value!==br}),ki(yr),Gi(br,Or),nt==="combobox"?Tn(""):(!ct||Ln)&&(An(""),Tn(""))}),_s=function(Ur,yr){ki(Ur);var Or=yr.type,ui=yr.values;(Or==="remove"||Or==="clear")&&ui.forEach(function(_i){Gi(_i.value,!1,Or)})},ci=function(Ur,yr){if(An(Ur),Tn(null),yr.source==="submit"){var Or=(Ur||"").trim();if(Or){var ui=Array.from(new Set([].concat((0,ee.Z)(bi),[Or])));ki(ui),Gi(Or,!0),An("")}return}yr.source!=="blur"&&(nt==="combobox"&&ki(Ur),Wt==null||Wt(Ur))},zi=function(Ur){var yr=Ur;nt!=="tags"&&(yr=Ur.map(function(ui){var _i=Rn.get(ui);return _i==null?void 0:_i.value}).filter(function(ui){return ui!==void 0}));var Or=Array.from(new Set([].concat((0,ee.Z)(bi),(0,ee.Z)(yr))));ki(Or),Or.forEach(function(ui){Gi(ui,!0)})},ns=x.useMemo(function(){var br=Pn!==!1&&Zt!==!1;return(0,ie.Z)((0,ie.Z)({},en),{},{flattenOptions:Mi,onActiveValue:Pr,defaultActiveFirstOption:ls,onSelect:ds,menuItemSelectedIcon:Nn,rawValues:bi,fieldNames:zr,virtual:br,direction:Hn,listHeight:er,listItemHeight:Zn,childrenAsData:ur,maxCount:Fn,optionRender:Sn})},[Fn,en,Mi,Pr,ls,ds,Nn,bi,zr,Pn,Zt,Hn,er,Zn,ur,Sn]);return x.createElement(re.Provider,{value:ns},x.createElement(Ue,(0,c.Z)({},$r,{id:Ft,prefixCls:yt,ref:wt,omitDomProps:gr,mode:nt,displayValues:qr,onDisplayValuesChange:_s,direction:Hn,searchValue:Bn,onSearch:ci,autoClearSearchValue:Ln,onSearchSplit:zi,dropdownMatchSelectWidth:Zt,OptionList:bt,emptyOptions:!Mi.length,activeValue:pi,activeDescendantId:"".concat(Ft,"_list_").concat(vs)})))}),dn=tn;dn.Option=kt,dn.OptGroup=dt;var Vn=dn,vr=Vn},22711:function(un,We,m){"use strict";m.r(We),m.d(We,{ResizableTextArea:function(){return He},default:function(){return de}});var c=m(60499),ee=m(18642),$=m(85899),ie=m(77654),F=m(72190),g=m(42244),J=m(92310),X=m.n(J),o=m(36901),x=m(66003),L=m(30292),b=m(18929),S=m(59301),T=m(43749),B=m(29301),z=m(34280),j=m(16089),U=`
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;
`,A=["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"],K={},I;function M(ae){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,E=ae.getAttribute("id")||ae.getAttribute("data-reactid")||ae.getAttribute("name");if(Q&&K[E])return K[E];var C=window.getComputedStyle(ae),Y=C.getPropertyValue("box-sizing")||C.getPropertyValue("-moz-box-sizing")||C.getPropertyValue("-webkit-box-sizing"),be=parseFloat(C.getPropertyValue("padding-bottom"))+parseFloat(C.getPropertyValue("padding-top")),je=parseFloat(C.getPropertyValue("border-bottom-width"))+parseFloat(C.getPropertyValue("border-top-width")),lt=A.map(function(Ye){return"".concat(Ye,":").concat(C.getPropertyValue(Ye))}).join(";"),ke={sizingStyle:lt,paddingSize:be,borderSize:je,boxSizing:Y};return Q&&E&&(K[E]=ke),ke}function le(ae){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;I||(I=document.createElement("textarea"),I.setAttribute("tab-index","-1"),I.setAttribute("aria-hidden","true"),I.setAttribute("name","hiddenTextarea"),document.body.appendChild(I)),ae.getAttribute("wrap")?I.setAttribute("wrap",ae.getAttribute("wrap")):I.removeAttribute("wrap");var Y=M(ae,Q),be=Y.paddingSize,je=Y.borderSize,lt=Y.boxSizing,ke=Y.sizingStyle;I.setAttribute("style","".concat(ke,";").concat(U)),I.value=ae.value||ae.placeholder||"";var Ye=void 0,et=void 0,_t,Re=I.scrollHeight;if(lt==="border-box"?Re+=je:lt==="content-box"&&(Re-=be),E!==null||C!==null){I.value=" ";var At=I.scrollHeight-be;E!==null&&(Ye=At*E,lt==="border-box"&&(Ye=Ye+be+je),Re=Math.max(Ye,Re)),C!==null&&(et=At*C,lt==="border-box"&&(et=et+be+je),_t=Re>et?"":"hidden",Re=Math.min(et,Re))}var rt={height:Re,overflowY:_t,resize:"none"};return Ye&&(rt.minHeight=Ye),et&&(rt.maxHeight=et),rt}var me=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ce=0,De=1,Pe=2,Ce=S.forwardRef(function(ae,Q){var E=ae,C=E.prefixCls,Y=E.defaultValue,be=E.value,je=E.autoSize,lt=E.onResize,ke=E.className,Ye=E.style,et=E.disabled,_t=E.onChange,Re=E.onInternalAutoSize,At=(0,g.Z)(E,me),rt=(0,b.Z)(Y,{value:be,postState:function(kt){return kt!=null?kt:""}}),Nt=(0,F.Z)(rt,2),Xe=Nt[0],Ge=Nt[1],Ne=function(kt){Ge(kt.target.value),_t==null||_t(kt)},Ie=S.useRef();S.useImperativeHandle(Q,function(){return{textArea:Ie.current}});var te=S.useMemo(function(){return je&&(0,T.Z)(je)==="object"?[je.minRows,je.maxRows]:[]},[je]),$e=(0,F.Z)(te,2),Ae=$e[0],Z=$e[1],D=!!je,he=function(){try{if(document.activeElement===Ie.current){var kt=Ie.current,w=kt.selectionStart,O=kt.selectionEnd,qe=kt.scrollTop;Ie.current.setSelectionRange(w,O),Ie.current.scrollTop=qe}}catch(oe){}},_e=S.useState(Pe),pe=(0,F.Z)(_e,2),Ee=pe[0],Oe=pe[1],Ze=S.useState(),re=(0,F.Z)(Ze,2),fe=re[0],st=re[1],tt=function(){Oe(ce)};(0,z.Z)(function(){D&&tt()},[be,Ae,Z,D]),(0,z.Z)(function(){if(Ee===ce)Oe(De);else if(Ee===De){var gt=le(Ie.current,!1,Ae,Z);Oe(Pe),st(gt)}else he()},[Ee]);var ct=S.useRef(),ut=function(){j.Z.cancel(ct.current)},Ue=function(kt){Ee===Pe&&(lt==null||lt(kt),je&&(ut(),ct.current=(0,j.Z)(function(){tt()})))};S.useEffect(function(){return ut},[]);var xt=D?fe:null,dt=(0,$.Z)((0,$.Z)({},Ye),xt);return(Ee===ce||Ee===De)&&(dt.overflowY="hidden",dt.overflowX="hidden"),S.createElement(B.Z,{onResize:Ue,disabled:!(je||lt)},S.createElement("textarea",(0,c.Z)({},At,{ref:Ie,style:dt,className:X()(C,ke,(0,ee.Z)({},"".concat(C,"-disabled"),et)),disabled:et,value:Xe,onChange:Ne})))}),He=Ce,ue=["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"],W=S.forwardRef(function(ae,Q){var E,C=ae.defaultValue,Y=ae.value,be=ae.onFocus,je=ae.onBlur,lt=ae.onChange,ke=ae.allowClear,Ye=ae.maxLength,et=ae.onCompositionStart,_t=ae.onCompositionEnd,Re=ae.suffix,At=ae.prefixCls,rt=At===void 0?"rc-textarea":At,Nt=ae.showCount,Xe=ae.count,Ge=ae.className,Ne=ae.style,Ie=ae.disabled,te=ae.hidden,$e=ae.classNames,Ae=ae.styles,Z=ae.onResize,D=ae.onClear,he=ae.onPressEnter,_e=ae.readOnly,pe=ae.autoSize,Ee=ae.onKeyDown,Oe=(0,g.Z)(ae,ue),Ze=(0,b.Z)(C,{value:Y,defaultValue:C}),re=(0,F.Z)(Ze,2),fe=re[0],st=re[1],tt=fe==null?"":String(fe),ct=S.useState(!1),ut=(0,F.Z)(ct,2),Ue=ut[0],xt=ut[1],dt=S.useRef(!1),gt=S.useState(null),kt=(0,F.Z)(gt,2),w=kt[0],O=kt[1],qe=(0,S.useRef)(null),oe=(0,S.useRef)(null),xe=function(){var dn;return(dn=oe.current)===null||dn===void 0?void 0:dn.textArea},jt=function(){xe().focus()};(0,S.useImperativeHandle)(Q,function(){var tn;return{resizableTextArea:oe.current,focus:jt,blur:function(){xe().blur()},nativeElement:((tn=qe.current)===null||tn===void 0?void 0:tn.nativeElement)||xe()}}),(0,S.useEffect)(function(){xt(function(tn){return!Ie&&tn})},[Ie]);var Qe=S.useState(null),at=(0,F.Z)(Qe,2),bt=at[0],ge=at[1];S.useEffect(function(){if(bt){var tn;(tn=xe()).setSelectionRange.apply(tn,(0,ie.Z)(bt))}},[bt]);var ye=(0,x.Z)(Xe,Nt),Fe=(E=ye.max)!==null&&E!==void 0?E:Ye,ze=Number(Fe)>0,q=ye.strategy(tt),Mt=!!Fe&&q>Fe,Be=function(dn,Vn){var vr=Vn;!dt.current&&ye.exceedFormatter&&ye.max&&ye.strategy(Vn)>ye.max&&(vr=ye.exceedFormatter(Vn,{max:ye.max}),Vn!==vr&&ge([xe().selectionStart||0,xe().selectionEnd||0])),st(vr),(0,L.rJ)(dn.currentTarget,dn,lt,vr)},Gt=function(dn){dt.current=!0,et==null||et(dn)},pn=function(dn){dt.current=!1,Be(dn,dn.currentTarget.value),_t==null||_t(dn)},En=function(dn){Be(dn,dn.target.value)},sr=function(dn){dn.key==="Enter"&&he&&he(dn),Ee==null||Ee(dn)},Xn=function(dn){xt(!0),be==null||be(dn)},Wn=function(dn){xt(!1),je==null||je(dn)},Cr=function(dn){st(""),jt(),(0,L.rJ)(xe(),dn,lt)},Rr=Re,Qn;ye.show&&(ye.showFormatter?Qn=ye.showFormatter({value:tt,count:q,maxLength:Fe}):Qn="".concat(q).concat(ze?" / ".concat(Fe):""),Rr=S.createElement(S.Fragment,null,Rr,S.createElement("span",{className:X()("".concat(rt,"-data-count"),$e==null?void 0:$e.count),style:Ae==null?void 0:Ae.count},Qn)));var gr=function(dn){var Vn;Z==null||Z(dn),(Vn=xe())!==null&&Vn!==void 0&&Vn.style.height&&O(!0)},Cn=!pe&&!Nt&&!ke;return S.createElement(o.BaseInput,{ref:qe,value:tt,allowClear:ke,handleReset:Cr,suffix:Rr,prefixCls:rt,classNames:(0,$.Z)((0,$.Z)({},$e),{},{affixWrapper:X()($e==null?void 0:$e.affixWrapper,(0,ee.Z)((0,ee.Z)({},"".concat(rt,"-show-count"),Nt),"".concat(rt,"-textarea-allow-clear"),ke))}),disabled:Ie,focused:Ue,className:X()(Ge,Mt&&"".concat(rt,"-out-of-range")),style:(0,$.Z)((0,$.Z)({},Ne),w&&!Cn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Qn=="string"?Qn:void 0}},hidden:te,readOnly:_e,onClear:D},S.createElement(He,(0,c.Z)({},Oe,{autoSize:pe,maxLength:Ye,onKeyDown:sr,onChange:En,onFocus:Xn,onBlur:Wn,onCompositionStart:Gt,onCompositionEnd:pn,className:X()($e==null?void 0:$e.textarea),style:(0,$.Z)((0,$.Z)({},Ae==null?void 0:Ae.textarea),{},{resize:Ne==null?void 0:Ne.resize}),disabled:Ie,prefixCls:rt,onResize:gr,ref:oe,readOnly:_e})))}),P=W,de=P},29125:function(un,We,m){"use strict";m.d(We,{G:function(){return ie},Z:function(){return U}});var c=m(92310),ee=m.n(c),$=m(59301);function ie(A){var K=A.children,I=A.prefixCls,M=A.id,le=A.overlayInnerStyle,me=A.bodyClassName,ce=A.className,De=A.style;return $.createElement("div",{className:ee()("".concat(I,"-content"),ce),style:De},$.createElement("div",{className:ee()("".concat(I,"-inner"),me),id:M,role:"tooltip",style:le},typeof K=="function"?K():K))}var F=m(60499),g=m(85899),J=m(42244),X=m(68196),o={shiftX:64,adjustY:1},x={adjustX:1,shiftY:!0},L=[0,0],b={left:{points:["cr","cl"],overflow:x,offset:[-4,0],targetOffset:L},right:{points:["cl","cr"],overflow:x,offset:[4,0],targetOffset:L},top:{points:["bc","tc"],overflow:o,offset:[0,-4],targetOffset:L},bottom:{points:["tc","bc"],overflow:o,offset:[0,4],targetOffset:L},topLeft:{points:["bl","tl"],overflow:o,offset:[0,-4],targetOffset:L},leftTop:{points:["tr","tl"],overflow:x,offset:[-4,0],targetOffset:L},topRight:{points:["br","tr"],overflow:o,offset:[0,-4],targetOffset:L},rightTop:{points:["tl","tr"],overflow:x,offset:[4,0],targetOffset:L},bottomRight:{points:["tr","br"],overflow:o,offset:[0,4],targetOffset:L},rightBottom:{points:["bl","br"],overflow:x,offset:[4,0],targetOffset:L},bottomLeft:{points:["tl","bl"],overflow:o,offset:[0,4],targetOffset:L},leftBottom:{points:["br","bl"],overflow:x,offset:[-4,0],targetOffset:L}},S=null,T=m(80402),B=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],z=function(K,I){var M=K.overlayClassName,le=K.trigger,me=le===void 0?["hover"]:le,ce=K.mouseEnterDelay,De=ce===void 0?0:ce,Pe=K.mouseLeaveDelay,Ce=Pe===void 0?.1:Pe,He=K.overlayStyle,ue=K.prefixCls,W=ue===void 0?"rc-tooltip":ue,P=K.children,de=K.onVisibleChange,ae=K.afterVisibleChange,Q=K.transitionName,E=K.animation,C=K.motion,Y=K.placement,be=Y===void 0?"right":Y,je=K.align,lt=je===void 0?{}:je,ke=K.destroyTooltipOnHide,Ye=ke===void 0?!1:ke,et=K.defaultVisible,_t=K.getTooltipContainer,Re=K.overlayInnerStyle,At=K.arrowContent,rt=K.overlay,Nt=K.id,Xe=K.showArrow,Ge=Xe===void 0?!0:Xe,Ne=K.classNames,Ie=K.styles,te=(0,J.Z)(K,B),$e=(0,T.Z)(Nt),Ae=(0,$.useRef)(null);(0,$.useImperativeHandle)(I,function(){return Ae.current});var Z=(0,g.Z)({},te);"visible"in K&&(Z.popupVisible=K.visible);var D=function(){return $.createElement(ie,{key:"content",prefixCls:W,id:$e,bodyClassName:Ne==null?void 0:Ne.body,overlayInnerStyle:(0,g.Z)((0,g.Z)({},Re),Ie==null?void 0:Ie.body)},rt)},he=function(){var pe=$.Children.only(P),Ee=(pe==null?void 0:pe.props)||{},Oe=(0,g.Z)((0,g.Z)({},Ee),{},{"aria-describedby":rt?$e:null});return $.cloneElement(P,Oe)};return $.createElement(X.Z,(0,F.Z)({popupClassName:ee()(M,Ne==null?void 0:Ne.root),prefixCls:W,popup:D,action:me,builtinPlacements:b,popupPlacement:be,ref:Ae,popupAlign:lt,getPopupContainer:_t,onPopupVisibleChange:de,afterPopupVisibleChange:ae,popupTransitionName:Q,popupAnimation:E,popupMotion:C,defaultPopupVisible:et,autoDestroy:Ye,mouseLeaveDelay:Ce,popupStyle:(0,g.Z)((0,g.Z)({},He),Ie==null?void 0:Ie.root),mouseEnterDelay:De,arrow:Ge},Z),he())},j=(0,$.forwardRef)(z),U=j},639:function(un,We,m){"use strict";m.d(We,{Z:function(){return K}});var c=m(60499),ee=m(18642),$=m(85899),ie=m(72190),F=m(42244),g=m(59301),J=m(92310),X=m.n(J),o=m(26112),x=m(30699),L=function(M){for(var le=M.prefixCls,me=M.level,ce=M.isStart,De=M.isEnd,Pe="".concat(le,"-indent-unit"),Ce=[],He=0;He<me;He+=1)Ce.push(g.createElement("span",{key:He,className:X()(Pe,(0,ee.Z)((0,ee.Z)({},"".concat(Pe,"-start"),ce[He]),"".concat(Pe,"-end"),De[He]))}));return g.createElement("span",{"aria-hidden":"true",className:"".concat(le,"-indent")},Ce)},b=g.memo(L),S=m(65065),T=m(34061),B=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],z="open",j="close",U="---",A=function(M){var le,me,ce,De=M.eventKey,Pe=M.className,Ce=M.style,He=M.dragOver,ue=M.dragOverGapTop,W=M.dragOverGapBottom,P=M.isLeaf,de=M.isStart,ae=M.isEnd,Q=M.expanded,E=M.selected,C=M.checked,Y=M.halfChecked,be=M.loading,je=M.domRef,lt=M.active,ke=M.data,Ye=M.onMouseMove,et=M.selectable,_t=(0,F.Z)(M,B),Re=g.useContext(x.k),At=g.useContext(x.y),rt=g.useRef(null),Nt=g.useState(!1),Xe=(0,ie.Z)(Nt,2),Ge=Xe[0],Ne=Xe[1],Ie=!!(Re.disabled||M.disabled||(le=At.nodeDisabled)!==null&&le!==void 0&&le.call(At,ke)),te=g.useMemo(function(){return!Re.checkable||M.checkable===!1?!1:Re.checkable},[Re.checkable,M.checkable]),$e=function(q){Ie||Re.onNodeSelect(q,(0,T.F)(M))},Ae=function(q){Ie||!te||M.disableCheckbox||Re.onNodeCheck(q,(0,T.F)(M),!C)},Z=g.useMemo(function(){return typeof et=="boolean"?et:Re.selectable},[et,Re.selectable]),D=function(q){Re.onNodeClick(q,(0,T.F)(M)),Z?$e(q):Ae(q)},he=function(q){Re.onNodeDoubleClick(q,(0,T.F)(M))},_e=function(q){Re.onNodeMouseEnter(q,(0,T.F)(M))},pe=function(q){Re.onNodeMouseLeave(q,(0,T.F)(M))},Ee=function(q){Re.onNodeContextMenu(q,(0,T.F)(M))},Oe=g.useMemo(function(){return!!(Re.draggable&&(!Re.draggable.nodeDraggable||Re.draggable.nodeDraggable(ke)))},[Re.draggable,ke]),Ze=function(q){q.stopPropagation(),Ne(!0),Re.onNodeDragStart(q,M);try{q.dataTransfer.setData("text/plain","")}catch(Mt){}},re=function(q){q.preventDefault(),q.stopPropagation(),Re.onNodeDragEnter(q,M)},fe=function(q){q.preventDefault(),q.stopPropagation(),Re.onNodeDragOver(q,M)},st=function(q){q.stopPropagation(),Re.onNodeDragLeave(q,M)},tt=function(q){q.stopPropagation(),Ne(!1),Re.onNodeDragEnd(q,M)},ct=function(q){q.preventDefault(),q.stopPropagation(),Ne(!1),Re.onNodeDrop(q,M)},ut=function(q){be||Re.onNodeExpand(q,(0,T.F)(M))},Ue=g.useMemo(function(){var ze=(0,S.Z)(Re.keyEntities,De)||{},q=ze.children;return!!(q||[]).length},[Re.keyEntities,De]),xt=g.useMemo(function(){return P===!1?!1:P||!Re.loadData&&!Ue||Re.loadData&&M.loaded&&!Ue},[P,Re.loadData,Ue,M.loaded]);g.useEffect(function(){be||typeof Re.loadData=="function"&&Q&&!xt&&!M.loaded&&Re.onNodeLoad((0,T.F)(M))},[be,Re.loadData,Re.onNodeLoad,Q,xt,M]);var dt=g.useMemo(function(){var ze;return(ze=Re.draggable)!==null&&ze!==void 0&&ze.icon?g.createElement("span",{className:"".concat(Re.prefixCls,"-draggable-icon")},Re.draggable.icon):null},[Re.draggable]),gt=function(q){var Mt=M.switcherIcon||Re.switcherIcon;return typeof Mt=="function"?Mt((0,$.Z)((0,$.Z)({},M),{},{isLeaf:q})):Mt},kt=function(){if(xt){var q=gt(!0);return q!==!1?g.createElement("span",{className:X()("".concat(Re.prefixCls,"-switcher"),"".concat(Re.prefixCls,"-switcher-noop"))},q):null}var Mt=gt(!1);return Mt!==!1?g.createElement("span",{onClick:ut,className:X()("".concat(Re.prefixCls,"-switcher"),"".concat(Re.prefixCls,"-switcher_").concat(Q?z:j))},Mt):null},w=g.useMemo(function(){if(!te)return null;var ze=typeof te!="boolean"?te:null;return g.createElement("span",{className:X()("".concat(Re.prefixCls,"-checkbox"),(0,ee.Z)((0,ee.Z)((0,ee.Z)({},"".concat(Re.prefixCls,"-checkbox-checked"),C),"".concat(Re.prefixCls,"-checkbox-indeterminate"),!C&&Y),"".concat(Re.prefixCls,"-checkbox-disabled"),Ie||M.disableCheckbox)),onClick:Ae,role:"checkbox","aria-checked":Y?"mixed":C,"aria-disabled":Ie||M.disableCheckbox,"aria-label":"Select ".concat(typeof M.title=="string"?M.title:"tree node")},ze)},[te,C,Y,Ie,M.disableCheckbox,M.title]),O=g.useMemo(function(){return xt?null:Q?z:j},[xt,Q]),qe=g.useMemo(function(){return g.createElement("span",{className:X()("".concat(Re.prefixCls,"-iconEle"),"".concat(Re.prefixCls,"-icon__").concat(O||"docu"),(0,ee.Z)({},"".concat(Re.prefixCls,"-icon_loading"),be))})},[Re.prefixCls,O,be]),oe=g.useMemo(function(){var ze=!!Re.draggable,q=!M.disabled&&ze&&Re.dragOverNodeKey===De;return q?Re.dropIndicatorRender({dropPosition:Re.dropPosition,dropLevelOffset:Re.dropLevelOffset,indent:Re.indent,prefixCls:Re.prefixCls,direction:Re.direction}):null},[Re.dropPosition,Re.dropLevelOffset,Re.indent,Re.prefixCls,Re.direction,Re.draggable,Re.dragOverNodeKey,Re.dropIndicatorRender]),xe=g.useMemo(function(){var ze=M.title,q=ze===void 0?U:ze,Mt="".concat(Re.prefixCls,"-node-content-wrapper"),Be;if(Re.showIcon){var Gt=M.icon||Re.icon;Be=Gt?g.createElement("span",{className:X()("".concat(Re.prefixCls,"-iconEle"),"".concat(Re.prefixCls,"-icon__customize"))},typeof Gt=="function"?Gt(M):Gt):qe}else Re.loadData&&be&&(Be=qe);var pn;return typeof q=="function"?pn=q(ke):Re.titleRender?pn=Re.titleRender(ke):pn=q,g.createElement("span",{ref:rt,title:typeof q=="string"?q:"",className:X()(Mt,"".concat(Mt,"-").concat(O||"normal"),(0,ee.Z)({},"".concat(Re.prefixCls,"-node-selected"),!Ie&&(E||Ge))),onMouseEnter:_e,onMouseLeave:pe,onContextMenu:Ee,onClick:D,onDoubleClick:he},Be,g.createElement("span",{className:"".concat(Re.prefixCls,"-title")},pn),oe)},[Re.prefixCls,Re.showIcon,M,Re.icon,qe,Re.titleRender,ke,O,_e,pe,Ee,D,he]),jt=(0,o.Z)(_t,{aria:!0,data:!0}),Qe=(0,S.Z)(Re.keyEntities,De)||{},at=Qe.level,bt=ae[ae.length-1],ge=!Ie&&Oe,ye=Re.draggingNodeKey===De,Fe=et!==void 0?{"aria-selected":!!et}:void 0;return g.createElement("div",(0,c.Z)({ref:je,role:"treeitem","aria-expanded":P?void 0:Q,className:X()(Pe,"".concat(Re.prefixCls,"-treenode"),(ce={},(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)(ce,"".concat(Re.prefixCls,"-treenode-disabled"),Ie),"".concat(Re.prefixCls,"-treenode-switcher-").concat(Q?"open":"close"),!P),"".concat(Re.prefixCls,"-treenode-checkbox-checked"),C),"".concat(Re.prefixCls,"-treenode-checkbox-indeterminate"),Y),"".concat(Re.prefixCls,"-treenode-selected"),E),"".concat(Re.prefixCls,"-treenode-loading"),be),"".concat(Re.prefixCls,"-treenode-active"),lt),"".concat(Re.prefixCls,"-treenode-leaf-last"),bt),"".concat(Re.prefixCls,"-treenode-draggable"),Oe),"dragging",ye),(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)(ce,"drop-target",Re.dropTargetKey===De),"drop-container",Re.dropContainerKey===De),"drag-over",!Ie&&He),"drag-over-gap-top",!Ie&&ue),"drag-over-gap-bottom",!Ie&&W),"filter-node",(me=Re.filterTreeNode)===null||me===void 0?void 0:me.call(Re,(0,T.F)(M))),"".concat(Re.prefixCls,"-treenode-leaf"),xt))),style:Ce,draggable:ge,onDragStart:ge?Ze:void 0,onDragEnter:Oe?re:void 0,onDragOver:Oe?fe:void 0,onDragLeave:Oe?st:void 0,onDrop:Oe?ct:void 0,onDragEnd:Oe?tt:void 0,onMouseMove:Ye},Fe,jt),g.createElement(b,{prefixCls:Re.prefixCls,level:at,isStart:de,isEnd:ae}),dt,kt(),w,xe)};A.isTreeNode=1;var K=A},30699:function(un,We,m){"use strict";m.d(We,{k:function(){return ee},y:function(){return $}});var c=m(59301),ee=c.createContext(null),$=c.createContext({})},87632:function(un,We,m){"use strict";m.d(We,{OF:function(){return De.Z},y6:function(){return j.y},ZP:function(){return Ie}});var c=m(60499),ee=m(43749),$=m(85899),ie=m(77654),F=m(38705),g=m(17212),J=m(15793),X=m(39153),o=m(55401),x=m(18642),L=m(92310),b=m.n(L),S=m(10228),T=m(26112),B=m(48736),z=m(59301),j=m(30699),U=function($e){var Ae=$e.dropPosition,Z=$e.dropLevelOffset,D=$e.indent,he={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ae){case-1:he.top=0,he.left=-Z*D;break;case 1:he.bottom=0,he.left=-Z*D;break;case 0:he.bottom=0,he.left=D;break}return z.createElement("div",{style:he})},A=U;function K(te){if(te==null)throw new TypeError("Cannot destructure "+te)}var I=m(72190),M=m(42244),le=m(34280),me=m(48911),ce=m(77900),De=m(639);function Pe(te,$e){var Ae=z.useState(!1),Z=(0,I.Z)(Ae,2),D=Z[0],he=Z[1];(0,le.Z)(function(){if(D)return te(),function(){$e()}},[D]),(0,le.Z)(function(){return he(!0),function(){he(!1)}},[])}var Ce=Pe,He=m(34061),ue=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],W=z.forwardRef(function(te,$e){var Ae=te.className,Z=te.style,D=te.motion,he=te.motionNodes,_e=te.motionType,pe=te.onMotionStart,Ee=te.onMotionEnd,Oe=te.active,Ze=te.treeNodeRequiredProps,re=(0,M.Z)(te,ue),fe=z.useState(!0),st=(0,I.Z)(fe,2),tt=st[0],ct=st[1],ut=z.useContext(j.k),Ue=ut.prefixCls,xt=he&&_e!=="hide";(0,le.Z)(function(){he&&xt!==tt&&ct(xt)},[he]);var dt=function(){he&&pe()},gt=z.useRef(!1),kt=function(){he&&!gt.current&&(gt.current=!0,Ee())};Ce(dt,kt);var w=function(qe){xt===qe&&kt()};return he?z.createElement(ce.default,(0,c.Z)({ref:$e,visible:tt},D,{motionAppear:_e==="show",onVisibleChanged:w}),function(O,qe){var oe=O.className,xe=O.style;return z.createElement("div",{ref:qe,className:b()("".concat(Ue,"-treenode-motion"),oe),style:xe},he.map(function(jt){var Qe=Object.assign({},(K(jt.data),jt.data)),at=jt.title,bt=jt.key,ge=jt.isStart,ye=jt.isEnd;delete Qe.children;var Fe=(0,He.H8)(bt,Ze);return z.createElement(De.Z,(0,c.Z)({},Qe,Fe,{title:at,active:Oe,data:jt.data,key:bt,isStart:ge,isEnd:ye}))}))}):z.createElement(De.Z,(0,c.Z)({domRef:$e,className:Ae,style:Z},re,{active:Oe}))}),P=W;function de(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],$e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ae=te.length,Z=$e.length;if(Math.abs(Ae-Z)!==1)return{add:!1,key:null};function D(he,_e){var pe=new Map;he.forEach(function(Oe){pe.set(Oe,!0)});var Ee=_e.filter(function(Oe){return!pe.has(Oe)});return Ee.length===1?Ee[0]:null}return Ae<Z?{add:!0,key:D(te,$e)}:{add:!1,key:D($e,te)}}function ae(te,$e,Ae){var Z=te.findIndex(function(pe){return pe.key===Ae}),D=te[Z+1],he=$e.findIndex(function(pe){return pe.key===Ae});if(D){var _e=$e.findIndex(function(pe){return pe.key===D.key});return $e.slice(he+1,_e)}return $e.slice(he+1)}var Q=["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"],E={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},C=function(){},Y="RC_TREE_MOTION_".concat(Math.random()),be={key:Y},je={key:Y,level:0,index:0,pos:"0",node:be,nodes:[be]},lt={parent:null,children:[],pos:je.pos,data:be,title:null,key:Y,isStart:[],isEnd:[]};function ke(te,$e,Ae,Z){return $e===!1||!Ae?te:te.slice(0,Math.ceil(Ae/Z)+1)}function Ye(te){var $e=te.key,Ae=te.pos;return(0,He.km)($e,Ae)}function et(te){for(var $e=String(te.data.key),Ae=te;Ae.parent;)Ae=Ae.parent,$e="".concat(Ae.data.key," > ").concat($e);return $e}var _t=z.forwardRef(function(te,$e){var Ae=te.prefixCls,Z=te.data,D=te.selectable,he=te.checkable,_e=te.expandedKeys,pe=te.selectedKeys,Ee=te.checkedKeys,Oe=te.loadedKeys,Ze=te.loadingKeys,re=te.halfCheckedKeys,fe=te.keyEntities,st=te.disabled,tt=te.dragging,ct=te.dragOverNodeKey,ut=te.dropPosition,Ue=te.motion,xt=te.height,dt=te.itemHeight,gt=te.virtual,kt=te.scrollWidth,w=te.focusable,O=te.activeItem,qe=te.focused,oe=te.tabIndex,xe=te.onKeyDown,jt=te.onFocus,Qe=te.onBlur,at=te.onActiveChange,bt=te.onListChangeStart,ge=te.onListChangeEnd,ye=(0,M.Z)(te,Q),Fe=z.useRef(null),ze=z.useRef(null);z.useImperativeHandle($e,function(){return{scrollTo:function(Jt){Fe.current.scrollTo(Jt)},getIndentWidth:function(){return ze.current.offsetWidth}}});var q=z.useState(_e),Mt=(0,I.Z)(q,2),Be=Mt[0],Gt=Mt[1],pn=z.useState(Z),En=(0,I.Z)(pn,2),sr=En[0],Xn=En[1],Wn=z.useState(Z),Cr=(0,I.Z)(Wn,2),Rr=Cr[0],Qn=Cr[1],gr=z.useState([]),Cn=(0,I.Z)(gr,2),tn=Cn[0],dn=Cn[1],Vn=z.useState(null),vr=(0,I.Z)(Vn,2),Et=vr[0],wt=vr[1],Me=z.useRef(Z);Me.current=Z;function nt(){var Tt=Me.current;Xn(Tt),Qn(Tt),dn([]),wt(null),ge()}(0,le.Z)(function(){Gt(_e);var Tt=de(Be,_e);if(Tt.key!==null)if(Tt.add){var Jt=sr.findIndex(function(vn){var ht=vn.key;return ht===Tt.key}),mn=ke(ae(sr,Z,Tt.key),gt,xt,dt),yn=sr.slice();yn.splice(Jt+1,0,lt),Qn(yn),dn(mn),wt("show")}else{var Wt=Z.findIndex(function(vn){var ht=vn.key;return ht===Tt.key}),gn=ke(ae(Z,sr,Tt.key),gt,xt,dt),Ln=Z.slice();Ln.splice(Wt+1,0,lt),Qn(Ln),dn(gn),wt("hide")}else sr!==Z&&(Xn(Z),Qn(Z))},[_e,Z]),z.useEffect(function(){tt||nt()},[tt]);var vt=Ue?Rr:Z,yt={expandedKeys:_e,selectedKeys:pe,loadedKeys:Oe,loadingKeys:Ze,checkedKeys:Ee,halfCheckedKeys:re,dragOverNodeKey:ct,dropPosition:ut,keyEntities:fe};return z.createElement(z.Fragment,null,qe&&O&&z.createElement("span",{style:E,"aria-live":"assertive"},et(O)),z.createElement("div",null,z.createElement("input",{style:E,disabled:w===!1||st,tabIndex:w!==!1?oe:null,onKeyDown:xe,onFocus:jt,onBlur:Qe,value:"",onChange:C,"aria-label":"for screen reader"})),z.createElement("div",{className:"".concat(Ae,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},z.createElement("div",{className:"".concat(Ae,"-indent")},z.createElement("div",{ref:ze,className:"".concat(Ae,"-indent-unit")}))),z.createElement(me.Z,(0,c.Z)({},ye,{data:vt,itemKey:Ye,height:xt,fullHeight:!1,virtual:gt,itemHeight:dt,scrollWidth:kt,prefixCls:"".concat(Ae,"-list"),ref:Fe,role:"tree",onVisibleChange:function(Jt){Jt.every(function(mn){return Ye(mn)!==Y})&&nt()}}),function(Tt){var Jt=Tt.pos,mn=Object.assign({},(K(Tt.data),Tt.data)),yn=Tt.title,Wt=Tt.key,gn=Tt.isStart,Ln=Tt.isEnd,vn=(0,He.km)(Wt,Jt);delete mn.key,delete mn.children;var ht=(0,He.H8)(vn,yt);return z.createElement(P,(0,c.Z)({},mn,ht,{title:yn,active:!!O&&Wt===O.key,pos:Jt,data:Tt.data,isStart:gn,isEnd:Ln,motion:Ue,motionNodes:Wt===Y?tn:null,motionType:Et,onMotionStart:bt,onMotionEnd:nt,treeNodeRequiredProps:yt,onMouseMove:function(){at(null)}}))}))}),Re=_t,At=m(82661),rt=m(34643),Nt=m(65065),Xe=10,Ge=function(te){(0,X.Z)(Ae,te);var $e=(0,o.Z)(Ae);function Ae(){var Z;(0,F.Z)(this,Ae);for(var D=arguments.length,he=new Array(D),_e=0;_e<D;_e++)he[_e]=arguments[_e];return Z=$e.call.apply($e,[this].concat(he)),(0,x.Z)((0,J.Z)(Z),"destroyed",!1),(0,x.Z)((0,J.Z)(Z),"delayedDragEnterLogic",void 0),(0,x.Z)((0,J.Z)(Z),"loadingRetryTimes",{}),(0,x.Z)((0,J.Z)(Z),"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,He.w$)()}),(0,x.Z)((0,J.Z)(Z),"dragStartMousePosition",null),(0,x.Z)((0,J.Z)(Z),"dragNodeProps",null),(0,x.Z)((0,J.Z)(Z),"currentMouseOverDroppableNodeKey",null),(0,x.Z)((0,J.Z)(Z),"listRef",z.createRef()),(0,x.Z)((0,J.Z)(Z),"onNodeDragStart",function(pe,Ee){var Oe=Z.state,Ze=Oe.expandedKeys,re=Oe.keyEntities,fe=Z.props.onDragStart,st=Ee.eventKey;Z.dragNodeProps=Ee,Z.dragStartMousePosition={x:pe.clientX,y:pe.clientY};var tt=(0,At._5)(Ze,st);Z.setState({draggingNodeKey:st,dragChildrenKeys:(0,At.wA)(st,re),indent:Z.listRef.current.getIndentWidth()}),Z.setExpandedKeys(tt),window.addEventListener("dragend",Z.onWindowDragEnd),fe==null||fe({event:pe,node:(0,He.F)(Ee)})}),(0,x.Z)((0,J.Z)(Z),"onNodeDragEnter",function(pe,Ee){var Oe=Z.state,Ze=Oe.expandedKeys,re=Oe.keyEntities,fe=Oe.dragChildrenKeys,st=Oe.flattenNodes,tt=Oe.indent,ct=Z.props,ut=ct.onDragEnter,Ue=ct.onExpand,xt=ct.allowDrop,dt=ct.direction,gt=Ee.pos,kt=Ee.eventKey;if(Z.currentMouseOverDroppableNodeKey!==kt&&(Z.currentMouseOverDroppableNodeKey=kt),!Z.dragNodeProps){Z.resetDragState();return}var w=(0,At.OM)(pe,Z.dragNodeProps,Ee,tt,Z.dragStartMousePosition,xt,st,re,Ze,dt),O=w.dropPosition,qe=w.dropLevelOffset,oe=w.dropTargetKey,xe=w.dropContainerKey,jt=w.dropTargetPos,Qe=w.dropAllowed,at=w.dragOverNodeKey;if(fe.includes(oe)||!Qe){Z.resetDragState();return}if(Z.delayedDragEnterLogic||(Z.delayedDragEnterLogic={}),Object.keys(Z.delayedDragEnterLogic).forEach(function(bt){clearTimeout(Z.delayedDragEnterLogic[bt])}),Z.dragNodeProps.eventKey!==Ee.eventKey&&(pe.persist(),Z.delayedDragEnterLogic[gt]=window.setTimeout(function(){if(Z.state.draggingNodeKey!==null){var bt=(0,ie.Z)(Ze),ge=(0,Nt.Z)(re,Ee.eventKey);ge&&(ge.children||[]).length&&(bt=(0,At.L0)(Ze,Ee.eventKey)),Z.props.hasOwnProperty("expandedKeys")||Z.setExpandedKeys(bt),Ue==null||Ue(bt,{node:(0,He.F)(Ee),expanded:!0,nativeEvent:pe.nativeEvent})}},800)),Z.dragNodeProps.eventKey===oe&&qe===0){Z.resetDragState();return}Z.setState({dragOverNodeKey:at,dropPosition:O,dropLevelOffset:qe,dropTargetKey:oe,dropContainerKey:xe,dropTargetPos:jt,dropAllowed:Qe}),ut==null||ut({event:pe,node:(0,He.F)(Ee),expandedKeys:Ze})}),(0,x.Z)((0,J.Z)(Z),"onNodeDragOver",function(pe,Ee){var Oe=Z.state,Ze=Oe.dragChildrenKeys,re=Oe.flattenNodes,fe=Oe.keyEntities,st=Oe.expandedKeys,tt=Oe.indent,ct=Z.props,ut=ct.onDragOver,Ue=ct.allowDrop,xt=ct.direction;if(Z.dragNodeProps){var dt=(0,At.OM)(pe,Z.dragNodeProps,Ee,tt,Z.dragStartMousePosition,Ue,re,fe,st,xt),gt=dt.dropPosition,kt=dt.dropLevelOffset,w=dt.dropTargetKey,O=dt.dropContainerKey,qe=dt.dropTargetPos,oe=dt.dropAllowed,xe=dt.dragOverNodeKey;Ze.includes(w)||!oe||(Z.dragNodeProps.eventKey===w&&kt===0?Z.state.dropPosition===null&&Z.state.dropLevelOffset===null&&Z.state.dropTargetKey===null&&Z.state.dropContainerKey===null&&Z.state.dropTargetPos===null&&Z.state.dropAllowed===!1&&Z.state.dragOverNodeKey===null||Z.resetDragState():gt===Z.state.dropPosition&&kt===Z.state.dropLevelOffset&&w===Z.state.dropTargetKey&&O===Z.state.dropContainerKey&&qe===Z.state.dropTargetPos&&oe===Z.state.dropAllowed&&xe===Z.state.dragOverNodeKey||Z.setState({dropPosition:gt,dropLevelOffset:kt,dropTargetKey:w,dropContainerKey:O,dropTargetPos:qe,dropAllowed:oe,dragOverNodeKey:xe}),ut==null||ut({event:pe,node:(0,He.F)(Ee)}))}}),(0,x.Z)((0,J.Z)(Z),"onNodeDragLeave",function(pe,Ee){Z.currentMouseOverDroppableNodeKey===Ee.eventKey&&!pe.currentTarget.contains(pe.relatedTarget)&&(Z.resetDragState(),Z.currentMouseOverDroppableNodeKey=null);var Oe=Z.props.onDragLeave;Oe==null||Oe({event:pe,node:(0,He.F)(Ee)})}),(0,x.Z)((0,J.Z)(Z),"onWindowDragEnd",function(pe){Z.onNodeDragEnd(pe,null,!0),window.removeEventListener("dragend",Z.onWindowDragEnd)}),(0,x.Z)((0,J.Z)(Z),"onNodeDragEnd",function(pe,Ee){var Oe=Z.props.onDragEnd;Z.setState({dragOverNodeKey:null}),Z.cleanDragState(),Oe==null||Oe({event:pe,node:(0,He.F)(Ee)}),Z.dragNodeProps=null,window.removeEventListener("dragend",Z.onWindowDragEnd)}),(0,x.Z)((0,J.Z)(Z),"onNodeDrop",function(pe,Ee){var Oe,Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,re=Z.state,fe=re.dragChildrenKeys,st=re.dropPosition,tt=re.dropTargetKey,ct=re.dropTargetPos,ut=re.dropAllowed;if(ut){var Ue=Z.props.onDrop;if(Z.setState({dragOverNodeKey:null}),Z.cleanDragState(),tt!==null){var xt=(0,$.Z)((0,$.Z)({},(0,He.H8)(tt,Z.getTreeNodeRequiredProps())),{},{active:((Oe=Z.getActiveItem())===null||Oe===void 0?void 0:Oe.key)===tt,data:(0,Nt.Z)(Z.state.keyEntities,tt).node}),dt=fe.includes(tt);(0,B.ZP)(!dt,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var gt=(0,At.yx)(ct),kt={event:pe,node:(0,He.F)(xt),dragNode:Z.dragNodeProps?(0,He.F)(Z.dragNodeProps):null,dragNodesKeys:[Z.dragNodeProps.eventKey].concat(fe),dropToGap:st!==0,dropPosition:st+Number(gt[gt.length-1])};Ze||Ue==null||Ue(kt),Z.dragNodeProps=null}}}),(0,x.Z)((0,J.Z)(Z),"cleanDragState",function(){var pe=Z.state.draggingNodeKey;pe!==null&&Z.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Z.dragStartMousePosition=null,Z.currentMouseOverDroppableNodeKey=null}),(0,x.Z)((0,J.Z)(Z),"triggerExpandActionExpand",function(pe,Ee){var Oe=Z.state,Ze=Oe.expandedKeys,re=Oe.flattenNodes,fe=Ee.expanded,st=Ee.key,tt=Ee.isLeaf;if(!(tt||pe.shiftKey||pe.metaKey||pe.ctrlKey)){var ct=re.filter(function(Ue){return Ue.key===st})[0],ut=(0,He.F)((0,$.Z)((0,$.Z)({},(0,He.H8)(st,Z.getTreeNodeRequiredProps())),{},{data:ct.data}));Z.setExpandedKeys(fe?(0,At._5)(Ze,st):(0,At.L0)(Ze,st)),Z.onNodeExpand(pe,ut)}}),(0,x.Z)((0,J.Z)(Z),"onNodeClick",function(pe,Ee){var Oe=Z.props,Ze=Oe.onClick,re=Oe.expandAction;re==="click"&&Z.triggerExpandActionExpand(pe,Ee),Ze==null||Ze(pe,Ee)}),(0,x.Z)((0,J.Z)(Z),"onNodeDoubleClick",function(pe,Ee){var Oe=Z.props,Ze=Oe.onDoubleClick,re=Oe.expandAction;re==="doubleClick"&&Z.triggerExpandActionExpand(pe,Ee),Ze==null||Ze(pe,Ee)}),(0,x.Z)((0,J.Z)(Z),"onNodeSelect",function(pe,Ee){var Oe=Z.state.selectedKeys,Ze=Z.state,re=Ze.keyEntities,fe=Ze.fieldNames,st=Z.props,tt=st.onSelect,ct=st.multiple,ut=Ee.selected,Ue=Ee[fe.key],xt=!ut;xt?ct?Oe=(0,At.L0)(Oe,Ue):Oe=[Ue]:Oe=(0,At._5)(Oe,Ue);var dt=Oe.map(function(gt){var kt=(0,Nt.Z)(re,gt);return kt?kt.node:null}).filter(Boolean);Z.setUncontrolledState({selectedKeys:Oe}),tt==null||tt(Oe,{event:"select",selected:xt,node:Ee,selectedNodes:dt,nativeEvent:pe.nativeEvent})}),(0,x.Z)((0,J.Z)(Z),"onNodeCheck",function(pe,Ee,Oe){var Ze=Z.state,re=Ze.keyEntities,fe=Ze.checkedKeys,st=Ze.halfCheckedKeys,tt=Z.props,ct=tt.checkStrictly,ut=tt.onCheck,Ue=Ee.key,xt,dt={event:"check",node:Ee,checked:Oe,nativeEvent:pe.nativeEvent};if(ct){var gt=Oe?(0,At.L0)(fe,Ue):(0,At._5)(fe,Ue),kt=(0,At._5)(st,Ue);xt={checked:gt,halfChecked:kt},dt.checkedNodes=gt.map(function(jt){return(0,Nt.Z)(re,jt)}).filter(Boolean).map(function(jt){return jt.node}),Z.setUncontrolledState({checkedKeys:gt})}else{var w=(0,rt.S)([].concat((0,ie.Z)(fe),[Ue]),!0,re),O=w.checkedKeys,qe=w.halfCheckedKeys;if(!Oe){var oe=new Set(O);oe.delete(Ue);var xe=(0,rt.S)(Array.from(oe),{checked:!1,halfCheckedKeys:qe},re);O=xe.checkedKeys,qe=xe.halfCheckedKeys}xt=O,dt.checkedNodes=[],dt.checkedNodesPositions=[],dt.halfCheckedKeys=qe,O.forEach(function(jt){var Qe=(0,Nt.Z)(re,jt);if(Qe){var at=Qe.node,bt=Qe.pos;dt.checkedNodes.push(at),dt.checkedNodesPositions.push({node:at,pos:bt})}}),Z.setUncontrolledState({checkedKeys:O},!1,{halfCheckedKeys:qe})}ut==null||ut(xt,dt)}),(0,x.Z)((0,J.Z)(Z),"onNodeLoad",function(pe){var Ee,Oe=pe.key,Ze=Z.state.keyEntities,re=(0,Nt.Z)(Ze,Oe);if(!(re!=null&&(Ee=re.children)!==null&&Ee!==void 0&&Ee.length)){var fe=new Promise(function(st,tt){Z.setState(function(ct){var ut=ct.loadedKeys,Ue=ut===void 0?[]:ut,xt=ct.loadingKeys,dt=xt===void 0?[]:xt,gt=Z.props,kt=gt.loadData,w=gt.onLoad;if(!kt||Ue.includes(Oe)||dt.includes(Oe))return null;var O=kt(pe);return O.then(function(){var qe=Z.state.loadedKeys,oe=(0,At.L0)(qe,Oe);w==null||w(oe,{event:"load",node:pe}),Z.setUncontrolledState({loadedKeys:oe}),Z.setState(function(xe){return{loadingKeys:(0,At._5)(xe.loadingKeys,Oe)}}),st()}).catch(function(qe){if(Z.setState(function(xe){return{loadingKeys:(0,At._5)(xe.loadingKeys,Oe)}}),Z.loadingRetryTimes[Oe]=(Z.loadingRetryTimes[Oe]||0)+1,Z.loadingRetryTimes[Oe]>=Xe){var oe=Z.state.loadedKeys;(0,B.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Z.setUncontrolledState({loadedKeys:(0,At.L0)(oe,Oe)}),st()}tt(qe)}),{loadingKeys:(0,At.L0)(dt,Oe)}})});return fe.catch(function(){}),fe}}),(0,x.Z)((0,J.Z)(Z),"onNodeMouseEnter",function(pe,Ee){var Oe=Z.props.onMouseEnter;Oe==null||Oe({event:pe,node:Ee})}),(0,x.Z)((0,J.Z)(Z),"onNodeMouseLeave",function(pe,Ee){var Oe=Z.props.onMouseLeave;Oe==null||Oe({event:pe,node:Ee})}),(0,x.Z)((0,J.Z)(Z),"onNodeContextMenu",function(pe,Ee){var Oe=Z.props.onRightClick;Oe&&(pe.preventDefault(),Oe({event:pe,node:Ee}))}),(0,x.Z)((0,J.Z)(Z),"onFocus",function(){var pe=Z.props.onFocus;Z.setState({focused:!0});for(var Ee=arguments.length,Oe=new Array(Ee),Ze=0;Ze<Ee;Ze++)Oe[Ze]=arguments[Ze];pe==null||pe.apply(void 0,Oe)}),(0,x.Z)((0,J.Z)(Z),"onBlur",function(){var pe=Z.props.onBlur;Z.setState({focused:!1}),Z.onActiveChange(null);for(var Ee=arguments.length,Oe=new Array(Ee),Ze=0;Ze<Ee;Ze++)Oe[Ze]=arguments[Ze];pe==null||pe.apply(void 0,Oe)}),(0,x.Z)((0,J.Z)(Z),"getTreeNodeRequiredProps",function(){var pe=Z.state,Ee=pe.expandedKeys,Oe=pe.selectedKeys,Ze=pe.loadedKeys,re=pe.loadingKeys,fe=pe.checkedKeys,st=pe.halfCheckedKeys,tt=pe.dragOverNodeKey,ct=pe.dropPosition,ut=pe.keyEntities;return{expandedKeys:Ee||[],selectedKeys:Oe||[],loadedKeys:Ze||[],loadingKeys:re||[],checkedKeys:fe||[],halfCheckedKeys:st||[],dragOverNodeKey:tt,dropPosition:ct,keyEntities:ut}}),(0,x.Z)((0,J.Z)(Z),"setExpandedKeys",function(pe){var Ee=Z.state,Oe=Ee.treeData,Ze=Ee.fieldNames,re=(0,He.oH)(Oe,pe,Ze);Z.setUncontrolledState({expandedKeys:pe,flattenNodes:re},!0)}),(0,x.Z)((0,J.Z)(Z),"onNodeExpand",function(pe,Ee){var Oe=Z.state.expandedKeys,Ze=Z.state,re=Ze.listChanging,fe=Ze.fieldNames,st=Z.props,tt=st.onExpand,ct=st.loadData,ut=Ee.expanded,Ue=Ee[fe.key];if(!re){var xt=Oe.includes(Ue),dt=!ut;if((0,B.ZP)(ut&&xt||!ut&&!xt,"Expand state not sync with index check"),Oe=dt?(0,At.L0)(Oe,Ue):(0,At._5)(Oe,Ue),Z.setExpandedKeys(Oe),tt==null||tt(Oe,{node:Ee,expanded:dt,nativeEvent:pe.nativeEvent}),dt&&ct){var gt=Z.onNodeLoad(Ee);gt&&gt.then(function(){var kt=(0,He.oH)(Z.state.treeData,Oe,fe);Z.setUncontrolledState({flattenNodes:kt})}).catch(function(){var kt=Z.state.expandedKeys,w=(0,At._5)(kt,Ue);Z.setExpandedKeys(w)})}}}),(0,x.Z)((0,J.Z)(Z),"onListChangeStart",function(){Z.setUncontrolledState({listChanging:!0})}),(0,x.Z)((0,J.Z)(Z),"onListChangeEnd",function(){setTimeout(function(){Z.setUncontrolledState({listChanging:!1})})}),(0,x.Z)((0,J.Z)(Z),"onActiveChange",function(pe){var Ee=Z.state.activeKey,Oe=Z.props,Ze=Oe.onActiveChange,re=Oe.itemScrollOffset,fe=re===void 0?0:re;Ee!==pe&&(Z.setState({activeKey:pe}),pe!==null&&Z.scrollTo({key:pe,offset:fe}),Ze==null||Ze(pe))}),(0,x.Z)((0,J.Z)(Z),"getActiveItem",function(){var pe=Z.state,Ee=pe.activeKey,Oe=pe.flattenNodes;return Ee===null?null:Oe.find(function(Ze){var re=Ze.key;return re===Ee})||null}),(0,x.Z)((0,J.Z)(Z),"offsetActiveKey",function(pe){var Ee=Z.state,Oe=Ee.flattenNodes,Ze=Ee.activeKey,re=Oe.findIndex(function(tt){var ct=tt.key;return ct===Ze});re===-1&&pe<0&&(re=Oe.length),re=(re+pe+Oe.length)%Oe.length;var fe=Oe[re];if(fe){var st=fe.key;Z.onActiveChange(st)}else Z.onActiveChange(null)}),(0,x.Z)((0,J.Z)(Z),"onKeyDown",function(pe){var Ee=Z.state,Oe=Ee.activeKey,Ze=Ee.expandedKeys,re=Ee.checkedKeys,fe=Ee.fieldNames,st=Z.props,tt=st.onKeyDown,ct=st.checkable,ut=st.selectable;switch(pe.which){case S.Z.UP:{Z.offsetActiveKey(-1),pe.preventDefault();break}case S.Z.DOWN:{Z.offsetActiveKey(1),pe.preventDefault();break}}var Ue=Z.getActiveItem();if(Ue&&Ue.data){var xt=Z.getTreeNodeRequiredProps(),dt=Ue.data.isLeaf===!1||!!(Ue.data[fe.children]||[]).length,gt=(0,He.F)((0,$.Z)((0,$.Z)({},(0,He.H8)(Oe,xt)),{},{data:Ue.data,active:!0}));switch(pe.which){case S.Z.LEFT:{dt&&Ze.includes(Oe)?Z.onNodeExpand({},gt):Ue.parent&&Z.onActiveChange(Ue.parent.key),pe.preventDefault();break}case S.Z.RIGHT:{dt&&!Ze.includes(Oe)?Z.onNodeExpand({},gt):Ue.children&&Ue.children.length&&Z.onActiveChange(Ue.children[0].key),pe.preventDefault();break}case S.Z.ENTER:case S.Z.SPACE:{ct&&!gt.disabled&&gt.checkable!==!1&&!gt.disableCheckbox?Z.onNodeCheck({},gt,!re.includes(Oe)):!ct&&ut&&!gt.disabled&&gt.selectable!==!1&&Z.onNodeSelect({},gt);break}}}tt==null||tt(pe)}),(0,x.Z)((0,J.Z)(Z),"setUncontrolledState",function(pe){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Z.destroyed){var Ze=!1,re=!0,fe={};Object.keys(pe).forEach(function(st){if(Z.props.hasOwnProperty(st)){re=!1;return}Ze=!0,fe[st]=pe[st]}),Ze&&(!Ee||re)&&Z.setState((0,$.Z)((0,$.Z)({},fe),Oe))}}),(0,x.Z)((0,J.Z)(Z),"scrollTo",function(pe){Z.listRef.current.scrollTo(pe)}),Z}return(0,g.Z)(Ae,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var D=this.props,he=D.activeKey,_e=D.itemScrollOffset,pe=_e===void 0?0:_e;he!==void 0&&he!==this.state.activeKey&&(this.setState({activeKey:he}),he!==null&&this.scrollTo({key:he,offset:pe}))}},{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 D=this.state,he=D.focused,_e=D.flattenNodes,pe=D.keyEntities,Ee=D.draggingNodeKey,Oe=D.activeKey,Ze=D.dropLevelOffset,re=D.dropContainerKey,fe=D.dropTargetKey,st=D.dropPosition,tt=D.dragOverNodeKey,ct=D.indent,ut=this.props,Ue=ut.prefixCls,xt=ut.className,dt=ut.style,gt=ut.showLine,kt=ut.focusable,w=ut.tabIndex,O=w===void 0?0:w,qe=ut.selectable,oe=ut.showIcon,xe=ut.icon,jt=ut.switcherIcon,Qe=ut.draggable,at=ut.checkable,bt=ut.checkStrictly,ge=ut.disabled,ye=ut.motion,Fe=ut.loadData,ze=ut.filterTreeNode,q=ut.height,Mt=ut.itemHeight,Be=ut.scrollWidth,Gt=ut.virtual,pn=ut.titleRender,En=ut.dropIndicatorRender,sr=ut.onContextMenu,Xn=ut.onScroll,Wn=ut.direction,Cr=ut.rootClassName,Rr=ut.rootStyle,Qn=(0,T.Z)(this.props,{aria:!0,data:!0}),gr;Qe&&((0,ee.Z)(Qe)==="object"?gr=Qe:typeof Qe=="function"?gr={nodeDraggable:Qe}:gr={});var Cn={prefixCls:Ue,selectable:qe,showIcon:oe,icon:xe,switcherIcon:jt,draggable:gr,draggingNodeKey:Ee,checkable:at,checkStrictly:bt,disabled:ge,keyEntities:pe,dropLevelOffset:Ze,dropContainerKey:re,dropTargetKey:fe,dropPosition:st,dragOverNodeKey:tt,indent:ct,direction:Wn,dropIndicatorRender:En,loadData:Fe,filterTreeNode:ze,titleRender:pn,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 z.createElement(j.k.Provider,{value:Cn},z.createElement("div",{className:b()(Ue,xt,Cr,(0,x.Z)((0,x.Z)((0,x.Z)({},"".concat(Ue,"-show-line"),gt),"".concat(Ue,"-focused"),he),"".concat(Ue,"-active-focused"),Oe!==null)),style:Rr},z.createElement(Re,(0,c.Z)({ref:this.listRef,prefixCls:Ue,style:dt,data:_e,disabled:ge,selectable:qe,checkable:!!at,motion:ye,dragging:Ee!==null,height:q,itemHeight:Mt,virtual:Gt,focusable:kt,focused:he,tabIndex:O,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:sr,onScroll:Xn,scrollWidth:Be},this.getTreeNodeRequiredProps(),Qn))))}}],[{key:"getDerivedStateFromProps",value:function(D,he){var _e=he.prevProps,pe={prevProps:D};function Ee(O){return!_e&&D.hasOwnProperty(O)||_e&&_e[O]!==D[O]}var Oe,Ze=he.fieldNames;if(Ee("fieldNames")&&(Ze=(0,He.w$)(D.fieldNames),pe.fieldNames=Ze),Ee("treeData")?Oe=D.treeData:Ee("children")&&((0,B.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Oe=(0,He.zn)(D.children)),Oe){pe.treeData=Oe;var re=(0,He.I8)(Oe,{fieldNames:Ze});pe.keyEntities=(0,$.Z)((0,x.Z)({},Y,je),re.keyEntities)}var fe=pe.keyEntities||he.keyEntities;if(Ee("expandedKeys")||_e&&Ee("autoExpandParent"))pe.expandedKeys=D.autoExpandParent||!_e&&D.defaultExpandParent?(0,At.r7)(D.expandedKeys,fe):D.expandedKeys;else if(!_e&&D.defaultExpandAll){var st=(0,$.Z)({},fe);delete st[Y];var tt=[];Object.keys(st).forEach(function(O){var qe=st[O];qe.children&&qe.children.length&&tt.push(qe.key)}),pe.expandedKeys=tt}else!_e&&D.defaultExpandedKeys&&(pe.expandedKeys=D.autoExpandParent||D.defaultExpandParent?(0,At.r7)(D.defaultExpandedKeys,fe):D.defaultExpandedKeys);if(pe.expandedKeys||delete pe.expandedKeys,Oe||pe.expandedKeys){var ct=(0,He.oH)(Oe||he.treeData,pe.expandedKeys||he.expandedKeys,Ze);pe.flattenNodes=ct}if(D.selectable&&(Ee("selectedKeys")?pe.selectedKeys=(0,At.BT)(D.selectedKeys,D):!_e&&D.defaultSelectedKeys&&(pe.selectedKeys=(0,At.BT)(D.defaultSelectedKeys,D))),D.checkable){var ut;if(Ee("checkedKeys")?ut=(0,At.E6)(D.checkedKeys)||{}:!_e&&D.defaultCheckedKeys?ut=(0,At.E6)(D.defaultCheckedKeys)||{}:Oe&&(ut=(0,At.E6)(D.checkedKeys)||{checkedKeys:he.checkedKeys,halfCheckedKeys:he.halfCheckedKeys}),ut){var Ue=ut,xt=Ue.checkedKeys,dt=xt===void 0?[]:xt,gt=Ue.halfCheckedKeys,kt=gt===void 0?[]:gt;if(!D.checkStrictly){var w=(0,rt.S)(dt,!0,fe);dt=w.checkedKeys,kt=w.halfCheckedKeys}pe.checkedKeys=dt,pe.halfCheckedKeys=kt}}return Ee("loadedKeys")&&(pe.loadedKeys=D.loadedKeys),pe}}]),Ae}(z.Component);(0,x.Z)(Ge,"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:A,allowDrop:function(){return!0},expandAction:!1}),(0,x.Z)(Ge,"TreeNode",De.Z);var Ne=Ge,Ie=Ne},82661:function(un,We,m){"use strict";m.d(We,{BT:function(){return z},E6:function(){return A},L0:function(){return x},OM:function(){return B},_5:function(){return o},r7:function(){return K},wA:function(){return b},yx:function(){return L}});var c=m(77654),ee=m(43749),$=m(48736),ie=m(59301),F=m(639),g=m(65065),J=m(34061),X=null;function o(I,M){if(!I)return[];var le=I.slice(),me=le.indexOf(M);return me>=0&&le.splice(me,1),le}function x(I,M){var le=(I||[]).slice();return le.indexOf(M)===-1&&le.push(M),le}function L(I){return I.split("-")}function b(I,M){var le=[],me=(0,g.Z)(M,I);function ce(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];De.forEach(function(Pe){var Ce=Pe.key,He=Pe.children;le.push(Ce),ce(He)})}return ce(me.children),le}function S(I){if(I.parent){var M=L(I.pos);return Number(M[M.length-1])===I.parent.children.length-1}return!1}function T(I){var M=L(I.pos);return Number(M[M.length-1])===0}function B(I,M,le,me,ce,De,Pe,Ce,He,ue){var W,P=I.clientX,de=I.clientY,ae=I.target.getBoundingClientRect(),Q=ae.top,E=ae.height,C=(ue==="rtl"?-1:1)*(((ce==null?void 0:ce.x)||0)-P),Y=(C-12)/me,be=He.filter(function(Ie){var te;return(te=Ce[Ie])===null||te===void 0||(te=te.children)===null||te===void 0?void 0:te.length}),je=(0,g.Z)(Ce,le.eventKey);if(de<Q+E/2){var lt=Pe.findIndex(function(Ie){return Ie.key===je.key}),ke=lt<=0?0:lt-1,Ye=Pe[ke].key;je=(0,g.Z)(Ce,Ye)}var et=je.key,_t=je,Re=je.key,At=0,rt=0;if(!be.includes(et))for(var Nt=0;Nt<Y&&S(je);Nt+=1)je=je.parent,rt+=1;var Xe=M.data,Ge=je.node,Ne=!0;return T(je)&&je.level===0&&de<Q+E/2&&De({dragNode:Xe,dropNode:Ge,dropPosition:-1})&&je.key===le.eventKey?At=-1:(_t.children||[]).length&&be.includes(Re)?De({dragNode:Xe,dropNode:Ge,dropPosition:0})?At=0:Ne=!1:rt===0?Y>-1.5?De({dragNode:Xe,dropNode:Ge,dropPosition:1})?At=1:Ne=!1:De({dragNode:Xe,dropNode:Ge,dropPosition:0})?At=0:De({dragNode:Xe,dropNode:Ge,dropPosition:1})?At=1:Ne=!1:De({dragNode:Xe,dropNode:Ge,dropPosition:1})?At=1:Ne=!1,{dropPosition:At,dropLevelOffset:rt,dropTargetKey:je.key,dropTargetPos:je.pos,dragOverNodeKey:Re,dropContainerKey:At===0?null:((W=je.parent)===null||W===void 0?void 0:W.key)||null,dropAllowed:Ne}}function z(I,M){if(I){var le=M.multiple;return le?I.slice():I.length?[I[0]]:I}}var j=function(M){return M};function U(I,M){if(!I)return[];var le=M||{},me=le.processProps,ce=me===void 0?j:me,De=Array.isArray(I)?I:[I];return De.map(function(Pe){var Ce=Pe.children,He=_objectWithoutProperties(Pe,X),ue=U(Ce,M);return React.createElement(TreeNode,_extends({key:He.key},ce(He)),ue)})}function A(I){if(!I)return null;var M;if(Array.isArray(I))M={checkedKeys:I,halfCheckedKeys:void 0};else if((0,ee.Z)(I)==="object")M={checkedKeys:I.checked||void 0,halfCheckedKeys:I.halfChecked||void 0};else return(0,$.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return M}function K(I,M){var le=new Set;function me(ce){if(!le.has(ce)){var De=(0,g.Z)(M,ce);if(De){le.add(ce);var Pe=De.parent,Ce=De.node;Ce.disabled||Pe&&me(Pe.key)}}}return(I||[]).forEach(function(ce){me(ce)}),(0,c.Z)(le)}},34643:function(un,We,m){"use strict";m.d(We,{S:function(){return J}});var c=m(48736),ee=m(65065);function $(X,o){var x=new Set;return X.forEach(function(L){o.has(L)||x.add(L)}),x}function ie(X){var o=X||{},x=o.disabled,L=o.disableCheckbox,b=o.checkable;return!!(x||L)||b===!1}function F(X,o,x,L){for(var b=new Set(X),S=new Set,T=0;T<=x;T+=1){var B=o.get(T)||new Set;B.forEach(function(A){var K=A.key,I=A.node,M=A.children,le=M===void 0?[]:M;b.has(K)&&!L(I)&&le.filter(function(me){return!L(me.node)}).forEach(function(me){b.add(me.key)})})}for(var z=new Set,j=x;j>=0;j-=1){var U=o.get(j)||new Set;U.forEach(function(A){var K=A.parent,I=A.node;if(!(L(I)||!A.parent||z.has(A.parent.key))){if(L(A.parent.node)){z.add(K.key);return}var M=!0,le=!1;(K.children||[]).filter(function(me){return!L(me.node)}).forEach(function(me){var ce=me.key,De=b.has(ce);M&&!De&&(M=!1),!le&&(De||S.has(ce))&&(le=!0)}),M&&b.add(K.key),le&&S.add(K.key),z.add(K.key)}})}return{checkedKeys:Array.from(b),halfCheckedKeys:Array.from($(S,b))}}function g(X,o,x,L,b){for(var S=new Set(X),T=new Set(o),B=0;B<=L;B+=1){var z=x.get(B)||new Set;z.forEach(function(K){var I=K.key,M=K.node,le=K.children,me=le===void 0?[]:le;!S.has(I)&&!T.has(I)&&!b(M)&&me.filter(function(ce){return!b(ce.node)}).forEach(function(ce){S.delete(ce.key)})})}T=new Set;for(var j=new Set,U=L;U>=0;U-=1){var A=x.get(U)||new Set;A.forEach(function(K){var I=K.parent,M=K.node;if(!(b(M)||!K.parent||j.has(K.parent.key))){if(b(K.parent.node)){j.add(I.key);return}var le=!0,me=!1;(I.children||[]).filter(function(ce){return!b(ce.node)}).forEach(function(ce){var De=ce.key,Pe=S.has(De);le&&!Pe&&(le=!1),!me&&(Pe||T.has(De))&&(me=!0)}),le||S.delete(I.key),me&&T.add(I.key),j.add(I.key)}})}return{checkedKeys:Array.from(S),halfCheckedKeys:Array.from($(T,S))}}function J(X,o,x,L){var b=[],S;L?S=L:S=ie;var T=new Set(X.filter(function(U){var A=!!(0,ee.Z)(x,U);return A||b.push(U),A})),B=new Map,z=0;Object.keys(x).forEach(function(U){var A=x[U],K=A.level,I=B.get(K);I||(I=new Set,B.set(K,I)),I.add(A),z=Math.max(z,K)}),(0,c.ZP)(!b.length,"Tree missing follow keys: ".concat(b.slice(0,100).map(function(U){return"'".concat(U,"'")}).join(", ")));var j;return o===!0?j=F(T,B,z,S):j=g(T,o.halfCheckedKeys,B,z,S),j}},65065:function(un,We,m){"use strict";m.d(We,{Z:function(){return c}});function c(ee,$){return ee[$]}},34061:function(un,We,m){"use strict";m.d(We,{F:function(){return K},H8:function(){return A},I8:function(){return U},km:function(){return b},oH:function(){return z},w$:function(){return S},zn:function(){return B}});var c=m(43749),ee=m(77654),$=m(85899),ie=m(42244),F=m(11592),g=m(2738),J=m(48736),X=m(65065),o=["children"];function x(I,M){return"".concat(I,"-").concat(M)}function L(I){return I&&I.type&&I.type.isTreeNode}function b(I,M){return I!=null?I:M}function S(I){var M=I||{},le=M.title,me=M._title,ce=M.key,De=M.children,Pe=le||"title";return{title:Pe,_title:me||[Pe],key:ce||"key",children:De||"children"}}function T(I,M){var le=new Map;function me(ce){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(ce||[]).forEach(function(Pe){var Ce=Pe[M.key],He=Pe[M.children];warning(Ce!=null,"Tree node must have a certain key: [".concat(De).concat(Ce,"]"));var ue=String(Ce);warning(!le.has(ue)||Ce===null||Ce===void 0,"Same 'key' exist in the Tree: ".concat(ue)),le.set(ue,!0),me(He,"".concat(De).concat(ue," > "))})}me(I)}function B(I){function M(le){var me=(0,F.Z)(le);return me.map(function(ce){if(!L(ce))return(0,J.ZP)(!ce,"Tree/TreeNode can only accept TreeNode as children."),null;var De=ce.key,Pe=ce.props,Ce=Pe.children,He=(0,ie.Z)(Pe,o),ue=(0,$.Z)({key:De},He),W=M(Ce);return W.length&&(ue.children=W),ue}).filter(function(ce){return ce})}return M(I)}function z(I,M,le){var me=S(le),ce=me._title,De=me.key,Pe=me.children,Ce=new Set(M===!0?[]:M),He=[];function ue(W){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return W.map(function(de,ae){for(var Q=x(P?P.pos:"0",ae),E=b(de[De],Q),C,Y=0;Y<ce.length;Y+=1){var be=ce[Y];if(de[be]!==void 0){C=de[be];break}}var je=Object.assign((0,g.Z)(de,[].concat((0,ee.Z)(ce),[De,Pe])),{title:C,key:E,parent:P,pos:Q,children:null,data:de,isStart:[].concat((0,ee.Z)(P?P.isStart:[]),[ae===0]),isEnd:[].concat((0,ee.Z)(P?P.isEnd:[]),[ae===W.length-1])});return He.push(je),M===!0||Ce.has(E)?je.children=ue(de[Pe]||[],je):je.children=[],je})}return ue(I),He}function j(I,M,le){var me={};(0,c.Z)(le)==="object"?me=le:me={externalGetKey:le},me=me||{};var ce=me,De=ce.childrenPropName,Pe=ce.externalGetKey,Ce=ce.fieldNames,He=S(Ce),ue=He.key,W=He.children,P=De||W,de;Pe?typeof Pe=="string"?de=function(E){return E[Pe]}:typeof Pe=="function"&&(de=function(E){return Pe(E)}):de=function(E,C){return b(E[ue],C)};function ae(Q,E,C,Y){var be=Q?Q[P]:I,je=Q?x(C.pos,E):"0",lt=Q?[].concat((0,ee.Z)(Y),[Q]):[];if(Q){var ke=de(Q,je),Ye={node:Q,index:E,pos:je,key:ke,parentPos:C.node?C.pos:null,level:C.level+1,nodes:lt};M(Ye)}be&&be.forEach(function(et,_t){ae(et,_t,{node:Q,pos:je,level:C?C.level+1:-1},lt)})}ae(null)}function U(I){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=M.initWrapper,me=M.processEntity,ce=M.onProcessFinished,De=M.externalGetKey,Pe=M.childrenPropName,Ce=M.fieldNames,He=arguments.length>2?arguments[2]:void 0,ue=De||He,W={},P={},de={posEntities:W,keyEntities:P};return le&&(de=le(de)||de),j(I,function(ae){var Q=ae.node,E=ae.index,C=ae.pos,Y=ae.key,be=ae.parentPos,je=ae.level,lt=ae.nodes,ke={node:Q,nodes:lt,index:E,key:Y,pos:C,level:je},Ye=b(Y,C);W[C]=ke,P[Ye]=ke,ke.parent=W[be],ke.parent&&(ke.parent.children=ke.parent.children||[],ke.parent.children.push(ke)),me&&me(ke,de)},{externalGetKey:ue,childrenPropName:Pe,fieldNames:Ce}),ce&&ce(de),de}function A(I,M){var le=M.expandedKeys,me=M.selectedKeys,ce=M.loadedKeys,De=M.loadingKeys,Pe=M.checkedKeys,Ce=M.halfCheckedKeys,He=M.dragOverNodeKey,ue=M.dropPosition,W=M.keyEntities,P=(0,X.Z)(W,I),de={eventKey:I,expanded:le.indexOf(I)!==-1,selected:me.indexOf(I)!==-1,loaded:ce.indexOf(I)!==-1,loading:De.indexOf(I)!==-1,checked:Pe.indexOf(I)!==-1,halfChecked:Ce.indexOf(I)!==-1,pos:String(P?P.pos:""),dragOver:He===I&&ue===0,dragOverGapTop:He===I&&ue===-1,dragOverGapBottom:He===I&&ue===1};return de}function K(I){var M=I.data,le=I.expanded,me=I.selected,ce=I.checked,De=I.loaded,Pe=I.loading,Ce=I.halfChecked,He=I.dragOver,ue=I.dragOverGapTop,W=I.dragOverGapBottom,P=I.pos,de=I.active,ae=I.eventKey,Q=(0,$.Z)((0,$.Z)({},M),{},{expanded:le,selected:me,checked:ce,loaded:De,loading:Pe,halfChecked:Ce,dragOver:He,dragOverGapTop:ue,dragOverGapBottom:W,pos:P,active:de,key:ae});return"props"in Q||Object.defineProperty(Q,"props",{get:function(){return(0,J.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),I}}),Q}},8224:function(un,We,m){"use strict";m.d(We,{Z:function(){return ee}});var c=m(4676);function ee($,ie,F,g){var J=c.unstable_batchedUpdates?function(o){c.unstable_batchedUpdates(F,o)}:F;return $!=null&&$.addEventListener&&$.addEventListener(ie,J,g),{remove:function(){$!=null&&$.removeEventListener&&$.removeEventListener(ie,J,g)}}}},24514:function(un,We,m){"use strict";m.d(We,{G:function(){return ie}});var c=m(47273),ee=function(g){if((0,c.Z)()&&window.document.documentElement){var J=Array.isArray(g)?g:[g],X=window.document.documentElement;return J.some(function(o){return o in X.style})}return!1},$=function(g,J){if(!ee(g))return!1;var X=document.createElement("div"),o=X.style[g];return X.style[g]=J,X.style[g]!==o};function ie(F,g){return!Array.isArray(F)&&g!==void 0?$(F,g):ee(F)}},49658:function(un,We){"use strict";We.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var m=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(m)||/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(m==null?void 0:m.substr(0,4))}},48911:function(un,We,m){"use strict";m.d(We,{Z:function(){return Xe}});var c=m(60499),ee=m(43749),$=m(85899),ie=m(18642),F=m(72190),g=m(42244),J=m(92310),X=m.n(J),o=m(29301),x=m(70425),L=m(34280),b=m(59301),S=m(4676),T=b.forwardRef(function(Ge,Ne){var Ie=Ge.height,te=Ge.offsetY,$e=Ge.offsetX,Ae=Ge.children,Z=Ge.prefixCls,D=Ge.onInnerResize,he=Ge.innerProps,_e=Ge.rtl,pe=Ge.extra,Ee={},Oe={display:"flex",flexDirection:"column"};return te!==void 0&&(Ee={height:Ie,position:"relative",overflow:"hidden"},Oe=(0,$.Z)((0,$.Z)({},Oe),{},(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)({transform:"translateY(".concat(te,"px)")},_e?"marginRight":"marginLeft",-$e),"position","absolute"),"left",0),"right",0),"top",0))),b.createElement("div",{style:Ee},b.createElement(o.Z,{onResize:function(re){var fe=re.offsetHeight;fe&&D&&D()}},b.createElement("div",(0,c.Z)({style:Oe,className:X()((0,ie.Z)({},"".concat(Z,"-holder-inner"),Z)),ref:Ne},he),Ae,pe)))});T.displayName="Filler";var B=T;function z(Ge){var Ne=Ge.children,Ie=Ge.setRef,te=b.useCallback(function($e){Ie($e)},[]);return b.cloneElement(Ne,{ref:te})}function j(Ge,Ne,Ie,te,$e,Ae,Z,D){var he=D.getKey;return Ge.slice(Ne,Ie+1).map(function(_e,pe){var Ee=Ne+pe,Oe=Z(_e,Ee,{style:{width:te},offsetX:$e}),Ze=he(_e);return b.createElement(z,{key:Ze,setRef:function(fe){return Ae(_e,fe)}},Oe)})}function U(Ge,Ne,Ie,te){var $e=Ie-Ge,Ae=Ne-Ie,Z=Math.min($e,Ae)*2;if(te<=Z){var D=Math.floor(te/2);return te%2?Ie+D+1:Ie-D}return $e>Ae?Ie-(te-Ae):Ie+(te-$e)}function A(Ge,Ne,Ie){var te=Ge.length,$e=Ne.length,Ae,Z;if(te===0&&$e===0)return null;te<$e?(Ae=Ge,Z=Ne):(Ae=Ne,Z=Ge);var D={__EMPTY_ITEM__:!0};function he(re){return re!==void 0?Ie(re):D}for(var _e=null,pe=Math.abs(te-$e)!==1,Ee=0;Ee<Z.length;Ee+=1){var Oe=he(Ae[Ee]),Ze=he(Z[Ee]);if(Oe!==Ze){_e=Ee,pe=pe||Oe!==he(Z[Ee+1]);break}}return _e===null?null:{index:_e,multiple:pe}}function K(Ge,Ne,Ie){var te=b.useState(Ge),$e=(0,F.Z)(te,2),Ae=$e[0],Z=$e[1],D=b.useState(null),he=(0,F.Z)(D,2),_e=he[0],pe=he[1];return b.useEffect(function(){var Ee=A(Ae||[],Ge||[],Ne);(Ee==null?void 0:Ee.index)!==void 0&&(Ie==null||Ie(Ee.index),pe(Ge[Ee.index])),Z(Ge)},[Ge]),[_e]}var I=m(16089),M=(typeof navigator=="undefined"?"undefined":(0,ee.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),le=M,me=function(Ge,Ne,Ie,te){var $e=(0,b.useRef)(!1),Ae=(0,b.useRef)(null);function Z(){clearTimeout(Ae.current),$e.current=!0,Ae.current=setTimeout(function(){$e.current=!1},50)}var D=(0,b.useRef)({top:Ge,bottom:Ne,left:Ie,right:te});return D.current.top=Ge,D.current.bottom=Ne,D.current.left=Ie,D.current.right=te,function(he,_e){var pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ee=he?_e<0&&D.current.left||_e>0&&D.current.right:_e<0&&D.current.top||_e>0&&D.current.bottom;return pe&&Ee?(clearTimeout(Ae.current),$e.current=!1):(!Ee||$e.current)&&Z(),!$e.current&&Ee}};function ce(Ge,Ne,Ie,te,$e,Ae,Z){var D=(0,b.useRef)(0),he=(0,b.useRef)(null),_e=(0,b.useRef)(null),pe=(0,b.useRef)(!1),Ee=me(Ne,Ie,te,$e);function Oe(ct,ut){if(I.Z.cancel(he.current),!Ee(!1,ut)){var Ue=ct;if(!Ue._virtualHandled)Ue._virtualHandled=!0;else return;D.current+=ut,_e.current=ut,le||Ue.preventDefault(),he.current=(0,I.Z)(function(){var xt=pe.current?10:1;Z(D.current*xt,!1),D.current=0})}}function Ze(ct,ut){Z(ut,!0),le||ct.preventDefault()}var re=(0,b.useRef)(null),fe=(0,b.useRef)(null);function st(ct){if(Ge){I.Z.cancel(fe.current),fe.current=(0,I.Z)(function(){re.current=null},2);var ut=ct.deltaX,Ue=ct.deltaY,xt=ct.shiftKey,dt=ut,gt=Ue;(re.current==="sx"||!re.current&&xt&&Ue&&!ut)&&(dt=Ue,gt=0,re.current="sx");var kt=Math.abs(dt),w=Math.abs(gt);re.current===null&&(re.current=Ae&&kt>w?"x":"y"),re.current==="y"?Oe(ct,gt):Ze(ct,dt)}}function tt(ct){Ge&&(pe.current=ct.detail===_e.current)}return[st,tt]}function De(Ge,Ne,Ie,te){var $e=b.useMemo(function(){return[new Map,[]]},[Ge,Ie.id,te]),Ae=(0,F.Z)($e,2),Z=Ae[0],D=Ae[1],he=function(pe){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pe,Oe=Z.get(pe),Ze=Z.get(Ee);if(Oe===void 0||Ze===void 0)for(var re=Ge.length,fe=D.length;fe<re;fe+=1){var st,tt=Ge[fe],ct=Ne(tt);Z.set(ct,fe);var ut=(st=Ie.get(ct))!==null&&st!==void 0?st:te;if(D[fe]=(D[fe-1]||0)+ut,ct===pe&&(Oe=fe),ct===Ee&&(Ze=fe),Oe!==void 0&&Ze!==void 0)break}return{top:D[Oe-1]||0,bottom:D[Ze]}};return he}var Pe=m(38705),Ce=m(17212),He=function(){function Ge(){(0,Pe.Z)(this,Ge),(0,ie.Z)(this,"maps",void 0),(0,ie.Z)(this,"id",0),(0,ie.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Ce.Z)(Ge,[{key:"set",value:function(Ie,te){this.diffRecords.set(Ie,this.maps[Ie]),this.maps[Ie]=te,this.id+=1}},{key:"get",value:function(Ie){return this.maps[Ie]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Ge}(),ue=He;function W(Ge){var Ne=parseFloat(Ge);return isNaN(Ne)?0:Ne}function P(Ge,Ne,Ie){var te=b.useState(0),$e=(0,F.Z)(te,2),Ae=$e[0],Z=$e[1],D=(0,b.useRef)(new Map),he=(0,b.useRef)(new ue),_e=(0,b.useRef)(0);function pe(){_e.current+=1}function Ee(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;pe();var re=function(){var tt=!1;D.current.forEach(function(ct,ut){if(ct&&ct.offsetParent){var Ue=ct.offsetHeight,xt=getComputedStyle(ct),dt=xt.marginTop,gt=xt.marginBottom,kt=W(dt),w=W(gt),O=Ue+kt+w;he.current.get(ut)!==O&&(he.current.set(ut,O),tt=!0)}}),tt&&Z(function(ct){return ct+1})};if(Ze)re();else{_e.current+=1;var fe=_e.current;Promise.resolve().then(function(){fe===_e.current&&re()})}}function Oe(Ze,re){var fe=Ge(Ze),st=D.current.get(fe);re?(D.current.set(fe,re),Ee()):D.current.delete(fe),!st!=!re&&(re?Ne==null||Ne(Ze):Ie==null||Ie(Ze))}return(0,b.useEffect)(function(){return pe},[]),[Oe,Ee,he.current,Ae]}var de=14/15;function ae(Ge,Ne,Ie){var te=(0,b.useRef)(!1),$e=(0,b.useRef)(0),Ae=(0,b.useRef)(0),Z=(0,b.useRef)(null),D=(0,b.useRef)(null),he,_e=function(Ze){if(te.current){var re=Math.ceil(Ze.touches[0].pageX),fe=Math.ceil(Ze.touches[0].pageY),st=$e.current-re,tt=Ae.current-fe,ct=Math.abs(st)>Math.abs(tt);ct?$e.current=re:Ae.current=fe;var ut=Ie(ct,ct?st:tt,!1,Ze);ut&&Ze.preventDefault(),clearInterval(D.current),ut&&(D.current=setInterval(function(){ct?st*=de:tt*=de;var Ue=Math.floor(ct?st:tt);(!Ie(ct,Ue,!0)||Math.abs(Ue)<=.1)&&clearInterval(D.current)},16))}},pe=function(){te.current=!1,he()},Ee=function(Ze){he(),Ze.touches.length===1&&!te.current&&(te.current=!0,$e.current=Math.ceil(Ze.touches[0].pageX),Ae.current=Math.ceil(Ze.touches[0].pageY),Z.current=Ze.target,Z.current.addEventListener("touchmove",_e,{passive:!1}),Z.current.addEventListener("touchend",pe,{passive:!0}))};he=function(){Z.current&&(Z.current.removeEventListener("touchmove",_e),Z.current.removeEventListener("touchend",pe))},(0,L.Z)(function(){return Ge&&Ne.current.addEventListener("touchstart",Ee,{passive:!0}),function(){var Oe;(Oe=Ne.current)===null||Oe===void 0||Oe.removeEventListener("touchstart",Ee),he(),clearInterval(D.current)}},[Ge])}function Q(Ge){return Math.floor(Math.pow(Ge,.5))}function E(Ge,Ne){var Ie="touches"in Ge?Ge.touches[0]:Ge;return Ie[Ne?"pageX":"pageY"]-window[Ne?"scrollX":"scrollY"]}function C(Ge,Ne,Ie){b.useEffect(function(){var te=Ne.current;if(Ge&&te){var $e=!1,Ae,Z,D=function(){I.Z.cancel(Ae)},he=function Oe(){D(),Ae=(0,I.Z)(function(){Ie(Z),Oe()})},_e=function(){$e=!1,D()},pe=function(Ze){if(!(Ze.target.draggable||Ze.button!==0)){var re=Ze;re._virtualHandled||(re._virtualHandled=!0,$e=!0)}},Ee=function(Ze){if($e){var re=E(Ze,!1),fe=te.getBoundingClientRect(),st=fe.top,tt=fe.bottom;if(re<=st){var ct=st-re;Z=-Q(ct),he()}else if(re>=tt){var ut=re-tt;Z=Q(ut),he()}else D()}};return te.addEventListener("mousedown",pe),te.ownerDocument.addEventListener("mouseup",_e),te.ownerDocument.addEventListener("mousemove",Ee),te.ownerDocument.addEventListener("dragend",_e),function(){te.removeEventListener("mousedown",pe),te.ownerDocument.removeEventListener("mouseup",_e),te.ownerDocument.removeEventListener("mousemove",Ee),te.ownerDocument.removeEventListener("dragend",_e),D()}}},[Ge])}var Y=10;function be(Ge,Ne,Ie,te,$e,Ae,Z,D){var he=b.useRef(),_e=b.useState(null),pe=(0,F.Z)(_e,2),Ee=pe[0],Oe=pe[1];return(0,L.Z)(function(){if(Ee&&Ee.times<Y){if(!Ge.current){Oe(function(ye){return(0,$.Z)({},ye)});return}Ae();var Ze=Ee.targetAlign,re=Ee.originAlign,fe=Ee.index,st=Ee.offset,tt=Ge.current.clientHeight,ct=!1,ut=Ze,Ue=null;if(tt){for(var xt=Ze||re,dt=0,gt=0,kt=0,w=Math.min(Ne.length-1,fe),O=0;O<=w;O+=1){var qe=$e(Ne[O]);gt=dt;var oe=Ie.get(qe);kt=gt+(oe===void 0?te:oe),dt=kt}for(var xe=xt==="top"?st:tt-st,jt=w;jt>=0;jt-=1){var Qe=$e(Ne[jt]),at=Ie.get(Qe);if(at===void 0){ct=!0;break}if(xe-=at,xe<=0)break}switch(xt){case"top":Ue=gt-st;break;case"bottom":Ue=kt-tt+st;break;default:{var bt=Ge.current.scrollTop,ge=bt+tt;gt<bt?ut="top":kt>ge&&(ut="bottom")}}Ue!==null&&Z(Ue),Ue!==Ee.lastTop&&(ct=!0)}ct&&Oe((0,$.Z)((0,$.Z)({},Ee),{},{times:Ee.times+1,targetAlign:ut,lastTop:Ue}))}},[Ee,Ge.current]),function(Ze){if(Ze==null){D();return}if(I.Z.cancel(he.current),typeof Ze=="number")Z(Ze);else if(Ze&&(0,ee.Z)(Ze)==="object"){var re,fe=Ze.align;"index"in Ze?re=Ze.index:re=Ne.findIndex(function(ct){return $e(ct)===Ze.key});var st=Ze.offset,tt=st===void 0?0:st;Oe({times:0,index:re,offset:tt,originAlign:fe})}}}var je=b.forwardRef(function(Ge,Ne){var Ie=Ge.prefixCls,te=Ge.rtl,$e=Ge.scrollOffset,Ae=Ge.scrollRange,Z=Ge.onStartMove,D=Ge.onStopMove,he=Ge.onScroll,_e=Ge.horizontal,pe=Ge.spinSize,Ee=Ge.containerSize,Oe=Ge.style,Ze=Ge.thumbStyle,re=Ge.showScrollBar,fe=b.useState(!1),st=(0,F.Z)(fe,2),tt=st[0],ct=st[1],ut=b.useState(null),Ue=(0,F.Z)(ut,2),xt=Ue[0],dt=Ue[1],gt=b.useState(null),kt=(0,F.Z)(gt,2),w=kt[0],O=kt[1],qe=!te,oe=b.useRef(),xe=b.useRef(),jt=b.useState(re),Qe=(0,F.Z)(jt,2),at=Qe[0],bt=Qe[1],ge=b.useRef(),ye=function(){re===!0||re===!1||(clearTimeout(ge.current),bt(!0),ge.current=setTimeout(function(){bt(!1)},3e3))},Fe=Ae-Ee||0,ze=Ee-pe||0,q=b.useMemo(function(){if($e===0||Fe===0)return 0;var Cr=$e/Fe;return Cr*ze},[$e,Fe,ze]),Mt=function(Rr){Rr.stopPropagation(),Rr.preventDefault()},Be=b.useRef({top:q,dragging:tt,pageY:xt,startTop:w});Be.current={top:q,dragging:tt,pageY:xt,startTop:w};var Gt=function(Rr){ct(!0),dt(E(Rr,_e)),O(Be.current.top),Z(),Rr.stopPropagation(),Rr.preventDefault()};b.useEffect(function(){var Cr=function(Cn){Cn.preventDefault()},Rr=oe.current,Qn=xe.current;return Rr.addEventListener("touchstart",Cr,{passive:!1}),Qn.addEventListener("touchstart",Gt,{passive:!1}),function(){Rr.removeEventListener("touchstart",Cr),Qn.removeEventListener("touchstart",Gt)}},[]);var pn=b.useRef();pn.current=Fe;var En=b.useRef();En.current=ze,b.useEffect(function(){if(tt){var Cr,Rr=function(Cn){var tn=Be.current,dn=tn.dragging,Vn=tn.pageY,vr=tn.startTop;I.Z.cancel(Cr);var Et=oe.current.getBoundingClientRect(),wt=Ee/(_e?Et.width:Et.height);if(dn){var Me=(E(Cn,_e)-Vn)*wt,nt=vr;!qe&&_e?nt-=Me:nt+=Me;var vt=pn.current,yt=En.current,Tt=yt?nt/yt:0,Jt=Math.ceil(Tt*vt);Jt=Math.max(Jt,0),Jt=Math.min(Jt,vt),Cr=(0,I.Z)(function(){he(Jt,_e)})}},Qn=function(){ct(!1),D()};return window.addEventListener("mousemove",Rr,{passive:!0}),window.addEventListener("touchmove",Rr,{passive:!0}),window.addEventListener("mouseup",Qn,{passive:!0}),window.addEventListener("touchend",Qn,{passive:!0}),function(){window.removeEventListener("mousemove",Rr),window.removeEventListener("touchmove",Rr),window.removeEventListener("mouseup",Qn),window.removeEventListener("touchend",Qn),I.Z.cancel(Cr)}}},[tt]),b.useEffect(function(){return ye(),function(){clearTimeout(ge.current)}},[$e]),b.useImperativeHandle(Ne,function(){return{delayHidden:ye}});var sr="".concat(Ie,"-scrollbar"),Xn={position:"absolute",visibility:at?null:"hidden"},Wn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return _e?(Object.assign(Xn,{height:8,left:0,right:0,bottom:0}),Object.assign(Wn,(0,ie.Z)({height:"100%",width:pe},qe?"left":"right",q))):(Object.assign(Xn,(0,ie.Z)({width:8,top:0,bottom:0},qe?"right":"left",0)),Object.assign(Wn,{width:"100%",height:pe,top:q})),b.createElement("div",{ref:oe,className:X()(sr,(0,ie.Z)((0,ie.Z)((0,ie.Z)({},"".concat(sr,"-horizontal"),_e),"".concat(sr,"-vertical"),!_e),"".concat(sr,"-visible"),at)),style:(0,$.Z)((0,$.Z)({},Xn),Oe),onMouseDown:Mt,onMouseMove:ye},b.createElement("div",{ref:xe,className:X()("".concat(sr,"-thumb"),(0,ie.Z)({},"".concat(sr,"-thumb-moving"),tt)),style:(0,$.Z)((0,$.Z)({},Wn),Ze),onMouseDown:Gt}))}),lt=je,ke=20;function Ye(){var Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ie=Ge/Ne*Ge;return isNaN(Ie)&&(Ie=0),Ie=Math.max(Ie,ke),Math.floor(Ie)}var et=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],_t=[],Re={overflowY:"auto",overflowAnchor:"none"};function At(Ge,Ne){var Ie=Ge.prefixCls,te=Ie===void 0?"rc-virtual-list":Ie,$e=Ge.className,Ae=Ge.height,Z=Ge.itemHeight,D=Ge.fullHeight,he=D===void 0?!0:D,_e=Ge.style,pe=Ge.data,Ee=Ge.children,Oe=Ge.itemKey,Ze=Ge.virtual,re=Ge.direction,fe=Ge.scrollWidth,st=Ge.component,tt=st===void 0?"div":st,ct=Ge.onScroll,ut=Ge.onVirtualScroll,Ue=Ge.onVisibleChange,xt=Ge.innerProps,dt=Ge.extraRender,gt=Ge.styles,kt=Ge.showScrollBar,w=kt===void 0?"optional":kt,O=(0,g.Z)(Ge,et),qe=b.useCallback(function(en){return typeof Oe=="function"?Oe(en):en==null?void 0:en[Oe]},[Oe]),oe=P(qe,null,null),xe=(0,F.Z)(oe,4),jt=xe[0],Qe=xe[1],at=xe[2],bt=xe[3],ge=!!(Ze!==!1&&Ae&&Z),ye=b.useMemo(function(){return Object.values(at.maps).reduce(function(en,sn){return en+sn},0)},[at.id,at.maps]),Fe=ge&&pe&&(Math.max(Z*pe.length,ye)>Ae||!!fe),ze=re==="rtl",q=X()(te,(0,ie.Z)({},"".concat(te,"-rtl"),ze),$e),Mt=pe||_t,Be=(0,b.useRef)(),Gt=(0,b.useRef)(),pn=(0,b.useRef)(),En=(0,b.useState)(0),sr=(0,F.Z)(En,2),Xn=sr[0],Wn=sr[1],Cr=(0,b.useState)(0),Rr=(0,F.Z)(Cr,2),Qn=Rr[0],gr=Rr[1],Cn=(0,b.useState)(!1),tn=(0,F.Z)(Cn,2),dn=tn[0],Vn=tn[1],vr=function(){Vn(!0)},Et=function(){Vn(!1)},wt={getKey:qe};function Me(en){Wn(function(sn){var Rn;typeof en=="function"?Rn=en(sn):Rn=en;var Un=or(Rn);return Be.current.scrollTop=Un,Un})}var nt=(0,b.useRef)({start:0,end:Mt.length}),vt=(0,b.useRef)(),yt=K(Mt,qe),Tt=(0,F.Z)(yt,1),Jt=Tt[0];vt.current=Jt;var mn=b.useMemo(function(){if(!ge)return{scrollHeight:void 0,start:0,end:Mt.length-1,offset:void 0};if(!Fe){var en;return{scrollHeight:((en=Gt.current)===null||en===void 0?void 0:en.offsetHeight)||0,start:0,end:Mt.length-1,offset:void 0}}for(var sn=0,Rn,Un,rr,Ar=Mt.length,wn=0;wn<Ar;wn+=1){var cr=Mt[wn],Ir=qe(cr),Jr=at.get(Ir),mi=sn+(Jr===void 0?Z:Jr);mi>=Xn&&Rn===void 0&&(Rn=wn,Un=sn),mi>Xn+Ae&&rr===void 0&&(rr=wn),sn=mi}return Rn===void 0&&(Rn=0,Un=0,rr=Math.ceil(Ae/Z)),rr===void 0&&(rr=Mt.length-1),rr=Math.min(rr+1,Mt.length-1),{scrollHeight:sn,start:Rn,end:rr,offset:Un}},[Fe,ge,Xn,Mt,bt,Ae]),yn=mn.scrollHeight,Wt=mn.start,gn=mn.end,Ln=mn.offset;nt.current.start=Wt,nt.current.end=gn,b.useLayoutEffect(function(){var en=at.getRecord();if(en.size===1){var sn=Array.from(en.keys())[0],Rn=en.get(sn),Un=Mt[Wt];if(Un&&Rn===void 0){var rr=qe(Un);if(rr===sn){var Ar=at.get(sn),wn=Ar-Z;Me(function(cr){return cr+wn})}}}at.resetRecord()},[yn]);var vn=b.useState({width:0,height:Ae}),ht=(0,F.Z)(vn,2),Ct=ht[0],Zt=ht[1],Lt=function(sn){Zt({width:sn.offsetWidth,height:sn.offsetHeight})},zt=(0,b.useRef)(),Vt=(0,b.useRef)(),nn=b.useMemo(function(){return Ye(Ct.width,fe)},[Ct.width,fe]),rn=b.useMemo(function(){return Ye(Ct.height,yn)},[Ct.height,yn]),Sn=yn-Ae,On=(0,b.useRef)(Sn);On.current=Sn;function or(en){var sn=en;return Number.isNaN(On.current)||(sn=Math.min(sn,On.current)),sn=Math.max(sn,0),sn}var Nn=Xn<=0,Pn=Xn>=Sn,Hn=Qn<=0,Kn=Qn>=fe,er=me(Nn,Pn,Hn,Kn),$n=function(){return{x:ze?-Qn:Qn,y:Xn}},Zn=(0,b.useRef)($n()),nr=(0,x.zX)(function(en){if(ut){var sn=(0,$.Z)((0,$.Z)({},$n()),en);(Zn.current.x!==sn.x||Zn.current.y!==sn.y)&&(ut(sn),Zn.current=sn)}});function ar(en,sn){var Rn=en;sn?((0,S.flushSync)(function(){gr(Rn)}),nr()):Me(Rn)}function Jn(en){var sn=en.currentTarget.scrollTop;sn!==Xn&&Me(sn),ct==null||ct(en),nr()}var Yn=function(sn){var Rn=sn,Un=fe?fe-Ct.width:0;return Rn=Math.max(Rn,0),Rn=Math.min(Rn,Un),Rn},qn=(0,x.zX)(function(en,sn){sn?((0,S.flushSync)(function(){gr(function(Rn){var Un=Rn+(ze?-en:en);return Yn(Un)})}),nr()):Me(function(Rn){var Un=Rn+en;return Un})}),Fn=ce(ge,Nn,Pn,Hn,Kn,!!fe,qn),$r=(0,F.Z)(Fn,2),Ft=$r[0],tr=$r[1];ae(ge,Be,function(en,sn,Rn,Un){var rr=Un;return er(en,sn,Rn)?!1:!rr||!rr._virtualHandled?(rr&&(rr._virtualHandled=!0),Ft({preventDefault:function(){},deltaX:en?sn:0,deltaY:en?0:sn}),!0):!1}),C(Fe,Be,function(en){Me(function(sn){return sn+en})}),(0,L.Z)(function(){function en(Rn){var Un=Nn&&Rn.detail<0,rr=Pn&&Rn.detail>0;ge&&!Un&&!rr&&Rn.preventDefault()}var sn=Be.current;return sn.addEventListener("wheel",Ft,{passive:!1}),sn.addEventListener("DOMMouseScroll",tr,{passive:!0}),sn.addEventListener("MozMousePixelScroll",en,{passive:!1}),function(){sn.removeEventListener("wheel",Ft),sn.removeEventListener("DOMMouseScroll",tr),sn.removeEventListener("MozMousePixelScroll",en)}},[ge,Nn,Pn]),(0,L.Z)(function(){if(fe){var en=Yn(Qn);gr(en),nr({x:en})}},[Ct.width,fe]);var ur=function(){var sn,Rn;(sn=zt.current)===null||sn===void 0||sn.delayHidden(),(Rn=Vt.current)===null||Rn===void 0||Rn.delayHidden()},Yr=be(Be,Mt,at,Z,qe,function(){return Qe(!0)},Me,ur);b.useImperativeHandle(Ne,function(){return{nativeElement:pn.current,getScrollInfo:$n,scrollTo:function(sn){function Rn(Un){return Un&&(0,ee.Z)(Un)==="object"&&("left"in Un||"top"in Un)}Rn(sn)?(sn.left!==void 0&&gr(Yn(sn.left)),Yr(sn.top)):Yr(sn)}}}),(0,L.Z)(function(){if(Ue){var en=Mt.slice(Wt,gn+1);Ue(en,Mt)}},[Wt,gn,Mt]);var zr=De(Mt,qe,at,Z),li=dt==null?void 0:dt({start:Wt,end:gn,virtual:Fe,offsetX:Qn,offsetY:Ln,rtl:ze,getSize:zr}),Qr=j(Mt,Wt,gn,fe,Qn,jt,Ee,wt),Bn=null;Ae&&(Bn=(0,$.Z)((0,ie.Z)({},he?"height":"maxHeight",Ae),Re),ge&&(Bn.overflowY="hidden",fe&&(Bn.overflowX="hidden"),dn&&(Bn.pointerEvents="none")));var An={};return ze&&(An.dir="rtl"),b.createElement("div",(0,c.Z)({ref:pn,style:(0,$.Z)((0,$.Z)({},_e),{},{position:"relative"}),className:q},An,O),b.createElement(o.Z,{onResize:Lt},b.createElement(tt,{className:"".concat(te,"-holder"),style:Bn,ref:Be,onScroll:Jn,onMouseEnter:ur},b.createElement(B,{prefixCls:te,height:yn,offsetX:Qn,offsetY:Ln,scrollWidth:fe,onInnerResize:Qe,ref:Gt,innerProps:xt,rtl:ze,extra:li},Qr))),Fe&&yn>Ae&&b.createElement(lt,{ref:zt,prefixCls:te,scrollOffset:Xn,scrollRange:yn,rtl:ze,onScroll:ar,onStartMove:vr,onStopMove:Et,spinSize:rn,containerSize:Ct.height,style:gt==null?void 0:gt.verticalScrollBar,thumbStyle:gt==null?void 0:gt.verticalScrollBarThumb,showScrollBar:w}),Fe&&fe>Ct.width&&b.createElement(lt,{ref:Vt,prefixCls:te,scrollOffset:Qn,scrollRange:fe,rtl:ze,onScroll:ar,onStartMove:vr,onStopMove:Et,spinSize:nn,containerSize:Ct.width,horizontal:!0,style:gt==null?void 0:gt.horizontalScrollBar,thumbStyle:gt==null?void 0:gt.horizontalScrollBarThumb,showScrollBar:w}))}var rt=b.forwardRef(At);rt.displayName="List";var Nt=rt,Xe=Nt},83145:function(un,We,m){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.CopyToClipboard=void 0;var c=$(m(59301)),ee=$(m(25769));function $(A){return A&&A.__esModule?A:{default:A}}function ie(A){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ie=function(I){return typeof I}:ie=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},ie(A)}function F(A,K){var I=Object.keys(A);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(A);K&&(M=M.filter(function(le){return Object.getOwnPropertyDescriptor(A,le).enumerable})),I.push.apply(I,M)}return I}function g(A){for(var K=1;K<arguments.length;K++){var I=arguments[K]!=null?arguments[K]:{};K%2?F(I,!0).forEach(function(M){j(A,M,I[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(I)):F(I).forEach(function(M){Object.defineProperty(A,M,Object.getOwnPropertyDescriptor(I,M))})}return A}function J(A,K){if(A==null)return{};var I=X(A,K),M,le;if(Object.getOwnPropertySymbols){var me=Object.getOwnPropertySymbols(A);for(le=0;le<me.length;le++)M=me[le],!(K.indexOf(M)>=0)&&Object.prototype.propertyIsEnumerable.call(A,M)&&(I[M]=A[M])}return I}function X(A,K){if(A==null)return{};var I={},M=Object.keys(A),le,me;for(me=0;me<M.length;me++)le=M[me],!(K.indexOf(le)>=0)&&(I[le]=A[le]);return I}function o(A,K){if(!(A instanceof K))throw new TypeError("Cannot call a class as a function")}function x(A,K){for(var I=0;I<K.length;I++){var M=K[I];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(A,M.key,M)}}function L(A,K,I){return K&&x(A.prototype,K),I&&x(A,I),A}function b(A,K){return K&&(ie(K)==="object"||typeof K=="function")?K:T(A)}function S(A){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},S(A)}function T(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function B(A,K){if(typeof K!="function"&&K!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(K&&K.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),K&&z(A,K)}function z(A,K){return z=Object.setPrototypeOf||function(M,le){return M.__proto__=le,M},z(A,K)}function j(A,K,I){return K in A?Object.defineProperty(A,K,{value:I,enumerable:!0,configurable:!0,writable:!0}):A[K]=I,A}var U=function(A){B(K,A);function K(){var I,M;o(this,K);for(var le=arguments.length,me=new Array(le),ce=0;ce<le;ce++)me[ce]=arguments[ce];return M=b(this,(I=S(K)).call.apply(I,[this].concat(me))),j(T(M),"onClick",function(De){var Pe=M.props,Ce=Pe.text,He=Pe.onCopy,ue=Pe.children,W=Pe.options,P=c.default.Children.only(ue),de=(0,ee.default)(Ce,W);He&&He(Ce,de),P&&P.props&&typeof P.props.onClick=="function"&&P.props.onClick(De)}),M}return L(K,[{key:"render",value:function(){var M=this.props,le=M.text,me=M.onCopy,ce=M.options,De=M.children,Pe=J(M,["text","onCopy","options","children"]),Ce=c.default.Children.only(De);return c.default.cloneElement(Ce,g({},Pe,{onClick:this.onClick}))}}]),K}(c.default.PureComponent);We.CopyToClipboard=U,j(U,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(un,We,m){"use strict";var c=m(83145),ee=c.CopyToClipboard;ee.CopyToClipboard=ee,un.exports=ee},76374:function(un,We,m){"use strict";var c=function(){if(typeof Map!="undefined")return Map;function ue(W,P){var de=-1;return W.some(function(ae,Q){return ae[0]===P?(de=Q,!0):!1}),de}return function(){function W(){this.__entries__=[]}return Object.defineProperty(W.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),W.prototype.get=function(P){var de=ue(this.__entries__,P),ae=this.__entries__[de];return ae&&ae[1]},W.prototype.set=function(P,de){var ae=ue(this.__entries__,P);~ae?this.__entries__[ae][1]=de:this.__entries__.push([P,de])},W.prototype.delete=function(P){var de=this.__entries__,ae=ue(de,P);~ae&&de.splice(ae,1)},W.prototype.has=function(P){return!!~ue(this.__entries__,P)},W.prototype.clear=function(){this.__entries__.splice(0)},W.prototype.forEach=function(P,de){de===void 0&&(de=null);for(var ae=0,Q=this.__entries__;ae<Q.length;ae++){var E=Q[ae];P.call(de,E[1],E[0])}},W}()}(),ee=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,$=function(){return typeof m.g!="undefined"&&m.g.Math===Math?m.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),ie=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind($):function(ue){return setTimeout(function(){return ue(Date.now())},1e3/60)}}(),F=2;function g(ue,W){var P=!1,de=!1,ae=0;function Q(){P&&(P=!1,ue()),de&&C()}function E(){ie(Q)}function C(){var Y=Date.now();if(P){if(Y-ae<F)return;de=!0}else P=!0,de=!1,setTimeout(E,W);ae=Y}return C}var J=20,X=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",x=function(){function ue(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=g(this.refresh.bind(this),J)}return ue.prototype.addObserver=function(W){~this.observers_.indexOf(W)||this.observers_.push(W),this.connected_||this.connect_()},ue.prototype.removeObserver=function(W){var P=this.observers_,de=P.indexOf(W);~de&&P.splice(de,1),!P.length&&this.connected_&&this.disconnect_()},ue.prototype.refresh=function(){var W=this.updateObservers_();W&&this.refresh()},ue.prototype.updateObservers_=function(){var W=this.observers_.filter(function(P){return P.gatherActive(),P.hasActive()});return W.forEach(function(P){return P.broadcastActive()}),W.length>0},ue.prototype.connect_=function(){!ee||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),o?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},ue.prototype.disconnect_=function(){!ee||!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)},ue.prototype.onTransitionEnd_=function(W){var P=W.propertyName,de=P===void 0?"":P,ae=X.some(function(Q){return!!~de.indexOf(Q)});ae&&this.refresh()},ue.getInstance=function(){return this.instance_||(this.instance_=new ue),this.instance_},ue.instance_=null,ue}(),L=function(ue,W){for(var P=0,de=Object.keys(W);P<de.length;P++){var ae=de[P];Object.defineProperty(ue,ae,{value:W[ae],enumerable:!1,writable:!1,configurable:!0})}return ue},b=function(ue){var W=ue&&ue.ownerDocument&&ue.ownerDocument.defaultView;return W||$},S=le(0,0,0,0);function T(ue){return parseFloat(ue)||0}function B(ue){for(var W=[],P=1;P<arguments.length;P++)W[P-1]=arguments[P];return W.reduce(function(de,ae){var Q=ue["border-"+ae+"-width"];return de+T(Q)},0)}function z(ue){for(var W=["top","right","bottom","left"],P={},de=0,ae=W;de<ae.length;de++){var Q=ae[de],E=ue["padding-"+Q];P[Q]=T(E)}return P}function j(ue){var W=ue.getBBox();return le(0,0,W.width,W.height)}function U(ue){var W=ue.clientWidth,P=ue.clientHeight;if(!W&&!P)return S;var de=b(ue).getComputedStyle(ue),ae=z(de),Q=ae.left+ae.right,E=ae.top+ae.bottom,C=T(de.width),Y=T(de.height);if(de.boxSizing==="border-box"&&(Math.round(C+Q)!==W&&(C-=B(de,"left","right")+Q),Math.round(Y+E)!==P&&(Y-=B(de,"top","bottom")+E)),!K(ue)){var be=Math.round(C+Q)-W,je=Math.round(Y+E)-P;Math.abs(be)!==1&&(C-=be),Math.abs(je)!==1&&(Y-=je)}return le(ae.left,ae.top,C,Y)}var A=function(){return typeof SVGGraphicsElement!="undefined"?function(ue){return ue instanceof b(ue).SVGGraphicsElement}:function(ue){return ue instanceof b(ue).SVGElement&&typeof ue.getBBox=="function"}}();function K(ue){return ue===b(ue).document.documentElement}function I(ue){return ee?A(ue)?j(ue):U(ue):S}function M(ue){var W=ue.x,P=ue.y,de=ue.width,ae=ue.height,Q=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,E=Object.create(Q.prototype);return L(E,{x:W,y:P,width:de,height:ae,top:P,right:W+de,bottom:ae+P,left:W}),E}function le(ue,W,P,de){return{x:ue,y:W,width:P,height:de}}var me=function(){function ue(W){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=le(0,0,0,0),this.target=W}return ue.prototype.isActive=function(){var W=I(this.target);return this.contentRect_=W,W.width!==this.broadcastWidth||W.height!==this.broadcastHeight},ue.prototype.broadcastRect=function(){var W=this.contentRect_;return this.broadcastWidth=W.width,this.broadcastHeight=W.height,W},ue}(),ce=function(){function ue(W,P){var de=M(P);L(this,{target:W,contentRect:de})}return ue}(),De=function(){function ue(W,P,de){if(this.activeObservations_=[],this.observations_=new c,typeof W!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=W,this.controller_=P,this.callbackCtx_=de}return ue.prototype.observe=function(W){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(W instanceof b(W).Element))throw new TypeError('parameter 1 is not of type "Element".');var P=this.observations_;P.has(W)||(P.set(W,new me(W)),this.controller_.addObserver(this),this.controller_.refresh())}},ue.prototype.unobserve=function(W){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(W instanceof b(W).Element))throw new TypeError('parameter 1 is not of type "Element".');var P=this.observations_;P.has(W)&&(P.delete(W),P.size||this.controller_.removeObserver(this))}},ue.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},ue.prototype.gatherActive=function(){var W=this;this.clearActive(),this.observations_.forEach(function(P){P.isActive()&&W.activeObservations_.push(P)})},ue.prototype.broadcastActive=function(){if(this.hasActive()){var W=this.callbackCtx_,P=this.activeObservations_.map(function(de){return new ce(de.target,de.broadcastRect())});this.callback_.call(W,P,W),this.clearActive()}},ue.prototype.clearActive=function(){this.activeObservations_.splice(0)},ue.prototype.hasActive=function(){return this.activeObservations_.length>0},ue}(),Pe=typeof WeakMap!="undefined"?new WeakMap:new c,Ce=function(){function ue(W){if(!(this instanceof ue))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var P=x.getInstance(),de=new De(W,P,this);Pe.set(this,de)}return ue}();["observe","unobserve","disconnect"].forEach(function(ue){Ce.prototype[ue]=function(){var W;return(W=Pe.get(this))[ue].apply(W,arguments)}});var He=function(){return typeof $.ResizeObserver!="undefined"?$.ResizeObserver:Ce}();We.Z=He},62752:function(un,We){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.SizeSensorId=We.SensorTabIndex=We.SensorClassName=void 0;var m=We.SizeSensorId="size-sensor-id",c=We.SensorClassName="size-sensor-object",ee=We.SensorTabIndex="-1"},25224:function(un,We){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.default=void 0;var m=We.default=function(ee){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,ie=null;return function(){for(var F=this,g=arguments.length,J=new Array(g),X=0;X<g;X++)J[X]=arguments[X];clearTimeout(ie),ie=setTimeout(function(){ee.apply(F,J)},$)}}},82196:function(un,We){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.default=void 0;var m=1,c=We.default=function(){return"".concat(m++)}},10413:function(un,We,m){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.ver=We.clear=We.bind=void 0;var c=m(2963),ee=We.bind=function(g,J){var X=(0,c.getSensor)(g);return X.bind(J),function(){X.unbind(J)}},$=We.clear=function(g){var J=(0,c.getSensor)(g);(0,c.removeSensor)(J)},ie=We.ver="1.0.3"},2963:function(un,We,m){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.removeSensor=We.getSensor=We.Sensors=void 0;var c=ie(m(82196)),ee=m(42065),$=m(62752);function ie(o){return o&&o.__esModule?o:{default:o}}var F=We.Sensors={};function g(o){o&&F[o]&&delete F[o]}var J=We.getSensor=function(x){var L=x.getAttribute($.SizeSensorId);if(L&&F[L])return F[L];var b=(0,c.default)();x.setAttribute($.SizeSensorId,b);var S=(0,ee.createSensor)(x,function(){return g(b)});return F[b]=S,S},X=We.removeSensor=function(x){var L=x.element.getAttribute($.SizeSensorId);x.destroy(),g(L)}},42065:function(un,We,m){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.createSensor=void 0;var c=m(38132),ee=m(38950),$=We.createSensor=typeof ResizeObserver!="undefined"?ee.createSensor:c.createSensor},38132:function(un,We,m){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.createSensor=void 0;var c=$(m(25224)),ee=m(62752);function $(F){return F&&F.__esModule?F:{default:F}}var ie=We.createSensor=function(g,J){var X=void 0,o=[],x=function(){getComputedStyle(g).position==="static"&&(g.style.position="relative");var z=document.createElement("object");return z.onload=function(){z.contentDocument.defaultView.addEventListener("resize",L),L()},z.style.display="block",z.style.position="absolute",z.style.top="0",z.style.left="0",z.style.height="100%",z.style.width="100%",z.style.overflow="hidden",z.style.pointerEvents="none",z.style.zIndex="-1",z.style.opacity="0",z.setAttribute("class",ee.SensorClassName),z.setAttribute("tabindex",ee.SensorTabIndex),z.type="text/html",g.appendChild(z),z.data="about:blank",z},L=(0,c.default)(function(){o.forEach(function(B){B(g)})}),b=function(z){X||(X=x()),o.indexOf(z)===-1&&o.push(z)},S=function(){X&&X.parentNode&&(X.contentDocument&&X.contentDocument.defaultView.removeEventListener("resize",L),X.parentNode.removeChild(X),g.removeAttribute(ee.SizeSensorId),X=void 0,o=[],J&&J())},T=function(z){var j=o.indexOf(z);j!==-1&&o.splice(j,1),o.length===0&&X&&S()};return{element:g,bind:b,destroy:S,unbind:T}}},38950:function(un,We,m){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.createSensor=void 0;var c=m(62752),ee=$(m(25224));function $(F){return F&&F.__esModule?F:{default:F}}var ie=We.createSensor=function(g,J){var X=void 0,o=[],x=(0,ee.default)(function(){o.forEach(function(B){B(g)})}),L=function(){var z=new ResizeObserver(x);return z.observe(g),x(),z},b=function(z){X||(X=L()),o.indexOf(z)===-1&&o.push(z)},S=function(){X&&X.disconnect(),o=[],X=void 0,g.removeAttribute(c.SizeSensorId),J&&J()},T=function(z){var j=o.indexOf(z);j!==-1&&o.splice(j,1),o.length===0&&X&&S()};return{element:g,bind:b,destroy:S,unbind:T}}},98040:function(un){un.exports=function(){var We=document.getSelection();if(!We.rangeCount)return function(){};for(var m=document.activeElement,c=[],ee=0;ee<We.rangeCount;ee++)c.push(We.getRangeAt(ee));switch(m.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":m.blur();break;default:m=null;break}return We.removeAllRanges(),function(){We.type==="Caret"&&We.removeAllRanges(),We.rangeCount||c.forEach(function($){We.addRange($)}),m&&m.focus()}}},93314:function(un){"use strict";un.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},16471:function(un,We,m){"use strict";m.d(We,{ZP:function(){return bo}});const c=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},ee=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=$},$=Number.MAX_SAFE_INTEGER||9007199254740991;let ie=function(a){return a.NETWORK_ERROR="networkError",a.MEDIA_ERROR="mediaError",a.KEY_SYSTEM_ERROR="keySystemError",a.MUX_ERROR="muxError",a.OTHER_ERROR="otherError",a}({}),F=function(a){return a.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",a.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",a.KEY_SYSTEM_NO_SESSION="keySystemNoSession",a.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",a.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",a.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",a.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",a.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",a.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",a.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",a.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",a.MANIFEST_LOAD_ERROR="manifestLoadError",a.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",a.MANIFEST_PARSING_ERROR="manifestParsingError",a.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",a.LEVEL_EMPTY_ERROR="levelEmptyError",a.LEVEL_LOAD_ERROR="levelLoadError",a.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",a.LEVEL_PARSING_ERROR="levelParsingError",a.LEVEL_SWITCH_ERROR="levelSwitchError",a.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",a.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",a.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",a.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",a.FRAG_LOAD_ERROR="fragLoadError",a.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",a.FRAG_DECRYPT_ERROR="fragDecryptError",a.FRAG_PARSING_ERROR="fragParsingError",a.FRAG_GAP="fragGap",a.REMUX_ALLOC_ERROR="remuxAllocError",a.KEY_LOAD_ERROR="keyLoadError",a.KEY_LOAD_TIMEOUT="keyLoadTimeOut",a.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",a.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",a.BUFFER_APPEND_ERROR="bufferAppendError",a.BUFFER_APPENDING_ERROR="bufferAppendingError",a.BUFFER_STALLED_ERROR="bufferStalledError",a.BUFFER_FULL_ERROR="bufferFullError",a.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",a.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",a.ASSET_LIST_LOAD_ERROR="assetListLoadError",a.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",a.ASSET_LIST_PARSING_ERROR="assetListParsingError",a.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",a.INTERNAL_EXCEPTION="internalException",a.INTERNAL_ABORTED="aborted",a.ATTACH_MEDIA_ERROR="attachMediaError",a.UNKNOWN="unknown",a}({}),g=function(a){return a.MEDIA_ATTACHING="hlsMediaAttaching",a.MEDIA_ATTACHED="hlsMediaAttached",a.MEDIA_DETACHING="hlsMediaDetaching",a.MEDIA_DETACHED="hlsMediaDetached",a.MEDIA_ENDED="hlsMediaEnded",a.STALL_RESOLVED="hlsStallResolved",a.BUFFER_RESET="hlsBufferReset",a.BUFFER_CODECS="hlsBufferCodecs",a.BUFFER_CREATED="hlsBufferCreated",a.BUFFER_APPENDING="hlsBufferAppending",a.BUFFER_APPENDED="hlsBufferAppended",a.BUFFER_EOS="hlsBufferEos",a.BUFFERED_TO_END="hlsBufferedToEnd",a.BUFFER_FLUSHING="hlsBufferFlushing",a.BUFFER_FLUSHED="hlsBufferFlushed",a.MANIFEST_LOADING="hlsManifestLoading",a.MANIFEST_LOADED="hlsManifestLoaded",a.MANIFEST_PARSED="hlsManifestParsed",a.LEVEL_SWITCHING="hlsLevelSwitching",a.LEVEL_SWITCHED="hlsLevelSwitched",a.LEVEL_LOADING="hlsLevelLoading",a.LEVEL_LOADED="hlsLevelLoaded",a.LEVEL_UPDATED="hlsLevelUpdated",a.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",a.LEVELS_UPDATED="hlsLevelsUpdated",a.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",a.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",a.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",a.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",a.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",a.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",a.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",a.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",a.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",a.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",a.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",a.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",a.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",a.CUES_PARSED="hlsCuesParsed",a.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",a.INIT_PTS_FOUND="hlsInitPtsFound",a.FRAG_LOADING="hlsFragLoading",a.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",a.FRAG_LOADED="hlsFragLoaded",a.FRAG_DECRYPTED="hlsFragDecrypted",a.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",a.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",a.FRAG_PARSING_METADATA="hlsFragParsingMetadata",a.FRAG_PARSED="hlsFragParsed",a.FRAG_BUFFERED="hlsFragBuffered",a.FRAG_CHANGED="hlsFragChanged",a.FPS_DROP="hlsFpsDrop",a.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",a.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",a.ERROR="hlsError",a.DESTROYING="hlsDestroying",a.KEY_LOADING="hlsKeyLoading",a.KEY_LOADED="hlsKeyLoaded",a.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",a.BACK_BUFFER_REACHED="hlsBackBufferReached",a.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",a.ASSET_LIST_LOADING="hlsAssetListLoading",a.ASSET_LIST_LOADED="hlsAssetListLoaded",a.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",a.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",a.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",a.INTERSTITIAL_STARTED="hlsInterstitialStarted",a.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",a.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",a.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",a.INTERSTITIAL_ENDED="hlsInterstitialEnded",a.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",a.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",a.EVENT_CUE_ENTER="hlsEventCueEnter",a}({});var J={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},X={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class o{constructor(e,t=0,n=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class x{constructor(e,t,n,r=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new o(e),this.fast_=new o(t),this.defaultTTFB_=r,this.ttfb_=new o(e)}update(e,t){const{slow_:n,fast_:r,ttfb_:i}=this;n.halfLife!==e&&(this.slow_=new o(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new o(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new o(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const n=8*t,r=e/1e3,i=n/r;this.fast_.sample(r,i),this.slow_.sample(r,i)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function L(a,e,t){return(e=z(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function b(){return b=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(a[n]=t[n])}return a},b.apply(null,arguments)}function S(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(a,r).enumerable})),t.push.apply(t,n)}return t}function T(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?S(Object(t),!0).forEach(function(n){L(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):S(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function B(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function z(a){var e=B(a,"string");return typeof e=="symbol"?e:e+""}class j{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=U,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 U=function(){},A={trace:U,debug:U,log:U,warn:U,info:U,error:U};function K(){return b({},A)}function I(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):U}function M(a,e,t){return e[a]?e[a].bind(e):I(a,t)}const le=K();function me(a,e,t){const n=K();if(typeof console=="object"&&a===!0||typeof a=="object"){const r=["debug","log","info","warn","error"];r.forEach(i=>{n[i]=M(i,a,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.15`)}catch(i){return K()}r.forEach(i=>{le[i]=M(i,a)})}else b(le,n);return n}const ce=le;function De(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Pe(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function Ce(a,e){const t=Object.keys(a),n=Object.keys(e),r=t.length,i=n.length;return!r||!i||r===i&&!t.some(s=>n.indexOf(s)===-1)}function He(a,e=!1){if(typeof TextDecoder!="undefined"){const h=new TextDecoder("utf-8").decode(a);if(e){const v=h.indexOf("\0");return v!==-1?h.substring(0,v):h}return h.replace(/\0/g,"")}const t=a.length;let n,r,i,s="",u=0;for(;u<t;){if(n=a[u++],n===0&&e)return s;if(n===0||n===3)continue;switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(n);break;case 12:case 13:r=a[u++],s+=String.fromCharCode((n&31)<<6|r&63);break;case 14:r=a[u++],i=a[u++],s+=String.fromCharCode((n&15)<<12|(r&63)<<6|(i&63)<<0);break}}return s}function ue(a){let e="";for(let t=0;t<a.length;t++){let n=a[t].toString(16);n.length<2&&(n="0"+n),e+=n}return e}function W(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function P(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var de={exports:{}},ae;function Q(){return ae||(ae=1,function(a,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,u={buildAbsoluteURL:function(p,h,v){if(v=v||{},p=p.trim(),h=h.trim(),!h){if(!v.alwaysNormalize)return p;var _=u.parseURL(p);if(!_)throw new Error("Error trying to parse base URL.");return _.path=u.normalizePath(_.path),u.buildURLFromParts(_)}var k=u.parseURL(h);if(!k)throw new Error("Error trying to parse relative URL.");if(k.scheme)return v.alwaysNormalize?(k.path=u.normalizePath(k.path),u.buildURLFromParts(k)):h;var V=u.parseURL(p);if(!V)throw new Error("Error trying to parse base URL.");if(!V.netLoc&&V.path&&V.path[0]!=="/"){var G=r.exec(V.path);V.netLoc=G[1],V.path=G[2]}V.netLoc&&!V.path&&(V.path="/");var we={scheme:V.scheme,netLoc:k.netLoc,path:null,params:k.params,query:k.query,fragment:k.fragment};if(!k.netLoc&&(we.netLoc=V.netLoc,k.path[0]!=="/"))if(!k.path)we.path=V.path,k.params||(we.params=V.params,k.query||(we.query=V.query));else{var Se=V.path,Je=Se.substring(0,Se.lastIndexOf("/")+1)+k.path;we.path=u.normalizePath(Je)}return we.path===null&&(we.path=v.alwaysNormalize?u.normalizePath(k.path):k.path),u.buildURLFromParts(we)},parseURL:function(p){var h=n.exec(p);return h?{scheme:h[1]||"",netLoc:h[2]||"",path:h[3]||"",params:h[4]||"",query:h[5]||"",fragment:h[6]||""}:null},normalizePath:function(p){for(p=p.split("").reverse().join("").replace(i,"");p.length!==(p=p.replace(s,"")).length;);return p.split("").reverse().join("")},buildURLFromParts:function(p){return p.scheme+p.netLoc+p.path+p.params+p.query+p.fragment}};a.exports=u})()}(de)),de.exports}var E=Q();class C{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var Y={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class be{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={[Y.AUDIO]:null,[Y.VIDEO]:null,[Y.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 C),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=E.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[Y.AUDIO]=null,e[Y.VIDEO]=null,e[Y.AUDIOVIDEO]=null}}function je(a){return a.sn!=="initSegment"}class lt extends be{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange.length){const e=this.byteRange[0],t=this.byteRange[1];if(c(e)&&c(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){var e;const{levelkeys:t}=this;if(!t||t.NONE)return null;if(t.identity)this._decryptdata||(this._decryptdata=t.identity.getDecryptData(this.sn));else if(!((e=this._decryptdata)!=null&&e.keyId)){const n=Object.keys(t);if(n.length===1){const r=this._decryptdata=t[n[0]]||null;r&&(this._decryptdata=r.getDecryptData(this.sn,t))}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=c(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){var t;const n=Object.keys(this.levelkeys),r=n.length;if(r>1||r===1&&(t=this.levelkeys[n[0]])!=null&&t.encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!c(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return je(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){const t=this.levelkeys;if(t){var n;const r=t[e];r&&!((n=this._decryptdata)!=null&&n.keyId)&&(this._decryptdata=r.getDecryptData(this.sn,t))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,n,r,i,s=!1){const{elementaryStreams:u}=this,p=u[e];if(!p){u[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:s};return}p.startPTS=Math.min(p.startPTS,t),p.endPTS=Math.max(p.endPTS,n),p.startDTS=Math.min(p.startDTS,r),p.endDTS=Math.max(p.endDTS,i)}}class ke extends be{constructor(e,t,n,r,i){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=r;const s=e.enumeratedString("BYTERANGE");s&&this.setByteRange(s,i),i&&(this.fragOffset=i.fragOffset+i.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function Ye(a,e){const t=Object.getPrototypeOf(a);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||Ye(t,e)}}function et(a,e){const t=Ye(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const _t=Math.pow(2,32)-1,Re=[].push,At={video:1,audio:2,id3:3,text:4};function rt(a){return String.fromCharCode.apply(null,a)}function Nt(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function Xe(a,e){const t=Ne(a,e);return t<0?4294967296+t:t}function Ge(a,e){let t=Xe(a,e);return t*=Math.pow(2,32),t+=Xe(a,e+4),t}function Ne(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function Ie(a){const e=a.byteLength;for(let t=0;t<e;){const n=Xe(a,t);if(n>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=n>1?t+n:e}return!1}function te(a,e){const t=[];if(!e.length)return t;const n=a.byteLength;for(let r=0;r<n;){const i=Xe(a,r),s=rt(a.subarray(r+4,r+8)),u=i>1?r+i:n;if(s===e[0])if(e.length===1)t.push(a.subarray(r+8,u));else{const p=te(a.subarray(r+8,u),e.slice(1));p.length&&Re.apply(t,p)}r=u}return t}function $e(a){const e=[],t=a[0];let n=8;const r=Xe(a,n);n+=4;let i=0,s=0;t===0?(i=Xe(a,n),s=Xe(a,n+4),n+=8):(i=Ge(a,n),s=Ge(a,n+8),n+=16),n+=2;let u=a.length+s;const p=Nt(a,n);n+=2;for(let h=0;h<p;h++){let v=n;const _=Xe(a,v);v+=4;const k=_&2147483647;if((_&2147483648)>>>31===1)return ce.warn("SIDX has hierarchical references (not supported)"),null;const G=Xe(a,v);v+=4,e.push({referenceSize:k,subsegmentDuration:G,info:{duration:G/r,start:u,end:u+k-1}}),u+=k,v+=4,n=v}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:p,references:e}}function Ae(a){const e=[],t=te(a,["moov","trak"]);for(let r=0;r<t.length;r++){const i=t[r],s=te(i,["tkhd"])[0];if(s){let u=s[0];const p=Xe(s,u===0?12:20),h=te(i,["mdia","mdhd"])[0];if(h){u=h[0];const v=Xe(h,u===0?12:20),_=te(i,["mdia","hdlr"])[0];if(_){const k=rt(_.subarray(8,12)),V={soun:Y.AUDIO,vide:Y.VIDEO}[k],G=te(i,["mdia","minf","stbl","stsd"])[0],we=Z(G);V?(e[p]={timescale:v,type:V,stsd:we},e[V]=T({timescale:v,id:p},we)):e[p]={timescale:v,type:k,stsd:we}}}}}return te(a,["moov","mvex","trex"]).forEach(r=>{const i=Xe(r,4),s=e[i];s&&(s.default={duration:Xe(r,12),flags:Xe(r,20)})}),e}function Z(a){const e=a.subarray(8),t=e.subarray(86),n=rt(e.subarray(4,8));let r=n,i;const s=n==="enca"||n==="encv";if(s){const h=te(e,[n])[0].subarray(n==="enca"?28:78);te(h,["sinf"]).forEach(_=>{const k=te(_,["schm"])[0];if(k){const V=rt(k.subarray(4,8));if(V==="cbcs"||V==="cenc"){const G=te(_,["frma"])[0];G&&(r=rt(G))}}})}const u=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const p=te(t,["avcC"])[0];p&&p.length>3&&(r+="."+pe(p[1])+pe(p[2])+pe(p[3]),i=D(u==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const p=te(e,[n])[0],h=te(p.subarray(28),["esds"])[0];if(h&&h.length>7){let v=4;if(h[v++]!==3)break;v=_e(h,v),v+=2;const _=h[v++];if(_&128&&(v+=2),_&64&&(v+=h[v++]),h[v++]!==4)break;v=_e(h,v);const k=h[v++];if(k===64)r+="."+pe(k);else break;if(v+=12,h[v++]!==5)break;v=_e(h,v);const V=h[v++];let G=(V&248)>>3;G===31&&(G+=1+((V&7)<<3)+((h[v]&224)>>5)),r+="."+G}break}case"hvc1":case"hev1":{const p=te(t,["hvcC"])[0];if(p&&p.length>12){const h=p[1],v=["","A","B","C"][h>>6],_=h&31,k=Xe(p,2),V=(h&32)>>5?"H":"L",G=p[12],we=p.subarray(6,12);r+="."+v+_,r+="."+he(k).toString(16).toUpperCase(),r+="."+V+G;let Se="";for(let Je=we.length;Je--;){const ot=we[Je];(ot||Se)&&(Se="."+ot.toString(16).toUpperCase()+Se)}r+=Se}i=D(u=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=D(r,t)||r;break}case"vp09":{const p=te(t,["vpcC"])[0];if(p&&p.length>6){const h=p[4],v=p[5],_=p[6]>>4&15;r+="."+Ee(h)+"."+Ee(v)+"."+Ee(_)}break}case"av01":{const p=te(t,["av1C"])[0];if(p&&p.length>2){const h=p[1]>>>5,v=p[1]&31,_=p[2]>>>7?"H":"M",k=(p[2]&64)>>6,V=(p[2]&32)>>5,G=h===2&&k?V?12:10:k?10:8,we=(p[2]&16)>>4,Se=(p[2]&8)>>3,Je=(p[2]&4)>>2,ot=p[2]&3;r+="."+h+"."+Ee(v)+_+"."+Ee(G)+"."+we+"."+Se+Je+ot+"."+Ee(1)+"."+Ee(1)+"."+Ee(1)+"."+0,i=D("dav1",t)}break}}return{codec:r,encrypted:s,supplemental:i}}function D(a,e){const t=te(e,["dvvC"]),n=t.length?t[0]:te(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,i=n[2]<<5&32|n[3]>>3&31;return a+"."+Ee(r)+"."+Ee(i)}}function he(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function _e(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function pe(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function Ee(a){return(a<10?"0":"")+a}function Oe(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&re(a,(n,r)=>{const i=n.subarray(8,24);i.some(s=>s!==0)||(ce.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${ue(i)} -> ${ue(t)}`),n.set(t,8))})}function Ze(a){const e=[];return re(a,t=>e.push(t.subarray(8,24))),e}function re(a,e){te(a,["moov","trak"]).forEach(n=>{const r=te(n,["mdia","minf","stbl","stsd"])[0];if(!r)return;const i=r.subarray(8);let s=te(i,["enca"]);const u=s.length>0;u||(s=te(i,["encv"])),s.forEach(p=>{const h=u?p.subarray(28):p.subarray(78);te(h,["sinf"]).forEach(_=>{const k=fe(_);k&&e(k,u)})})})}function fe(a){const e=te(a,["schm"])[0];if(e){const t=rt(e.subarray(4,8));if(t==="cbcs"||t==="cenc"){const n=te(a,["schi","tenc"])[0];if(n)return n}}}function st(a,e,t){const n={},r=te(a,["moof","traf"]);for(let i=0;i<r.length;i++){const s=r[i],u=te(s,["tfhd"])[0],p=Xe(u,4),h=e[p];if(!h)continue;n[p]||(n[p]={start:NaN,duration:0,sampleCount:0,timescale:h.timescale,type:h.type});const v=n[p],_=te(s,["tfdt"])[0];if(_){const ft=_[0];let Pt=Xe(_,4);ft===1&&(Pt===_t?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(Pt*=_t+1,Pt+=Xe(_,8))),c(Pt)&&(!c(v.start)||Pt<v.start)&&(v.start=Pt)}const k=h.default,V=Xe(u,0)|(k==null?void 0:k.flags);let G=(k==null?void 0:k.duration)||0;V&8&&(V&2?G=Xe(u,12):G=Xe(u,8));const we=te(s,["trun"]);let Se=v.start||0,Je=0,ot=G;for(let ft=0;ft<we.length;ft++){const Pt=we[ft],Kt=Xe(Pt,4),xn=v.sampleCount;v.sampleCount+=Kt;const Ht=Pt[3]&1,cn=Pt[3]&4,ln=Pt[2]&1,Yt=Pt[2]&2,kn=Pt[2]&4,pr=Pt[2]&8;let kr=8,Wr=Kt;for(Ht&&(kr+=4),cn&&Kt&&(!(Pt[kr+1]&1)&&v.keyFrameIndex===void 0&&(v.keyFrameIndex=xn),kr+=4,ln?(ot=Xe(Pt,kr),kr+=4):ot=G,Yt&&(kr+=4),pr&&(kr+=4),Se+=ot,Je+=ot,Wr--);Wr--;)ln?(ot=Xe(Pt,kr),kr+=4):ot=G,Yt&&(kr+=4),kn&&(Pt[kr+1]&1||v.keyFrameIndex===void 0&&(v.keyFrameIndex=v.sampleCount-(Wr+1),v.keyFrameStart=Se),kr+=4),pr&&(kr+=4),Se+=ot,Je+=ot;!Je&&G&&(Je+=G*Kt)}v.duration+=Je}if(!Object.keys(n).some(i=>n[i].duration)){let i=1/0,s=0;const u=te(a,["sidx"]);for(let p=0;p<u.length;p++){const h=$e(u[p]);if(h!=null&&h.references){i=Math.min(i,h.earliestPresentationTime/h.timescale);const v=h.references.reduce((_,k)=>_+k.info.duration||0,0);s=Math.max(s,v+h.earliestPresentationTime/h.timescale)}}s&&c(s)&&Object.keys(n).forEach(p=>{n[p].duration||(n[p].duration=s*n[p].timescale-n[p].start)})}return n}function tt(a){const e={valid:null,remainder:null},t=te(a,["moof"]);if(t.length<2)return e.remainder=a,e;const n=t[t.length-1];return e.valid=a.slice(0,n.byteOffset-8),e.remainder=a.slice(n.byteOffset-8),e}function ct(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function ut(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return te(n,["moof"]).map(p=>{const h=p.byteOffset-8;te(p,["traf"]).map(_=>{const k=te(_,["tfdt"]).map(V=>{const G=V[0];let we=Xe(V,4);return G===1&&(we*=Math.pow(2,32),we+=Xe(V,8)),we/r})[0];return k!==void 0&&(a=k),te(_,["tfhd"]).map(V=>{const G=Xe(V,4),we=Xe(V,0)&16777215,Se=(we&1)!==0,Je=(we&2)!==0,ot=(we&8)!==0;let ft=0;const Pt=(we&16)!==0;let Kt=0;const xn=(we&32)!==0;let Ht=8;G===i&&(Se&&(Ht+=8),Je&&(Ht+=4),ot&&(ft=Xe(V,Ht),Ht+=4),Pt&&(Kt=Xe(V,Ht),Ht+=4),xn&&(Ht+=4),e.type==="video"&&(s=Ue(e.codec)),te(_,["trun"]).map(cn=>{const ln=cn[0],Yt=Xe(cn,0)&16777215,kn=(Yt&1)!==0;let pr=0;const kr=(Yt&4)!==0,Wr=(Yt&256)!==0;let Nr=0;const lr=(Yt&512)!==0;let Br=0;const wr=(Yt&1024)!==0,jr=(Yt&2048)!==0;let oi=0;const fr=Xe(cn,4);let hr=8;kn&&(pr=Xe(cn,hr),hr+=4),kr&&(hr+=4);let Si=pr+h;for(let is=0;is<fr;is++){if(Wr?(Nr=Xe(cn,hr),hr+=4):Nr=ft,lr?(Br=Xe(cn,hr),hr+=4):Br=Kt,wr&&(hr+=4),jr&&(ln===0?oi=Xe(cn,hr):oi=Ne(cn,hr),hr+=4),e.type===Y.VIDEO){let Ai=0;for(;Ai<Br;){const Zi=Xe(n,Si);if(Si+=4,xt(s,n[Si])){const ia=n.subarray(Si,Si+Zi);dt(ia,s?2:1,a+oi/r,t)}Si+=Zi,Ai+=Zi+4}}a+=Nr/r}}))})})}),t}function Ue(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function xt(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function dt(a,e,t,n){const r=gt(a);let i=0;i+=e;let s=0,u=0,p=0;for(;i<r.length;){s=0;do{if(i>=r.length)break;p=r[i++],s+=p}while(p===255);u=0;do{if(i>=r.length)break;p=r[i++],u+=p}while(p===255);const h=r.length-i;let v=i;if(u<h)i+=u;else if(u>h){ce.error(`Malformed SEI payload. ${u} is too small, only ${h} bytes left to parse.`);break}if(s===4){if(r[v++]===181){const k=Nt(r,v);if(v+=2,k===49){const V=Xe(r,v);if(v+=4,V===1195456820){const G=r[v++];if(G===3){const we=r[v++],Se=31&we,Je=64&we,ot=Je?2+Se*3:0,ft=new Uint8Array(ot);if(Je){ft[0]=we;for(let Pt=1;Pt<ot;Pt++)ft[Pt]=r[v++]}n.push({type:G,payloadType:s,pts:t,bytes:ft})}}}}}else if(s===5&&u>16){const _=[];for(let G=0;G<16;G++){const we=r[v++].toString(16);_.push(we.length==1?"0"+we:we),(G===3||G===5||G===7||G===9)&&_.push("-")}const k=u-16,V=new Uint8Array(k);for(let G=0;G<k;G++)V[G]=r[v++];n.push({payloadType:s,pts:t,uuid:_.join(""),userData:He(V),userDataBytes:V})}}}function gt(a){const e=a.byteLength,t=[];let n=1;for(;n<e-2;)a[n]===0&&a[n+1]===0&&a[n+2]===3?(t.push(n+2),n+=2):n++;if(t.length===0)return a;const r=e-t.length,i=new Uint8Array(r);let s=0;for(n=0;n<r;s++,n++)s===t[0]&&(s++,t.shift()),i[n]=a[s];return i}function kt(a){const e=a[0];let t="",n="",r=0,i=0,s=0,u=0,p=0,h=0;if(e===0){for(;rt(a.subarray(h,h+1))!=="\0";)t+=rt(a.subarray(h,h+1)),h+=1;for(t+=rt(a.subarray(h,h+1)),h+=1;rt(a.subarray(h,h+1))!=="\0";)n+=rt(a.subarray(h,h+1)),h+=1;n+=rt(a.subarray(h,h+1)),h+=1,r=Xe(a,12),i=Xe(a,16),u=Xe(a,20),p=Xe(a,24),h=28}else if(e===1){h+=4,r=Xe(a,h),h+=4;const _=Xe(a,h);h+=4;const k=Xe(a,h);for(h+=4,s=lc(2,32)*_+k,ee(s)||(s=Number.MAX_SAFE_INTEGER,ce.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),u=Xe(a,h),h+=4,p=Xe(a,h),h+=4;rt(a.subarray(h,h+1))!=="\0";)t+=rt(a.subarray(h,h+1)),h+=1;for(t+=rt(a.subarray(h,h+1)),h+=1;rt(a.subarray(h,h+1))!=="\0";)n+=rt(a.subarray(h,h+1)),h+=1;n+=rt(a.subarray(h,h+1)),h+=1}const v=a.subarray(h,a.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:s,presentationTimeDelta:i,eventDuration:u,id:p,payload:v}}function w(a,...e){const t=e.length;let n=8,r=t;for(;r--;)n+=e[r].byteLength;const i=new Uint8Array(n);for(i[0]=n>>24&255,i[1]=n>>16&255,i[2]=n>>8&255,i[3]=n&255,i.set(a,4),r=0,n=8;r<t;r++)i.set(e[r],n),n+=e[r].byteLength;return i}function O(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let n,r;n=0,r=new Uint8Array;let i;n>0?(i=new Uint8Array(4),e.length>0&&new DataView(i.buffer).setUint32(0,e.length,!1)):i=new Uint8Array;const s=new Uint8Array(4);return t.byteLength>0&&new DataView(s.buffer).setUint32(0,t.byteLength,!1),w([112,115,115,104],new Uint8Array([n,0,0,0]),a,i,r,s,t)}function qe(a){const e=[];if(a instanceof ArrayBuffer){const t=a.byteLength;let n=0;for(;n+32<t;){const r=new DataView(a,n),i=oe(r);e.push(i),n+=i.size}}return e}function oe(a){const e=a.getUint32(0),t=a.byteOffset,n=a.byteLength;if(n<e)return{offset:t,size:n};if(a.getUint32(4)!==1886614376)return{offset:t,size:e};const i=a.getUint32(8)>>>24;if(i!==0&&i!==1)return{offset:t,size:e};const s=a.buffer,u=ue(new Uint8Array(s,t+12,16));let p=null,h=null,v=0;if(i===0)v=28;else{const k=a.getUint32(28);if(!k||n<32+k*16)return{offset:t,size:e};p=[];for(let V=0;V<k;V++)p.push(new Uint8Array(s,t+32+V*16,16));v=32+k*16}if(!v)return{offset:t,size:e};const _=a.getUint32(v);return e-32<_?{offset:t,size:e}:(h=new Uint8Array(s,t+v+4,_),{version:i,systemId:u,kids:p,data:h,offset:t,size:e})}const xe=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),jt={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 Qe(a,e){const t=jt[e];return!!t&&!!t[a.slice(0,4)]}function at(a,e,t=!0){return!a.split(",").some(n=>!bt(n,e,t))}function bt(a,e,t=!0){var n;const r=De(t);return(n=r==null?void 0:r.isTypeSupported(ge(a,e)))!=null?n:!1}function ge(a,e){return`${e}/mp4;codecs=${a}`}function ye(a){if(a){const e=a.substring(0,4);return jt.video[e]}return 2}function Fe(a){const e=xe();return a.split(",").reduce((t,n)=>{const i=e&&Ue(n)?9:jt.video[n];return i?(i*2+t)/(t?3:2):(jt.audio[n]+t)/(t?2:1)},0)}const ze={};function q(a,e=!0){if(ze[a])return ze[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[a];for(let r=0;r<t.length;r++){var n;if(bt(t[r],"audio",e))return ze[a]=t[r],t[r];if(t[r]==="mp3"&&(n=De(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const Mt=/flac|opus|mp4a\.40\.34/i;function Be(a,e=!0){return a.replace(Mt,t=>q(t.toLowerCase(),e))}function Gt(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)Qe(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function pn(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(En(a,"audio")||En(a,"video")))return a;if(e){const t=e.split(",");if(t.length>1){if(a){for(let n=t.length;n--;)if(t[n].substring(0,4)===a.substring(0,4))return t[n]}return t[0]}}return e||a}function En(a,e){return Qe(a,e)&&bt(a,e)}function sr(a){const e=a.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");n.length>2&&n[0]==="avc1"&&(e[t]=`avc1.${parseInt(n[1]).toString(16)}${("000"+parseInt(n[2]).toString(16)).slice(-4)}`)}return e.join(",")}function Xn(a){if(a.startsWith("av01.")){const e=a.split("."),t=["0","111","01","01","01","0"];for(let n=e.length;n>4&&n<10;n++)e[n]=t[n-4];return e.join(".")}return a}function Wn(a){const e=De(a)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function Cr(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const Rr={supported:!0,powerEfficient:!0,smooth:!0},Qn={supported:!1,smooth:!1,powerEfficient:!1},gr={supported:!0,configurations:[],decodingInfoResults:[Rr]};function Cn(a,e){return{supported:!1,configurations:e,decodingInfoResults:[Qn],error:a}}function tn(a,e,t,n,r,i){const s=a.videoCodec,u=a.audioCodec?a.audioGroups:null,p=i==null?void 0:i.audioCodec,h=i==null?void 0:i.channels,v=h?parseInt(h):p?1/0:2;let _=null;if(u!=null&&u.length)try{u.length===1&&u[0]?_=e.groups[u[0]].channels:_=u.reduce((k,V)=>{if(V){const G=e.groups[V];if(!G)throw new Error(`Audio track group ${V} not found`);Object.keys(G.channels).forEach(we=>{k[we]=(k[we]||0)+G.channels[we]})}return k},{2:0})}catch(k){return!0}return s!==void 0&&(s.split(",").some(k=>Ue(k))||a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(n,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(r,8e6))||!!_&&c(v)&&Object.keys(_).some(k=>parseInt(k)>v)}function dn(a,e,t,n={}){const r=a.videoCodec;if(!r&&!a.audioCodec||!t)return Promise.resolve(gr);const i=[],s=Vn(a),u=s.length,p=vr(a,e,u>0),h=p.length;for(let v=u||1*h||1;v--;){const _={type:"media-source"};if(u&&(_.video=s[v%u]),h){_.audio=p[v%h];const k=_.audio.bitrate;_.video&&k&&(_.video.bitrate-=k)}i.push(_)}if(r){const v=navigator.userAgent;if(r.split(",").some(_=>Ue(_))&&xe())return Promise.resolve(Cn(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${v})`),i))}return Promise.all(i.map(v=>{const _=Me(v);return n[_]||(n[_]=t.decodingInfo(v))})).then(v=>({supported:!v.some(_=>!_.supported),configurations:i,decodingInfoResults:v})).catch(v=>({supported:!1,configurations:i,decodingInfoResults:[],error:v}))}function Vn(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),n=wt(a),r=a.width||640,i=a.height||480,s=a.frameRate||30,u=a.videoRange.toLowerCase();return t?t.map(p=>{const h={contentType:ge(Xn(p),"video"),width:r,height:i,bitrate:n,framerate:s};return u!=="sdr"&&(h.transferFunction=u),h}):[]}function vr(a,e,t){var n;const r=(n=a.audioCodec)==null?void 0:n.split(","),i=wt(a);return r&&a.audioGroups?a.audioGroups.reduce((s,u)=>{var p;const h=u?(p=e.groups[u])==null?void 0:p.tracks:null;return h?h.reduce((v,_)=>{if(_.groupId===u){const k=parseFloat(_.channels||"");r.forEach(V=>{const G={contentType:ge(V,"audio"),bitrate:t?Et(V,i):i};k&&(G.channels=""+k),v.push(G)})}return v},s):s},[]):[]}function Et(a,e){if(e<=1)return 1;let t=128e3;return a==="ec-3"?t=768e3:a==="ac-3"&&(t=64e4),Math.min(e/2,t)}function wt(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function Me(a){let e="";const{audio:t,video:n}=a;if(n){const r=Cr(n.contentType);e+=`${r}_r${n.height}x${n.width}f${Math.ceil(n.framerate)}${n.transferFunction||"sd"}_${Math.ceil(n.bitrate/1e5)}`}if(t){const r=Cr(t.contentType);e+=`${n?"_":""}${r}_c${t.channels}`}return e}const nt=["NONE","TYPE-0","TYPE-1",null];function vt(a){return nt.indexOf(a)>-1}const yt=["SDR","PQ","HLG"];function Tt(a){return!!a&&yt.indexOf(a)>-1}var Jt={No:"",Yes:"YES",v2:"v2"};function mn(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?Jt.v2:Jt.Yes:Jt.No}class yn{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 Wt{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 gn(this._audioGroups,e)}hasSubtitleGroup(e){return gn(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 gn(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Ln(){if(typeof matchMedia=="function"){const a=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(a.media!==e.media)return a.matches===!0}return!1}function vn(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||yt.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&Ln(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const ht=a=>{const e=new WeakSet;return(t,n)=>{if(a&&(n=a(t,n)),typeof n=="object"&&n!==null){if(e.has(n))return;e.add(n)}return n}},Ct=(a,e)=>JSON.stringify(a,ht(e));function Zt(a,e,t,n,r){const i=Object.keys(a),s=n==null?void 0:n.channels,u=n==null?void 0:n.audioCodec,p=r==null?void 0:r.videoCodec,h=s&&parseInt(s)===2;let v=!1,_=!1,k=1/0,V=1/0,G=1/0,we=1/0,Se=0,Je=[];const{preferHDR:ot,allowedVideoRanges:ft}=vn(e,r);for(let cn=i.length;cn--;){const ln=a[i[cn]];v||(v=ln.channels[2]>0),k=Math.min(k,ln.minHeight),V=Math.min(V,ln.minFramerate),G=Math.min(G,ln.minBitrate),ft.filter(kn=>ln.videoRanges[kn]>0).length>0&&(_=!0)}k=c(k)?k:0,V=c(V)?V:0;const Pt=Math.max(1080,k),Kt=Math.max(30,V);G=c(G)?G:t,t=Math.max(G,t),_||(e=void 0);const xn=i.length>1;return{codecSet:i.reduce((cn,ln)=>{const Yt=a[ln];if(ln===cn)return cn;if(Je=_?ft.filter(kn=>Yt.videoRanges[kn]>0):[],xn){if(Yt.minBitrate>t)return Lt(ln,`min bitrate of ${Yt.minBitrate} > current estimate of ${t}`),cn;if(!Yt.hasDefaultAudio)return Lt(ln,"no renditions with default or auto-select sound found"),cn;if(u&&ln.indexOf(u.substring(0,4))%5!==0)return Lt(ln,`audio codec preference "${u}" not found`),cn;if(s&&!h){if(!Yt.channels[s])return Lt(ln,`no renditions with ${s} channel sound found (channels options: ${Object.keys(Yt.channels)})`),cn}else if((!u||h)&&v&&Yt.channels[2]===0)return Lt(ln,"no renditions with stereo sound found"),cn;if(Yt.minHeight>Pt)return Lt(ln,`min resolution of ${Yt.minHeight} > maximum of ${Pt}`),cn;if(Yt.minFramerate>Kt)return Lt(ln,`min framerate of ${Yt.minFramerate} > maximum of ${Kt}`),cn;if(!Je.some(kn=>Yt.videoRanges[kn]>0))return Lt(ln,`no variants with VIDEO-RANGE of ${Ct(Je)} found`),cn;if(p&&ln.indexOf(p.substring(0,4))%5!==0)return Lt(ln,`video codec preference "${p}" not found`),cn;if(Yt.maxScore<Se)return Lt(ln,`max score of ${Yt.maxScore} < selected max of ${Se}`),cn}return cn&&(Fe(ln)>=Fe(cn)||Yt.fragmentError>a[cn].fragmentError)?cn:(we=Yt.minIndex,Se=Yt.maxScore,ln)},void 0),videoRanges:Je,preferHDR:ot,minFramerate:V,minBitrate:G,minIndex:we}}function Lt(a,e){ce.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function zt(a){return a.reduce((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const r=t.channels||"2";return n.channels[r]=(n.channels[r]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function Vt(a,e,t,n){return a.slice(t,n+1).reduce((r,i,s)=>{if(!i.codecSet)return r;const u=i.audioGroups;let p=r[i.codecSet];p||(r[i.codecSet]=p={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:s,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!u,fragmentError:0}),p.minBitrate=Math.min(p.minBitrate,i.bitrate);const h=Math.min(i.height,i.width);return p.minHeight=Math.min(p.minHeight,h),p.minFramerate=Math.min(p.minFramerate,i.frameRate),p.minIndex=Math.min(p.minIndex,s),p.maxScore=Math.max(p.maxScore,i.score),p.fragmentError+=i.fragmentError,p.videoRanges[i.videoRange]=(p.videoRanges[i.videoRange]||0)+1,u&&u.forEach(v=>{if(!v)return;const _=e.groups[v];_&&(p.hasDefaultAudio=p.hasDefaultAudio||e.hasDefaultAudio?_.hasDefault:_.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(_.channels).forEach(k=>{p.channels[k]=(p.channels[k]||0)+_.channels[k]}))}),r},{})}function nn(a){if(!a)return a;const{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}=a;return{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}}function rn(a,e,t){if("attrs"in a){const n=e.indexOf(a);if(n!==-1)return n}for(let n=0;n<e.length;n++){const r=e[n];if(Sn(a,r,t))return n}return-1}function Sn(a,e,t){const{groupId:n,name:r,lang:i,assocLang:s,default:u}=a,p=a.forced;return(n===void 0||e.groupId===n)&&(r===void 0||e.name===r)&&(i===void 0||On(i,e.lang))&&(i===void 0||e.assocLang===s)&&(u===void 0||e.default===u)&&(p===void 0||e.forced===p)&&(!("characteristics"in a)||or(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function On(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function or(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function Nn(a,e){const{audioCodec:t,channels:n}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function Pn(a,e,t,n,r){const i=e[n],u=e.reduce((k,V,G)=>{const we=V.uri;return(k[we]||(k[we]=[])).push(G),k},{})[i.uri];u.length>1&&(n=Math.max.apply(Math,u));const p=i.videoRange,h=i.frameRate,v=i.codecSet.substring(0,4),_=Hn(e,n,k=>{if(k.videoRange!==p||k.frameRate!==h||k.codecSet.substring(0,4)!==v)return!1;const V=k.audioGroups,G=t.filter(we=>!V||V.indexOf(we.groupId)!==-1);return rn(a,G,r)>-1});return _>-1?_:Hn(e,n,k=>{const V=k.audioGroups,G=t.filter(we=>!V||V.indexOf(we.groupId)!==-1);return rn(a,G,r)>-1})}function Hn(a,e,t){for(let n=e;n>-1;n--)if(t(a[n]))return n;for(let n=e+1;n<a.length;n++)if(t(a[n]))return n;return-1}function Kn(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class er extends j{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.supportedCache={},this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var n;const{fragCurrent:r,partCurrent:i,hls:s}=this,{autoLevelEnabled:u,media:p}=s;if(!r||!p)return;const h=performance.now(),v=i?i.stats:r.stats,_=i?i.duration:r.duration,k=h-v.loading.start,V=s.minAutoLevel,G=r.level,we=this._nextAutoLevel;if(v.aborted||v.loaded&&v.loaded===v.total||G<=V){this.clearTimer(),this._nextAutoLevel=-1;return}if(!u)return;const Se=we>-1&&we!==G,Je=!!t||Se;if(!Je&&(p.paused||!p.playbackRate||!p.readyState))return;const ot=s.mainForwardBufferInfo;if(!Je&&ot===null)return;const ft=this.bwEstimator.getEstimateTTFB(),Pt=Math.abs(p.playbackRate);if(k<=Math.max(ft,1e3*(_/(Pt*2))))return;const Kt=ot?ot.len/Pt:0,xn=v.loading.first?v.loading.first-v.loading.start:-1,Ht=v.loaded&&xn>-1,cn=this.getBwEstimate(),ln=s.levels,Yt=ln[G],kn=Math.max(v.loaded,Math.round(_*(r.bitrate||Yt.averageBitrate)/8));let pr=Ht?k-xn:k;pr<1&&Ht&&(pr=Math.min(k,v.loaded*8/cn));const kr=Ht?v.loaded*1e3/pr:0,Wr=ft/1e3,Nr=kr?(kn-v.loaded)/kr:kn*8/cn+Wr;if(Nr<=Kt)return;const lr=kr?kr*8:cn,Br=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,wr=this.hls.config.abrBandWidthUpFactor;let jr=Number.POSITIVE_INFINITY,oi;for(oi=G-1;oi>V;oi--){const is=ln[oi].maxBitrate,Ai=!ln[oi].details||Br;if(jr=this.getTimeToLoadFrag(Wr,lr,_*is,Ai),jr<Math.min(Kt,_+Wr))break}if(jr>=Nr||jr>_*10)return;Ht?this.bwEstimator.sample(k-Math.min(ft,xn),v.loaded):this.bwEstimator.sampleTTFB(k);const fr=ln[oi].maxBitrate;this.getBwEstimate()*wr>fr&&this.resetEstimator(fr);const hr=this.findBestLevel(fr,V,oi,0,Kt,1,1);hr>-1&&(oi=hr),this.warn(`Fragment ${r.sn}${i?" part "+i.index:""} of level ${G} is loading too slowly;
Fragment duration: ${r.duration.toFixed(3)}
Time to underbuffer: ${Kt.toFixed(3)} s
Estimated load time for current fragment: ${Nr.toFixed(3)} s
Estimated load time for down switch fragment: ${jr.toFixed(3)} s
TTFB estimate: ${xn|0} ms
Current BW estimate: ${c(cn)?cn|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${oi} @ ${fr|0} bps`),s.nextLoadLevel=s.nextAutoLevel=oi,this.clearTimer();const Si=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===oi&&oi>0){const is=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${oi>0?"and switching down":""}
Fragment duration: ${r.duration.toFixed(3)} s
Time to underbuffer: ${is.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,oi>V){let Ai=this.findBestLevel(this.hls.levels[V].bitrate,V,oi,0,is,1,1);Ai===-1&&(Ai=V),this.hls.nextLoadLevel=this.hls.nextAutoLevel=Ai,this.resetEstimator(this.hls.levels[Ai].bitrate)}}};Se||Nr>jr*2?Si():this.timer=self.setInterval(Si,jr*1e3),s.trigger(g.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:i,stats:v})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new x(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(g.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=this.supportedCache=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.supportedCache={},this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const n=t.frag;if(!this.ignoreFragment(n)){if(!n.bitrateTest){var r;this.fragCurrent=n,this.partCurrent=(r=t.part)!=null?r:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case F.BUFFER_ADD_CODEC_ERROR:case F.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case F.FRAG_LOAD_TIMEOUT:{const n=t.frag,{fragCurrent:r,partCurrent:i}=this;if(n&&r&&n.sn===r.sn&&n.level===r.level){const s=performance.now(),u=i?i.stats:n.stats,p=s-u.loading.start,h=u.loading.first?u.loading.first-u.loading.start:-1;if(u.loaded&&h>-1){const _=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(p-Math.min(_,h),u.loaded)}else this.bwEstimator.sampleTTFB(p)}break}}}getTimeToLoadFrag(e,t,n,r){const i=e+n/t,s=r?e+this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const n=this.hls.config,{loading:r}=t.stats,i=r.end-r.first;c(i)&&(this.lastLevelLoadSec=i/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:n}){const r=n?n.stats:t.stats;if(t.type===X.MAIN&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const i=n?n.duration:t.duration,s=this.hls.levels[t.level],u=(s.loaded?s.loaded.bytes:0)+r.loaded,p=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:u,duration:p},s.realBitrate=Math.round(8*u/p)}if(t.bitrateTest){const i={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(g.FRAG_BUFFERED,i),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:r}=t,i=r!=null&&r.stats.loaded?r.stats:n.stats;if(i.aborted||this.ignoreFragment(n))return;const s=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(s,i.loaded),i.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==X.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,n=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,i=this.findBestLevel(n,t,e,0,r,1,1);if(i>-1)return i;const s=this.hls.firstLevel,u=Math.min(Math.max(s,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${u}`),u}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,n=this.bwEstimator.canEstimate(),r=this.lastLoadedFragLevel>-1;if(e!==-1&&(!n||!r||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const i=n&&r?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const s=this.hls.levels;if(s.length>Math.max(e,i)&&s[e].loadError<=s[i].loadError)return e}return this._nextAutoLevel=i,this.nextAutoLevelKey=this.getAutoLevelKey(),i}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:n}=this;if(n.levels.length<=1)return n.loadLevel;const{maxAutoLevel:r,config:i,minAutoLevel:s}=n,u=t?t.duration:e?e.duration:0,p=this.getBwEstimate(),h=this.getStarvationDelay();let v=i.abrBandWidthFactor,_=i.abrBandWidthUpFactor;if(h){const Se=this.findBestLevel(p,s,r,h,0,v,_);if(Se>=0)return this.rebufferNotice=-1,Se}let k=u?Math.min(u,i.maxStarvationDelay):i.maxStarvationDelay;if(!h){const Se=this.bitrateTestDelay;Se&&(k=(u?Math.min(u,i.maxLoadingDelay):i.maxLoadingDelay)-Se,this.info(`bitrate test took ${Math.round(1e3*Se)}ms, set first fragment max fetchDuration to ${Math.round(1e3*k)} ms`),v=_=1)}const V=this.findBestLevel(p,s,r,h,k,v,_);if(this.rebufferNotice!==V&&(this.rebufferNotice=V,this.info(`${h?"rebuffering expected":"buffer is empty"}, optimal quality level ${V}`)),V>-1)return V;const G=n.levels[s],we=n.loadLevelObj;return we&&(G==null?void 0:G.bitrate)<we.bitrate?s:n.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const n=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,r=e.mainForwardBufferInfo;return(r?r.len:0)/n}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,n,r,i,s,u){var p;const h=r+i,v=this.lastLoadedFragLevel,_=v===-1?this.hls.firstLevel:v,{fragCurrent:k,partCurrent:V}=this,{levels:G,allAudioTracks:we,loadLevel:Se,config:Je}=this.hls;if(G.length===1)return 0;const ot=G[_],ft=!!((p=this.hls.latestLevelDetails)!=null&&p.live),Pt=Se===-1||v===-1;let Kt,xn="SDR",Ht=(ot==null?void 0:ot.frameRate)||0;const{audioPreference:cn,videoPreference:ln}=Je,Yt=this.audioTracksByGroup||(this.audioTracksByGroup=zt(we));let kn=-1;if(Pt){if(this.firstSelection!==-1)return this.firstSelection;const lr=this.codecTiers||(this.codecTiers=Vt(G,Yt,t,n)),Br=Zt(lr,xn,e,cn,ln),{codecSet:wr,videoRanges:jr,minFramerate:oi,minBitrate:fr,minIndex:hr,preferHDR:Si}=Br;kn=hr,Kt=wr,xn=Si?jr[jr.length-1]:jr[0],Ht=oi,e=Math.max(e,fr),this.log(`picked start tier ${Ct(Br)}`)}else Kt=ot==null?void 0:ot.codecSet,xn=ot==null?void 0:ot.videoRange;const pr=V?V.duration:k?k.duration:0,kr=this.bwEstimator.getEstimateTTFB()/1e3,Wr=[];for(let lr=n;lr>=t;lr--){var Nr;const Br=G[lr],wr=lr>_;if(!Br)continue;if(Je.useMediaCapabilities&&!Br.supportedResult&&!Br.supportedPromise){const Ai=navigator.mediaCapabilities;typeof(Ai==null?void 0:Ai.decodingInfo)=="function"&&tn(Br,Yt,xn,Ht,e,cn)?(Br.supportedPromise=dn(Br,Yt,Ai,this.supportedCache),Br.supportedPromise.then(Zi=>{if(!this.hls)return;Br.supportedResult=Zi;const ia=this.hls.levels,ea=ia.indexOf(Br);Zi.error?this.warn(`MediaCapabilities decodingInfo error: "${Zi.error}" for level ${ea} ${Ct(Zi)}`):Zi.supported?Zi.decodingInfoResults.some(Oa=>Oa.smooth===!1||Oa.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${ea} not smooth or powerEfficient: ${Ct(Zi)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${ea} ${Ct(Zi)}`),ea>-1&&ia.length>1&&(this.log(`Removing unsupported level ${ea}`),this.hls.removeLevel(ea),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(Zi=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${Zi}`)})):Br.supportedResult=gr}if((Kt&&Br.codecSet!==Kt||xn&&Br.videoRange!==xn||wr&&Ht>Br.frameRate||!wr&&Ht>0&&Ht<Br.frameRate||(Nr=Br.supportedResult)!=null&&(Nr=Nr.decodingInfoResults)!=null&&Nr.some(Ai=>Ai.smooth===!1))&&(!Pt||lr!==kn)){Wr.push(lr);continue}const jr=Br.details,oi=(V?jr==null?void 0:jr.partTarget:jr==null?void 0:jr.averagetargetduration)||pr;let fr;wr?fr=u*e:fr=s*e;const hr=pr&&r>=pr*2&&i===0?Br.averageBitrate:Br.maxBitrate,Si=this.getTimeToLoadFrag(kr,fr,hr*oi,jr===void 0);if(fr>=hr&&(lr===v||Br.loadError===0&&Br.fragmentError===0)&&(Si<=kr||!c(Si)||ft&&!this.bitrateTestDelay||Si<h)){const Ai=this.forcedAutoLevel;return lr!==Se&&(Ai===-1||Ai!==Se)&&(Wr.length&&this.trace(`Skipped level(s) ${Wr.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${G[Wr[0]].codecs}" ${G[Wr[0]].videoRange}; not compatible with "${Kt}" ${xn}`),this.info(`switch candidate:${_}->${lr} adjustedbw(${Math.round(fr)})-bitrate=${Math.round(fr-hr)} ttfb:${kr.toFixed(1)} avgDuration:${oi.toFixed(1)} maxFetchDuration:${h.toFixed(1)} fetchDuration:${Si.toFixed(1)} firstSelection:${Pt} codecSet:${Br.codecSet} videoRange:${Br.videoRange} hls.loadLevel:${Se}`)),Pt&&(this.firstSelection=lr),lr}}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 $n={search:function(a,e){let t=0,n=a.length-1,r=null,i=null;for(;t<=n;){r=(t+n)/2|0,i=a[r];const s=e(i);if(s>0)t=r+1;else if(s<0)n=r-1;else return i}return null}};function Zn(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!c(e))return null;const n=a[0].programDateTime;if(e<(n||0))return null;const r=a[a.length-1].endProgramDateTime;if(e>=(r||0))return null;for(let i=0;i<a.length;++i){const s=a[i];if(Yn(e,t,s))return s}return null}function nr(a,e,t=0,n=0,r=.005){let i=null;if(a){i=e[1+a.sn-e[0].sn]||null;const u=a.endDTS-t;u>0&&u<15e-7&&(t+=15e-7),i&&a.level!==i.level&&i.end<=a.end&&(i=e[2+a.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&Jn(t,n,i)===0||ar(i,a,Math.min(r,n))))return i;const s=$n.search(e,Jn.bind(null,t,n));return s&&(s!==a||!i)?s:i}function ar(a,e,t){if(e&&e.start===0&&e.level<a.level&&(e.endPTS||0)>0){const n=e.tagList.reduce((r,i)=>(i[0]==="INF"&&(r+=parseFloat(i[1])),r),t);return a.start<=n}return!1}function Jn(a=0,e=0,t){if(t.start<=a&&t.start+t.duration>a)return 0;const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-n<=a?1:t.start-n>a&&t.start?-1:0}function Yn(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function qn(a,e,t){if(a&&a.startCC<=e&&a.endCC>=e){let n=a.fragments;const{fragmentHint:r}=a;r&&(n=n.concat(r));let i;return $n.search(n,s=>s.cc<e?1:s.cc>e?-1:(i=s,s.end<=t?1:s.start>t?-1:0)),i||null}return null}function Fn(a){switch(a.details){case F.FRAG_LOAD_TIMEOUT:case F.KEY_LOAD_TIMEOUT:case F.LEVEL_LOAD_TIMEOUT:case F.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function $r(a){return a.details.startsWith("key")}function Ft(a){return $r(a)&&!!a.frag&&!a.frag.decryptdata}function tr(a,e){const t=Fn(e);return a.default[`${t?"timeout":"error"}Retry`]}function ur(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function Yr(a){return T(T({},a),{errorRetry:null,timeoutRetry:null})}function zr(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(li(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function li(a){return Qr(a)||!!a&&(a<400||a>499)}function Qr(a){return a===0&&navigator.onLine===!1}var Bn={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},An={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class en extends j{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(g.ERROR,this.onError,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(g.ERROR,this.onError,this),e.off(g.ERROR,this.onErrorOut,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===X.MAIN?e.level:this.getVariantIndex()}getVariantIndex(){var e;const t=this.hls,n=t.currentLevel;return(e=t.loadLevelObj)!=null&&e.details||n===-1?t.loadLevel:n}variantHasKey(e,t){if(e){var n;if((n=e.details)!=null&&n.hasKey(t))return!0;const r=e.audioGroups;if(r)return this.hls.allAudioTracks.filter(s=>r.indexOf(s.groupId)>=0).some(s=>{var u;return(u=s.details)==null?void 0:u.hasKey(t)})}return!1}onManifestLoading(){this.playlistError=0}onLevelUpdated(){this.playlistError=0}onError(e,t){var n;if(t.fatal)return;const r=this.hls,i=t.context;switch(t.details){case F.FRAG_LOAD_ERROR:case F.FRAG_LOAD_TIMEOUT:case F.KEY_LOAD_ERROR:case F.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case F.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=sn();return}case F.FRAG_GAP:case F.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=Bn.SendAlternateToPenaltyBox;return}case F.LEVEL_EMPTY_ERROR:case F.LEVEL_PARSING_ERROR:{var s;const p=t.parent===X.MAIN?t.level:r.loadLevel;t.details===F.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(s=s.levelDetails)!=null&&s.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,p):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,p))}return;case F.LEVEL_LOAD_ERROR:case F.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case F.AUDIO_TRACK_LOAD_ERROR:case F.AUDIO_TRACK_LOAD_TIMEOUT:case F.SUBTITLE_LOAD_ERROR:case F.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const p=r.loadLevelObj;if(p&&(i.type===J.AUDIO_TRACK&&p.hasAudioGroup(i.groupId)||i.type===J.SUBTITLE_TRACK&&p.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=Bn.SendAlternateToPenaltyBox,t.errorAction.flags=An.MoveAllAlternatesMatchingHost;return}}return;case F.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:Bn.SendAlternateToPenaltyBox,flags:An.MoveAllAlternatesMatchingHDCP};return;case F.KEY_SYSTEM_SESSION_UPDATE_FAILED:case F.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case F.KEY_SYSTEM_NO_SESSION:t.errorAction={action:Bn.SendAlternateToPenaltyBox,flags:An.MoveAllAlternatesMatchingKey};return;case F.BUFFER_ADD_CODEC_ERROR:case F.REMUX_ALLOC_ERROR:case F.BUFFER_APPEND_ERROR:if(!t.errorAction){var u;t.errorAction=this.getLevelSwitchAction(t,(u=t.level)!=null?u:r.loadLevel)}return;case F.INTERNAL_EXCEPTION:case F.BUFFER_APPENDING_ERROR:case F.BUFFER_FULL_ERROR:case F.LEVEL_SWITCH_ERROR:case F.BUFFER_STALLED_ERROR:case F.BUFFER_SEEK_OVER_HOLE:case F.BUFFER_NUDGE_ON_STALL:t.errorAction=sn();return}t.type===ie.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=sn())}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=tr(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(zr(r,i,Fn(e),e.response))return{action:Bn.RetryRequest,flags:An.None,retryConfig:r,retryCount:i};const u=this.getLevelSwitchAction(e,t);return r&&(u.retryConfig=r,u.retryCount=i),u}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,u=tr($r(e)?s:i,e),p=t.levels.reduce((v,_)=>v+_.fragmentError,0);if(r&&(e.details!==F.FRAG_GAP&&r.fragmentError++,!Ft(e)&&zr(u,p,Fn(e),e.response)))return{action:Bn.RetryRequest,flags:An.None,retryConfig:u,retryCount:p};const h=this.getLevelSwitchAction(e,n);return u&&(h.retryConfig=u,h.retryCount=p),h}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const r=this.hls.levels[t];if(r){var i,s;const h=e.details;r.loadError++,h===F.BUFFER_APPEND_ERROR&&r.fragmentError++;let v=-1;const{levels:_,loadLevel:k,minAutoLevel:V,maxAutoLevel:G}=n;!n.autoLevelEnabled&&!n.config.preserveManualLevelOnError&&(n.loadLevel=-1);const we=(i=e.frag)==null?void 0:i.type,Je=(we===X.AUDIO&&h===F.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(h===F.BUFFER_ADD_CODEC_ERROR||h===F.BUFFER_APPEND_ERROR))&&_.some(({audioCodec:xn})=>r.audioCodec!==xn),ft=e.sourceBufferName==="video"&&(h===F.BUFFER_ADD_CODEC_ERROR||h===F.BUFFER_APPEND_ERROR)&&_.some(({codecSet:xn,audioCodec:Ht})=>r.codecSet!==xn&&r.audioCodec===Ht),{type:Pt,groupId:Kt}=(s=e.context)!=null?s:{};for(let xn=_.length;xn--;){const Ht=(xn+k)%_.length;if(Ht!==k&&Ht>=V&&Ht<=G&&_[Ht].loadError===0){var u,p;const cn=_[Ht];if(h===F.FRAG_GAP&&we===X.MAIN&&e.frag){const ln=_[Ht].details;if(ln){const Yt=nr(e.frag,ln.fragments,e.frag.start);if(Yt!=null&&Yt.gap)continue}}else{if(Pt===J.AUDIO_TRACK&&cn.hasAudioGroup(Kt)||Pt===J.SUBTITLE_TRACK&&cn.hasSubtitleGroup(Kt))continue;if(we===X.AUDIO&&(u=r.audioGroups)!=null&&u.some(ln=>cn.hasAudioGroup(ln))||we===X.SUBTITLE&&(p=r.subtitleGroups)!=null&&p.some(ln=>cn.hasSubtitleGroup(ln))||Je&&r.audioCodec===cn.audioCodec||ft&&r.codecSet===cn.codecSet||!Je&&r.codecSet!==cn.codecSet)continue}v=Ht;break}}if(v>-1&&n.loadLevel!==v)return e.levelRetry=!0,this.playlistError=0,{action:Bn.SendAlternateToPenaltyBox,flags:An.None,nextAutoLevel:v}}return{action:Bn.SendAlternateToPenaltyBox,flags:An.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case Bn.DoNothing:break;case Bn.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==F.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 Bn.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:r}=n,i=n.nextAutoLevel;switch(r){case An.None:this.switchLevel(e,i);break;case An.MoveAllAlternatesMatchingHDCP:{const p=this.getVariantLevelIndex(e.frag),h=t.levels[p],v=h==null?void 0:h.attrs["HDCP-LEVEL"];if(n.hdcpLevel=v,v==="NONE")this.warn("HDCP policy resticted output with HDCP-LEVEL=NONE");else if(v){t.maxHdcpLevel=nt[nt.indexOf(v)-1],n.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case An.MoveAllAlternatesMatchingKey:{const p=e.decryptdata;if(p){const h=this.hls.levels,v=h.length;for(let k=v;k--;)if(this.variantHasKey(h[k],p)){var s,u;this.log(`Banned key found in level ${k} (${h[k].bitrate}bps) or audio group "${(s=h[k].audioGroups)==null?void 0:s.join(",")}" (${(u=e.frag)==null?void 0:u.type} fragment) ${ue(p.keyId||[])}`),h[k].fragmentError++,h[k].loadError++,this.log(`Removing level ${k} with key error (${e.error})`),this.hls.removeLevel(k)}const _=e.frag;if(this.hls.levels.length<v)n.resolved=!0;else if(_&&_.type!==X.MAIN){const k=_.decryptdata;k&&!p.matches(k)&&(n.resolved=!0)}}break}}n.resolved||this.switchLevel(e,i)}switchLevel(e,t){if(t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===F.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=Cr(e.mimeType),r=this.hls.levels;for(let i=r.length;i--;)r[i][`${e.sourceBufferName}Codec`]===n&&(this.log(`Removing level ${i} for ${e.details} ("${n}" not supported)`),this.hls.removeLevel(i))}}}function sn(a){const e={action:Bn.DoNothing,flags:An.None};return a&&(e.resolved=!0),e}var Rn={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Un{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e&&(e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.BUFFER_APPENDED,this.onBufferAppended,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this))}destroy(){this._unregisterListeners(),this.hls=this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const n=this.activePartLists[t];if(n)for(let r=n.length;r--;){const i=n[r];if(!i)break;if(i.start<=e&&e<=i.end&&i.loaded)return i}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,n){const{fragments:r}=this,i=Object.keys(r);for(let s=i.length;s--;){const u=r[i[s]];if((u==null?void 0:u.body.type)===t&&(!n||u.buffered)){const p=u.body;if(p.start<=e&&e<=p.end)return p}}return null}detectEvictedFragments(e,t,n,r,i){this.timeRanges&&(this.timeRanges[e]=t);const s=(r==null?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach(u=>{const p=this.fragments[u];if(!p||s>=p.body.sn)return;if(!p.buffered&&(!p.loaded||i)){p.body.type===n&&this.removeFragment(p.body);return}const h=p.range[e];if(h){if(h.time.length===0){this.removeFragment(p.body);return}h.time.some(v=>{const _=!this.isTimeBuffered(v.startPTS,v.endPTS,t);return _&&this.removeFragment(p.body),_})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=Ar(n),i=this.fragments[r];if(!i||i.buffered&&n.gap)return;const s=!n.relurl;Object.keys(t).forEach(u=>{const p=n.elementaryStreams[u];if(!p)return;const h=t[u],v=s||p.partial===!0;i.range[u]=this.getBufferedTimes(n,e.part,v,h)}),i.loaded=null,Object.keys(i.range).length?(this.bufferedEnd(i,n),rr(i)||this.removeParts(n.sn-1,n.type)):this.removeFragment(i.body)}bufferedEnd(e,t){e.buffered=!0,(e.body.endList=t.endList||e.body.endList)&&(this.endListFragments[e.body.type]=e)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=wn(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=Ar(e);let r=this.fragments[n];!r&&t&&(r=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,this.bufferedEnd(r,e))}getBufferedTimes(e,t,n,r){const i={time:[],partial:n},s=e.start,u=e.end,p=e.minEndPTS||u,h=e.maxStartPTS||s;for(let v=0;v<r.length;v++){const _=r.start(v)-this.bufferPadding,k=r.end(v)+this.bufferPadding;if(h>=_&&p<=k){i.time.push({startPTS:Math.max(s,r.start(v)),endPTS:Math.min(u,r.end(v))});break}else if(s<k&&u>_){const V=Math.max(s,r.start(v)),G=Math.min(u,r.end(v));G>V&&(i.partial=!0,i.time.push({startPTS:V,endPTS:G}))}else if(u<=_)break}return i}getPartialFragment(e){let t=null,n,r,i,s=0;const{bufferPadding:u,fragments:p}=this;return Object.keys(p).forEach(h=>{const v=p[h];v&&rr(v)&&(r=v.body.start-u,i=v.body.end+u,e>=r&&e<=i&&(n=Math.min(e-r,i-e),s<=n&&(t=v.body,s=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||rr(t))}getState(e){const t=Ar(e),n=this.fragments[t];return n?n.buffered?rr(n)?Rn.PARTIAL:Rn.OK:Rn.APPENDING:Rn.NOT_LOADED}isTimeBuffered(e,t,n){let r,i;for(let s=0;s<n.length;s++){if(r=n.start(s)-this.bufferPadding,i=n.end(s)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const n=t.frag,r=t.part?null:t,i=Ar(n);this.fragments[i]={body:n,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:r,timeRanges:i,type:s}=t;if(n.sn==="initSegment")return;const u=n.type;if(r){let h=this.activePartLists[u];h||(this.activePartLists[u]=h=[]),h.push(r)}this.timeRanges=i;const p=i[s];this.detectEvictedFragments(s,p,u,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Ar(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,n=Object.keys(t);if(!e)return n.length>0;for(let r=n.length;r--;){const i=t[n[r]];if((i==null?void 0:i.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,n,r,i){r&&!this.hasGaps||Object.keys(this.fragments).forEach(s=>{const u=this.fragments[s];if(!u)return;const p=u.body;p.type!==n||r&&!p.gap||p.start<t&&p.end>e&&(u.buffered||i)&&this.removeFragment(p)})}removeFragment(e){const t=Ar(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=wn(n,i=>i.fragment.sn!==r)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const t=(e=this.hls)==null||(e=e.latestLevelDetails)==null?void 0:e.partList;t&&t.forEach(n=>n.clearElementaryStreamInfo())}}function rr(a){var e,t,n;return a.buffered&&!!(a.body.gap||(e=a.range.video)!=null&&e.partial||(t=a.range.audio)!=null&&t.partial||(n=a.range.audiovideo)!=null&&n.partial)}function Ar(a){return`${a.type}_${a.level}_${a.sn}`}function wn(a,e){return a.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var cr={cbc:0,ctr:1};class Ir{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 cr.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case cr.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 Jr(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class mi{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),n=new Uint32Array(4);for(let r=0;r<4;r++)n[r]=t.getUint32(r*4);return n}initTable(){const e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],s=n[2],u=n[3],p=this.invSubMix,h=p[0],v=p[1],_=p[2],k=p[3],V=new Uint32Array(256);let G=0,we=0,Se=0;for(Se=0;Se<256;Se++)Se<128?V[Se]=Se<<1:V[Se]=Se<<1^283;for(Se=0;Se<256;Se++){let Je=we^we<<1^we<<2^we<<3^we<<4;Je=Je>>>8^Je&255^99,e[G]=Je,t[Je]=G;const ot=V[G],ft=V[ot],Pt=V[ft];let Kt=V[Je]*257^Je*16843008;r[G]=Kt<<24|Kt>>>8,i[G]=Kt<<16|Kt>>>16,s[G]=Kt<<8|Kt>>>24,u[G]=Kt,Kt=Pt*16843009^ft*65537^ot*257^G*16843008,h[Je]=Kt<<24|Kt>>>8,v[Je]=Kt<<16|Kt>>>16,_[Je]=Kt<<8|Kt>>>24,k[Je]=Kt,G?(G=ot^V[V[V[Pt^ot]]],we^=V[V[we]]):G=we=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,r=0;for(;r<t.length&&n;)n=t[r]===this.key[r],r++;if(n)return;this.key=t;const i=this.keySize=t.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);const s=this.ksRows=(i+6+1)*4;let u,p;const h=this.keySchedule=new Uint32Array(s),v=this.invKeySchedule=new Uint32Array(s),_=this.sBox,k=this.rcon,V=this.invSubMix,G=V[0],we=V[1],Se=V[2],Je=V[3];let ot,ft;for(u=0;u<s;u++){if(u<i){ot=h[u]=t[u];continue}ft=ot,u%i===0?(ft=ft<<8|ft>>>24,ft=_[ft>>>24]<<24|_[ft>>>16&255]<<16|_[ft>>>8&255]<<8|_[ft&255],ft^=k[u/i|0]<<24):i>6&&u%i===4&&(ft=_[ft>>>24]<<24|_[ft>>>16&255]<<16|_[ft>>>8&255]<<8|_[ft&255]),h[u]=ot=(h[u-i]^ft)>>>0}for(p=0;p<s;p++)u=s-p,p&3?ft=h[u]:ft=h[u-4],p<4||u<=4?v[p]=ft:v[p]=G[_[ft>>>24]]^we[_[ft>>>16&255]]^Se[_[ft>>>8&255]]^Je[_[ft&255]],v[p]=v[p]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,n){const r=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,u=this.invSubMix,p=u[0],h=u[1],v=u[2],_=u[3],k=this.uint8ArrayToUint32Array_(n);let V=k[0],G=k[1],we=k[2],Se=k[3];const Je=new Int32Array(e),ot=new Int32Array(Je.length);let ft,Pt,Kt,xn,Ht,cn,ln,Yt,kn,pr,kr,Wr,Nr,lr;const Br=this.networkToHostOrderSwap;for(;t<Je.length;){for(kn=Br(Je[t]),pr=Br(Je[t+1]),kr=Br(Je[t+2]),Wr=Br(Je[t+3]),Ht=kn^i[0],cn=Wr^i[1],ln=kr^i[2],Yt=pr^i[3],Nr=4,lr=1;lr<r;lr++)ft=p[Ht>>>24]^h[cn>>16&255]^v[ln>>8&255]^_[Yt&255]^i[Nr],Pt=p[cn>>>24]^h[ln>>16&255]^v[Yt>>8&255]^_[Ht&255]^i[Nr+1],Kt=p[ln>>>24]^h[Yt>>16&255]^v[Ht>>8&255]^_[cn&255]^i[Nr+2],xn=p[Yt>>>24]^h[Ht>>16&255]^v[cn>>8&255]^_[ln&255]^i[Nr+3],Ht=ft,cn=Pt,ln=Kt,Yt=xn,Nr=Nr+4;ft=s[Ht>>>24]<<24^s[cn>>16&255]<<16^s[ln>>8&255]<<8^s[Yt&255]^i[Nr],Pt=s[cn>>>24]<<24^s[ln>>16&255]<<16^s[Yt>>8&255]<<8^s[Ht&255]^i[Nr+1],Kt=s[ln>>>24]<<24^s[Yt>>16&255]<<16^s[Ht>>8&255]<<8^s[cn&255]^i[Nr+2],xn=s[Yt>>>24]<<24^s[Ht>>16&255]<<16^s[cn>>8&255]<<8^s[ln&255]^i[Nr+3],ot[t]=Br(ft^V),ot[t+1]=Br(xn^G),ot[t+2]=Br(Kt^we),ot[t+3]=Br(Pt^Se),V=kn,G=pr,we=kr,Se=Wr,t=t+4}return ot.buffer}}class Li{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=Gr(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function Gr(a){switch(a){case cr.cbc:return"AES-CBC";case cr.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const Ri=16;class qr{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?Jr(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n,r){return this.useSoftware?new Promise((i,s)=>{const u=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(u,t,n,r);const p=this.flush();p?i(p.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,n,r)}softwareDecrypt(e,t,n,r){const{currentIV:i,currentResult:s,remainderData:u}=this;if(r!==cr.cbc||t.byteLength!==16)return ce.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),u&&(e=ct(u,e),this.remainderData=null);const p=this.getValidChunk(e);if(!p.length)return null;i&&(n=i);let h=this.softwareDecrypter;h||(h=this.softwareDecrypter=new mi),h.expandKey(t);const v=s;return this.currentResult=h.decrypt(p.buffer,0,n),this.currentIV=p.slice(-16).buffer,v||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 Li(this.subtle,t,r)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new Ir(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(ce.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,n,r)))}onWebCryptoError(e,t,n,r){const i=this.enableSoftwareAES;if(i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n,r);const s=this.flush();if(s)return s.buffer}throw new Error("WebCrypto"+(i?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const n=e.length-e.length%Ri;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(ce.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const bi=Math.pow(2,17);class ri{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 Lr({type:ie.NETWORK_ERROR,details:F.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${n?"part list":"url"}`),networkDetails:null}));this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((u,p)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(G=>G[0]==="GAP")){p(ii(e));return}else e.gap=!1;const h=this.loader=i?new i(r):new s(r),v=di(e);e.loader=h;const _=Yr(r.fragLoadPolicy.default),k={loadPolicy:_,timeout:_.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:bi};e.stats=h.stats;const V={onSuccess:(G,we,Se,Je)=>{this.resetLoader(e,h);let ot=G.data;Se.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(ot.slice(0,16)),ot=ot.slice(16)),u({frag:e,part:null,payload:ot,networkDetails:Je})},onError:(G,we,Se,Je)=>{this.resetLoader(e,h),p(new Lr({type:ie.NETWORK_ERROR,details:F.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:T({url:n,data:void 0},G),error:new Error(`HTTP Error ${G.code} ${G.text}`),networkDetails:Se,stats:Je}))},onAbort:(G,we,Se)=>{this.resetLoader(e,h),p(new Lr({type:ie.NETWORK_ERROR,details:F.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:Se,stats:G}))},onTimeout:(G,we,Se)=>{this.resetLoader(e,h),p(new Lr({type:ie.NETWORK_ERROR,details:F.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${k.timeout}ms`),networkDetails:Se,stats:G}))}};t&&(V.onProgress=(G,we,Se,Je)=>t({frag:e,part:null,payload:Se,networkDetails:Je})),h.load(v,k,V)})}loadPart(e,t,n){this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((u,p)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){p(ii(e,t));return}const h=this.loader=i?new i(r):new s(r),v=di(e,t);e.loader=h;const _=Yr(r.fragLoadPolicy.default),k={loadPolicy:_,timeout:_.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:bi};t.stats=h.stats,h.load(v,k,{onSuccess:(V,G,we,Se)=>{this.resetLoader(e,h),this.updateStatsFromPart(e,t);const Je={frag:e,part:t,payload:V.data,networkDetails:Se};n(Je),u(Je)},onError:(V,G,we,Se)=>{this.resetLoader(e,h),p(new Lr({type:ie.NETWORK_ERROR,details:F.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:T({url:v.url,data:void 0},V),error:new Error(`HTTP Error ${V.code} ${V.text}`),networkDetails:we,stats:Se}))},onAbort:(V,G,we)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,h),p(new Lr({type:ie.NETWORK_ERROR,details:F.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:we,stats:V}))},onTimeout:(V,G,we)=>{this.resetLoader(e,h),p(new Lr({type:ie.NETWORK_ERROR,details:F.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${k.timeout}ms`),networkDetails:we,stats:V}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){const p=Math.round(e.duration/t.duration),h=Math.min(Math.round(n.loaded/i),p),_=(p-h)*Math.round(n.loaded/h);n.total=n.loaded+_}else n.total=Math.max(n.loaded,n.total);const s=n.loading,u=r.loading;s.start?s.first+=u.first-u.start:(s.start=u.start,s.first=u.first),s.end=u.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function di(a,e=null){const t=e||a,n={frag:a,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},r=t.byteRangeStartOffset,i=t.byteRangeEndOffset;if(c(r)&&c(i)){var s;let u=r,p=i;if(a.sn==="initSegment"&&Oi((s=a.decryptdata)==null?void 0:s.method)){const h=i-r;h%16&&(p=i+(16-h%16)),r!==0&&(n.resetIV=!0,u=r-16)}n.rangeStart=u,n.rangeEnd=p}return n}function ii(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:ie.MEDIA_ERROR,details:F.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new Lr(n)}function Oi(a){return a==="AES-128"||a==="AES-256"}class Lr extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Pi extends j{constructor(e,t){super(e,t),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}class Mi{constructor(e,t,n,r=0,i=-1,s=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=ki(),this.buffering={audio:ki(),video:ki(),audiovideo:ki()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function ki(){return{start:0,executeStart:0,executeEnd:0,end:0}}const mr={length:0,start:()=>0,end:()=>0};class zn{static isBuffered(e,t){if(e){const n=zn.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=zn.getBuffered(e);return zn.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=zn.bufferedRanges(e);if(r.length)return zn.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((v,_)=>v.start-_.start||_.end-v.end);let r=-1,i=[];if(n)for(let v=0;v<e.length;v++){t>=e[v].start&&t<=e[v].end&&(r=v);const _=i.length;if(_){const k=i[_-1].end;e[v].start-k<n?e[v].end>k&&(i[_-1].end=e[v].end):i.push(e[v])}else i.push(e[v])}else i=e;let s=0,u,p=t,h=t;for(let v=0;v<i.length;v++){const _=i[v].start,k=i[v].end;if(r===-1&&t>=_&&t<=k&&(r=v),t+n>=_&&t<k)p=_,h=k,s=h-t;else if(t+n<_){u=_;break}}return{len:s,start:p||0,end:h||0,nextStart:u,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||mr}catch(t){return ce.log("failed to get media.buffered",t),mr}}}const pi=/\{\$([a-zA-Z0-9-_]+)\}/g;function Tn(a){return pi.test(a)}function Fi(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(pi,n=>{const r=n.substring(2,n.length-1),i=t==null?void 0:t[r];return i===void 0?(a.playlistParsingError||(a.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${r}"`)),n):i})}return e}function Os(a,e,t){let n=a.variableList;n||(a.variableList=n={});let r,i;if("QUERYPARAM"in e){r=e.QUERYPARAM;try{const s=new self.URL(t).searchParams;if(s.has(r))i=s.get(r);else throw new Error(`"${r}" does not match any query parameter in URI: "${t}"`)}catch(s){a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${s.message}`))}}else r=e.NAME,i=e.VALUE;r in n?a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${r}"`)):n[r]=i||""}function vs(a,e,t){const n=e.IMPORT;if(t&&n in t){let r=a.variableList;r||(a.variableList=r={}),r[n]=t[n]}else a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}const ss=/^(\d+)x(\d+)$/,ls=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Pr{constructor(e,t){typeof e=="string"&&(e=Pr.parseAttrList(e,t)),b(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const n=new Uint8Array(t.length/2);for(let r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(r*2,r*2+2),16);return n}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const n=this[e];return(n?n.split(/[ ,]+/):[]).reduce((r,i)=>(r[i.toLowerCase()]=!0,r),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=ss.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let n;const r={},i='"';for(ls.lastIndex=0;(n=ls.exec(e))!==null;){const s=n[1].trim();let u=n[2];const p=u.indexOf(i)===0&&u.lastIndexOf(i)===u.length-1;let h=!1;if(p)u=u.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":h=!0}if(t&&(p||h))u=Fi(t,u);else if(!h&&!p)switch(s){case"CLOSED-CAPTIONS":if(u==="NONE")break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":ce.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=u}return r}}const Gi="com.apple.hls.interstitial";function ds(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function _s(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class ci{constructor(e,t,n=0){var r;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(t==null?void 0:t.tagAnchor)||null,this.tagOrder=(r=t==null?void 0:t.tagOrder)!=null?r:n,t){const i=t.attr;for(const s in i)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==i[s]){ce.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=b(new Pr({}),i,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const i=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);c(i.getTime())&&(this._endDate=i)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return e===void 0?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return e===null||e.programDateTime===null?(ce.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return t!==null?this._dateAtEnd=new Date(this._startDate.getTime()+t*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(c(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===Gi}get isValid(){return!!this.id&&!this._badValueForSameId&&c(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 zi=10;class ns{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}hasKey(e){return this.encryptedFragments.some(t=>{let n=t.decryptdata;return n||(t.setKeyFormat(e.keyFormat),n=t.decryptdata),!!n&&e.matches(n)})}get hasProgramDateTime(){return this.fragments.length?c(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||zi}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){return this.fragments.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){return this.fragments.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(t!==-1){for(let n=e.length;n--;)if(e[n].index>t)return e[n].index;return t}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function br(a,e){return a.length===e.length?!a.some((t,n)=>t!==e[n]):!1}function Ur(a,e){return!a&&!e?!0:!a||!e?!1:br(a,e)}function yr(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function Or(a){switch(a){case"AES-128":case"AES-256":return cr.cbc;case"AES-256-CTR":return cr.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function ui(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function _i(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function as(a){const e=_i(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function ir(a){const e=function(n,r,i){const s=n[r];n[r]=n[i],n[i]=s};e(a,0,3),e(a,1,2),e(a,4,5),e(a,6,7)}function Dr(a){const e=a.split(":");let t=null;if(e[0]==="data"&&e.length===2){const n=e[1].split(";"),r=n[n.length-1].split(",");if(r.length===2){const i=r[0]==="base64",s=r[1];i?(n.splice(-1,1),t=ui(s)):t=as(s)}}return t}const ei=typeof self!="undefined"?self:void 0;var Kr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},ti={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function xs(a){switch(a){case ti.FAIRPLAY:return Kr.FAIRPLAY;case ti.PLAYREADY:return Kr.PLAYREADY;case ti.WIDEVINE:return Kr.WIDEVINE;case ti.CLEARKEY:return Kr.CLEARKEY}}function us(a){switch(a){case Kr.FAIRPLAY:return ti.FAIRPLAY;case Kr.PLAYREADY:return ti.PLAYREADY;case Kr.WIDEVINE:return ti.WIDEVINE;case Kr.CLEARKEY:return ti.CLEARKEY}}function Es(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[Kr.FAIRPLAY,Kr.WIDEVINE,Kr.PLAYREADY,Kr.CLEARKEY].filter(r=>!!e[r]):[];return!n[Kr.WIDEVINE]&&t&&n.push(Kr.WIDEVINE),n}const ms=function(a){return ei!=null&&(a=ei.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function ba(a,e,t,n){let r;switch(a){case Kr.FAIRPLAY:r=["cenc","sinf"];break;case Kr.WIDEVINE:case Kr.PLAYREADY:r=["cenc"];break;case Kr.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return so(r,e,t,n)}function so(a,e,t,n){return[{initDataTypes:a,persistentState:n.persistentState||"optional",distinctiveIdentifier:n.distinctiveIdentifier||"optional",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(i=>({contentType:`audio/mp4; codecs=${i}`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:t.map(i=>({contentType:`video/mp4; codecs=${i}`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function Ka(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function Ss(a){const e=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),n=t.substring(t.indexOf("<"),t.length),s=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(s){const u=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(u){const p=ui(u).subarray(0,16);return ir(p),p}}return null}let Fs={};class ks{static clearKeyUriToKeyIdMap(){Fs={}}static setKeyIdForUri(e,t){Fs[e]=t}static addKeyIdForUri(e){const t=Object.keys(Fs).length%Number.MAX_SAFE_INTEGER,n=new Uint8Array(16);return new DataView(n.buffer,12,4).setUint32(0,t),Fs[e]=n,n}constructor(e,t,n,r=[1],i=null,s){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=r,this.iv=i,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!yr(e),s!=null&&s.startsWith("0x")&&(this.keyId=new Uint8Array(W(s)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&br(e.keyFormatVersions,this.keyFormatVersions)&&Ur(e.iv,this.iv)&&Ur(e.keyId,this.keyId)}isSupported(){if(this.method){if(yr(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case ti.FAIRPLAY:case ti.WIDEVINE:case ti.PLAYREADY:case ti.CLEARKEY:return["SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e,t){if(!this.encrypted||!this.uri)return null;if(yr(this.method)){let i=this.iv;return i||(typeof e!="number"&&(ce.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0),i=Zs(e)),new ks(this.method,this.uri,"identity",this.keyFormatVersions,i)}if(this.keyId){const i=Fs[this.uri];if(i&&!br(this.keyId,i)&&ks.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}const n=Dr(this.uri);if(n)switch(this.keyFormat){case ti.WIDEVINE:if(this.pssh=n,!this.keyId){const i=qe(n.buffer);if(i.length){var r;const s=i[0];this.keyId=(r=s.kids)!=null&&r.length?s.kids[0]:null}}this.keyId||(this.keyId=aa(t));break;case ti.PLAYREADY:{const i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=O(i,null,n),this.keyId=Ss(n);break}default:{let i=n.subarray(0,16);if(i.length!==16){const s=new Uint8Array(16);s.set(i,16-i.length),i=s}this.keyId=i;break}}if(!this.keyId||this.keyId.byteLength!==16){let i;i=Za(t),i||(i=aa(t),i||(i=Fs[this.uri])),i&&(this.keyId=i,ks.setKeyIdForUri(this.uri,i))}return this}}function Za(a){const e=a==null?void 0:a[ti.WIDEVINE];return e?e.keyId:null}function aa(a){const e=a==null?void 0:a[ti.PLAYREADY];if(e){const t=Dr(e.uri);if(t)return Ss(t)}return null}function Zs(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const wa=/#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,Pa=/#EXT-X-MEDIA:(.*)/g,ja=/^#EXT(?:INF|-X-TARGETDURATION):/m,zs=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),Ca=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 Ls{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 E.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return ja.test(e)}static parseMasterPlaylist(e,t){const n=Tn(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];if(wa.lastIndex=0,!e.startsWith("#EXTM3U"))return r.playlistParsingError=new Error("no EXTM3U delimiter"),r;let s;for(;(s=wa.exec(e))!=null;)if(s[1]){var u;const h=new Pr(s[1],r),v=Fi(r,s[2]),_={attrs:h,bitrate:h.decimalInteger("BANDWIDTH")||h.decimalInteger("AVERAGE-BANDWIDTH"),name:h.NAME,url:Ls.resolve(v,t)},k=h.decimalResolution("RESOLUTION");k&&(_.width=k.width,_.height=k.height),oa(h.CODECS,_);const V=h["SUPPLEMENTAL-CODECS"];V&&(_.supplemental={},oa(V,_.supplemental)),(u=_.unknownCodecs)!=null&&u.length||i.push(_),r.levels.push(_)}else if(s[3]){const h=s[3],v=s[4];switch(h){case"SESSION-DATA":{const _=new Pr(v,r),k=_["DATA-ID"];k&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[k]=_);break}case"SESSION-KEY":{const _=Ha(v,t,r);_.encrypted&&_.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(_)):ce.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${v}"`);break}case"DEFINE":{{const _=new Pr(v,r);Os(r,_,t)}break}case"CONTENT-STEERING":{const _=new Pr(v,r);r.contentSteering={uri:Ls.resolve(_["SERVER-URI"],t),pathwayId:_["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=Wa(v);break}}}const p=i.length>0&&i.length<r.levels.length;return r.levels=p?i:r.levels,r.levels.length===0&&(r.playlistParsingError=new Error("no levels found in manifest")),r}static parseMasterPlaylistMedia(e,t,n){let r;const i={},s=n.levels,u={AUDIO:s.map(h=>({id:h.attrs.AUDIO,audioCodec:h.audioCodec})),SUBTITLES:s.map(h=>({id:h.attrs.SUBTITLES,textCodec:h.textCodec})),"CLOSED-CAPTIONS":[]};let p=0;for(Pa.lastIndex=0;(r=Pa.exec(e))!==null;){const h=new Pr(r[1],n),v=h.TYPE;if(v){const _=u[v],k=i[v]||[];i[v]=k;const V=h.LANGUAGE,G=h["ASSOC-LANGUAGE"],we=h.CHANNELS,Se=h.CHARACTERISTICS,Je=h["INSTREAM-ID"],ot={attrs:h,bitrate:0,id:p++,groupId:h["GROUP-ID"]||"",name:h.NAME||V||"",type:v,default:h.bool("DEFAULT"),autoselect:h.bool("AUTOSELECT"),forced:h.bool("FORCED"),lang:V,url:h.URI?Ls.resolve(h.URI,t):""};if(G&&(ot.assocLang=G),we&&(ot.channels=we),Se&&(ot.characteristics=Se),Je&&(ot.instreamId=Je),_!=null&&_.length){const ft=Ls.findGroup(_,ot.groupId)||_[0];js(ot,ft,"audioCodec"),js(ot,ft,"textCodec")}k.push(ot)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var u;const p={url:t},h=new ns(t),v=h.fragments,_=[];let k=null,V=0,G=0,we=0,Se=0,Je=0,ot=null,ft=new lt(r,p),Pt,Kt,xn,Ht=-1,cn=!1,ln=null,Yt;if(zs.lastIndex=0,h.m3u8=e,h.hasVariableRefs=Tn(e),((u=zs.exec(e))==null?void 0:u[0])!=="#EXTM3U")return h.playlistParsingError=new Error("Missing format identifier #EXTM3U"),h;for(;(Pt=zs.exec(e))!==null;){cn&&(cn=!1,ft=new lt(r,p),ft.playlistOffset=we,ft.setStart(we),ft.sn=V,ft.cc=Se,Je&&(ft.bitrate=Je),ft.level=n,k&&(ft.initSegment=k,k.rawProgramDateTime&&(ft.rawProgramDateTime=k.rawProgramDateTime,k.rawProgramDateTime=null),ln&&(ft.setByteRange(ln),ln=null)));const Wr=Pt[1];if(Wr){ft.duration=parseFloat(Wr);const Nr=(" "+Pt[2]).slice(1);ft.title=Nr||null,ft.tagList.push(Nr?["INF",Wr,Nr]:["INF",Wr])}else if(Pt[3]){if(c(ft.duration)){ft.playlistOffset=we,ft.setStart(we),xn&&ws(ft,xn,h),ft.sn=V,ft.level=n,ft.cc=Se,v.push(ft);const Nr=(" "+Pt[3]).slice(1);ft.relurl=Fi(h,Nr),Hr(ft,ot,_),ot=ft,we+=ft.duration,V++,G=0,cn=!0}}else{if(Pt=Pt[0].match(Ca),!Pt){ce.warn("No matches on slow regex match for level playlist!");continue}for(Kt=1;Kt<Pt.length&&Pt[Kt]===void 0;Kt++);const Nr=(" "+Pt[Kt]).slice(1),lr=(" "+Pt[Kt+1]).slice(1),Br=Pt[Kt+2]?(" "+Pt[Kt+2]).slice(1):null;switch(Nr){case"BYTERANGE":ot?ft.setByteRange(lr,ot):ft.setByteRange(lr);break;case"PROGRAM-DATE-TIME":ft.rawProgramDateTime=lr,ft.tagList.push(["PROGRAM-DATE-TIME",lr]),Ht===-1&&(Ht=v.length);break;case"PLAYLIST-TYPE":h.type&&wi(h,Nr,Pt),h.type=lr.toUpperCase();break;case"MEDIA-SEQUENCE":h.startSN!==0?wi(h,Nr,Pt):v.length>0&&os(h,Nr,Pt),V=h.startSN=parseInt(lr);break;case"SKIP":{h.skippedSegments&&wi(h,Nr,Pt);const wr=new Pr(lr,h),jr=wr.decimalInteger("SKIPPED-SEGMENTS");if(c(jr)){h.skippedSegments+=jr;for(let fr=jr;fr--;)v.push(null);V+=jr}const oi=wr.enumeratedString("RECENTLY-REMOVED-DATERANGES");oi&&(h.recentlyRemovedDateranges=(h.recentlyRemovedDateranges||[]).concat(oi.split(" ")));break}case"TARGETDURATION":h.targetduration!==0&&wi(h,Nr,Pt),h.targetduration=Math.max(parseInt(lr),1);break;case"VERSION":h.version!==null&&wi(h,Nr,Pt),h.version=parseInt(lr);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":h.live||wi(h,Nr,Pt),h.live=!1;break;case"#":(lr||Br)&&ft.tagList.push(Br?[lr,Br]:[lr]);break;case"DISCONTINUITY":Se++,ft.tagList.push(["DIS"]);break;case"GAP":ft.gap=!0,ft.tagList.push([Nr]);break;case"BITRATE":ft.tagList.push([Nr,lr]),Je=parseInt(lr)*1e3,c(Je)?ft.bitrate=Je:Je=0;break;case"DATERANGE":{const wr=new Pr(lr,h),jr=new ci(wr,h.dateRanges[wr.ID],h.dateRangeTagCount);h.dateRangeTagCount++,jr.isValid||h.skippedSegments?h.dateRanges[jr.id]=jr:ce.warn(`Ignoring invalid DATERANGE tag: "${lr}"`),ft.tagList.push(["EXT-X-DATERANGE",lr]);break}case"DEFINE":{{const wr=new Pr(lr,h);"IMPORT"in wr?vs(h,wr,s):Os(h,wr,t)}break}case"DISCONTINUITY-SEQUENCE":h.startCC!==0?wi(h,Nr,Pt):v.length>0&&os(h,Nr,Pt),h.startCC=Se=parseInt(lr);break;case"KEY":{const wr=Ha(lr,t,h);if(wr.isSupported()){if(wr.method==="NONE"){xn=void 0;break}xn||(xn={});const jr=xn[wr.keyFormat];jr!=null&&jr.matches(wr)||(jr&&(xn=b({},xn)),xn[wr.keyFormat]=wr)}else ce.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${lr}"`);break}case"START":h.startTimeOffset=Wa(lr);break;case"MAP":{const wr=new Pr(lr,h);if(ft.duration){const jr=new lt(r,p);ps(jr,wr,n,xn),k=jr,ft.initSegment=k,k.rawProgramDateTime&&!ft.rawProgramDateTime&&(ft.rawProgramDateTime=k.rawProgramDateTime)}else{const jr=ft.byteRangeEndOffset;if(jr){const oi=ft.byteRangeStartOffset;ln=`${jr-oi}@${oi}`}else ln=null;ps(ft,wr,n,xn),k=ft,cn=!0}k.cc=Se;break}case"SERVER-CONTROL":{Yt&&wi(h,Nr,Pt),Yt=new Pr(lr),h.canBlockReload=Yt.bool("CAN-BLOCK-RELOAD"),h.canSkipUntil=Yt.optionalFloat("CAN-SKIP-UNTIL",0),h.canSkipDateRanges=h.canSkipUntil>0&&Yt.bool("CAN-SKIP-DATERANGES"),h.partHoldBack=Yt.optionalFloat("PART-HOLD-BACK",0),h.holdBack=Yt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{h.partTarget&&wi(h,Nr,Pt);const wr=new Pr(lr);h.partTarget=wr.decimalFloatingPoint("PART-TARGET");break}case"PART":{let wr=h.partList;wr||(wr=h.partList=[]);const jr=G>0?wr[wr.length-1]:void 0,oi=G++,fr=new Pr(lr,h),hr=new ke(fr,ft,p,oi,jr);wr.push(hr),ft.duration+=hr.duration;break}case"PRELOAD-HINT":{const wr=new Pr(lr,h);h.preloadHint=wr;break}case"RENDITION-REPORT":{const wr=new Pr(lr,h);h.renditionReports=h.renditionReports||[],h.renditionReports.push(wr);break}default:ce.warn(`line parsed but not handled: ${Pt}`);break}}}ot&&!ot.relurl?(v.pop(),we-=ot.duration,h.partList&&(h.fragmentHint=ot)):h.partList&&(Hr(ft,ot,_),ft.cc=Se,h.fragmentHint=ft,xn&&ws(ft,xn,h)),h.targetduration||(h.playlistParsingError=new Error("Missing Target Duration"));const kn=v.length,pr=v[0],kr=v[kn-1];if(we+=h.skippedSegments*h.targetduration,we>0&&kn&&kr){h.averagetargetduration=we/kn;const Wr=kr.sn;h.endSN=Wr!=="initSegment"?Wr:0,h.live||(kr.endList=!0),Ht>0&&(fi(v,Ht),pr&&_.unshift(pr))}return h.fragmentHint&&(we+=h.fragmentHint.duration),h.totalduration=we,_.length&&h.dateRangeTagCount&&pr&&Ma(_,h),h.endCC=Se,h}}function Ma(a,e){let t=a.length;if(!t)if(e.hasProgramDateTime){const u=e.fragments[e.fragments.length-1];a.push(u),t++}else return;const n=a[t-1],r=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let u=i.length;u--;){const p=e.dateRanges[i[u]],h=p.startDate.getTime();p.tagAnchor=n.ref;for(let v=t;v--;){var s;if(((s=a[v])==null?void 0:s.sn)<e.startSN)break;const _=ka(e,h,a,v,r);if(_!==-1){p.tagAnchor=e.fragments[_].ref;break}}}}function ka(a,e,t,n,r){const i=t[n];if(i){const u=i.programDateTime;if(e>=u||n===0){var s;const p=(((s=t[n+1])==null?void 0:s.start)||r)-i.start;if(e<=u+p*1e3){const h=t[n].sn-a.startSN;if(h<0)return-1;const v=a.fragments;if(v.length>t.length){const k=(t[n+1]||v[v.length-1]).sn-a.startSN;for(let V=k;V>h;V--){const G=v[V].programDateTime;if(e>=G&&e<G+v[V].duration*1e3)return V}}return h}}}return-1}function Ha(a,e,t){var n,r;const i=new Pr(a,t),s=(n=i.METHOD)!=null?n:"",u=i.URI,p=i.hexadecimalInteger("IV"),h=i.KEYFORMATVERSIONS,v=(r=i.KEYFORMAT)!=null?r:"identity";u&&i.IV&&!p&&ce.error(`Invalid IV: ${i.IV}`);const _=u?Ls.resolve(u,e):"",k=(h||"1").split("/").map(Number).filter(Number.isFinite);return new ks(s,_,v,k,p,i.KEYID)}function Wa(a){const t=new Pr(a).decimalFloatingPoint("TIME-OFFSET");return c(t)?t:null}function oa(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>Qe(i,n));r.length&&(e[`${n}Codec`]=r.map(i=>i.split("/")[0]).join(","),t=t.filter(i=>r.indexOf(i)===-1))}),e.unknownCodecs=t}function js(a,e,t){const n=e[t];n&&(a[t]=n)}function fi(a,e){let t=a[e];for(let n=e;n--;){const r=a[n];if(!r)return;r.programDateTime=t.programDateTime-r.duration*1e3,t=r}}function Hr(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function ps(a,e,t,n){a.relurl=e.URI,e.BYTERANGE&&a.setByteRange(e.BYTERANGE),a.level=t,a.sn="initSegment",n&&(a.levelkeys=n),a.initSegment=null}function ws(a,e,t){a.levelkeys=e;const{encryptedFragments:n}=t;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(r=>e[r].isCommonEncryption)&&n.push(a)}function wi(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function os(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function Ps(a,e){const t=e.startPTS;if(c(t)){let n=0,r;e.sn>a.sn?(n=t-a.start,r=a):(n=a.start-t,r=e),r.duration!==n&&r.setDuration(n)}else e.sn>a.sn?a.cc===e.cc&&a.minEndPTS?e.setStart(a.start+(a.minEndPTS-a.start)):e.setStart(a.start+a.duration):e.setStart(Math.max(a.start-e.duration,0))}function Ms(a,e,t,n,r,i,s){n-t<=0&&(s.warn("Fragment should have a positive duration",e),n=t+e.duration,i=r+e.duration);let p=t,h=n;const v=e.startPTS,_=e.endPTS;if(c(v)){const Je=Math.abs(v-t);a&&Je>a.totalduration?s.warn(`media timestamps and playlist times differ by ${Je}s for level ${e.level} ${a.url}`):c(e.deltaPTS)?e.deltaPTS=Math.max(Je,e.deltaPTS):e.deltaPTS=Je,p=Math.max(t,v),t=Math.min(t,v),r=e.startDTS!==void 0?Math.min(r,e.startDTS):r,h=Math.min(n,_),n=Math.max(n,_),i=e.endDTS!==void 0?Math.max(i,e.endDTS):i}const k=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=p,e.startDTS=r,e.endPTS=n,e.minEndPTS=h,e.endDTS=i;const V=e.sn;if(!a||V<a.startSN||V>a.endSN)return 0;let G;const we=V-a.startSN,Se=a.fragments;for(Se[we]=e,G=we;G>0;G--)Ps(Se[G],Se[G-1]);for(G=we;G<Se.length-1;G++)Ps(Se[G],Se[G+1]);return a.fragmentHint&&Ps(Se[Se.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,k}function Js(a,e,t){if(a===e)return;let n=null;const r=a.fragments;for(let v=r.length-1;v>=0;v--){const _=r[v].initSegment;if(_){n=_;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;Hs(a,e,(v,_,k,V)=>{if((!e.startCC||e.skippedSegments)&&_.cc!==v.cc){const G=v.cc-_.cc;for(let we=k;we<V.length;we++)V[we].cc+=G;e.endCC=V[V.length-1].cc}c(v.startPTS)&&c(v.endPTS)&&(_.setStart(_.startPTS=v.startPTS),_.startDTS=v.startDTS,_.maxStartPTS=v.maxStartPTS,_.endPTS=v.endPTS,_.endDTS=v.endDTS,_.minEndPTS=v.minEndPTS,_.setDuration(v.endPTS-v.startPTS),_.duration&&(i=_),e.PTSKnown=e.alignedSliding=!0),v.hasStreams&&(_.elementaryStreams=v.elementaryStreams),_.loader=v.loader,v.hasStats&&(_.stats=v.stats),v.initSegment&&(_.initSegment=v.initSegment,n=v.initSegment)});const s=e.fragments,u=e.fragmentHint?s.concat(e.fragmentHint):s;if(n&&u.forEach(v=>{var _;v&&(!v.initSegment||v.initSegment.relurl===((_=n)==null?void 0:_.relurl))&&(v.initSegment=n)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(v=>!v),e.deltaUpdateFailed){t.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let v=e.skippedSegments;v--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=Cs(a.dateRanges,e,t));const v=a.fragments.filter(_=>_.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let _=1;_<u.length;_++)u[_].programDateTime===null&&Hr(u[_],u[_-1],v);Ma(v,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var p;const v=Ii(a,e.startSN-1);e.startCC=(p=v==null?void 0:v.cc)!=null?p:s[0].cc}ta(a.partList,e.partList,(v,_)=>{_.elementaryStreams=v.elementaryStreams,_.stats=v.stats}),i?Ms(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS,t):ua(a,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const h=e.advancedDateTime;if(e.advanced&&h){const v=e.edge;e.driftStart||(e.driftStartTime=h,e.driftStart=v),e.driftEndTime=h,e.driftEnd=v}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function Cs(a,e,t){const{dateRanges:n,recentlyRemovedDateranges:r}=e,i=b({},a);r&&r.forEach(p=>{delete i[p]});const u=Object.keys(i).length;return u?(Object.keys(n).forEach(p=>{const h=i[p],v=new ci(n[p].attr,h);v.isValid?(i[p]=v,h||(v.tagOrder+=u)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${Ct(n[p].attr)}"`)}),i):n}function ta(a,e,t){if(a&&e){let n=0;for(let r=0,i=a.length;r<=i;r++){const s=a[r],u=e[r+n];s&&u&&s.index===u.index&&s.fragment.sn===u.fragment.sn?t(s,u):n--}}}function Hs(a,e,t){const n=e.skippedSegments,r=Math.max(a.startSN,e.startSN)-e.startSN,i=(a.fragmentHint?1:0)+(n?e.endSN:Math.min(a.endSN,e.endSN))-e.startSN,s=e.startSN-a.startSN,u=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,p=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let h=r;h<=i;h++){const v=p[s+h];let _=u[h];if(n&&!_&&v&&(_=e.fragments[h]=v),v&&_){t(v,_,h,u);const k=v.relurl,V=_.relurl;if(k&&_a(k,V)){e.playlistParsingError=la(`media sequence mismatch ${_.sn}:`,a,e,v,_);return}else if(v.cc!==_.cc){e.playlistParsingError=la(`discontinuity sequence mismatch (${v.cc}!=${_.cc})`,a,e,v,_);return}}}}function la(a,e,t,n,r){return new Error(`${a} ${r.url}
Playlist starting @${e.startSN}
${e.m3u8}
Playlist starting @${t.startSN}
${t.m3u8}`)}function ua(a,e,t=!0){const n=e.startSN+e.skippedSegments-a.startSN,r=a.fragments,i=n>=0;let s=0;if(i&&n<r.length)s=r[n].start;else if(i&&e.startSN===a.endSN+1)s=a.fragmentEnd;else if(i&&t)s=a.fragmentStart+n*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)s=a.fragmentStart;else return;Va(e,s)}function Va(a,e){if(e){const t=a.fragments;for(let n=a.skippedSegments;n<t.length;n++)t[n].addStart(e);a.fragmentHint&&a.fragmentHint.addStart(e)}}function Ci(a,e=1/0){let t=1e3*a.targetduration;if(a.updated){const n=a.fragments;if(n.length&&t*4>e){const i=n[n.length-1].duration*1e3;i<t&&(t=i)}}else t/=2;return Math.round(t)}function Ii(a,e,t){if(!a)return null;let n=a.fragments[e-a.startSN];return n||(n=a.fragmentHint,n&&n.sn===e)?n:e<a.startSN&&t&&t.sn===e?t:null}function ji(a,e,t){return a?Ts(a.partList,e,t):null}function Ts(a,e,t){if(a)for(let n=a.length;n--;){const r=a[n];if(r.index===t&&r.fragment.sn===e)return r}return null}function Ns(a){a.forEach((e,t)=>{var n;(n=e.details)==null||n.fragments.forEach(r=>{r.level=t,r.initSegment&&(r.initSegment.level=t)})})}function _a(a,e){return a!==e&&e?Ta(a)!==Ta(e):!1}function Ta(a){return a.replace(/\?[^?]*$/,"")}function ha(a,e){for(let n=0,r=a.length;n<r;n++){var t;if(((t=a[n])==null?void 0:t.cc)===e)return a[n]}return null}function Ga(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function Aa(a,e){const t=a.start+e;a.startPTS=t,a.setStart(t),a.endPTS=t+a.duration}function Ia(a,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)Aa(t[n],a);e.fragmentHint&&Aa(e.fragmentHint,a),e.alignedSliding=!0}function Ya(a,e){a&&(Na(e,a),e.alignedSliding||ao(e,a),!e.alignedSliding&&!e.skippedSegments&&ua(a,e,!1))}function Na(a,e){if(!Ga(e,a))return;const t=Math.min(e.endCC,a.endCC),n=ha(e.fragments,t),r=ha(a.fragments,t);if(!n||!r)return;ce.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=n.start-r.start;Ia(i,a)}function ao(a,e){if(!a.hasProgramDateTime||!e.hasProgramDateTime)return;const t=a.fragments,n=e.fragments;if(!t.length||!n.length)return;let r,i;const s=Math.min(e.endCC,a.endCC);e.startCC<s&&a.startCC<s&&(r=ha(n,s),i=ha(t,s)),(!r||!i)&&(r=n[Math.floor(n.length/2)],i=ha(t,r.cc)||t[Math.floor(t.length/2)]);const u=r.programDateTime,p=i.programDateTime;if(!u||!p)return;const h=(p-u)/1e3-(i.start-r.start);Ia(h,a)}function Bs(a,e,t){Ws(a,e,t),a.addEventListener(e,t)}function Ws(a,e,t){a.removeEventListener(e,t)}const Bo={toString:function(a){let e="";const t=a.length;for(let n=0;n<t;n++)e+=`[${a.start(n).toFixed(3)}-${a.end(n).toFixed(3)}]`;return e}},In={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 oo extends Pi{constructor(e,t,n,r,i){super(r,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=In.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:s,fragCurrent:u,media:p,mediaBuffer:h,state:v}=this,_=p?p.currentTime:0,k=zn.bufferInfo(h||p,_,s.maxBufferHole),V=!k.len;if(this.log(`Media seeking to ${c(_)?_.toFixed(3):_}, state: ${v}, ${V?"out of":"in"} buffer`),this.state===In.ENDED)this.resetLoadingState();else if(u){const G=s.maxFragLookUpTolerance,we=u.start-G,Se=u.start+u.duration+G;if(V||Se<k.start||we>k.end){const Je=_>Se;(_<we||Je)&&(Je&&u.loader&&(this.log(`Cancelling fragment load for seek (sn: ${u.sn})`),u.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(p){this.fragmentTracker.removeFragmentsInRange(_,1/0,this.playlistType,!0);const G=this.lastCurrentTime;if(_>G&&(this.lastCurrentTime=_),!this.loadingParts){const we=Math.max(k.end,_),Se=this.shouldLoadParts(this.getLevelDetails(),we);Se&&(this.log(`LL-Part loading ON after seeking to ${_.toFixed(2)} with buffer @${we.toFixed(2)}`),this.loadingParts=Se)}}this.hls.hasEnoughToStart||(this.log(`Setting ${V?"startPosition":"nextLoadPosition"} to ${_} for seek without enough to start`),this.nextLoadPosition=_,V&&(this.startPosition=_)),V&&this.state===In.IDLE&&this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=i,this.hls=e,this.fragmentLoader=new ri(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new qr(e.config)}registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===In.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=In.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return t===-1&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const n=e.end||0,r=this.config.timelineOffset||0;if(n<=r)return!1;const i=e.buffered;this.config.maxBufferHole&&i&&i.length>1&&(e=zn.bufferedInfo(i,e.start,0));const s=e.nextStart;if(s&&s>r&&s<t.edge||this.media.currentTime<e.start)return!1;const p=t.partList;if(p!=null&&p.length){const v=p[p.length-1];return zn.isBuffered(this.media,v.start+v.duration/2)}const h=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(h)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null)return this.levelLastLoaded.details}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;Bs(n,"seeking",this.onMediaSeeking),Bs(n,"ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===In.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),Ws(r,"seeking",this.onMediaSeeking),Ws(r,"ended",this.onMediaEnded),this.keyLoader&&!n&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,n){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=In.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,n){this.startFragRequested=!0,this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){const r=i=>{const s=i.frag;if(this.fragContextChanged(s)){this.warn(`${s.type} sn: ${s.sn}${i.part?" part: "+i.part.index:""} of ${this.fragInfo(s,!1,i.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(s);return}s.stats.chunkCount++,this._handleFragmentLoadProgress(i)};this._doFragLoad(e,t,n,r).then(i=>{if(!i)return;const s=this.state,u=i.frag;if(this.fragContextChanged(u)){(s===In.FRAG_LOADING||!this.fragCurrent&&s===In.PARSING)&&(this.fragmentTracker.removeFragment(u),this.state=In.IDLE);return}"payload"in i&&(this.log(`Loaded ${u.type} sn: ${u.sn} of ${this.playlistLabel()} ${u.level}`),this.hls.trigger(g.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===In.STOPPED||this.state===In.ERROR||(this.warn(`Frag error: ${(i==null?void 0:i.message)||i}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===Rn.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),u=Math.max(e.duration,s?s.len:this.config.maxBufferLength),p=this.backtrackFragment;((p?e.sn-p.sn:0)===1||this.reduceMaxBufferLength(u,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)===Rn.PARTIAL&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const r={startOffset:e,endOffset:t,type:n};this.hls.trigger(g.BUFFER_FLUSHING,r)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(n=>{const r=n==null?void 0:n.frag;if(!r||this.fragContextChanged(r)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:r}=this,{frag:i,payload:s}=n,u=i.decryptdata;if(s&&s.byteLength>0&&u!=null&&u.key&&u.iv&&yr(u.method)){const p=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),u.key.buffer,u.iv.buffer,Or(u.method)).catch(h=>{throw r.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.FRAG_DECRYPT_ERROR,fatal:!1,error:h,reason:h.message,frag:i}),h}).then(h=>{const v=self.performance.now();return r.trigger(g.FRAG_DECRYPTED,{frag:i,payload:h,stats:{tstart:p,tdecrypt:v}}),n.payload=h,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===In.STOPPED||this.state===In.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!==In.STOPPED&&(this.state=In.IDLE),e.frag.data=new Uint8Array(e.payload),n.parsing.start=n.buffering.start=self.performance.now(),n.parsing.end=n.buffering.end=self.performance.now(),this.tick()}unhandledEncryptionError(e,t){var n,r;const i=e.tracks;if(i&&!t.encrypted&&((n=i.audio)!=null&&n.encrypted||(r=i.video)!=null&&r.encrypted)&&(!this.config.emeEnabled||!this.keyLoader.emeController)){const s=this.media,u=new Error(`Encrypted track with no key in ${this.fragInfo(t)} (media ${s?"attached mediaKeys: "+s.mediaKeys:"detached"})`);return this.warn(u.message),!s||s.mediaKeys?!1:(this.hls.trigger(g.ERROR,{type:ie.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_NO_KEYS,fatal:!1,error:u,frag:t}),this.resetTransmuxer(),!0)}return!1}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const n=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${n?Bo.toString(zn.getBuffered(n)):"(detached)"})`),je(e)){var r;if(e.type!==X.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(u=>!!s[u])){this.state=In.IDLE;return}}const i=(r=this.levels)==null?void 0:r[e.level];i!=null&&i.fragmentError&&(this.log(`Resetting level fragment error count of ${i.fragmentError} on frag buffered`),i.fragmentError=0)}this.state=In.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:r,partsLoaded:i}=e,s=!i||i.length===0||i.some(p=>!p),u=new Mi(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!s);t.flush(u)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,r){var i;this.fragCurrent=e;const s=t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let u=null;if(e.encrypted&&!((i=e.decryptdata)!=null&&i.key)){if(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=In.KEY_LOADING,this.fragCurrent=e,u=this.keyLoader.load(e).then(k=>{if(!this.fragContextChanged(k.frag))return this.hls.trigger(g.KEY_LOADED,k),this.state===In.KEY_LOADING&&(this.state=In.IDLE),k}),this.hls.trigger(g.KEY_LOADING,{frag:e}),this.fragCurrent===null)return this.log("context changed in KEY_LOADING"),Promise.resolve(null)}else e.encrypted||(u=this.keyLoader.loadClear(e,s.encryptedFragments,this.startFragRequested),u&&this.log("[eme] blocking frag load until media-keys acquired"));const p=this.fragPrevious;if(je(e)&&(!p||e.sn!==p.sn)){const k=this.shouldLoadParts(t.details,e.end);k!==this.loadingParts&&(this.log(`LL-Part loading ${k?"ON":"OFF"} loading sn ${p==null?void 0:p.sn}->${e.sn}`),this.loadingParts=k)}if(n=Math.max(e.start,n||0),this.loadingParts&&je(e)){const k=s.partList;if(k&&r){n>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const V=this.getNextPart(k,e,n);if(V>-1){const G=k[V];e=this.fragCurrent=G.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${G.index} (${V}/${k.length-1}) of ${this.fragInfo(e,!1,G)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=G.start+G.duration,this.state=In.FRAG_LOADING;let we;return u?we=u.then(Se=>!Se||this.fragContextChanged(Se.frag)?null:this.doFragPartsLoad(e,G,t,r)).catch(Se=>this.handleFragLoadError(Se)):we=this.doFragPartsLoad(e,G,t,r).catch(Se=>this.handleFragLoadError(Se)),this.hls.trigger(g.FRAG_LOADING,{frag:e,part:G,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):we}else if(!e.url||this.loadedEndOfParts(k,n))return Promise.resolve(null)}}if(je(e)&&this.loadingParts){var h;this.log(`LL-Part loading OFF after next part miss @${n.toFixed(2)} Check buffer at sn: ${e.sn} loaded parts: ${(h=s.partList)==null?void 0:h.filter(k=>k.loaded).map(k=>`[${k.start}-${k.end}]`)}`),this.loadingParts=!1}else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${"["+s.startSN+"-"+s.endSN+"]"}, target: ${parseFloat(n.toFixed(3))}`),c(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=In.FRAG_LOADING;const v=this.config.progressive&&e.type!==X.SUBTITLE;let _;return v&&u?_=u.then(k=>!k||this.fragContextChanged(k.frag)?null:this.fragmentLoader.load(e,r)).catch(k=>this.handleFragLoadError(k)):_=Promise.all([this.fragmentLoader.load(e,v?r:void 0),u]).then(([k])=>(!v&&r&&r(k),k)).catch(k=>this.handleFragLoadError(k)),this.hls.trigger(g.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):_}doFragPartsLoad(e,t,n,r){return new Promise((i,s)=>{var u;const p=[],h=(u=n.details)==null?void 0:u.partList,v=_=>{this.fragmentLoader.loadPart(e,_,r).then(k=>{p[_.index]=k;const V=k.part;this.hls.trigger(g.FRAG_LOADED,k);const G=ji(n.details,e.sn,_.index+1)||Ts(h,e.sn,_.index+1);if(G)v(G);else return i({frag:e,part:V,partsLoaded:p})}).catch(s)};v(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===F.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===ie.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(t.frag)):this.hls.trigger(g.ERROR,t)}else this.hls.trigger(g.ERROR,{type:ie.OTHER_ERROR,details:F.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==In.PARSING){!this.fragCurrent&&this.state!==In.STOPPED&&this.state!==In.ERROR&&(this.state=In.IDLE);return}const{frag:n,part:r,level:i}=t,s=self.performance.now();n.stats.parsing.end=s,r&&(r.stats.parsing.end=s);const u=this.getLevelDetails(),h=u&&n.sn>u.endSN||this.shouldLoadParts(u,n.end);h!==this.loadingParts&&(this.log(`LL-Part loading ${h?"ON":"OFF"} after parsing segment ending @${n.end.toFixed(2)}`),this.loadingParts=h),this.updateLevelTiming(n,r,i,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e.partList){var n;const i=e.partList[0];if(i.fragment.type===X.SUBTITLE)return!1;const s=i.end+(((n=e.fragmentHint)==null?void 0:n.duration)||0);if(t>=s){var r;if((this.hls.hasEnoughToStart?((r=this.media)==null?void 0:r.currentTime)||this.lastCurrentTime:this.getLoadPosition())>i.start-i.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:r,sn:i,part:s}=e;if(!(t!=null&&t[r]))return this.warn(`Levels object was unset while buffering fragment ${i} of ${this.playlistLabel()} ${r}. The current chunk will not be buffered.`),null;const u=t[r],p=u.details,h=s>-1?ji(p,i,s):null,v=h?h.fragment:Ii(p,i,n);return v?(n&&n!==v&&(v.stats=n.stats),{frag:v,part:h,level:u}):null}bufferFragmentData(e,t,n,r,i){if(this.state!==In.PARSING)return;const{data1:s,data2:u}=e;let p=s;if(u&&(p=ct(s,u)),!p.length)return;const h=this.initPTS[t.cc],v=h?-h.baseTime/h.timescale:void 0,_={type:e.type,frag:t,part:n,chunkMeta:r,offset:v,parent:t.type,data:p};if(this.hls.trigger(g.BUFFER_APPENDING,_),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!zn.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=zn.bufferInfo(t,n,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),u=Math.max(Math.min(e.start-s,r.end-s),n+s);e.start-u>s&&this.flushMainBuffer(u,e.start)}getFwdBufferInfo(e,t){var n;const r=this.getLoadPosition();if(!c(r))return null;const s=this.lastCurrentTime>r||(n=this.media)!=null&&n.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,r,t,s)}getFwdBufferInfoAtPos(e,t,n,r){const i=zn.bufferInfo(e,t,r);if(i.len===0&&i.nextStart!==void 0){const s=this.fragmentTracker.getBufferedFrag(t,n);if(s&&(i.nextStart<=s.end||s.gap)){const u=Math.max(Math.min(i.nextStart,s.end)-t,r);return zn.bufferInfo(e,t,u)}}return i}getMaxBufferLength(e){const{config:t}=this;let n;return e?n=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):n=t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const n=this.config,r=Math.max(Math.min(e-t,n.maxBufferLength),t),i=Math.max(e-t*3,n.maxMaxBufferLength/2,r);return i>=r?(n.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0):!1}getAppendedFrag(e,t=X.MAIN){const n=this.fragmentTracker?this.fragmentTracker.getAppendedFrag(e,t):null;return n&&"fragment"in n?n.fragment:n}getNextFragment(e,t){const n=t.fragments,r=n.length;if(!r)return null;const{config:i}=this,s=n[0].start,u=i.lowLatencyMode&&!!t.partList;let p=null;if(t.live){const _=i.initialLiveManifestSize;if(r<_)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${_})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s){var h;u&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),p=this.getInitialLiveFragment(t);const k=this.hls.startPosition,V=this.hls.liveSyncPosition,G=p?(k!==-1&&k>=s?k:V)||p.start:e;this.log(`Setting startPosition to ${G} to match start frag at live edge. mainStart: ${k} liveSyncPosition: ${V} frag.start: ${(h=p)==null?void 0:h.start}`),this.startPosition=this.nextLoadPosition=G}}else e<=s&&(p=n[0]);if(!p){const _=this.loadingParts?t.partEnd:t.fragmentEnd;p=this.getFragmentAtPosition(e,_,t)}let v=this.filterReplacedPrimary(p,t);if(!v&&p){const _=p.sn-t.startSN;v=this.filterReplacedPrimary(n[_+1]||null,t)}return this.mapToInitFragWhenRequired(v)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===Rn.OK||n===Rn.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,r,i){let s=null;if(e.gap&&(s=this.getNextFragment(this.nextLoadPosition,t),s&&!s.gap&&n.nextStart)){const u=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r,0);if(u!==null&&n.len+u.len>=i){const p=s.sn;return this.loopSn!==p&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${p}`),this.loopSn=p),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(Zr(this.config)){var e;if((e=this.hls.interstitialsManager)==null||(e=e.playingItem)==null?void 0:e.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(Zr(this.config)&&e.type!==X.SUBTITLE){const n=this.hls.interstitialsManager,r=n==null?void 0:n.bufferingItem;if(r){const s=r.event;if(s){if(s.appendInPlace||Math.abs(e.start-r.start)>1||r.start===0)return null}else if(e.end<=r.start&&(t==null?void 0:t.live)===!1||e.start>r.end&&r.nextEvent&&(r.nextEvent.appendInPlace||e.start-r.end>1))return null}const i=n==null?void 0:n.playerQueue;if(i)for(let s=i.length;s--;){const u=i[s].interstitial;if(u.appendInPlace&&e.start>=u.startTime&&e.end<=u.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!e.initSegment.data&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,n){let r=-1,i=!1,s=!0;for(let u=0,p=e.length;u<p;u++){const h=e[u];if(s=s&&!h.independent,r>-1&&n<h.start)break;const v=h.loaded;v?r=-1:(i||(h.independent||s)&&h.fragment===t)&&(h.fragment!==t&&this.warn(`Need buffer at ${n} but next unloaded part starts at ${h.start}`),r=u),i=v}return r}loadedEndOfParts(e,t){let n;for(let r=e.length;r--;){if(n=e[r],!n.loaded)return!1;if(t>n.start)return!0}return!1}getInitialLiveFragment(e){const t=e.fragments,n=this.fragPrevious;let r=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),r=Zn(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){const i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){const s=t[i-e.startSN];n.cc===s.cc&&(r=s,this.log(`Live playlist, switching playlist, load frag with next SN: ${r.sn}`))}r||(r=qn(e,n.cc,n.end),r&&this.log(`Live playlist, switching playlist, load frag with same CC: ${r.sn}`))}}else{const i=this.hls.liveSyncPosition;i!==null&&(r=this.getFragmentAtPosition(i,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r}getFragmentAtPosition(e,t,n){const{config:r}=this;let{fragPrevious:i}=this,{fragments:s,endSN:u}=n;const{fragmentHint:p}=n,{maxFragLookUpTolerance:h}=r,v=n.partList,_=!!(this.loadingParts&&v!=null&&v.length&&p);_&&!this.bitrateTest&&v[v.length-1].fragment.sn===p.sn&&(s=s.concat(p),u=p.sn);let k;if(e<t){var V;const we=e<this.lastCurrentTime||e>t-h||(V=this.media)!=null&&V.paused||!this.startFragRequested?0:h;k=nr(i,s,e,we)}else k=s[s.length-1];if(k){const G=k.sn-n.startSN,we=this.fragmentTracker.getState(k);if((we===Rn.OK||we===Rn.PARTIAL&&k.gap)&&(i=k),i&&k.sn===i.sn&&(!_||v[0].fragment.sn>k.sn||!n.live)&&k.level===i.level){const Je=s[G+1];k.sn<u&&this.fragmentTracker.getState(Je)!==Rn.OK?k=Je:k=null}}return k}alignPlaylists(e,t,n){const r=e.fragments.length;if(!r)return this.warn("No fragments in live playlist"),0;const i=e.fragmentStart,s=!t,u=e.alignedSliding&&c(i);if(s||!u&&!i){Ya(n,e);const p=e.fragmentStart;return this.log(`Live playlist sliding: ${p.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${r}`),p}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let n=this.startPosition;n<t&&(n=-1);const r=this.timelineOffset;if(n===-1){const i=this.startTimeOffset!==null,s=i?this.startTimeOffset:e.startTimeOffset;s!==null&&c(s)?(n=t+s,s<0&&(n+=e.edge),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Setting startPosition to ${n} for start time offset ${s} found in ${i?"multivariant":"media"} playlist`),this.startPosition=n):e.live?(n=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${n}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=n=0),this.lastCurrentTime=n+r}this.nextLoadPosition=n+r}getLoadPosition(){var e;const{media:t}=this;let n=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?n=t.currentTime:this.nextLoadPosition>=0&&(n=this.nextLoadPosition),n}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&je(e)&&e.stats.aborted&&(this.log(`Fragment ${e.sn}${t?" part "+t.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==In.FRAG_LOADING_WAITING_RETRY)&&(this.state=In.IDLE)}onFragmentOrKeyLoadError(e,t){var n;if(t.chunkMeta&&!t.frag){const Je=this.getCurrentContext(t.chunkMeta);Je&&(t.frag=Je.frag)}const r=t.frag;if(!r||r.type!==e||!this.levels)return;if(this.fragContextChanged(r)){var i;this.warn(`Frag load error must match current frag to retry ${r.url} > ${(i=this.fragCurrent)==null?void 0:i.url}`);return}const s=t.details===F.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const u=t.errorAction;if(!u){this.state=In.ERROR;return}const{action:p,flags:h,retryCount:v=0,retryConfig:_}=u,k=!!_,V=k&&p===Bn.RetryRequest,G=k&&!u.resolved&&h===An.MoveAllAlternatesMatchingHost,we=(n=this.hls.latestLevelDetails)==null?void 0:n.live;if(!V&&G&&je(r)&&!r.endList&&we&&!Ft(t))this.resetFragmentErrors(e),this.treatAsGap(r),u.resolved=!0;else if((V||G)&&v<_.maxNumRetry){var Se;const Je=Qr((Se=t.response)==null?void 0:Se.code),ot=ur(_,v);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+ot,this.state=In.FRAG_LOADING_WAITING_RETRY,u.resolved=!0,Je){this.log("Waiting for connection (offline)"),this.retryDate=1/0,t.reason="offline";return}this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${v+1}/${_.maxNumRetry} in ${ot}ms`)}else if(_)if(this.resetFragmentErrors(e),v<_.maxNumRetry)!s&&p!==Bn.RemoveAlternatePermanently&&(u.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${v})`);return}else p===Bn.SendAlternateToPenaltyBox?this.state=In.WAITING_LEVEL:this.state=In.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,n=t===1/0;(!t||e>=t||n&&!Qr(0))&&(n&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=In.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===In.PARSING||this.state===In.PARSED){const t=e.frag,n=e.parent,r=this.getFwdBufferInfo(this.mediaBuffer,n),i=r&&r.len>.5;i&&this.reduceMaxBufferLength(r.len,(t==null?void 0:t.duration)||10);const s=!i;return s&&this.warn(`Buffer full error while media.currentTime (${this.getLoadPosition()}) is not buffered, flush ${n} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===X.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==In.STOPPED&&(this.state=In.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=zn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===In.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==In.STOPPED&&(this.state=In.IDLE)}resetStartWhenNotLoaded(){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const e=this.levelLastLoaded,t=e?e.details:null;t!=null&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.log(`Loading context changed while buffering sn ${e.sn} of ${this.playlistLabel()} ${e.level===-1?"<removed>":e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,n,r){const i=n.details;if(!i){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((p,h)=>{const v=e.elementaryStreams[h];if(v){const _=v.endPTS-v.startPTS;if(_<=0)return this.warn(`Could not parse fragment ${e.sn} ${h} duration reliably (${_})`),p||!1;const k=r?0:Ms(i,e,v.startPTS,v.endPTS,v.startDTS,v.endDTS,this);return this.hls.trigger(g.LEVEL_PTS_UPDATED,{details:i,level:n,drift:k,type:h,frag:e,start:v.startPTS,end:v.endPTS}),!0}return p},!1)){var u;const p=((u=this.transmuxer)==null?void 0:u.error)===null;if((n.fragmentError===0||p&&(n.fragmentError<2||e.endList))&&this.treatAsGap(e,n),p){const h=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(h.message),this.hls.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.FRAG_PARSING_ERROR,fatal:!1,error:h,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=In.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(g.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===X.MAIN?"level":"track"}fragInfo(e,t=!0,n){var r,i;return`${this.playlistLabel()} ${e.level} (${n?"part":"frag"}:[${((r=t&&!n?e.startPTS:(n||e).start)!=null?r:NaN).toFixed(3)}-${((i=t&&!n?e.endPTS:(n||e).end)!=null?i:NaN).toFixed(3)}]${n&&e.type==="main"?"INDEPENDENT="+(n.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function Zr(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class Ba{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=Xa(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function Xa(a,e){const t=new Uint8Array(e);let n=0;for(let r=0;r<a.length;r++){const i=a[r];t.set(i,n),n+=i.length}return t}var Da={exports:{}},Qa;function Sl(){return Qa||(Qa=1,function(a){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(p,h,v){this.fn=p,this.context=h,this.once=v||!1}function i(p,h,v,_,k){if(typeof v!="function")throw new TypeError("The listener must be a function");var V=new r(v,_||p,k),G=t?t+h:h;return p._events[G]?p._events[G].fn?p._events[G]=[p._events[G],V]:p._events[G].push(V):(p._events[G]=V,p._eventsCount++),p}function s(p,h){--p._eventsCount===0?p._events=new n:delete p._events[h]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],v,_;if(this._eventsCount===0)return h;for(_ in v=this._events)e.call(v,_)&&h.push(t?_.slice(1):_);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(v)):h},u.prototype.listeners=function(h){var v=t?t+h:h,_=this._events[v];if(!_)return[];if(_.fn)return[_.fn];for(var k=0,V=_.length,G=new Array(V);k<V;k++)G[k]=_[k].fn;return G},u.prototype.listenerCount=function(h){var v=t?t+h:h,_=this._events[v];return _?_.fn?1:_.length:0},u.prototype.emit=function(h,v,_,k,V,G){var we=t?t+h:h;if(!this._events[we])return!1;var Se=this._events[we],Je=arguments.length,ot,ft;if(Se.fn){switch(Se.once&&this.removeListener(h,Se.fn,void 0,!0),Je){case 1:return Se.fn.call(Se.context),!0;case 2:return Se.fn.call(Se.context,v),!0;case 3:return Se.fn.call(Se.context,v,_),!0;case 4:return Se.fn.call(Se.context,v,_,k),!0;case 5:return Se.fn.call(Se.context,v,_,k,V),!0;case 6:return Se.fn.call(Se.context,v,_,k,V,G),!0}for(ft=1,ot=new Array(Je-1);ft<Je;ft++)ot[ft-1]=arguments[ft];Se.fn.apply(Se.context,ot)}else{var Pt=Se.length,Kt;for(ft=0;ft<Pt;ft++)switch(Se[ft].once&&this.removeListener(h,Se[ft].fn,void 0,!0),Je){case 1:Se[ft].fn.call(Se[ft].context);break;case 2:Se[ft].fn.call(Se[ft].context,v);break;case 3:Se[ft].fn.call(Se[ft].context,v,_);break;case 4:Se[ft].fn.call(Se[ft].context,v,_,k);break;default:if(!ot)for(Kt=1,ot=new Array(Je-1);Kt<Je;Kt++)ot[Kt-1]=arguments[Kt];Se[ft].fn.apply(Se[ft].context,ot)}}return!0},u.prototype.on=function(h,v,_){return i(this,h,v,_,!1)},u.prototype.once=function(h,v,_){return i(this,h,v,_,!0)},u.prototype.removeListener=function(h,v,_,k){var V=t?t+h:h;if(!this._events[V])return this;if(!v)return s(this,V),this;var G=this._events[V];if(G.fn)G.fn===v&&(!k||G.once)&&(!_||G.context===_)&&s(this,V);else{for(var we=0,Se=[],Je=G.length;we<Je;we++)(G[we].fn!==v||k&&!G[we].once||_&&G[we].context!==_)&&Se.push(G[we]);Se.length?this._events[V]=Se.length===1?Se[0]:Se:s(this,V)}return this},u.prototype.removeAllListeners=function(h){var v;return h?(v=t?t+h:h,this._events[v]&&s(this,v)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=t,u.EventEmitter=u,a.exports=u}(Da)),Da.exports}var rl=Sl(),_o=P(rl);const lo="1.6.15",Ja={};function $o(){return typeof __HLS_WORKER_BUNDLE__=="function"}function wl(){const a=Ja[lo];if(a)return a.clientCount++,a;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),r={worker:new self.Worker(t),objectURL:t,clientCount:1};return Ja[lo]=r,r}function Fo(a){const e=Ja[a];if(e)return e.clientCount++,e;const t=new self.URL(a,self.location.href).href,r={worker:new self.Worker(t),scriptURL:t,clientCount:1};return Ja[a]=r,r}function Cl(a){const e=Ja[a||lo];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete Ja[a||lo],r&&self.URL.revokeObjectURL(r),n.terminate()}}function xo(a,e){return e+10<=a.length&&a[e]===51&&a[e+1]===68&&a[e+2]===73&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function po(a,e){return e+10<=a.length&&a[e]===73&&a[e+1]===68&&a[e+2]===51&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function qa(a,e){let t=0;return t=(a[e]&127)<<21,t|=(a[e+1]&127)<<14,t|=(a[e+2]&127)<<7,t|=a[e+3]&127,t}function uo(a,e){const t=e;let n=0;for(;po(a,e);){n+=10;const r=qa(a,e+6);n+=r,xo(a,e+10)&&(n+=10),e+=n}if(n>0)return a.subarray(t,t+n)}function zo(a,e,t,n){const r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=e[t+2],s=i>>2&15;if(s>12){const V=new Error(`invalid ADTS sampling index:${s}`);a.emit(g.ERROR,g.ERROR,{type:ie.MEDIA_ERROR,details:F.FRAG_PARSING_ERROR,fatal:!0,error:V,reason:V.message});return}const u=(i>>6&3)+1,p=e[t+3]>>6&3|(i&1)<<2,h="mp4a.40."+u,v=r[s];let _=s;(u===5||u===29)&&(_-=3);const k=[u<<3|(_&14)>>1,(_&1)<<7|p<<3];return ce.log(`manifest codec:${n}, parsed codec:${h}, channels:${p}, rate:${v} (ADTS object type:${u} sampling index:${s})`),{config:k,samplerate:v,channelCount:p,codec:h,parsedCodec:h,manifestCodec:n}}function Uo(a,e){return a[e]===255&&(a[e+1]&246)===240}function Ko(a,e){return a[e+1]&1?7:9}function Eo(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function Zo(a,e){return e+5<a.length}function So(a,e){return e+1<a.length&&Uo(a,e)}function co(a,e){return Zo(a,e)&&Uo(a,e)&&Eo(a,e)<=a.length-e}function jo(a,e){if(So(a,e)){const t=Ko(a,e);if(e+t>=a.length)return!1;const n=Eo(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||So(a,r)}return!1}function wo(a,e,t,n,r){if(!a.samplerate){const i=zo(e,t,n,r);if(!i)return;b(a,i)}}function il(a){return 1024*9e4/a}function sl(a,e){const t=Ko(a,e);if(e+t<=a.length){const n=Eo(a,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function al(a,e,t,n,r){const i=il(a.samplerate),s=n+r*i,u=sl(e,t);let p;if(u){const{frameLength:_,headerLength:k}=u,V=k+_,G=Math.max(0,t+V-e.length);G?(p=new Uint8Array(V-k),p.set(e.subarray(t+k,e.length),0)):p=e.subarray(t+k,t+V);const we={unit:p,pts:s};return G||a.samples.push(we),{sample:we,length:V,missing:G}}const h=e.length-t;return p=new Uint8Array(h),p.set(e.subarray(t,e.length),0),{sample:{unit:p,pts:s},length:h,missing:-1}}function Co(a,e){return po(a,e)&&qa(a,e+6)+10<=a.length-e}function Tl(a){return a instanceof ArrayBuffer?a:a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer}function go(a,e=0,t=1/0){return ol(a,e,t,Uint8Array)}function ol(a,e,t,n){const r=ll(a);let i=1;"BYTES_PER_ELEMENT"in n&&(i=n.BYTES_PER_ELEMENT);const s=Ho(a)?a.byteOffset:0,u=(s+a.byteLength)/i,p=(s+e)/i,h=Math.floor(Math.max(0,Math.min(p,u))),v=Math.floor(Math.min(h+Math.max(t,0),u));return new n(r,h,v-h)}function ll(a){return a instanceof ArrayBuffer?a:a.buffer}function Ho(a){return a&&a.buffer instanceof ArrayBuffer&&a.byteLength!==void 0&&a.byteOffset!==void 0}function ul(a){const e={key:a.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(a.size<2)return;if(a.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const n=a.data.subarray(1).indexOf(0);if(n===-1)return;const r=He(go(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const u=He(go(a.data,3+n,s));let p;return r==="-->"?p=He(go(a.data,4+n+s)):p=Tl(a.data.subarray(4+n+s)),e.mimeType=r,e.pictureType=i,e.description=u,e.data=p,e}function it(a){if(a.size<2)return;const e=He(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}}function Wo(a){if(a.size<2)return;if(a.type==="TXXX"){let t=1;const n=He(a.data.subarray(t),!0);t+=n.length+1;const r=He(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=He(a.data.subarray(1));return{key:a.type,info:"",data:e}}function To(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const n=He(a.data.subarray(t),!0);t+=n.length+1;const r=He(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=He(a.data);return{key:a.type,info:"",data:e}}function Ao(a){return a.type==="PRIV"?it(a):a.type[0]==="W"?To(a):a.type==="APIC"?ul(a):Wo(a)}function Vo(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=qa(a,4),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}}const eo=10,ma=10;function Io(a){let e=0;const t=[];for(;po(a,e);){const n=qa(a,e+6);a[e+5]>>6&1&&(e+=eo),e+=eo;const r=e+n;for(;e+ma<r;){const i=Vo(a.subarray(e)),s=Ao(i);s&&t.push(s),e+=i.size+eo}xo(a,e)&&(e+=eo)}return t}function Go(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"}function se(a){if(a.data.byteLength===8){const e=new Uint8Array(a.data),t=e[3]&1;let n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,t&&(n+=4772185884e-2),Math.round(n)}}function ne(a){const e=Io(a);for(let t=0;t<e.length;t++){const n=e[t];if(Go(n))return se(n)}}let Le=function(a){return a.audioId3="org.id3",a.dateRange="com.apple.quicktime.HLS",a.emsg="https://aomedia.org/emsg/ID3",a.misbklv="urn:misb:KLV:bin:1910.1",a}({});function Ve(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class mt{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=ct(this.cachedData,e),this.cachedData=null);let n=uo(e,0),r=n?n.length:0,i;const s=this._audioTrack,u=this._id3Track,p=n?ne(n):void 0,h=e.length;for((this.basePTS===null||this.frameIndex===0&&c(p))&&(this.basePTS=St(p,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&u.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Le.audioId3,duration:Number.POSITIVE_INFINITY});r<h;){if(this.canParse(e,r)){const v=this.appendFrame(s,e,r);v?(this.frameIndex++,this.lastPTS=v.sample.pts,r+=v.length,i=r):r=h}else Co(e,r)?(n=uo(e,r),u.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Le.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,i=r):r++;if(r===h&&i!==h){const v=e.slice(i);this.cachedData?this.cachedData=ct(this.cachedData,v):this.cachedData=v}}return{audioTrack:s,videoTrack:Ve(),id3Track:u,textTrack:Ve()}}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:Ve(),id3Track:this._id3Track,textTrack:Ve()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const St=(a,e,t)=>{if(c(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let Ot=null;const It=[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],Ut=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Bt=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],fn=[0,1,1,4];function qt(a,e,t,n,r){if(t+24>e.length)return;const i=Xt(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,u=n+r*s,p={unit:e.subarray(t,t+i.frameLength),pts:u,dts:u};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(p),{sample:p,length:i.frameLength,missing:0}}}function Xt(a,e){const t=a[e+1]>>3&3,n=a[e+1]>>1&3,r=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&r!==0&&r!==15&&i!==3){const s=a[e+2]>>1&1,u=a[e+3]>>6,p=t===3?3-n:n===3?3:4,h=It[p*14+r-1]*1e3,_=Ut[(t===3?0:t===2?1:2)*3+i],k=u===3?1:2,V=Bt[t][n],G=fn[n],we=V*8*G,Se=Math.floor(V*h/_+s)*G;if(Ot===null){const ft=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Ot=ft?parseInt(ft[1]):0}return!!Ot&&Ot<=87&&n===2&&h>=224e3&&u===0&&(a[e+3]=a[e+3]|128),{sampleRate:_,channelCount:k,frameLength:Se,samplesPerFrame:we}}}function N(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function l(a,e){return e+1<a.length&&N(a,e)}function d(a,e){return N(a,e)&&4<=a.length-e}function f(a,e){if(e+1<a.length&&N(a,e)){const n=Xt(a,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const i=e+r;return i===a.length||l(a,i)}return!1}class y extends mt{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=uo(e,0);let r=(n==null?void 0:n.length)||0;if(f(e,r))return!1;for(let i=e.length;r<i;r++)if(jo(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return co(e,t)}appendFrame(e,t,n){wo(e,this.observer,t,n,e.manifestCodec);const r=al(e,t,n,this.basePTS,this.frameIndex);if(r&&r.missing===0)return r}}const R=(a,e)=>{let t=0,n=5;e+=n;const r=new Uint32Array(1),i=new Uint32Array(1),s=new Uint8Array(1);for(;n>0;){s[0]=a[e];const u=Math.min(n,8),p=8-u;i[0]=4278190080>>>24+p<<p,r[0]=(s[0]&i[0])>>p,t=t?t<<u|r[0]:r[0],e+=1,n-=u}return t};class H extends mt{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=ve(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=uo(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&ne(t)!==void 0&&R(e,n)<16}}function ve(a,e,t,n,r){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const i=e[t+4]>>6;if(i>=3)return-1;const u=[48e3,44100,32e3][i],p=e[t+4]&63,v=[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][p*3+i]*2;if(t+v>e.length)return-1;const _=e[t+6]>>5;let k=0;_===2?k+=2:(_&1&&_!==1&&(k+=2),_&4&&(k+=2));const V=(e[t+6]<<8|e[t+7])>>12-k&1,we=[2,1,2,3,3,4,4,5][_]+V,Se=e[t+5]>>3,Je=e[t+5]&7,ot=new Uint8Array([i<<6|Se<<1|Je>>2,(Je&3)<<6|_<<3|V<<2|p>>4,p<<4&224]),ft=1536/u*9e4,Pt=n+r*ft,Kt=e.subarray(t,t+v);return a.config=ot,a.channelCount=we,a.samplerate=u,a.samples.push({unit:Kt,pts:Pt}),v}class Te extends mt{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=uo(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&ne(t)!==void 0&&R(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(f(e,n))return ce.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return d(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return qt(e,t,n,this.basePTS,this.frameIndex)}}const Ke=/\/emsg[-/]ID3/i;class pt{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,n,r){const i=this.videoTrack=Ve("video",1),s=this.audioTrack=Ve("audio",1),u=this.txtTrack=Ve("text",1);if(this.id3Track=Ve("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const p=Ae(e);if(p.video){const{id:h,timescale:v,codec:_,supplemental:k}=p.video;i.id=h,i.timescale=u.timescale=v,i.codec=_,i.supplemental=k}if(p.audio){const{id:h,timescale:v,codec:_}=p.audio;s.id=h,s.timescale=v,s.codec=_}u.id=At.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return Ie(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=ct(this.remainderData,e));const u=tt(n);this.remainderData=u.remainder,r.samples=u.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=ut(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const r=this.extractID3Track(t,this.timeOffset);return n.samples=ut(e,t),{videoTrack:t,audioTrack:Ve(),id3Track:r,textTrack:Ve()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=te(e.samples,["emsg"]);r&&r.forEach(i=>{const s=kt(i);if(Ke.test(s.schemeIdUri)){const u=Dt(s,t);let p=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;p<=.001&&(p=Number.POSITIVE_INFINITY);const h=s.payload;n.samples.push({data:h,len:h.byteLength,dts:u,pts:u,type:Le.emsg,duration:p})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const u=Dt(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:u,pts:u,type:Le.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 Dt(a,e){return c(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class $t{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new qr(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,cr.cbc)}decryptAacSample(e,t,n){const r=e[t].unit;if(r.length<=16)return;const i=r.subarray(16,r.length-r.length%16),s=i.buffer.slice(i.byteOffset,i.byteOffset+i.length);this.decryptBuffer(s).then(u=>{const p=new Uint8Array(u);r.set(p,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,n)}).catch(n)}decryptAacSamples(e,t,n){for(;;t++){if(t>=e.length){n();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,n),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,n=new Int8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e}decryptAvcSample(e,t,n,r,i){const s=gt(i.data),u=this.getAvcEncryptedData(s);this.decryptBuffer(u.buffer).then(p=>{i.data=this.getAvcDecryptedUnit(s,p),this.decrypter.isSync()||this.decryptAvcSamples(e,t,n+1,r)}).catch(r)}decryptAvcSamples(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length){r();return}const i=e[t].units;for(;!(n>=i.length);n++){const s=i[n];if(!(s.data.length<=48||s.type!==1&&s.type!==5)&&(this.decryptAvcSample(e,t,n,r,s),!this.decrypter.isSync()))return}}}}class Qt{constructor(){this.VideoSample=null}createVideoSample(e,t,n){return{key:e,frame:!1,pts:t,dts:n,units:[],length:0}}getLastNalUnit(e){var t;let n=this.VideoSample,r;if((!n||n.units.length===0)&&(n=e[e.length-1]),(t=n)!=null&&t.units){const i=n.units;r=i[i.length-1]}return r}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const n=t.samples,r=n.length;if(r){const i=n[r-1];e.pts=i.pts,e.dts=i.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,n){const r=t.byteLength;let i=e.naluState||0;const s=i,u=[];let p=0,h,v,_,k=-1,V=0;for(i===-1&&(k=0,V=this.getNALuType(t,0),i=0,p=1);p<r;){if(h=t[p++],!i){i=h?0:1;continue}if(i===1){i=h?0:2;continue}if(!h)i=3;else if(h===1){if(v=p-i-1,k>=0){const G={data:t.subarray(k,v),type:V};u.push(G)}else{const G=this.getLastNalUnit(e.samples);G&&(s&&p<=4-s&&G.state&&(G.data=G.data.subarray(0,G.data.byteLength-s)),v>0&&(G.data=ct(G.data,t.subarray(0,v)),G.state=0))}p<r?(_=this.getNALuType(t,p),k=p,V=_,i=0):i=-1}else i=0}if(k>=0&&i>=0){const G={data:t.subarray(k,r),type:V,state:i};u.push(G)}if(u.length===0){const G=this.getLastNalUnit(e.samples);G&&(G.data=ct(G.data,t))}return e.naluState=i,u}}class an{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(i===0)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=i*8,this.bytesAvailable-=i}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const n=this.word>>>32-t;if(e>32&&ce.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class on extends Qt{parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,u,p=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(h=>{var v,_;switch(h.type){case 1:{let we=!1;u=!0;const Se=h.data;if(p&&Se.length>4){const Je=this.readSliceType(Se);(Je===2||Je===4||Je===7||Je===9)&&(we=!0)}if(we){var k;(k=s)!=null&&k.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.frame=!0,s.key=we;break}case 5:u=!0,(v=s)!=null&&v.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 6:{u=!0,dt(h.data,1,n.pts,t.samples);break}case 7:{var V,G;u=!0,p=!0;const we=h.data,Se=this.readSPS(we);if(!e.sps||e.width!==Se.width||e.height!==Se.height||((V=e.pixelRatio)==null?void 0:V[0])!==Se.pixelRatio[0]||((G=e.pixelRatio)==null?void 0:G[1])!==Se.pixelRatio[1]){e.width=Se.width,e.height=Se.height,e.pixelRatio=Se.pixelRatio,e.sps=[we];const Je=we.subarray(1,4);let ot="avc1.";for(let ft=0;ft<3;ft++){let Pt=Je[ft].toString(16);Pt.length<2&&(Pt="0"+Pt),ot+=Pt}e.codec=ot}break}case 8:u=!0,e.pps=[h.data];break;case 9:u=!0,e.audFound=!0,(_=s)!=null&&_.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:u=!0;break;default:u=!1;break}s&&u&&s.units.push(h)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new an(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let n=8,r=8,i;for(let s=0;s<e;s++)r!==0&&(i=t.readEG(),r=(n+i+256)%256),n=r===0?n:r}readSPS(e){const t=new an(e);let n=0,r=0,i=0,s=0,u,p,h;const v=t.readUByte.bind(t),_=t.readBits.bind(t),k=t.readUEG.bind(t),V=t.readBoolean.bind(t),G=t.skipBits.bind(t),we=t.skipEG.bind(t),Se=t.skipUEG.bind(t),Je=this.skipScalingList.bind(this);v();const ot=v();if(_(5),G(3),v(),Se(),ot===100||ot===110||ot===122||ot===244||ot===44||ot===83||ot===86||ot===118||ot===128){const cn=k();if(cn===3&&G(1),Se(),Se(),G(1),V())for(p=cn!==3?8:12,h=0;h<p;h++)V()&&(h<6?Je(16,t):Je(64,t))}Se();const ft=k();if(ft===0)k();else if(ft===1)for(G(1),we(),we(),u=k(),h=0;h<u;h++)we();Se(),G(1);const Pt=k(),Kt=k(),xn=_(1);xn===0&&G(1),G(1),V()&&(n=k(),r=k(),i=k(),s=k());let Ht=[1,1];if(V()&&V())switch(v()){case 1:Ht=[1,1];break;case 2:Ht=[12,11];break;case 3:Ht=[10,11];break;case 4:Ht=[16,11];break;case 5:Ht=[40,33];break;case 6:Ht=[24,11];break;case 7:Ht=[20,11];break;case 8:Ht=[32,11];break;case 9:Ht=[80,33];break;case 10:Ht=[18,11];break;case 11:Ht=[15,11];break;case 12:Ht=[64,33];break;case 13:Ht=[160,99];break;case 14:Ht=[4,3];break;case 15:Ht=[3,2];break;case 16:Ht=[2,1];break;case 255:{Ht=[v()<<8|v(),v()<<8|v()];break}}return{width:Math.ceil((Pt+1)*16-n*2-r*2),height:(2-xn)*(Kt+1)*16-(xn?2:4)*(i+s),pixelRatio:Ht}}}class _n extends Qt{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,u,p=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(h=>{var v,_;switch(h.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),s.frame=!0,u=!0;break;case 16:case 17:case 18:case 21:if(u=!0,p){var k;(k=s)!=null&&k.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 19:case 20:u=!0,(v=s)!=null&&v.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 39:u=!0,dt(h.data,2,n.pts,t.samples);break;case 32:u=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=b(e.params,this.readVPS(h.data)),this.initVPS=h.data),e.vps=[h.data];break;case 33:if(u=!0,p=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],h.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const V=this.readSPS(h.data);e.width=V.width,e.height=V.height,e.pixelRatio=V.pixelRatio,e.codec=V.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const G in V.params)e.params[G]=V.params[G]}this.pushParameterSet(e.sps,h.data,e.vps),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0;break;case 34:if(u=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const V=this.readPPS(h.data);for(const G in V)e.params[G]=V[G]}this.pushParameterSet(e.pps,h.data,e.vps)}break;case 35:u=!0,e.audFound=!0,(_=s)!=null&&_.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:u=!1;break}s&&u&&s.units.push(h)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}pushParameterSet(e,t,n){(n&&n[0]===this.initVPS||!n&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let n=0;for(let r=0;r<e.byteLength;r++)r>=2&&e[r]===3&&e[r-1]===0&&e[r-2]===0||(t[n]=e[r],n++);return new Uint8Array(t.buffer,0,n)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new an(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 an(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const n=t.readBits(3);t.readBoolean();const r=t.readBits(2),i=t.readBoolean(),s=t.readBits(5),u=t.readUByte(),p=t.readUByte(),h=t.readUByte(),v=t.readUByte(),_=t.readUByte(),k=t.readUByte(),V=t.readUByte(),G=t.readUByte(),we=t.readUByte(),Se=t.readUByte(),Je=t.readUByte(),ot=[],ft=[];for(let es=0;es<n;es++)ot.push(t.readBoolean()),ft.push(t.readBoolean());if(n>0)for(let es=n;es<8;es++)t.readBits(2);for(let es=0;es<n;es++)ot[es]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),ft[es]&&t.readUByte();t.readUEG();const Pt=t.readUEG();Pt==3&&t.skipBits(1);const Kt=t.readUEG(),xn=t.readUEG(),Ht=t.readBoolean();let cn=0,ln=0,Yt=0,kn=0;Ht&&(cn+=t.readUEG(),ln+=t.readUEG(),Yt+=t.readUEG(),kn+=t.readUEG());const pr=t.readUEG(),kr=t.readUEG(),Wr=t.readUEG(),Nr=t.readBoolean();for(let es=Nr?0:n;es<=n;es++)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 sa=0;sa<4;sa++)for(let La=0;La<(sa===3?2:6);La++)if(!t.readBoolean())t.readUEG();else{const Ua=Math.min(64,1<<4+(sa<<1));sa>1&&t.readEG();for(let nl=0;nl<Ua;nl++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const wr=t.readUEG();let jr=0;for(let es=0;es<wr;es++){let sa=!1;if(es!==0&&(sa=t.readBoolean()),sa){es===wr&&t.readUEG(),t.readBoolean(),t.readUEG();let La=0;for(let ko=0;ko<=jr;ko++){const Ua=t.readBoolean();let nl=!1;Ua||(nl=t.readBoolean()),(Ua||nl)&&La++}jr=La}else{const La=t.readUEG(),ko=t.readUEG();jr=La+ko;for(let Ua=0;Ua<La;Ua++)t.readUEG(),t.readBoolean();for(let Ua=0;Ua<ko;Ua++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const es=t.readUEG();for(let sa=0;sa<es;sa++){for(let La=0;La<Wr+4;La++)t.readBits(1);t.readBits(1)}}let fr=0,hr=1,Si=1,is=!0,Ai=1,Zi=0;t.readBoolean(),t.readBoolean();let ia=!1;if(t.readBoolean()){if(t.readBoolean()){const No=t.readUByte(),rc=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Xl=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];No>0&&No<16?(hr=rc[No-1],Si=Xl[No-1]):No===255&&(hr=t.readBits(16),Si=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(),ia=t.readBoolean(),ia&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(Ai=t.readBits(32),Zi=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const Xl=t.readBoolean(),ic=t.readBoolean();let xl=!1;(Xl||ic)&&(xl=t.readBoolean(),xl&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),xl&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let sc=0;sc<=n;sc++){is=t.readBoolean();const Vd=is||t.readBoolean();let ac=!1;Vd?t.readEG():ac=t.readBoolean();const oc=ac?1:t.readUEG()+1;if(Xl)for(let El=0;El<oc;El++)t.readUEG(),t.readUEG(),xl&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(ic)for(let El=0;El<oc;El++)t.readUEG(),t.readUEG(),xl&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),fr=t.readUEG())}let Oa=Kt,io=xn;if(Ht){let es=1,sa=1;Pt===1?es=sa=2:Pt==2&&(es=2),Oa=Kt-es*ln-es*cn,io=xn-sa*kn-sa*Yt}const Mo=r?["A","B","C"][r]:"",Wd=u<<24|p<<16|h<<8|v;let bu=0;for(let es=0;es<32;es++)bu=(bu|(Wd>>es&1)<<31-es)>>>0;let _u=bu.toString(16);return s===1&&_u==="2"&&(_u="6"),{codecString:`hvc1.${Mo}${s}.${_u}.${i?"H":"L"}${Je}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:r,general_profile_compatibility_flags:[u,p,h,v],general_constraint_indicator_flags:[_,k,V,G,we,Se],general_level_idc:Je,bit_depth:pr+8,bit_depth_luma_minus8:pr,bit_depth_chroma_minus8:kr,min_spatial_segmentation_idc:fr,chroma_format_idc:Pt,frame_rate:{fixed:is,fps:Zi/Ai}},width:Oa,height:io,pixelRatio:[hr,Si]}}readPPS(e){const t=new an(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const r=t.readBoolean(),i=t.readBoolean();let s=1;return i&&r?s=0:i?s=3:r&&(s=2),{parallelismType:s}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const hn=188;class bn{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=bn.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(hn*5,t-hn)+1,r=0;for(;r<n;){let i=!1,s=-1,u=0;for(let p=r;p<t;p+=hn)if(e[p]===71&&(t-p===hn||e[p+hn]===71)){if(u++,s===-1&&(s=p,s!==0&&(n=Math.min(s+hn*99,e.length-hn)+1)),i||(i=Dn(e,p)===0),i&&u>1&&(s===0&&u>2||p+hn>n))return s}else{if(u)return-1;break}r++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:At[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=bn.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=bn.createTrack("audio",r),this._id3Track=bn.createTrack("id3"),this._txtTrack=bn.createTrack("text"),this._audioTrack.segmentCodec="aac",this.videoParser=null,this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,r=!1){n||(this.sampleAes=null);let i;const s=this._videoTrack,u=this._audioTrack,p=this._id3Track,h=this._txtTrack;let v=s.pid,_=s.pesData,k=u.pid,V=p.pid,G=u.pesData,we=p.pesData,Se=null,Je=this.pmtParsed,ot=this._pmtId,ft=e.length;if(this.remainderData&&(e=ct(this.remainderData,e),ft=e.length,this.remainderData=null),ft<hn&&!r)return this.remainderData=e,{audioTrack:u,videoTrack:s,id3Track:p,textTrack:h};const Pt=Math.max(0,bn.syncOffset(e));ft-=(ft-Pt)%hn,ft<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,ft,e.buffer.byteLength-ft));let Kt=0;for(let Ht=Pt;Ht<ft;Ht+=hn)if(e[Ht]===71){const cn=!!(e[Ht+1]&64),ln=Dn(e,Ht),Yt=(e[Ht+3]&48)>>4;let kn;if(Yt>1){if(kn=Ht+5+e[Ht+4],kn===Ht+hn)continue}else kn=Ht+4;switch(ln){case v:cn&&(_&&(i=Tr(_,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,h,i,!1)),_={data:[],size:0}),_&&(_.data.push(e.subarray(kn,Ht+hn)),_.size+=Ht+hn-kn);break;case k:if(cn){if(G&&(i=Tr(G,this.logger)))switch(u.segmentCodec){case"aac":this.parseAACPES(u,i);break;case"mp3":this.parseMPEGPES(u,i);break;case"ac3":this.parseAC3PES(u,i);break}G={data:[],size:0}}G&&(G.data.push(e.subarray(kn,Ht+hn)),G.size+=Ht+hn-kn);break;case V:cn&&(we&&(i=Tr(we,this.logger))&&this.parseID3PES(p,i),we={data:[],size:0}),we&&(we.data.push(e.subarray(kn,Ht+hn)),we.size+=Ht+hn-kn);break;case 0:cn&&(kn+=e[kn]+1),ot=this._pmtId=jn(e,kn);break;case ot:{cn&&(kn+=e[kn]+1);const pr=Gn(e,kn,this.typeSupported,n,this.observer,this.logger);v=pr.videoPid,v>0&&(s.pid=v,s.segmentCodec=pr.segmentVideoCodec),k=pr.audioPid,k>0&&(u.pid=k,u.segmentCodec=pr.segmentAudioCodec),V=pr.id3Pid,V>0&&(p.pid=V),Se!==null&&!Je&&(this.logger.warn(`MPEG-TS PMT found at ${Ht} after unknown PID '${Se}'. Backtracking to sync byte @${Pt} to parse all TS packets.`),Se=null,Ht=Pt-188),Je=this.pmtParsed=!0;break}case 17:case 8191:break;default:Se=ln;break}}else Kt++;Kt>0&&Mn(this.observer,new Error(`Found ${Kt} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=_,u.pesData=G,p.pesData=we;const xn={audioTrack:u,videoTrack:s,id3Track:p,textTrack:h};return r&&this.extractRemainingSamples(xn),xn}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:n,id3Track:r,textTrack:i}=e,s=n.pesData,u=t.pesData,p=r.pesData;let h;if(s&&(h=Tr(s,this.logger))?(this.readyVideoParser(n.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(n,i,h,!0),n.pesData=null)):n.pesData=s,u&&(h=Tr(u,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,h);break;case"mp3":this.parseMPEGPES(t,h);break;case"ac3":this.parseAC3PES(t,h);break}t.pesData=null}else u!=null&&u.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=u;p&&(h=Tr(p,this.logger))?(this.parseID3PES(r,h),r.pesData=null):r.pesData=p}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new $t(this.observer,this.config,t);return this.decrypt(r,i)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new on:e==="hevc"&&(this.videoParser=new _n))}decrypt(e,t){return new Promise(n=>{const{audioTrack:r,videoTrack:i}=e;r.samples&&r.segmentCodec==="aac"?t.decryptAacSamples(r.samples,0,()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,()=>{n(e)}):n(e)}):i.samples&&t.decryptAvcSamples(i.samples,0,0,()=>{n(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let n=0;const r=this.aacOverFlow;let i=t.data;if(r){this.aacOverFlow=null;const _=r.missing,k=r.sample.unit.byteLength;if(_===-1)i=ct(r.sample.unit,i);else{const V=k-_;r.sample.unit.set(i.subarray(0,_),V),e.samples.push(r.sample),n=r.missing}}let s,u;for(s=n,u=i.length;s<u-1&&!So(i,s);s++);if(s!==n){let _;const k=s<u-1;if(k?_=`AAC PES did not start with ADTS header,offset:${s}`:_="No ADTS header found in AAC PES",Mn(this.observer,new Error(_),k,this.logger),!k)return}wo(e,this.observer,i,s,this.audioCodec);let p;if(t.pts!==void 0)p=t.pts;else if(r){const _=il(e.samplerate);p=r.sample.pts+_}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let h=0,v;for(;s<u;)if(v=al(e,i,s,p,h),s+=v.length,v.missing){this.aacOverFlow=v;break}else for(h++;s<u-1&&!So(i,s);s++);}parseMPEGPES(e,t){const n=t.data,r=n.length;let i=0,s=0;const u=t.pts;if(u===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<r;)if(l(n,s)){const p=qt(e,n,s,u,i);if(p)s+=p.length,i++;else break}else s++}parseAC3PES(e,t){{const n=t.data,r=t.pts;if(r===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=n.length;let s=0,u=0,p;for(;u<i&&(p=ve(e,n,u,r,s++))>0;)u+=p}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=b({},t,{type:this._videoTrack?Le.emsg:Le.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function Dn(a,e){return((a[e+1]&31)<<8)+a[e+2]}function jn(a,e){return(a[e+10]&31)<<8|a[e+11]}function Gn(a,e,t,n,r,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},u=(a[e+1]&15)<<8|a[e+2],p=e+3+u-4,h=(a[e+10]&15)<<8|a[e+11];for(e+=12+h;e<p;){const v=Dn(a,e),_=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){_r("ADTS AAC",i);break}case 15:s.audioPid===-1&&(s.audioPid=v);break;case 21:s.id3Pid===-1&&(s.id3Pid=v);break;case 219:if(!n){_r("H.264",i);break}case 27:s.videoPid===-1&&(s.videoPid=v);break;case 3:case 4:!t.mpeg&&!t.mp3?i.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=v,s.segmentAudioCodec="mp3");break;case 193:if(!n){_r("AC-3",i);break}case 129:t.ac3?s.audioPid===-1&&(s.audioPid=v,s.segmentAudioCodec="ac3"):i.log("AC-3 audio found, not supported in this browser");break;case 6:if(s.audioPid===-1&&_>0){let k=e+5,V=_;for(;V>2;){switch(a[k]){case 106:t.ac3!==!0?i.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=v,s.segmentAudioCodec="ac3");break}const we=a[k+1]+2;k+=we,V-=we}}break;case 194:case 135:return Mn(r,new Error("Unsupported EC-3 in M2TS found"),void 0,i),s;case 36:s.videoPid===-1&&(s.videoPid=v,s.segmentVideoCodec="hevc",i.log("HEVC in M2TS found"));break}e+=_+5}return s}function Mn(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(g.ERROR,g.ERROR,{type:ie.MEDIA_ERROR,details:F.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function _r(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function Tr(a,e){let t=0,n,r,i,s,u;const p=a.data;if(!a||a.size===0)return null;for(;p[0].length<19&&p.length>1;)p[0]=ct(p[0],p[1]),p.splice(1,1);if(n=p[0],(n[0]<<16)+(n[1]<<8)+n[2]===1){if(r=(n[4]<<8)+n[5],r&&r>a.size-6)return null;const v=n[7];v&192&&(s=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,v&64?(u=(n[14]&14)*536870912+(n[15]&255)*4194304+(n[16]&254)*16384+(n[17]&255)*128+(n[18]&254)/2,s-u>60*9e4&&(e.warn(`${Math.round((s-u)/9e4)}s delta between PTS and DTS, align them`),s=u)):u=s),i=n[8];let _=i+9;if(a.size<=_)return null;a.size-=_;const k=new Uint8Array(a.size);for(let V=0,G=p.length;V<G;V++){n=p[V];let we=n.byteLength;if(_)if(_>we){_-=we;continue}else n=n.subarray(_),we-=_,_=0;k.set(n,t),t+=we}return r&&(r-=i+3),{data:k,pts:s,dts:u,len:r}}return null}class gi{static getSilentFrame(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}}}const ni=Math.pow(2,32)-1;class Rt{static init(){Rt.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 Rt.types)Rt.types.hasOwnProperty(e)&&(Rt.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]);Rt.HDLR_TYPES={video:t,audio:n};const r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i=new Uint8Array([0,0,0,0,0,0,0,0]);Rt.STTS=Rt.STSC=Rt.STCO=i,Rt.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Rt.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Rt.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Rt.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),u=new Uint8Array([97,118,99,49]),p=new Uint8Array([0,0,0,1]);Rt.FTYP=Rt.box(Rt.types.ftyp,s,p,s,u),Rt.DINF=Rt.box(Rt.types.dinf,Rt.box(Rt.types.dref,r))}static box(e,...t){let n=8,r=t.length;const i=r;for(;r--;)n+=t[r].byteLength;const s=new Uint8Array(n);for(s[0]=n>>24&255,s[1]=n>>16&255,s[2]=n>>8&255,s[3]=n&255,s.set(e,4),r=0,n=8;r<i;r++)s.set(t[r],n),n+=t[r].byteLength;return s}static hdlr(e){return Rt.box(Rt.types.hdlr,Rt.HDLR_TYPES[e])}static mdat(e){return Rt.box(Rt.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(ni+1)),r=Math.floor(t%(ni+1));return Rt.box(Rt.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 Rt.box(Rt.types.mdia,Rt.mdhd(e.timescale||0,e.duration||0),Rt.hdlr(e.type),Rt.minf(e))}static mfhd(e){return Rt.box(Rt.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"?Rt.box(Rt.types.minf,Rt.box(Rt.types.smhd,Rt.SMHD),Rt.DINF,Rt.stbl(e)):Rt.box(Rt.types.minf,Rt.box(Rt.types.vmhd,Rt.VMHD),Rt.DINF,Rt.stbl(e))}static moof(e,t,n){return Rt.box(Rt.types.moof,Rt.mfhd(e),Rt.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=Rt.trak(e[t]);return Rt.box.apply(null,[Rt.types.moov,Rt.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(Rt.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=Rt.trex(e[t]);return Rt.box.apply(null,[Rt.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(ni+1)),r=Math.floor(t%(ni+1)),i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return Rt.box(Rt.types.mvhd,i)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let r,i;for(r=0;r<t.length;r++)i=t[r].flags,n[r+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return Rt.box(Rt.types.sdtp,n)}static stbl(e){return Rt.box(Rt.types.stbl,Rt.stsd(e),Rt.box(Rt.types.stts,Rt.STTS),Rt.box(Rt.types.stsc,Rt.STSC),Rt.box(Rt.types.stsz,Rt.STSZ),Rt.box(Rt.types.stco,Rt.STCO))}static avc1(e){let t=[],n=[],r,i,s;for(r=0;r<e.sps.length;r++)i=e.sps[r],s=i.byteLength,t.push(s>>>8&255),t.push(s&255),t=t.concat(Array.prototype.slice.call(i));for(r=0;r<e.pps.length;r++)i=e.pps[r],s=i.byteLength,n.push(s>>>8&255),n.push(s&255),n=n.concat(Array.prototype.slice.call(i));const u=Rt.box(Rt.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),p=e.width,h=e.height,v=e.pixelRatio[0],_=e.pixelRatio[1];return Rt.box(Rt.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,p>>8&255,p&255,h>>8&255,h&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),u,Rt.box(Rt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Rt.box(Rt.types.pasp,new Uint8Array([v>>24,v>>16&255,v>>8&255,v&255,_>>24,_>>16&255,_>>8&255,_&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 Rt.box(Rt.types.mp4a,Rt.audioStsd(e),Rt.box(Rt.types.esds,Rt.esds(e)))}static mp3(e){return Rt.box(Rt.types[".mp3"],Rt.audioStsd(e))}static ac3(e){return Rt.box(Rt.types["ac-3"],Rt.audioStsd(e),Rt.box(Rt.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return Rt.box(Rt.types.stsd,Rt.STSD,Rt.mp4a(e));if(t==="ac3"&&e.config)return Rt.box(Rt.types.stsd,Rt.STSD,Rt.ac3(e));if(t==="mp3"&&e.codec==="mp3")return Rt.box(Rt.types.stsd,Rt.STSD,Rt.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return Rt.box(Rt.types.stsd,Rt.STSD,Rt.avc1(e));if(t==="hevc"&&e.vps)return Rt.box(Rt.types.stsd,Rt.STSD,Rt.hvc1(e))}else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,n=(e.duration||0)*(e.timescale||0),r=e.width||0,i=e.height||0,s=Math.floor(n/(ni+1)),u=Math.floor(n%(ni+1));return Rt.box(Rt.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,u>>24,u>>16&255,u>>8&255,u&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,r&255,0,0,i>>8&255,i&255,0,0]))}static traf(e,t){const n=Rt.sdtp(e),r=e.id,i=Math.floor(t/(ni+1)),s=Math.floor(t%(ni+1));return Rt.box(Rt.types.traf,Rt.box(Rt.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),Rt.box(Rt.types.tfdt,new Uint8Array([1,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,s>>24,s>>16&255,s>>8&255,s&255])),Rt.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,Rt.box(Rt.types.trak,Rt.tkhd(e),Rt.mdia(e))}static trex(e){const t=e.id;return Rt.box(Rt.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const n=e.samples||[],r=n.length,i=12+16*r,s=new Uint8Array(i);let u,p,h,v,_,k;for(t+=8+i,s.set([e.type==="video"?1:0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),u=0;u<r;u++)p=n[u],h=p.duration,v=p.size,_=p.flags,k=p.cts,s.set([h>>>24&255,h>>>16&255,h>>>8&255,h&255,v>>>24&255,v>>>16&255,v>>>8&255,v&255,_.isLeading<<2|_.dependsOn,_.isDependedOn<<6|_.hasRedundancy<<4|_.paddingValue<<1|_.isNonSync,_.degradPrio&61440,_.degradPrio&15,k>>>24&255,k>>>16&255,k>>>8&255,k&255],12+16*u);return Rt.box(Rt.types.trun,s)}static initSegment(e){Rt.types||Rt.init();const t=Rt.moov(e);return ct(Rt.FTYP,t)}static hvc1(e){const t=e.params,n=[e.vps,e.sps,e.pps],r=4,i=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),r-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),n.length]);let s=i.length;for(let G=0;G<n.length;G+=1){s+=3;for(let we=0;we<n[G].length;we+=1)s+=2+n[G][we].length}const u=new Uint8Array(s);u.set(i,0),s=i.length;const p=n.length-1;for(let G=0;G<n.length;G+=1){u.set(new Uint8Array([32+G|(G===p?128:0),0,n[G].length]),s),s+=3;for(let we=0;we<n[G].length;we+=1)u.set(new Uint8Array([n[G][we].length>>8,n[G][we].length&255]),s),s+=2,u.set(n[G][we],s),s+=n[G][we].length}const h=Rt.box(Rt.types.hvcC,u),v=e.width,_=e.height,k=e.pixelRatio[0],V=e.pixelRatio[1];return Rt.box(Rt.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,v>>8&255,v&255,_>>8&255,_&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]),h,Rt.box(Rt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Rt.box(Rt.types.pasp,new Uint8Array([k>>24,k>>16&255,k>>8&255,k&255,V>>24,V>>16&255,V>>8&255,V&255])))}}Rt.types=void 0,Rt.HDLR_TYPES=void 0,Rt.STTS=void 0,Rt.STSC=void 0,Rt.STCO=void 0,Rt.STSZ=void 0,Rt.VMHD=void 0,Rt.SMHD=void 0,Rt.STSD=void 0,Rt.FTYP=void 0,Rt.DINF=void 0;const vi=9e4;function ts(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function Xr(a,e,t=1,n=!1){return ts(a,e,1/t,n)}function Fr(a,e=!1){return ts(a,1e3,1/vi,e)}function Yi(a,e=1){return ts(a,vi,1/e)}function Xi(a){const{baseTime:e,timescale:t,trackId:n}=a;return`${e/t} (${e}/${t}) trackId: ${n}`}const Er=10*1e3,Vr=1024,dr=1152,xr=1536;let ai=null,hi=null;function Ui(a,e,t,n){return{duration:e,size:t,cts:n,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:a?2:1,isNonSync:a?0:1}}}class Ni extends j{constructor(e,t,n,r){if(super("mp4-remuxer",r),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextVideoTs=null,this.nextAudioTs=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,ai===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ai=s?parseInt(s[1]):0}if(hi===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);hi=i?parseInt(i[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){const t=this._initPTS;(!t||!e||e.trackId!==t.trackId||e.baseTime!==t.baseTime||e.timescale!==t.timescale)&&this.log(`Reset initPTS: ${t&&Xi(t)} > ${e&&Xi(e)}`),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.log("reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.log("ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const n=e[0].pts,r=e.reduce((i,s)=>{let u=s.pts,p=u-i;return p<-4294967296&&(t=!0,u=Hi(u,n),p=u-i),p>0?i:u},n);return t&&this.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,u,p){let h,v,_,k,V,G,we=i,Se=i;const Je=e.pid>-1,ot=t.pid>-1,ft=t.samples.length,Pt=e.samples.length>0,Kt=u&&ft>0||ft>1;if((!Je||Pt)&&(!ot||Kt)||this.ISGenerated||u){if(this.ISGenerated){var Ht,cn,ln,Yt;const Wr=this.videoTrackConfig;(Wr&&(t.width!==Wr.width||t.height!==Wr.height||((Ht=t.pixelRatio)==null?void 0:Ht[0])!==((cn=Wr.pixelRatio)==null?void 0:cn[0])||((ln=t.pixelRatio)==null?void 0:ln[1])!==((Yt=Wr.pixelRatio)==null?void 0:Yt[1]))||!Wr&&Kt||this.nextAudioTs===null&&Pt)&&this.resetInitSegment()}this.ISGenerated||(_=this.generateIS(e,t,i,s));const kn=this.isVideoContiguous;let pr=-1,kr;if(Kt&&(pr=As(t.samples),!kn&&this.config.forceKeyFrameOnDiscontinuity))if(G=!0,pr>0){this.warn(`Dropped ${pr} out of ${ft} video samples due to a missing keyframe`);const Wr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(pr),t.dropped+=pr,Se+=(t.samples[0].pts-Wr)/t.inputTimeScale,kr=Se}else pr===-1&&(this.warn(`No keyframe found out of ${ft} video samples`),G=!1);if(this.ISGenerated){if(Pt&&Kt){const Wr=this.getVideoStartPts(t.samples),lr=(Hi(e.samples[0].pts,Wr)-Wr)/t.inputTimeScale;we+=Math.max(0,lr),Se+=Math.max(0,-lr)}if(Pt){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),_=this.generateIS(e,t,i,s)),v=this.remuxAudio(e,we,this.isAudioContiguous,s,ot||Kt||p===X.AUDIO?Se:void 0),Kt){const Wr=v?v.endPTS-v.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),_=this.generateIS(e,t,i,s)),h=this.remuxVideo(t,Se,kn,Wr)}}else Kt&&(h=this.remuxVideo(t,Se,kn,0));h&&(h.firstKeyFrame=pr,h.independent=pr!==-1,h.firstKeyFramePTS=kr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(V=Sr(n,i,this._initPTS,this._initDTS)),r.samples.length&&(k=Mr(r,i,this._initPTS))),{audio:v,video:h,initSegment:_,independent:G,text:k,id3:V}}computeInitPts(e,t,n,r){const i=Math.round(n*t);let s=Hi(e,i);if(s<i+t)for(this.log(`Adjusting PTS for rollover in timeline near ${(i-s)/t} ${r}`);s<i+t;)s+=8589934592;return s-i}generateIS(e,t,n,r){const i=e.samples,s=t.samples,u=this.typeSupported,p={},h=this._initPTS;let v=!h||r,_="audio/mp4",k,V,G,we=-1;if(v&&(k=V=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":u.mpeg?(_="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}p.audio={id:"audio",container:_,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&u.mpeg?new Uint8Array(0):Rt.initSegment([e]),metadata:{channelCount:e.channelCount}},v&&(we=e.id,G=e.inputTimeScale,!h||G!==h.timescale?k=V=this.computeInitPts(i[0].pts,G,n,"audio"):v=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,p.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Rt.initSegment([t]),metadata:{width:t.width,height:t.height}},v)if(we=t.id,G=t.inputTimeScale,!h||G!==h.timescale){const Se=this.getVideoStartPts(s),Je=Hi(s[0].dts,Se),ot=this.computeInitPts(Je,G,n,"video"),ft=this.computeInitPts(Se,G,n,"video");V=Math.min(V,ot),k=Math.min(k,ft)}else v=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(p).length)return this.ISGenerated=!0,v?(h&&this.warn(`Timestamps at playlist time: ${r?"":"~"}${n} ${k/G} != initPTS: ${h.baseTime/h.timescale} (${h.baseTime}/${h.timescale}) trackId: ${h.trackId}`),this.log(`Found initPTS at playlist time: ${n} offset: ${k/G} (${k}/${G}) trackId: ${we}`),this._initPTS={baseTime:k,timescale:G,trackId:we},this._initDTS={baseTime:V,timescale:G,trackId:we}):k=G=void 0,{tracks:p,initPTS:k,timescale:G,trackId:we}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,u=[],p=s.length,h=this._initPTS,v=h.baseTime*i/h.timescale;let _=this.nextVideoTs,k=8,V=this.videoSampleDuration,G,we,Se=Number.POSITIVE_INFINITY,Je=Number.NEGATIVE_INFINITY,ot=!1;if(!n||_===null){const fr=v+t*i,hr=s[0].pts-Hi(s[0].dts,s[0].pts);ai&&_!==null&&Math.abs(fr-hr-(_+v))<15e3?n=!0:_=fr-hr-v}const ft=_+v;for(let fr=0;fr<p;fr++){const hr=s[fr];hr.pts=Hi(hr.pts,ft),hr.dts=Hi(hr.dts,ft),hr.dts<s[fr>0?fr-1:fr].dts&&(ot=!0)}ot&&s.sort(function(fr,hr){const Si=fr.dts-hr.dts,is=fr.pts-hr.pts;return Si||is}),G=s[0].dts,we=s[s.length-1].dts;const Pt=we-G,Kt=Pt?Math.round(Pt/(p-1)):V||e.inputTimeScale/30;if(n){const fr=G-ft,hr=fr>Kt,Si=fr<-1;if((hr||Si)&&(hr?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Fr(fr,!0)} ms (${fr}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Fr(-fr,!0)} ms (${fr}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Si||ft>=s[0].pts||ai)){G=ft;const is=s[0].pts-fr;if(hr)s[0].dts=G,s[0].pts=is;else{let Ai=!0;for(let Zi=0;Zi<s.length&&!(s[Zi].dts>is&&Ai);Zi++){const ia=s[Zi].pts;if(s[Zi].dts-=fr,s[Zi].pts-=fr,Zi<s.length-1){const ea=s[Zi+1].pts,Oa=s[Zi].pts,io=ea<=Oa,Mo=ea<=ia;Ai=io==Mo}}}this.log(`Video: Initial PTS/DTS adjusted: ${Fr(is,!0)}/${Fr(G,!0)}, delta: ${Fr(fr,!0)} ms`)}}G=Math.max(0,G);let xn=0,Ht=0,cn=G;for(let fr=0;fr<p;fr++){const hr=s[fr],Si=hr.units,is=Si.length;let Ai=0;for(let Zi=0;Zi<is;Zi++)Ai+=Si[Zi].data.length;Ht+=Ai,xn+=is,hr.length=Ai,hr.dts<cn?(hr.dts=cn,cn+=Kt/4|0||1):cn=hr.dts,Se=Math.min(hr.pts,Se),Je=Math.max(hr.pts,Je)}we=s[p-1].dts;const ln=Ht+4*xn+8;let Yt;try{Yt=new Uint8Array(ln)}catch(fr){this.observer.emit(g.ERROR,g.ERROR,{type:ie.MUX_ERROR,details:F.REMUX_ALLOC_ERROR,fatal:!1,error:fr,bytes:ln,reason:`fail allocating video mdat ${ln}`});return}const kn=new DataView(Yt.buffer);kn.setUint32(0,ln),Yt.set(Rt.types.mdat,4);let pr=!1,kr=Number.POSITIVE_INFINITY,Wr=Number.POSITIVE_INFINITY,Nr=Number.NEGATIVE_INFINITY,lr=Number.NEGATIVE_INFINITY;for(let fr=0;fr<p;fr++){const hr=s[fr],Si=hr.units;let is=0;for(let ia=0,ea=Si.length;ia<ea;ia++){const Oa=Si[ia],io=Oa.data,Mo=Oa.data.byteLength;kn.setUint32(k,Mo),k+=4,Yt.set(io,k),k+=Mo,is+=4+Mo}let Ai;if(fr<p-1)V=s[fr+1].dts-hr.dts,Ai=s[fr+1].pts-hr.pts;else{const ia=this.config,ea=fr>0?hr.dts-s[fr-1].dts:Kt;if(Ai=fr>0?hr.pts-s[fr-1].pts:Kt,ia.stretchShortVideoTrack&&this.nextAudioTs!==null){const Oa=Math.floor(ia.maxBufferHole*i),io=(r?Se+r*i:this.nextAudioTs+v)-hr.pts;io>Oa?(V=io-ea,V<0?V=ea:pr=!0,this.log(`It is approximately ${io/90} ms to the next segment; using duration ${V/90} ms for the last video frame.`)):V=ea}else V=ea}const Zi=Math.round(hr.pts-hr.dts);kr=Math.min(kr,V),Nr=Math.max(Nr,V),Wr=Math.min(Wr,Ai),lr=Math.max(lr,Ai),u.push(Ui(hr.key,V,is,Zi))}if(u.length){if(ai){if(ai<70){const fr=u[0].flags;fr.dependsOn=2,fr.isNonSync=0}}else if(hi&&lr-Wr<Nr-kr&&Kt/Nr<.025&&u[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let fr=G;for(let hr=0,Si=u.length;hr<Si;hr++){const is=fr+u[hr].duration,Ai=fr+u[hr].cts;if(hr<Si-1){const Zi=is+u[hr+1].cts;u[hr].duration=Zi-Ai}else u[hr].duration=hr?u[hr-1].duration:Kt;u[hr].cts=0,fr=is}}}V=pr||!V?Kt:V;const Br=we+V;this.nextVideoTs=_=Br-v,this.videoSampleDuration=V,this.isVideoContiguous=!0;const oi={data1:Rt.moof(e.sequenceNumber++,G,b(e,{samples:u})),data2:Yt,startPTS:(Se-v)/i,endPTS:(Je+V-v)/i,startDTS:(G-v)/i,endDTS:_/i,type:"video",hasAudio:!1,hasVideo:!0,nb:u.length,dropped:e.dropped};return e.samples=[],e.dropped=0,oi}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return dr;case"ac3":return xr;default:return Vr}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,u=e.samplerate?e.samplerate:s,p=s/u,h=this.getSamplesPerFrame(e),v=h*p,_=this._initPTS,k=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,V=[],G=i!==void 0;let we=e.samples,Se=k?0:8,Je=this.nextAudioTs||-1;const ot=_.baseTime*s/_.timescale,ft=ot+t*s;if(this.isAudioContiguous=n=n||we.length&&Je>0&&(r&&Math.abs(ft-(Je+ot))<9e3||Math.abs(Hi(we[0].pts,ft)-(Je+ot))<20*v),we.forEach(function(lr){lr.pts=Hi(lr.pts,ft)}),!n||Je<0){const lr=we.length;if(we=we.filter(Br=>Br.pts>=0),lr!==we.length&&this.warn(`Removed ${we.length-lr} of ${lr} samples (initPTS ${ot} / ${s})`),!we.length)return;i===0?Je=0:r&&!G?Je=Math.max(0,ft-ot):Je=we[0].pts-ot}if(e.segmentCodec==="aac"){const lr=this.config.maxAudioFramesDrift;for(let Br=0,wr=Je+ot;Br<we.length;Br++){const jr=we[Br],oi=jr.pts,fr=oi-wr,hr=Math.abs(1e3*fr/s);if(fr<=-lr*v&&G)Br===0&&(this.warn(`Audio frame @ ${(oi/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*fr/s)} ms.`),this.nextAudioTs=Je=oi-ot,wr=oi);else if(fr>=lr*v&&hr<Er&&G){let Si=Math.round(fr/v);for(wr=oi-Si*v;wr<0&&Si&&v;)Si--,wr+=v;Br===0&&(this.nextAudioTs=Je=wr-ot),this.warn(`Injecting ${Si} audio frames @ ${((wr-ot)/s).toFixed(3)}s due to ${Math.round(1e3*fr/s)} ms gap.`);for(let is=0;is<Si;is++){let Ai=gi.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);Ai||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),Ai=jr.unit.subarray()),we.splice(Br,0,{unit:Ai,pts:wr}),wr+=v,Br++}}jr.pts=wr,wr+=v}}let Pt=null,Kt=null,xn,Ht=0,cn=we.length;for(;cn--;)Ht+=we[cn].unit.byteLength;for(let lr=0,Br=we.length;lr<Br;lr++){const wr=we[lr],jr=wr.unit;let oi=wr.pts;if(Kt!==null){const hr=V[lr-1];hr.duration=Math.round((oi-Kt)/p)}else if(n&&e.segmentCodec==="aac"&&(oi=Je+ot),Pt=oi,Ht>0){Ht+=Se;try{xn=new Uint8Array(Ht)}catch(hr){this.observer.emit(g.ERROR,g.ERROR,{type:ie.MUX_ERROR,details:F.REMUX_ALLOC_ERROR,fatal:!1,error:hr,bytes:Ht,reason:`fail allocating audio mdat ${Ht}`});return}k||(new DataView(xn.buffer).setUint32(0,Ht),xn.set(Rt.types.mdat,4))}else return;xn.set(jr,Se);const fr=jr.byteLength;Se+=fr,V.push(Ui(!0,h,fr,0)),Kt=oi}const ln=V.length;if(!ln)return;const Yt=V[V.length-1];Je=Kt-ot,this.nextAudioTs=Je+p*Yt.duration;const kn=k?new Uint8Array(0):Rt.moof(e.sequenceNumber++,Pt/p,b({},e,{samples:V}));e.samples=[];const pr=(Pt-ot)/s,kr=this.nextAudioTs/s,Nr={data1:kn,data2:xn,startPTS:pr,endPTS:kr,startDTS:pr,endDTS:kr,type:"audio",hasAudio:!0,hasVideo:!1,nb:ln};return this.isAudioContiguous=!0,Nr}}function Hi(a,e){let t;if(e===null)return a;for(e<a?t=-8589934592:t=8589934592;Math.abs(a-e)>4294967296;)a+=t;return a}function As(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function Sr(a,e,t,n){const r=a.samples.length;if(!r)return;const i=a.inputTimeScale;for(let u=0;u<r;u++){const p=a.samples[u];p.pts=Hi(p.pts-t.baseTime*i/t.timescale,e*i)/i,p.dts=Hi(p.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function Mr(a,e,t){const n=a.samples.length;if(!n)return;const r=a.inputTimeScale;for(let s=0;s<n;s++){const u=a.samples[s];u.pts=Hi(u.pts-t.baseTime*r/t.timescale,e*r)/r}a.samples.sort((s,u)=>s.pts-u.pts);const i=a.samples;return a.samples=[],{samples:i}}class xi extends j{constructor(e,t,n,r){super("passthrough-remuxer",r),this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.isVideoContiguous=!1}destroy(){}resetTimeStamp(e){this.lastEndTime=null;const t=this.initPTS;t&&e&&t.baseTime===e.baseTime&&t.timescale===e.timescale||(this.initPTS=e)}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e,r),this.emitInitSegment=!0}generateInitSegment(e,t){let{audioCodec:n,videoCodec:r}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const{audio:i,video:s}=this.initData=Ae(e);if(t)Oe(e,t);else{const p=i||s;p!=null&&p.encrypted&&this.warn(`Init segment with encrypted track with has no key ("${p.codec}")!`)}i&&(n=$s(i,Y.AUDIO,this)),s&&(r=$s(s,Y.VIDEO,this));const u={};i&&s?u.audiovideo={container:"video/mp4",codec:n+","+r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:i?u.audio={container:"audio/mp4",codec:n,encrypted:i.encrypted,initSegment:e,id:"audio"}:s?u.video={container:"video/mp4",codec:r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:this.warn("initSegment does not contain moov or trak boxes."),this.initTracks=u}remux(e,t,n,r,i,s){var u,p;let{initPTS:h,lastEndTime:v}=this;const _={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};c(v)||(v=this.lastEndTime=i||0);const k=t.samples;if(!k.length)return _;const V={initPTS:void 0,timescale:void 0,trackId:void 0};let G=this.initData;if((u=G)!=null&&u.length||(this.generateInitSegment(k),G=this.initData),!((p=G)!=null&&p.length))return this.warn("Failed to generate initSegment."),_;this.emitInitSegment&&(V.tracks=this.initTracks,this.emitInitSegment=!1);const we=st(k,G,this),Se=G.audio?we[G.audio.id]:null,Je=G.video?we[G.video.id]:null,ot=Ki(Je,1/0),ft=Ki(Se,1/0),Pt=Ki(Je,0,!0),Kt=Ki(Se,0,!0);let xn=i,Ht=0;const cn=Se&&(!Je||!h&&ft<ot||h&&h.trackId===G.audio.id),ln=cn?Se:Je;if(ln){const wr=ln.timescale,jr=ln.start-i*wr,oi=cn?G.audio.id:G.video.id;xn=ln.start/wr,Ht=cn?Kt-ft:Pt-ot,(s||!h)&&(Ei(h,xn,i,Ht)||wr!==h.timescale)&&(h&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${jr/wr} != initPTS: ${h.baseTime/h.timescale} (${h.baseTime}/${h.timescale}) trackId: ${h.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${xn-i} (${jr}/${wr}) trackId: ${oi}`),h=null,V.initPTS=jr,V.timescale=wr,V.trackId=oi)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);h?(V.initPTS=h.baseTime,V.timescale=h.timescale,V.trackId=h.trackId):((!V.timescale||V.trackId===void 0||V.initPTS===void 0)&&(this.warn("Could not set initPTS"),V.initPTS=xn,V.timescale=1,V.trackId=-1),this.initPTS=h={baseTime:V.initPTS,timescale:V.timescale,trackId:V.trackId});const Yt=xn-h.baseTime/h.timescale,kn=Yt+Ht;Ht>0?this.lastEndTime=kn:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const pr=!!G.audio,kr=!!G.video;let Wr="";pr&&(Wr+="audio"),kr&&(Wr+="video");const Nr=(G.audio?G.audio.encrypted:!1)||(G.video?G.video.encrypted:!1),lr={data1:k,startPTS:Yt,startDTS:Yt,endPTS:kn,endDTS:kn,type:Wr,hasAudio:pr,hasVideo:kr,nb:1,dropped:0,encrypted:Nr};_.audio=pr&&!kr?lr:void 0,_.video=kr?lr:void 0;const Br=Je==null?void 0:Je.sampleCount;if(Br){const wr=Je.keyFrameIndex,jr=wr!==-1;lr.nb=Br,lr.dropped=wr===0||this.isVideoContiguous?0:jr?wr:Br,lr.independent=jr,lr.firstKeyFrame=wr,jr&&Je.keyFrameStart&&(lr.firstKeyFramePTS=(Je.keyFrameStart-h.baseTime)/h.timescale),this.isVideoContiguous||(_.independent=jr),this.isVideoContiguous||(this.isVideoContiguous=jr),lr.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${wr}/${Br} dropped: ${lr.dropped} start: ${lr.firstKeyFramePTS||"NA"}`)}return _.initSegment=V,_.id3=Sr(n,i,h,h),r.samples.length&&(_.text=Mr(r,i,h)),_}}function Ki(a,e,t=!1){return(a==null?void 0:a.start)!==void 0?(a.start+(t?a.duration:0))/a.timescale:e}function Ei(a,e,t,n){if(a===null)return!0;const r=Math.max(n,1),i=e-a.baseTime/a.timescale;return Math.abs(i-t)>r}function $s(a,e,t){const n=a.codec;return n&&n.length>4?n:e===Y.AUDIO?n==="ec-3"||n==="ac-3"||n==="alac"?n:n==="fLaC"||n==="Opus"?Be(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 qi;try{qi=self.performance.now.bind(self.performance)}catch(a){qi=Date.now}const na=[{demux:pt,remux:xi},{demux:bn,remux:Ni},{demux:y,remux:Ni},{demux:Te,remux:Ni}];na.splice(2,0,{demux:H,remux:Ni});class rs{constructor(e,t,n,r,i,s){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.id=i,this.logger=s}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,r){const i=n.transmuxing;i.executeStart=qi();let s=new Uint8Array(e);const{currentTransmuxState:u,transmuxConfig:p}=this;r&&(this.currentTransmuxState=r);const{contiguous:h,discontinuity:v,trackSwitch:_,accurateTimeOffset:k,timeOffset:V,initSegmentChange:G}=r||u,{audioCodec:we,videoCodec:Se,defaultInitPts:Je,duration:ot,initSegmentData:ft}=p,Pt=Bi(s,t);if(Pt&&yr(Pt.method)){const cn=this.getDecrypter(),ln=Or(Pt.method);if(cn.isSync()){let Yt=cn.softwareDecrypt(s,Pt.key.buffer,Pt.iv.buffer,ln);if(n.part>-1){const pr=cn.flush();Yt=pr&&pr.buffer}if(!Yt)return i.executeEnd=qi(),Qi(n);s=new Uint8Array(Yt)}else return this.asyncResult=!0,this.decryptionPromise=cn.webCryptoDecrypt(s,Pt.key.buffer,Pt.iv.buffer,ln).then(Yt=>{const kn=this.push(Yt,null,n);return this.decryptionPromise=null,kn}),this.decryptionPromise}const Kt=this.needsProbing(v,_);if(Kt){const cn=this.configureTransmuxer(s);if(cn)return this.logger.warn(`[transmuxer] ${cn.message}`),this.observer.emit(g.ERROR,g.ERROR,{type:ie.MEDIA_ERROR,details:F.FRAG_PARSING_ERROR,fatal:!1,error:cn,reason:cn.message}),i.executeEnd=qi(),Qi(n)}(v||_||G||Kt)&&this.resetInitSegment(ft,we,Se,ot,t),(v||G||Kt)&&this.resetInitialTimestamp(Je),h||this.resetContiguity();const xn=this.transmux(s,Pt,V,k,n);this.asyncResult=Wi(xn);const Ht=this.currentTransmuxState;return Ht.contiguous=!0,Ht.discontinuity=!1,Ht.trackSwitch=!1,i.executeEnd=qi(),xn}flush(e){const t=e.transmuxing;t.executeStart=qi();const{decrypter:n,currentTransmuxState:r,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:u}=r;if(n){const _=n.flush();_&&s.push(this.push(_.buffer,null,e))}const{demuxer:p,remuxer:h}=this;if(!p||!h){t.executeEnd=qi();const _=[Qi(e)];return this.asyncResult?Promise.resolve(_):_}const v=p.flush(u);return Wi(v)?(this.asyncResult=!0,v.then(_=>(this.flushRemux(s,_,e),s))):(this.flushRemux(s,v,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:i,id3Track:s,textTrack:u}=t,{accurateTimeOffset:p,timeOffset:h}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===X.MAIN?"level":"track"} ${n.level}`);const v=this.remuxer.remux(r,i,s,u,h,p,!0,this.id);e.push({remuxResult:v,chunkMeta:n}),n.transmuxing.executeEnd=qi()}resetInitialTimestamp(e){const{demuxer:t,remuxer:n}=this;!t||!n||(t.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,n,r,i){const{demuxer:s,remuxer:u}=this;!s||!u||(s.resetInitSegment(e,t,n,r),u.resetInitSegment(e,t,n,i))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,r,i){let s;return t&&t.method==="SAMPLE-AES"?s=this.transmuxSampleAes(e,t,n,r,i):s=this.transmuxUnencrypted(e,n,r,i),s}transmuxUnencrypted(e,t,n,r){const{audioTrack:i,videoTrack:s,id3Track:u,textTrack:p}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,u,p,t,n,!1,this.id),chunkMeta:r}}transmuxSampleAes(e,t,n,r,i){return this.demuxer.demuxSampleAes(e,t,n).then(s=>({remuxResult:this.remuxer.remux(s.audioTrack,s.videoTrack,s.id3Track,s.textTrack,n,r,!1,this.id),chunkMeta:i}))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:r}=this;let i;for(let _=0,k=na.length;_<k;_++){var s;if((s=na[_].demux)!=null&&s.probe(e,this.logger)){i=na[_];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const u=this.demuxer,p=this.remuxer,h=i.remux,v=i.demux;(!p||!(p instanceof h))&&(this.remuxer=new h(n,t,r,this.logger)),(!u||!(u instanceof v))&&(this.demuxer=new v(n,t,r,this.logger),this.probe=v.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new qr(this.config)),e}}function Bi(a,e){let t=null;return a.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const Qi=a=>({remuxResult:{},chunkMeta:a});function Wi(a){return"then"in a&&a.then instanceof Function}class Is{constructor(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i||null}}class ys{constructor(e,t,n,r,i,s){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=s}}let Di=0;class fs{constructor(e,t,n,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=Di++,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=p=>{const h=p.data,v=this.hls;if(!(!v||!(h!=null&&h.event)||h.instanceNo!==this.instanceNo))switch(h.event){case"init":{var _;const k=(_=this.workerContext)==null?void 0:_.objectURL;k&&self.URL.revokeObjectURL(k);break}case"transmuxComplete":{this.handleTransmuxComplete(h.data);break}case"flush":{this.onFlush(h.data);break}case"workerLog":{v.logger[h.data.logType]&&v.logger[h.data.logType](h.data.message);break}default:{h.data=h.data||{},h.data.frag=this.frag,h.data.part=this.part,h.data.id=this.id,v.trigger(h.event,h.data);break}}},this.onWorkerError=p=>{if(!this.hls)return;const h=new Error(`${p.message} (${p.filename}:${p.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(g.ERROR,{type:ie.OTHER_ERROR,details:F.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:h})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=n,this.onFlush=r;const s=(p,h)=>{h=h||{},h.frag=this.frag||void 0,p===g.ERROR&&(h=h,h.parent=this.id,h.part=this.part,this.error=h.error),this.hls.trigger(p,h)};this.observer=new _o,this.observer.on(g.FRAG_DECRYPTED,s),this.observer.on(g.ERROR,s);const u=Wn(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const p=this.hls.logger;if(i.workerPath||$o()){try{i.workerPath?(p.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=Fo(i.workerPath)):(p.log(`injecting Web Worker for "${t}"`),this.workerContext=wl());const{worker:v}=this.workerContext;v.addEventListener("message",this.onWorkerMessage),v.addEventListener("error",this.onWorkerError),v.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:u,id:t,config:Ct(i)})}catch(v){p.warn(`Error setting up "${t}" Web Worker, fallback to inline`,v),this.terminateWorker(),this.error=null,this.transmuxer=new rs(this.observer,u,i,"",t,e.logger)}return}}this.transmuxer=new rs(this.observer,u,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=Di++;const t=this.hls.config,n=Wn(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:Ct(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),Cl(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,n,r,i,s,u,p,h,v){var _,k;h.transmuxing.start=self.performance.now();const{instanceNo:V,transmuxer:G}=this,we=s?s.start:i.start,Se=i.decryptdata,Je=this.frag,ot=!(Je&&i.cc===Je.cc),ft=!(Je&&h.level===Je.level),Pt=Je?h.sn-Je.sn:-1,Kt=this.part?h.part-this.part.index:-1,xn=Pt===0&&h.id>1&&h.id===(Je==null?void 0:Je.stats.chunkCount),Ht=!ft&&(Pt===1||Pt===0&&(Kt===1||xn&&Kt<=0)),cn=self.performance.now();(ft||Pt||i.stats.parsing.start===0)&&(i.stats.parsing.start=cn),s&&(Kt||!Ht)&&(s.stats.parsing.start=cn);const ln=!(Je&&((_=i.initSegment)==null?void 0:_.url)===((k=Je.initSegment)==null?void 0:k.url)),Yt=new ys(ot,Ht,p,ft,we,ln);if(!Ht||ot||ln){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${h.sn}${h.part>-1?" part: "+h.part:""} ${this.id===X.MAIN?"level":"track"}: ${h.level} id: ${h.id}
discontinuity: ${ot}
trackSwitch: ${ft}
contiguous: ${Ht}
accurateTimeOffset: ${p}
timeOffset: ${we}
initSegmentChange: ${ln}`);const kn=new Is(n,r,t,u,v);this.configureTransmuxer(kn)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:V,cmd:"demux",data:e,decryptdata:Se,chunkMeta:h,state:Yt},e instanceof ArrayBuffer?[e]:[]);else if(G){const kn=G.push(e,Se,h,Yt);Wi(kn)?kn.then(pr=>{this.handleTransmuxComplete(pr)}).catch(pr=>{this.transmuxerError(pr,h,"transmuxer-interface push error")}):this.handleTransmuxComplete(kn)}}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);Wi(r)?r.then(i=>{this.handleFlushResult(i,e)}).catch(i=>{this.transmuxerError(i,e,"transmuxer-interface flush error")}):this.handleFlushResult(r,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.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 Vi=100;class Us extends oo{constructor(e,t,n){super(e,t,n,"audio-stream-controller",X.AUDIO),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(g.BUFFER_RESET,this.onBufferReset,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(g.BUFFER_RESET,this.onBufferReset,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){if(n===X.MAIN){const u=t.cc,p=this.fragCurrent;if(this.initPTS[u]={baseTime:r,timescale:i,trackId:s},this.log(`InitPTS for cc: ${u} found from main: ${r/i} (${r}/${i}) trackId: ${s}`),this.mainAnchor=t,this.state===In.WAITING_INIT_PTS){const h=this.waitingData;(!h&&!this.loadingParts||h&&h.frag.cc!==u)&&this.syncWithAnchor(t,h==null?void 0:h.frag)}else!this.hls.hasEnoughToStart&&p&&p.cc!==u?(p.abortRequests(),this.syncWithAnchor(t,p)):this.state===In.IDLE&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,t){var n;const r=((n=this.mainFragLoading)==null?void 0:n.frag)||null;if(t&&(r==null?void 0:r.cc)===t.cc)return;const i=(r||e).cc,s=this.getLevelDetails(),u=this.getLoadPosition(),p=qn(s,i,u);p&&(this.log(`Syncing with main frag at ${p.start} cc ${p.cc}`),this.startFragRequested=!1,this.nextLoadPosition=p.start,this.resetLoadingState(),this.state===In.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=In.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(Vi),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=In.IDLE):this.state=In.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case In.IDLE:this.doTickIdle();break;case In.WAITING_TRACK:{const{levels:e,trackId:t}=this,n=e==null?void 0:e[t],r=n==null?void 0:n.details;if(r&&!this.waitForLive(n)){if(this.waitForCdnTuneIn(r))break;this.state=In.WAITING_INIT_PTS}break}case In.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case In.WAITING_INIT_PTS:{const e=this.waitingData;if(e){const{frag:t,part:n,cache:r,complete:i}=e,s=this.mainAnchor;if(this.initPTS[t.cc]!==void 0){this.waitingData=null,this.state=In.FRAG_LOADING;const u=r.flush().buffer,p={frag:t,part:n,payload:u,networkDetails:null};this._handleFragmentLoadProgress(p),i&&super._handleFragmentLoadComplete(p)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=In.IDLE}}this.onTickEnd()}resetLoadingState(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:n,media:r,trackId:i}=this,s=t.config;if(!this.buffering||!r&&!this.primaryPrefetch&&(this.startFragRequested||!s.startFragPrefetch)||!(n!=null&&n[i]))return;const u=n[i],p=u.details;if(!p||this.waitForLive(u)||this.waitForCdnTuneIn(p)){this.state=In.WAITING_TRACK,this.startFragRequested=!1;return}const h=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&h&&(this.bufferFlushed=!1,this.afterBufferFlushed(h,Y.AUDIO,X.AUDIO));const v=this.getFwdBufferInfo(h,X.AUDIO);if(v===null)return;if(!this.switchingTrack&&this._streamEnded(v,p)){t.trigger(g.BUFFER_EOS,{type:"audio"}),this.state=In.ENDED;return}const _=v.len,k=t.maxBufferLength,V=p.fragments,G=V[0].start,we=this.getLoadPosition(),Se=this.flushing?we:v.end;if(this.switchingTrack&&r){const ft=we;p.PTSKnown&&ft<G&&(v.end>G||v.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=G+.05)}if(_>=k&&!this.switchingTrack&&Se<V[V.length-1].start)return;let Je=this.getNextFragment(Se,p);if(Je&&this.isLoopLoading(Je,Se)&&(Je=this.getNextFragmentLoopLoading(Je,p,v,X.MAIN,k)),!Je){this.bufferFlushed=!0;return}let ot=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&ot&&je(Je)&&!Je.endList&&(!p.live||!this.loadingParts&&Se<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(ot)===Rn.OK&&(this.mainFragLoading=ot=null),ot&&je(ot))){if(Je.start>ot.end){const Pt=this.fragmentTracker.getFragAtPos(Se,X.MAIN);Pt&&Pt.end>ot.end&&(ot=Pt,this.mainFragLoading={frag:Pt,targetBufferTime:null})}if(Je.start>ot.end)return}this.loadFragment(Je,u,Se)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new Wt(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!==In.STOPPED&&(this.setInterval(Vi),this.state=In.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const n=this.cachedTrackLoadedData;n&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(g.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:r}=this,{details:i,id:s,groupId:u,track:p}=t;if(!r){this.warn(`Audio tracks reset while loading track ${s} "${p.name}" of "${u}"`);return}const h=this.mainDetails;if(!h||i.endCC>h.endCC||h.expired){this.cachedTrackLoadedData=t,this.state!==In.STOPPED&&(this.state=In.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${p.name}" of "${u}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const v=r[s];let _=0;if(i.live||(n=v.details)!=null&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(v.details){var k;_=this.alignPlaylists(i,v.details,(k=this.levelLastLoaded)==null?void 0:k.details)}i.alignedSliding||(Na(i,h),i.alignedSliding||ao(i,h),_=i.fragmentStart)}v.details=i,this.levelLastLoaded=v,this.startFragRequested||this.setStartPosition(h,_),this.hls.trigger(g.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===In.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=In.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{config:s,trackId:u,levels:p}=this;if(!p){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 h=p[u];if(!h){this.warn("Audio track is undefined on fragment load progress");return}const v=h.details;if(!v){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const _=s.defaultAudioCodec||h.audioCodec||"mp4a.40.2";let k=this.transmuxer;k||(k=this.transmuxer=new fs(this.hls,X.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const V=this.initPTS[n.cc],G=(t=n.initSegment)==null?void 0:t.data;if(V!==void 0){const Se=r?r.index:-1,Je=Se!==-1,ot=new Mi(n.level,n.sn,n.stats.chunkCount,i.byteLength,Se,Je);k.push(i,G,_,"",n,r,v.totalduration,!1,ot,V)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${v.startSN} ,${v.endSN}],track ${u}`);const{cache:we}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new Ba,complete:!1};we.push(new Uint8Array(i)),this.state!==In.STOPPED&&(this.state=In.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===X.MAIN&&je(t.frag)&&(this.mainFragLoading=t,this.state===In.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==X.AUDIO){!this.audioOnly&&n.type===X.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(je(n)){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(g.AUDIO_TRACK_SWITCHED,T({},i)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=In.ERROR;return}switch(t.details){case F.FRAG_GAP:case F.FRAG_PARSING_ERROR:case F.FRAG_DECRYPT_ERROR:case F.FRAG_LOAD_ERROR:case F.FRAG_LOAD_TIMEOUT:case F.KEY_LOAD_ERROR:case F.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(X.AUDIO,t);break;case F.AUDIO_TRACK_LOAD_ERROR:case F.AUDIO_TRACK_LOAD_TIMEOUT:case F.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===In.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===J.AUDIO_TRACK&&(this.state=In.IDLE);break;case F.BUFFER_ADD_CODEC_ERROR:case F.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case F.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case F.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==Y.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==Y.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===In.ENDED&&(this.state=In.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,X.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,u=this.getCurrentContext(s);if(!u){this.resetWhenMissingContext(s);return}const{frag:p,part:h,level:v}=u,{details:_}=v,{audio:k,text:V,id3:G,initSegment:we}=i;if(this.fragContextChanged(p)||!_){this.fragmentTracker.removeFragment(p);return}if(this.state=In.PARSING,this.switchingTrack&&k&&this.completeAudioSwitch(this.switchingTrack),we!=null&&we.tracks){const Se=p.initSegment||p;if(this.unhandledEncryptionError(we,p))return;this._bufferInitSegment(v,we.tracks,Se,s),r.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:Se,id:n,tracks:we.tracks})}if(k){const{startPTS:Se,endPTS:Je,startDTS:ot,endDTS:ft}=k;h&&(h.elementaryStreams[Y.AUDIO]={startPTS:Se,endPTS:Je,startDTS:ot,endDTS:ft}),p.setElementaryStreamInfo(Y.AUDIO,Se,Je,ot,ft),this.bufferFragmentData(k,p,h,s)}if(G!=null&&(t=G.samples)!=null&&t.length){const Se=b({id:n,frag:p,details:_},G);r.trigger(g.FRAG_PARSING_METADATA,Se)}if(V){const Se=b({id:n,frag:p,details:_},V);r.trigger(g.FRAG_PARSING_USERDATA,Se)}}_bufferInitSegment(e,t,n,r){if(this.state!==In.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=X.AUDIO;const s=e.audioCodec;this.log(`Init audio buffer, container:${i.container}, codecs[level/parsed]=[${s}/${i.codec}]`),s&&s.split(",").length===1&&(i.levelCodec=s),this.hls.trigger(g.BUFFER_CODECS,t);const u=i.initSegment;if(u!=null&&u.byteLength){const p={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:u};this.hls.trigger(g.BUFFER_APPENDING,p)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===Rn.NOT_LOADED||r===Rn.PARTIAL){var i;if(!je(e))this._loadInitSegment(e,t);else if((i=t.details)!=null&&i.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=In.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&ao(t.details,s)}else super.loadFragment(e,t,n)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:u}=this.bufferedTrack;Sn({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:u},e,Nn)||(Kn(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(g.AUDIO_TRACK_SWITCHED,T({},e))}}class hs extends j{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const r=t==null?void 0:t.renditionReports;if(r){let i=-1;for(let s=0;s<r.length;s++){const u=r[s];let p;try{p=new self.URL(u.URI,t.url).href}catch(h){this.warn(`Could not construct new URL for Rendition Report: ${h}`),p=u.URI||""}if(p===e){i=s;break}else p===e.substring(0,p.length)&&(i=s)}if(i!==-1){const s=r[i],u=parseInt(s["LAST-MSN"])||t.lastPartSn;let p=parseInt(s["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){const v=Math.min(t.age-t.partTarget,t.targetduration);p>=0&&v>t.partTarget&&(p+=1)}const h=n&&mn(n);return new yn(u,p>=0?p:void 0,h)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(n){this.warn(`Could not construct new URL with HLS Delivery Directives: ${n}`)}return e}playlistLoaded(e,t,n){const{details:r,stats:i}=t,s=self.performance.now(),u=i.loading.first?Math.max(0,s-i.loading.first):0;r.advancedDateTime=Date.now()-u;const p=this.hls.config.timelineOffset;if(p!==r.appliedTimelineOffset){const v=Math.max(p||0,0);r.appliedTimelineOffset=v,r.fragments.forEach(_=>{_.setStart(_.playlistOffset+v)})}if(r.live||n!=null&&n.live){const v="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){Js(n,r,this);const ot=r.playlistParsingError;if(ot){this.warn(ot);const ft=this.hls;if(!ft.config.ignorePlaylistParsingErrors){var h;const{networkDetails:Pt}=t;ft.trigger(g.ERROR,{type:ie.NETWORK_ERROR,details:F.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:ot,reason:ot.message,level:t.level||void 0,parent:(h=r.fragments[0])==null?void 0:h.type,networkDetails:Pt,stats:i});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=i.loading.start);const _=this.hls.mainForwardBufferInfo,k=_?_.end-_.len:0,V=(r.edge-k)*1e3,G=Ci(r,V);if(r.requestScheduled+G<s?r.requestScheduled=s:r.requestScheduled+=G,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let we,Se,Je;if(r.canBlockReload&&r.endSN&&r.advanced){const ot=this.hls.config.lowLatencyMode,ft=r.lastPartSn,Pt=r.endSN,Kt=r.lastPartIndex,xn=Kt!==-1,Ht=ft===Pt;xn?Ht?(Se=Pt+1,Je=ot?0:Kt):(Se=ft,Je=ot?Kt+1:r.maxPartIndex):Se=Pt+1;const cn=r.age,ln=cn+r.ageHeader;let Yt=Math.min(ln-r.partTarget,r.targetduration*1.5);if(Yt>0){if(ln>r.targetduration*3)this.log(`Playlist last advanced ${cn.toFixed(2)}s ago. Omitting segment and part directives.`),Se=void 0,Je=void 0;else if(n!=null&&n.tuneInGoal&&ln-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${Yt} with playlist age: ${r.age}`),Yt=0;else{const kn=Math.floor(Yt/r.targetduration);if(Se+=kn,Je!==void 0){const pr=Math.round(Yt%r.targetduration/r.partTarget);Je+=pr}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${cn.toFixed(2)}s goal: ${Yt} skip sn ${kn} to part ${Je}`)}r.tuneInGoal=Yt}if(we=this.getDeliveryDirectives(r,t.deliveryDirectives,Se,Je),ot||!Ht){r.requestScheduled=s,this.loadingPlaylist(v,we);return}}else(r.canBlockReload||r.canSkipUntil)&&(we=this.getDeliveryDirectives(r,t.deliveryDirectives,Se,Je));we&&Se!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max(G-u*2,G/2)),this.scheduleLoading(v,we,r)}else this.clearTimer()}scheduleLoading(e,t,n){const r=n||e.details;if(!r){this.loadingPlaylist(e,t);return}const i=self.performance.now(),s=r.requestScheduled;if(i>=s){this.loadingPlaylist(e,t);return}const u=s-i;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(u)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),u)}getDeliveryDirectives(e,t,n,r){let i=mn(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=Jt.No),new yn(n,r,i)}checkRetry(e){const t=e.details,n=Fn(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:u}=r||{},p=!!r&&!!u&&(i===Bn.RetryRequest||!r.resolved&&i===Bn.SendAlternateToPenaltyBox);if(p){var h;if(s>=u.maxNumRetry)return!1;if(n&&(h=e.context)!=null&&h.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${u.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const v=ur(u,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),v),this.warn(`Retrying playlist loading ${s+1}/${u.maxNumRetry} after "${t}" in ${v}ms`)}e.levelRetry=!0,r.resolved=!0}return p}}function Vs(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!pa(a[t].attrs,e[t].attrs))return!1;return!0}function pa(a,e,t){const n=a["STABLE-RENDITION-ID"];return n&&!t?n===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(r=>a[r]!==e[r])}function fo(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class cs extends hs{constructor(e){super(e,"audio-track-controller"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(g.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Audio track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const u=s.details;s.details=t.details,this.log(`Audio track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,u)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.audioGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(u=>(r==null?void 0:r.indexOf(u))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const u=this.tracks.filter(k=>!n||n.indexOf(k.groupId)!==-1);if(u.length)this.selectDefaultTrack&&!u.some(k=>k.default)&&(this.selectDefaultTrack=!1),u.forEach((k,V)=>{k.id=V});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=u;const p=this.hls.config.audioPreference;if(!i&&p){const k=rn(p,u,Nn);if(k>-1)i=u[k];else{const V=rn(p,this.tracks);i=this.tracks[V]}}let h=this.findTrackId(i);h===-1&&i&&(h=this.findTrackId(null));const v={audioTracks:u};this.log(`Updating audio tracks, ${u.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(g.AUDIO_TRACKS_UPDATED,v);const _=this.trackId;if(h!==-1&&_===-1)this.setAudioTrack(h);else if(u.length&&_===-1){var s;const k=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${u.length}`);this.warn(k.message),this.hls.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:k})}}}onError(e,t){t.fatal||!t.context||t.context.type===J.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&&Sn(e,r,Nn))return r;const i=rn(e,this.tracksInGroup,Nn);if(i>-1){const s=this.tracksInGroup[i];return this.setAudioTrack(i),s}else if(r){let s=t.loadLevel;s===-1&&(s=t.firstAutoLevel);const u=Pn(e,t.levels,n,s,Nn);if(u===-1)return null;t.nextLoadLevel=u}if(e.channels||e.audioCodec){const s=rn(e,n);if(s>-1)return n[s]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e],i=r.details&&!r.details.live;if(e===this.trackId&&r===n&&i||(this.log(`Switching to audio-track ${e} "${r.name}" lang:${r.lang} group:${r.groupId} channels:${r.channels}`),this.trackId=e,this.currentTrack=r,this.hls.trigger(g.AUDIO_TRACK_SWITCHING,T({},r)),i))return;const s=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(s)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(!(this.selectDefaultTrack&&!r.default)&&(!e||Sn(e,r,Nn)))return n}if(e){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:u,channels:p}=e;for(let h=0;h<t.length;h++){const v=t[h];if(Sn({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:u,channels:p},v,Nn))return h}for(let h=0;h<t.length;h++){const v=t[h];if(pa(e.attrs,v.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return h}for(let h=0;h<t.length;h++){const v=t[h];if(pa(e.attrs,v.attrs,["LANGUAGE"]))return h}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&Kn(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,u=s==null?void 0:s.age;this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${u&&s.live?" age "+u.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(g.AUDIO_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}}class Do{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,n){if(this.queues===null||this.tracks===null)return;const r=this.queues[t];r.push(e),r.length===1&&!n&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const n={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(n,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const n={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(n)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const n=(t=e[0])==null?void 0:t.label;(n==="async-blocker"||n==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const t=this.queues[e];if(t.length){const r=t[0];try{r.execute()}catch(i){var n;if(r.onError(i),this.queues===null||this.tracks===null)return;const s=(n=this.tracks[e])==null?void 0:n.buffer;s!=null&&s.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues!==null&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return((t=this.queues)==null?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return e===null||t===null?"<destroyed>":`
${this.list("video")}
${this.list("audio")}
${this.list("audiovideo")}}`}list(e){var t,n;return(t=this.queues)!=null&&t[e]||(n=this.tracks)!=null&&n[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const n=(t=this.tracks)==null?void 0:t[e],r=n==null?void 0:n.buffer;return r?`SourceBuffer${r.updating?" updating":""}${n.ended?" ended":""}${n.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(n=>n.label).join(", "))||""}}const Gs=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,ca="HlsJsTrackRemovedError";class da extends Error{constructor(e){super(e),this.name=ca}}class qs extends j{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=n=>{var r;this.hls&&((r=this.mediaSource)==null?void 0:r.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=n=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=n=>{const{media:r,mediaSource:i}=this;n&&this.log("Media source opened"),!(!r||!i)&&(i.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(g.MEDIA_ATTACHED,{media:r,mediaSource:i}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:n,_objectUrl:r}=this;n!==r&&this.error(`Media element src was set while attaching MediaSource (${r} > ${n})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=Pe(De(e.config.preferManagedMediaSource)),this.initTracks(),this.registerListeners()}hasSourceTypes(){return Object.keys(this.tracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.BUFFER_RESET,this.onBufferReset,this),e.on(g.BUFFER_APPENDING,this.onBufferAppending,this),e.on(g.BUFFER_CODECS,this.onBufferCodecs,this),e.on(g.BUFFER_EOS,this.onBufferEos,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.FRAG_PARSED,this.onFragParsed,this),e.on(g.FRAG_CHANGED,this.onFragChanged,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.BUFFER_RESET,this.onBufferReset,this),e.off(g.BUFFER_APPENDING,this.onBufferAppending,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.BUFFER_EOS,this.onBufferEos,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.FRAG_PARSED,this.onFragParsed,this),e.off(g.FRAG_CHANGED,this.onFragChanged,this),e.off(g.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const n={};if(this.operationQueue){const i=this.isUpdating();i||this.operationQueue.removeBlockers();const s=this.isQueued();(i||s)&&this.warn(`Transfering MediaSource with${s?" operations in queue":""}${i?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const r=this.transferData;return!this.sourceBufferCount&&r&&r.mediaSource===t?b(n,r.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(n[s]=b({},this.tracks[s]),this.removeBuffer(s)),i[0]=i[1]=null}),{media:e,mediaSource:t,tracks:n}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var n;let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsTotal=r,this.log(`${r} bufferCodec event(s) expected.`),(n=this.transferData)!=null&&n.mediaSource&&this.sourceBufferCount&&r&&this.bufferCreated()}onMediaAttaching(e,t){const n=this.media=t.media;this.transferData=this.overrides=void 0;const r=De(this.appendSource);if(r){const i=!!t.mediaSource;(i||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const s=this.mediaSource=t.mediaSource||new r;if(this.assignMediaSource(s),i)this._objectUrl=n.src,this.attachTransferred();else{const u=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{n.removeAttribute("src");const p=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||p&&s instanceof p,Ys(n),ga(n,u),n.load()}catch(p){n.src=u}else n.src=u}n.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,n;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(n=e.constructor)==null?void 0:n.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const n=this.tracks,r=t.tracks,i=r?Object.keys(r):null,s=i?i.length:0,u=()=>{Promise.resolve().then(()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()})};if(r&&i&&s){if(!this.tracksReady){this.hls.config.startFragPrefetch=!0,this.log("attachTransferred: waiting for SourceBuffer track info");return}if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})
required tracks: ${Ct(n,(p,h)=>p==="initSegment"?void 0:h)};
transfer tracks: ${Ct(r,(p,h)=>p==="initSegment"?void 0:h)}}`),!Ce(r,n)){t.mediaSource=null,t.tracks=void 0;const p=e.currentTime,h=this.details,v=Math.max(p,(h==null?void 0:h.fragments[0].start)||0);if(v-p>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${p} -> ${v}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${v} currentTime: ${p}`),this.onMediaDetaching(g.MEDIA_DETACHING,{}),this.onMediaAttaching(g.MEDIA_ATTACHING,t),e.currentTime=v;return}this.transferData=void 0,i.forEach(p=>{const h=p,v=r[h];if(v){const _=v.buffer;if(_){const k=this.fragmentTracker,V=v.id;if(k.hasFragments(V)||k.hasParts(V)){const Se=zn.getBuffered(_);k.detectEvictedFragments(h,Se,V,null,!0)}const G=Ra(h),we=[h,_];this.sourceBuffers[G]=we,_.updating&&this.operationQueue&&this.operationQueue.prependBlocker(h),this.trackSourceBuffer(h,v)}}}),u(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),u()}get mediaSourceOpenOrEnded(){var e;const t=(e=this.mediaSource)==null?void 0:e.readyState;return t==="open"||t==="ended"}onMediaDetaching(e,t){const n=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:r,mediaSource:i,_objectUrl:s}=this;if(i){if(this.log(`media source ${n?"transferring":"detaching"}`),n)this.sourceBuffers.forEach(([u])=>{u&&this.removeBuffer(u)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const u=i.readyState==="open";try{const p=i.sourceBuffers;for(let h=p.length;h--;)u&&p[h].abort(),i.removeSourceBuffer(p[h]);u&&i.endOfStream()}catch(p){this.warn(`onMediaDetaching: ${p.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(i.removeEventListener("startstreaming",this._onStartStreaming),i.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}r&&(r.removeEventListener("emptied",this._onMediaEmptied),n||(s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(r.removeAttribute("src"),this.appendSource&&Ys(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(g.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const n=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),n)try{var r;(r=this.mediaSource)!=null&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(n)}catch(i){this.warn(`onBufferReset ${e}`,i)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[Ra(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new Do(this.tracks)}onBufferCodecs(e,t){var n;const r=this.tracks,i=Object.keys(t);this.log(`BUFFER_CODECS: "${i}" (current SB count ${this.sourceBufferCount})`);const s="audiovideo"in t&&(r.audio||r.video)||r.audiovideo&&("audio"in t||"video"in t),u=!s&&this.sourceBufferCount&&this.media&&i.some(p=>!r[p]);if(s||u){this.warn(`Unsupported transition between "${Object.keys(r)}" and "${i}" SourceBuffers`);return}i.forEach(p=>{var h,v;const _=t[p],{id:k,codec:V,levelCodec:G,container:we,metadata:Se,supplemental:Je}=_;let ot=r[p];const ft=(h=this.transferData)==null||(h=h.tracks)==null?void 0:h[p],Pt=ft!=null&&ft.buffer?ft:ot,Kt=(Pt==null?void 0:Pt.pendingCodec)||(Pt==null?void 0:Pt.codec),xn=Pt==null?void 0:Pt.levelCodec;ot||(ot=r[p]={buffer:void 0,listeners:[],codec:V,supplemental:Je,container:we,levelCodec:G,metadata:Se,id:k});const Ht=pn(Kt,xn),cn=Ht==null?void 0:Ht.replace(Gs,"$1");let ln=pn(V,G);const Yt=(v=ln)==null?void 0:v.replace(Gs,"$1");ln&&Ht&&cn!==Yt&&(p.slice(0,5)==="audio"&&(ln=Be(ln,this.appendSource)),this.log(`switching codec ${Kt} to ${ln}`),ln!==(ot.pendingCodec||ot.codec)&&(ot.pendingCodec=ln),ot.container=we,this.appendChangeType(p,we,ln))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&(this.bufferCodecEventsTotal>1&&!this.tracks.video&&!t.video&&((n=t.audio)==null?void 0:n.id)==="main"&&(this.log("Main audio-only"),this.bufferCodecEventsTotal=1),this.mediaSourceOpenOrEnded&&this.checkPendingTracks())}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const n=this.tracks[t];return e[t]={id:n.id,container:n.container,codec:n.codec,levelCodec:n.levelCodec},e},{})}appendChangeType(e,t,n){const r=`${t};codecs=${n}`,i={label:`change-type=${r}`,execute:()=>{const s=this.tracks[e];if(s){const u=s.buffer;u!=null&&u.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),u.changeType(r),s.codec=n,s.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:s=>{this.warn(`Failed to change ${e} SourceBuffer type`,s)}};this.append(i,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const n=e.start,r=n+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(n,X.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var u;const p=this.tracks.video;(this.lastVideoAppendEnd>r||p!=null&&p.buffer&&zn.isBuffered(p.buffer,r)||((u=this.fragmentTracker.getAppendedFrag(r,X.MAIN))==null?void 0:u.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:u=>{this.warn("Error executing block-audio operation",u)}};this.blockedAudioAppend={op:s,frag:e},this.append(s,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:n}=this,{data:r,type:i,parent:s,frag:u,part:p,chunkMeta:h,offset:v}=t,_=h.buffering[i],{sn:k,cc:V}=u,G=self.performance.now();_.start=G;const we=u.stats.buffering,Se=p?p.stats.buffering:null;we.start===0&&(we.start=G),Se&&Se.start===0&&(Se.start=G);const Je=n.audio;let ot=!1;i==="audio"&&(Je==null?void 0:Je.container)==="audio/mpeg"&&(ot=!this.lastMpegAudioChunk||h.id===1||this.lastMpegAudioChunk.sn!==h.sn,this.lastMpegAudioChunk=h);const ft=n.video,Pt=ft==null?void 0:ft.buffer;if(Pt&&k!=="initSegment"){const Ht=p||u,cn=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(ft.ending||ft.ended)){const Yt=Ht.start+Ht.duration*.05,kn=Pt.buffered,pr=this.currentOp("video");!kn.length&&!pr?this.blockAudio(Ht):!pr&&!zn.isBuffered(Pt,Yt)&&this.lastVideoAppendEnd<Yt&&this.blockAudio(Ht)}else if(i==="video"){const ln=Ht.end;if(cn){const Yt=cn.frag.start;(ln>Yt||ln<this.lastVideoAppendEnd||zn.isBuffered(Pt,Yt))&&this.unblockAudio()}this.lastVideoAppendEnd=ln}}const Kt=(p||u).start,xn={label:`append-${i}`,execute:()=>{var Ht;_.executeStart=self.performance.now();const cn=(Ht=this.tracks[i])==null?void 0:Ht.buffer;cn&&(ot?this.updateTimestampOffset(cn,Kt,.1,i,k,V):v!==void 0&&c(v)&&this.updateTimestampOffset(cn,v,1e-6,i,k,V)),this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const Ht=self.performance.now();_.executeEnd=_.end=Ht,we.first===0&&(we.first=Ht),Se&&Se.first===0&&(Se.first=Ht);const cn={};this.sourceBuffers.forEach(([ln,Yt])=>{ln&&(cn[ln]=zn.getBuffered(Yt))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(g.BUFFER_APPENDED,{type:i,frag:u,part:p,chunkMeta:h,parent:u.type,timeRanges:cn})},onError:Ht=>{var cn;const ln={type:ie.MEDIA_ERROR,parent:u.type,details:F.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:u,part:p,chunkMeta:h,error:Ht,err:Ht,fatal:!1},Yt=(cn=this.media)==null?void 0:cn.error;if(Ht.code===DOMException.QUOTA_EXCEEDED_ERR||Ht.name=="QuotaExceededError"||"quota"in Ht)ln.details=F.BUFFER_FULL_ERROR;else if(Ht.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!Yt)ln.errorAction=sn(!0);else if(Ht.name===ca&&this.sourceBufferCount===0)ln.errorAction=sn(!0);else{const kn=++this.appendErrors[i];this.warn(`Failed ${kn}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${Yt||"no media error"})`),(kn>=this.hls.config.appendErrorMaxRetry||Yt)&&(ln.fatal=!0)}this.hls.trigger(g.ERROR,ln)}};this.log(`queuing "${i}" append sn: ${k}${p?" p: "+p.index:""} of ${u.type===X.MAIN?"level":"track"} ${u.level} cc: ${V}`),this.append(xn,i,this.isPending(this.tracks[i]))}getFlushOp(e,t,n){return this.log(`queuing "${e}" remove ${t}-${n}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,n)},onStart:()=>{},onComplete:()=>{this.hls.trigger(g.BUFFER_FLUSHED,{type:e})},onError:r=>{this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`,r)}}}onBufferFlushing(e,t){const{type:n,startOffset:r,endOffset:i}=t;n?this.append(this.getFlushOp(n,r,i),n):this.sourceBuffers.forEach(([s])=>{s&&this.append(this.getFlushOp(s,r,i),s)})}onFragParsed(e,t){const{frag:n,part:r}=t,i=[],s=r?r.elementaryStreams:n.elementaryStreams;s[Y.AUDIOVIDEO]?i.push("audiovideo"):(s[Y.AUDIO]&&i.push("audio"),s[Y.VIDEO]&&i.push("video"));const u=()=>{const p=self.performance.now();n.stats.buffering.end=p,r&&(r.stats.buffering.end=p);const h=r?r.stats:n.stats;this.hls.trigger(g.FRAG_BUFFERED,{frag:n,part:r,stats:h,id:n.type})};i.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers(u,i).catch(p=>{this.warn(`Fragment buffered callback ${p}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{if(e){const t=this.tracks[e];if(t)return!t.ended||t.ending}return!1})}onBufferEos(e,t){var n;this.sourceBuffers.forEach(([s])=>{if(s){const u=this.tracks[s];(!t.type||t.type===s)&&(u.ending=!0,u.ended||(u.ended=!0,this.log(`${s} buffer reached EOS`)))}});const r=((n=this.overrides)==null?void 0:n.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([s])=>{var u;return s&&!((u=this.tracks[s])!=null&&u.ended)})?r?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:s}=this;if(!s||s.readyState!=="open"){s&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${s.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),s.endOfStream(),this.hls.trigger(g.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(g.BUFFERED_TO_END,void 0)):t.type==="video"&&this.unblockAudio()}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(e!==null){const t=this.tracks[e];t&&(t.ending=!1)}})}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){this.blockUntilOpen(()=>{const e=this.getDurationAndRange();e&&this.updateMediaSource(e)})}onError(e,t){if(t.details===F.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;c(r)&&r!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||t===null||!this.sourceBufferCount)return;const r=e.config,i=n.currentTime,s=t.levelTargetDuration,u=t.live&&r.liveBackBufferLength!==null?r.liveBackBufferLength:r.backBufferLength;if(c(u)&&u>=0){const h=Math.max(u,s),v=Math.floor(i/s)*s-h;this.flushBackBuffer(i,s,v)}const p=r.frontBufferFlushThreshold;if(c(p)&&p>0){const h=Math.max(r.maxBufferLength,p),v=Math.max(h,s),_=Math.floor(i/s)*s+v;this.flushFrontBuffer(i,s,_)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const u=zn.getBuffered(i);if(u.length>0&&n>u.start(0)){var s;this.hls.trigger(g.BACK_BUFFER_REACHED,{bufferEnd:n});const p=this.tracks[r];if((s=this.details)!=null&&s.live)this.hls.trigger(g.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(p!=null&&p.ended){this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const s=zn.getBuffered(i),u=s.length;if(u<2)return;const p=s.start(u-1),h=s.end(u-1);if(n>p||e>=p&&e<=h)return;this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:p,endOffset:1/0,type:r})}})}getDurationAndRange(){var e;const{details:t,mediaSource:n}=this;if(!t||!this.media||(n==null?void 0:n.readyState)!=="open")return null;const r=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&n.setLiveSeekableRange){const h=Math.max(0,t.fragmentStart),v=Math.max(h,r);return{duration:1/0,start:h,end:v}}return{duration:1/0}}const i=(e=this.overrides)==null?void 0:e.duration;if(i)return c(i)?{duration:i}:null;const s=this.media.duration,u=c(n.duration)?n.duration:0;return r>u&&r>s||!c(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(c(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}) ${Ct(n)}`),this.tracksReady){var r;const i=(r=this.transferData)==null?void 0:r.tracks;i&&Object.keys(i).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,n])=>{if(t){const r=this.tracks[t];e[t]={buffer:n,container:r.container,codec:r.codec,supplemental:r.supplemental,levelCodec:r.levelCodec,id:r.id,metadata:r.metadata}}}),this.hls.trigger(g.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach(([t])=>{this.executeNext(t)})}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:n}=this;if(!n)throw new Error("createSourceBuffers called when mediaSource was null");for(const i in e){const s=i,u=e[s];if(this.isPending(u)){const p=this.getTrackCodec(u,s),h=`${u.container};codecs=${p}`;u.codec=p,this.log(`creating sourceBuffer(${h})${this.currentOp(s)?" Queued":""} ${Ct(u)}`);try{const v=n.addSourceBuffer(h),_=Ra(s),k=[s,v];t[_]=k,u.buffer=v}catch(v){var r;this.error(`error while trying to add sourceBuffer: ${v.message}`),this.shiftAndExecuteNext(s),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[s],this.hls.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:v,sourceBufferName:s,mimeType:h,parent:u.id});return}this.trackSourceBuffer(s,u)}}this.bufferCreated()}getTrackCodec(e,t){const n=e.supplemental;let r=e.codec;n&&(t==="video"||t==="audiovideo")&&at(n,"video")&&(r=Gt(r,n));const i=pn(r,e.levelCodec);return i?t.slice(0,5)==="audio"?Be(i,this.appendSource):i:""}trackSourceBuffer(e,t){const n=t.buffer;if(!n)return;const r=this.getTrackCodec(t,e);this.tracks[e]={buffer:n,codec:r,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(i,s)=>{const u=s.removedRanges;u!=null&&u.length&&this.hls.trigger(g.BUFFER_FLUSHED,{type:i})})}get mediaSrc(){var e,t;const n=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return n==null?void 0:n.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const n=this.currentOp(e);n&&(n.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var n;const r=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n=this.mediaSource)==null?void 0:n.readyState}`);this.error(`${r}`,t),this.hls.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const i=this.currentOp(e);i&&i.onError(r)}updateTimestampOffset(e,t,n,r,i,s){const u=t-e.timestampOffset;Math.abs(u)>=n&&(this.log(`Updating ${r} SourceBuffer timestampOffset to ${t} (sn: ${i} cc: ${s})`),e.timestampOffset=t)}removeExecutor(e,t,n){const{media:r,mediaSource:i}=this,s=this.tracks[e],u=s==null?void 0:s.buffer;if(!r||!i||!u){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const p=c(r.duration)?r.duration:1/0,h=c(i.duration)?i.duration:1/0,v=Math.max(0,t),_=Math.min(n,p,h);_>v&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${v},${_}] from the ${e} SourceBuffer`),u.remove(v,_)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new da(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);n.ending=!1,n.ended=!1,r.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(t=>{this.warn(`SourceBuffer blocked callback ${t}`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(t){this.warn(`Callback run without blocking ${this.operationQueue} ${t}`)}}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:n}=this,r=t.map(s=>this.appendBlocker(s));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(r).then(s=>{n===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var n;const r=(n=this.tracks[t])==null?void 0:n.buffer;!r||r.updating||this.shiftAndExecuteNext(t)})}append(e,t,n){this.operationQueue&&this.operationQueue.append(e,t,n)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,n){const r=this.tracks[e];if(!r)return;const i=r.buffer;if(!i)return;const s=n.bind(this,e);r.listeners.push({event:t,listener:s}),i.addEventListener(t,s)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const n=t.buffer;n&&(t.listeners.forEach(r=>{n.removeEventListener(r.event,r.listener)}),t.listeners.length=0)}}function Ys(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function ga(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}function Ra(a){return a==="audio"?1:0}class va{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(g.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.BUFFER_CODECS,this.onBufferCodecs,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(g.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&c(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter((r,i)=>this.isLevelAllowed(r)&&i<=e);return this.clientRect=null,va.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=(u,p)=>p?u.width!==p.width||u.height!==p.height:!0;let i=e.length-1;const s=Math.max(t,n);for(let u=0;u<e.length;u+=1){const p=e[u];if((p.width>=s||p.height>=s)&&r(p,e[u+1])){i=u;break}}return i}}const Xs={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},cl={HLS:"h"};class fa{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof fa?n:new fa(n))),this.value=e,this.params=t}}const dl="Dict";function si(a){return Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":typeof a=="object"?JSON.stringify(a):String(a)}function $i(a,e,t,n){return new Error(`failed to ${a} "${si(e)}" as ${t}`,{cause:n})}function Ji(a,e,t){return $i("serialize",a,e,t)}class bs{constructor(e){this.description=e}}const Qs="Bare Item",ya="Boolean";function xa(a){if(typeof a!="boolean")throw Ji(a,ya);return a?"?1":"?0"}function Ks(a){return btoa(String.fromCharCode(...a))}const Ql="Byte Sequence";function Il(a){if(ArrayBuffer.isView(a)===!1)throw Ji(a,Ql);return`:${Ks(a)}:`}const Yo="Integer";function vo(a){return a<-999999999999999||999999999999999<a}function Dl(a){if(vo(a))throw Ji(a,Yo);return a.toString()}function Rl(a){return`@${Dl(a.getTime()/1e3)}`}function Ol(a,e){if(a<0)return-Ol(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const r=Math.floor(a*t);return(r%2===0?r:r+1)/t}else return Math.round(a*t)/t}const Ll="Decimal";function Jl(a){const e=Ol(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Ji(a,Ll);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Pl="String",Xo=/[\x00-\x1f\x7f]+/;function Ml(a){if(Xo.test(a))throw Ji(a,Pl);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function ql(a){return a.description||a.toString().slice(7,-1)}const kl="Token";function fl(a){const e=ql(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Ji(e,kl);return e}function hl(a){switch(typeof a){case"number":if(!c(a))throw Ji(a,Qs);return Number.isInteger(a)?Dl(a):Jl(a);case"string":return Ml(a);case"symbol":return fl(a);case"boolean":return xa(a);case"object":if(a instanceof Date)return Rl(a);if(a instanceof Uint8Array)return Il(a);if(a instanceof bs)return fl(a);default:throw Ji(a,Qs)}}const eu="Key";function ml(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw Ji(a,eu);return a}function Qo(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${ml(e)}`:`;${ml(e)}=${hl(t)}`).join("")}function Ro(a){return a instanceof fa?`${hl(a.value)}${Qo(a.params)}`:hl(a)}function pl(a){return`(${a.value.map(Ro).join(" ")})${Qo(a.params)}`}function gl(a,e={whitespace:!0}){if(typeof a!="object"||a==null)throw Ji(a,dl);const t=a instanceof Map?a.entries():Object.entries(a),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,i])=>{i instanceof fa||(i=new fa(i));let s=ml(r);return i.value===!0?s+=Qo(i.params):(s+="=",Array.isArray(i.value)?s+=pl(i):s+=Ro(i)),s}).join(`,${n}`)}function vl(a,e){return gl(a,e)}const Ea="CMCD-Object",gs="CMCD-Request",to="CMCD-Session",no="CMCD-Status",Nl={br:Ea,ab:Ea,d:Ea,ot:Ea,tb:Ea,tpb:Ea,lb:Ea,tab:Ea,lab:Ea,url:Ea,pb:gs,bl:gs,tbl:gs,dl:gs,ltc:gs,mtp:gs,nor:gs,nrr:gs,rc:gs,sn:gs,sta:gs,su:gs,ttfb:gs,ttfbb:gs,ttlb:gs,cmsdd:gs,cmsds:gs,smrt:gs,df:gs,cs:gs,ts:gs,cid:to,pr:to,sf:to,sid:to,st:to,v:to,msd:to,bs:no,bsd:no,cdn:no,rtp:no,bg:no,pt:no,ec:no,e:no},yl={REQUEST:gs};function Bl(a){return Object.keys(a).reduce((e,t)=>{var n;return(n=a[t])===null||n===void 0||n.forEach(r=>e[r]=t),e},{})}function bl(a,e){const t={};if(!a)return t;const n=Object.keys(a),r=e?Bl(e):{};return n.reduce((i,s)=>{var u;const p=Nl[s]||r[s]||yl.REQUEST,h=(u=i[p])!==null&&u!==void 0?u:i[p]={};return h[s]=a[s],i},t)}function $l(a){return["ot","sf","st","e","sta"].includes(a)}function tu(a){return typeof a=="number"?c(a):a!=null&&a!==""&&a!==!1}const yi="event";function Ti(a,e){const t=new URL(a),n=new URL(e);if(t.origin!==n.origin)return a;const r=t.pathname.split("/").slice(1),i=n.pathname.split("/").slice(1,-1);for(;r[0]===i[0];)r.shift(),i.shift();for(;i.length;)i.shift(),r.unshift("..");return r.join("/")+t.search+t.hash}const Ds=a=>Math.round(a),ra=(a,e)=>Array.isArray(a)?a.map(t=>ra(t,e)):a instanceof fa&&typeof a.value=="string"?new fa(ra(a.value,e),a.params):(e.baseUrl&&(a=Ti(a,e.baseUrl)),e.version===1?encodeURIComponent(a):a),Rs=a=>Ds(a/100)*100,ho={br:Ds,d:Ds,bl:Rs,dl:Rs,mtp:Rs,nor:(a,e)=>{let t=a;return e.version>=2&&(a instanceof fa&&typeof a.value=="string"?t=new fa([a]):typeof a=="string"&&(t=[a])),ra(t,e)},rtp:Rs,tb:Ds},ro="request",yo="response",Lo=["ab","bg","bl","br","bs","bsd","cdn","cid","cs","df","ec","lab","lb","ltc","msd","mtp","pb","pr","pt","sf","sid","sn","st","sta","tab","tb","tbl","tpb","ts","v"],dc=["e"],fc=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function Fl(a){return fc.test(a)}function hc(a){return Lo.includes(a)||dc.includes(a)||Fl(a)}const xu=["d","dl","nor","ot","rtp","su"];function mc(a){return Lo.includes(a)||xu.includes(a)||Fl(a)}const pc=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function gc(a){return Lo.includes(a)||xu.includes(a)||pc.includes(a)||Fl(a)}const vc=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function yc(a){return vc.includes(a)||Fl(a)}const bc={[yo]:gc,[yi]:hc,[ro]:mc};function Eu(a,e={}){const t={};if(a==null||typeof a!="object")return t;const n=e.version||a.v||1,r=e.reportingMode||ro,i=n===1?yc:bc[r];let s=Object.keys(a).filter(i);const u=e.filter;typeof u=="function"&&(s=s.filter(u));const p=r===yo||r===yi;p&&!s.includes("ts")&&s.push("ts"),n>1&&!s.includes("v")&&s.push("v");const h=b({},ho,e.formatters),v={version:n,reportingMode:r,baseUrl:e.baseUrl};return s.sort().forEach(_=>{let k=a[_];const V=h[_];if(typeof V=="function"&&(k=V(k,v)),_==="v"){if(n===1)return;k=n}_=="pr"&&k===1||(p&&_==="ts"&&!c(k)&&(k=Date.now()),tu(k)&&($l(_)&&typeof k=="string"&&(k=new bs(k)),t[_]=k))}),t}function _c(a,e={}){const t={};if(!a)return t;const n=Eu(a,e),r=bl(n,e==null?void 0:e.customHeaderMap);return Object.entries(r).reduce((i,[s,u])=>{const p=vl(u,{whitespace:!1});return p&&(i[s]=p),i},t)}function xc(a,e,t){return b(a,_c(e,t))}const Ec="CMCD";function Sc(a,e={}){return a?vl(Eu(a,e),{whitespace:!1}):""}function wc(a,e={}){if(!a)return"";const t=Sc(a,e);return encodeURIComponent(t)}function Cc(a,e={}){if(!a)return"";const t=wc(a,e);return`${Ec}=${t}`}const Su=/CMCD=[^&#]+/;function Tc(a,e,t){const n=Cc(e,t);if(!n)return a;if(Su.test(a))return a.replace(Su,n);const r=a.includes("?")?"&":"?";return`${a}${r}${n}`}class Ac{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:Xs.MANIFEST,su:!this.initialized})}catch(i){this.hls.logger.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=r=>{try{const{frag:i,part:s}=r,u=this.hls.levels[i.level],p=this.getObjectType(i),h={d:(s||i).duration*1e3,ot:p};(p===Xs.VIDEO||p===Xs.AUDIO||p==Xs.MUXED)&&(h.br=u.bitrate/1e3,h.tb=this.getTopBandwidth(p)/1e3,h.bl=this.getBufferLength(p));const v=s?this.getNextPart(s):this.getNextFrag(i);v!=null&&v.url&&v.url!==i.url&&(h.nor=v.url),this.apply(r,h)}catch(i){this.hls.logger.warn("Could not generate segment CMCD data.",i)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||e.sessionId,this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHED,this.onMediaDetached,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHED,this.onMediaDetached,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,r;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(r=t.tracks.video)==null?void 0:r.buffer}createData(){var e;return{v:1,sf:cl.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){b(t,this.createData());const n=t.ot===Xs.INIT||t.ot===Xs.VIDEO||t.ot===Xs.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:r}=this;r&&(t=Object.keys(t).reduce((s,u)=>(r.includes(u)&&(s[u]=t[u]),s),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),xc(e.headers,t,i)):e.url=Tc(e.url,t,i)}getNextFrag(e){var t;const n=(t=this.hls.levels[e.level])==null?void 0:t.details;if(n){const r=e.sn-n.startSN;return n.fragments[r+1]}}getNextPart(e){var t;const{index:n,fragment:r}=e,i=(t=this.hls.levels[r.level])==null||(t=t.details)==null?void 0:t.partList;if(i){const{sn:s}=r;for(let u=i.length-1;u>=0;u--){const p=i[u];if(p.index===n&&p.fragment.sn===s)return i[u+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Xs.TIMED_TEXT;if(e.sn==="initSegment")return Xs.INIT;if(t==="audio")return Xs.AUDIO;if(t==="main")return this.hls.audioTracks.length?Xs.VIDEO:Xs.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===Xs.AUDIO)n=r.audioTracks;else{const i=r.maxAutoLevel,s=i>-1?i+1:r.levels.length;n=r.levels.slice(0,s)}return n.forEach(i=>{i.bitrate>t&&(t=i.bitrate)}),t>0?t:NaN}getBufferLength(e){const t=this.media,n=e===Xs.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:zn.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,u){t(i),this.loader.load(i,s,u)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,u){t(i),this.loader.load(i,s,u)}}}}const Ic=3e5;class Dc extends j{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(n=>n!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===Bn.SendAlternateToPenaltyBox&&n.flags===An.MoveAllAlternatesMatchingHost){const r=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:u,pathwayId:p,type:h}=t.context;u&&r?s=this.getPathwayForGroupId(u,h,s):p&&(s=p)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&r&&(i=this.pathways()),i&&i.length>1&&(this.updatePathwayPriority(i),n.resolved=this.pathwayId!==s),t.details===F.BUFFER_APPEND_ERROR&&!t.fatal?n.resolved=!0:n.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${r&&r.length} priorities: ${Ct(i)} penalized: ${Ct(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this._pathwayPriority=e;let t;const n=this.penalizedPathways,r=performance.now();Object.keys(n).forEach(i=>{r-n[i]>Ic&&delete n[i]});for(let i=0;i<e.length;i++){const s=e[i];if(s in n)continue;if(s===this.pathwayId)return;const u=this.hls.nextLoadLevel,p=this.hls.levels[u];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,Ns(t),this.hls.trigger(g.LEVELS_UPDATED,{levels:t});const h=this.hls.levels[u];p&&h&&this.levels&&(h.attrs["STABLE-VARIANT-ID"]!==p.attrs["STABLE-VARIANT-ID"]&&h.bitrate!==p.bitrate&&this.log(`Unstable Pathways change from bitrate ${p.bitrate} to ${h.bitrate}`),this.hls.nextLoadLevel=u);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let i=0;i<r.length;i++)if(t===J.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===J.SUBTITLE_TRACK&&r[i].hasSubtitleGroup(e))return r[i].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},r={};e.forEach(i=>{const{ID:s,"BASE-ID":u,"URI-REPLACEMENT":p}=i;if(t.some(v=>v.pathwayId===s))return;const h=this.getLevelsForPathway(u).map(v=>{const _=new Pr(v.attrs);_["PATHWAY-ID"]=s;const k=_.AUDIO&&`${_.AUDIO}_clone_${s}`,V=_.SUBTITLES&&`${_.SUBTITLES}_clone_${s}`;k&&(n[_.AUDIO]=k,_.AUDIO=k),V&&(r[_.SUBTITLES]=V,_.SUBTITLES=V);const G=Cu(v.uri,_["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",p),we=new Wt({attrs:_,audioCodec:v.audioCodec,bitrate:v.bitrate,height:v.height,name:v.name,url:G,videoCodec:v.videoCodec,width:v.width});if(v.audioGroups)for(let Se=1;Se<v.audioGroups.length;Se++)we.addGroupId("audio",`${v.audioGroups[Se]}_clone_${s}`);if(v.subtitleGroups)for(let Se=1;Se<v.subtitleGroups.length;Se++)we.addGroupId("text",`${v.subtitleGroups[Se]}_clone_${s}`);return we});t.push(...h),wu(this.audioTracks,n,p,s),wu(this.subtitleTracks,r,p,s)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let r;try{r=new self.URL(e)}catch(v){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const v=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+v)}const i={responseType:"json",url:r.href},s=t.steeringManifestLoadPolicy.default,u=s.errorRetry||s.timeoutRetry||{},p={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:u.maxNumRetry||0,retryDelay:u.retryDelayMs||0,maxRetryDelay:u.maxRetryDelayMs||0},h={onSuccess:(v,_,k,V)=>{this.log(`Loaded steering manifest: "${r}"`);const G=v.data;if((G==null?void 0:G.VERSION)!==1){this.log(`Steering VERSION ${G.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=G.TTL;const{"RELOAD-URI":we,"PATHWAY-CLONES":Se,"PATHWAY-PRIORITY":Je}=G;if(we)try{this.uri=new self.URL(we,r).href}catch(ft){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${we}`);return}this.scheduleRefresh(this.uri||k.url),Se&&this.clonePathways(Se);const ot={steeringManifest:G,url:r.toString()};this.hls.trigger(g.STEERING_MANIFEST_LOADED,ot),Je&&this.updatePathwayPriority(Je)},onError:(v,_,k,V)=>{if(this.log(`Error loading steering manifest: ${v.code} ${v.text} (${_.url})`),this.stopLoad(),v.code===410){this.enabled=!1,this.log(`Steering manifest ${_.url} no longer available`);return}let G=this.timeToLoad*1e3;if(v.code===429){const we=this.loader;if(typeof(we==null?void 0:we.getResponseHeader)=="function"){const Se=we.getResponseHeader("Retry-After");Se&&(G=parseFloat(Se)*1e3)}this.log(`Steering manifest ${_.url} rate limited`);return}this.scheduleRefresh(this.uri||_.url,G)},onTimeout:(v,_,k)=>{this.log(`Timeout loading steering manifest (${_.url})`),this.scheduleRefresh(this.uri||_.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,p,h)}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 wu(a,e,t,n){a&&Object.keys(e).forEach(r=>{const i=a.filter(s=>s.groupId===r).map(s=>{const u=b({},s);return u.details=void 0,u.attrs=new Pr(u.attrs),u.url=u.attrs.URI=Cu(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),u.groupId=u.attrs["GROUP-ID"]=e[r],u.attrs["PATHWAY-ID"]=n,u});a.push(...i)})}function Cu(a,e,t,n){const{HOST:r,PARAMS:i,[t]:s}=n;let u;e&&(u=s==null?void 0:s[e],u&&(a=u));const p=new self.URL(a);return r&&!u&&(p.host=r),i&&Object.keys(i).sort().forEach(h=>{h&&p.searchParams.set(h,i[h])}),p.href}class Jo extends j{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.mediaResolved=void 0,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.mediaKeys=null,this.setMediaKeysQueue=Jo.CDMCleanupPromise?[Jo.CDMCleanupPromise]:[],this.bannedKeyIds={},this.onMediaEncrypted=t=>{const{initDataType:n,initData:r}=t,i=`"${t.type}" event: init data type: "${n}"`;if(this.debug(i),r!==null){if(!this.keyFormatPromise){let s=Object.keys(this.keySystemAccessPromises);s.length||(s=Es(this.config));const u=s.map(us).filter(p=>!!p);this.keyFormatPromise=this.getKeyFormatPromise(u)}this.keyFormatPromise.then(s=>{const u=xs(s);if(n!=="sinf"||u!==Kr.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${n}" for selected key-system ${u}`);return}let p;try{const V=rt(new Uint8Array(r)),G=ui(JSON.parse(V).sinf),we=fe(G);if(!we)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");p=new Uint8Array(we.subarray(8,24))}catch(V){this.warn(`${i} Failed to parse sinf: ${V}`);return}const h=ue(p),{keyIdToKeySessionPromise:v,mediaKeySessions:_}=this;let k=v[h];for(let V=0;V<_.length;V++){const G=_[V],we=G.decryptdata;if(!we.keyId)continue;const Se=ue(we.keyId);if(br(p,we.keyId)||we.uri.replace(/-/g,"").indexOf(h)!==-1){if(k=v[Se],!k)continue;if(we.pssh)break;delete v[Se],we.pssh=new Uint8Array(r),we.keyId=p,k=v[h]=k.then(()=>this.generateRequestWithPreferredKeySession(G,n,r,"encrypted-event-key-match")),k.catch(Je=>this.handleError(Je));break}}k||this.handleError(new Error(`Key ID ${h} not encountered in playlist. Key-system sessions ${_.length}.`))}).catch(s=>this.handleError(s))}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.onDestroying(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(g.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(g.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(g.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(g.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,r=t==null?void 0:t[e];if(r)return r.licenseUrl;if(e===Kr.WIDEVINE&&n)return n}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(t===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,n=t==null?void 0:t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(s,u,p)=>!!s&&p.indexOf(s)===u,r=t.map(s=>s.audioCodec).filter(n),i=t.map(s=>s.videoCodec).filter(n);return r.length+i.length===0&&i.push("avc1.42e01e"),new Promise((s,u)=>{const p=h=>{const v=h.shift();this.getMediaKeysPromise(v,r,i).then(_=>s({keySystem:v,mediaKeys:_})).catch(_=>{h.length?p(h):_ instanceof Sa?u(_):u(new Sa({type:ie.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_NO_ACCESS,error:_,fatal:!0},_.message))})};p(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return ms===null&&self.location.protocol==="http:"&&(r=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(r))}return n(e,t)}getMediaKeysPromise(e,t,n){var r;const i=ba(e,t,n,this.config.drmSystemOptions||{});let s=this.keySystemAccessPromises[e],u=(r=s)==null?void 0:r.keySystemAccess;if(!u){this.log(`Requesting encrypted media "${e}" key-system access with config: ${Ct(i)}`),u=this.requestMediaKeySystemAccess(e,i);const p=s=this.keySystemAccessPromises[e]={keySystemAccess:u};return u.catch(h=>{this.log(`Failed to obtain access to key-system "${e}": ${h}`)}),u.then(h=>{this.log(`Access for key-system "${h.keySystem}" obtained`);const v=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const _=p.mediaKeys=h.createMediaKeys().then(k=>(this.log(`Media-keys created for "${e}"`),p.hasMediaKeys=!0,v.then(V=>V?this.setMediaKeysServerCertificate(k,e,V):k)));return _.catch(k=>{this.error(`Failed to create media-keys for "${e}"}: ${k}`)}),_})}return u.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${ue(e.keyId||[])} keyUri: ${e.uri}`);const r=n.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),r=zl(t),i="cenc";this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,i,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}updateKeySession(e,t){const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyId ${ue(e.decryptdata.keyId||[])}
} (data length: ${t.byteLength})`),n.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>us(e)).filter(e=>!!e)}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then(({keySystem:t,mediaKeys:n})=>this.attemptSetMediaKeys(t,n))}selectKeySystem(e){return new Promise((t,n)=>{this.getKeySystemSelectionPromise(e).then(({keySystem:r})=>{const i=us(r);i?t(i):n(new Error(`Unable to find format for key-system "${r}"`))}).catch(n)})}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){const t=Es(this.config),n=e.map(xs).filter(r=>!!r&&t.indexOf(r)!==-1);return this.selectKeySystem(n)}getKeyStatus(e){const{mediaKeySessions:t}=this;for(let n=0;n<t.length;n++){const r=Rc(e,t[n]);if(r)return r}}loadKey(e){const t=e.keyInfo.decryptdata,n=zl(t),r=this.bannedKeyIds[n];if(r||this.getKeyStatus(t)==="internal-error"){const u=Tu(r||"internal-error",t);return this.handleError(u,e.frag),Promise.reject(u)}const i=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);const s=this.keyIdToKeySessionPromise[n];if(!s){const u=this.getKeySystemForKeyPromise(t).then(({keySystem:p,mediaKeys:h})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(p,h).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:p,mediaKeys:h,decryptdata:t}))))).then(p=>{const h="cenc",v=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(p,h,v,"playlist-key")});return u.catch(p=>this.handleError(p,e.frag)),this.keyIdToKeySessionPromise[n]=u,u}return s.catch(u=>{if(u instanceof Sa){const p=T({},u.data);this.getKeyStatus(t)==="internal-error"&&(p.decryptdata=t);const h=new Sa(p,u.message);this.handleError(h,e.frag)}}),s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e,t){if(this.hls)if(e instanceof Sa){t&&(e.data.frag=t);const n=e.data.decryptdata;this.error(`${e.message}${n?` (${ue(n.keyId||[])})`:""}`),this.hls.trigger(g.ERROR,e.data)}else this.error(e.message),this.hls.trigger(g.ERROR,{type:ie.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}getKeySystemForKeyPromise(e){const t=zl(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=xs(e.keyFormat),i=r?[r]:Es(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=Es(this.config)),e.length===0)throw new Sa({type:ie.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${Ct({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){if(this.mediaResolved=void 0,this.mediaKeys===t)return Promise.resolve();const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const r=Promise.all(n).then(()=>this.media?this.media.setMediaKeys(t):new Promise((i,s)=>{this.mediaResolved=()=>{if(this.mediaResolved=void 0,!this.media)return s(new Error("Attempted to set mediaKeys without media element attached"));this.mediaKeys=t,this.media.setMediaKeys(t).then(i).catch(s)}}));return this.mediaKeys=t,this.setMediaKeysQueue.push(r),r.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(r),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(i=>n.indexOf(i)===-1)})}generateRequestWithPreferredKeySession(e,t,n,r){var i;const s=(i=this.config.drmSystems)==null||(i=i[e.keySystem])==null?void 0:i.generateRequest;if(s)try{const G=s.call(this.hls,t,n,e);if(!G)throw new Error("Invalid response from configured generateRequest filter");t=G.initDataType,n=G.initData?G.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(G){if(this.warn(G.message),this.hls&&this.hls.config.debug)throw G}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const u=zl(e.decryptdata),p=e.decryptdata.uri;this.log(`Generating key-session request for "${r}" keyId: ${u} URI: ${p} (init data type: ${t} length: ${n.byteLength})`);const h=new _o,v=e._onmessage=G=>{const we=e.mediaKeysSession;if(!we){h.emit("error",new Error("invalid state"));return}const{messageType:Se,message:Je}=G;this.log(`"${Se}" message event for session "${we.sessionId}" message size: ${Je.byteLength}`),Se==="license-request"||Se==="license-renewal"?this.renewLicense(e,Je).catch(ot=>{h.eventNames().length?h.emit("error",ot):this.handleError(ot)}):Se==="license-release"?e.keySystem===Kr.FAIRPLAY&&this.updateKeySession(e,_i("acknowledged")).then(()=>this.removeSession(e)).catch(ot=>this.handleError(ot)):this.warn(`unhandled media key message type "${Se}"`)},_=(G,we)=>{we.keyStatus=G;let Se;G.startsWith("usable")?h.emit("resolved"):G==="internal-error"||G==="output-restricted"||G==="output-downscaled"?Se=Tu(G,we.decryptdata):G==="expired"?Se=new Error(`key expired (keyId: ${u})`):G==="released"?Se=new Error("key released"):G==="status-pending"||this.warn(`unhandled key status change "${G}" (keyId: ${u})`),Se&&(h.eventNames().length?h.emit("error",Se):this.handleError(Se))},k=e._onkeystatuseschange=G=>{if(!e.mediaKeysSession){h.emit("error",new Error("invalid state"));return}const Se=this.getKeyStatuses(e);if(!Object.keys(Se).some(Pt=>Se[Pt]!=="status-pending"))return;if(Se[u]==="expired"){this.log(`Expired key ${Ct(Se)} in key-session "${e.mediaKeysSession.sessionId}"`),this.renewKeySession(e);return}let ot=Se[u];if(ot)_(ot,e);else{var ft;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(ft=e.keyStatusTimeouts)[u]||(ft[u]=self.setTimeout(()=>{if(!e.mediaKeysSession||!this.mediaKeys)return;const Kt=this.getKeyStatus(e.decryptdata);if(Kt&&Kt!=="status-pending")return this.log(`No status for keyId ${u} in key-session "${e.mediaKeysSession.sessionId}". Using session key-status ${Kt} from other session.`),_(Kt,e);this.log(`key status for ${u} in key-session "${e.mediaKeysSession.sessionId}" timed out after 1000ms`),ot="internal-error",_(ot,e)},1e3)),this.log(`No status for keyId ${u} (${Ct(Se)}).`)}};Bs(e.mediaKeysSession,"message",v),Bs(e.mediaKeysSession,"keystatuseschange",k);const V=new Promise((G,we)=>{h.on("error",we),h.on("resolved",G)});return e.mediaKeysSession.generateRequest(t,n).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${u} URI: ${p}`)}).catch(G=>{throw new Sa({type:ie.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_NO_SESSION,error:G,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${G}`)}).then(()=>V).catch(G=>(h.removeAllListeners(),this.removeSession(e).then(()=>{throw G}))).then(()=>(h.removeAllListeners(),e))}getKeyStatuses(e){const t={};return e.mediaKeysSession.keyStatuses.forEach((n,r)=>{if(typeof r=="string"&&typeof n=="object"){const u=r;r=n,n=u}const i="buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r);if(e.keySystem===Kr.PLAYREADY&&i.length===16){const u=ue(i);t[u]=n,ir(i)}const s=ue(i);n==="internal-error"&&(this.bannedKeyIds[s]=n),this.log(`key status change "${n}" for keyStatuses keyId: ${s} key-session "${e.mediaKeysSession.sessionId}"`),t[s]=n}),t}fetchServerCertificate(e){const t=this.config,n=t.loader,r=new n(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,u)=>{const p={responseType:"arraybuffer",url:i},h=t.certLoadPolicy.default,v={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},_={onSuccess:(k,V,G,we)=>{s(k.data)},onError:(k,V,G,we)=>{u(new Sa({type:ie.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:G,response:T({url:p.url,data:void 0},k)},`"${e}" certificate request failed (${i}). Status: ${k.code} (${k.text})`))},onTimeout:(k,V,G)=>{u(new Sa({type:ie.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:G,response:{url:p.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(k,V,G)=>{u(new Error("aborted"))}};r.load(p,v,_)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((r,i)=>{e.setServerCertificate(n).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${n.byteLength}) on "${t}"`),r(e)}).catch(s=>{i(new Sa({type:ie.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(r=>{throw new Sa({type:ie.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_SESSION_UPDATE_FAILED,decryptdata:e.decryptdata,error:r,fatal:!1},r.message)}))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const r=new DOMParser().parseFromString(n,"application/xml"),i=r.querySelectorAll("HttpHeader");if(i.length>0){let v;for(let _=0,k=i.length;_<k;_++){var s,u;v=i[_];const V=(s=v.querySelector("name"))==null?void 0:s.textContent,G=(u=v.querySelector("value"))==null?void 0:u.textContent;V&&G&&e.setRequestHeader(V,G)}}const p=r.querySelector("Challenge"),h=p==null?void 0:p.textContent;if(!h)throw new Error("Cannot find <Challenge> in key message");return _i(atob(h))}setupLicenseXHR(e,t,n,r){const i=this.config.licenseXhrSetup;return i?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return i.call(this.hls,e,t,n,r)}).catch(s=>{if(!n.decryptdata)throw s;return e.open("POST",t,!0),i.call(this.hls,e,t,n,r)}).then(s=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:s||r})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise((r,i)=>{const s=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${s}`);const u=new XMLHttpRequest;u.responseType="arraybuffer",u.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(u.readyState===4)if(u.status===200){this._requestLicenseFailureCount=0;let p=u.response;this.log(`License received ${p instanceof ArrayBuffer?p.byteLength:p}`);const h=this.config.licenseResponseCallback;if(h)try{p=h.call(this.hls,u,s,e)}catch(v){this.error(v)}r(p)}else{const p=n.errorRetry,h=p?p.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>h||u.status>=400&&u.status<500)i(new Sa({type:ie.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:u,response:{url:s,data:void 0,code:u.status,text:u.statusText}},`License Request XHR failed (${s}). Status: ${u.status} (${u.statusText})`));else{const v=h-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${v} attempts left`),this.requestLicense(e,t).then(r,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=u,this.setupLicenseXHR(u,s,e,t).then(({xhr:p,licenseChallenge:h})=>{e.keySystem==Kr.PLAYREADY&&(h=this.unpackPlayReadyKeyMessage(p,h)),p.send(h)}).catch(i)})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,Bs(n,"encrypted",this.onMediaEncrypted),Bs(n,"waitingforkey",this.onWaitingForKey);const r=this.mediaResolved;r?r():this.mediaKeys=n.mediaKeys}onMediaDetached(){const e=this.media;e&&(Ws(e,"encrypted",this.onMediaEncrypted),Ws(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},this.bannedKeyIds={};const t=this.mediaResolved;if(t&&t(),!this.mediaKeys&&!this.mediaKeySessions.length)return;const n=this.media,r=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,ks.clearKeyUriToKeyIdMap();const i=r.length;Jo.CDMCleanupPromise=Promise.all(r.map(s=>this.removeSession(s)).concat((n==null||(e=n.setMediaKeys(null))==null?void 0:e.catch(s=>{this.log(`Could not clear media keys: ${s}`),this.hls&&this.hls.trigger(g.ERROR,{type:ie.OTHER_ERROR,details:F.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${s}`)})}))||Promise.resolve())).catch(s=>{this.log(`Could not close sessions and clear media keys: ${s}`),this.hls&&this.hls.trigger(g.ERROR,{type:ie.OTHER_ERROR,details:F.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${s}`)})}).then(()=>{i&&this.log("finished closing key sessions and clearing media keys")})}onManifestLoading(){this._clear()}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const n=t.reduce((r,i)=>(r.indexOf(i.keyFormat)===-1&&r.push(i.keyFormat),r),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n,decryptdata:r}=e;if(t){this.log(`Remove licenses and keys and close session "${t.sessionId}" keyId: ${ue((r==null?void 0:r.keyId)||[])}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);i>-1&&this.mediaKeySessions.splice(i,1);const{keyStatusTimeouts:s}=e;s&&Object.keys(s).forEach(h=>self.clearTimeout(s[h]));const{drmSystemOptions:u}=this.config;return(Ka(u)?new Promise((h,v)=>{self.setTimeout(()=>v(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(h).catch(v)}):Promise.resolve()).catch(h=>{this.log(`Could not remove session: ${h}`),this.hls&&this.hls.trigger(g.ERROR,{type:ie.OTHER_ERROR,details:F.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${h}`)})}).then(()=>t.close()).catch(h=>{this.log(`Could not close session: ${h}`),this.hls&&this.hls.trigger(g.ERROR,{type:ie.OTHER_ERROR,details:F.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${h}`)})})}return Promise.resolve()}}Jo.CDMCleanupPromise=void 0;function zl(a){if(!a)throw new Error("Could not read keyId of undefined decryptdata");if(a.keyId===null)throw new Error("keyId is null");return ue(a.keyId)}function Rc(a,e){if(a.keyId&&e.mediaKeysSession.keyStatuses.has(a.keyId))return e.mediaKeysSession.keyStatuses.get(a.keyId);if(a.matches(e.decryptdata))return e.keyStatus}class Sa extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}function Tu(a,e){const t=a==="output-restricted",n=t?F.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:F.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new Sa({type:ie.KEY_SYSTEM_ERROR,details:n,fatal:!1,decryptdata:e},t?"HDCP level output restricted":`key status changed to "${a}"`)}class Oc{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(g.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(g.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,n){const r=performance.now();if(t){if(this.lastTime){const i=r-this.lastTime,s=n-this.lastDroppedFrames,u=t-this.lastDecodedFrames,p=1e3*s/i,h=this.hls;if(h.trigger(g.FPS_DROP,{currentDropped:s,currentDecoded:u,totalDroppedFrames:n}),p>0&&s>h.config.fpsDroppedMonitoringThreshold*u){let v=h.currentLevel;h.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+v),v>0&&(h.autoLevelCapping===-1||h.autoLevelCapping>=v)&&(v=v-1,h.trigger(g.FPS_DROP_LEVEL_CAPPING,{level:v,droppedLevel:h.currentLevel}),h.autoLevelCapping=v,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 Au(a,e){let t;try{t=new Event("addtrack")}catch(n){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=a,e.dispatchEvent(t)}function Iu(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(e.id))try{if(a.addCue(e),!a.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(n){ce.debug(`[texttrack-utils]: ${n}`);try{const r=new self.TextTrackCue(e.startTime,e.endTime,e.text);r.id=e.id,a.addCue(r)}catch(r){ce.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function qo(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues)for(let n=a.cues.length;n--;)e&&a.cues[n].removeEventListener("enter",e),a.removeCue(a.cues[n]);t==="disabled"&&(a.mode=t)}function nu(a,e,t,n){const r=a.mode;if(r==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=Pc(a.cues,e,t);for(let s=0;s<i.length;s++)(!n||n(i[s]))&&a.removeCue(i[s])}r==="disabled"&&(a.mode=r)}function Lc(a,e){if(e<=a[0].startTime)return 0;const t=a.length-1;if(e>a[t].endTime)return-1;let n=0,r=t,i;for(;n<=r;)if(i=Math.floor((r+n)/2),e<a[i].startTime)r=i-1;else if(e>a[i].startTime&&n<t)n=i+1;else return i;return a[n].startTime-e<e-a[r].startTime?n:r}function Pc(a,e,t){const n=[],r=Lc(a,e);if(r>-1)for(let i=r,s=a.length;i<s;i++){const u=a[i];if(u.startTime>=e&&u.endTime<=t)n.push(u);else if(u.startTime>t)return n}return n}function Ul(a){const e=[];for(let t=0;t<a.length;t++){const n=a[t];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(a[t])}return e}class Mc extends hs{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=Ul(this.media.textTracks);for(let i=0;i<n.length;i++)if(n[i].mode==="hidden")t=n[i];else if(n[i].mode==="showing"){t=n[i];break}const r=this.findTrackForTextTrack(t);this.subtitleTrack!==r&&this.setSubtitleTrack(r)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(g.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const n=this.media;if(!n)return;const r=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||n.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,r)return;Ul(n.textTracks).forEach(s=>{qo(s)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Subtitle track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const u=s.details;s.details=t.details,this.log(`Subtitle track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,u)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.subtitleGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(s=>(r==null?void 0:r.indexOf(s))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const s=this.tracks.filter(v=>!n||n.indexOf(v.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(v=>v.default)&&(this.selectDefaultTrack=!1),s.forEach((v,_)=>{v.id=_});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const u=this.hls.config.subtitlePreference;if(!i&&u){this.selectDefaultTrack=!1;const v=rn(u,s);if(v>-1)i=s[v];else{const _=rn(u,this.tracks);i=this.tracks[_]}}let p=this.findTrackId(i);p===-1&&i&&(p=this.findTrackId(null));const h={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(g.SUBTITLE_TRACKS_UPDATED,h),p!==-1&&this.trackId===-1&&this.setSubtitleTrack(p)}}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let r=0;r<t.length;r++){const i=t[r];if(!(n&&!i.default||!n&&!e)&&(!e||Sn(i,e)))return r}if(e){for(let r=0;r<t.length;r++){const i=t[r];if(pa(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return r}for(let r=0;r<t.length;r++){const i=t[r];if(pa(e.attrs,i.attrs,["LANGUAGE"]))return r}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(fo(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===J.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&&Sn(e,n))return n;const r=rn(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=rn(e,t);if(i>-1)return t[i]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,u=s==null?void 0:s.age;this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${u&&s.live?" age "+u.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(g.SUBTITLE_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=Ul(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(i=>fo(n,i))[0],r||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach(i=>{i.mode!=="disabled"&&i!==r&&(i.mode="disabled")}),r){const i=this.subtitleDisplay?"showing":"hidden";r.mode!==i&&(r.mode=i)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!c(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e]||null;if(this.trackId=e,this.currentTrack=r,this.toggleTrackModes(),!r){this.hls.trigger(g.SUBTITLE_TRACK_SWITCH,{id:e});return}const i=!!r.details&&!r.details.live;if(e===this.trackId&&r===n&&i)return;this.log(`Switching to subtitle-track ${e}`+(r?` "${r.name}" lang:${r.lang} group:${r.groupId}`:""));const{id:s,groupId:u="",name:p,type:h,url:v}=r;this.hls.trigger(g.SUBTITLE_TRACK_SWITCH,{id:s,groupId:u,name:p,type:h,url:v});const _=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(_)}}function kc(){try{return crypto.randomUUID()}catch(a){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const i=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(r=="x"?i:i&3|8).toString(16)})}}}function _l(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const el=.025;let Kl=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function Nc(a,e,t){return`${a.identifier}-${t+1}-${_l(e)}`}class Bc{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 ru(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=ru(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=c(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 ru(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)<el))}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"?Kl.Range:Kl.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 $c(this)}}function ru(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<el)?e.start:e.start+e.duration}function Du(a,e,t){const n=new self.URL(a,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function iu(a,e){for(;(t=a.assetList[++e])!=null&&t.error;)var t;return e}function $c(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function tl(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class Fc{constructor(e,t,n,r){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{this.reachedPlayout(this.currentTime)&&this.hls&&this.hls.trigger(g.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=n,this.assetItem=r;const s=()=>{this.hasDetails=!0};i.once(g.LEVEL_LOADED,s),i.once(g.AUDIO_TRACK_LOADED,s),i.once(g.SUBTITLE_TRACK_LOADED,s),i.on(g.MEDIA_ATTACHING,(u,{media:p})=>{this.removeMediaListeners(),this.mediaAttached=p,this.interstitial.playoutLimit&&(p.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(g.BUFFER_APPENDED,()=>{const v=this.bufferedEnd;this.reachedPlayout(v)&&(this._bufferedEosTime=v,i.trigger(g.BUFFERED_TO_END,void 0))}))})}get appendInPlace(){return this.interstitial.appendInPlace}loadSource(){const e=this.hls;if(e)if(e.url)e.levels.length&&!e.started&&e.startLoad(-1,!0);else{let t=this.assetItem.uri;try{t=Du(t,e.config.primarySessionId||"").href}catch(n){}e.loadSource(t)}}bufferedInPlaceToEnd(e){var t;if(!this.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e)return!1;const n=Math.min(this._bufferedEosTime||1/0,this.duration),r=this.timelineOffset,i=zn.bufferInfo(e,r,0);return this.getAssetTime(i.end)>=n-.02}reachedPlayout(e){const n=this.interstitial.playoutLimit;return this.startOffset+e>=n}get destroyed(){var e;return!((e=this.hls)!=null&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return((e=this.hls)==null?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const t=zn.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;if(!e)return 0;const t=this.interstitial.playoutLimit;if(t){const n=t-this.startOffset;if(n>0&&n<e)return n}return e}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const n=e-t;if(Math.abs(n)>1/9e4&&this.hls){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,n=this.duration;return Math.min(Math.max(0,e-t),n)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls&&this.hls.destroy(),this.hls=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){var t;this.loadSource(),(t=this.hls)==null||t.attachMedia(e)}detachMedia(){var e;this.removeMediaListeners(),this.mediaAttached=null,(e=this.hls)==null||e.detachMedia()}resumeBuffering(){var e;(e=this.hls)==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.hls)==null||e.pauseBuffering()}transferMedia(){var e;return this.bufferSnapShot(),((e=this.hls)==null?void 0:e.transferMedia())||null}resetDetails(){const e=this.hls;if(e&&this.hasDetails){e.stopLoad();const t=n=>delete n.details;e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}on(e,t,n){var r;(r=this.hls)==null||r.on(e,t)}once(e,t,n){var r;(r=this.hls)==null||r.once(e,t)}off(e,t,n){var r;(r=this.hls)==null||r.off(e,t)}toString(){var e;return`HlsAssetPlayer: ${tl(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const Ru=.033;class zc extends j{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((n,r)=>e<=r.startOffset&&t>r.startOffset?(delete r.error,n+1):n,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let n=-1;e.nextEvent?n=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(n=this.findEventIndex(e.previousEvent.identifier)+1);const r=this.items;if(r)for(r[n]||(t===void 0&&(t=e.start),n=this.findItemIndexAtTime(t));n>=0&&(i=r[n])!=null&&i.event;){var i;n--}return n}findItemIndexAtTime(e,t){const n=this.items;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(t&&t!=="primary"&&(i=i[t]),e===i.start||e>i.start&&e<i.end)return r}return-1}findJumpRestrictedIndex(e,t){const n=this.items;if(n)for(let r=e;r<=t&&n[r];r++){const i=n[r].event;if(i!=null&&i.restrictions.jump&&!i.appendInPlace)return r}return-1}findEventIndex(e){const t=this.items;if(t)for(let r=t.length;r--;){var n;if(((n=t[r].event)==null?void 0:n.identifier)===e)return r}return-1}findAssetIndex(e,t){const n=e.assetList,r=n.length;if(r>1)for(let i=0;i<r;i++){const s=n[i];if(!s.error){const u=s.timelineStart;if(t===u||t>u&&(t<u+(s.duration||0)||i===r-1))return i}}return 0}get assetIdAtEnd(){var e;const t=(e=this.items)==null||(e=e[this.length-1])==null?void 0:e.event;if(t){const n=t.assetList,r=n[n.length-1];if(r)return r.identifier}return null}parseInterstitialDateRanges(e,t){const n=e.main.details,{dateRanges:r}=n,i=this.events,s=this.parseDateRanges(r,{url:n.url},t),u=Object.keys(r),p=i?i.filter(h=>!u.includes(h.identifier)):[];s.length&&s.sort((h,v)=>{const _=h.cue.pre,k=h.cue.post,V=v.cue.pre,G=v.cue.post;if(_&&!V)return-1;if(V&&!_||k&&!G)return 1;if(G&&!k)return-1;if(!_&&!V&&!k&&!G){const we=h.startTime,Se=v.startTime;if(we!==Se)return we-Se}return h.dateRange.tagOrder-v.dateRange.tagOrder}),this.events=s,p.forEach(h=>{this.removeEvent(h)}),this.updateSchedule(e,p)}updateSchedule(e,t=[],n=!1){const r=this.events||[];if(r.length||t.length||this.length<2){const i=this.items,s=this.parseSchedule(r,e);(n||t.length||(i==null?void 0:i.length)!==s.length||s.some((p,h)=>Math.abs(p.playout.start-i[h].playout.start)>.005||Math.abs(p.playout.end-i[h].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,i))}}parseDateRanges(e,t,n){const r=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const u=i[s],p=e[u];if(p.isInterstitial){let h=this.eventMap[u];h?h.setDateRange(p):(h=new Bc(p,t),this.eventMap[u]=h,n===!1&&(h.appendInPlace=n)),r.push(h)}}return r}parseSchedule(e,t){const n=[],r=t.main.details,i=r.live?1/0:r.edge;let s=0;if(e=e.filter(p=>!p.error&&!(p.cue.once&&p.hasPlayed)),e.length){this.resolveOffsets(e,t);let p=0,h=0;if(e.forEach((v,_)=>{const k=v.cue.pre,V=v.cue.post,G=e[_-1]||null,we=v.appendInPlace,Se=V?i:v.startOffset,Je=v.duration,ot=v.timelineOccupancy===Kl.Range?Je:0,ft=v.resumptionOffset,Pt=(G==null?void 0:G.startTime)===Se,Kt=Se+v.cumulativeDuration;let xn=we?Kt+Je:Se+ft;if(k||!V&&Se<=0){const cn=h;h+=ot,v.timelineStart=Kt;const ln=s;s+=Je,n.push({event:v,start:Kt,end:xn,playout:{start:ln,end:s},integrated:{start:cn,end:h}})}else if(Se<=i){if(!Pt){const Yt=Se-p;if(Yt>Ru){const kn=p,pr=h;h+=Yt;const kr=s;s+=Yt;const Wr={previousEvent:e[_-1]||null,nextEvent:v,start:kn,end:kn+Yt,playout:{start:kr,end:s},integrated:{start:pr,end:h}};n.push(Wr)}else Yt>0&&G&&(G.cumulativeDuration+=Yt,n[n.length-1].end=Se)}V&&(xn=Kt),v.timelineStart=Kt;const cn=h;h+=ot;const ln=s;s+=Je,n.push({event:v,start:Kt,end:xn,playout:{start:ln,end:s},integrated:{start:cn,end:h}})}else return;const Ht=v.resumeTime;V||Ht>i?p=i:p=Ht}),p<i){var u;const v=p,_=h,k=i-p;h+=k;const V=s;s+=k,n.push({previousEvent:((u=n[n.length-1])==null?void 0:u.event)||null,nextEvent:null,start:p,end:v+k,playout:{start:V,end:s},integrated:{start:_,end:h}})}this.setDurations(i,s,h)}else n.push({previousEvent:null,nextEvent:null,start:0,end:i,playout:{start:0,end:i},integrated:{start:0,end:i}}),this.setDurations(i,i,i);return n}setDurations(e,t,n){this.durations={primary:e,playout:t,integrated:n}}resolveOffsets(e,t){const n=t.main.details,r=n.live?1/0:n.edge;let i=0,s=-1;e.forEach((u,p)=>{const h=u.cue.pre,v=u.cue.post,_=h?0:v?r:u.startTime;this.updateAssetDurations(u),s===_?u.cumulativeDuration=i:(i=0,s=_),!v&&u.snapOptions.in&&(u.resumeAnchor=nr(null,n.fragments,u.startOffset+u.resumptionOffset,0,0)||void 0),u.appendInPlace&&!u.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(u,t)||(u.appendInPlace=!1)),!u.appendInPlace&&p+1<e.length&&e[p+1].startTime-e[p].resumeTime<Ru&&(e[p+1].appendInPlace=!1,e[p+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${u}`));const V=c(u.resumeOffset)?u.resumeOffset:u.duration;i+=V})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>el?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):!Object.keys(t).some(s=>{const u=t[s].details,p=u.edge;if(n>=p)return this.log(`"${e.identifier}" resumption ${n} past ${s} playlist end ${p}`),!1;const h=nr(null,u.fragments,n);if(!h)return this.log(`"${e.identifier}" resumption ${n} does not align with any fragments in ${s} playlist (${u.fragStart}-${u.fragmentEnd})`),!0;const v=s==="audio"?.175:0;return Math.abs(h.start-n)<el+v||Math.abs(h.end-n)<el+v?!1:(this.log(`"${e.identifier}" resumption ${n} not aligned with ${s} fragment bounds (${h.start}-${h.end} sn: ${h.sn} cc: ${h.cc})`),!0)})}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let n=0,r=!1,i=!1;for(let s=0;s<e.assetList.length;s++){const u=e.assetList[s],p=t+n;u.startOffset=n,u.timelineStart=p,r||(r=u.duration===null),i||(i=!!u.error);const h=u.error?0:u.duration||0;n+=h}r&&!i?e.duration=Math.max(n,e.duration):e.duration=n}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function Fa(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class Uc{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=Du(n,this.hls.sessionId,e.baseUrl)}catch(k){const V=this.assignAssetListError(e,F.ASSET_LIST_LOAD_ERROR,k,n);this.hls.trigger(g.ERROR,V);return}t&&r.protocol!=="data:"&&r.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,u=new s(i),p={responseType:"json",url:r.href},h=i.interstitialAssetListLoadPolicy.default,v={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},_={onSuccess:(k,V,G,we)=>{const Se=k.data,Je=Se==null?void 0:Se.ASSETS;if(!Array.isArray(Je)){const ot=this.assignAssetListError(e,F.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),G.url,V,we);this.hls.trigger(g.ERROR,ot);return}e.assetListResponse=Se,this.hls.trigger(g.ASSET_LIST_LOADED,{event:e,assetListResponse:Se,networkDetails:we})},onError:(k,V,G,we)=>{const Se=this.assignAssetListError(e,F.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${k.code} ${k.text} (${V.url})`),V.url,we,G);this.hls.trigger(g.ERROR,Se)},onTimeout:(k,V,G)=>{const we=this.assignAssetListError(e,F.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${V.url})`),V.url,k,G);this.hls.trigger(g.ERROR,we)}};return u.load(p,v,_),this.hls.trigger(g.ASSET_LIST_LOADING,{event:e}),u}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:ie.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:s,stats:i}}}function Ou(a){var e;a==null||(e=a.play())==null||e.catch(()=>{})}function Zl(a,e){return`[${a}] Advancing timeline position to ${e}`}class Kc extends j{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled||!this.schedule)return;const r=n-this.timelinePos;if(Math.abs(r)<1/7056e5)return;const s=r<=-.01;this.timelinePos=n,this.bufferedPos=n;const u=this.playingItem;if(!u){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(n,n-r)&&this.updateSchedule(!0),this.checkBuffer(),s&&n<u.start||n>=u.end){var p;const V=this.findItemIndex(u);let G=this.schedule.findItemIndexAtTime(n);if(G===-1&&(G=V+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${n} (resolving from ${V} to ${G})`)),!this.isInterstitial(u)&&(p=this.media)!=null&&p.paused&&(this.shouldPlay=!1),!s&&G>V){const we=this.schedule.findJumpRestrictedIndex(V+1,G);if(we>V){this.setSchedulePosition(we);return}}this.setSchedulePosition(G);return}const h=this.playingAsset;if(!h){if(this.playingLastItem&&this.isInterstitial(u)){const V=u.event.assetList[0];V&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,V))}return}const v=h.timelineStart,_=h.duration||0;if(s&&n<v||n>=v+_){var k;(k=u.event)!=null&&k.appendInPlace&&(this.clearAssetPlayers(u.event,u),this.flushFrontBuffer(n)),this.setScheduleToAssetAtTime(n,h)}},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 u=this.findItemIndex(r);this.setSchedulePosition(u+1)}const i=this.playingAsset;if(!i)return;const s=i.timelineStart+(i.duration||0);n>=s&&this.setScheduleToAssetAtTime(n,i)},this.onScheduleUpdate=(n,r)=>{const i=this.schedule;if(!i)return;const s=this.playingItem,u=i.events||[],p=i.items||[],h=i.durations,v=n.map(we=>we.identifier),_=!!(u.length||v.length);(_||r)&&this.log(`INTERSTITIALS_UPDATED (${u.length}): ${u}
Schedule: ${p.map(we=>Fa(we))} pos: ${this.timelinePos}`),v.length&&this.log(`Removed events ${v}`);let k=null,V=null;s&&(k=this.updateItem(s,this.timelinePos),this.itemsMatch(s,k)?this.playingItem=k:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const G=this.bufferingItem;if(G&&(V=this.updateItem(G,this.bufferedPos),this.itemsMatch(G,V)?this.bufferingItem=V:G.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(G.event,null))),n.forEach(we=>{we.assetList.forEach(Se=>{this.clearAssetPlayer(Se.identifier,null)})}),this.playerQueue.forEach(we=>{if(we.interstitial.appendInPlace){const Se=we.assetItem.timelineStart,Je=we.timelineOffset-Se;if(Je)try{we.timelineOffset=Se}catch(ot){Math.abs(Je)>el&&this.warn(`${ot} ("${we.assetId}" ${we.timelineOffset}->${Se})`)}}}),_||r){if(this.hls.trigger(g.INTERSTITIALS_UPDATED,{events:u.slice(0),schedule:p.slice(0),durations:h,removedIds:v}),this.isInterstitial(s)&&v.includes(s.event.identifier)){this.warn(`Interstitial "${s.event.identifier}" removed while playing`),this.primaryFallback(s.event);return}s&&this.trimInPlace(k,s),G&&V!==k&&this.trimInPlace(V,G),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Uc(e),this.schedule=new zc(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(g.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(g.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(g.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(g.MEDIA_ENDED,this.onMediaEnded,this),e.on(g.ERROR,this.onError,this),e.on(g.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(g.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(g.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(g.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.BUFFER_APPENDED,this.onBufferAppended,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(g.MEDIA_ENDED,this.onMediaEnded,this),e.off(g.ERROR,this.onError,this),e.off(g.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.schedule=this.manager=null,this.hls=this.HlsPlayerClass=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){Ws(e,"play",this.onPlay),Ws(e,"pause",this.onPause),Ws(e,"seeking",this.onSeeking),Ws(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;Bs(n,"seeking",this.onSeeking),Bs(n,"timeupdate",this.onTimeupdate),Bs(n,"play",this.onPlay),Bs(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,n===null)this.checkStart();else if(!r){this.clearScheduleState();const i=this.findItemIndex(n);this.setSchedulePosition(i)}}clearScheduleState(){this.log("clear schedule state"),this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(this.media=null,!n&&(r&&this.removeMediaListeners(r),this.detachedData)){const i=this.getBufferingPlayer();i&&(this.log(`Removing schedule state for detachedData and ${i}`),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,i.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.hls)return null;if(this.manager)return this.manager;const e=this,t=()=>e.bufferingItem||e.waitingItem,n=_=>_&&e.getAssetPlayer(_.identifier),r=(_,k,V,G,we)=>{if(_){let Se=_[k].start;const Je=_.event;if(Je){if(k==="playout"||Je.timelineOccupancy!==Kl.Point){const ot=n(V);(ot==null?void 0:ot.interstitial)===Je&&(Se+=ot.assetItem.startOffset+ot[we])}}else{const ot=G==="bufferedPos"?s():e[G];Se+=ot-_.start}return Se}return 0},i=(_,k)=>{var V;if(_!==0&&k!=="primary"&&(V=e.schedule)!=null&&V.length){var G;const we=e.schedule.findItemIndexAtTime(_),Se=(G=e.schedule.items)==null?void 0:G[we];if(Se){const Je=Se[k].start-Se.start;return _+Je}}return _},s=()=>{const _=e.bufferedPos;return _===Number.MAX_VALUE?u("primary"):Math.max(_,0)},u=_=>{var k,V;return(k=e.primaryDetails)!=null&&k.live?e.primaryDetails.edge:((V=e.schedule)==null?void 0:V.durations[_])||0},p=(_,k)=>{var V,G;const we=e.effectivePlayingItem;if(we!=null&&(V=we.event)!=null&&V.restrictions.skip||!e.schedule)return;e.log(`seek to ${_} "${k}"`);const Se=e.effectivePlayingItem,Je=e.schedule.findItemIndexAtTime(_,k),ot=(G=e.schedule.items)==null?void 0:G[Je],ft=e.getBufferingPlayer(),Pt=ft==null?void 0:ft.interstitial,Kt=Pt==null?void 0:Pt.appendInPlace,xn=Se&&e.itemsMatch(Se,ot);if(Se&&(Kt||xn)){const Ht=n(e.playingAsset),cn=(Ht==null?void 0:Ht.media)||e.primaryMedia;if(cn){const ln=k==="primary"?cn.currentTime:r(Se,k,e.playingAsset,"timelinePos","currentTime"),Yt=_-ln,kn=(Kt?ln:cn.currentTime)+Yt;if(kn>=0&&(!Ht||Kt||kn<=Ht.duration)){cn.currentTime=kn;return}}}if(ot){let Ht=_;if(k!=="primary"){const ln=ot[k].start,Yt=_-ln;Ht=ot.start+Yt}const cn=!e.isInterstitial(ot);if((!e.isInterstitial(Se)||Se.event.appendInPlace)&&(cn||ot.event.appendInPlace)){const ln=e.media||(Kt?ft==null?void 0:ft.media:null);ln&&(ln.currentTime=Ht)}else if(Se){const ln=e.findItemIndex(Se);if(Je>ln){const kn=e.schedule.findJumpRestrictedIndex(ln+1,Je);if(kn>ln){e.setSchedulePosition(kn);return}}let Yt=0;if(cn)e.timelinePos=Ht,e.checkBuffer();else{const kn=ot.event.assetList,pr=_-(ot[k]||ot).start;for(let kr=kn.length;kr--;){const Wr=kn[kr];if(Wr.duration&&pr>=Wr.startOffset&&pr<Wr.startOffset+Wr.duration){Yt=kr;break}}}e.setSchedulePosition(Je,Yt)}}},h=()=>{const _=e.effectivePlayingItem;if(e.isInterstitial(_))return _;const k=t();return e.isInterstitial(k)?k:null},v={get bufferedEnd(){const _=t(),k=e.bufferingItem;if(k&&k===_){var V;return r(k,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-k.playout.start||((V=e.bufferingAsset)==null?void 0:V.startOffset)||0}return 0},get currentTime(){const _=h(),k=e.effectivePlayingItem;return k&&k===_?r(k,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-k.playout.start:0},set currentTime(_){const k=h(),V=e.effectivePlayingItem;V&&V===k&&p(_+V.playout.start,"playout")},get duration(){const _=h();return _?_.playout.end-_.playout.start:0},get assetPlayers(){var _;const k=(_=h())==null?void 0:_.event.assetList;return k?k.map(V=>e.getAssetPlayer(V.identifier)):[]},get playingIndex(){var _;const k=(_=h())==null?void 0:_.event;return k&&e.effectivePlayingAsset?k.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return h()}};return this.manager={get events(){var _;return((_=e.schedule)==null||(_=_.events)==null?void 0:_.slice(0))||[]},get schedule(){var _;return((_=e.schedule)==null||(_=_.items)==null?void 0:_.slice(0))||[]},get interstitialPlayer(){return h()?v:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const _=t();return e.findItemIndex(_)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const _=e.effectivePlayingItem;return e.findItemIndex(_)},primary:{get bufferedEnd(){return s()},get currentTime(){const _=e.timelinePos;return _>0?_:0},set currentTime(_){p(_,"primary")},get duration(){return u("primary")},get seekableStart(){var _;return((_=e.primaryDetails)==null?void 0:_.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(_){p(_,"integrated")},get duration(){return u("integrated")},get seekableStart(){var _;return i(((_=e.primaryDetails)==null?void 0:_.fragmentStart)||0,"integrated")}},skip:()=>{const _=e.effectivePlayingItem,k=_==null?void 0:_.event;if(k&&!k.restrictions.skip){const V=e.findItemIndex(_);if(k.appendInPlace){const G=_.playout.start+_.event.duration;p(G+.001,"playout")}else e.advanceAfterAssetEnded(k,V,1/0)}}}}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,n=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!n?!1:this.findItemIndex(t)===n.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t;if(this.mediaSelection===null)return;const n=this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&!n.event.appendInPlace)return;let r=this.media;!r&&(e=this.bufferingItem)!=null&&(e=e.event)!=null&&e.appendInPlace&&(r=this.primaryMedia);const i=(t=r)==null?void 0:t.currentTime;if(!(i===void 0||!c(i)))return i}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const n=this.getAssetPlayer(e);n&&this.transferMediaFromPlayer(n,t)}transferMediaFromPlayer(e,t){const n=e.interstitial.appendInPlace,r=e.media;if(n&&r===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&r){this.detachedData={media:r};return}const i=e.transferMedia();this.log(`transfer MediaSource from ${e} ${Ct(i)}`),this.detachedData=i}else t&&r&&(this.shouldPlay||(this.shouldPlay=!r.paused))}transferMediaTo(e,t){var n,r;if(e.media===t)return;let i=null;const s=this.hls,u=e!==s,p=u&&e.interstitial.appendInPlace,h=(n=this.detachedData)==null?void 0:n.mediaSource;let v;if(s.media)p&&(i=s.transferMedia(),this.detachedData=i),v="Primary";else if(h){const G=this.getBufferingPlayer();G?(i=G.transferMedia(),v=`${G}`):v="detached MediaSource"}else v="detached media";if(!i){if(h)i=this.detachedData,this.log(`using detachedData: MediaSource ${Ct(i)}`);else if(!this.detachedData||s.media===t){const G=this.playerQueue;G.length>1&&G.forEach(we=>{if(u&&we.interstitial.appendInPlace!==p){const Se=we.interstitial;this.clearInterstitial(we.interstitial,null),Se.appendInPlace=!1,Se.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${Se}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const _=i&&"mediaSource"in i&&((r=i.mediaSource)==null?void 0:r.readyState)!=="closed",k=_&&i?i:t;this.log(`${_?"transfering MediaSource":"attaching media"} to ${u?e:"Primary"} from ${v} (media.currentTime: ${t.currentTime})`);const V=this.schedule;if(k===i&&V){const G=u&&e.assetId===V.assetIdAtEnd;k.overrides={duration:V.duration,endOfStream:!u||G,cueRemoval:!u}}e.attachMedia(k)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e==null?void 0:e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const n=this.timelinePos,r=this.effectivePlayingItem;if(n===-1){const i=this.hls.startPosition;if(this.log(Zl("checkStart",i)),this.timelinePos=i,t.length&&t[0].cue.pre){const s=e.findEventIndex(t[0].identifier);this.setSchedulePosition(s)}else if(i>=0||!this.primaryLive){const s=this.timelinePos=i>0?i:0,u=e.findItemIndexAtTime(s);this.setSchedulePosition(u)}}else if(r&&!this.playingItem){const i=e.findItemIndex(r);this.setSchedulePosition(i)}}advanceAssetBuffering(e,t){const n=e.event,r=n.findAssetIndex(t),i=iu(n,r);if(!n.isAssetPastPlayoutLimit(i))this.bufferedToEvent(e,i);else if(this.schedule){var s;const u=(s=this.schedule.items)==null?void 0:s[this.findItemIndex(e)+1];u&&this.bufferedToItem(u)}}advanceAfterAssetEnded(e,t,n){const r=iu(e,n);if(e.isAssetPastPlayoutLimit(r)){if(this.schedule){const i=this.schedule.items;if(i){const s=t+1,u=i.length;if(s>=u){this.setSchedulePosition(-1);return}const p=e.resumeTime;this.timelinePos<p&&(this.log(Zl("advanceAfterAssetEnded",p)),this.timelinePos=p,e.appendInPlace&&this.advanceInPlace(p),this.checkBuffer(this.bufferedPos<p)),this.setSchedulePosition(s)}}}else{if(e.appendInPlace){const i=e.assetList[r];i&&this.advanceInPlace(i.timelineStart)}this.setSchedulePosition(t,r)}}setScheduleToAssetAtTime(e,t){const n=this.schedule;if(!n)return;const r=t.parentIdentifier,i=n.getEvent(r);if(i){const s=n.findEventIndex(r),u=n.findAssetIndex(i,e);this.advanceAfterAssetEnded(i,s,u-1)}}setSchedulePosition(e,t){var n;const r=(n=this.schedule)==null?void 0:n.items;if(!r||this.playbackDisabled)return;const i=e>=0?r[e]:null;this.log(`setSchedulePosition ${e}, ${t} (${i&&Fa(i)}) pos: ${this.timelinePos}`);const s=this.waitingItem||this.playingItem,u=this.playingLastItem;if(this.isInterstitial(s)){const v=s.event,_=this.playingAsset,k=_==null?void 0:_.identifier,V=k?this.getAssetPlayer(k):null;if(V&&k&&(!this.eventItemsMatch(s,i)||t!==void 0&&k!==v.assetList[t].identifier)){var p;const G=v.findAssetIndex(_);if(this.log(`INTERSTITIAL_ASSET_ENDED ${G+1}/${v.assetList.length} ${tl(_)}`),this.endedAsset=_,this.playingAsset=null,this.hls.trigger(g.INTERSTITIAL_ASSET_ENDED,{asset:_,assetListIndex:G,event:v,schedule:r.slice(0),scheduleIndex:e,player:V}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(v,this.findItemIndex(this.playingItem),G);return}this.retreiveMediaSource(k,i),V.media&&!((p=this.detachedData)!=null&&p.mediaSource)&&V.detachMedia()}if(!this.eventItemsMatch(s,i)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${v} ${Fa(s)}`),v.hasPlayed=!0,this.hls.trigger(g.INTERSTITIAL_ENDED,{event:v,schedule:r.slice(0),scheduleIndex:e}),v.cue.once)){var h;this.updateSchedule();const G=(h=this.schedule)==null?void 0:h.items;if(i&&G){const we=this.findItemIndex(i);this.advanceSchedule(we,G,t,s,u)}return}}this.advanceSchedule(e,r,t,s,u)}advanceSchedule(e,t,n,r,i){const s=this.schedule;if(!s)return;const u=t[e]||null,p=this.primaryMedia,h=this.playerQueue;if(h.length&&h.forEach(v=>{const _=v.interstitial,k=s.findEventIndex(_.identifier);(k<e||k>e+1)&&this.clearInterstitial(_,u)}),this.isInterstitial(u)){this.timelinePos=Math.min(Math.max(this.timelinePos,u.start),u.end);const v=u.event;if(n===void 0){n=s.findAssetIndex(v,this.timelinePos);const G=iu(v,n-1);if(v.isAssetPastPlayoutLimit(G)||v.appendInPlace&&this.timelinePos===u.end){this.advanceAfterAssetEnded(v,e,n);return}n=G}const _=this.waitingItem;this.assetsBuffered(u,p)||this.setBufferingItem(u);let k=this.preloadAssets(v,n);if(this.eventItemsMatch(u,_||r)||(this.waitingItem=u,this.log(`INTERSTITIAL_STARTED ${Fa(u)} ${v.appendInPlace?"append in place":""}`),this.hls.trigger(g.INTERSTITIAL_STARTED,{event:v,schedule:t.slice(0),scheduleIndex:e})),!v.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${v}`);return}if(v.assetListLoader&&(v.assetListLoader.destroy(),v.assetListLoader=void 0),!p){this.log(`Waiting for attachMedia to start Interstitial ${v}`);return}this.waitingItem=this.endedItem=null,this.playingItem=u;const V=v.assetList[n];if(!V){this.advanceAfterAssetEnded(v,e,n||0);return}if(k||(k=this.getAssetPlayer(V.identifier)),k===null||k.destroyed){const G=v.assetList.length;this.warn(`asset ${n+1}/${G} player destroyed ${v}`),k=this.createAssetPlayer(v,V,n),k.loadSource()}if(!this.eventItemsMatch(u,this.bufferingItem)&&v.appendInPlace&&this.isAssetBuffered(V))return;this.startAssetPlayer(k,n,t,e,p),this.shouldPlay&&Ou(k.media)}else u?(this.resumePrimary(u,e,r),this.shouldPlay&&Ou(this.hls.media)):i&&this.isInterstitial(r)&&(this.endedItem=null,this.playingItem=r,r.event.appendInPlace||this.attachPrimary(s.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e;return(e=this.mediaSelection)==null?void 0:e.main.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,n){var r,i;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${Fa(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let u=this.timelinePos;(u<e.start||u>=e.end)&&(u=this.getPrimaryResumption(e,t),this.log(Zl("resumePrimary",u)),this.timelinePos=u),this.attachPrimary(u,e)}if(!n)return;const s=(i=this.schedule)==null?void 0:i.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${Fa(e)}`),this.hls.trigger(g.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const n=e.start;if(this.primaryLive){const r=this.primaryDetails;if(t===0)return this.hls.startPosition;if(r&&(n<r.fragmentStart||n>r.edge))return this.hls.liveSyncPosition||-1}return n}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:zn.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,n){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const r=this.primaryMedia;if(!r)return;const i=this.hls;i.media?this.checkBuffer():(this.transferMediaTo(i,r),n&&this.startLoadingPrimaryAt(e,n)),n||(this.log(Zl("attachPrimary",e)),this.timelinePos=e,this.startLoadingPrimaryAt(e,n))}startLoadingPrimaryAt(e,t){var n;const r=this.hls;!r.loadingEnabled||!r.media||Math.abs((((n=r.mainForwardBufferInfo)==null?void 0:n.start)||r.media.currentTime)-e)>.5?r.startLoad(e,t):r.bufferingEnabled||r.resumeBuffering()}onManifestLoading(){var e;this.stopLoad(),(e=this.schedule)==null||e.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(g.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(g.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1||!this.schedule)return;const n=this.hls.levels[t.level];if(!n.details)return;const r=T(T({},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=T(T({},this.altSelection),{},{audio:n});return}const i=T(T({},r),{},{audio:n});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=T(T({},this.altSelection),{},{subtitles:n});return}const i=T(T({},r),{},{subtitles:n});this.mediaSelection=i}onAudioTrackSwitching(e,t){const n=nn(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setAudioOption(t)||r.setAudioOption(n)))}onSubtitleTrackSwitch(e,t){const n=nn(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setSubtitleOption(t)||t.id!==-1&&r.setSubtitleOption(n)))}onBufferCodecs(e,t){const n=t.tracks;n&&(this.requiredTracks=n)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const n=this.playingItem;if(n&&!this.itemsMatch(n,this.bufferingItem)&&!this.isInterstitial(n)){const r=this.timelinePos;this.bufferedPos=r,this.checkBuffer()}}onBufferedToEnd(e){if(!this.schedule)return;const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let r=0;r<t.length;r++){const i=t[r];if(i.cue.post){var n;const s=this.schedule.findEventIndex(i.identifier),u=(n=this.schedule.items)==null?void 0:n[s];this.isInterstitial(u)&&this.eventItemsMatch(u,this.bufferingItem)&&this.bufferedToItem(u,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const n=this.findItemIndex(t);this.setSchedulePosition(n+1)}else this.shouldPlay=!1}updateItem(e,t){var n;const r=(n=this.schedule)==null?void 0:n.items;if(e&&r){const i=this.findItemIndex(e,t);return r[i]||null}return null}trimInPlace(e,t){if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach((i,s)=>{e.event.isAssetPastPlayoutLimit(s)&&this.clearAssetPlayer(i.identifier,null)});const n=e.end+.25,r=zn.bufferInfo(this.primaryMedia,n,0);(r.end>n||(r.nextStart||0)>n)&&(this.log(`trim buffered interstitial ${Fa(e)} (was ${Fa(t)})`),this.attachPrimary(n,null,!0),this.flushFrontBuffer(n))}}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var n;return!!t&&(e===t||e.event.identifier===((n=t.event)==null?void 0:n.identifier))}findItemIndex(e,t){return e&&this.schedule?this.schedule.findItemIndex(e,t):-1}updateSchedule(e=!1){var t;const n=this.mediaSelection;n&&((t=this.schedule)==null||t.updateSchedule(n,[],e))}checkBuffer(e){var t;const n=(t=this.schedule)==null?void 0:t.items;if(!n)return;const r=zn.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=r.len<1),this.updateBufferedPos(r.end,n,e)}updateBufferedPos(e,t,n){const r=this.schedule,i=this.bufferingItem;if(this.bufferedPos>e||!r)return;if(t.length===1&&this.itemsMatch(t[0],i)){this.bufferedPos=e;return}const s=this.playingItem,u=this.findItemIndex(s);let p=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var h;const v=this.findItemIndex(i),_=Math.min(v+1,t.length-1),k=t[_];if((p===-1&&i&&e>=i.end||(h=k.event)!=null&&h.appendInPlace&&e+.01>=k.start)&&(p=_),this.isInterstitial(i)){const V=i.event;if(_-u>1&&V.appendInPlace===!1||V.assetList.length===0&&V.assetListLoader)return}if(this.bufferedPos=e,p>v&&p>u)this.bufferedToItem(k);else{const V=this.primaryDetails;this.primaryLive&&V&&e>V.edge-V.targetduration&&k.start<V.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(k)&&this.preloadAssets(k.event,0)}}else n&&s&&!this.itemsMatch(s,i)&&(p===u?this.bufferedToItem(s):p===u+1&&this.bufferedToItem(t[p]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(r=>{const i=this.getAssetPlayer(r.identifier);return!(i!=null&&i.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,n=this.schedule;if(!this.itemsMatch(e,t)&&n){const{items:r,events:i}=n;if(!r||!i)return t;const s=this.isInterstitial(e),u=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const p=u?u.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${Fa(e)}`+(t?` (${p.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const h=n.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((v,_)=>{const k=this.getAssetPlayer(v.identifier);k&&(_===h&&k.loadSource(),k.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(h=>h.pauseBuffering());this.hls.trigger(g.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:i.slice(0),schedule:r.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}else this.bufferingItem!==e&&(this.bufferingItem=e);return t}bufferedToItem(e,t=0){const n=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(n!==null){this.bufferingAsset=null;const r=this.detachedData;r?r.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),n=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(n)}bufferedToEvent(e,t){const n=e.event,r=n.assetList.length===0&&!n.assetListLoader,i=n.cue.once;if(r||!i){const s=this.preloadAssets(n,t);if(s!=null&&s.interstitial.appendInPlace){const u=this.primaryMedia;u&&this.bufferAssetPlayer(s,u)}}}preloadAssets(e,t){const n=e.assetUrl,r=e.assetList.length,i=r===0&&!e.assetListLoader,s=e.cue.once;if(i){const p=e.timelineStart;if(e.appendInPlace){var u;const k=this.playingItem;!this.isInterstitial(k)&&(k==null||(u=k.nextEvent)==null?void 0:u.identifier)===e.identifier&&this.flushFrontBuffer(p+.25)}let h,v=0;if(!this.playingItem&&this.primaryLive&&(v=this.hls.startPosition,v===-1&&(v=this.hls.liveSyncPosition||0)),v&&!(e.cue.pre||e.cue.post)){const k=v-p;k>0&&(h=Math.round(k*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${h?` live-start: ${v} start-offset: ${h}`:""}`),n)return this.createAsset(e,0,0,p,e.duration,n);const _=this.assetListLoader.loadAssetList(e,h);_&&(e.assetListLoader=_)}else if(!s&&r){for(let h=t;h<r;h++){const v=e.assetList[h],_=this.getAssetPlayerQueueIndex(v.identifier);(_===-1||this.playerQueue[_].destroyed)&&!v.error&&this.createAssetPlayer(e,v,h)}const p=e.assetList[t];if(p){const h=this.getAssetPlayer(p.identifier);return h&&h.loadSource(),h}}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(r=>{this.hls.trigger(g.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:r})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let n=0;n<t.length;n++)if(e===t[n].assetId)return n;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let n=0;n<e.length;n++)if(e[n].media===t)return e[n]}return null}createAsset(e,t,n,r,i,s){const u={parentIdentifier:e.identifier,identifier:Nc(e,s,t),duration:i,startOffset:n,timelineStart:r,uri:s};return this.createAssetPlayer(e,u,t)}createAssetPlayer(e,t,n){const r=this.hls,i=r.userConfig;let s=i.videoPreference;const u=r.loadLevelObj||r.levels[r.currentLevel];(s||u)&&(s=b({},s),u.videoCodec&&(s.videoCodec=u.videoCodec),u.videoRange&&(s.allowedVideoRanges=[u.videoRange]));const p=r.audioTracks[r.audioTrack],h=r.subtitleTracks[r.subtitleTrack];let v=0;if(this.primaryLive||e.appendInPlace){const Pt=this.timelinePos-t.timelineStart;if(Pt>1){const Kt=t.duration;Kt&&Pt<Kt&&(v=Pt)}}const _=t.identifier,k=T(T({},i),{},{maxMaxBufferLength:Math.min(180,r.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:_,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:v,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:p||i.audioPreference,subtitlePreference:h||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(k.timelineOffset=t.timelineStart));const V=k.cmcd;V!=null&&V.sessionId&&V.contentId&&(k.cmcd=b({},V,{contentId:_l(t.uri)})),this.getAssetPlayer(_)&&this.warn(`Duplicate date range identifier ${e} and asset ${_}`);const G=new Fc(this.HlsPlayerClass,k,e,t);this.playerQueue.push(G),e.assetList[n]=t;let we=!0;const Se=Pt=>{if(Pt.live){var Kt;const cn=new Error(`Interstitials MUST be VOD assets ${e}`),ln={fatal:!0,type:ie.OTHER_ERROR,details:F.INTERSTITIAL_ASSET_ITEM_ERROR,error:cn},Yt=((Kt=this.schedule)==null?void 0:Kt.findEventIndex(e.identifier))||-1;this.handleAssetItemError(ln,e,Yt,n,cn.message);return}const xn=Pt.edge-Pt.fragmentStart,Ht=t.duration;(we||Ht===null||xn>Ht)&&(we=!1,this.log(`Interstitial asset "${_}" duration change ${Ht} > ${xn}`),t.duration=xn,this.updateSchedule())};G.on(g.LEVEL_UPDATED,(Pt,{details:Kt})=>Se(Kt)),G.on(g.LEVEL_PTS_UPDATED,(Pt,{details:Kt})=>Se(Kt)),G.on(g.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const Je=(Pt,Kt)=>{const xn=this.getAssetPlayer(_);if(xn&&Kt.tracks){xn.off(g.BUFFER_CODECS,Je),xn.tracks=Kt.tracks;const Ht=this.primaryMedia;this.bufferingAsset===xn.assetItem&&Ht&&!xn.media&&this.bufferAssetPlayer(xn,Ht)}};G.on(g.BUFFER_CODECS,Je);const ot=()=>{var Pt;const Kt=this.getAssetPlayer(_);if(this.log(`buffered to end of asset ${Kt}`),!Kt||!this.schedule)return;const xn=this.schedule.findEventIndex(e.identifier),Ht=(Pt=this.schedule.items)==null?void 0:Pt[xn];this.isInterstitial(Ht)&&this.advanceAssetBuffering(Ht,t)};G.on(g.BUFFERED_TO_END,ot);const ft=Pt=>()=>{if(!this.getAssetPlayer(_)||!this.schedule)return;this.shouldPlay=!0;const xn=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,xn,Pt)};return G.once(g.MEDIA_ENDED,ft(n)),G.once(g.PLAYOUT_LIMIT_REACHED,ft(1/0)),G.on(g.ERROR,(Pt,Kt)=>{if(!this.schedule)return;const xn=this.getAssetPlayer(_);if(Kt.details===F.BUFFER_STALLED_ERROR){if(xn!=null&&xn.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(Kt,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${Kt.error} ${e}`)}),G.on(g.DESTROYING,()=>{if(!this.getAssetPlayer(_)||!this.schedule)return;const Kt=new Error(`Asset player destroyed unexpectedly ${_}`),xn={fatal:!0,type:ie.OTHER_ERROR,details:F.INTERSTITIAL_ASSET_ITEM_ERROR,error:Kt};this.handleAssetItemError(xn,e,this.schedule.findEventIndex(e.identifier),n,Kt.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${tl(t)}`),this.hls.trigger(g.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:G}),G}clearInterstitial(e,t){this.clearAssetPlayers(e,t),e.reset()}clearAssetPlayers(e,t){e.assetList.forEach(n=>{this.clearAssetPlayer(n.identifier,t)})}resetAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);if(t!==-1){this.log(`reset asset player "${e}" after error`);const n=this.playerQueue[t];this.transferMediaFromPlayer(n,null),n.resetDetails()}}clearAssetPlayer(e,t){const n=this.getAssetPlayerQueueIndex(e);if(n!==-1){const r=this.playerQueue[n];this.log(`clear ${r} toSegment: ${t&&Fa(t)}`),this.transferMediaFromPlayer(r,t),this.playerQueue.splice(n,1),r.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,n,r,i){const{interstitial:s,assetItem:u,assetId:p}=e,h=s.assetList.length,v=this.playingAsset;this.endedAsset=null,this.playingAsset=u,(!v||v.identifier!==p)&&(v&&(this.clearAssetPlayer(v.identifier,n[r]),delete v.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${h} ${tl(u)}`),this.hls.trigger(g.INTERSTITIAL_ASSET_STARTED,{asset:u,assetListIndex:t,event:s,schedule:n.slice(0),scheduleIndex:r,player:e})),this.bufferAssetPlayer(e,i)}bufferAssetPlayer(e,t){var n,r;if(!this.schedule)return;const{interstitial:i,assetItem:s}=e,u=this.schedule.findEventIndex(i.identifier),p=(n=this.schedule.items)==null?void 0:n[u];if(!p)return;e.loadSource(),this.setBufferingItem(p),this.bufferingAsset=s;const h=this.getBufferingPlayer();if(h===e)return;const v=i.appendInPlace;if(v&&(h==null?void 0:h.interstitial.appendInPlace)===!1)return;const _=(h==null?void 0:h.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(v&&s!==this.playingAsset){if(!e.tracks){this.log(`Waiting for track info before buffering ${e}`);return}if(_&&!Ce(_,e.tracks)){const k=new Error(`Asset ${tl(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(_)}')`),V={fatal:!0,type:ie.OTHER_ERROR,details:F.INTERSTITIAL_ASSET_ITEM_ERROR,error:k},G=i.findAssetIndex(s);this.handleAssetItemError(V,i,u,G,k.message);return}}this.transferMediaTo(e,t)}handleInPlaceStall(e){const t=this.schedule,n=this.primaryMedia;if(!t||!n)return;const r=n.currentTime,i=t.findAssetIndex(e,r),s=e.assetList[i];if(s){const u=this.getAssetPlayer(s.identifier);if(u){const p=u.currentTime||r-s.timelineStart,h=u.duration-p;if(this.warn(`Stalled at ${p} of ${p+h} in ${u} ${e} (media.currentTime: ${r})`),p&&(h/n.playbackRate<.5||u.bufferedInPlaceToEnd(n))&&u.hls){const v=t.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,v,i)}}}}advanceInPlace(e){const t=this.primaryMedia;t&&t.currentTime<e&&(t.currentTime=e)}handleAssetItemError(e,t,n,r,i){if(e.details===F.BUFFER_STALLED_ERROR)return;const s=t.assetList[r]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&tl(s)} ${e.error}`),!this.schedule)return;const u=(s==null?void 0:s.identifier)||"",p=this.getAssetPlayerQueueIndex(u),h=this.playerQueue[p]||null,v=this.schedule.items,_=b({},e,{fatal:!1,errorAction:sn(!0),asset:s,assetListIndex:r,event:t,schedule:v,scheduleIndex:n,player:h});if(this.hls.trigger(g.INTERSTITIAL_ASSET_ERROR,_),!e.fatal)return;const k=this.playingAsset,V=this.bufferingAsset,G=new Error(i);if(s&&(this.clearAssetPlayer(u,null),s.error=G),!t.assetList.some(we=>!we.error))t.error=G;else for(let we=r;we<t.assetList.length;we++)this.resetAssetPlayer(t.assetList[we].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):k&&k.identifier===u?this.advanceAfterAssetEnded(t,n,r):V&&V.identifier===u&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,V)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;let r=this.timelinePos;if(n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${r} playing: ${Fa(n)} error: ${e.error}`),r===-1&&(r=this.hls.startPosition);const s=this.updateItem(n,r);this.itemsMatch(n,s)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t))}else if(r===-1){this.checkStart();return}if(!this.schedule)return;const i=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(i)}onAssetListLoaded(e,t){var n,r;const i=t.event,s=i.identifier,u=t.assetListResponse.ASSETS;if(!((n=this.schedule)!=null&&n.hasEvent(s)))return;const p=i.timelineStart,h=i.duration;let v=0;u.forEach((we,Se)=>{const Je=parseFloat(we.DURATION);this.createAsset(i,Se,v,p+v,Je,we.URI),v+=Je}),i.duration=v,this.log(`Loaded asset-list with duration: ${v} (was: ${h}) ${i}`);const _=this.waitingItem,k=(_==null?void 0:_.event.identifier)===s;this.updateSchedule();const V=(r=this.bufferingItem)==null?void 0:r.event;if(k){var G;const we=this.schedule.findEventIndex(s),Se=(G=this.schedule.items)==null?void 0:G[we];if(Se){if(!this.playingItem&&this.timelinePos>Se.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==we){i.error=new Error(`Interstitial ${u.length?"no longer within playback range":"asset-list is empty"} ${this.timelinePos} ${i}`),this.log(i.error.message),this.updateSchedule(!0),this.primaryFallback(i);return}this.setBufferingItem(Se)}this.setSchedulePosition(we)}else if((V==null?void 0:V.identifier)===s){const we=i.assetList[0];if(we){const Se=this.getAssetPlayer(we.identifier);if(V.appendInPlace){const Je=this.primaryMedia;Se&&Je&&this.bufferAssetPlayer(Se,Je)}else Se&&Se.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case F.ASSET_LIST_PARSING_ERROR:case F.ASSET_LIST_LOAD_ERROR:case F.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&(this.updateSchedule(!0),this.primaryFallback(n));break}case F.BUFFER_STALLED_ERROR:{const n=this.endedItem||this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&n.event.appendInPlace){this.handleInPlaceStall(n.event);return}this.log(`Primary player stall @${this.timelinePos} bufferedPos: ${this.bufferedPos}`),this.onTimeupdate(),this.checkBuffer(!0);break}}}}const Lu=500;class Zc extends oo{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",X.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(g.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(g.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=In.IDLE,this.setInterval(Lu),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:n,success:r}=t;if(this.fragContextChanged(n)||(je(n)&&(this.fragPrevious=n),this.state=In.IDLE),!r)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const u=n.start;for(let h=0;h<i.length;h++)if(u>=i[h].start&&u<=i[h].end){s=i[h];break}const p=n.start+n.duration;s?s.end=p:(s={start:u,end:p},i.push(s)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:n,endOffset:r}=t;if(n===0&&r!==Number.POSITIVE_INFINITY){const i=r-1;if(i<=0)return;t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach(s=>{for(let u=0;u<s.length;){if(s[u].end<=i){s.shift();continue}else if(s[u].start<i)s[u].start=i;else break;u++}}),this.fragmentTracker.removeFragmentsInRange(n,i,X.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===X.SUBTITLE&&(t.details===F.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==In.STOPPED&&(this.state=In.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&Vs(this.levels,t)){this.levels=t.map(n=>new Wt(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new Wt(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,X.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!==In.STOPPED&&this.setInterval(Lu)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:i}=this,{details:s,id:u}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${u}`);return}const p=i[u];if(u>=i.length||!p)return;this.log(`Subtitle track ${u} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let h=0;if(s.live||(n=p.details)!=null&&n.live){if(s.deltaUpdateFailed)return;const _=this.mainDetails;if(!_){this.startFragRequested=!1;return}const k=_.fragments[0];if(!p.details)s.hasProgramDateTime&&_.hasProgramDateTime?(ao(s,_),h=s.fragmentStart):k&&(h=k.start,Va(s,h));else{var v;h=this.alignPlaylists(s,p.details,(v=this.levelLastLoaded)==null?void 0:v.details),h===0&&k&&(h=k.start,Va(s,h))}_&&!this.startFragRequested&&this.setStartPosition(_,h)}p.details=s,this.levelLastLoaded=p,u===r&&(this.hls.trigger(g.SUBTITLE_TRACK_UPDATED,{details:s,id:u,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===In.IDLE&&(nr(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),p.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,r=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&r!=null&&r.key&&r.iv&&yr(r.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,Or(r.method)).catch(u=>{throw i.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.FRAG_DECRYPT_ERROR,fatal:!1,error:u,reason:u.message,frag:t}),u}).then(u=>{const p=performance.now();i.trigger(g.FRAG_DECRYPTED,{frag:t,payload:u,stats:{tstart:s,tdecrypt:p}})}).catch(u=>{this.warn(`${u.name}: ${u.message}`),this.state=In.IDLE})}}doTick(){if(!this.media){this.state=In.IDLE;return}if(this.state===In.IDLE){const{currentTrackId:e,levels:t}=this,n=t==null?void 0:t[e];if(!n||!t.length||!n.details||this.waitForLive(n))return;const{config:r}=this,i=this.getLoadPosition(),s=zn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:u,len:p}=s,h=n.details,v=this.hls.maxBufferLength+h.levelTargetDuration;if(p>v)return;const _=h.fragments,k=_.length,V=h.edge;let G=null;const we=this.fragPrevious;if(u<V){const ot=r.maxFragLookUpTolerance,ft=u>V-ot?0:ot;G=nr(we,_,Math.max(_[0].start,u),ft),!G&&we&&we.start<_[0].start&&(G=_[0])}else G=_[k-1];if(G=this.filterReplacedPrimary(G,n.details),!G)return;const Se=G.sn-h.startSN,Je=_[Se-1];if(Je&&Je.cc===G.cc&&this.fragmentTracker.getState(Je)===Rn.NOT_LOADED&&(G=Je),this.fragmentTracker.getState(G)===Rn.NOT_LOADED){const ot=this.mapToInitFragWhenRequired(G);ot&&this.loadFragment(ot,n,u)}}}loadFragment(e,t,n){je(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new jc(this.tracksBuffered[this.currentTrackId]||[])}}class jc{constructor(e){this.buffered=void 0;const t=(n,r,i)=>{if(r=r>>>0,r>i-1)throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${r}) is greater than the maximum bound (${i})`);return e[r][n]};this.buffered={get length(){return e.length},end(n){return t("end",n,e.length)},start(n){return t("start",n,e.length)}}}}const Hc={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},Pu=a=>String.fromCharCode(Hc[a]||a),za=15,mo=100,Wc={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Vc={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Gc={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Yc={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Xc=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Qc{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;ce.log(`${this.time} [${e}] ${n}`)}}}const Po=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class Mu{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 Jc{constructor(){this.uchar=" ",this.penState=new Mu}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 qc{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Mu,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<mo;t++)this.chars.push(new Jc);this.logger=e}equals(e){for(let t=0;t<mo;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<mo;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<mo;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>mo&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=mo)}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=Pu(e);if(this.pos>=mo){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<mo;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<mo;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 su{constructor(e){this.rows=[],this.currRow=za-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<za;t++)this.rows.push(new qc(e));this.logger=e}reset(){for(let e=0;e<za;e++)this.rows[e].clear();this.currRow=za-1}equals(e){let t=!0;for(let n=0;n<za;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<za;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<za;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 = "+Ct(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let u=0;u<za;u++)this.rows[u].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const u=s.rows[i].cueStartTime,p=this.logger.time;if(u!==null&&p!==null&&u<p)for(let h=0;h<this.nrRollUpRows;h++)this.rows[t-this.nrRollUpRows+h+1].copy(s.rows[i+h])}}this.currRow=t;const n=this.rows[this.currRow];if(e.indent!==null){const i=e.indent,s=Math.max(i-1,0);n.setCursor(e.indent),e.color=n.chars[s].penState.foreground}const r={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(r)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+Ct(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let n="",r=-1;for(let i=0;i<za;i++){const s=this.rows[i].getTextString();s&&(r=i+1,e?t.push("Row "+r+": '"+s+"'"):t.push(s.trim()))}return t.length>0&&(e?n="["+t.join(" | ")+"]":n=t.join(`
`)),n}getTextAndFormat(){return this.rows}}class ku{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 su(n),this.nonDisplayedMemory=new su(n),this.lastOutputScreen=new su(n),this.currRollUpRow=this.displayedMemory.rows[za-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[za-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: "+Ct(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 Nu{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=td(),this.logger=void 0;const r=this.logger=new Qc;this.channels=[null,new ku(e,t,r),new ku(e+1,n,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let n=0;n<t.length;n+=2){const r=t[n]&127,i=t[n+1]&127;let s=!1,u=null;if(r===0&&i===0)continue;this.logger.log(3,()=>"["+Po([t[n],t[n+1]])+"] -> ("+Po([r,i])+")");const p=this.cmdHistory;if(r>=16&&r<=31){if(ed(r,i,p)){jl(null,null,p),this.logger.log(3,()=>"Repeated command ("+Po([r,i])+") is dropped");continue}jl(r,i,this.cmdHistory),s=this.parseCmd(r,i),s||(s=this.parseMidrow(r,i)),s||(s=this.parsePAC(r,i)),s||(s=this.parseBackgroundAttributes(r,i))}else jl(null,null,p);if(!s&&(u=this.parseChars(r,i),u)){const v=this.currentChannel;v&&v>0?this.channels[v].insertChars(u):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!u&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Po([r,i])+" orig: "+Po([t[n],t[n+1]]))}}parseCmd(e,t){const n=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=33&&t<=35;if(!(n||r))return!1;const i=e===20||e===21||e===23?1:2,s=this.channels[i];return e===20||e===21||e===28||e===29?t===32?s.ccRCL():t===33?s.ccBS():t===34?s.ccAOF():t===35?s.ccAON():t===36?s.ccDER():t===37?s.ccRU(2):t===38?s.ccRU(3):t===39?s.ccRU(4):t===40?s.ccFON():t===41?s.ccRDC():t===42?s.ccTR():t===43?s.ccRTD():t===44?s.ccEDM():t===45?s.ccCR():t===46?s.ccENM():t===47&&s.ccEOC():s.ccTO(t-32),this.currentChannel=i,!0}parseMidrow(e,t){let n=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?n=1:n=2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const r=this.channels[n];return r?(r.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+Po([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let n;const r=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,i=(e===16||e===24)&&t>=64&&t<=95;if(!(r||i))return!1;const s=e<=23?1:2;t>=64&&t<=95?n=s===1?Wc[e]:Gc[e]:n=s===1?Vc[e]:Yc[e];const u=this.channels[s];return u?(u.setPAC(this.interpretPAC(n,t)),this.currentChannel=s,!0):!1}interpretPAC(e,t){let n;const r={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?n=t-96:n=t-64,r.underline=(n&1)===1,n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=Math.floor((n-16)/2)*4,r}parseChars(e,t){let n,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),i>=17&&i<=19){let s;i===17?s=t+80:i===18?s=t+112:s=t+144,this.logger.log(2,()=>"Special char '"+Pu(s)+"' in channel "+n),r=[s]}else e>=32&&e<=127&&(r=t===0?[e]:[e,t]);return r&&this.logger.log(3,()=>"Char codes = "+Po(r).join(",")),r}parseBackgroundAttributes(e,t){const n=(e===16||e===24)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=45&&t<=47;if(!(n||r))return!1;let i;const s={};e===16||e===24?(i=Math.floor((t-32)/2),s.background=Xc[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const u=e<=23?1:2;return this.channels[u].setBkgData(s),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}jl(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 jl(a,e,t){t.a=a,t.b=e}function ed(a,e,t){return t.a===a&&t.b===e}function td(){return{a:null,b:null}}var au=function(){if(ei!=null&&ei.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(u,p){if(typeof p!="string"||!Array.isArray(u))return!1;const h=p.toLowerCase();return~u.indexOf(h)?h:!1}function n(u){return t(a,u)}function r(u){return t(e,u)}function i(u,...p){let h=1;for(;h<arguments.length;h++){const v=arguments[h];for(const _ in v)u[_]=v[_]}return u}function s(u,p,h){const v=this,_={enumerable:!0};v.hasBeenReset=!1;let k="",V=!1,G=u,we=p,Se=h,Je=null,ot="",ft=!0,Pt="auto",Kt="start",xn=50,Ht="middle",cn=50,ln="middle";Object.defineProperty(v,"id",i({},_,{get:function(){return k},set:function(Yt){k=""+Yt}})),Object.defineProperty(v,"pauseOnExit",i({},_,{get:function(){return V},set:function(Yt){V=!!Yt}})),Object.defineProperty(v,"startTime",i({},_,{get:function(){return G},set:function(Yt){if(typeof Yt!="number")throw new TypeError("Start time must be set to a number.");G=Yt,this.hasBeenReset=!0}})),Object.defineProperty(v,"endTime",i({},_,{get:function(){return we},set:function(Yt){if(typeof Yt!="number")throw new TypeError("End time must be set to a number.");we=Yt,this.hasBeenReset=!0}})),Object.defineProperty(v,"text",i({},_,{get:function(){return Se},set:function(Yt){Se=""+Yt,this.hasBeenReset=!0}})),Object.defineProperty(v,"region",i({},_,{get:function(){return Je},set:function(Yt){Je=Yt,this.hasBeenReset=!0}})),Object.defineProperty(v,"vertical",i({},_,{get:function(){return ot},set:function(Yt){const kn=n(Yt);if(kn===!1)throw new SyntaxError("An invalid or illegal string was specified.");ot=kn,this.hasBeenReset=!0}})),Object.defineProperty(v,"snapToLines",i({},_,{get:function(){return ft},set:function(Yt){ft=!!Yt,this.hasBeenReset=!0}})),Object.defineProperty(v,"line",i({},_,{get:function(){return Pt},set:function(Yt){if(typeof Yt!="number"&&Yt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");Pt=Yt,this.hasBeenReset=!0}})),Object.defineProperty(v,"lineAlign",i({},_,{get:function(){return Kt},set:function(Yt){const kn=r(Yt);if(!kn)throw new SyntaxError("An invalid or illegal string was specified.");Kt=kn,this.hasBeenReset=!0}})),Object.defineProperty(v,"position",i({},_,{get:function(){return xn},set:function(Yt){if(Yt<0||Yt>100)throw new Error("Position must be between 0 and 100.");xn=Yt,this.hasBeenReset=!0}})),Object.defineProperty(v,"positionAlign",i({},_,{get:function(){return Ht},set:function(Yt){const kn=r(Yt);if(!kn)throw new SyntaxError("An invalid or illegal string was specified.");Ht=kn,this.hasBeenReset=!0}})),Object.defineProperty(v,"size",i({},_,{get:function(){return cn},set:function(Yt){if(Yt<0||Yt>100)throw new Error("Size must be between 0 and 100.");cn=Yt,this.hasBeenReset=!0}})),Object.defineProperty(v,"align",i({},_,{get:function(){return ln},set:function(Yt){const kn=r(Yt);if(!kn)throw new SyntaxError("An invalid or illegal string was specified.");ln=kn,this.hasBeenReset=!0}})),v.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class nd{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Bu(a){function e(n,r,i,s){return(n|0)*3600+(r|0)*60+(i|0)+parseFloat(s||0)}const t=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}class rd{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 $u(a,e,t,n){const r=n?a.split(n):[a];for(const i in r){if(typeof r[i]!="string")continue;const s=r[i].split(t);if(s.length!==2)continue;const u=s[0],p=s[1];e(u,p)}}const ou=new au(0,0,""),Hl=ou.align==="middle"?"middle":"center";function id(a,e,t){const n=a;function r(){const u=Bu(a);if(u===null)throw new Error("Malformed timestamp: "+n);return a=a.replace(/^[^\sa-zA-Z-]+/,""),u}function i(u,p){const h=new rd;$u(u,function(k,V){let G;switch(k){case"region":for(let we=t.length-1;we>=0;we--)if(t[we].id===V){h.set(k,t[we].region);break}break;case"vertical":h.alt(k,V,["rl","lr"]);break;case"line":G=V.split(","),h.integer(k,G[0]),h.percent(k,G[0])&&h.set("snapToLines",!1),h.alt(k,G[0],["auto"]),G.length===2&&h.alt("lineAlign",G[1],["start",Hl,"end"]);break;case"position":G=V.split(","),h.percent(k,G[0]),G.length===2&&h.alt("positionAlign",G[1],["start",Hl,"end","line-left","line-right","auto"]);break;case"size":h.percent(k,V);break;case"align":h.alt(k,V,["start",Hl,"end","left","right"]);break}},/:/,/\s/),p.region=h.get("region",null),p.vertical=h.get("vertical","");let v=h.get("line","auto");v==="auto"&&ou.line===-1&&(v=-1),p.line=v,p.lineAlign=h.get("lineAlign","start"),p.snapToLines=h.get("snapToLines",!0),p.size=h.get("size",100),p.align=h.get("align",Hl);let _=h.get("position","auto");_==="auto"&&ou.position===50&&(_=p.align==="start"||p.align==="left"?0:p.align==="end"||p.align==="right"?100:50),p.position=_}function s(){a=a.replace(/^\s+/,"")}if(s(),e.startTime=r(),s(),a.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);a=a.slice(3),s(),e.endTime=r(),s(),i(a,e)}function Fu(a){return a.replace(/<br(?: \/)?>/gi,`
`)}class sd{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new nd,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function n(){let i=t.buffer,s=0;for(i=Fu(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
`;)++s;const u=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
`&&++s,t.buffer=i.slice(s),u}function r(i){$u(i,function(s,u){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=n();const u=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(u!=null&&u[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new au(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{id(i,t.cue,t.regionList)}catch(u){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const u=i.indexOf("-->")!==-1;if(!i||u&&(s=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
`),t.cue.text+=i}continue;case"BADCUE":i||(t.state="ID")}}}catch(i){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const ad=/\r\n|\n\r|\n|\r/g,lu=function(e,t,n=0){return e.slice(n,n+t.length)===t},od=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!c(t)||!c(n)||!c(r)||!c(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*i,t};function uu(a,e,t){return _l(a.toString())+_l(e.toString())+_l(t)}const ld=function(e,t,n){let r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new){e.ccOffset=e.presentationOffset=r.start,r.new=!1;return}for(;(s=i)!=null&&s.new;){var s;e.ccOffset+=r.start-i.start,r.new=!1,r=i,i=e[r.prevCC]}e.presentationOffset=n};function ud(a,e,t,n,r,i,s){const u=new sd,p=He(new Uint8Array(a)).trim().replace(ad,`
`).split(`
`),h=[],v=e?Yi(e.baseTime,e.timescale):0;let _="00:00.000",k=0,V=0,G,we=!0;u.oncue=function(Se){const Je=t[n];let ot=t.ccOffset;const ft=(k-v)/9e4;if(Je!=null&&Je.new&&(V!==void 0?ot=t.ccOffset=Je.start:ld(t,n,ft)),ft){if(!e){G=new Error("Missing initPTS for VTT MPEGTS");return}ot=ft-t.presentationOffset}const Pt=Se.endTime-Se.startTime,Kt=Hi((Se.startTime+ot-V)*9e4,r*9e4)/9e4;Se.startTime=Math.max(Kt,0),Se.endTime=Math.max(Kt+Pt,0);const xn=Se.text.trim();Se.text=decodeURIComponent(encodeURIComponent(xn)),Se.id||(Se.id=uu(Se.startTime,Se.endTime,xn)),Se.endTime>0&&h.push(Se)},u.onparsingerror=function(Se){G=Se},u.onflush=function(){if(G){s(G);return}i(h)},p.forEach(Se=>{if(we)if(lu(Se,"X-TIMESTAMP-MAP=")){we=!1,Se.slice(16).split(",").forEach(Je=>{lu(Je,"LOCAL:")?_=Je.slice(6):lu(Je,"MPEGTS:")&&(k=parseInt(Je.slice(7)))});try{V=od(_)/1e3}catch(Je){G=Je}return}else Se===""&&(we=!1);u.parse(Se+`
`)}),u.flush()}const cu="stpp.ttml.im1t",zu=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Uu=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,cd={left:"start",center:"center",right:"end",start:"start",end:"end"};function Ku(a,e,t,n){const r=te(new Uint8Array(a),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const i=r.map(u=>He(u)),s=Xr(e.baseTime,1,e.timescale);try{i.forEach(u=>t(dd(u,s)))}catch(u){n(u)}}function dd(a,e){const r=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");const i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(i).reduce((_,k)=>(_[k]=r.getAttribute(`ttp:${k}`)||i[k],_),{}),u=r.getAttribute("xml:space")!=="preserve",p=Zu(du(r,"styling","style")),h=Zu(du(r,"layout","region")),v=du(r,"body","[begin]");return[].map.call(v,_=>{const k=ju(_,u);if(!k||!_.hasAttribute("begin"))return null;const V=hu(_.getAttribute("begin"),s),G=hu(_.getAttribute("dur"),s);let we=hu(_.getAttribute("end"),s);if(V===null)throw Hu(_);if(we===null){if(G===null)throw Hu(_);we=V+G}const Se=new au(V-e,we-e,k);Se.id=uu(Se.startTime,Se.endTime,Se.text);const Je=h[_.getAttribute("region")],ot=p[_.getAttribute("style")],ft=fd(Je,ot,p),{textAlign:Pt}=ft;if(Pt){const Kt=cd[Pt];Kt&&(Se.lineAlign=Kt),Se.align=Pt}return b(Se,ft),Se}).filter(_=>_!==null)}function du(a,e,t){const n=a.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function Zu(a){return a.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function ju(a,e){return[].slice.call(a.childNodes).reduce((t,n,r)=>{var i;return n.nodeName==="br"&&r?t+`
`:(i=n.childNodes)!=null&&i.length?ju(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function fd(a,e,t){const n="http://www.w3.org/ns/ttml#styling";let r=null;const i=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=a!=null&&a.hasAttribute("style")?a.getAttribute("style"):null;return s&&t.hasOwnProperty(s)&&(r=t[s]),i.reduce((u,p)=>{const h=fu(e,n,p)||fu(a,n,p)||fu(r,n,p);return h&&(u[p]=h),u},{})}function fu(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function Hu(a){return new Error(`Could not parse ttml timestamp ${a}`)}function hu(a,e){if(!a)return null;let t=Bu(a);return t===null&&(zu.test(a)?t=hd(a,e):Uu.test(a)&&(t=md(a,e))),t}function hd(a,e){const t=zu.exec(a),n=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+n/e.frameRate}function md(a,e){const t=Uu.exec(a),n=Number(t[1]);switch(t[2]){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}class Wl{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 pd{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=Gu(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this),e.on(g.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(g.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(g.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this),e.off(g.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(g.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(g.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new Wl(this,"textTrack1"),t=new Wl(this,"textTrack2"),n=new Wl(this,"textTrack3"),r=new Wl(this,"textTrack4");this.cea608Parser1=new Nu(1,e,t),this.cea608Parser2=new Nu(3,n,r)}addCues(e,t,n,r,i){let s=!1;for(let u=i.length;u--;){const p=i[u],h=gd(p[0],p[1],t,n);if(h>=0&&(p[0]=Math.min(p[0],t),p[1]=Math.max(p[1],n),s=!0,h/(n-t)>.5))return}if(s||i.push([t,n]),this.config.renderTextTracksNatively){const u=this.captionsTracks[e];this.Cues.newCue(u,t,n,r)}else{const u=this.Cues.newCue(null,t,n,r);this.hls.trigger(g.CUES_PARSED,{type:"captions",cues:u,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){const{unparsedVttFrags:u}=this;n===X.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:i,trackId:s}),u.length&&(this.unparsedVttFrags=[],u.forEach(p=>{this.initPTS[p.frag.cc]?this.onFragLoaded(g.FRAG_LOADED,p):this.hls.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:p.frag,error:new Error("Subtitle discontinuity domain does not match main")})}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let r=0;r<n.textTracks.length;r++){const i=n.textTracks[r];if(Vu(i,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return i}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:n,media:r}=this,{label:i,languageCode:s}=t[e],u=this.getExistingTrack(i,s);if(u)n[e]=u,qo(n[e]),Au(n[e],r);else{const p=this.createTextTrack("captions",i,s);p&&(p[e]=!0,n[e]=p)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n=t.label,r={_id:e,label:n,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=r,this.hls.trigger(g.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}createTextTrack(e,t,n){const r=this.media;if(r)return r.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const n=!!t.transferMedia;if(this.media=null,n)return;const{captionsTracks:r}=this;Object.keys(r).forEach(i=>{qo(r[i]),delete r[i]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Gu(),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++)qo(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some(i=>i.textCodec===cu);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(Vs(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const s=this.media,u=s?Ul(s.textTracks):null;if(this.tracks.forEach((p,h)=>{let v;if(u){let _=null;for(let k=0;k<u.length;k++)if(u[k]&&Vu(u[k],p)){_=u[k],u[k]=null;break}_&&(v=_)}if(v)qo(v);else{const _=Wu(p);v=this.createTextTrack(_,p.name,p.lang),v&&(v.mode="disabled")}v&&this.textTracks.push(v)}),u!=null&&u.length){const p=u.filter(h=>h!==null).map(h=>h.label);p.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${p.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(u=>({label:u.name,kind:u.type.toLowerCase(),default:u.default,subtitleTrack:u}));this.hls.trigger(g.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(n=>{const r=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!r)return;const i=`textTrack${r[1]}`,s=this.captionsProperties[i];s&&(s.label=n.name,n.lang&&(s.languageCode=n.lang),s.media=n)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===X.MAIN){var n,r;const{cea608Parser1:i,cea608Parser2:s,lastSn:u}=this,{cc:p,sn:h}=t.frag,v=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;i&&s&&(h!==u+1||h===u&&v!==this.lastPartIndex+1||p!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=p,this.lastSn=h,this.lastPartIndex=v}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===X.SUBTITLE)if(r.byteLength){const i=n.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const u=this.tracks[n.level],p=this.vttCCs;p[n.cc]||(p[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),u&&u.textCodec===cu?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;Ku(t,this.initPTS[e.cc],r=>{this._appendCues(r,e.level),n.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})})}_parseVTTs(e){var t;const{frag:n,payload:r}=e,{initPTS:i,unparsedVttFrags:s}=this,u=i.length-1;if(!i[n.cc]&&u===-1){s.push(e);return}const p=this.hls,h=(t=n.initSegment)!=null&&t.data?ct(n.initSegment.data,new Uint8Array(r)).buffer:r;ud(h,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,v=>{this._appendCues(v,n.level),p.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},v=>{const _=v.message==="Missing initPTS for VTT MPEGTS";_?s.push(e):this._fallbackToIMSC1(n,r),p.logger.log(`Failed to parse VTT cue: ${v}`),!(_&&u>n.cc)&&p.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:v})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||Ku(t,this.initPTS[e.cc],()=>{n.textCodec=cu,this._parseIMSC1(e,t)},()=>{n.textCodec="wvtt"})}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const r=this.textTracks[t];if(!r||r.mode==="disabled")return;e.forEach(i=>Iu(r,i))}else{const r=this.tracks[t];if(!r)return;const i=r.default?"default":"subtitles"+t;n.trigger(g.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===X.SUBTITLE&&this.onFragLoaded(g.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:n,samples:r}=t;if(!(n.type===X.MAIN&&this.closedCaptionsForLevel(n)==="NONE"))for(let i=0;i<r.length;i++){const s=r[i].bytes;if(s){this.cea608Parser1||this.initCea608Parsers();const u=this.extractCea608Data(s);this.cea608Parser1.addData(r[i].pts,u[0]),this.cea608Parser2.addData(r[i].pts,u[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:r,type:i}){const{media:s}=this;if(!(!s||s.currentTime<n)){if(!i||i==="video"){const{captionsTracks:u}=this;Object.keys(u).forEach(p=>nu(u[p],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:u}=this;Object.keys(u).forEach(p=>nu(u[p],t,r))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let r=2;for(let i=0;i<n;i++){const s=e[r++],u=127&e[r++],p=127&e[r++];if(u===0&&p===0)continue;if((4&s)!==0){const v=3&s;(v===0||v===1)&&(t[v].push(u),t[v].push(p))}}return t}}function Wu(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function Vu(a,e){return!!a&&a.kind===Wu(e)&&fo(e,a)}function gd(a,e,t,n){return Math.min(e,n)-Math.max(a,t)}function Gu(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const vd=/\s/,yd={newCue(a,e,t,n){const r=[];let i,s,u,p,h;const v=self.VTTCue||self.TextTrackCue;for(let k=0;k<n.rows.length;k++)if(i=n.rows[k],u=!0,p=0,h="",!i.isEmpty()){var _;for(let we=0;we<i.chars.length;we++)vd.test(i.chars[we].uchar)&&u?p++:(h+=i.chars[we].uchar,u=!1);i.cueStartTime=e,e===t&&(t+=1e-4),p>=16?p--:p++;const V=Fu(h.trim()),G=uu(e,t,V);a!=null&&(_=a.cues)!=null&&_.getCueById(G)||(s=new v(e,t,V),s.id=G,s.line=k+1,s.align="left",s.position=10+Math.min(80,Math.floor(p*8/32)*10),r.push(s))}return a&&r.length&&(r.sort((k,V)=>k.line==="auto"||V.line==="auto"?0:k.line>8&&V.line>8?V.line-k.line:k.line-V.line),r.forEach(k=>Iu(a,k))),r}};function bd(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const _d=/(\d+)-(\d+)\/(\d+)/;class Yu{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||wd,this.controller=new self.AbortController,this.stats=new C}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();const i=xd(e,this.controller.signal),s=e.responseType==="arraybuffer",u=s?"byteLength":"length",{maxTimeToFirstByteMs:p,maxLoadTimeMs:h}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=p&&c(p)?p:h,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(Wi(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(_=>{var k;this.response=this.loader=_;const V=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=h,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},h-(V-r.loading.start)),!_.ok){const{status:we,statusText:Se}=_;throw new Cd(Se||"fetch, bad network response",we,_)}r.loading.first=V,r.total=Sd(_.headers)||r.total;const G=(k=this.callbacks)==null?void 0:k.onProgress;return G&&c(t.highWaterMark)?this.loadProgressively(_,r,e,t.highWaterMark,G):s?_.arrayBuffer():e.responseType==="json"?_.json():_.text()}).then(_=>{var k,V;const G=this.response;if(!G)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const we=_[u];we&&(r.loaded=r.total=we);const Se={url:G.url,data:_,code:G.status},Je=(k=this.callbacks)==null?void 0:k.onProgress;Je&&!c(t.highWaterMark)&&Je(r,e,_,G),(V=this.callbacks)==null||V.onSuccess(Se,r,e,G)}).catch(_=>{var k;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const V=_&&_.code||0,G=_?_.message:null;(k=this.callbacks)==null||k.onError({code:V,text:G},e,_?_.details:null,r)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,r=0,i){const s=new Ba,u=e.body.getReader(),p=()=>u.read().then(h=>{if(h.done)return s.dataLength&&i(t,n,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const v=h.value,_=v.length;return t.loaded+=_,_<r||s.dataLength?(s.push(v),s.dataLength>=r&&i(t,n,s.flush().buffer,e)):i(t,n,v.buffer,e),p()}).catch(()=>Promise.reject());return p()}}function xd(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(b({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function Ed(a){const e=_d.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function Sd(a){const e=a.get("Content-Range");if(e){const n=Ed(e);if(c(n))return n}const t=a.get("Content-Length");if(t)return parseInt(t)}function wd(a,e){return new self.Request(a.url,e)}class Cd extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const Td=/^age:\s*[\d.]+\s*$/im;class Xu{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 C,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0,r.aborted=!1;const i=this.xhrSetup;i?Promise.resolve().then(()=>{if(!(this.loader!==n||this.stats.aborted))return i(n,t.url)}).catch(s=>{if(!(this.loader!==n||this.stats.aborted))return n.open("GET",t.url,!0),i(n,t.url)}).then(()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(s=>{var u;(u=this.callbacks)==null||u.onError({code:n.status,text:s.message},t,n,r)}):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const r=t.headers,{maxTimeToFirstByteMs:i,maxLoadTimeMs:s}=n.loadPolicy;if(r)for(const u in r)e.setRequestHeader(u,r[u]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=i&&c(i)?i:s,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const r=t.readyState,i=this.config;if(!n.aborted&&r>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),r===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const h=t.status,v=t.responseType==="text"?t.responseText:null;if(h>=200&&h<300){const G=v!=null?v:t.response;if(G!=null){var s,u;n.loading.end=Math.max(self.performance.now(),n.loading.first);const we=t.responseType==="arraybuffer"?G.byteLength:G.length;n.loaded=n.total=we,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const Se=(s=this.callbacks)==null?void 0:s.onProgress;Se&&Se(n,e,G,t);const Je={url:t.responseURL,data:G,code:h};(u=this.callbacks)==null||u.onSuccess(Je,n,e,t);return}}const _=i.loadPolicy.errorRetry,k=n.retry,V={url:e.url,data:void 0,code:h};if(zr(_,k,!1,V))this.retry(_);else{var p;ce.error(`${h} while loading ${e.url}`),(p=this.callbacks)==null||p.onError({code:h,text:t.statusText},e,t,n)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(zr(e,t,!0))this.retry(e);else{var n;ce.warn(`timeout while loading ${(n=this.context)==null?void 0:n.url}`);const r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=ur(e,n.retry),n.retry++,ce.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&Td.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 Ad={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Id=T(T({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:Xu,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:er,bufferController:qs,capLevelController:va,errorController:en,fpsController:Oc,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:ms,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:Ad},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},Dd()),{},{subtitleStreamController:Zc,subtitleTrackController:Mc,timelineController:pd,audioStreamController:Us,audioTrackController:cs,emeController:Jo,cmcdController:Ac,contentSteeringController:Dc,interstitialsController:Kc});function Dd(){return{cueHandler:yd,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 Rd(a,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const n=mu(a),r=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(s=>{const u=`${s==="level"?"playlist":s}LoadPolicy`,p=e[u]===void 0,h=[];i.forEach(v=>{const _=`${s}Loading${v}`,k=e[_];if(k!==void 0&&p){h.push(_);const V=n[u].default;switch(e[u]={default:V},v){case"TimeOut":V.maxLoadTimeMs=k,V.maxTimeToFirstByteMs=k;break;case"MaxRetry":V.errorRetry.maxNumRetry=k,V.timeoutRetry.maxNumRetry=k;break;case"RetryDelay":V.errorRetry.retryDelayMs=k,V.timeoutRetry.retryDelayMs=k;break;case"MaxRetryTimeout":V.errorRetry.maxRetryDelayMs=k,V.timeoutRetry.maxRetryDelayMs=k;break}}}),h.length&&t.warn(`hls.js config: "${h.join('", "')}" setting(s) are deprecated, use "${u}": ${Ct(e[u])}`)}),T(T({},n),e)}function mu(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(mu):Object.keys(a).reduce((e,t)=>(e[t]=mu(a[t]),e),{}):a}function Od(a,e){const t=a.loader;t!==Yu&&t!==Xu?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):bd()&&(a.loader=Yu,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const Vl=2,Ld=.1,Pd=.05,Md=100;class kd extends Pi{constructor(e,t){super("gap-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var n;(n=this.media)!=null&&n.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var n;this.ended=((n=this.media)==null?void 0:n.currentTime)||1,this.hls.trigger(g.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,t){this.setInterval(Md),this.mediaSource=t.mediaSource;const n=this.media=t.media;Bs(n,"playing",this.onMediaPlaying),Bs(n,"waiting",this.onMediaWaiting),Bs(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(Ws(n,"playing",this.onMediaPlaying),Ws(n,"waiting",this.onMediaWaiting),Ws(n,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var n,r;const i=(n=this.hls)==null?void 0:n.config;if(!i)return;const s=this.media;if(!s)return;const{seeking:u}=s,p=this.seeking&&!u,h=!this.seeking&&u,v=s.paused&&!u||s.ended||s.playbackRate===0;if(this.seeking=u,e!==t){t&&(this.ended=0),this.moved=!0,u||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!v&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(h||p){p&&this.stallResolved(e);return}if(v){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(g.MEDIA_ENDED,{stalled:!1}));return}if(!zn.getBuffered(s).length){this.nudgeRetry=0;return}const _=zn.bufferInfo(s,e,0),k=_.nextStart||0,V=this.fragmentTracker;if(u&&V&&this.hls){const xn=Qu(this.hls.inFlightFragments,e),Ht=_.len>Vl,cn=!k||xn||k-e>Vl&&!V.getPartialFragment(e);if(Ht||cn)return;this.moved=!1}const G=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&V){if(!(_.len>0)&&!k)return;const Ht=Math.max(k,_.start||0)-e,ln=!!(G!=null&&G.live)?G.targetduration*2:Vl,Yt=Gl(e,V);if(Ht>0&&(Ht<=ln||Yt)){s.paused||this._trySkipBufferHole(Yt);return}}const we=i.detectStallWithCurrentTimeMs,Se=self.performance.now(),Je=this.waiting;let ot=this.stalled;if(ot===null)if(Je>0&&Se-Je<we)ot=this.stalled=Je;else{this.stalled=Se;return}const ft=Se-ot;if(!u&&(ft>=we||Je)&&this.hls){var Pt;if(((Pt=this.mediaSource)==null?void 0:Pt.readyState)==="ended"&&!(G!=null&&G.live)&&Math.abs(e-((G==null?void 0:G.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(g.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(_),!this.media||!this.hls)return}const Kt=zn.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(Kt,ft,e)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const n=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(n)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(g.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var n;const r=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(n=this.buffered.audio)!=null&&n.length&&r&&r.length>1&&e>r.end(0)){const i=zn.bufferedInfo(zn.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=zn.timeRangesToArray(r),u=zn.bufferedInfo(s,t,0).bufferedIndex;if(u>-1&&u<s.length-1){const p=zn.bufferedInfo(s,e,0).bufferedIndex,h=s[u].end,v=s[u+1].start;if((p===-1||p>u)&&v-h<1&&e-h<2){const _=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${h} -> ${v} buffered index: ${p}`);this.warn(_.message),this.media.currentTime+=1e-6;let k=Gl(e,this.fragmentTracker);k&&"fragment"in k?k=k.fragment:k||(k=void 0);const V=zn.bufferInfo(this.media,e,0);this.hls.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:_,reason:_.message,frag:k,buffer:V.len,bufferInfo:V})}}}}}_tryFixBufferStall(e,t,n){var r,i;const{fragmentTracker:s,media:u}=this,p=(r=this.hls)==null?void 0:r.config;if(!u||!s||!p)return;const h=(i=this.hls)==null?void 0:i.latestLevelDetails,v=Gl(n,s);if((v||h!=null&&h.live&&n<h.fragmentStart)&&(this._trySkipBufferHole(v)||!this.media))return;const _=e.buffered,k=this.adjacentTraversal(e,n);(_&&_.length>1&&e.len>p.maxBufferHole||e.nextStart&&(e.nextStart-n<p.maxBufferHole||k))&&(t>p.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,t){const n=this.fragmentTracker,r=e.nextStart;if(n&&r){const i=n.getFragAtPos(t,X.MAIN),s=n.getFragAtPos(r,X.MAIN);if(i&&s)return s.sn-i.sn<2}return!1}_reportStall(e){const{hls:t,media:n,stallReported:r,stalled:i}=this;if(!r&&i!==null&&n&&t){this.stallReported=!0;const s=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${Ct(e)})`);this.warn(s.message),t.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len,bufferInfo:e,stalled:{start:i}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:n,media:r}=this,i=(t=this.hls)==null?void 0:t.config;if(!r||!n||!i)return 0;const s=r.currentTime,u=zn.bufferInfo(r,s,0),p=s<u.start?u.start:u.nextStart;if(p&&this.hls){const v=u.len<=i.maxBufferHole,_=u.len>0&&u.len<1&&r.readyState<3,k=p-s;if(k>0&&(v||_)){if(k>i.maxBufferHole){let G=!1;if(s===0){const we=n.getAppendedFrag(0,X.MAIN);we&&p<we.end&&(G=!0)}if(!G&&e){var h;if(!((h=this.hls.loadLevelObj)!=null&&h.details)||Qu(this.hls.inFlightFragments,p))return 0;let Se=!1,Je=e.end;for(;Je<p;){const ot=Gl(Je,n);if(ot)Je+=ot.duration;else{Se=!0;break}}if(Se)return 0}}const V=Math.max(p+Pd,s+Ld);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${V}`),this.moved=!0,r.currentTime=V,!(e!=null&&e.gap)){const G=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${V}`),we={type:ie.MEDIA_ERROR,details:F.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:G,reason:G.message,buffer:u.len,bufferInfo:u};e&&("fragment"in e?we.part=e:we.frag=e),this.hls.trigger(g.ERROR,we)}return V}}return 0}_tryNudgeBuffer(e){const{hls:t,media:n,nudgeRetry:r}=this,i=t==null?void 0:t.config;if(!n||!i)return 0;const s=n.currentTime;if(this.nudgeRetry++,r<i.nudgeMaxRetry){const u=s+(r+1)*i.nudgeOffset,p=new Error(`Nudging 'currentTime' from ${s} to ${u}`);this.warn(p.message),n.currentTime=u,t.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.BUFFER_NUDGE_ON_STALL,error:p,fatal:!1,buffer:e.len,bufferInfo:e})}else{const u=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(u.message),t.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.BUFFER_STALLED_ERROR,error:u,fatal:!0,buffer:e.len,bufferInfo:e})}}}function Qu(a,e){const t=Ju(a.main);if(t&&t.start<=e)return t;const n=Ju(a.audio);return n&&n.start<=e?n:null}function Ju(a){if(!a)return null;switch(a.state){case In.IDLE:case In.STOPPED:case In.ENDED:case In.ERROR:return null}return a.frag}function Gl(a,e){return e.getAppendedFrag(a,X.MAIN)||e.getPartialFragment(a)}const Nd=.25;function pu(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function gu(a,e,t,n,r){let i=new a(e,t,"");try{i.value=n,r&&(i.type=r)}catch(s){i=new a(e,t,Ct(r?T({type:r},n):n))}return i}const Yl=(()=>{const a=pu();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class Bd{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.assetCue=void 0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(g.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e&&(e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}onMediaAttaching(e,t){var n;this.media=t.media,((n=t.overrides)==null?void 0:n.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){var e;const t=(e=this.hls)==null?void 0:e.latestLevelDetails;t&&this.updateDateRangeCues(t)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&qo(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 Au(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media||!this.hls)return;const{enableEmsgMetadataCues:n,enableID3MetadataCues:r}=this.hls.config;if(!n&&!r)return;const{samples:i}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=pu();if(s)for(let u=0;u<i.length;u++){const p=i[u].type;if(p===Le.emsg&&!n||!r)continue;const h=Io(i[u].data),v=i[u].pts;let _=v+i[u].duration;_>Yl&&(_=Yl),_-v<=0&&(_=v+Nd);for(let V=0;V<h.length;V++){const G=h[V];if(!Go(G)){this.updateId3CueEnds(v,p);const we=gu(s,v,_,G,p);we&&this.id3Track.addCue(we)}}}}updateId3CueEnds(e,t){var n;const r=(n=this.id3Track)==null?void 0:n.cues;if(r)for(let i=r.length;i--;){const s=r[i];s.type===t&&s.startTime<e&&s.endTime===Yl&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:r}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:u,enableID3MetadataCues:p}}=s;if(i&&(u||p)){let h;r==="audio"?h=v=>v.type===Le.audioId3&&p:r==="video"?h=v=>v.type===Le.emsg&&u:h=v=>v.type===Le.audioId3&&p||v.type===Le.emsg&&u,nu(i,t,n,h)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.hls||!this.media)return;const{assetPlayerId:n,timelineOffset:r,enableDateRangeMetadataCues:i,interstitialsController:s}=this.hls.config;if(!i)return;const u=pu();if(n&&r&&!s){const{fragmentStart:we,fragmentEnd:Se}=e;let Je=this.assetCue;Je?(Je.startTime=we,Je.endTime=Se):u&&(Je=this.assetCue=gu(u,we,Se,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),Je&&(Je.id=n,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(Je),Je.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:p}=this,{dateRanges:h}=e,v=Object.keys(h);let _=this.dateRangeCuesAppended;if(p&&t){var k;if((k=p.cues)!=null&&k.length){const we=Object.keys(_).filter(Se=>!v.includes(Se));for(let Se=we.length;Se--;){var V;const Je=we[Se],ot=(V=_[Je])==null?void 0:V.cues;delete _[Je],ot&&Object.keys(ot).forEach(ft=>{const Pt=ot[ft];if(Pt){Pt.removeEventListener("enter",this.onEventCueEnter);try{p.removeCue(Pt)}catch(Kt){}}})}}else _=this.dateRangeCuesAppended={}}const G=e.fragments[e.fragments.length-1];if(!(v.length===0||!c(G==null?void 0:G.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let we=0;we<v.length;we++){const Se=v[we],Je=h[Se],ot=Je.startTime,ft=_[Se],Pt=(ft==null?void 0:ft.cues)||{};let Kt=(ft==null?void 0:ft.durationKnown)||!1,xn=Yl;const{duration:Ht,endDate:cn}=Je;if(cn&&Ht!==null)xn=ot+Ht,Kt=!0;else if(Je.endOnNext&&!Kt){const Yt=v.reduce((kn,pr)=>{if(pr!==Je.id){const kr=h[pr];if(kr.class===Je.class&&kr.startDate>Je.startDate&&(!kn||Je.startDate<kn.startDate))return kr}return kn},null);Yt&&(xn=Yt.startTime,Kt=!0)}const ln=Object.keys(Je.attr);for(let Yt=0;Yt<ln.length;Yt++){const kn=ln[Yt];if(!ds(kn))continue;const pr=Pt[kn];if(pr)Kt&&!(ft!=null&&ft.durationKnown)?pr.endTime=xn:Math.abs(pr.startTime-ot)>.01&&(pr.startTime=ot,pr.endTime=xn);else if(u){let kr=Je.attr[kn];_s(kn)&&(kr=W(kr));const Nr=gu(u,ot,xn,{key:kn,data:kr},Le.dateRange);Nr&&(Nr.id=Se,this.id3Track.addCue(Nr),Pt[kn]=Nr,s&&(kn==="X-ASSET-LIST"||kn==="X-ASSET-URL")&&Nr.addEventListener("enter",this.onEventCueEnter))}}_[Se]={cues:Pt,dateRange:Je,durationKnown:Kt}}}}}class $d{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t}=this,n=this.levelDetails;if(!t||!n)return;this.currentTime=t.currentTime;const r=this.computeLatency();if(r===null)return;this._latency=r;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:s}=this.config;if(!i||s===1||!n.live)return;const u=this.targetLatency;if(u===null)return;const p=r-u,h=Math.min(this.maxLatency,u+n.targetduration);if(p<h&&p>.05&&this.forwardBufferLength>1){const _=Math.min(2,Math.max(1,s)),k=Math.round(2/(1+Math.exp(-.75*p-this.edgeStalled))*20)/20,V=Math.min(_,Math.max(1,k));this.changeMediaPlaybackRate(t,V)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:n,targetduration:r}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:u}=this.config,p=this.hls.userConfig;let h=u&&n||t;(this._targetLatencyUpdated||p.liveSyncDuration||p.liveSyncDurationCount||h===0)&&(h=i!==void 0?i:s*r);const v=r;return h+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,v)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(e===null||t===null)return null;const n=this.levelDetails;if(n===null)return null;const r=n.edge,i=e-t-this.edgeStalled,s=r-n.totalduration,u=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(s,i),u)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var n;t.details===F.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 Fd extends hs{constructor(e,t){super(e,"level-controller"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,r=[],i={},s={};let u=!1,p=!1,h=!1;t.levels.forEach(v=>{const _=v.attrs;let{audioCodec:k,videoCodec:V}=v;k&&(v.audioCodec=k=Be(k,n)||void 0),V&&(V=v.videoCodec=sr(V));const{width:G,height:we,unknownCodecs:Se}=v,Je=(Se==null?void 0:Se.length)||0;if(u||(u=!!(G&&we)),p||(p=!!V),h||(h=!!k),Je||k&&!this.isAudioSupported(k)||V&&!this.isVideoSupported(V)){this.log(`Some or all CODECS not supported "${_.CODECS}"`);return}const{CODECS:ot,"FRAME-RATE":ft,"HDCP-LEVEL":Pt,"PATHWAY-ID":Kt,RESOLUTION:xn,"VIDEO-RANGE":Ht}=_,ln=`${`${Kt||"."}-`}${v.bitrate}-${xn}-${ft}-${ot}-${Ht}-${Pt}`;if(i[ln])if(i[ln].uri!==v.url&&!v.attrs["PATHWAY-ID"]){const Yt=s[ln]+=1;v.attrs["PATHWAY-ID"]=new Array(Yt+1).join(".");const kn=this.createLevel(v);i[ln]=kn,r.push(kn)}else i[ln].addGroupId("audio",_.AUDIO),i[ln].addGroupId("text",_.SUBTITLES);else{const Yt=this.createLevel(v);i[ln]=Yt,s[ln]=1,r.push(Yt)}}),this.filterAndSortMediaOptions(r,t,u,p,h)}createLevel(e){const t=new Wt(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=Cn(r,[])}return t}isAudioSupported(e){return at(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return at(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){var s;let u=[],p=[],h=e;const v=((s=t.stats)==null?void 0:s.parsing)||{};if((n||r)&&i&&(h=h.filter(({videoCodec:ot,videoRange:ft,width:Pt,height:Kt})=>(!!ot||!!(Pt&&Kt))&&Tt(ft))),h.length===0){Promise.resolve().then(()=>{if(this.hls){let ot="no level with compatible codecs found in manifest",ft=ot;t.levels.length&&(ft=`one or more CODECS in variant not supported: ${Ct(t.levels.map(Kt=>Kt.attrs.CODECS).filter((Kt,xn,Ht)=>Ht.indexOf(Kt)===xn))}`,this.warn(ft),ot+=` (${ft})`);const Pt=new Error(ot);this.hls.trigger(g.ERROR,{type:ie.MEDIA_ERROR,details:F.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:Pt,reason:ft})}}),v.end=performance.now();return}t.audioTracks&&(u=t.audioTracks.filter(ot=>!ot.audioCodec||this.isAudioSupported(ot.audioCodec)),qu(u)),t.subtitles&&(p=t.subtitles,qu(p));const _=h.slice(0);h.sort((ot,ft)=>{if(ot.attrs["HDCP-LEVEL"]!==ft.attrs["HDCP-LEVEL"])return(ot.attrs["HDCP-LEVEL"]||"")>(ft.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&ot.height!==ft.height)return ot.height-ft.height;if(ot.frameRate!==ft.frameRate)return ot.frameRate-ft.frameRate;if(ot.videoRange!==ft.videoRange)return yt.indexOf(ot.videoRange)-yt.indexOf(ft.videoRange);if(ot.videoCodec!==ft.videoCodec){const Pt=ye(ot.videoCodec),Kt=ye(ft.videoCodec);if(Pt!==Kt)return Kt-Pt}if(ot.uri===ft.uri&&ot.codecSet!==ft.codecSet){const Pt=Fe(ot.codecSet),Kt=Fe(ft.codecSet);if(Pt!==Kt)return Kt-Pt}return ot.averageBitrate!==ft.averageBitrate?ot.averageBitrate-ft.averageBitrate:0});let k=_[0];if(this.steering&&(h=this.steering.filterParsedLevels(h),h.length!==_.length)){for(let ot=0;ot<_.length;ot++)if(_[ot].pathwayId===h[0].pathwayId){k=_[ot];break}}this._levels=h;for(let ot=0;ot<h.length;ot++)if(h[ot]===k){var V;this._firstLevel=ot;const ft=k.bitrate,Pt=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${h.length} level(s) found, first bitrate: ${ft}`),((V=this.hls.userConfig)==null?void 0:V.abrEwmaDefaultEstimate)===void 0){const Kt=Math.min(ft,this.hls.config.abrEwmaDefaultEstimateMax);Kt>Pt&&Pt===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=Kt)}break}const G=i&&!r,we=this.hls.config,Se=!!(we.audioStreamController&&we.audioTrackController),Je={levels:h,audioTracks:u,subtitleTracks:p,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:Se&&!G&&u.some(ot=>!!ot.url)};v.end=performance.now(),this.hls.trigger(g.MANIFEST_PARSED,Je)}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 v=new Error("invalid level idx"),_=e<0;if(this.hls.trigger(g.ERROR,{type:ie.OTHER_ERROR,details:F.LEVEL_SWITCH_ERROR,level:e,fatal:_,error:v,reason:v.message}),_)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,r=this.currentLevel,i=r?r.attrs["PATHWAY-ID"]:void 0,s=t[e],u=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,n===e&&r&&i===u)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${u?" with Pathway "+u:""} from level ${n}${i?" with Pathway "+i:""}`);const p={level:e,attrs:s.attrs,details:s.details,bitrate:s.bitrate,averageBitrate:s.averageBitrate,maxBitrate:s.maxBitrate,realBitrate:s.realBitrate,width:s.width,height:s.height,codecSet:s.codecSet,audioCodec:s.audioCodec,videoCodec:s.videoCodec,audioGroups:s.audioGroups,subtitleGroups:s.subtitleGroups,loaded:s.loaded,loadError:s.loadError,fragmentError:s.fragmentError,name:s.name,id:s.id,uri:s.uri,url:s.url,urlId:0,audioGroupIds:s.audioGroupIds,textGroupIds:s.textGroupIds};this.hls.trigger(g.LEVEL_SWITCHING,p);const h=s.details;if(!h||h.live){const v=this.switchParams(s.uri,r==null?void 0:r.details,h);this.loadPlaylist(v)}}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===J.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===X.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(i=>!!n[i]))return;const r=this._levels[t.level];r!=null&&r.loadError&&(this.log(`Resetting level error count of ${r.loadError} on frag buffered`),r.loadError=0)}}onLevelLoaded(e,t){var n;const{level:r,details:i}=t,s=t.levelInfo;if(!s){var u;this.warn(`Invalid level index ${r}`),(u=t.deliveryDirectives)!=null&&u.skip&&(i.deltaUpdateFailed=!0);return}if(s===this.currentLevel||t.withoutMultiVariant){s.fragmentError===0&&(s.loadError=0);let p=s.details;p===t.details&&p.advanced&&(p=void 0),this.playlistLoaded(r,t,p)}else(n=t.deliveryDirectives)!=null&&n.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=this.getUrlWithDirectives(e.uri,t),r=this.currentLevelIndex,i=e.attrs["PATHWAY-ID"],s=e.details,u=s==null?void 0:s.age;this.log(`Loading level index ${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${i?" Pathway "+i:""}${u&&s.live?" age "+u.toFixed(1)+(s.type?" "+s.type||0:""):""} ${n}`),this.hls.trigger(g.LEVEL_LOADING,{url:n,level:r,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const n=this._levels.filter((i,s)=>s!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(u=>u.level=-1)),!1));Ns(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const r=n.length-1;this._firstLevel=Math.min(this._firstLevel,r),this._startLevel&&(this._startLevel=Math.min(this._startLevel,r)),this.hls.trigger(g.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(g.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function qu(a){const e={};a.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function ec(){return self.SourceBuffer||self.WebKitSourceBuffer}function tc(){if(!De())return!1;const e=ec();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function zd(){if(!tc())return!1;const a=De();return typeof(a==null?void 0:a.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>a.isTypeSupported(ge(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(ge(e,"audio"))))}function Ud(){var a;const e=ec();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const Kd=100;class Zd extends oo{constructor(e,t,n){super(e,t,n,"stream-controller",X.MAIN),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const r=this.media,i=r?r.currentTime:null;if(i===null||!c(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(r,i,X.MAIN,0);if(s===null||s.len===0){this.warn(`Main forward buffer length at ${i} on "seeked" event ${s?s.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:n,hls:r}=this;if(this.stopLoad(),this.setInterval(Kd),this.level=-1,!this.startFragRequested){let i=r.startLevel;i===-1&&(r.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=r.firstAutoLevel),r.nextLoadLevel=i,this.level=r.loadLevel,this._hasEnoughToStart=!!t}n>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n),this.state=In.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=In.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case In.WAITING_LEVEL:{const{levels:e,level:t}=this,n=e==null?void 0:e[t],r=n==null?void 0:n.details;if(r&&(!r.live||this.levelLastLoaded===n&&!this.waitForLive(n))){if(this.waitForCdnTuneIn(r))break;this.state=In.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=In.IDLE;break}break}case In.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===In.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:r}=this;if(t===null||!r&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const i=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(n!=null&&n[i]))return;const s=n[i],u=this.getMainFwdBufferInfo();if(u===null)return;const p=this.getLevelDetails();if(p&&this._streamEnded(u,p)){const we={};this.altAudio===2&&(we.type="video"),this.hls.trigger(g.BUFFER_EOS,we),this.state=In.ENDED;return}if(!this.buffering)return;e.loadLevel!==i&&e.manualLevel===-1&&this.log(`Adapting to level ${i} from level ${this.level}`),this.level=e.nextLoadLevel=i;const h=s.details;if(!h||this.state===In.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=In.WAITING_LEVEL,this.startFragRequested=!1;return}const v=u.len,_=this.getMaxBufferLength(s.maxBitrate);if(v>=_)return;this.backtrackFragment&&this.backtrackFragment.start>u.end&&(this.backtrackFragment=null);const k=this.backtrackFragment?this.backtrackFragment.start:u.end;let V=this.getNextFragment(k,h);if(this.couldBacktrack&&!this.fragPrevious&&V&&je(V)&&this.fragmentTracker.getState(V)!==Rn.OK){var G;const Se=((G=this.backtrackFragment)!=null?G:V).sn-h.startSN,Je=h.fragments[Se-1];Je&&V.cc===Je.cc&&(V=Je,this.fragmentTracker.removeFragment(Je))}else this.backtrackFragment&&u.len&&(this.backtrackFragment=null);if(V&&this.isLoopLoading(V,k)){if(!V.gap){const Se=this.audioOnly&&!this.altAudio?Y.AUDIO:Y.VIDEO,Je=(Se===Y.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Je&&this.afterBufferFlushed(Je,Se,X.MAIN)}V=this.getNextFragmentLoopLoading(V,h,u,X.MAIN,_)}V&&(V.initSegment&&!V.initSegment.data&&!this.bitrateTest&&(V=V.initSegment),this.loadFragment(V,s,k))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===Rn.NOT_LOADED||r===Rn.PARTIAL?je(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,X.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let n;const r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.start-1);const i=this.getLevelDetails();if(i!=null&&i.live){const u=this.getMainFwdBufferInfo();if(!u||u.len<i.targetduration*2)return}if(!t.paused&&e){const u=this.hls.nextLoadLevel,p=e[u],h=this.fragLastKbps;h&&this.fragCurrent?n=this.fragCurrent.duration*p.maxBitrate/(1e3*h)+1:n=0}else n=0;const s=this.getBufferedFrag(t.currentTime+n);if(s){const u=this.followingBufferedFrag(s);if(u){this.abortCurrentFrag();const p=u.maxStartPTS?u.maxStartPTS:u.start,h=u.duration,v=Math.max(s.end,p+Math.min(Math.max(h-this.config.maxFragLookUpTolerance,h*(this.couldBacktrack?.5:.125)),h*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(v,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 In.KEY_LOADING:case In.FRAG_LOADING:case In.FRAG_LOADING_WAITING_RETRY:case In.PARSING:case In.PARSED:this.state=In.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;Bs(n,"playing",this.onMediaPlaying),Bs(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(Ws(n,"playing",this.onMediaPlaying),Ws(n,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(g.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let n=!1,r=!1;for(let i=0;i<t.levels.length;i++){const s=t.levels[i].audioCodec;s&&(n=n||s.indexOf("mp4a.40.2")!==-1,r=r||s.indexOf("mp4a.40.5")!==-1)}this.audioCodecSwitch=n&&r&&!Ud(),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!==In.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=In.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:i}=this,s=t.level,u=t.details,p=u.totalduration;if(!r){this.warn(`Levels were reset while loading level ${s}`);return}this.log(`Level ${s} loaded [${u.startSN},${u.endSN}]${u.lastPartSn?`[part-${u.lastPartSn}-${u.lastPartIndex}]`:""}, cc [${u.startCC}, ${u.endCC}] duration:${p}`);const h=t.levelInfo,v=this.fragCurrent;v&&(this.state===In.FRAG_LOADING||this.state===In.FRAG_LOADING_WAITING_RETRY)&&v.level!==t.level&&v.loader&&this.abortCurrentFrag();let _=0;if(u.live||(n=h.details)!=null&&n.live){var k;if(this.checkLiveUpdate(u),u.deltaUpdateFailed)return;_=this.alignPlaylists(u,h.details,(k=this.levelLastLoaded)==null?void 0:k.details)}if(h.details=u,this.levelLastLoaded=h,i||this.setStartPosition(u,_),this.hls.trigger(g.LEVEL_UPDATED,{details:u,level:s}),this.state===In.WAITING_LEVEL){if(this.waitForCdnTuneIn(u))return;this.state=In.IDLE}i&&u.live&&this.synchronizeToLiveEdge(u),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const r=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,u=e.edge,p=i>=s-t.maxFragLookUpTolerance&&i<=u;if(r!==null&&n.duration>r&&(i<r||!p)){const v=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!p&&n.readyState<4||i<u-v)&&(this._hasEnoughToStart||(this.nextLoadPosition=r),n.readyState))if(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${u}, reset currentTime to : ${r.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var h;const _=zn.bufferInfo(n,r,0);if(!((h=_.buffered)!=null&&h.length)){n.currentTime=r;return}if(_.start<=i){n.currentTime=r;return}const{nextStart:V}=zn.bufferedInfo(_.buffered,i,0);V&&(n.currentTime=V)}else n.currentTime=r}}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{levels:s}=this;if(!s){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const u=s[n.level];if(!u){this.warn(`Level ${n.level} not found on progress`);return}const p=u.details;if(!p){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const h=u.videoCodec,v=p.PTSKnown||!p.live,_=(t=n.initSegment)==null?void 0:t.data,k=this._getAudioCodec(u),V=this.transmuxer=this.transmuxer||new fs(this.hls,X.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),G=r?r.index:-1,we=G!==-1,Se=new Mi(n.level,n.sn,n.stats.chunkCount,i.byteLength,G,we),Je=this.initPTS[n.cc];V.push(i,_,k,h,n,r,p.totalduration,v,Se,Je)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio!==0;if(Kn(t.url,n))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const s=this.fragCurrent;s&&(this.log("Switching to main audio track, cancel main fragment load"),s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(r){this.altAudio=0,this.fragmentTracker.removeAllFragments(),n.once(g.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(g.AUDIO_TRACK_SWITCHED,t)}),n.trigger(g.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(g.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=Kn(t.url,this.hls);if(n){const r=this.videoBuffer;r&&this.mediaBuffer!==r&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n?2:0,this.tick()}onBufferCreated(e,t){const n=t.tracks;let r,i,s=!1;for(const u in n){const p=n[u];if(p.id==="main"){if(i=u,r=p,u==="video"){const h=n[u];h&&(this.videoBuffer=h.buffer)}}else s=!0}s&&r?(this.log(`Alternate track found, use ${i}.buffered to schedule main fragment loading`),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:r}=t,i=n.type===X.MAIN;if(i){if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===In.PARSED&&(this.state=In.IDLE);return}const u=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*u.total/(u.buffering.end-u.loading.first)),je(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&zn.getBuffered(s).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),i&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var n;if(t.fatal){this.state=In.ERROR;return}switch(t.details){case F.FRAG_GAP:case F.FRAG_PARSING_ERROR:case F.FRAG_DECRYPT_ERROR:case F.FRAG_LOAD_ERROR:case F.FRAG_LOAD_TIMEOUT:case F.KEY_LOAD_ERROR:case F.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(X.MAIN,t);break;case F.LEVEL_LOAD_ERROR:case F.LEVEL_LOAD_TIMEOUT:case F.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===In.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===J.LEVEL&&(this.state=In.IDLE);break;case F.BUFFER_ADD_CODEC_ERROR:case F.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case F.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&(!this.config.interstitialsController&&this.config.assetPlayerId?this._hasEnoughToStart=!0:this.flushMainBuffer(0,Number.POSITIVE_INFINITY));break;case F.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=In.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Y.AUDIO||!this.altAudio){const n=(t===Y.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,X.MAIN),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const r=this.timelineOffset;r&&n&&(n+=r);const i=this.getLevelDetails(),s=zn.getBuffered(e),u=s.length?s.start(0):0,p=u-n,h=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||p>0&&(p<h||this.loadingParts&&p<2*((i==null?void 0:i.partTarget)||0)))&&(this.log(`adjusting start position by ${p} to match buffer start`),n+=p,this.startPosition=n),t<n&&(this.log(`seek to target start position ${n} from current time ${t} buffer start ${u}`),e.currentTime=n)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:r}=this,i=n==null?void 0:n.frag;if(!i||this.fragContextChanged(i))return;t.fragmentError=0,this.state=In.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const s=i.stats;s.parsing.start=s.parsing.end=s.buffering.start=s.buffering.end=self.performance.now(),r.trigger(g.FRAG_LOADED,n),i.bitrateTest=!1}).catch(n=>{this.state===In.STOPPED||this.state===In.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}_handleTransmuxComplete(e){const t=this.playlistType,{hls:n}=this,{remuxResult:r,chunkMeta:i}=e,s=this.getCurrentContext(i);if(!s){this.resetWhenMissingContext(i);return}const{frag:u,part:p,level:h}=s,{video:v,text:_,id3:k,initSegment:V}=r,{details:G}=h,we=this.altAudio?void 0:r.audio;if(this.fragContextChanged(u)){this.fragmentTracker.removeFragment(u);return}if(this.state=In.PARSING,V){const Se=V.tracks;if(Se){const Pt=u.initSegment||u;if(this.unhandledEncryptionError(V,u))return;this._bufferInitSegment(h,Se,Pt,i),n.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:Pt,id:t,tracks:Se})}const Je=V.initPTS,ot=V.timescale,ft=this.initPTS[u.cc];if(c(Je)&&(!ft||ft.baseTime!==Je||ft.timescale!==ot)){const Pt=V.trackId;this.initPTS[u.cc]={baseTime:Je,timescale:ot,trackId:Pt},n.trigger(g.INIT_PTS_FOUND,{frag:u,id:t,initPTS:Je,timescale:ot,trackId:Pt})}}if(v&&G){we&&v.type==="audiovideo"&&this.logMuxedErr(u);const Se=G.fragments[u.sn-1-G.startSN],Je=u.sn===G.startSN,ot=!Se||u.cc>Se.cc;if(r.independent!==!1){const{startPTS:ft,endPTS:Pt,startDTS:Kt,endDTS:xn}=v;if(p)p.elementaryStreams[v.type]={startPTS:ft,endPTS:Pt,startDTS:Kt,endDTS:xn};else if(v.firstKeyFrame&&v.independent&&i.id===1&&!ot&&(this.couldBacktrack=!0),v.dropped&&v.independent){const Ht=this.getMainFwdBufferInfo(),cn=(Ht?Ht.end:this.getLoadPosition())+this.config.maxBufferHole,ln=v.firstKeyFramePTS?v.firstKeyFramePTS:ft;if(!Je&&cn<ln-this.config.maxBufferHole&&!ot){this.backtrack(u);return}else ot&&(u.gap=!0);u.setElementaryStreamInfo(v.type,u.start,Pt,u.start,xn,!0)}else Je&&ft-(G.appliedTimelineOffset||0)>Vl&&(u.gap=!0);u.setElementaryStreamInfo(v.type,ft,Pt,Kt,xn),this.backtrackFragment&&(this.backtrackFragment=u),this.bufferFragmentData(v,u,p,i,Je||ot)}else if(Je||ot)u.gap=!0;else{this.backtrack(u);return}}if(we){const{startPTS:Se,endPTS:Je,startDTS:ot,endDTS:ft}=we;p&&(p.elementaryStreams[Y.AUDIO]={startPTS:Se,endPTS:Je,startDTS:ot,endDTS:ft}),u.setElementaryStreamInfo(Y.AUDIO,Se,Je,ot,ft),this.bufferFragmentData(we,u,p,i)}if(G&&k!=null&&k.samples.length){const Se={id:t,frag:u,details:G,samples:k.samples};n.trigger(g.FRAG_PARSING_METADATA,Se)}if(G&&_){const Se={id:t,frag:u,details:G,samples:_.samples};n.trigger(g.FRAG_PARSING_USERDATA,Se)}}logMuxedErr(e){this.warn(`${je(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==In.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(n));const{audio:i,video:s,audiovideo:u}=t;if(i){const h=e.audioCodec;let v=pn(i.codec,h);v==="mp4a"&&(v="mp4a.40.5");const _=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){v&&(v.indexOf("mp4a.40.5")!==-1?v="mp4a.40.2":v="mp4a.40.5");const k=i.metadata;k&&"channelCount"in k&&(k.channelCount||1)!==1&&_.indexOf("firefox")===-1&&(v="mp4a.40.5")}v&&v.indexOf("mp4a.40.5")!==-1&&_.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(v="mp4a.40.2",this.log(`Android: force audio codec to ${v}`)),h&&h!==v&&this.log(`Swapping manifest audio codec "${h}" for "${v}"`),i.levelCodec=v,i.id=X.MAIN,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${v||""}/${h||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=X.MAIN;const h=s.codec;if((h==null?void 0:h.length)===4)switch(h){case"hvc1":case"hev1":s.codec="hvc1.1.6.L120.90";break;case"av01":s.codec="av01.0.04M.08";break;case"avc1":s.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${h}]${s.codec!==h?" parsed-corrected="+s.codec:""}${s.supplemental?" supplemental="+s.supplemental:""}`),delete t.audiovideo}u&&(this.log(`Init audiovideo buffer, container:${u.container}, codecs[level/parsed]=[${e.codecs}/${u.codec}]`),delete t.video,delete t.audio);const p=Object.keys(t);if(p.length){if(this.hls.trigger(g.BUFFER_CODECS,t),!this.hls)return;p.forEach(h=>{const _=t[h].initSegment;_!=null&&_.byteLength&&this.hls.trigger(g.BUFFER_APPENDING,{type:h,data:_,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,X.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=In.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(zn.isBuffered(e,n)?t=this.getAppendedFrag(n):zn.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const r=this.fragPlaying,i=t.level;(!r||t.sn!==r.sn||r.level!==i)&&(this.fragPlaying=t,this.hls.trigger(g.FRAG_CHANGED,{frag:t}),(!r||r.level!==i)&&this.hls.trigger(g.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;return c(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(c(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?nr(null,n.fragments,t):null);if(r){const i=r.programDateTime;if(i!==null){const s=i+(t-r.start)*1e3;return new Date(s)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class jd extends j{constructor(e,t){super("key-loader",t),this.config=void 0,this.keyIdToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyIdToKeyInfo){const r=this.keyIdToKeyInfo[n].loader;if(r){var t;if(e&&e!==((t=r.context)==null?void 0:t.frag.type))return;r.abort()}}}detach(){for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyIdToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e].loader;t&&t.destroy()}this.keyIdToKeyInfo={}}createKeyLoadError(e,t=F.KEY_LOAD_ERROR,n,r,i){return new Lr({type:ie.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:n,networkDetails:r})}loadClear(e,t,n){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length)for(let r=0,i=t.length;r<i;r++){const s=t[r];if(e.cc<=s.cc&&(!je(e)||!je(s)||e.sn<s.sn)||!n&&r==i-1)return this.emeController.selectKeySystemFormat(s).then(u=>{if(!this.emeController)return;s.setKeyFormat(u);const p=xs(u);if(p)return this.emeController.getKeySystemAccess([p])})}if(this.config.requireKeySystemAccessOnStart){const r=Es(this.config);if(r.length)return this.emeController.getKeySystemAccess(r)}}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var n,r;t&&e.setKeyFormat(t);const i=e.decryptdata;if(!i){const h=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:`Missing decryption data on fragment in onKeyLoading (emeEnabled with controller: ${this.emeController&&this.config.emeEnabled})`);return Promise.reject(this.createKeyLoadError(e,F.KEY_LOAD_ERROR,h))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,F.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const u=vu(i);let p=this.keyIdToKeyInfo[u];if((n=p)!=null&&n.decryptdata.key)return i.key=p.decryptdata.key,Promise.resolve({frag:e,keyInfo:p});if(this.emeController&&(r=p)!=null&&r.keyLoadPromise)switch(this.emeController.getKeyStatus(p.decryptdata)){case"usable":case"usable-in-future":return p.keyLoadPromise.then(v=>{const{keyInfo:_}=v;return i.key=_.decryptdata.key,{frag:e,keyInfo:_}})}switch(this.log(`${this.keyIdToKeyInfo[u]?"Rel":"L"}oading${i.keyId?" keyId: "+ue(i.keyId):""} URI: ${i.uri} from ${e.type} ${e.level}`),p=this.keyIdToKeyInfo[u]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(p,e):this.loadKeyEME(p,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(p,e);default:return Promise.reject(this.createKeyLoadError(e,F.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var r;if(!e.decryptdata.keyId&&(r=t.initSegment)!=null&&r.data){const s=Ze(t.initSegment.data);if(s.length){let u=s[0];u.some(p=>p!==0)?(this.log(`Using keyId found in init segment ${ue(u)}`),ks.setKeyIdForUri(e.decryptdata.uri,u)):(u=ks.addKeyIdForUri(e.decryptdata.uri),this.log(`Generating keyId to patch media ${ue(u)}`)),e.decryptdata.keyId=u}}if(!e.decryptdata.keyId&&!je(t))return Promise.resolve(n);const i=this.emeController.loadKey(n);return(e.keyLoadPromise=i.then(s=>(e.mediaKeySessionContext=s,n))).catch(s=>{throw e.keyLoadPromise=null,"data"in s&&(s.data.frag=t),s})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,r=n.loader,i=new r(n);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,u)=>{const p={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},h=n.keyLoadPolicy.default,v={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},_={onSuccess:(k,V,G,we)=>{const{frag:Se,keyInfo:Je}=G,ot=vu(Je.decryptdata);if(!Se.decryptdata||Je!==this.keyIdToKeyInfo[ot])return u(this.createKeyLoadError(Se,F.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),we));Je.decryptdata.key=Se.decryptdata.key=new Uint8Array(k.data),Se.keyLoader=null,Je.loader=null,s({frag:Se,keyInfo:Je})},onError:(k,V,G,we)=>{this.resetLoader(V),u(this.createKeyLoadError(t,F.KEY_LOAD_ERROR,new Error(`HTTP Error ${k.code} loading key ${k.text}`),G,T({url:p.url,data:void 0},k)))},onTimeout:(k,V,G)=>{this.resetLoader(V),u(this.createKeyLoadError(t,F.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),G))},onAbort:(k,V,G)=>{this.resetLoader(V),u(this.createKeyLoadError(t,F.INTERNAL_ABORTED,new Error("key loading aborted"),G))}};i.load(p,v,_)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null);const s=vu(n.decryptdata)||r;delete this.keyIdToKeyInfo[s],i&&i.destroy()}}function vu(a){if(a.keyFormat!==ti.FAIRPLAY){const e=a.keyId;if(e)return ue(e)}return a.uri}function nc(a){const{type:e}=a;switch(e){case J.AUDIO_TRACK:return X.AUDIO;case J.SUBTITLE_TRACK:return X.SUBTITLE;default:return X.MAIN}}function yu(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class Hd{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(g.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(g.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,r=t.loader,i=n||r,s=new i(t);return this.loaders[e.type]=s,s}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:J.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:i,url:s,deliveryDirectives:u,levelInfo:p}=t;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:J.LEVEL,url:s,deliveryDirectives:u,levelOrTrack:p})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:u}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:J.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:u})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:u}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:J.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:u})}onLevelsUpdated(e,t){const n=this.loaders[J.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[J.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const h=this.hls.logger,v=r.context;if(v&&v.levelOrTrack===e.levelOrTrack&&(v.url===e.url||v.deliveryDirectives&&!e.deliveryDirectives)){v.url===e.url?h.log(`[playlist-loader]: ignore ${e.url} ongoing request`):h.log(`[playlist-loader]: ignore ${e.url} in favor of ${v.url}`);return}h.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}let i;if(e.type===J.MANIFEST?i=n.manifestLoadPolicy.default:i=b({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),c((t=e.deliveryDirectives)==null?void 0:t.part)){let h;if(e.type===J.LEVEL&&e.level!==null?h=this.hls.levels[e.level].details:e.type===J.AUDIO_TRACK&&e.id!==null?h=this.hls.audioTracks[e.id].details:e.type===J.SUBTITLE_TRACK&&e.id!==null&&(h=this.hls.subtitleTracks[e.id].details),h){const v=h.partTarget,_=h.targetduration;if(v&&_){const k=Math.max(v*3,_*.8)*1e3;i=b({},i,{maxTimeToFirstByteMs:Math.min(k,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(k,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},u={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},p={onSuccess:(h,v,_,k)=>{const V=this.getInternalLoader(_);this.resetInternalLoader(_.type);const G=h.data;v.parsing.start=performance.now(),Ls.isMediaPlaylist(G)||_.type!==J.MANIFEST?this.handleTrackOrLevelPlaylist(h,v,_,k||null,V):this.handleMasterPlaylist(h,v,_,k)},onError:(h,v,_,k)=>{this.handleNetworkError(v,_,!1,h,k)},onTimeout:(h,v,_)=>{this.handleNetworkError(v,_,!0,void 0,h)}};r.load(e,u,p)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:n}=this.hls;(e||n)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,n,r){const i=this.hls,s=e.data,u=yu(e,n),p=Ls.parseMasterPlaylist(s,u);if(p.playlistParsingError){t.parsing.end=performance.now(),this.handleManifestParsingError(e,n,p.playlistParsingError,r,t);return}const{contentSteering:h,levels:v,sessionData:_,sessionKeys:k,startTimeOffset:V,variableList:G}=p;this.variableList=G,v.forEach(ot=>{const{unknownCodecs:ft}=ot;if(ft){const{preferManagedMediaSource:Pt}=this.hls.config;let{audioCodec:Kt,videoCodec:xn}=ot;for(let Ht=ft.length;Ht--;){const cn=ft[Ht];at(cn,"audio",Pt)?(ot.audioCodec=Kt=Kt?`${Kt},${cn}`:cn,jt.audio[Kt.substring(0,4)]=2,ft.splice(Ht,1)):at(cn,"video",Pt)&&(ot.videoCodec=xn=xn?`${xn},${cn}`:cn,jt.video[xn.substring(0,4)]=2,ft.splice(Ht,1))}}});const{AUDIO:we=[],SUBTITLES:Se,"CLOSED-CAPTIONS":Je}=Ls.parseMasterPlaylistMedia(s,u,p);we.length&&!we.some(ft=>!ft.url)&&v[0].audioCodec&&!v[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),we.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Pr({}),bitrate:0,url:""})),i.trigger(g.MANIFEST_LOADED,{levels:v,audioTracks:we,subtitles:Se,captions:Je,contentSteering:h,url:u,stats:t,networkDetails:r,sessionData:_,sessionKeys:k,startTimeOffset:V,variableList:G})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:u,level:p,type:h}=n,v=yu(e,n),_=c(p)?p:c(u)?u:0,k=nc(n),V=Ls.parseLevelPlaylist(e.data,v,_,k,0,this.variableList);if(h===J.MANIFEST){const G={attrs:new Pr({}),bitrate:0,details:V,name:"",url:v};V.requestScheduled=t.loading.start+Ci(V,0),s.trigger(g.MANIFEST_LOADED,{levels:[G],audioTracks:[],url:v,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=V,this.handlePlaylistLoaded(V,e,t,n,r,i)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(g.ERROR,{type:ie.NETWORK_ERROR,details:F.MANIFEST_PARSING_ERROR,fatal:t.type===J.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:i})}handleNetworkError(e,t,n=!1,r,i){let s=`A network ${n?"timeout":"error"+(r?" (status "+r.code+")":"")} occurred while loading ${e.type}`;e.type===J.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===J.AUDIO_TRACK||e.type===J.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const u=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let p=F.UNKNOWN,h=!1;const v=this.getInternalLoader(e);switch(e.type){case J.MANIFEST:p=n?F.MANIFEST_LOAD_TIMEOUT:F.MANIFEST_LOAD_ERROR,h=!0;break;case J.LEVEL:p=n?F.LEVEL_LOAD_TIMEOUT:F.LEVEL_LOAD_ERROR,h=!1;break;case J.AUDIO_TRACK:p=n?F.AUDIO_TRACK_LOAD_TIMEOUT:F.AUDIO_TRACK_LOAD_ERROR,h=!1;break;case J.SUBTITLE_TRACK:p=n?F.SUBTITLE_TRACK_LOAD_TIMEOUT:F.SUBTITLE_LOAD_ERROR,h=!1;break}v&&this.resetInternalLoader(e.type);const _={type:ie.NETWORK_ERROR,details:p,fatal:h,url:e.url,loader:v,context:e,error:u,networkDetails:t,stats:i};if(r){const k=(t==null?void 0:t.url)||e.url;_.response=T({url:k,data:void 0},r)}this.hls.trigger(g.ERROR,_)}handlePlaylistLoaded(e,t,n,r,i,s){const u=this.hls,{type:p,level:h,levelOrTrack:v,id:_,groupId:k,deliveryDirectives:V}=r,G=yu(t,r),we=nc(r);let Se=typeof r.level=="number"&&we===X.MAIN?h:void 0;const Je=e.playlistParsingError;if(Je){if(this.hls.logger.warn(`${Je} ${e.url}`),!u.config.ignorePlaylistParsingErrors){u.trigger(g.ERROR,{type:ie.NETWORK_ERROR,details:F.LEVEL_PARSING_ERROR,fatal:!1,url:G,error:Je,reason:Je.message,response:t,context:r,level:Se,parent:we,networkDetails:i,stats:n});return}e.playlistParsingError=null}if(!e.fragments.length){const ot=e.playlistParsingError=new Error("No Segments found in Playlist");u.trigger(g.ERROR,{type:ie.NETWORK_ERROR,details:F.LEVEL_EMPTY_ERROR,fatal:!1,url:G,error:ot,reason:ot.message,response:t,context:r,level:Se,parent:we,networkDetails:i,stats:n});return}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),p){case J.MANIFEST:case J.LEVEL:if(Se){if(!v)Se=0;else if(v!==u.levels[Se]){const ot=u.levels.indexOf(v);ot>-1&&(Se=ot)}}u.trigger(g.LEVEL_LOADED,{details:e,levelInfo:v||u.levels[0],level:Se||0,id:_||0,stats:n,networkDetails:i,deliveryDirectives:V,withoutMultiVariant:p===J.MANIFEST});break;case J.AUDIO_TRACK:u.trigger(g.AUDIO_TRACK_LOADED,{details:e,track:v,id:_||0,groupId:k||"",stats:n,networkDetails:i,deliveryDirectives:V});break;case J.SUBTITLE_TRACK:u.trigger(g.SUBTITLE_TRACK_LOADED,{details:e,track:v,id:_||0,groupId:k||"",stats:n,networkDetails:i,deliveryDirectives:V});break}}}class bo{static get version(){return lo}static isMSESupported(){return tc()}static isSupported(){return zd()}static getMediaSource(){return De()}static get Events(){return g}static get MetadataSchema(){return Le}static get ErrorTypes(){return ie}static get ErrorDetails(){return F}static get DefaultConfig(){return bo.defaultConfig?bo.defaultConfig:Id}static set DefaultConfig(e){bo.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 _o,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=me(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=Rd(bo.DefaultConfig,e,t);this.userConfig=e,n.progressive&&Od(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:u,fpsController:p}=n,h=new u(this),v=this.abrController=new r(this),_=new Un(this),k=n.interstitialsController,V=k?this.interstitialsController=new k(this,bo):null,G=this.bufferController=new i(this,_),we=this.capLevelController=new s(this),Se=new p(this),Je=new Hd(this),ot=n.contentSteeringController,ft=ot?new ot(this):null,Pt=this.levelController=new Fd(this,ft),Kt=new Bd(this),xn=new jd(this.config,this.logger),Ht=this.streamController=new Zd(this,_,xn),cn=this.gapController=new kd(this,_);we.setStreamController(Ht),Se.setStreamController(Ht);const ln=[Je,Pt,Ht];V&&ln.splice(1,0,V),ft&&ln.splice(1,0,ft),this.networkControllers=ln;const Yt=[v,G,cn,we,Se,Kt,_];this.audioTrackController=this.createController(n.audioTrackController,ln);const kn=n.audioStreamController;kn&&ln.push(this.audioStreamController=new kn(this,_,xn)),this.subtitleTrackController=this.createController(n.subtitleTrackController,ln);const pr=n.subtitleStreamController;pr&&ln.push(this.subtititleStreamController=new pr(this,_,xn)),this.createController(n.timelineController,Yt),xn.emeController=this.emeController=this.createController(n.emeController,Yt),this.cmcdController=this.createController(n.cmcdController,Yt),this.latencyController=this.createController($d,Yt),this.coreComponents=Yt,ln.push(h);const kr=h.onErrorOut;typeof kr=="function"&&this.on(g.ERROR,kr,h),this.on(g.MANIFEST_LOADED,Je.onManifestLoaded,Je)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,r){this._emitter.off(e,t,n,r)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const r=e===g.ERROR;this.trigger(g.ERROR,{type:ie.OTHER_ERROR,details:F.INTERNAL_EXCEPTION,fatal:r,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(g.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const i=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(g.ERROR,{type:ie.OTHER_ERROR,details:F.ATTACH_MEDIA_ERROR,fatal:!0,error:i});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,n=t?e.media:e,r=t?e:{media:n};this._media=n,this.trigger(g.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(g.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(g.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=E.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${r}`),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(g.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let n=0;n<this.networkControllers.length&&(this.networkControllers[n].startLoad(e,t),!(!this.started||!this.networkControllers));n++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[X.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[X.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[X.SUBTITLE]=this.subtititleStreamController.inFlightFrag),e}swapAudioCodec(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){this.logger.log("recoverMediaError");const e=this._media,t=e==null?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),t&&this.startLoad(t))}removeLevel(e){this.levelController.removeLevel(e)}get sessionId(){let e=this._sessionId;return e||(e=this._sessionId=kc()),e}get levels(){const e=this.levelController.levels;return e||[]}get latestLevelDetails(){return this.streamController.getLevelDetails()||null}get loadLevelObj(){return this.levelController.loadLevelObj}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get abrEwmaDefaultEstimate(){const{bwEstimator:e}=this.abrController;return e?e.defaultEstimate:NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){vt(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let r;if(t===-1&&e!=null&&e.length?r=e.length-1:r=t,n)for(let i=r;i--;){const s=e[i].attrs["HDCP-LEVEL"];if(s&&s<=n)return i}return r}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){const n=zt(t);return dn(e,n,navigator.mediaCapabilities)}}bo.defaultConfig=void 0},16722:function(un,We,m){"use strict";m.d(We,{Z:function(){return X}});const c=o=>typeof o=="object"&&o!=null&&o.nodeType===1,ee=(o,x)=>(!x||o!=="hidden")&&o!=="visible"&&o!=="clip",$=(o,x)=>{if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){const L=getComputedStyle(o,null);return ee(L.overflowY,x)||ee(L.overflowX,x)||(b=>{const S=(T=>{if(!T.ownerDocument||!T.ownerDocument.defaultView)return null;try{return T.ownerDocument.defaultView.frameElement}catch(B){return null}})(b);return!!S&&(S.clientHeight<b.scrollHeight||S.clientWidth<b.scrollWidth)})(o)}return!1},ie=(o,x,L,b,S,T,B,z)=>T<o&&B>x||T>o&&B<x?0:T<=o&&z<=L||B>=x&&z>=L?T-o-b:B>x&&z<L||T<o&&z>L?B-x+S:0,F=o=>{const x=o.parentElement;return x==null?o.getRootNode().host||null:x},g=(o,x)=>{var L,b,S,T;if(typeof document=="undefined")return[];const{scrollMode:B,block:z,inline:j,boundary:U,skipOverflowHiddenElements:A}=x,K=typeof U=="function"?U:lt=>lt!==U;if(!c(o))throw new TypeError("Invalid target");const I=document.scrollingElement||document.documentElement,M=[];let le=o;for(;c(le)&&K(le);){if(le=F(le),le===I){M.push(le);break}le!=null&&le===document.body&&$(le)&&!$(document.documentElement)||le!=null&&$(le,A)&&M.push(le)}const me=(b=(L=window.visualViewport)==null?void 0:L.width)!=null?b:innerWidth,ce=(T=(S=window.visualViewport)==null?void 0:S.height)!=null?T:innerHeight,{scrollX:De,scrollY:Pe}=window,{height:Ce,width:He,top:ue,right:W,bottom:P,left:de}=o.getBoundingClientRect(),{top:ae,right:Q,bottom:E,left:C}=(lt=>{const ke=window.getComputedStyle(lt);return{top:parseFloat(ke.scrollMarginTop)||0,right:parseFloat(ke.scrollMarginRight)||0,bottom:parseFloat(ke.scrollMarginBottom)||0,left:parseFloat(ke.scrollMarginLeft)||0}})(o);let Y=z==="start"||z==="nearest"?ue-ae:z==="end"?P+E:ue+Ce/2-ae+E,be=j==="center"?de+He/2-C+Q:j==="end"?W+Q:de-C;const je=[];for(let lt=0;lt<M.length;lt++){const ke=M[lt],{height:Ye,width:et,top:_t,right:Re,bottom:At,left:rt}=ke.getBoundingClientRect();if(B==="if-needed"&&ue>=0&&de>=0&&P<=ce&&W<=me&&(ke===I&&!$(ke)||ue>=_t&&P<=At&&de>=rt&&W<=Re))return je;const Nt=getComputedStyle(ke),Xe=parseInt(Nt.borderLeftWidth,10),Ge=parseInt(Nt.borderTopWidth,10),Ne=parseInt(Nt.borderRightWidth,10),Ie=parseInt(Nt.borderBottomWidth,10);let te=0,$e=0;const Ae="offsetWidth"in ke?ke.offsetWidth-ke.clientWidth-Xe-Ne:0,Z="offsetHeight"in ke?ke.offsetHeight-ke.clientHeight-Ge-Ie:0,D="offsetWidth"in ke?ke.offsetWidth===0?0:et/ke.offsetWidth:0,he="offsetHeight"in ke?ke.offsetHeight===0?0:Ye/ke.offsetHeight:0;if(I===ke)te=z==="start"?Y:z==="end"?Y-ce:z==="nearest"?ie(Pe,Pe+ce,ce,Ge,Ie,Pe+Y,Pe+Y+Ce,Ce):Y-ce/2,$e=j==="start"?be:j==="center"?be-me/2:j==="end"?be-me:ie(De,De+me,me,Xe,Ne,De+be,De+be+He,He),te=Math.max(0,te+Pe),$e=Math.max(0,$e+De);else{te=z==="start"?Y-_t-Ge:z==="end"?Y-At+Ie+Z:z==="nearest"?ie(_t,At,Ye,Ge,Ie+Z,Y,Y+Ce,Ce):Y-(_t+Ye/2)+Z/2,$e=j==="start"?be-rt-Xe:j==="center"?be-(rt+et/2)+Ae/2:j==="end"?be-Re+Ne+Ae:ie(rt,Re,et,Xe,Ne+Ae,be,be+He,He);const{scrollLeft:_e,scrollTop:pe}=ke;te=he===0?0:Math.max(0,Math.min(pe+te/he,ke.scrollHeight-Ye/he+Z)),$e=D===0?0:Math.max(0,Math.min(_e+$e/D,ke.scrollWidth-et/D+Ae)),Y+=pe-te,be+=_e-$e}je.push({el:ke,top:te,left:$e})}return je},J=o=>o===!1?{block:"end",inline:"nearest"}:(x=>x===Object(x)&&Object.keys(x).length!==0)(o)?o:{block:"start",inline:"nearest"};function X(o,x){if(!o.isConnected||!(S=>{let T=S;for(;T&&T.parentNode;){if(T.parentNode===document)return!0;T=T.parentNode instanceof ShadowRoot?T.parentNode.host:T.parentNode}return!1})(o))return;const L=(S=>{const T=window.getComputedStyle(S);return{top:parseFloat(T.scrollMarginTop)||0,right:parseFloat(T.scrollMarginRight)||0,bottom:parseFloat(T.scrollMarginBottom)||0,left:parseFloat(T.scrollMarginLeft)||0}})(o);if((S=>typeof S=="object"&&typeof S.behavior=="function")(x))return x.behavior(g(o,x));const b=typeof x=="boolean"||x==null?void 0:x.behavior;for(const{el:S,top:T,left:B}of g(o,J(x))){const z=T-L.top+L.bottom,j=B-L.left+L.right;S.scroll({top:z,left:j,behavior:b})}}}}]);
}());